CN105306383B - The method for pushing and terminal and push server of a kind of message - Google Patents

The method for pushing and terminal and push server of a kind of message Download PDF

Info

Publication number
CN105306383B
CN105306383B CN201410256325.6A CN201410256325A CN105306383B CN 105306383 B CN105306383 B CN 105306383B CN 201410256325 A CN201410256325 A CN 201410256325A CN 105306383 B CN105306383 B CN 105306383B
Authority
CN
China
Prior art keywords
push
message
push server
server
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410256325.6A
Other languages
Chinese (zh)
Other versions
CN105306383A (en
Inventor
杨超
张俊麒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410256325.6A priority Critical patent/CN105306383B/en
Publication of CN105306383A publication Critical patent/CN105306383A/en
Application granted granted Critical
Publication of CN105306383B publication Critical patent/CN105306383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of method for pushing of message and terminal and push server, for improving the pushing efficiency of message.A kind of method provided in an embodiment of the present invention includes: that terminal obtains the message for needing to push;The terminal determines the first push server according to the corresponding buffer queue information of multiple push server from the multiple push server, wherein, the terminal is provided at least two push server, and first push server is the push server for being used to send the message for needing to push that the terminal determines;The terminal needs the message pushed to be sent to first push server for described, needs the message pushed to be pushed to destination server for described by first push server.

Description

The method for pushing and terminal and push server of a kind of message
Technical field
The present invention relates to the method for pushing and terminal of technical field of the computer network more particularly to a kind of message and push Server.
Background technique
The server distribution of apple push notification service (Apple Push Notification Service, APNS) exists Foreign countries, can be exported by the server of operator when the message generated in terminal needs to be pushed to APNS server reach it is external APNS server, since each operator goes abroad the unstability of bandwidth, the connection congestion that often will appear entire computer room is asked Topic.The rate that the message push that terminal generates when connecting congestion is not gone out or pushed is very low, leads to a large amount of message push not It goes out and is trapped in inside the buffer area of this terminal, it will usually which message could be pushed out by expending longer time, cause to disappear The pushing efficiency of breath is lower.
Summary of the invention
The embodiment of the invention provides a kind of method for pushing of message and terminal and push server, for improving message Pushing efficiency.
In order to solve the above technical problems, the embodiment of the present invention the following technical schemes are provided:
In a first aspect, the embodiment of the present invention provides a kind of method for pushing of message, comprising:
Terminal obtains the message for needing to push;
The terminal is according to the corresponding buffer queue information of multiple push server from the multiple push server In determine the first push server, wherein the terminal is provided at least two push server, first Push Service Device is the push server for being used to send the message for needing to push that the terminal determines;
The terminal needs the message pushed to be sent to first push server for described, is taken by first push Business device needs the message pushed to be pushed to destination server for described.
Second aspect, the embodiment of the present invention also provide a kind of method for pushing of message, comprising:
First push server receives the message that the needs that terminal is sent push, and first push server is the end The push server for sending the message for needing to push is determined from multiple push server in end;
First push server will be in the message indentation buffer queue that need to push;
The message taken out from the buffer queue is sent to destination server by first push server.
The third aspect, the embodiment of the present invention provide a kind of terminal, comprising:
Module is obtained, for obtaining the message for needing to push;
Push server determining module, for according to the corresponding buffer queue information of multiple push server from described The first push server is determined in multiple push server, wherein the terminal is provided at least two push server, institute Stating the first push server is the push server for being used to send the message for needing to push that the terminal determines;
Sending module, for needing the message pushed to be sent to first push server for described, by described first Push server needs the message pushed to be pushed to destination server for described.
Fourth aspect, the embodiment of the present invention provide a kind of push server, and the push server is specially the first push Server, first push server include:
Receiving module, the message that the needs for receiving terminal transmission push, first push server is the end The push server for sending the message for needing to push is determined from multiple push server in end;
It is pressed into module, for the message for needing to push to be pressed into buffer queue;
Sending module, for the message taken out from the buffer queue to be sent to destination server.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
In embodiments of the present invention, terminal obtains the message for needing to push first, and then terminal is according to multiple Push Services The corresponding buffer queue information of device determines the first push server from multiple push server, wherein the first push Server is the push server for being used to send the message that needs push that terminal determines, terminal sends the message for needing to push To the first push server determined, the message pushed will be needed to be pushed to destination server by first push server. Since terminal can select to need to push away for sending from multiple push server according to the buffer queue information of push server The push server for the message sent, therefore terminal can know each push clothes by the buffer queue information of each push server The Congestion Level SPCC that business device is connect with outer net, terminal can determine that the first push of message can be sent by buffer queue information Server thereby may be ensured that the message sent by first push server can be smooth by the first push server Be pushed to destination server, avoid message push from not going out and be trapped in inside the buffer area of this terminal, improve pushing away for message Send efficiency.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those skilled in the art, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of process blocks schematic diagram of the method for pushing of message provided in an embodiment of the present invention;
Fig. 2 is the process blocks schematic diagram of the method for pushing of another message provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of a scenario that the method for pushing of message provided in an embodiment of the present invention is applied;
Fig. 4-a is a kind of composed structure schematic diagram of terminal provided in an embodiment of the present invention;
Fig. 4-b is a kind of composed structure schematic diagram of push server determining module provided in an embodiment of the present invention;
Fig. 4-c is the composed structure schematic diagram of another push server determining module provided in an embodiment of the present invention;
Fig. 4-d is the composed structure schematic diagram of another push server determining module provided in an embodiment of the present invention;
Fig. 4-e is the composed structure schematic diagram of another terminal provided in an embodiment of the present invention;
Fig. 5-a is a kind of composed structure schematic diagram of push server provided in an embodiment of the present invention;
Fig. 5-b is the composed structure schematic diagram of another push server provided in an embodiment of the present invention;
Fig. 5-c is the composed structure schematic diagram of another push server provided in an embodiment of the present invention;
Fig. 5-d is the composed structure schematic diagram of another push server provided in an embodiment of the present invention;
Fig. 6 is that the method for pushing of message provided in an embodiment of the present invention is applied to the composed structure schematic diagram of terminal.
Specific embodiment
The embodiment of the invention provides a kind of method for pushing of message and terminal and push server, for improving message Pushing efficiency.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiments.Based on the embodiments of the present invention, this field Technical staff's every other embodiment obtained, shall fall within the protection scope of the present invention.
Term " includes " in description and claims of this specification and above-mentioned attached drawing and " having " and they Any deformation, it is intended that covering non-exclusive includes so as to a series of process, method comprising units, system, product or to set It is standby to be not necessarily limited to those units, but be not clearly listed or these process, methods, product or equipment are consolidated The other units having.
It is described in detail separately below.
One embodiment of the method for pushing of message of the present invention, specifically can be applied in terminal, and this method may include Following steps: terminal obtains the message for needing to push;Terminal is according to the corresponding buffer queue information of multiple push server The first push server is determined from multiple push server, wherein terminal is provided at least two push server, and first Push server is the push server for being used to send the message that needs push that terminal determines;The message that terminal pushes needs It is sent to the first push server, the message pushed will be needed to be pushed to destination server by the first push server.
Refering to Figure 1, a kind of method for pushing of message provided by one embodiment of the present invention, may include walking as follows It is rapid:
101, terminal obtains the message for needing to push.
In embodiments of the present invention, terminal gets the message for needing to push first, and the message that wherein terminal is got can Think signaling, or notice can also refer specifically to multi-medium data, specifically can be according to the application loaded in terminal It determines, for example, being mounted with QQ application in terminal, user's using terminal is available to arrive QQ message, including good friend's message, group disappear It ceases, discussion group's message etc., such as the QQ application in terminal generates message and is possibly stored among the memory of terminal later, terminal The message for needing to push is got by reading memory.The message that terminal is got is exactly that needs described in subsequent embodiment push away The message sent, the message that terminal will acquire are pushed to destination server, and message is re-send to purpose end by destination server End, so as to realize the communication of terminal and purpose terminal.
In some embodiments of the invention, step 101 can specifically include following steps: terminal acquisition institute is in need to push away The message sent.
Wherein, terminal get the message of push in need refer to that terminal by once obtaining, has obtained multiple disappear Breath, the message of push in need specifically also refer to multiple message of the same application loaded in terminal, this The message of a little push in need requires to be pushed to the same destination server, and destination server can be sent according to terminal Message it needs to be determined which message is pushed to which purpose terminal.
102, terminal is true from multiple push server according to the corresponding buffer queue information of multiple push server Make the first push server.
Wherein, terminal is provided at least two push server, and the first push server is used to send for what terminal determined The push server for the message for needing to push.
In embodiments of the present invention, in order to realize the communication with destination server, terminal selects to pass through Push Service terminal Device realizes the transfer of message, and terminal is according to the corresponding buffer queue information of multiple push server from multiple Push Services The first push server is determined in device, the first push server is for refering in particular to what terminal was selected from multiple push server For sending the particular push server for needing the message pushed.
It should be noted that in embodiments of the present invention, terminal and the foundation of multiple push server have communication connection, terminal At least two push server being arranged may be used to as terminal PUSH message, specifically, in some applied fields of the invention Multiple push server of Jing Zhong, terminal setting are respectively the server from different operators, and in such a scenario, terminal can With the message push service for using multiple and different operators to provide, terminal can be according to the push server from different operators Corresponding buffer queue information, which is determined, carrys out PUSH message using the push server of which operator, since each operator goes abroad Unstable, the problem of often will appear the network connection congestion of an entire computer room of bandwidth, terminal can be in the embodiment of the present invention There is congestion and each fortune by the push server of buffer queue acquisition of information to which operator of each operator The specific Congestion Level SPCC of the push server of quotient is sought, so as to select not congestion or the lighter push server of Congestion Level SPCC to make For the first push server, PUSH message is used for destination server.In the prior art, when terminal connects congestion, terminal is produced The rate that raw message push is not gone out or pushed is very low, and a large amount of message push is caused not go out and be trapped in the slow of this terminal It rushes inside area, it will usually which message could be pushed out by expending longer time, cause the pushing efficiency of message lower.The present invention In embodiment, after terminal gets the message for needing to push, terminal is not to directly transmit message, but be arranged from terminal Whether each push server is determined according to the corresponding buffer queue information of each push server in multiple push server Generate the degree of congestion and congestion, terminal never can determine first in congestion or the lighter push server of Congestion Level SPCC Push server can be failed or a large amount of crowded in the problems in this terminal buffers area with this to avoid message transmission.
In embodiments of the present invention, terminal is determined using the corresponding buffer queue information of push server and takes which push Device be engaged in as the first push server, terminal knows the network connection status of each push server by buffer queue information, So as to select network unobstructed push server as the first push server.Wherein each push server is corresponding with One buffer queue, what is saved in buffer queue is the message that push server needs to send, push server real-time servicing from Oneself buffer queue, when there is new message to be pressed into buffer queue, push server timely updates buffer queue information, when pushing away Send server successfully by message after taking-up is sent to destination server in buffer queue, push server also timely updates Buffer queue information, in addition, when storage time is removed more than the message of storage threshold value in buffer queue, push server Buffer queue information is updated in real time.Specifically, buffer queue information can be caching in application scenes of the invention The queue length of queue, as soon as every indentation message, the queue length of buffer queue will increase in buffer queue, when caching team One message of every deletion, the queue length of buffer queue will be reduced in column, and the queue length of buffer queue can use push clothes Message number to be sent in device be engaged in characterize, in other application scenarios of the invention, buffer queue information can also refer to Be the property parameters of buffer queue, such as can be the affiliated push server of buffer queue and send the agreement lattice that message uses Formula, structure feature of frame field etc., buffer queue information may also refer to the particular community that message is saved in buffer queue, example The priority ranking of the identification number of such as message specifically can specifically assign buffer queue information with connected applications scene Value.
In some embodiments of the invention, step 102 terminal is according to the corresponding caching team of multiple push server Column information determines the first push server from multiple push server, can specifically include following steps:
A1, terminal receive the buffer queue information that multiple push server are respectively reported according to report cycle timing;
A2, terminal determine the first push according to the buffer queue information periodically respectively reported from multiple push server Server.
Wherein, terminal and the foundation of each push server have connection, multiple push server of terminal connection in step A1 It can directly be pushed away from each according to the buffer queue information for reporting oneself to terminal of preset report cycle timing, terminal Server is sent to receive the corresponding buffer queue information of each push server, each Push Service that end-on receives The corresponding buffer queue information of device is parsed, so as to judge the network congestion of each push server. Step A2 terminal judges the network congestion of each push server, base from the buffer queue information periodically respectively reported In the push server that network congestion selects network unobstructed as the first push server.
In other embodiments of the invention, step 102 terminal is according to the corresponding caching of multiple push server Queuing message determines the first push server from multiple push server, can specifically include following steps:
B1, terminal receive the corresponding buffer queue information of multiple push server that data statistics server is sent, The buffer queue information that the multiple push server of data statistics server timing receipt are respectively reported according to report cycle;
The buffer queue information for multiple push server that B2, terminal are sent according to data statistics server is from multiple push The first push server is determined in server.
Wherein, terminal and the foundation of data statistics server have connection in step B1, and data statistics server connects multiple Push server can be according to the buffer queue for reporting oneself to data statistics server of preset report cycle timing Information, after data statistics server receives multiple buffer queue information, data statistics server can timing will receive To multiple buffer queue information be sent to terminal, terminal is received respectively by data statistics server from each push server The corresponding buffer queue information of a push server, the corresponding caching of each push server that end-on receives Queuing message is parsed, so as to judge the network congestion of each push server, in terminal and Push Service Be additionally provided with data statistics server between device, data statistics server for realizing each push server of timing receipt according to The buffer queue information that report cycle reports directly receives the buffer queue information that each push server is sent to mitigate terminal Load, be conducive to the energy conservation and suspend mode of terminal, buffer queue that step B2 terminal is regularly sent from data statistics server letter The network congestion that each push server is judged in breath, based on the Push Service that network congestion selection network is unobstructed Device is as the first push server.
In other embodiments of the invention, step 102 terminal is according to the corresponding caching of multiple push server Queuing message determines the first push server from multiple push server, can specifically include following steps:
The queue length for the buffer queue that terminal is respectively reported according to multiple push server is from multiple push server Determine that the shortest push server of queue length is the first push server.
That is, buffer queue information specifically also refers to the queue length of push server, i.e. push server Need the queue length that oneself is reported according to report cycle of timing, wherein queue length can be used to indicate that each push clothes Message number to be sent in business device, if the queue length of push server is longer, the message to be processed of the push server Quantity is more, and the load of the push server is bigger, and the network channel between the push server and destination server is more gathered around Plug, opposite, if the queue length of push server is shorter, the quantity of the message to be processed of the push server is fewer, this is pushed away Send the load of server smaller, the network channel between the push server and destination server is more unobstructed, generally for guarantor The timeliness and reliability of message are demonstrate,proved, terminal can choose the shorter push server of queue length as the first Push Service Device.Terminal knows message number to be sent in each push server by the corresponding queue length of each push server, So as to select the least push server of message number to be sent as the first Push Service for sending message Device.
It should be noted that in embodiments of the present invention, " the first push server " is for refering in particular to terminal from multiple push That selects in server is used to send the particular push server for needing the message pushed, and " the first push server " is not Some the changeless push server referred to, but the Push Service of the message got for terminal in sending step 101 Device since terminal is the first push server of selection is carried out based on the corresponding buffer queue information of each push server, And according to the description of foregoing teachings it is found that the corresponding buffer queue information of each push server may real-time change, then needle The different messages buffer queue information that terminal is got may be also different, terminal is based on this possible real-time change The first push server that buffer queue information is determined may also be different push server.
In other embodiments of the invention, step 102 terminal is according to the corresponding caching of multiple push server Queuing message determines the first push server from multiple push server, can specifically include following steps:
C1, terminal judge whether the queue length of the buffer queue of each push server is greater than preset first respectively Limit value;
C2, terminal from multiple push server except queue length be greater than the first threshold value push server in addition to its A push server is selected in its push server at random as the first push server.
Wherein, the first threshold value, team of the terminal in the buffer queue for getting each push server can be set in terminal After column length, terminal compares the queue length of the buffer queue of each push server and the first threshold value of setting Compared with, picked out from all push server queue length be greater than the first threshold value push server, then pushed away from remaining It send in server and random to select a push server as the first push server, that is to say, that terminal can be from network It connects push server of selecting random in more unobstructed multiple push server to be used to send message, queue length is small Network connection between the push server and destination server of the first threshold value is more unobstructed, and terminal can be into Row, which is arbitrarily designated, is connected to the network unobstructed push server as the first push server.
In some embodiments of the invention, 101 terminal of abovementioned steps obtains the message for needing to push, and specifically can wrap Include: terminal obtain push in need message.In this application scenarios, step 102 terminal is according to multiple push server Corresponding buffer queue information determines the first push server from multiple push server, specifically includes following step It is rapid:
Terminal according to the corresponding buffer queue information of multiple push server, according to push in need message Priority height is followed successively by the message that each needs push and determines the first push server.
That is, terminal get the message of push in need refer to that terminal by once obtaining, has obtained more A message, message the multiple of the same application that specifically also refer to load in terminal of push in need disappear Breath, these the message of push in need require to be pushed to the same destination server, if terminal is disposably got Multiple message for needing to push, terminal can be followed successively by each message according to the priority height of all message and determine that first pushes away Server is sent, may be different each of priority since terminal is to determine the first push server according to buffer queue information What a message was determined is different the first push server.
In some embodiments of the invention, 101 terminal of abovementioned steps obtains the message for needing to push, and specifically can wrap Include: terminal obtain push in need message.In this application scenarios, step 102 terminal is according to multiple push server Corresponding buffer queue information determines the first push server from multiple push server, specifically includes following step It is rapid:
Terminal according to the corresponding buffer queue information of multiple push server, according to push in need message Type of message is that the message that each needs push determines the first push server.
That is, terminal get the message of push in need refer to that terminal by once obtaining, has obtained more A message, message the multiple of the same application that specifically also refer to load in terminal of push in need disappear Breath, these the message of push in need require to be pushed to the same destination server, if terminal is disposably got Multiple message for needing to push, terminal can be that each message determines the first Push Service according to the type of message of all message Device may disappear since terminal is to determine the first push server according to buffer queue information for different each of type of message What breath was determined is different the first push server, and wherein the type of message of message also refers to signaling, is also possible to lead to Know, multi-medium data can also be referred specifically to, the matching relationship based on type of message and push server can disappear to be each Breath determines the first push server for sending message.
103, terminal will need the message pushed to be sent to the first push server, be pushed away needs by the first push server The message sent is pushed to destination server.
In embodiments of the present invention, it is taken by the way which push server is step 102 terminal define as the first push Business device, after determining the first push server, terminal can will need the message pushed to be sent to the first push server, Establishing between push server and destination server has communication connection, and the first push server can disappear what is received from terminal Breath continues to push to destination server, to realize the communication between terminal and destination server.In some applied fields of the invention Jing Zhong, destination server can take for apple push notification service (Apple Push Notification Service, APNS) Business device.
In some embodiments of the invention, 101 terminal of abovementioned steps obtains the message for needing to push, and specifically can wrap Include: terminal obtain push in need message.In this application scenarios, step 102 terminal is according to multiple push server Corresponding buffer queue information determines the first push server from multiple push server, specifically includes following step It is rapid: terminal according to the corresponding buffer queue information of multiple push server, according to push in need message message Type is that the message that each needs push determines the first push server.The message that step 103 terminal pushes the needs It is sent to the first push server, can specifically include following steps:
Terminal successively sends the message for needing to push according to message priority height to the first push server.
That is, terminal get the message of push in need refer to that terminal by once obtaining, has obtained more A message, message the multiple of the same application that specifically also refer to load in terminal of push in need disappear Breath, these the message of push in need require to be pushed to the same destination server, if terminal is disposably got Multiple message for needing to push, terminal can successively be sent to the first push server according to the priority needs what is pushed to disappear Breath.
Under this application scenarios, terminal obtain after the message of push in need, it is provided in an embodiment of the present invention to disappear The method for pushing of breath can also include the following steps:
The message of what terminal will acquire push in need is stored into the data storage of terminal.
Under this application scenarios, terminal is successively sent to the first push server according to message priority height to be needed to push away The message sent, can specifically include following steps:
Terminal successively takes out each message for needing to push according to message priority height from data storage;
The message that each needs successively taken out push is sent to the first push server by terminal.
That is, data storage is also provided in terminal in the embodiment of the present invention, for temporarily storing terminal The multiple message got, to prevent the loss of message, if storage has been arrived in data storage after terminal gets message, Terminal, which needs first to take out from data storage, needs the data sent to be then forwarded to the first push server.
By above to the description of the embodiment of the present invention it is found that terminal obtains first needs the message that pushes, then terminal The first Push Service is determined from multiple push server according to the corresponding buffer queue information of multiple push server Device, wherein the first push server is the push server for being used to send the message that needs push that terminal determines, terminal need to The message to be pushed is sent to the first push server determined, the message pushed will be needed to push away by first push server Give destination server.Since terminal can be selected from multiple push server according to the buffer queue information of push server For sending the push server for needing the message pushed, therefore terminal can pass through the buffer queue information of each push server Know the Congestion Level SPCC that each push server is connect with outer net, terminal can be determined send by buffer queue information First push server of message, thereby may be ensured that can be by first by the message that first push server is sent Push server is smoothly pushed to destination server, and message push is avoided not go out and be trapped in the buffer area of this terminal The pushing efficiency of message is improved in face.
Above embodiments are described in detail the method for pushing of message from the angle of terminal, next from Push Service The angle of device describes the method for pushing of message provided in an embodiment of the present invention, wherein is determined with terminal in the embodiment of the present invention The angle of push server out is specifically described, and one embodiment of the method for pushing of message of the present invention can specifically answer For in the first push server, this method to be may include steps of: the first push server receives the needs that terminal is sent The message of push, the first push server are that terminal is determined from multiple push server for sending the message for needing to push Push server;First push server will be in the message indentation buffer queue that need to push;First push server will be from The message taken out in buffer queue is sent to destination server.
It please refers to shown in Fig. 2, a kind of method for pushing of message provided by one embodiment of the present invention, may include walking as follows It is rapid:
201, the message that the needs that the first push server receives that terminal is sent push.
Wherein, the first push server is that terminal is determined to need what is pushed to disappear for sending from multiple push server The push server of breath.
In embodiments of the present invention, the first push server receives the message for needing to push from terminal, wherein first pushes away The message for sending server to receive can be signaling, or notice can also refer specifically to multi-medium data, specifically may be used To determine according to the application loaded in terminal, for example, being mounted with QQ application in terminal, user's using terminal is available to arrive QQ Message, including good friend's message, group's message, discussion group's message etc..The message received is pushed to purpose by the first push server Message is re-send to purpose terminal by destination server, so as to realize the communication of terminal and purpose terminal by server.
In embodiments of the present invention, which push server is terminal define as the first push server, in determination Out after the first push server, terminal can will need the message pushed to be sent to the first push server, the first push clothes Establishing between business device and terminal has communication connection, the message that the first push server can will be received from terminal.
In application scenes of the invention, multiple push server of terminal setting are respectively to come from different operators Server, the first Push Service implement body also refers to the push server from some operator, such as can make to come From telecommunications or connection or the push server of movement.In such a scenario, terminal can be used what multiple and different operators provided Message push service, terminal can be determined according to the corresponding buffer queue information of push server from different operators and be used The push server of which operator carrys out PUSH message, since each operator goes abroad the unstable of bandwidth, often will appear one Entirely the problem of the network connection congestion of computer room, terminal can be believed by the buffer queue of each operator in the embodiment of the present invention It ceases the push server for getting which operator and the specific congestion of the push server of congestion and each operator occurs Degree, so as to select not congestion or the lighter push server of Congestion Level SPCC as the first push server, for pushing Message is to destination server.In the prior art, the message push that terminal generates when terminal connects congestion is not gone out or is pushed away The rate sent is very low, causes a large amount of message push not go out and be trapped in inside the buffer area of this terminal, it will usually expend longer Time message could be pushed out, cause the pushing efficiency of message lower.In the embodiment of the present invention, terminal gets needs After the message of push, terminal is not to directly transmit message, but basis is each from multiple push server that terminal is arranged The corresponding buffer queue information of a push server determines whether each push server generates the degree of congestion and congestion, Terminal never can determine the first push server in congestion or the lighter push server of Congestion Level SPCC, can be to avoid with this Message sends failure or a large amount of crowded in the problems in this terminal buffers area.
In some embodiments of the invention, the method for pushing of message provided in an embodiment of the present invention can also include as follows Step:
First push server reports the buffer queue information of oneself according to report cycle timing to terminal.
Wherein, terminal and the foundation of each push server have a connection, and multiple push server of terminal connection can be according to The buffer queue information that oneself is reported to terminal of preset report cycle timing, terminal is directly from each push server The corresponding buffer queue information of each push server is received, each push server that end-on receives is right respectively The buffer queue information answered is parsed, so as to judge the network congestion of each push server.
In other embodiments of the invention, the method for pushing of message provided in an embodiment of the present invention can also include such as Lower step:
First push server reports the buffer queue information of oneself according to report cycle timing to data statistics server, The buffer queue information received is sent to terminal by data statistics server.
Wherein, terminal and the foundation of data statistics server have connection, multiple Push Services of data statistics server connection Device can be according to the buffer queue information for reporting oneself to data statistics server of preset report cycle timing, data After statistical server receives multiple buffer queue information, data statistics server can timing it is multiple slow by what is received It deposits queuing message and is sent to terminal, terminal receives each Push Service from each push server by data statistics server The corresponding buffer queue information of device, the corresponding buffer queue information of each push server that end-on receives into Row parsing, so as to judge the network congestion of each push server, also sets between terminal and push server It is equipped with data statistics server, data statistics server is for realizing each push server of timing receipt according on report cycle The buffer queue information of report has to mitigate the load that terminal directly receives the buffer queue information that each push server is sent Conducive to the energy conservation and suspend mode of terminal, terminal judges each push away from the buffer queue information that data statistics server is regularly sent The network congestion for sending server is taken based on the push server that network congestion selects network unobstructed as the first push Business device.
202, the first push server will be in the message indentation buffer queue that need to push.
In embodiments of the present invention, after the message that terminal receives that needs push, first pushes away the first push server Send server that the message pushed will be needed to be pressed into buffer queue, the message that the needs that terminal is sent at this time push is as first Message to be sent is saved in buffer queue in push server.
In embodiments of the present invention, each push server is corresponding with a buffer queue, saves in buffer queue It is that push server needs the message that sends, the buffer queue of push server real-time servicing oneself, when there is new message indentation When to buffer queue, push server timely updates buffer queue information, when push server is successfully by message from caching team It is taken out in column after being sent to destination server, push server also timely updates buffer queue information.Specifically, in the present invention Application scenes in, buffer queue information can be buffer queue queue length, buffer queue information is specially first The queue length of the buffer queue of push server.One message of every indentation, the queue length of buffer queue in buffer queue Just it will increase, when one message of every deletion, the queue length of buffer queue will be reduced in buffer queue, the queue of buffer queue Length can be characterized with message number to be sent in push server, in other application scenarios of the invention, caching Queuing message may also refer to the property parameters of buffer queue, such as can be the affiliated push server transmission of buffer queue and disappear Protocol format, the structure feature of frame field etc. used is ceased, buffer queue information, which may also refer to save in buffer queue, to disappear The particular community of breath, for example, message identification number priority ranking etc., can specifically be come with connected applications scene to buffer queue Information carries out specific assignment.
203, the message taken out from buffer queue is sent to destination server by the first push server.
In embodiments of the present invention, the message pushed by the needs that first push server of step 202 sends terminal It has been pressed into buffer queue, establishing between the first push server and destination server has communication connection, the first Push Service Device can take out message from buffer queue, the message received from terminal be continued to push to destination server, to realize end Communication between end and destination server.In application scenes of the invention, destination server can be logical for apple push Know service APNS server.
In some embodiments of the invention, the message that first push server of step 203 will be taken out from buffer queue It is sent to after destination server, the method for pushing of message provided in an embodiment of the present invention can further include following steps:
First push server deletes the message that storage time in buffer queue is more than storage threshold value.
That is, when storage time is removed more than the message of storage threshold value in buffer queue, push server Buffer queue information is updated in real time, and to guarantee that push server sends the efficiency of message, the invalid message of time-out is carried out It deletes in time, buffer queue can be made to keep normal operating.
By above to the description of the embodiment of the present invention it is found that the first push server is that the transmission that is used for that terminal determines needs The push server for the message to be pushed, the first push server is received from terminal needs the message that pushes, first is pushed away by this Send server that the message pushed will be needed to be pushed to destination server.Since terminal can be according to the buffer queue of push server Information is selected from multiple push server for sending the push server for needing the message pushed, therefore terminal can be by each The buffer queue information of a push server knows the Congestion Level SPCC that each push server is connect with outer net, and terminal passes through caching Queuing message can determine that the first push server of message can be sent, thereby may be ensured that through first Push Service The message that device is sent can smoothly be pushed to destination server by the first push server, and message push is avoided not go out And be trapped in inside the buffer area of this terminal, improve the pushing efficiency of message.
In order to facilitate a better understanding and implementation of the above scheme of the embodiment of the present invention, corresponding application scenarios of illustrating below come It is specifically described.It please refers to as shown in figure 3, one kind that the method for pushing that Fig. 3 is message provided in an embodiment of the present invention is applied Schematic diagram of a scenario is push server 1, Push Service respectively by terminal setting there are three being illustrated for push server Device 2, push server 3, server of this 3 push server respectively from different operators, wherein push server 1 is Server from connection computer room, push server 2 are the server from moving machine room, and push server 3 is from telecommunications The server of computer room, push server 1, push server 2, push server 3 are connected to APNS server by outer net respectively.
Specific implementation procedure is as follows:
S01, terminal (client), which are got, needs the message that sends, and according to push server 1, push server 2, push away The corresponding buffer queue size of server 3 is sent to determine the first push server, the message that terminal can push needs It is sent to first push server on backstage.
The message received is pressed into buffer queue by S02, the first push server, if first pushing away of determining of terminal Sending server is push server 1, then push server 1 can receive the message of terminal transmission, and is pressed into the caching of oneself In queue, such terminal can send a message to APNS server by the push server of connection computer room.
S03, the first push server take out message again inside buffer queue and are pushed to APNS server.
S04, the timing of each push server report the size of buffer queue to data statistics server, so that terminal can be with The buffer queue size of each push server is got by data statistics server.
When outer net generates congestion, push server can block to the movement of APNS server push message, this when The buffer queue of the push server on backstage will become larger.Terminal is big according to the buffer queue that backstage push server reports The small congestion situation that can perceive outer net is then reduced and is pushed toward this push server if it find that buffer queue becomes larger The quantity of message, and then no longer toward this push server PUSH message when queue full, to avoid pushing away for message Send failure.When the machine of some computer room generates outer net congestion, common scenario is that all machines of an entire computer room all generate Congestion, this when cannot be pushed to user by the message of this computer room in time, and if backstage Push Service After the buffer queue of device has been expired, more message can be lost, the method for pushing of the message provided through the embodiment of the present invention can To be obviously improved this situation.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
For the above scheme convenient for the better implementation embodiment of the present invention, phase for implementing the above scheme is also provided below Close device.
It please refers to shown in Fig. 4-a, a kind of terminal 400 provided in an embodiment of the present invention, may include: to obtain module 401, push away Send server determining module 402, sending module 403, wherein
Module 401 is obtained, for obtaining the message for needing to push;
Push server determining module 402, for according to the corresponding buffer queue information of multiple push server from The first push server is determined in the multiple push server, wherein the terminal is provided at least two Push Services Device, first push server are the push server for being used to send the message for needing to push that the terminal determines;
Sending module 403, for needing the message that pushes to be sent to first push server for described, by described the One push server needs the message pushed to be pushed to destination server for described.
In some embodiments of the invention, it please refers to as shown in Fig. 4-b, the push server determining module 402, wraps It includes:
First receiving submodule 4021 is respectively reported for receiving the multiple push server according to report cycle timing Buffer queue information;
First determines submodule 4022, and the buffer queue information for respectively being reported according to the timing is pushed away from the multiple It send and determines first push server in server.
In some embodiments of the invention, it please refers to as shown in Fig. 4-c, the push server determining module 402, wraps It includes:
Second receiving submodule 4023, the multiple push server that statistical server is sent for receiving data is respectively Corresponding buffer queue information, the multiple push server of data statistics server timing receipt are each according to report cycle From the buffer queue information reported;
Second determines submodule 4024, the multiple push server for sending according to the data statistics server Buffer queue information the first push server is determined from the multiple push server.
In some embodiments of the invention, the push server determining module 402 is specifically used for according to the multiple The queue length for the buffer queue that push server respectively reports determines that queue length is most short from the multiple push server Push server be first push server.
In some embodiments of the invention, it please refers to as shown in Fig. 4-d, the push server determining module 402, wraps It includes:
Judging submodule 4025, for judging whether the queue length of buffer queue of each push server is greater than respectively The first preset threshold value;
Third determines submodule 4026, is greater than described first for removing queue length from the multiple push server A push server is selected in other push server other than the push server of limit value at random as first push Server.
In some embodiments of the invention, the acquisition module 401, specifically for obtain push in need disappear Breath;
The push server determining module 402 is specifically used for according to the corresponding caching team of multiple push server Column information, according to the priority height of message of push in need be followed successively by and each the message that pushes needed to determine that first pushes away Send server;
The sending module 403 is specifically used for successively sending out to first push server according to message priority height Send the message that needs push.
In some embodiments of the invention, it please refers to as shown in Fig. 4-e, it is described relative to terminal as depicted in fig. 4-a Terminal 400 further include: memory module 404, wherein
The memory module 404, for it is described acquisition module 401 obtain push in need message after, will acquire To push in need message store into the data storage of the terminal;
The sending module 403, specifically for successively being taken out from the data storage according to message priority height Each message for needing to push;The message that each needs successively taken out push is sent to first push server.
In some embodiments of the invention, the acquisition module 401, specifically for obtain push in need disappear Breath;
The push server determining module 402 is specifically used for according to the corresponding caching team of multiple push server Column information, according to the type of message of message of push in need be each the message that pushes to be needed to determine the first push respectively Server.
By above to the description of the embodiment of the present invention it is found that terminal obtains first needs the message that pushes, then terminal The first Push Service is determined from multiple push server according to the corresponding buffer queue information of multiple push server Device, wherein the first push server is the push server for being used to send the message that needs push that terminal determines, terminal need to The message to be pushed is sent to the first push server determined, the message pushed will be needed to push away by first push server Give destination server.Since terminal can be selected from multiple push server according to the buffer queue information of push server For sending the push server for needing the message pushed, therefore terminal can pass through the buffer queue information of each push server Know the Congestion Level SPCC that each push server is connect with outer net, terminal can be determined send by buffer queue information First push server of message, thereby may be ensured that can be by first by the message that first push server is sent Push server is smoothly pushed to destination server, and message push is avoided not go out and be trapped in the buffer area of this terminal The pushing efficiency of message is improved in face.
It please refers to shown in Fig. 5-a, a kind of push server 500 provided in an embodiment of the present invention, the push server 500 Specially the first push server, first push server may include: receiving module 501, indentation module 502, send Module 503, wherein
Receiving module 501, the message that the needs for receiving terminal transmission push, first push server is described Terminal determines the push server for sending the message for needing to push from multiple push server;
It is pressed into module 502, for the message for needing to push to be pressed into buffer queue;
Sending module 503, for the message taken out from the buffer queue to be sent to destination server.
In some embodiments of the invention, it please refers to as shown in Fig. 5-b, the push server 500 further include: first Reporting module 504, for reporting to the terminal oneself buffer queue information according to report cycle timing.
In some embodiments of the invention, it please refers to as shown in Fig. 5-c, the push server 500 further include: second Reporting module 505, for reporting to data statistics server oneself buffer queue information according to report cycle timing, by described The buffer queue information received is sent to the terminal by data statistics server.
In some embodiments of the invention, the buffer queue information is specially the caching of first push server The queue length of queue.
In some embodiments of the invention, it please refers to as shown in Fig. 5-d, the push server 500 further include: queue Maintenance module 506, for the sending module 503 by the message taken out from the buffer queue be sent to destination server it Afterwards, the message that storage time in the buffer queue is more than storage threshold value is deleted.
By above to the description of the embodiment of the present invention it is found that the first push server is that the transmission that is used for that terminal determines needs The push server for the message to be pushed, the first push server is received from terminal needs the message that pushes, first is pushed away by this Send server that the message pushed will be needed to be pushed to destination server.Since terminal can be according to the buffer queue of push server Information is selected from multiple push server for sending the push server for needing the message pushed, therefore terminal can be by each The buffer queue information of a push server knows the Congestion Level SPCC that each push server is connect with outer net, and terminal passes through caching Queuing message can determine that the first push server of message can be sent, thereby may be ensured that through first Push Service The message that device is sent can smoothly be pushed to destination server by the first push server, and message push is avoided not go out And be trapped in inside the buffer area of this terminal, improve the pushing efficiency of message.
Mainly it is applied to come in terminal for example, the terminal can with the method for pushing of the message of the embodiment of the present invention below To include smart phone, tablet computer, E-book reader, 3 (Moving of dynamic image expert's compression standard audio level Picture Experts Group Audio Layer III, MP3) player, dynamic image expert's compression standard audio level 4 (Moving Picture Experts Group Audio Layer IV, MP4) player, pocket computer on knee and platforms Formula computer etc..
Referring to FIG. 6, it illustrates the structural schematic diagrams of terminal involved in the embodiment of the present invention, specifically:
Terminal may include radio frequency (Radio Frequency, RF) circuit 20, include one or more computer Memory 21, input unit 22, display unit 23, sensor 24, the voicefrequency circuit 25, Wireless Fidelity of readable storage medium storing program for executing (wireless fidelity, WiFi) module 26, the processor 27 for including one or more than one processing core and The components such as power supply 28.It will be understood by those skilled in the art that the restriction of terminal structure shown in Fig. 6 not structure paired terminal, It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.Wherein:
RF circuit 20 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, will be under base station After row information receives, one or the processing of more than one processor 27 are transferred to;In addition, the data for being related to uplink are sent to base It stands.In general, RF circuit 20 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, user Identity module (SIM) card, transceiver, coupler, low-noise amplifier (Low Noise Amplifier, LNA), duplexer Deng.In addition, RF circuit 20 can also be communicated with network and other equipment by wireless communication.The wireless communication, which can be used, appoints One communication standard or agreement, including but not limited to global system for mobile communications (Global System of Mobile Communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code it is point more Location (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), Email, short message service (Short Messaging Service, SMS) etc..
Memory 21 can be used for storing software program and module, and processor 27 is stored in the soft of memory 21 by operation Part program and module, thereby executing various function application and data processing.Memory 21 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to terminal use created data (such as Audio data, phone directory etc.) etc..In addition, memory 21 may include high-speed random access memory, it can also include non-volatile Property memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.Correspondingly, it deposits Reservoir 21 can also include Memory Controller, to provide the access of processor 27 and input unit 22 to memory 21.
Input unit 22 can be used for receiving the number or character information of input, and generate and user setting and function control Make related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment, Input unit 22 may include touch sensitive surface 221 and other input equipments 222.Touch sensitive surface 221, also referred to as touch display screen or Person's Trackpad, collecting the touch operation of user on it or nearby, (for example user uses any suitable object such as finger, stylus The operation of body or attachment on touch sensitive surface 221 or near touch sensitive surface 221), and phase is driven according to preset formula The attachment device answered.Optionally, touch sensitive surface 221 may include both touch detecting apparatus and touch controller.Wherein, it touches The touch orientation of detection device detection user is touched, and detects touch operation bring signal, transmits a signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 27, and The order that processor 27 is sent can be received and executed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray and surface The multiple types such as sound wave realize touch sensitive surface 221.In addition to touch sensitive surface 221, input unit 22 can also include that other inputs are set Standby 222.Specifically, other input equipments 222 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, one of operating stick etc. or a variety of.
Display unit 23 can be used for showing information input by user or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof, this is aobvious Show that unit 23 may include that screen is shown described in previous embodiment.Display unit 23 may include display panel 231, optionally, Liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light- can be used Emitting Diode, OLED) etc. forms configure display panel 231.Further, touch sensitive surface 221 can cover display surface Plate 231 sends processor 27 to determine and touches thing after touch sensitive surface 221 detects touch operation on it or nearby The type of part is followed by subsequent processing device 27 according to the type of touch event and provides corresponding visual output on display panel 231.Although In Fig. 6, touch sensitive surface 221 and display panel 231 are to realize input and input function as two independent components, still In some embodiments it is possible to which touch sensitive surface 221 and display panel 231 are integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 24, such as optical sensor, motion sensor and other sensors.Tool Body, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjusts the brightness of display panel 231, proximity sensor can when terminal is moved in one's ear, close display panel 231 and/ Or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally three axis) and accelerate The size of degree can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture, (for example horizontal/vertical screen is cut Change, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;May be used also as terminal The other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensor of configuration, details are not described herein.
Voicefrequency circuit 25, loudspeaker 251, microphone 252 can provide the audio interface between user and terminal.Voicefrequency circuit Electric signal after the audio data received conversion can be transferred to loudspeaker 251 by 25, be converted to sound letter by loudspeaker 251 Number output;On the other hand, the voice signal of collection is converted to electric signal by microphone 252, is converted after being received by voicefrequency circuit 25 For audio data, then by after the processing of audio data output processor 27, such as another terminal is sent to through RF circuit 20, or Audio data is exported to memory 21 to be further processed.Voicefrequency circuit 25 is also possible that earphone jack, outer to provide If the communication of earphone and terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 26 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 is shown WiFi module 26, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely It is omitted in the range of the essence of invention.
Processor 27 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 21, and call the number being stored in memory 21 According to, execute terminal various functions and processing data, thus to mobile phone carry out integral monitoring.Optionally, processor 27 may include One or more processing cores;Preferably, processor 27 can integrate application processor and modem processor, wherein application The main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication.It can With understanding, above-mentioned modem processor can not also be integrated into processor 27.
Terminal further includes the power supply 28 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 27 are logically contiguous, to realize management charging, electric discharge and power managed etc. by power-supply management system Function.Power supply 28 can also include one or more direct current or AC power source, recharging system, power failure monitor electricity The random components such as road, power adapter or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.Specifically in this implementation In example, the display unit of terminal is touch-screen display, and the memory 21 and above-mentioned class database of terminal seemingly, can store sampling Period, sampling time interval, frame per second statistical value.
And one or more than one program are stored in memory 21 in the terminal of the present embodiment, and are configured to by one A or more than one processor 27 executes the following operational order that said one or more than one program are included:
Obtain the message for needing to push;
It is determined from the multiple push server according to the corresponding buffer queue information of multiple push server First push server, wherein the terminal is provided at least two push server, and first push server is described The push server for being used to send the message for needing to push that terminal determines;
The message that pushes is needed to be sent to first push server by described, by first push server by institute It states and the message pushed is needed to be pushed to destination server.
Specifically, according to the corresponding buffer queue information of multiple push server from the multiple push server Determine the first push server, comprising:
Receive the buffer queue information that the multiple push server is respectively reported according to report cycle timing;
The buffer queue information respectively reported according to the timing determines described from the multiple push server One push server.
Specifically, according to the corresponding buffer queue information of multiple push server from the multiple push server Determine the first push server, comprising:
The corresponding buffer queue information of the multiple push server that data statistics server is sent is received, it is described The buffer queue information that the multiple push server of data statistics server timing receipt is respectively reported according to report cycle;
The buffer queue information of the multiple push server sent according to the data statistics server is from described more The first push server is determined in a push server.
Specifically, according to the corresponding buffer queue information of multiple push server from the multiple push server Determine the first push server, comprising:
The queue length of the buffer queue respectively reported according to the multiple push server is from the multiple Push Service Determine that the shortest push server of queue length is first push server in device.
Specifically, according to the corresponding buffer queue information of multiple push server from the multiple push server Determine the first push server, comprising:
Judge whether the queue length of the buffer queue of each push server is greater than the first preset threshold value respectively;
From the multiple push server in addition to queue length is greater than the push server of first threshold value A push server is selected in other push server at random as first push server.
Specifically, obtaining the message for needing to push, comprising:
Obtain push in need message;
It is determined from the multiple push server according to the corresponding buffer queue information of multiple push server First push server, comprising:
According to the corresponding buffer queue information of multiple push server, according to push in need message it is preferential Grade height is followed successively by the message that each needs push and determines the first push server;
The message pushed is needed to be sent to first push server by described, comprising:
The message for needing to push successively is sent to first push server according to message priority height.
Specifically, obtain after the message of push in need, also execute and such as give an order:
Will acquire push in need message store into the data storage of the terminal;
The message for needing to push successively is sent to first push server according to message priority height, comprising:
Each message for needing to push successively is taken out according to message priority height from the data storage;
The message that each needs successively taken out push is sent to first push server.
Specifically, obtaining the message for needing to push, comprising:
Obtain push in need message;
It is determined from the multiple push server according to the corresponding buffer queue information of multiple push server First push server, comprising:
According to the corresponding buffer queue information of multiple push server, according to push in need message message Type is that the message that each needs push determines the first push server respectively.
By above to the description of the embodiment of the present invention it is found that terminal obtains first needs the message that pushes, then terminal The first Push Service is determined from multiple push server according to the corresponding buffer queue information of multiple push server Device, wherein the first push server is the push server for being used to send the message that needs push that terminal determines, terminal need to The message to be pushed is sent to the first push server determined, the message pushed will be needed to push away by first push server Give destination server.Since terminal can be selected from multiple push server according to the buffer queue information of push server For sending the push server for needing the message pushed, therefore terminal can pass through the buffer queue information of each push server Know the Congestion Level SPCC that each push server is connect with outer net, terminal can be determined send by buffer queue information First push server of message, thereby may be ensured that can be by first by the message that first push server is sent Push server is smoothly pushed to destination server, and message push is avoided not go out and be trapped in the buffer area of this terminal The pushing efficiency of message is improved in face.
In addition it should be noted that, the apparatus embodiments described above are merely exemplary, wherein described as separation The unit of part description may or may not be physically separated, component shown as a unit can be or It can not be physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to reality Border needs to select some or all of the modules therein to achieve the purpose of the solution of this embodiment.In addition, provided by the invention In Installation practice attached drawing, the connection relationship between module indicates there is communication connection between them, specifically can be implemented as one Item or a plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can It understands and implements.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow Help software that the mode of required common hardware is added to realize, naturally it is also possible to by specialized hardware include specific integrated circuit, specially It is realized with CPU, private memory, special components and parts etc..Under normal circumstances, all functions of being completed by computer program are ok It is easily realized with corresponding hardware, moreover, being used to realize that the specific hardware structure of same function is also possible to a variety of more Sample, such as analog circuit, digital circuit or special circuit etc..But software program is real in situations more for the purpose of the present invention It is now more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words makes the prior art The part of contribution can be embodied in the form of software products, which is stored in the storage medium that can be read In, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), magnetic or disk etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
In conclusion the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to upper Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to upper Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (27)

1. a kind of method for pushing of message characterized by comprising
Terminal obtain push in need message;
The terminal according to the corresponding buffer queue information of multiple push server, according to push in need message Priority height or the type of message of the message of push in need each needs are followed successively by from the multiple push server The message of push determines the first push server respectively, wherein the terminal is provided at least two push server, described First push server is the push server for being used to send the message for needing to push that the terminal determines;
The terminal needs the message pushed to be sent to first push server for described, by first push server The message pushed is needed to be pushed to destination server by described.
2. the method according to claim 1, wherein the terminal is corresponding according to multiple push server Buffer queue information determines the first push server from the multiple push server, comprising:
The terminal receives the buffer queue information that the multiple push server is respectively reported according to report cycle timing;
The buffer queue information that the terminal is respectively reported according to the timing determines institute from the multiple push server State the first push server.
3. the method according to claim 1, wherein the terminal is corresponding according to multiple push server Buffer queue information determines the first push server from the multiple push server, comprising:
The terminal receives the corresponding buffer queue information of the multiple push server that data statistics server is sent, The multiple push server of data statistics server timing receipt is believed according to the buffer queue that report cycle respectively reports Breath;
The buffer queue information for the multiple push server that the terminal is sent according to the data statistics server is from institute It states and determines the first push server in multiple push server.
4. the method according to claim 1, wherein the terminal is corresponding according to multiple push server Buffer queue information determines the first push server from the multiple push server, comprising:
The queue length for the buffer queue that the terminal is respectively reported according to the multiple push server is from the multiple push Determine that the shortest push server of queue length is first push server in server.
5. the method according to claim 1, wherein the terminal is corresponding according to multiple push server Buffer queue information determines the first push server from the multiple push server, comprising:
The terminal judges whether the queue length of the buffer queue of each push server is greater than the first preset thresholding respectively Value;
The terminal from the multiple push server except queue length be greater than first threshold value push server with A push server is selected in outer other push server at random as first push server.
6. the method according to claim 1, wherein
In the terminal according to the corresponding buffer queue information of multiple push server, according to push in need message Priority height be followed successively by from the multiple push server and each the message that pushes needed to determine the first Push Service In the case where device;
The terminal needs the message pushed to be sent to first push server for described, comprising:
The terminal successively sends the message for needing to push according to message priority height to first push server.
7. according to the method described in claim 6, it is characterized in that, the terminal obtain after the message of push in need, The method also includes:
The message of what the terminal will acquire push in need is stored into the data storage of the terminal;
The terminal successively sends the message for needing to push, packet according to message priority height to first push server It includes:
The terminal successively takes out each message for needing to push according to message priority height from the data storage;
The message that each needs successively taken out push is sent to first push server by the terminal.
8. the method according to claim 1, wherein the multiple push server is respectively to come from different operations The server of quotient.
9. the method according to claim 1, wherein the destination server is apple push notification service APNS Server.
10. a kind of method for pushing of message characterized by comprising
First push server receive terminal send institute push in need message, first push server be the end Hold the priority of the message from multiple push server according to institute's push in need just or push in need message Type of message is followed successively by each push for being used to send the message for needing to push for needing the message pushed to determine respectively Server;
First push server will be in the message indentation buffer queue that need to push;
The message taken out from the buffer queue is sent to destination server by first push server.
11. according to the method described in claim 10, it is characterized in that, the method also includes:
First push server reports the buffer queue information of oneself according to report cycle timing to the terminal.
12. according to the method described in claim 10, it is characterized in that, the method also includes:
First push server reports the buffer queue information of oneself according to report cycle timing to data statistics server, The buffer queue information received is sent to the terminal by the data statistics server.
13. method according to claim 11 or 12, which is characterized in that the buffer queue information is specially described first The queue length of the buffer queue of push server.
14. according to the method described in claim 10, it is characterized in that, first push server will be from the buffer queue The message of middle taking-up is sent to after destination server, further includes:
First push server deletes the message that storage time in the buffer queue is more than storage threshold value.
15. according to the method described in claim 10, it is characterized in that, the destination server is apple push notification service APNS server.
16. a kind of terminal characterized by comprising
Module is obtained, for obtaining the message for needing to push;
Push server determining module is used for according to the corresponding buffer queue information of multiple push server, according to all The priority height for the message for needing to push or the message of push in need type of message from the multiple push server In be followed successively by and each the message that pushes needed to determine the first push server respectively, wherein the terminal is provided at least two A push server, first push server be the terminal determine described the message pushed is needed to push away for sending Send server;
Sending module is pushed for needing the message pushed to be sent to first push server for described by described first Server needs the message pushed to be pushed to destination server for described.
17. terminal according to claim 16, which is characterized in that the push server determining module, comprising:
First receiving submodule, the caching team respectively reported for receiving the multiple push server according to report cycle timing Column information;
First determines submodule, and buffer queue information for respectively being reported according to the timing is from the multiple push server In determine first push server.
18. terminal according to claim 16, which is characterized in that the push server determining module, comprising:
Second receiving submodule, the multiple push server that statistical server is sent for receiving data are corresponding slow Queuing message is deposited, what the multiple push server of data statistics server timing receipt was respectively reported according to report cycle Buffer queue information;
Second determines submodule, the caching team of the multiple push server for sending according to the data statistics server Column information determines the first push server from the multiple push server.
19. terminal according to claim 16, which is characterized in that the push server determining module is specifically used for root The queue length of the buffer queue respectively reported according to the multiple push server determines team from the multiple push server The shortest push server of column length is first push server.
20. terminal according to claim 16, which is characterized in that the push server determining module, comprising:
Judging submodule, for judging whether the queue length of buffer queue of each push server is greater than preset respectively One threshold value;
Third determines submodule, is greater than pushing away for first threshold value for removing queue length from the multiple push server It send and selects a push server in other push server other than server at random as first push server.
21. terminal according to claim 16, which is characterized in that
In the push server determining module, it is specifically used for being believed according to the corresponding buffer queue of multiple push server Breath is followed successively by according to the priority height of the message of institute's push in need and each the message that pushes is needed to determine the first push clothes In the case where business device;
The sending module needs to push away specifically for successively sending to first push server according to message priority height The message sent.
22. terminal according to claim 21, which is characterized in that the terminal further include: memory module, wherein
The memory module, for the acquisition module obtain push in need message after, all need that will acquire The message to be pushed is stored into the data storage of the terminal;
The sending module, specifically for successively taking out each needs according to message priority height from the data storage The message of push;The message that each needs successively taken out push is sent to first push server.
23. a kind of push server, which is characterized in that the push server is specially the first push server, and described first Push server includes:
Receiving module, for receive terminal transmission institute push in need message, first push server be the end Hold the priority of the message from multiple push server according to institute's push in need just or push in need message Type of message is followed successively by each push for being used to send the message for needing to push for needing the message pushed to determine respectively Server;It is pressed into module, for the message for needing to push to be pressed into buffer queue;
Sending module, for the message taken out from the buffer queue to be sent to destination server.
24. push server according to claim 23, which is characterized in that the push server further include: on first Module is reported, for reporting to the terminal oneself buffer queue information according to report cycle timing.
25. push server according to claim 23, which is characterized in that the push server further include: on second Module is reported, for reporting to data statistics server oneself buffer queue information according to report cycle timing, by the data The buffer queue information received is sent to the terminal by statistical server.
26. the push server according to claim 24 or 25, which is characterized in that the buffer queue information is specially institute State the queue length of the buffer queue of the first push server.
27. push server according to claim 23, which is characterized in that first push server, further includes: team Column maintenance module, after destination server will be sent to from the message taken out in the buffer queue for the sending module, The message that storage time in the buffer queue is more than storage threshold value is deleted.
CN201410256325.6A 2014-06-10 2014-06-10 The method for pushing and terminal and push server of a kind of message Active CN105306383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410256325.6A CN105306383B (en) 2014-06-10 2014-06-10 The method for pushing and terminal and push server of a kind of message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410256325.6A CN105306383B (en) 2014-06-10 2014-06-10 The method for pushing and terminal and push server of a kind of message

Publications (2)

Publication Number Publication Date
CN105306383A CN105306383A (en) 2016-02-03
CN105306383B true CN105306383B (en) 2019-11-19

Family

ID=55203150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410256325.6A Active CN105306383B (en) 2014-06-10 2014-06-10 The method for pushing and terminal and push server of a kind of message

Country Status (1)

Country Link
CN (1) CN105306383B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786623B (en) * 2016-09-20 2021-03-30 平安科技(深圳)有限公司 Message asynchronous processing method and device
CN108616459A (en) * 2016-11-30 2018-10-02 天津易遨在线科技有限公司 A kind of Message Queuing system that can promote message transmission speed
CN106656861B (en) * 2016-12-15 2019-03-01 咪咕数字传媒有限公司 A kind of e-book method for pushing and device
CN106936828B (en) * 2017-03-10 2020-01-14 Oppo广东移动通信有限公司 Method, device and terminal for adjusting broadcast receiver queue
CN107395697B (en) * 2017-07-06 2021-01-26 创新先进技术有限公司 Push channel selection method, message push method, device and equipment, and readable medium
CN109766347B (en) * 2017-07-21 2023-03-28 腾讯科技(深圳)有限公司 Data updating method, device, system, computer equipment and storage medium
CN108306923A (en) * 2017-08-21 2018-07-20 北京潘达互娱科技有限公司 A kind of live video method for uploading, device, electronic equipment and storage medium
CN107749861A (en) * 2017-11-16 2018-03-02 平安科技(深圳)有限公司 Information-pushing method, device, terminal device and storage medium
CN108683529A (en) * 2018-04-26 2018-10-19 昆明俊云科技有限公司 Data accelerate transmission method and device
CN112464095B (en) * 2020-12-01 2024-05-14 Oppo(重庆)智能科技有限公司 Message pushing method, device, terminal and storage medium
CN113422808B (en) * 2021-05-27 2022-06-17 天翼物联科技有限公司 Internet of things platform HTTP information pushing method, system, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223381A (en) * 2011-07-07 2011-10-19 莫雅静 Message pushing method, server, client terminal and system
CN102571885A (en) * 2010-12-31 2012-07-11 上海博泰悦臻电子设备制造有限公司 Vehicle-mounted information push service system and method
CN103731476A (en) * 2013-12-10 2014-04-16 乐视网信息技术(北京)股份有限公司 Method and device for improving information push speed
KR20140060637A (en) * 2012-11-12 2014-05-21 인포뱅크 주식회사 Method, system and apparatus for balancing load

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120295617A1 (en) * 2011-05-18 2012-11-22 Qualcomm Incorporated Selectively extending a waiting period before an originating user equipment fails a call based on network information of one or more target user equipments
CN103580988B (en) * 2012-07-31 2017-10-17 阿里巴巴集团控股有限公司 Message sink, push, method, device, server group and the system of transmission
KR20140032542A (en) * 2012-08-30 2014-03-17 삼성전자주식회사 A method and apparatus for determining heartbeat period of push service in wireless network
CN103685396B (en) * 2012-09-14 2017-04-19 北京神州泰岳软件股份有限公司 Method and system for realizing message pushing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571885A (en) * 2010-12-31 2012-07-11 上海博泰悦臻电子设备制造有限公司 Vehicle-mounted information push service system and method
CN102223381A (en) * 2011-07-07 2011-10-19 莫雅静 Message pushing method, server, client terminal and system
KR20140060637A (en) * 2012-11-12 2014-05-21 인포뱅크 주식회사 Method, system and apparatus for balancing load
CN103731476A (en) * 2013-12-10 2014-04-16 乐视网信息技术(北京)股份有限公司 Method and device for improving information push speed

Also Published As

Publication number Publication date
CN105306383A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN105306383B (en) The method for pushing and terminal and push server of a kind of message
CN104978176B (en) Application programming interfaces call method, device and computer readable storage medium
CN105243638B (en) A kind of method and apparatus uploading image
CN104238893B (en) A kind of method and apparatus that video preview picture is shown
CN104834529A (en) Method and device for optimizing performance of application
CN104142862A (en) Overload protection method and device for server
CN106453597B (en) The method of adjustment of data synchronizing cycles, apparatus and system
CN104571979B (en) A kind of method and apparatus for realizing split view
CN104571787A (en) Message display method and communication terminal
CN109672254A (en) A kind of charging control circuit, terminal device and control method
CN104036536A (en) Generating method and apparatus of stop motion animation
CN104967634A (en) File upload method and apparatus thereof
CN103177217B (en) A kind of file scanning method, system and client and server
CN107613024A (en) A kind of method of data synchronization and mobile terminal
CN109561014A (en) A kind of web instant communication method and system
CN104133757A (en) Method for obtaining memory information and terminal
CN110022567A (en) A kind of data transmission method and user terminal
CN108009658A (en) A kind of subscription services information acquisition method, apparatus and system
CN104660769A (en) Method, device and system for adding contact person information
CN106131402B (en) A kind of self-shooting bar, photographic method and self-heterodyne system
CN106817489A (en) The reminding method and mobile terminal of message
CN104853193A (en) Video compression method, device and electronic equipment
CN106484141B (en) The setting method and mobile terminal of threshold value
CN105022621A (en) Method and device for collecting session message and terminal
CN107786412A (en) A kind of communication means and Related product of game virtual dedicated network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant