WO2015180339A1 - Message push processing method and device, push server, and application server - Google Patents

Message push processing method and device, push server, and application server Download PDF

Info

Publication number
WO2015180339A1
WO2015180339A1 PCT/CN2014/087614 CN2014087614W WO2015180339A1 WO 2015180339 A1 WO2015180339 A1 WO 2015180339A1 CN 2014087614 W CN2014087614 W CN 2014087614W WO 2015180339 A1 WO2015180339 A1 WO 2015180339A1
Authority
WO
WIPO (PCT)
Prior art keywords
push
message
terminal
server
module
Prior art date
Application number
PCT/CN2014/087614
Other languages
French (fr)
Chinese (zh)
Inventor
季健
潘道华
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015180339A1 publication Critical patent/WO2015180339A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements

Definitions

  • the present invention relates to the field of communications, and in particular, to a message push processing method, apparatus, push server, and application server.
  • the server needs to send messages to the client actively.
  • the early implementation technology is that the client continuously refreshes the server to obtain the latest data through polling technology. This method needs to establish a new one each time.
  • the Hypertext Transfer Protocol (HTTP) connection has a certain delay, which makes the application of frequent information transmission unbearable.
  • the most recent server push technology is that the client and the server maintain a persistent connection. The server can send information to the client at any time through the connection.
  • HTTP long connection when the number of terminals in the system is large, the server side needs to maintain A large number of HTTP long connections, the performance of the server is relatively large, and the number of terminals that can be served by one server will decrease.
  • the server uses the HTTP protocol to push messages to the terminal, which has a large performance cost and a low push efficiency.
  • the present invention provides a message push processing method and apparatus, a push server, and an application server, so as to at least solve the problem that the server uses the HTTP protocol to push messages to the terminal, and the performance of the server is high, and the push efficiency is low.
  • a message push processing method including: acquiring a push message for pushing; determining a target terminal to which the push message is pushed; and using the user datagram protocol UDP message to push the push The message is pushed to the target terminal.
  • the pushing the push message to the target terminal by using the UDP message includes: after pushing the push message to the target terminal, determining whether the target terminal is received within a predetermined time And a reply response message for determining that the push message is received; if the determination result is no, the push message is re-pushed to the target terminal.
  • determining whether the response message sent by the target terminal for determining that the push message is received is received in the predetermined time includes: After the push message is pushed to the target terminal, the push message is stored in an ordered queue; when the reply response message of the push message is received, the push message is sent from the ordered Deleting the queue; determining whether the push message is scanned within the predetermined time; if the determination result is yes, determining that the push message is pushed to the target terminal fails.
  • a message push processing method comprising: broadcasting a push message to one or more push servers; and receiving, by the one or more push servers, a reply message of the push message,
  • the one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
  • the method before the transmitting the push message to the one or more push servers, the method further includes: a terminal that allocates a push message to the one or more push servers according to a predetermined load balancing condition.
  • the method further includes: determining, according to the reply message, that the offline terminal has failed to push the message; And storing the push message and the offline terminal that failed to push the push message; determining whether the original push server corresponding to the offline terminal is in a suspended state when the offline terminal is online again.
  • the determination result is YES
  • the push message is pushed by the new push server allocated for the offline terminal that is online again; and/or, if the determination result is negative, the original push server is adopted. Pushing the push message for the offline terminal that is online again.
  • a message push processing apparatus comprising: an obtaining module configured to acquire a push message for pushing; a determining module configured to determine a target terminal to which the push message is pushed; and a first push The module is configured to use the user datagram protocol UDP message to push the push message to the target terminal.
  • the first pushing module includes: a determining unit, configured to determine, after the pushing the push message is sent to the target terminal, whether the received by the target terminal is received within a predetermined time for determining the received location a reply response message for the push message; the push unit is configured to re-push the push message to the target terminal if the determination result of the determination unit is negative.
  • the determining unit comprises: a storage subunit, configured to: after pushing the push message to the target terminal, store the push message in an ordered queue; delete the subunit, and set to receive And when the reply response message of the push message is sent, the push message is deleted from the ordered queue; and the determining subunit is configured to determine whether the push message is scanned within the predetermined time; The unit is configured to determine that the push message is failed to be pushed to the target terminal if the determination result of the determination subunit is YES.
  • a push server comprising the apparatus of any of the above.
  • a message push processing apparatus comprising: a broadcast module configured to broadcast a push message to one or more push servers; and a receiving module configured to receive the one or more pushes The server pushes the reply message of the push message, wherein the one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
  • the apparatus further comprises: an allocation module configured to allocate a push message to the one or more push servers according to a predetermined load balancing condition.
  • the device further includes: a second determining module, configured to determine, according to the reply message, that the offline terminal has failed to push the message; and the storage module is configured to be in a case that the determination result of the second determining module is yes And storing the push message and the offline terminal that failed to push the push message; the third determining module is configured to determine whether the original push server corresponding to the offline terminal is when the offline terminal is online again In a suspended state, the second push module is configured to push the push message by a new push server allocated for the offline terminal that is online again when the determination result of the third determination module is YES; and Or, the third push module is configured to: when the determination result of the third determination module is negative, use the original push server to push the push message for the offline terminal that is online again.
  • a second determining module configured to determine, according to the reply message, that the offline terminal has failed to push the message
  • the storage module is configured to be in a case that the determination result of the second determining module is yes And storing the push message and the offline terminal
  • an application server comprising the apparatus of any of the above.
  • the method of the present invention is to obtain a push message for push, determine a target terminal to which the push message is pushed, and push the push message to the target terminal by using a user datagram protocol UDP message, thereby solving the related art.
  • the server uses the HTTP protocol to push messages to the terminal, which has high performance consumption and low push efficiency, thereby achieving the effect of reducing system performance consumption and improving push efficiency.
  • FIG. 1 is a flowchart of a first method of message push processing according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a second method for message push processing according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a message push processing apparatus 1 according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing a preferred structure of the first push module 36 in the message push processing apparatus 1 according to an embodiment of the present invention
  • FIG. 5 is a block diagram showing a preferred structure of the determining unit 42 in the first push module 36 in the message push processing apparatus 1 according to an embodiment of the present invention
  • FIG. 6 is a structural block diagram of a push server according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a message push processing apparatus 2 according to an embodiment of the present invention.
  • FIG. 8 is a block diagram 1 of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention.
  • FIG. 9 is a block diagram 2 of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention.
  • FIG. 10 is a structural block diagram of an application server according to an embodiment of the present invention.
  • FIG. 11 is a block diagram of a distributed message push system employing a UDP protocol according to an embodiment of the present invention.
  • FIG. 12 is a flow chart of a message push method in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a message push processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 acquiring a push message for pushing
  • Step S104 determining a target terminal to which the push message is pushed
  • Step S106 Push the push message to the target terminal by using a user datagram protocol UDP message.
  • the push message is pushed to the target terminal by means of the UDP message, and the message is pushed by using the HTTP message in the related art, which not only solves the problem that the HTTP protocol pushes the message to the terminal in the related art.
  • the following processing may be adopted: after the push message is pushed to the target terminal, it is determined whether the target terminal is sent within a predetermined time. After determining that the response message of the push message is received; when receiving the reply response message of the push message fed back by the target terminal within a predetermined time, it may be determined that the push message is successful. If the result of the determination is negative, the message is pushed back to the target terminal. It should be noted that the above determining step may be used for confirmation multiple times, and when the reply response message of the target terminal is not received multiple times, the message push to the target terminal is discarded.
  • the processing may be performed by using a message queue.
  • the method is completed: after the push message is pushed to the target terminal, the push message is stored in an ordered queue; when the reply response message of the push message is received, the push message is deleted from the ordered queue; Whether the push message is scanned within the predetermined time; if the result of the determination is yes, it is determined that the push of the message to the target terminal has failed.
  • FIG. 2 is a flowchart of a message push processing method 2 according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 broadcasting a push message to one or more push servers
  • Step S204 The one or more push servers push the reply message of the message, wherein the one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
  • Pushing messages by means of HTTP messages not only effectively solves the problem that the HTTP protocol pushes messages to the terminal in the related art, and the push efficiency is low, thereby achieving the effect of reducing system performance consumption and improving push efficiency.
  • the terminal that pushes the message may be allocated to one or more push servers according to the predetermined load balancing condition, so that the system performance is balanced, and collision and waste are effectively avoided.
  • the terminal receives the push message, or to ensure that the terminal receives the push message, after receiving the reply message of the one or more push servers to push the message, according to the reply message, determining that the message push failure is offline. If the result of the determination is yes, the application server saves the push message and pushes the offline terminal that failed to push the message; after that, it determines that the offline terminal ends when the offline terminal goes online again. Whether the original push server corresponding to the end is in a suspended state (ie, the original push server no longer pushes the push message to the terminal); if the judgment result is yes, the push message is pushed by the new push server allocated for the offline terminal that is online again.
  • the original push server is used to push the push message for the offline terminal that is online again.
  • the problem that the offline terminal that does not receive the push message is received in the related art, and the original push message cannot be received when it is online and assigned to the new push server is successfully implemented, and the offline terminal is successfully implemented. Re-pushing, to a certain extent, improves the user experience.
  • a message push processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram of a message push processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes an obtaining module 32, a determining module 34, and a first pushing module 36. The apparatus will be described below.
  • the obtaining module 32 is configured to obtain a push message for pushing; the determining module 34 is connected to the obtaining module 32, and is configured to determine a target terminal that pushes the push message; the first pushing module 36 is connected to the determining module 34, and is configured to The push message is pushed to the target terminal by means of the user datagram protocol UDP message.
  • FIG. 4 is a block diagram showing a preferred structure of the first push module 36 in the message push processing apparatus 1 according to the embodiment of the present invention.
  • the first push module 36 includes a determining unit 42 and a pushing unit 44. The first push module 36 will be described.
  • the determining unit 42 is configured to: after receiving the push message to the target terminal, determine whether a response message for determining to receive the push message sent by the target terminal is received within a predetermined time; the pushing unit 44 is connected to the determining unit 42 When the determination result of the above-described determination unit 42 is NO, the message is re-pushed to the target terminal.
  • FIG. 5 is a block diagram showing a preferred structure of the determining unit 42 in the first push module 36 in the message push processing apparatus 1 according to the embodiment of the present invention.
  • the determining unit 42 includes a storage subunit 52 and a delete subunit 54.
  • the judging subunit 56 and the determining subunit 58 are described below.
  • the storage subunit 52 is configured to store the push message in an ordered queue after pushing the push message to the target terminal; the delete subunit 54 is connected to the storage subunit 52, and is set to receive the reply of the push message. In response to the message, the push message is deleted from the ordered queue; the determining sub-unit 56 is coupled to the delete sub-unit 54 and configured to determine whether a push message is scanned within a predetermined time; the determining sub-unit 58 is connected to the above determination The subunit 56 is arranged to determine that the push message is pushed to the target terminal fails in the case where the judgment result of the judgment subunit is YES.
  • FIG. 6 is a structural block diagram of a push server according to an embodiment of the present invention. As shown in FIG. 6, the push server 60 includes the message push processing device one 62 of any of the above.
  • FIG. 7 is a structural block diagram of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes a broadcast module 72 and a receiving module 74, which will be described below.
  • the broadcast module 72 is configured to broadcast a push message to one or more push servers; the receiving module 74 is connected to the broadcast module 72, and is configured to receive a reply message of the one or more push servers to push the push message, wherein one or The plurality of push servers use the user datagram protocol UDP message to push the push message to the terminal.
  • FIG. 8 is a block diagram of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes an allocating module 82 in addition to all the structures shown in FIG. Module 82 is described.
  • the distribution module 82 is coupled to the broadcast module 72 and configured to allocate a push message to one or more push servers in accordance with predetermined load balancing conditions.
  • FIG. 9 is a block diagram of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 9, the apparatus includes a second judging module 90 and a storage module 92, in addition to all the structures shown in FIG. The third judging module 94, the second pushing module 96 and/or the third pushing module 98, will be described below.
  • the second determining module 90 is connected to the receiving module 74, and is configured to determine, according to the reply message, that the offline terminal has failed to push the message; the storage module 92 is connected to the second determining module 90, and is set to be determined by the second determining module. If the result is YES, the push message is saved, and the push-down terminal fails to push the push message; the third determination module 94 is connected to the storage module 92, and is configured to determine that the offline terminal corresponds to the original when the offline terminal is online again. Whether the push server is in a suspended state; the second push module 96 is connected to the third determining module 94, and is configured to allocate a new offline terminal for the online terminal when the third determination module determines that the result is yes. Pushing the server push message; and/or, the third pushing module 98 is connected to the third determining module 94, and is configured to use the original push server as the offline line when the third determining module determines that the result is negative. The terminal pushes the message.
  • FIG. 10 is a structural block diagram of an application server according to an embodiment of the present invention. As shown in FIG. 10, the application server 100 includes the message push processing device two 102 of any of the above.
  • the server adopts the problem that the performance of the push message to the terminal is high, and the push efficiency is low. Because the traditional HTTP protocol is adopted, the server performance pressure is high, and the number of users that can be served is reduced.
  • the message pushing system based on the Transmission Control Protocol (TCP) method uses the User Datagram Protocol (User Datagram Protocol) to push messages, which reduces the performance of the server. , improve the server's message push capabilities.
  • TCP Transmission Control Protocol
  • User Datagram Protocol User Datagram Protocol
  • the distributed message push scheme based on the UDP protocol since the UDP protocol is a connectionless protocol, the push server does not need to maintain a large number of connections, and the performance consumption is much lower than that of the HTTP method.
  • the system is distributed and can support a large number of users. (that is, the throughput of the server is greatly increased), and the fault tolerance is also better. When a server is hanged, the user's service is not affected.
  • FIG. 11 is a block diagram of a distributed message push system employing a UDP protocol, as shown in FIG. 11, the system includes a management platform 112, an access server 114, one or more push servers 116, and one or more, in accordance with an embodiment of the present invention. Terminals 118, the system will be described below.
  • the management platform 112 provides a web interface for the operator to operate, and the operator can select which terminals or a certain type of terminal to send messages through the web interface.
  • the access server 114 assumes three functions, one is as a manager, the message push server in the management system, the message push server is distributed, there may be multiple in the system, and multiple push servers are managed by the access server; The second is to load balance the terminal. When the terminal accesses the message push system, it first loads the load to the access server, and the access server allocates a push server to the terminal. The third is between the management platform and the message push server. The transit module sends a message to the access server when the message is to be pushed to the terminal, and the access server broadcasts the message to the push server.
  • the push server 16 directly interacts with the terminal, and is mainly responsible for management of terminal data and message push to the terminal.
  • the terminal receives the registration message of the terminal, maintains the related information of the terminal, and receives the heartbeat message of the terminal, and maintains the online state information of the terminal. If the heartbeat message of the terminal is not received within a certain period of time, the terminal is placed in an offline state.
  • the push server When a message needs to be pushed, the push server generates a corresponding push message according to the message size and the target terminal, and pushes the push message to the terminal.
  • the system can be deployed independently with the IPTV service system.
  • the source of the system can have two aspects, one is that the operator operates on the management platform, and the IPTV service system can also send the interface to the access server through the interface.
  • the IPTV system sends a message push request. After the access server of the message system receives the push message request, since the access server does not save the load balancing result of the terminal, it does not know which push servers the target terminal is allocated on, so access The server can only broadcast the push request to all the push servers, and each push server determines whether the push terminal is on the server, and if so, obtains the relevant target terminal. Information, message push to the target terminal, and if not, the reply access server target terminal does not exist.
  • the access server For the message push, if the push is successful, the access server is successfully sent back to the access server. Otherwise, the list of the terminals that failed to push is returned, and the access server aggregates the reply information of each push server and returns the push result to the service system or the management platform.
  • the push server uses the UDP protocol for message push. Considering the characteristics of UDP transmission, for a message of 1K size, the message needs to be fragmented, and one message is divided into multiple fragments and pushed to the terminal, and the APP application of the terminal receives the score. After the piece of data, the message is assembled and restored to the original message.
  • the message pushed by the push server to the terminal includes: the ID of the message, the total size of the message, the total number of fragments of the message, the index of the message (that is, the first fragment belonging to the original message), the actual fragmentation data, and the terminal is After receiving the UDP message, it is determined according to the message header whether the message is complete. If there is more than one fragmented data, after the plurality of fragmented data is received, the header is removed, and the message body in the fragmented data is assembled into A completed original message.
  • the push server For the push message received by the push server, the push server stores the message in the original message queue.
  • the push server needs to process the original message queue, generate a message queue to be sent, and then send the message in the message queue for transmission.
  • IPTV message push is divided into various forms, for example, network-wide user push, single or multiple specified user push, push by user group, push by IP address segment, push by user level, etc., so the original message is sent by the specified user.
  • other push methods require the push server to generate a target terminal list.
  • the user's grouping, level, and other information are reported to the push server when the terminal registers with the push server.
  • the push server establishes a relevant index based on the user information, for example, a specified user.
  • the push server finds all the users belonging to the packet according to the user group index, thereby generating a target terminal list.
  • the message is fragmented, and a single fragment and a single terminal generate a mapping relationship between the message and the terminal to be sent.
  • the mapping relationship is added to the message queue to be sent, the push server scans the queue, and the received message is sent to the corresponding terminal.
  • the timeout and retransmission management of the push message The UDP protocol is an unreliable protocol. Packet loss may occur during the transmission process. Therefore, for each push message, the terminal needs to respond to ensure that the message is successfully pushed. After the UDP message is sent out, the message is moved from the queue to be sent to an ordered queue. The ordering criterion is the time when the message is sent. When the terminal replies to the response message, the push system will correspondingly from the ordered queue. The push message is deleted. The push system periodically scans the ordered queue, traverses from the beginning, compares the original time with the message sending time, and if the timeout period is exceeded, the message is re-inputted into the message queue to be sent, and the push system resends the message. A maximum number of retransmissions is set for each message. When the number of retransmissions exceeds the maximum number of retransmissions, the retransmission is not repeated, and the status of the message transmission is set to failure.
  • the message is re-pushed: for the message that needs to push the message, the high-level push message must be pushed to the terminal. Even if the terminal goes offline, the push message is retained, and after the terminal goes online, The push server needs to re-send the message to the terminal, and for the low level, if the push fails, the push is canceled and the push is no longer pushed. However, if the message of the failed push is saved and re-pushed, the failure message cannot be simply saved on the push server that failed to push.
  • the offline terminal is re-launched, and if the number of push servers changes during this period, When the terminal is re-online, it may be assigned to another push server, and the push server is successful because the last message is pushed, so the message is no longer retained, so that the previous offline message can no longer be used. Push to the terminal. Therefore, in this embodiment, for the terminal that fails to be pushed, the access server saves after receiving the report from the push server.
  • the load server must first be load balanced, and the access server will be in itself. The list of terminals that failed to be pushed is queried whether the terminal is located therein.
  • a push server is directly allocated to the terminal, and if so, the access server fails to push the push server while assigning the push server to the terminal.
  • the message is sent to the assigned push server, so that when the terminal registers with the push server, the push server resends the last failed push message to the terminal.
  • the access server may also serve as a message portal, and broadcast the original message to the push server, and the push server queries the target terminal according to the target terminal to be pushed in the original message.
  • the related information of the terminal is pushed to the target terminal through the UDP protocol.
  • IPTV message-based IPTV message push solution not only effectively solves the problem of excessive server performance consumption caused by the HTTP connection mode, but also solves the problem that when the terminal goes offline, the push fails.
  • the terminal is back online, the number of push servers changes, and the terminal is load balanced to another push server, which causes the message that the last push failure can no longer be pushed again.
  • FIG. 12 is a flowchart of a message pushing method according to a preferred embodiment of the present invention. As shown in FIG. 12, the process includes the following steps:
  • Step S1202 After the startup, the push server establishes a long connection with the access server, and reports its own information to the access server.
  • Step S1204 The push server periodically sends a heartbeat to the access server to maintain a long connection between the server and the access server;
  • Step S1206 After the terminal starts the application of the IPTV app, the terminal registers with the message system, and reports its own related information to the push server.
  • Step S1208 The terminal periodically sends a UDP heartbeat to the push server to maintain its online state.
  • Step S1210 The management platform or the service system pushes the message that needs to be pushed to the access server.
  • Step S1212 The access server broadcasts the message that needs to be pushed to the push server.
  • Step S1214 After receiving the push request, the push server performs corresponding processing: the push server queries the terminal terminal to maintain the related information of the target terminal, and if not, the reply server returns the target terminal does not exist; After the target terminal information, the original message larger than 1K is fragmented, and a one-to-one correspondence between the fragment and the push terminal is generated, and is put into the message queue to be sent;
  • Step S1216 The push server waits for the message in the sent message queue to be pushed to the terminal through the UDP protocol;
  • Step S2128 after receiving the UDP message, the terminal responds to the push server and determines whether the packet is complete. If it is complete, the terminal returns to the original message.
  • Step S1220 The push server determines whether to resend the UDP message according to whether the response is received within the timeout period;
  • Step S1222 The push server returns the push result to the access server, and after receiving the reply message of all the push servers, the access server returns the result to the management platform or the IPTV service system, and for the high-level push message, because it is the terminal If the push fails due to offline, the access server will save the push failed terminal list. When the terminal is back online, the access server will resend the message to the push server assigned to the terminal, so that the push server can re-send the message. Go on.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the foregoing embodiments and preferred embodiments solve the problem that the server uses the HTTP protocol to push messages to the terminal, which has high performance consumption and low push efficiency, thereby reducing system performance consumption and improving push.
  • the effect of efficiency is a factor of efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a message push processing method and device, a push server, and an application server. The method comprises: acquiring a push message to be pushed; determining a target terminal to which the push message is to be pushed; and pushing the push message to the target terminal in a User Datagram Protocol (UDP) message mode. The present invention solves the problems in the related art that the performance consumption is large and the push efficiency is low when a server pushes a message to a terminal by using an HTTP protocol, so the system performance consumption is reduced, and the push efficiency is improved.

Description

消息推送处理方法、装置、推送服务器及应用服务器Message push processing method, device, push server and application server 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种消息推送处理方法、装置、推送服务器及应用服务器。The present invention relates to the field of communications, and in particular, to a message push processing method, apparatus, push server, and application server.
背景技术Background technique
目前,在很多应用当中,服务器需要向客户端主动发送消息,早期的实现技术是客户端通过轮询(Polling)技术不断刷新到服务器来获得最新的数据,这种方式每次都要建立新的超文本传输协议(Hypertext Transfer Protocol,简称为HTTP)连接,有一定的延迟,这种延迟使得频繁信息传递的应用无法忍受。最近的服务器推送技术则是客户端和服务器保持持久的连接,服务器通过该连接随时可以向客户端发送信息,不过对于这种HTTP长连接的方式,当系统中终端数很多时,服务器侧要维护大量的HTTP长连接,对于服务器的性能消耗比较大,一台服务器可服务的终端数就会下降。At present, in many applications, the server needs to send messages to the client actively. The early implementation technology is that the client continuously refreshes the server to obtain the latest data through polling technology. This method needs to establish a new one each time. The Hypertext Transfer Protocol (HTTP) connection has a certain delay, which makes the application of frequent information transmission unbearable. The most recent server push technology is that the client and the server maintain a persistent connection. The server can send information to the client at any time through the connection. However, for this HTTP long connection, when the number of terminals in the system is large, the server side needs to maintain A large number of HTTP long connections, the performance of the server is relatively large, and the number of terminals that can be served by one server will decrease.
因此,在相关技术中,服务器采用HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题。Therefore, in the related art, the server uses the HTTP protocol to push messages to the terminal, which has a large performance cost and a low push efficiency.
发明内容Summary of the invention
本发明提供了一种消息推送处理方法、装置、推送服务器及应用服务器,以至少解决相关技术中,服务器采用HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题。The present invention provides a message push processing method and apparatus, a push server, and an application server, so as to at least solve the problem that the server uses the HTTP protocol to push messages to the terminal, and the performance of the server is high, and the push efficiency is low.
根据本发明的一个方面,提供了一种消息推送处理方法,包括:获取用于推送的推送消息;确定所述推送消息推送的目标终端;采用用户数据报协议UDP消息的方式,将所述推送消息推送给所述目标终端。According to an aspect of the present invention, a message push processing method is provided, including: acquiring a push message for pushing; determining a target terminal to which the push message is pushed; and using the user datagram protocol UDP message to push the push The message is pushed to the target terminal.
优选地,采用所述UDP消息的方式,将所述推送消息推送给所述目标终端包括:在将所述推送消息推送给所述目标终端后,判断在预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息;在判断结果为否的情况下,重新向所述目标终端推送所述推送消息。Preferably, the pushing the push message to the target terminal by using the UDP message includes: after pushing the push message to the target terminal, determining whether the target terminal is received within a predetermined time And a reply response message for determining that the push message is received; if the determination result is no, the push message is re-pushed to the target terminal.
优选地,在将所述推送消息推送给所述目标终端后,判断在所述预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息包括:在将 所述推送消息推送给所述目标终端后,将所述推送消息存入一有序队列中;在接收到所述推送消息的所述回复响应消息时,将所述推送消息从所述有序队列中删除;判断在所述预定时间内是否扫描到所述推送消息;在判断结果为是的情况下,确定向所述目标终端推送所述推送消息失败。Preferably, after the push message is sent to the target terminal, determining whether the response message sent by the target terminal for determining that the push message is received is received in the predetermined time includes: After the push message is pushed to the target terminal, the push message is stored in an ordered queue; when the reply response message of the push message is received, the push message is sent from the ordered Deleting the queue; determining whether the push message is scanned within the predetermined time; if the determination result is yes, determining that the push message is pushed to the target terminal fails.
根据本发明的另一方面,提供了一种消息推送处理方法,包括:向一个或多个推送服务器广播推送消息;接收到的所述一个或多个推送服务器推送所述推送消息的回复消息,其中,所述一个或多个推送服务器采用用户数据报协议UDP消息的方式,将所述推送消息推送给终端。According to another aspect of the present invention, a message push processing method is provided, comprising: broadcasting a push message to one or more push servers; and receiving, by the one or more push servers, a reply message of the push message, The one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
优选地,在向所述一个或多个推送服务器广播所述推送消息之前,还包括:依据预定负载均衡条件,为所述一个或多个推送服务器分配推送消息的终端。Preferably, before the transmitting the push message to the one or more push servers, the method further includes: a terminal that allocates a push message to the one or more push servers according to a predetermined load balancing condition.
优选地,在接收到的所述一个或多个推送服务器推送所述推送消息的所述回复消息之后,还包括:依据所述回复消息判断存在消息推送失败的下线终端;在判断结果为是的情况下,保存所述推送消息,以及所述推送消息推送失败的所述下线终端;判断在所述下线终端再次上线时,所述下线终端对应的原推送服务器是否处于挂起状态;在判断结果为是的情况下,通过为再次上线的所述下线终端分配的新推送服务器推送所述推送消息;和/或,在判断结果为否的情况下,采用所述原推送服务器为再次上线的所述下线终端推送所述推送消息。Preferably, after the received one or more push servers push the reply message of the push message, the method further includes: determining, according to the reply message, that the offline terminal has failed to push the message; And storing the push message and the offline terminal that failed to push the push message; determining whether the original push server corresponding to the offline terminal is in a suspended state when the offline terminal is online again. In the case where the determination result is YES, the push message is pushed by the new push server allocated for the offline terminal that is online again; and/or, if the determination result is negative, the original push server is adopted. Pushing the push message for the offline terminal that is online again.
根据本发明的再一方面,提供了一种消息推送处理装置,包括:获取模块,设置为获取用于推送的推送消息;确定模块,设置为确定所述推送消息推送的目标终端;第一推送模块,设置为采用用户数据报协议UDP消息的方式,将所述推送消息推送给所述目标终端。According to still another aspect of the present invention, a message push processing apparatus is provided, comprising: an obtaining module configured to acquire a push message for pushing; a determining module configured to determine a target terminal to which the push message is pushed; and a first push The module is configured to use the user datagram protocol UDP message to push the push message to the target terminal.
优选地,所述第一推送模块包括:判断单元,设置为在将所述推送消息推送给所述目标终端后,判断在预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息;推送单元,设置为在所述判断单元的判断结果为否的情况下,重新向所述目标终端推送所述推送消息。Preferably, the first pushing module includes: a determining unit, configured to determine, after the pushing the push message is sent to the target terminal, whether the received by the target terminal is received within a predetermined time for determining the received location a reply response message for the push message; the push unit is configured to re-push the push message to the target terminal if the determination result of the determination unit is negative.
优选地,所述判断单元包括:存储子单元,设置为在将所述推送消息推送给所述目标终端后,将所述推送消息存入一有序队列中;删除子单元,设置为在接收到所述推送消息的所述回复响应消息时,将所述推送消息从所述有序队列中删除;判断子单元,设置为判断在所述预定时间内是否扫描到所述推送消息;确定子单元,设置为在所述判断子单元的判断结果为是的情况下,确定向所述目标终端推送所述推送消息失败。 Preferably, the determining unit comprises: a storage subunit, configured to: after pushing the push message to the target terminal, store the push message in an ordered queue; delete the subunit, and set to receive And when the reply response message of the push message is sent, the push message is deleted from the ordered queue; and the determining subunit is configured to determine whether the push message is scanned within the predetermined time; The unit is configured to determine that the push message is failed to be pushed to the target terminal if the determination result of the determination subunit is YES.
根据本发明的还一方面,提供了一种推送服务器,包括上述任一项所述的装置。According to still another aspect of the present invention, a push server is provided, comprising the apparatus of any of the above.
根据本发明的又一方面,提供了一种消息推送处理装置,包括:广播模块,设置为向一个或多个推送服务器广播推送消息;接收模块,设置为接收到的所述一个或多个推送服务器推送所述推送消息的回复消息,其中,所述一个或多个推送服务器采用用户数据报协议UDP消息的方式,将所述推送消息推送给终端。According to still another aspect of the present invention, a message push processing apparatus is provided, comprising: a broadcast module configured to broadcast a push message to one or more push servers; and a receiving module configured to receive the one or more pushes The server pushes the reply message of the push message, wherein the one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
优选地,该装置还包括:分配模块,设置为依据预定负载均衡条件,为所述一个或多个推送服务器分配推送消息的终端。Preferably, the apparatus further comprises: an allocation module configured to allocate a push message to the one or more push servers according to a predetermined load balancing condition.
优选地,该装置还包括:第二判断模块,设置为依据所述回复消息判断存在消息推送失败的下线终端;存储模块,设置为在所述第二判断模块的判断结果为是的情况下,保存所述推送消息,以及所述推送消息推送失败的所述下线终端;第三判断模块,设置为判断在所述下线终端再次上线时,所述下线终端对应的原推送服务器是否处于挂起状态;第二推送模块,设置为在所述第三判断模块的判断结果为是的情况下,通过为再次上线的所述下线终端分配的新推送服务器推送所述推送消息;和/或,第三推送模块,设置为在所述第三判断模块的判断结果为否的情况下,采用所述原推送服务器为再次上线的所述下线终端推送所述推送消息。Preferably, the device further includes: a second determining module, configured to determine, according to the reply message, that the offline terminal has failed to push the message; and the storage module is configured to be in a case that the determination result of the second determining module is yes And storing the push message and the offline terminal that failed to push the push message; the third determining module is configured to determine whether the original push server corresponding to the offline terminal is when the offline terminal is online again In a suspended state, the second push module is configured to push the push message by a new push server allocated for the offline terminal that is online again when the determination result of the third determination module is YES; and Or, the third push module is configured to: when the determination result of the third determination module is negative, use the original push server to push the push message for the offline terminal that is online again.
根据本发明的还一方面,提供了一种应用服务器,包括上述任一项所述的装置。According to still another aspect of the present invention, an application server is provided, comprising the apparatus of any of the above.
通过本发明,采用获取用于推送的推送消息;确定所述推送消息推送的目标终端;采用用户数据报协议UDP消息的方式,将所述推送消息推送给所述目标终端,解决了相关技术中,服务器采用HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题,进而达到了降低系统性能消耗,以及提高推送效率的效果。The method of the present invention is to obtain a push message for push, determine a target terminal to which the push message is pushed, and push the push message to the target terminal by using a user datagram protocol UDP message, thereby solving the related art. The server uses the HTTP protocol to push messages to the terminal, which has high performance consumption and low push efficiency, thereby achieving the effect of reducing system performance consumption and improving push efficiency.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的消息推送处理方法一的流程图;1 is a flowchart of a first method of message push processing according to an embodiment of the present invention;
图2是根据本发明实施例的消息推送处理方法二的流程图;2 is a flowchart of a second method for message push processing according to an embodiment of the present invention;
图3是根据本发明实施例的消息推送处理装置一的结构框图; FIG. 3 is a structural block diagram of a message push processing apparatus 1 according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的消息推送处理装置一中第一推送模块36的优选结构框图;FIG. 4 is a block diagram showing a preferred structure of the first push module 36 in the message push processing apparatus 1 according to an embodiment of the present invention;
图5是根据本发明实施例的消息推送处理装置一中第一推送模块36中判断单元42的优选结构框图;FIG. 5 is a block diagram showing a preferred structure of the determining unit 42 in the first push module 36 in the message push processing apparatus 1 according to an embodiment of the present invention;
图6是根据本发明实施例的推送服务器的结构框图;6 is a structural block diagram of a push server according to an embodiment of the present invention;
图7是根据本发明实施例的消息推送处理装置二的结构框图;FIG. 7 is a structural block diagram of a message push processing apparatus 2 according to an embodiment of the present invention;
图8是根据本发明实施例的消息推送处理装置二的优选结构框图一;8 is a block diagram 1 of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention;
图9是根据本发明实施例的消息推送处理装置二的优选结构框图二;9 is a block diagram 2 of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention;
图10是根据本发明实施例的应用服务器的结构框图;FIG. 10 is a structural block diagram of an application server according to an embodiment of the present invention; FIG.
图11是根据本发明实施例的采用UDP协议的分布式消息推送系统架构图;11 is a block diagram of a distributed message push system employing a UDP protocol according to an embodiment of the present invention;
图12是根据本发明优选实施方式的消息推送方法的流程图。12 is a flow chart of a message push method in accordance with a preferred embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种消息推送处理方法,图1是根据本发明实施例的消息推送处理方法一的流程图,如图1所示,该流程包括如下步骤:In the embodiment, a message push processing method is provided. FIG. 1 is a flowchart of a message push processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102,获取用于推送的推送消息;Step S102, acquiring a push message for pushing;
步骤S104,确定推送消息推送的目标终端;Step S104, determining a target terminal to which the push message is pushed;
步骤S106,采用用户数据报协议UDP消息的方式,将推送消息推送给目标终端。Step S106: Push the push message to the target terminal by using a user datagram protocol UDP message.
通过上述步骤,对于推送服务器而言,通过UDP消息的方式,将推送消息推送给目标终端,相对于相关技术中,采用HTTP消息的方式推送消息,不仅解决了相关技术中HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题,进而达到了降低系统性能消耗,以及提高推送效率的效果。 Through the above steps, for the push server, the push message is pushed to the target terminal by means of the UDP message, and the message is pushed by using the HTTP message in the related art, which not only solves the problem that the HTTP protocol pushes the message to the terminal in the related art. There is a problem of high performance consumption and low push efficiency, which in turn reduces the system performance consumption and improves the push efficiency.
为了确保推送的成功,在采用UDP消息的方式,将推送消息推送给目标终端时,可以采用以下处理:在将推送消息推送给目标终端后,判断在预定时间内是否接收到目标终端发送的用于确定接收到推送消息的回复响应消息;在预定时间内接收到目标终端反馈的接收到推送消息的回复响应消息时,可以确定推送消息成功。而在判断结果为否的情况下,重新向目标终端推送消息。需要说明的是,可以多次采用上述判断步骤进行确认,在多次均没有接收到目标终端的回复响应消息时,才放弃对该目标终端的消息推送。In order to ensure the success of the push, when the push message is pushed to the target terminal by using the UDP message, the following processing may be adopted: after the push message is pushed to the target terminal, it is determined whether the target terminal is sent within a predetermined time. After determining that the response message of the push message is received; when receiving the reply response message of the push message fed back by the target terminal within a predetermined time, it may be determined that the push message is successful. If the result of the determination is negative, the message is pushed back to the target terminal. It should be noted that the above determining step may be used for confirmation multiple times, and when the reply response message of the target terminal is not received multiple times, the message push to the target terminal is discarded.
其中,在将推送消息推送给目标终端后,判断在预定时间内是否接收到目标终端发送的用于确定接收到推送消息的回复响应消息可以采用多种处理方式,例如,可以采用消息队列的处理方式来完成:在将推送消息推送给目标终端后,将推送消息存入一有序队列中;在接收到推送消息的回复响应消息时,将推送消息从有序队列中删除;之后,判断在预定时间内是否扫描到推送消息;在判断结果为是的情况下,确定向目标终端推送消息失败。After the push message is sent to the target terminal, it is determined whether the response message sent by the target terminal for determining the received push message is received in a predetermined time, and the processing may be performed by using a message queue. The method is completed: after the push message is pushed to the target terminal, the push message is stored in an ordered queue; when the reply response message of the push message is received, the push message is deleted from the ordered queue; Whether the push message is scanned within the predetermined time; if the result of the determination is yes, it is determined that the push of the message to the target terminal has failed.
在本实施例中,还提供了一种消息推送处理方法,图2是根据本发明实施例的消息推送处理方法二的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a message push processing method is also provided. FIG. 2 is a flowchart of a message push processing method 2 according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202,向一个或多个推送服务器广播推送消息;Step S202, broadcasting a push message to one or more push servers;
步骤S204,接收到的一个或多个推送服务器推送消息的回复消息,其中,一个或多个推送服务器采用用户数据报协议UDP消息的方式,将推送消息推送给终端。Step S204: The one or more push servers push the reply message of the message, wherein the one or more push servers use the user datagram protocol UDP message to push the push message to the terminal.
通过上述步骤,对于应用服务器而言,通过向一个或多个推送服务器广播推送消息,之后由该一个或多个推送服务器通过UDP消息的方式,将推送消息推送给目标终端,相对于相关技术中,采用HTTP消息的方式推送消息,不仅有效地解决了相关技术中HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题,进而达到了降低系统性能消耗,以及提高推送效率的效果。Through the above steps, for the application server, by pushing the push message to one or more push servers, and then the one or more push servers push the push message to the target terminal by means of the UDP message, compared with the related art. Pushing messages by means of HTTP messages not only effectively solves the problem that the HTTP protocol pushes messages to the terminal in the related art, and the push efficiency is low, thereby achieving the effect of reducing system performance consumption and improving push efficiency.
优选地,在向一个或多个推送服务器广播推送消息之前,还可以依据预定负载均衡条件,为一个或多个推送服务器分配推送消息的终端,使得系统性能均衡,有效避免冲突与浪费。Preferably, before the push message is broadcast to one or more push servers, the terminal that pushes the message may be allocated to one or more push servers according to the predetermined load balancing condition, so that the system performance is balanced, and collision and waste are effectively avoided.
对于终端是否接收到该推送消息,或者说为了确保终端接收到该推送消息,可以在接收到的一个或多个推送服务器推送消息的回复消息之后,依据上述回复消息判断存在消息推送失败的下线终端;在判断结果为是的情况下,在应用服务器保存推送消息,以及推送消息推送失败的下线终端;之后,判断在下线终端再次上线时,下线终 端对应的原推送服务器是否处于挂起状态(即原推送服务器不再向终端推送推送消息);在判断结果为是的情况下,通过为再次上线的下线终端分配的新推送服务器推送推送消息;和/或,在判断结果为否的情况下,采用原推送服务器为再次上线的下线终端推送推送消息。通过上述处理,有效地解决了相关技术中对于没有接收到推送消息的下线终端,在下次上线时并且被分配到新的推送服务器时无法接收原推送消息的问题,成功实现了下线终端的重新推送,在一定程度上较高地提高了用户体验。Whether the terminal receives the push message, or to ensure that the terminal receives the push message, after receiving the reply message of the one or more push servers to push the message, according to the reply message, determining that the message push failure is offline. If the result of the determination is yes, the application server saves the push message and pushes the offline terminal that failed to push the message; after that, it determines that the offline terminal ends when the offline terminal goes online again. Whether the original push server corresponding to the end is in a suspended state (ie, the original push server no longer pushes the push message to the terminal); if the judgment result is yes, the push message is pushed by the new push server allocated for the offline terminal that is online again. And/or, if the judgment result is no, the original push server is used to push the push message for the offline terminal that is online again. Through the above processing, the problem that the offline terminal that does not receive the push message is received in the related art, and the original push message cannot be received when it is online and assigned to the new push server is successfully implemented, and the offline terminal is successfully implemented. Re-pushing, to a certain extent, improves the user experience.
在本实施例中还提供了一种消息推送处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a message push processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的消息推送处理装置一的结构框图,如图3所示,该装置包括获取模块32、确定模块34和第一推送模块36,下面对该装置进行说明。FIG. 3 is a structural block diagram of a message push processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes an obtaining module 32, a determining module 34, and a first pushing module 36. The apparatus will be described below.
获取模块32,设置为获取用于推送的推送消息;确定模块34,连接至上述获取模块32,设置为确定推送消息推送的目标终端;第一推送模块36,连接至上述确定模块34,设置为采用用户数据报协议UDP消息的方式,将推送消息推送给目标终端。The obtaining module 32 is configured to obtain a push message for pushing; the determining module 34 is connected to the obtaining module 32, and is configured to determine a target terminal that pushes the push message; the first pushing module 36 is connected to the determining module 34, and is configured to The push message is pushed to the target terminal by means of the user datagram protocol UDP message.
图4是根据本发明实施例的消息推送处理装置一中第一推送模块36的优选结构框图,如图4所示,该第一推送模块36包括判断单元42和推送单元44,下面对该第一推送模块36进行说明。FIG. 4 is a block diagram showing a preferred structure of the first push module 36 in the message push processing apparatus 1 according to the embodiment of the present invention. As shown in FIG. 4, the first push module 36 includes a determining unit 42 and a pushing unit 44. The first push module 36 will be described.
判断单元42,设置为在将推送消息推送给目标终端后,判断在预定时间内是否接收到目标终端发送的用于确定接收到推送消息的回复响应消息;推送单元44,连接至上述判断单元42,设置为在上述判断单元42的判断结果为否的情况下,重新向目标终端推送消息。The determining unit 42 is configured to: after receiving the push message to the target terminal, determine whether a response message for determining to receive the push message sent by the target terminal is received within a predetermined time; the pushing unit 44 is connected to the determining unit 42 When the determination result of the above-described determination unit 42 is NO, the message is re-pushed to the target terminal.
图5是根据本发明实施例的消息推送处理装置一中第一推送模块36中判断单元42的优选结构框图,如图5所示,该判断单元42包括:存储子单元52、删除子单元54、判断子单元56和确定子单元58,下面对该判断单元42进行说明。FIG. 5 is a block diagram showing a preferred structure of the determining unit 42 in the first push module 36 in the message push processing apparatus 1 according to the embodiment of the present invention. As shown in FIG. 5, the determining unit 42 includes a storage subunit 52 and a delete subunit 54. The judging subunit 56 and the determining subunit 58 are described below.
存储子单元52,设置为在将推送消息推送给目标终端后,将推送消息存入一有序队列中;删除子单元54,连接至上述存储子单元52,设置为在接收到推送消息的回复响应消息时,将推送消息从有序队列中删除;判断子单元56,连接至上述删除子单元54,设置为判断在预定时间内是否扫描到推送消息;确定子单元58,连接至上述判断 子单元56,设置为在判断子单元的判断结果为是的情况下,确定向目标终端推送推送消息失败。The storage subunit 52 is configured to store the push message in an ordered queue after pushing the push message to the target terminal; the delete subunit 54 is connected to the storage subunit 52, and is set to receive the reply of the push message. In response to the message, the push message is deleted from the ordered queue; the determining sub-unit 56 is coupled to the delete sub-unit 54 and configured to determine whether a push message is scanned within a predetermined time; the determining sub-unit 58 is connected to the above determination The subunit 56 is arranged to determine that the push message is pushed to the target terminal fails in the case where the judgment result of the judgment subunit is YES.
图6是根据本发明实施例的推送服务器的结构框图,如图6所示,该推送服务器60包括上述任一项的消息推送处理装置一62。FIG. 6 is a structural block diagram of a push server according to an embodiment of the present invention. As shown in FIG. 6, the push server 60 includes the message push processing device one 62 of any of the above.
图7是根据本发明实施例的消息推送处理装置二的结构框图,如图7所示,该装置包括广播模块72和接收模块74,下面对该装置进行说明。FIG. 7 is a structural block diagram of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes a broadcast module 72 and a receiving module 74, which will be described below.
广播模块72,设置为向一个或多个推送服务器广播推送消息;接收模块74,连接至上述广播模块72,设置为接收到的一个或多个推送服务器推送推送消息的回复消息,其中,一个或多个推送服务器采用用户数据报协议UDP消息的方式,将推送消息推送给终端。The broadcast module 72 is configured to broadcast a push message to one or more push servers; the receiving module 74 is connected to the broadcast module 72, and is configured to receive a reply message of the one or more push servers to push the push message, wherein one or The plurality of push servers use the user datagram protocol UDP message to push the push message to the terminal.
图8是根据本发明实施例的消息推送处理装置二的优选结构框图一,如图8所示,该装置除包括图7所示的所有结构外,还包括分配模块82,下面对该分配模块82进行说明。FIG. 8 is a block diagram of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes an allocating module 82 in addition to all the structures shown in FIG. Module 82 is described.
分配模块82,连接至上述广播模块72,设置为依据预定负载均衡条件,为一个或多个推送服务器分配推送消息的终端。The distribution module 82 is coupled to the broadcast module 72 and configured to allocate a push message to one or more push servers in accordance with predetermined load balancing conditions.
图9是根据本发明实施例的消息推送处理装置二的优选结构框图二,如图9所示,该装置除包括图7所示的所有结构外,还包括第二判断模块90、存储模块92、第三判断模块94第二推送模块96和/或第三推送模块98,下面对该装置进行说明。FIG. 9 is a block diagram of a preferred structure of a message push processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 9, the apparatus includes a second judging module 90 and a storage module 92, in addition to all the structures shown in FIG. The third judging module 94, the second pushing module 96 and/or the third pushing module 98, will be described below.
第二判断模块90,连接至上述接收模块74,设置为依据回复消息判断存在消息推送失败的下线终端;存储模块92,连接至上述第二判断模块90,设置为在第二判断模块的判断结果为是的情况下,保存推送消息,以及推送消息推送失败的下线终端;第三判断模块94,连接至上述存储模块92,设置为判断在下线终端再次上线时,下线终端对应的原推送服务器是否处于挂起状态;第二推送模块96,连接至上述第三判断模块94,设置为在第三判断模块的判断结果为是的情况下,通过为再次上线的下线终端分配的新推送服务器推送消息;和/或,第三推送模块98,连接至上述第三判断模块94,设置为在第三判断模块的判断结果为否的情况下,采用原推送服务器为再次上线的下线终端推送消息。The second determining module 90 is connected to the receiving module 74, and is configured to determine, according to the reply message, that the offline terminal has failed to push the message; the storage module 92 is connected to the second determining module 90, and is set to be determined by the second determining module. If the result is YES, the push message is saved, and the push-down terminal fails to push the push message; the third determination module 94 is connected to the storage module 92, and is configured to determine that the offline terminal corresponds to the original when the offline terminal is online again. Whether the push server is in a suspended state; the second push module 96 is connected to the third determining module 94, and is configured to allocate a new offline terminal for the online terminal when the third determination module determines that the result is yes. Pushing the server push message; and/or, the third pushing module 98 is connected to the third determining module 94, and is configured to use the original push server as the offline line when the third determining module determines that the result is negative. The terminal pushes the message.
图10是根据本发明实施例的应用服务器的结构框图,如图10所示,该应用服务器100包括上述任一项的消息推送处理装置二102。 FIG. 10 is a structural block diagram of an application server according to an embodiment of the present invention. As shown in FIG. 10, the application server 100 includes the message push processing device two 102 of any of the above.
针对相关技术中,服务器采用向终端推送消息存在性能消耗大,以及推送效率低下的问题的,由于采用传统的HTTP协议,则会造成服务器性能压力大,可服务的用户数降低,因此,相对于相关技术中基于传输控制协议(Transfer Control Protocol,简称为TCP)方式的消息推送系统而言,在本实施例中采用(User Datagram Protocol,用户数据报协议)进行消息推送,降低了服务器的性能消耗,提升了服务器的消息推送能力。该基于UDP协议的分布式消息推送方案中,由于UDP协议属于无连接的协议,推送服务器不需要维护大量的连接,性能消耗相对于HTTP方式降低很多,同时系统属于分布式的,可以支撑大量用户(即服务器的吞吐量大大增加),容错性也比较好,当某个服务器挂掉后,用户的服务不受影响。In the related art, the server adopts the problem that the performance of the push message to the terminal is high, and the push efficiency is low. Because the traditional HTTP protocol is adopted, the server performance pressure is high, and the number of users that can be served is reduced. In the related art, the message pushing system based on the Transmission Control Protocol (TCP) method uses the User Datagram Protocol (User Datagram Protocol) to push messages, which reduces the performance of the server. , improve the server's message push capabilities. In the distributed message push scheme based on the UDP protocol, since the UDP protocol is a connectionless protocol, the push server does not need to maintain a large number of connections, and the performance consumption is much lower than that of the HTTP method. At the same time, the system is distributed and can support a large number of users. (that is, the throughput of the server is greatly increased), and the fault tolerance is also better. When a server is hanged, the user's service is not affected.
图11是根据本发明实施例的采用UDP协议的分布式消息推送系统架构图,如图11所示,该系统包括管理平台112、接入服务器114、一个或多个推送服务器116及一个或多个终端118,下面对该系统进行说明。11 is a block diagram of a distributed message push system employing a UDP protocol, as shown in FIG. 11, the system includes a management platform 112, an access server 114, one or more push servers 116, and one or more, in accordance with an embodiment of the present invention. Terminals 118, the system will be described below.
管理平台112:提供web界面供操作人员操作,操作人员可以通过该web界面选择向哪些终端或者某一类终端发送消息。The management platform 112: provides a web interface for the operator to operate, and the operator can select which terminals or a certain type of terminal to send messages through the web interface.
接入服务器114:承担三个功能,一是作为管理者,管理系统中的消息推送服务器,消息推送服务器是分布式的,系统中可能存在多台,多台推送服务器由接入服务器进行管理;二是为终端进行负载均衡,当终端接入消息推送系统时,首先到接入服务器进行负载均衡,接入服务器会为终端分配一台推送服务器;三是作为管理平台和消息推送服务器之间的中转模块,管理平台有消息要推送给终端时,将消息发给接入服务器,接入服务器再广播给推送服务器。The access server 114: assumes three functions, one is as a manager, the message push server in the management system, the message push server is distributed, there may be multiple in the system, and multiple push servers are managed by the access server; The second is to load balance the terminal. When the terminal accesses the message push system, it first loads the load to the access server, and the access server allocates a push server to the terminal. The third is between the management platform and the message push server. The transit module sends a message to the access server when the message is to be pushed to the terminal, and the access server broadcasts the message to the push server.
推送服务器16:直接和终端进行交互,主要负责终端数据的管理和向终端进行消息推送。其接收终端的注册消息,维护终端的相关信息,并接收终端的心跳消息,维护终端的在线状态信息,在一定的时间内如果没有收到终端的心跳消息,则将该终端置为离线状态,当有消息需要推送时,推送服务器根据消息大小和目标终端,生成相应的推送消息,将推送消息推送给终端。The push server 16: directly interacts with the terminal, and is mainly responsible for management of terminal data and message push to the terminal. The terminal receives the registration message of the terminal, maintains the related information of the terminal, and receives the heartbeat message of the terminal, and maintains the online state information of the terminal. If the heartbeat message of the terminal is not received within a certain period of time, the terminal is placed in an offline state. When a message needs to be pushed, the push server generates a corresponding push message according to the message size and the target terminal, and pushes the push message to the terminal.
需要说明的是,该系统可以和IPTV业务系统独立部署,本系统的消息来源可以有两个方面,一个是操作员在管理平台进行操作,另外,IPTV业务系统也可以通过接口向接入服务器发送消息,IPTV系统下发消息推送请求,消息系统的接入服务器接收到推送消息请求后,由于接入服务器不保存终端的负载均衡结果,其不知道目标终端分配在哪些推送服务器上,因此接入服务器只能将推送请求广播给所有推送服务器,由各个推送服务器判别推送终端是否在本服务器上,如果有,则获取目标终端的相关 信息,向目标终端进行消息推送,而如果没有,则回复接入服务器目标终端不存在。而对于消息推送,推送成功,则给接入服务器回复推送成功,反之,回复推送失败的终端列表,接入服务器会将各个推送服务器的回复信息进行汇总,给业务系统或者管理平台回复推送结果。It should be noted that the system can be deployed independently with the IPTV service system. The source of the system can have two aspects, one is that the operator operates on the management platform, and the IPTV service system can also send the interface to the access server through the interface. The IPTV system sends a message push request. After the access server of the message system receives the push message request, since the access server does not save the load balancing result of the terminal, it does not know which push servers the target terminal is allocated on, so access The server can only broadcast the push request to all the push servers, and each push server determines whether the push terminal is on the server, and if so, obtains the relevant target terminal. Information, message push to the target terminal, and if not, the reply access server target terminal does not exist. For the message push, if the push is successful, the access server is successfully sent back to the access server. Otherwise, the list of the terminals that failed to push is returned, and the access server aggregates the reply information of each push server and returns the push result to the service system or the management platform.
推送服务器在进行消息推送时采用UDP协议,考虑到UDP传输的特点,对于1K大小的消息,需要对消息进行分片,一个消息分成多个分片推送给终端,终端的APP应用在收到分片数据后,进行消息的组装,还原成原始的消息。推送服务器推送给终端的消息包括:消息的ID、消息总的大小、消息总的分片数、消息的index(也就是属于原始消息的第几个分片)、实际的分片数据,终端在收到UDP消息后,根据消息头确定消息是否完整,如果有多个分片数据,则需要等多个分片数据都接收完后,将消息头去掉,将分片数据中的消息体拼装成一个完成的原始消息。The push server uses the UDP protocol for message push. Considering the characteristics of UDP transmission, for a message of 1K size, the message needs to be fragmented, and one message is divided into multiple fragments and pushed to the terminal, and the APP application of the terminal receives the score. After the piece of data, the message is assembled and restored to the original message. The message pushed by the push server to the terminal includes: the ID of the message, the total size of the message, the total number of fragments of the message, the index of the message (that is, the first fragment belonging to the original message), the actual fragmentation data, and the terminal is After receiving the UDP message, it is determined according to the message header whether the message is complete. If there is more than one fragmented data, after the plurality of fragmented data is received, the header is removed, and the message body in the fragmented data is assembled into A completed original message.
对于推送服务器收到的推送消息,推送服务器将消息存放到原始消息队列里,推送服务器需要对原始消息队列进行处理,生成待发送消息队列,然后取待发送消息队列里的消息进行发送。IPTV消息推送分为多种形式,比如,全网用户推送、单个或者多个指定用户推送、按用户分组推送、按IP地址段推送、按用户级别推送等,因此对于原始消息,除了指定用户发送外,其他推送方式都需要推送服务器自身生成目标终端列表,用户的分组、级别等信息都由终端到推送服务器注册时上报给推送服务器,推送服务器根据对用户信息建立相关的索引,当比如指定用户分组推送时,推送服务器根据用户分组索引找到所有属于该分组的用户,从而生成目标终端列表,另外,对消息进行分片,单个分片和单个终端生成一个待发送消息-终端的映射关系,将该映射关系加入到待发送消息队列里,推送服务器对该队列进行扫描,取出消息发送给对应的终端。For the push message received by the push server, the push server stores the message in the original message queue. The push server needs to process the original message queue, generate a message queue to be sent, and then send the message in the message queue for transmission. IPTV message push is divided into various forms, for example, network-wide user push, single or multiple specified user push, push by user group, push by IP address segment, push by user level, etc., so the original message is sent by the specified user. In addition, other push methods require the push server to generate a target terminal list. The user's grouping, level, and other information are reported to the push server when the terminal registers with the push server. The push server establishes a relevant index based on the user information, for example, a specified user. When the packet is pushed, the push server finds all the users belonging to the packet according to the user group index, thereby generating a target terminal list. In addition, the message is fragmented, and a single fragment and a single terminal generate a mapping relationship between the message and the terminal to be sent. The mapping relationship is added to the message queue to be sent, the push server scans the queue, and the received message is sent to the corresponding terminal.
推送消息的超时和重传管理:UDP协议属于不可靠的协议,在传输过程中可能会出现丢包,因此对于每个推送消息,均需要终端进行应答,为保证消息的推送成功。当UDP消息发送出去后,将消息从待发送队列里移到一有序队列里,排序的准则是消息发送的时间,当终端回复响应消息后,推送系统会从该有序队列里把对应的推送消息删除掉。推送系统定时扫描该有序队列,从头开始遍历,将当初时间和消息发送时间进行比较,如果超出超时时间,则将该消息重新放入到待发送消息队列里,推送系统会重新发送该消息,对于每个消息设定一个最大重发送次数,当重发次数超过最大重发送次数后,则不再重发,将该消息发送的状态置为失败。The timeout and retransmission management of the push message: The UDP protocol is an unreliable protocol. Packet loss may occur during the transmission process. Therefore, for each push message, the terminal needs to respond to ensure that the message is successfully pushed. After the UDP message is sent out, the message is moved from the queue to be sent to an ordered queue. The ordering criterion is the time when the message is sent. When the terminal replies to the response message, the push system will correspondingly from the ordered queue. The push message is deleted. The push system periodically scans the ordered queue, traverses from the beginning, compares the original time with the message sending time, and if the timeout period is exceeded, the message is re-inputted into the message queue to be sent, and the push system resends the message. A maximum number of retransmissions is set for each message. When the number of retransmissions exceeds the maximum number of retransmissions, the retransmission is not repeated, and the status of the message transmission is set to failure.
离线用户上线后消息重新推送:对于需要推送消息的消息分级别,高级别的推送消息,则必须要推送到终端,即使终端下线了,推送消息也要保留,等该终端上线后, 推送服务器需要重新将消息推送给终端,而对于低级别的,如果推送失败,则取消推送,后续也不再推送。但是对于推送失败的消息如何保存和重新推送,不能简单的把失败消息保存在推送失败的推送服务器上,这是因为对于下线终端重新上线,如果在这期间,推送服务器的数目发生了变化,在该终端在重新上线时可能会被分配到另外一台推送服务器上,而该推送服务器由于上次消息推送都是成功的,因此不再保留该消息,这样之前的离线消息就再也没法推送给该终端。因此在本实施例中,对于推送失败的终端,接入服务器收到推送服务器的上报后会进行保存,当下线终端重新上线时,首先要到接入服务器进行负载均衡,接入服务器会在自身保持的推送失败的终端列表中查询该终端是否在其中,如果不在,则直接分配一台推送服务器给终端,而如果在,则接入服务器在给终端分配推送服务器的同时,还会将推送失败的消息发送给所分配的推送服务器,这样当终端到推送服务器注册时,该推送服务器就会把上次推送失败的消息重新发送给该终端。After the offline user goes online, the message is re-pushed: for the message that needs to push the message, the high-level push message must be pushed to the terminal. Even if the terminal goes offline, the push message is retained, and after the terminal goes online, The push server needs to re-send the message to the terminal, and for the low level, if the push fails, the push is canceled and the push is no longer pushed. However, if the message of the failed push is saved and re-pushed, the failure message cannot be simply saved on the push server that failed to push. This is because the offline terminal is re-launched, and if the number of push servers changes during this period, When the terminal is re-online, it may be assigned to another push server, and the push server is successful because the last message is pushed, so the message is no longer retained, so that the previous offline message can no longer be used. Push to the terminal. Therefore, in this embodiment, for the terminal that fails to be pushed, the access server saves after receiving the report from the push server. When the offline terminal comes back online, the load server must first be load balanced, and the access server will be in itself. The list of terminals that failed to be pushed is queried whether the terminal is located therein. If not, a push server is directly allocated to the terminal, and if so, the access server fails to push the push server while assigning the push server to the terminal. The message is sent to the assigned push server, so that when the terminal registers with the push server, the push server resends the last failed push message to the terminal.
其中,在本发明实施例所提供的分布式的消息推送系统中,其中的接入服务器也可以作为消息入口,将原始消息广播给推送服务器,推送服务器根据原始消息中要推送的目标终端查询目标终端的相关信息,通过UDP协议将消息推送给目标终端。In the distributed message pushing system provided by the embodiment of the present invention, the access server may also serve as a message portal, and broadcast the original message to the push server, and the push server queries the target terminal according to the target terminal to be pushed in the original message. The related information of the terminal is pushed to the target terminal through the UDP protocol.
上述实施例及优选实施方式所提供的基于UDP协议的IPTV消息推送方案,不仅有效解决了采用HTTP连接方式造成的服务器性能消耗过大的问题,而且解决了当终端下线导致推送失败,而当终端重新上线时,推送服务器数目发生变化,该终端被负载均衡到另外一台推送服务器上,从而导致上次推送失败的消息再也无法重新推送的问题。The IPTV message-based IPTV message push solution provided by the foregoing embodiment and the preferred embodiment not only effectively solves the problem of excessive server performance consumption caused by the HTTP connection mode, but also solves the problem that when the terminal goes offline, the push fails. When the terminal is back online, the number of push servers changes, and the terminal is load balanced to another push server, which causes the message that the last push failure can no longer be pushed again.
下面对本发明的一个优选实施方式进行说明。A preferred embodiment of the present invention will now be described.
图12是根据本发明优选实施方式的消息推送方法的流程图,如图12所示,该流程包括如下步骤:FIG. 12 is a flowchart of a message pushing method according to a preferred embodiment of the present invention. As shown in FIG. 12, the process includes the following steps:
步骤S1202,推送服务器在启动后,和接入服务器建立长连接,将自身的信息上报给接入服务器;Step S1202: After the startup, the push server establishes a long connection with the access server, and reports its own information to the access server.
步骤S1204,推送服务器定时发送心跳给接入服务器,维护和接入服务器之间的长连接;Step S1204: The push server periodically sends a heartbeat to the access server to maintain a long connection between the server and the access server;
步骤S1206,终端启动IPTV的app应用后,到消息系统进行登记注册,将自身的相关信息报给推送服务器; Step S1206: After the terminal starts the application of the IPTV app, the terminal registers with the message system, and reports its own related information to the push server.
步骤S1208,终端定时发送UDP心跳给推送服务器,维护自身的在线状态;Step S1208: The terminal periodically sends a UDP heartbeat to the push server to maintain its online state.
步骤S1210,管理平台或者业务系统将需要推送的消息推送给接入服务器;Step S1210: The management platform or the service system pushes the message that needs to be pushed to the access server.
步骤S1212,接入服务器将需要推送的消息广播给推送服务器;Step S1212: The access server broadcasts the message that needs to be pushed to the push server.
步骤S1214,推送服务器在收到推送请求后,进行相应处理:推送服务器在自身维护的终端数据中查询目标终端的相关信息,如果没有查询到,则给接入服务器回复目标终端不存在;查询到目标终端信息后,对大于1K的原始消息进行分片处理,生成分片和推送终端之间的一一对应关系,放入到待发送消息队列里;Step S1214: After receiving the push request, the push server performs corresponding processing: the push server queries the terminal terminal to maintain the related information of the target terminal, and if not, the reply server returns the target terminal does not exist; After the target terminal information, the original message larger than 1K is fragmented, and a one-to-one correspondence between the fragment and the push terminal is generated, and is put into the message queue to be sent;
步骤S1216,推送服务器取待发送消息队列里的消息通过UDP协议向终端推送;Step S1216: The push server waits for the message in the sent message queue to be pushed to the terminal through the UDP protocol;
步骤S218,终端在收到UDP消息后,回复响应给推送服务器,并判断是否收包完整,如果完整,则恢复成原始消息;Step S218, after receiving the UDP message, the terminal responds to the push server and determines whether the packet is complete. If it is complete, the terminal returns to the original message.
步骤S1220,推送服务器根据在超时时间内是否收到响应来决定是否要重发UDP消息;Step S1220: The push server determines whether to resend the UDP message according to whether the response is received within the timeout period;
步骤S1222,推送服务器将推送结果返回给接入服务器,接入服务器在收到所有推送服务器的回复消息后,将结果返回给管理平台或者IPTV业务系统,同时对于高级别的推送消息,由于是终端不在线导致的推送失败,接入服务器会保存推送失败终端列表,当终端重新上线时,接入服务器会把该消息重新发送给分配给该终端的推送服务器,从而让该推送服务器重新将消息推送下去。Step S1222: The push server returns the push result to the access server, and after receiving the reply message of all the push servers, the access server returns the result to the management platform or the IPTV service system, and for the high-level push message, because it is the terminal If the push fails due to offline, the access server will save the push failed terminal list. When the terminal is back online, the access server will resend the message to the push server assigned to the terminal, so that the push server can re-send the message. Go on.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性 Industrial applicability
如上所述,通过上述实施例及优选实施方式,解决了相关技术中,服务器采用HTTP协议向终端推送消息存在性能消耗大,以及推送效率低下的问题,进而达到了降低系统性能消耗,以及提高推送效率的效果。 As described above, the foregoing embodiments and preferred embodiments solve the problem that the server uses the HTTP protocol to push messages to the terminal, which has high performance consumption and low push efficiency, thereby reducing system performance consumption and improving push. The effect of efficiency.

Claims (14)

  1. 一种消息推送处理方法,包括:A message push processing method includes:
    获取用于推送的推送消息;Get push messages for push;
    确定所述推送消息推送的目标终端;Determining a target terminal to which the push message is pushed;
    采用用户数据报协议UDP消息的方式,将所述推送消息推送给所述目标终端。The push message is pushed to the target terminal by using a user datagram protocol UDP message.
  2. 根据权利要求1所述的方法,其中,采用所述UDP消息的方式,将所述推送消息推送给所述目标终端包括:The method of claim 1, wherein the pushing the push message to the target terminal by using the UDP message comprises:
    在将所述推送消息推送给所述目标终端后,判断在预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息;After the push message is sent to the target terminal, it is determined whether a response response message sent by the target terminal for determining that the push message is received is received within a predetermined time;
    在判断结果为否的情况下,重新向所述目标终端推送所述推送消息。If the result of the determination is negative, the push message is re-introduced to the target terminal.
  3. 根据权利要求2所述的方法,其中,在将所述推送消息推送给所述目标终端后,判断在所述预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息包括:The method according to claim 2, wherein after the push message is pushed to the target terminal, it is determined whether the received message sent by the target terminal is received within the predetermined time for determining to receive the push message. The reply response message includes:
    在将所述推送消息推送给所述目标终端后,将所述推送消息存入一有序队列中;After pushing the push message to the target terminal, storing the push message in an ordered queue;
    在接收到所述推送消息的所述回复响应消息时,将所述推送消息从所述有序队列中删除;And when the reply response message of the push message is received, deleting the push message from the ordered queue;
    判断在所述预定时间内是否扫描到所述推送消息;Determining whether the push message is scanned within the predetermined time;
    在判断结果为是的情况下,确定向所述目标终端推送所述推送消息失败。In the case where the determination result is YES, it is determined that the push message is pushed to the target terminal.
  4. 一种消息推送处理方法,包括:A message push processing method includes:
    向一个或多个推送服务器广播推送消息;Broadcast push messages to one or more push servers;
    接收到的所述一个或多个推送服务器推送所述推送消息的回复消息,其中,所述一个或多个推送服务器采用用户数据报协议UDP消息的方式,将所述推送消息推送给终端。The received one or more push servers push the reply message of the push message, wherein the one or more push servers push the push message to the terminal by using a user datagram protocol UDP message.
  5. 根据权利要求4所述的方法,其中,在向所述一个或多个推送服务器广播所述推送消息之前,还包括: The method of claim 4, further comprising: before broadcasting the push message to the one or more push servers:
    依据预定负载均衡条件,为所述一个或多个推送服务器分配推送消息的终端。A terminal that allocates a push message to the one or more push servers in accordance with a predetermined load balancing condition.
  6. 根据权利要求4或5所述的方法,其中,在接收到的所述一个或多个推送服务器推送所述推送消息的所述回复消息之后,还包括:The method according to claim 4 or 5, wherein after the received one or more push servers push the reply message of the push message, the method further includes:
    依据所述回复消息判断存在消息推送失败的下线终端;Determining, according to the reply message, that the offline terminal that has failed to push the message;
    在判断结果为是的情况下,保存所述推送消息,以及所述推送消息推送失败的所述下线终端;If the determination result is yes, the push message is saved, and the offline terminal that fails to push the push message is sent;
    判断在所述下线终端再次上线时,所述下线终端对应的原推送服务器是否处于挂起状态;Determining whether the original push server corresponding to the offline terminal is in a suspended state when the offline terminal is online again;
    在判断结果为是的情况下,通过为再次上线的所述下线终端分配的新推送服务器推送所述推送消息;和/或,在判断结果为否的情况下,采用所述原推送服务器为再次上线的所述下线终端推送所述推送消息。If the determination result is YES, the push message is pushed by the new push server allocated to the offline terminal that is online again; and/or, if the determination result is negative, the original push server is adopted. The offline terminal that is online again pushes the push message.
  7. 一种消息推送处理装置,包括:A message push processing device includes:
    获取模块,设置为获取用于推送的推送消息;Obtaining a module, configured to obtain a push message for pushing;
    确定模块,设置为确定所述推送消息推送的目标终端;Determining a module, configured to determine a target terminal to which the push message is pushed;
    第一推送模块,设置为采用用户数据报协议UDP消息的方式,将所述推送消息推送给所述目标终端。The first pushing module is configured to use the user datagram protocol UDP message to push the push message to the target terminal.
  8. 根据权利要求7所述的装置,其中,所述第一推送模块包括:The apparatus of claim 7, wherein the first push module comprises:
    判断单元,设置为在将所述推送消息推送给所述目标终端后,判断在预定时间内是否接收到所述目标终端发送的用于确定接收到所述推送消息的回复响应消息;a determining unit, configured to determine, after the push message is pushed to the target terminal, whether a response message sent by the target terminal for determining to receive the push message is received within a predetermined time;
    推送单元,设置为在所述判断单元的判断结果为否的情况下,重新向所述目标终端推送所述推送消息。The push unit is configured to re-push the push message to the target terminal when the determination result of the determination unit is negative.
  9. 根据权利要求8所述的装置,其中,所述判断单元包括:The apparatus according to claim 8, wherein said determining unit comprises:
    存储子单元,设置为在将所述推送消息推送给所述目标终端后,将所述推送消息存入一有序队列中;a storage subunit, configured to store the push message in an ordered queue after pushing the push message to the target terminal;
    删除子单元,设置为在接收到所述推送消息的所述回复响应消息时,将所述推送消息从所述有序队列中删除; Deleting a subunit, configured to delete the push message from the ordered queue when receiving the reply response message of the push message;
    判断子单元,设置为判断在所述预定时间内是否扫描到所述推送消息;a determining subunit, configured to determine whether the push message is scanned within the predetermined time;
    确定子单元,设置为在所述判断子单元的判断结果为是的情况下,确定向所述目标终端推送所述推送消息失败。The determining subunit is set to determine that the push message to the target terminal fails to be sent if the judgment result of the judging subunit is YES.
  10. 一种推送服务器,包括权利要求7至9中任一项所述的装置。A push server comprising the apparatus of any one of claims 7 to 9.
  11. 一种消息推送处理装置,包括:A message push processing device includes:
    广播模块,设置为向一个或多个推送服务器广播推送消息;a broadcast module configured to broadcast a push message to one or more push servers;
    接收模块,设置为接收到的所述一个或多个推送服务器推送所述推送消息的回复消息,其中,所述一个或多个推送服务器采用用户数据报协议UDP消息的方式,将所述推送消息推送给终端。a receiving module, configured to receive, by the one or more push servers, a reply message of the push message, where the one or more push servers adopt a user datagram protocol UDP message to send the push message Push to the terminal.
  12. 根据权利要求11所述的装置,其中,还包括:The device according to claim 11, further comprising:
    分配模块,设置为依据预定负载均衡条件,为所述一个或多个推送服务器分配推送消息的终端。And an allocation module, configured to allocate a push message to the one or more push servers according to a predetermined load balancing condition.
  13. 根据权利要求11或12所述的装置,其中,还包括:The device according to claim 11 or 12, further comprising:
    第二判断模块,设置为依据所述回复消息判断存在消息推送失败的下线终端;a second determining module, configured to determine, according to the reply message, that the offline terminal that has failed to push the message;
    存储模块,设置为在所述第二判断模块的判断结果为是的情况下,保存所述推送消息,以及所述推送消息推送失败的所述下线终端;a storage module, configured to save the push message and the offline terminal that fails to push the push message if the determination result of the second determination module is YES;
    第三判断模块,设置为判断在所述下线终端再次上线时,所述下线终端对应的原推送服务器是否处于挂起状态;The third determining module is configured to determine whether the original push server corresponding to the offline terminal is in a suspended state when the offline terminal is online again;
    第二推送模块,设置为在所述第三判断模块的判断结果为是的情况下,通过为再次上线的所述下线终端分配的新推送服务器推送所述推送消息;和/或,第三推送模块,设置为在所述第三判断模块的判断结果为否的情况下,采用所述原推送服务器为再次上线的所述下线终端推送所述推送消息。a second pushing module, configured to: when the determination result of the third determining module is YES, push the push message by a new push server allocated for the offline terminal that is online again; and/or, third The push module is configured to: when the determination result of the third determination module is negative, use the original push server to push the push message for the offline terminal that is online again.
  14. 一种应用服务器,包括权利要求11至13中任一项所述的装置。 An application server comprising the apparatus of any one of claims 11 to 13.
PCT/CN2014/087614 2014-05-30 2014-09-26 Message push processing method and device, push server, and application server WO2015180339A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410240145.9 2014-05-30
CN201410240145.9A CN105323205A (en) 2014-05-30 2014-05-30 Message pushing processing method, message pushing processing device, pushing server and application server

Publications (1)

Publication Number Publication Date
WO2015180339A1 true WO2015180339A1 (en) 2015-12-03

Family

ID=54698000

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087614 WO2015180339A1 (en) 2014-05-30 2014-09-26 Message push processing method and device, push server, and application server

Country Status (2)

Country Link
CN (1) CN105323205A (en)
WO (1) WO2015180339A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660587A (en) * 2018-10-22 2019-04-19 平安科技(深圳)有限公司 Data push method, device, storage medium and server based on random number
CN110149363A (en) * 2019-04-15 2019-08-20 深圳壹账通智能科技有限公司 A kind of information push method, device and storage medium
CN111866150A (en) * 2020-07-23 2020-10-30 深圳市和讯华谷信息技术有限公司 High-concurrency message service distribution method and device, computer equipment and storage medium
CN113452739A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Message processing method and device
CN116266831A (en) * 2022-09-09 2023-06-20 烟台海颐软件股份有限公司 Message scheduling method

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770034A (en) * 2016-08-16 2018-03-06 中国移动通信有限公司研究院 A kind of message treatment method and device
CN106385491B (en) * 2016-09-05 2019-10-29 努比亚技术有限公司 A kind of system, method and mobile terminal controlling PUSH message
CN108243155B (en) * 2016-12-26 2021-09-28 北京云中融信网络科技有限公司 Method and device for sending communication information
CN107172182B (en) * 2017-06-06 2021-02-02 深圳市金立通信设备有限公司 Message pushing method, message pushing server and terminal
CN107835203B (en) * 2017-08-09 2020-07-10 平安壹钱包电子商务有限公司 Message packet delivery method, device, storage medium and terminal
CN109819000A (en) * 2017-11-22 2019-05-28 航天信息股份有限公司 Methods, devices and systems and machine readable storage medium for PUSH message
CN108718274A (en) * 2018-05-29 2018-10-30 北京德惠众合信息技术有限公司 A kind of anti-loss method of instant communication information
CN109802994B (en) * 2018-12-13 2022-03-01 平安科技(深圳)有限公司 Message pushing method and system based on content distribution network
CN110365749B (en) * 2019-06-25 2021-11-30 上海非码网络科技有限公司 Message pushing method, message pushing system and storage medium
CN110516158A (en) * 2019-08-30 2019-11-29 湖南新云网科技有限公司 A kind of information-pushing method, device and computer readable storage medium
CN111131277B (en) * 2019-12-27 2022-07-05 深圳市速易宝智能科技有限公司 Data pushing method and system
CN112559219A (en) * 2020-12-22 2021-03-26 广州技象科技有限公司 Internet of things offline message management method, device, equipment and storage medium
CN112910987A (en) * 2021-01-28 2021-06-04 长沙市到家悠享网络科技有限公司 Message pushing method, system, device, equipment and storage medium
CN114189489A (en) * 2021-11-11 2022-03-15 深圳市科脉技术股份有限公司 Message pushing method, device, server and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309458A (en) * 2008-07-21 2008-11-19 华为技术有限公司 Short message implementing method, system and apparatus between multiple enterprises
CN102209302A (en) * 2011-07-07 2011-10-05 深圳市金立通信设备有限公司 System and method for realizing information push of mobile terminal
CN202111746U (en) * 2011-07-07 2012-01-11 深圳市金立通信设备有限公司 System for realizing information push of mobile terminal
CN103458367A (en) * 2013-09-25 2013-12-18 江苏智联天地科技有限公司 Message safety pushing method and device based on optimization wireless protocol

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100588185C (en) * 2006-11-17 2010-02-03 腾讯科技(深圳)有限公司 System and method for handling electronic mail
CN101583096B (en) * 2009-06-16 2012-02-08 中兴通讯股份有限公司 Multimedia Messaging Service (MMS) center and method thereof for caching mobile paper messages
CN102647365A (en) * 2011-02-16 2012-08-22 北京大学 Method and device for processing message and message status and data exchange server
CN102664827B (en) * 2012-04-24 2014-12-24 深圳市三木通信技术有限公司 Instant messaging message receipt method and system
CN103297326B (en) * 2013-05-29 2017-12-29 深圳Tcl新技术有限公司 The method and apparatus of message push

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309458A (en) * 2008-07-21 2008-11-19 华为技术有限公司 Short message implementing method, system and apparatus between multiple enterprises
CN102209302A (en) * 2011-07-07 2011-10-05 深圳市金立通信设备有限公司 System and method for realizing information push of mobile terminal
CN202111746U (en) * 2011-07-07 2012-01-11 深圳市金立通信设备有限公司 System for realizing information push of mobile terminal
CN103458367A (en) * 2013-09-25 2013-12-18 江苏智联天地科技有限公司 Message safety pushing method and device based on optimization wireless protocol

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660587A (en) * 2018-10-22 2019-04-19 平安科技(深圳)有限公司 Data push method, device, storage medium and server based on random number
CN109660587B (en) * 2018-10-22 2022-07-29 平安科技(深圳)有限公司 Data pushing method and device based on random number, storage medium and server
CN110149363A (en) * 2019-04-15 2019-08-20 深圳壹账通智能科技有限公司 A kind of information push method, device and storage medium
CN113452739A (en) * 2020-03-27 2021-09-28 北京沃东天骏信息技术有限公司 Message processing method and device
CN111866150A (en) * 2020-07-23 2020-10-30 深圳市和讯华谷信息技术有限公司 High-concurrency message service distribution method and device, computer equipment and storage medium
CN116266831A (en) * 2022-09-09 2023-06-20 烟台海颐软件股份有限公司 Message scheduling method

Also Published As

Publication number Publication date
CN105323205A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
WO2015180339A1 (en) Message push processing method and device, push server, and application server
US5553083A (en) Method for quickly and reliably transmitting frames of data over communications links
CN103312807B (en) Data transmission method, apparatus and system
US20050174972A1 (en) Reliable message distribution in an ad hoc mesh network
CN106790340B (en) Link scheduling method and device
US20070198745A1 (en) System operator independent server alerted synchronization system and methods
CN103906087A (en) Access point upgrading method, device and system
CN102625287A (en) Method for downloading mobile phone application software
CN111917562B (en) Broadcast message forwarding method, device, equipment and storage medium
CN104301287B (en) Many-to-many session implementation method, network node, server and system
US7385978B1 (en) Method and apparatus for reliable multicast distribution
US8165079B2 (en) System and method for connection identifier synchronization in a communication system
WO2015180184A1 (en) Method, device and system for transmitting data
KR20120123308A (en) Protocol booster for sctp in multicast networks
US20100235702A1 (en) Transmitter, file distribution system, file distribution control method and file distribution control program in system
CN109951832B (en) Method for boot configuration in a bluetooth Mesh network
EP3111594B1 (en) System, device, and method for communicating data over a mesh network
JP2014146876A (en) Message distribution system and message distribution method
KR101382177B1 (en) System and method for dynamic message routing
WO2004071027A1 (en) Methods and systems for non-disruptive physical address resolution
WO2019087240A1 (en) Terminal apparatus, base station apparatus, communication method, and wireless communication system
CN115412555B (en) Cloud edge communication method, cloud edge communication device, cloud edge communication equipment and computer readable storage medium
CN114268615B (en) Service processing method and system based on TCP connection
CN113364865B (en) Resource acquisition method, device, readable medium and equipment
US9172774B2 (en) Technique for managing communications at a router

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14893519

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14893519

Country of ref document: EP

Kind code of ref document: A1