WO2013097452A1 - 接收数据的方法、发送数据的方法、移动终端和服务器 - Google Patents

接收数据的方法、发送数据的方法、移动终端和服务器 Download PDF

Info

Publication number
WO2013097452A1
WO2013097452A1 PCT/CN2012/079101 CN2012079101W WO2013097452A1 WO 2013097452 A1 WO2013097452 A1 WO 2013097452A1 CN 2012079101 W CN2012079101 W CN 2012079101W WO 2013097452 A1 WO2013097452 A1 WO 2013097452A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
data
application
server
connection
Prior art date
Application number
PCT/CN2012/079101
Other languages
English (en)
French (fr)
Inventor
陈国乔
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to EP12861348.6A priority Critical patent/EP2713641B1/en
Publication of WO2013097452A1 publication Critical patent/WO2013097452A1/zh
Priority to US14/145,496 priority patent/US9712632B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/25Maintenance of established connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of mobile terminals, and in particular, to a method for receiving data, a method for transmitting data, a mobile terminal, and a server. Background of the invention
  • the mobile terminal needs to communicate with the application server on the network side in real time.
  • the heartbeat signaling is sent between the mobile terminal and the application server at a small time interval to ensure that the application server refreshes the IP address information of the mobile terminal and utilizes This mechanism maintains the IP connection between the mobile terminal and the application server for a long time, and can establish an IP connection immediately when there is no IP connection between the mobile terminal and the server.
  • the application server sends the relevant business data of the application to the mobile terminal through the IP connection.
  • the embodiment of the present invention provides a method for receiving data, a method for transmitting data, a mobile terminal, and a server.
  • the technical solution is as follows:
  • a method of receiving data comprising:
  • the mobile terminal When the application on the mobile terminal switches to the background, the mobile terminal sends a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate that the application server is When there is data to be sent to the mobile terminal, The data is sent to the push server, and the application server serves the application; the mobile terminal receives the data sent by the push server.
  • a method of transmitting data comprising:
  • the push server receives the first message sent by the mobile terminal
  • a method of transmitting data including:
  • the application server receives the second message sent by the push server
  • a mobile terminal includes:
  • a sending module configured to: when the application on the mobile terminal switches to the background, send a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate the application server And when the data needs to be sent to the mobile terminal, the data is sent to the push server, where the application server serves the application; and the receiving module is configured to receive the data sent by the push server.
  • a push server the server comprising:
  • a receiving module configured to receive a first message sent by the mobile terminal; a sending module, configured to send, according to the first message, a second message to the application server, where the second message is used to indicate that the application server sends the data to the mobile terminal when there is data to be sent to the mobile terminal Push server
  • the sending module is further configured to: when receiving the data sent by the application server, send the data to the mobile terminal.
  • An application server including:
  • a receiving module configured to receive a second message sent by the push server
  • a sending module configured to send the data to the push server according to the second message, when the application indicated by the user identifier and the application identifier has data to send to the mobile terminal, so that the pushing After receiving the data, the server sends the data to the mobile terminal.
  • a network system comprising:
  • a mobile terminal configured to: when the application on the mobile terminal switches to the background, send a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate the application server Sending the data to the push server when there is data to be sent to the mobile terminal, the application server serving the application; receiving the data sent by the push server;
  • a push server configured to receive a first message sent by the mobile terminal, and send a second message to the application server according to the first message, where the second message is used to indicate that the application server needs to send data to the mobile terminal Transmitting the data to the push server; sending the data to the mobile terminal when receiving the data sent by the application server; and receiving, by the application server, a second message sent by the push server; When the user identifier and the application identifier indicate that the application needs to send data to the mobile terminal, send the data to the push server according to the second message, so that the push server is connected. After receiving the data, the data is sent to the mobile terminal.
  • a method of receiving data comprising:
  • the mobile terminal When the application on the mobile terminal switches to the background, the mobile terminal sends a registration message to the proxy server, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives the application server to the mobile terminal.
  • the delivered data the application server serving the application;
  • the mobile terminal receives the data forwarded by the proxy server.
  • a method of transmitting data comprising:
  • the proxy server receives the registration message sent by the mobile terminal
  • a mobile terminal includes:
  • a sending module configured to send a registration message to the proxy server when the application on the mobile terminal switches to the background, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives the application server to Data delivered by the mobile terminal, where the application server serves the application;
  • a proxy server including:
  • a receiving module configured to receive a registration message sent by the mobile terminal
  • a heartbeat module configured to maintain a heartbeat connection with the application server according to the registration message
  • a sending module configured to: when the data sent by the application server is received, And sent to the mobile terminal.
  • a mobile terminal configured to: when the application on the mobile terminal switches to the background, send a registration message to the proxy server, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives the application server to
  • the data sent by the mobile terminal the application server serves the application; receives the data forwarded by the proxy server; and the proxy server is configured to receive a registration message sent by the mobile terminal; according to the registration message, and the application The server maintains a heartbeat connection; when the data sent by the application server is received, the data is sent to the mobile terminal;
  • An application server configured to send data to the proxy server.
  • the push server or the proxy server By using a push server or a proxy server to implement an environment in which the application remains online, when the application switches to the background operation, the push server or the proxy server interacts with the application server, so that the mobile terminal does not need to maintain a heartbeat connection with the application server. Not only reduces the signaling overhead of the mobile terminal, but also greatly reduces the energy consumption of the mobile terminal and reduces the interaction of the network signaling.
  • FIG. 1 is a flowchart of a method for receiving data according to an embodiment of the present invention
  • 2 is a flowchart of a method for receiving data according to an embodiment of the present invention
  • 3 is a flowchart of a method for receiving data according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for receiving data according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a push server according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another push server according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of another push server according to an embodiment of the present invention
  • FIG. 10 is an application server according to an embodiment of the present invention. Schematic;
  • FIG. 11 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a proxy server according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of another proxy server according to an embodiment of the present invention
  • FIG. 15 is a schematic structural diagram of another proxy server according to an embodiment of the present invention. Mode for carrying out the invention
  • FIG. 1 is a flowchart of a method for receiving data according to an embodiment of the present invention.
  • the embodiment of the embodiment is a mobile terminal. Referring to FIG. 1, the method includes:
  • the mobile terminal When the application on the mobile terminal switches to the background, the mobile terminal sends a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate that the application server is present.
  • the data When the data needs to be sent to the mobile terminal, the data is sent to the push server, and the application server serves the application;
  • the mobile terminal when the application of the mobile terminal switches to the background, the mobile terminal no longer maintains a heartbeat connection with the application server through heartbeat signaling, but interacts with the application server through the push server, and is received by the push server.
  • the data sent by the application server is counted It is sent to the mobile terminal.
  • the mobile terminal receives the data sent by the push server.
  • the method provided by the embodiment by using the push server to implement the scenario in which the application remains online, when the application is switched to run in the background, the push server interacts with the application server, so that the mobile terminal does not need to maintain a heartbeat with the application server.
  • the connection not only reduces the signaling overhead of the mobile terminal, but also greatly reduces the energy consumption of the mobile terminal and reduces the interaction of the network signaling.
  • FIG. 2 is a flowchart of a method for receiving data according to an embodiment of the present invention.
  • the communication network includes a mobile terminal, a push server, and an application server.
  • the mobile terminal may be a mobile phone, a PDA, etc.
  • the push server is generally disposed in the operator server, and uses a short message or the like.
  • the application server refers to a server of each application, for example, a QQ server, a mail server, and the like.
  • the push server can correspond to multiple application servers and provide PUSH push services for the application server.
  • the method includes: 201. An application on a mobile terminal switches from a foreground operation to a background operation;
  • the application refers to an Internet application that needs to maintain a status update.
  • Those skilled in the art can know that during the use of the application, it can be divided into two states: foreground running and background running.
  • the background and foreground are relative to the desktop, and the application is perceived by the user when executed on the front desk, ie on the desktop, and is not visible to the user when the application is running in the background.
  • the switch of the foreground running and the background running may include any one of the following situations: (1) The application running in the foreground is idle for more than a preset time, and then is switched to run in the background, where the preset time is set by the user, and the embodiment of the present invention No specific restrictions. (2) After the user opens the first application, the second application is opened again. At this time, the second application is visible to the user, and the first application is invisible, and the second application is running in the foreground, the first application. Run for the background.
  • IP connection of the mobile terminal and the application server serving the application is released.
  • All data transmissions and status synchronizations are used to make use of this IP connection.
  • a mobile terminal can establish multiple IP connections, and an application can establish an IP connection or use an existing IP connection as needed.
  • the step of releasing the IP connection may be performed when the handover occurs, or may be performed at any step after the handover occurs, for example, after the step 203, which is not specifically limited in the embodiment of the present invention.
  • the network resource occupation can be reduced by releasing the IP connection of the application running in the background.
  • the mobile terminal saves an application identifier of the application that is switched.
  • the application identifier of the application may be an application ID (APP ID), and may also be an application description, such as: QQ, MSN, and the like.
  • the mobile terminal sends a first message to the push server, where the first message carries the user identifier of the mobile terminal and an application identifier of the application.
  • the user identifier of the mobile terminal may be an identifier assigned by the application terminal to the mobile terminal when the mobile terminal registers the application, and the user identifier corresponds to the telephone number of the mobile terminal.
  • the first message may further carry status information of the application, to notify the status of the current application of the push server, and the push server maintains the status information and the application identifier of the application after receiving the first message.
  • the step 203 is used to notify the push server of the application identifier of the application, so that the push server knows that the application has switched from the foreground operation to the background operation, and activates the Push service.
  • the push server receives the first message, and saves the application identifier of the application and the user identifier of the mobile terminal, and sends a second message to the application server serving the application according to the application identifier to activate the Push service of the application. ;
  • the push server After receiving the application identifier, the push server queries the application server serving the application according to the application identifier, and sends a second message to the application server.
  • the second message includes the user identification of the mobile terminal.
  • the second message carries the address identifier of the push server and the user identifier of the mobile terminal, and is used to indicate that the application server sends the data to the push server when there is data to be sent to the mobile terminal.
  • the application server determines whether the second message that is sent by the push server and includes the user identifier of the mobile terminal is received.
  • step 207 If yes, go to step 207;
  • step 206 is performed.
  • the workflow of the application server as the application server is changed, so that the application server does not have to maintain the heartbeat with the mobile terminal, but when the application identifier and the application corresponding to the user identifier have data to be sent,
  • the application server has received a second message containing the user identity of the mobile terminal, ie the application server sends the data to the push server.
  • the application server performs data transmission according to the process of communication between the existing mobile terminal and the application server, and skips to step 211;
  • the application server sends the data to the push server.
  • the push server determines whether there is an IP connection between the push server and the mobile terminal.
  • step 209 If yes, go to step 209; If no, go to step 210;
  • the push server sends data to the mobile terminal through an IP connection with the mobile terminal, and jumps to step 211;
  • the push server sends the data to the mobile terminal through the Push mechanism of the wireless network.
  • the push server can send the data to the mobile terminal by using, for example, SMS Push, WAP Push, or the like;
  • the step 210 may be replaced by: if there is no IP connection between the push server and the mobile terminal, the push server determines whether the data is greater than a preset value; The data is smaller than the preset value, and the push server sends the data to the mobile terminal through the Push mechanism. If the data is greater than or equal to the preset value, the push server sends an IP connection notification to the mobile terminal, and the push server receives the establishment of the mobile terminal.
  • the IP connection request establishes an IP connection with the mobile terminal and transmits the data to the mobile terminal through the established IP connection.
  • the push server is generally set in the carrier server, and uses the short message method to perform PUSH push, and can transmit small data without an IP connection, and can transmit data without establishing an IP connection between the mobile terminal and the push server.
  • the signaling overhead of the mobile terminal is reduced, and the network signaling interaction is reduced.
  • the preset value can be preset, and will not be described here.
  • steps 209 and 210 are all processes in which the push server sends a message to the mobile terminal.
  • the IP connection between the push server and the mobile terminal may be released after the switchover occurs, or may be released in other steps. .
  • the mobile terminal receives data, where the data carries the status indication information of the application.
  • the indication status information of the application is used to indicate the state in which the mobile terminal should run the program, and may be set at the application server. .
  • the mobile terminal determines, according to the status indication information of the application, whether the application needs to be switched to the foreground operation;
  • step 213 is performed; If the application does not need to be switched to the foreground, step 214 is performed;
  • the mobile terminal switches the application to the foreground, and prompts the data to the mobile terminal user, and ends.
  • the data may also carry a mobile terminal status requirement of the application, where the mobile terminal status requirement of the application is used to indicate whether the mobile terminal needs to run the program in an activated state, and may be set by a technician at the application server. .
  • the application needs to be pulled up, the current state of the mobile terminal needs to be judged.
  • the mobile terminal is in a sleep state or the screen is closed, it is determined whether the mobile terminal state requirement needs to be activated in the mobile terminal.
  • the mobile terminal saves the data, and maintains the background running state of the application, and prompts the data to the mobile terminal user until the application switches to the foreground.
  • the mobile terminal saves the message according to the application identifier of the data, and when the application indicated by the application identifier switches from the background operation to the foreground operation, the data is presented to the user, and those skilled in the art may know
  • the method of the prompting may be various, including a pop-up message or a pop-up message prompt on the display screen, which is not specifically limited in the embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for receiving data according to an embodiment of the present invention.
  • the execution subject is a mobile terminal. Referring to FIG. 3, the method includes:
  • the mobile terminal When an application on the mobile terminal switches to the background, the mobile terminal sends a registration message to the proxy server, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives the application server to be sent to the mobile terminal.
  • the data sent, the application server serves the application;
  • the registration information carries the user identifier of the mobile terminal and the application identifier of the application.
  • the proxy server receives the registration message sent by the mobile terminal, and the proxy server maintains a heartbeat connection with the application server according to the registration message, and when the proxy server receives the data sent by the application server, Data is sent to the mobile terminal, thereby transferring the heartbeat connection between the mobile terminal and the application server to the proxy server, so that the proxy server maintains a heartbeat connection with the application server, and once the application server has data to send, the data is sent to the proxy.
  • the server is forwarded by the proxy server as a relay to the mobile terminal.
  • the mobile terminal receives the data forwarded by the proxy server.
  • FIG. 4 is a flowchart of a method for receiving data according to an embodiment of the present invention.
  • the interacting party is a mobile terminal, a proxy server, and an application server, and the proxy server is operated by Set up, connect to the application server and serve the application server. See Figure 4, the method includes:
  • the application on the mobile terminal switches from the foreground operation to the background operation;
  • the method for the mobile terminal to learn the background conversion is the same as step 201, and details are not described herein.
  • the mobile terminal sends a registration message to the proxy server, where the registration message carries the user identifier of the mobile terminal and registration information of the application.
  • the mobile terminal in order to maintain the background operation of the application, the mobile terminal needs to periodically register with the application server, and in the embodiment of the present invention, the mobile terminal sends the proxy terminal to the proxy server.
  • the registration message causes the proxy server to host the registration function of the application.
  • the registration message of the application carries the user identifier of the mobile terminal and the application identifier of the application, and may also carry application state information and application heartbeat frequency and the like.
  • the proxy server receives the registration message, and initiates registration with the application server of the application according to the registration message.
  • the proxy server periodically initiates registration with the application server of the application by using the received registration message, and the registration is used to transfer the periodic registration between the mobile terminal and the application server to the proxy server.
  • the heartbeat connection and communication are maintained by the proxy server and the application server, which reduces the signaling of the mobile terminal and avoids the generation of signaling storms.
  • the proxy server registers with the application server, and the proxy server sets a heartbeat frequency between the proxy server and the application server according to the registration message.
  • the proxy server may set the heartbeat frequency between the proxy server and the application server according to the heartbeat frequency maintained between the mobile terminal and the application server in the registration message, and the heartbeat frequency may also be set by a technician, preferably, the proxy
  • the heartbeat frequency between the server and the application server is higher than the heartbeat frequency between the mobile terminal and the application server. Due to agency service The processing power and bandwidth capability of the device are higher than that of the mobile terminal, so on this basis, the real-time performance of the data can be improved.
  • the proxy server maintains an application heartbeat function with the application server according to the set heartbeat frequency
  • the heartbeat function in this embodiment refers to a proxy server to an application server, and a two-way heartbeat function from the application server to the proxy server.
  • the specific implementation is consistent with the two-way heartbeat function between the mobile terminal and the application server in the prior art, and the local status update is notified to the peer through the event notification message.
  • the proxy server knows through the heartbeat message whether the application server has data to be sent to the mobile terminal.
  • the IP connection of the application is released.
  • the heartbeat retention and data update functions of the mobile terminal are transferred to the proxy server.
  • the heartbeat function may be bidirectional, and the heartbeat message is sent by the proxy server to the application server, and the application server also sends a heartbeat message to the proxy server, and the proxy server may be informed according to the heartbeat message sent by the application server or the feedback of the application server. Whether the application server has data to send.
  • the application server as the application server is consistent with the basic functions of the existing application server, and no change in the flow is performed.
  • the application server sends the data to the proxy server.
  • the data is first sent to the proxy server through its heartbeat function, and then forwarded to the mobile terminal by the proxy server.
  • the proxy server receives data sent by the application server, and determines whether the data to be sent is greater than a preset value.
  • step 408 is performed
  • the preset value is set by the technician according to the system capability, and the embodiment of the present invention does not specifically Limited.
  • the proxy server sends the data to the mobile terminal by using the Push mechanism, and ends.
  • the proxy server causes the application on the mobile terminal to switch to the foreground operation through the Push mechanism, and sends the data to the mobile terminal.
  • the proxy server may obtain the current online status of the mobile terminal, and report the obtained online status to the application server, so that the application server updates the status information of the mobile terminal according to the online status report.
  • the proxy server sends an IP connection notification to the mobile terminal, and when the proxy server receives the setup IP connection request of the mobile terminal, establishes an IP connection with the mobile terminal, and sends the data to the mobile terminal by using the established IP connection.
  • the method provided in this embodiment by using a proxy server to implement a scenario in which an application remains online, when the application is switched to run in the background, the proxy server interacts with the application server, so that the mobile terminal does not need to maintain a heartbeat with the application server.
  • the connection not only reduces the signaling overhead of the mobile terminal, but also greatly reduces the energy consumption of the mobile terminal and reduces the interaction of the network signaling.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal includes:
  • the sending module 501 is configured to: when the application on the mobile terminal switches to the background, send a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate the application And sending, by the server, the data to the push server when there is data to be sent to the mobile terminal, where the application server serves the application;
  • the receiving module 502 is configured to receive the data sent by the push server.
  • the first message carries a user identifier of the mobile terminal and a response of the application Use the program identification.
  • FIG. 6 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention.
  • the mobile terminal further includes: a prompting module 503, configured to: when the status information of the application is running in the foreground, switch the application to the foreground, and prompt the data to the mobile terminal user;
  • the prompting module 503 is further configured to: when the state information of the application is running in the background, save the data, and maintain a background running state of the application, until the application switches to the foreground, The data is presented to the mobile terminal user.
  • the mobile terminal further includes:
  • the release module 504 is configured to release an IP connection between the mobile terminal and an application server serving the application when the application on the mobile terminal switches to the background.
  • FIG. 7 is a schematic structural diagram of a push server according to an embodiment of the present invention.
  • the push server includes:
  • the receiving module 701 is configured to receive a first message sent by the mobile terminal.
  • the sending module 702 is configured to send, according to the first message, a second message to the application server, where the second message is used to indicate that the application server sends the data to the mobile terminal when there is data to be sent to the mobile terminal.
  • the sending module 702 is further configured to send the data to the mobile terminal when receiving data sent by the application server.
  • the first message carries a user identifier of the mobile terminal and an application identifier of the application.
  • FIG. 8 is a schematic structural diagram of another push server according to an embodiment of the present invention.
  • the push server includes: a receiving module 701 and a sending module 702.
  • the push server further includes:
  • the first determining module 703 is configured to determine whether there is an IP connection with the mobile terminal, and the sending module 702 is further configured to: when the first determining module determines the mobile terminal There is an IP connection between the data, and the data is transmitted to the mobile terminal through an IP connection with the mobile terminal.
  • the sending module 702 is further configured to: when the first determining module determines that there is no IP connection with the mobile terminal, send an IP connection notification to the mobile terminal,
  • the establishing module 704 is configured to establish an IP connection with the mobile terminal when the receiving module receives the IP connection request of the mobile terminal;
  • the sending module 702 is further configured to send data to the mobile terminal by using an established IP connection.
  • FIG. 9 is a schematic structural diagram of another push server according to an embodiment of the present invention.
  • the push server includes: a receiving module 702, a sending module 702, and a first determining module 703. Further, the pushing server further includes:
  • the second determining module 705 is configured to: when the first determining module 703 determines that there is no IP connection with the mobile terminal, determine whether the data is greater than a preset value;
  • the sending module 702 is further configured to: if the second determining module 705 determines that the data is smaller than a preset value, send the data to the mobile terminal by using a Push mechanism;
  • the sending module 702 is further configured to: if the second determining module 705 determines that the data is greater than a preset value, send an IP connection notification to the mobile terminal;
  • the establishing module 704 is configured to establish an IP connection with the mobile terminal when the receiving module receives the IP request for establishing the mobile terminal;
  • the sending module 702 is further configured to send data to the mobile terminal by using an established IP connection.
  • the push server provided in this embodiment is the same as the method embodiment. For details, refer to the method embodiment, and details are not described herein.
  • FIG. 10 is a schematic structural diagram of an application server according to an embodiment of the present invention.
  • the application server includes:
  • the receiving module 1001 is configured to receive a second message sent by the push server.
  • the sending module 1002 is configured to send, according to the second message, the data to the push server when the application identifier and the application identifier indicated by the application have data to send to the mobile terminal, so that the After receiving the data, the push server sends the data to the mobile terminal.
  • the second message carries a user identifier of the mobile terminal.
  • the application server provided in this embodiment is the same as the method embodiment, and the specific implementation process is described in the method embodiment, and details are not described herein again.
  • a network system is provided by the embodiment of the present invention, where the network system includes:
  • any one of the foregoing mobile terminals configured to: when the application on the mobile terminal switches to the background, send a first message to the push server, so that the push server sends a second message to the application server; the second message is used to indicate And the application server sends the data to the push server when there is data to be sent to the mobile terminal, where the application server serves the application; and receives the data sent by the push server;
  • any one of the above-mentioned push servers configured to receive a first message sent by the mobile terminal, and send a second message to the application server according to the first message, where the second message is used to indicate that the application server needs to Sending, by the mobile terminal, the data to the push server; when receiving the data sent by the application server, sending the data to the mobile terminal;
  • Any one of the foregoing application servers configured to receive a second message sent by the push server; when the user identifier and the application identifier indicated by the application identifier have data to be sent to the mobile terminal, according to the second message
  • the data is sent to the push server, so that after the push server receives the data, the data is sent to the mobile terminal.
  • FIG. 11 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal includes:
  • the sending module 1101 is configured to be used when the application on the mobile terminal switches to the background
  • the server sends a registration message, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives data to be sent by the application server to the mobile terminal, where the application server serves the application;
  • the receiving module 1102 is configured to receive the data forwarded by the proxy server.
  • the registration message carries a user identifier of the mobile terminal and an application identifier of the application.
  • the data carries status information of the application, and correspondingly, referring to FIG. 12, the mobile terminal includes:
  • the prompting module 1103 is configured to: when the status information of the application is running in the foreground, switch the application to the foreground, and prompt the data to the mobile terminal user;
  • the prompting module 1103 is further configured to: when the state information of the application is running in the background, save the data, and maintain a background running state of the application, until the application switches to the foreground, The data is presented to the mobile terminal user.
  • FIG. 13 is a schematic structural diagram of a proxy server according to an embodiment of the present invention. Referring to Figure 13 3, the proxy server includes:
  • the receiving module 1301 is configured to receive a registration message sent by the mobile terminal.
  • the heartbeat module 1 302 is configured to maintain a heartbeat connection with the application server according to the registration message, and send module 1 303, configured to send the data to the mobile terminal when the data sent by the application server is received.
  • the registration message carries a user identifier of the mobile terminal and an application identifier of the application.
  • the heartbeat module 1 302 includes:
  • FIG. 14 is a schematic structural diagram of another proxy server according to an embodiment of the present invention. See picture
  • the proxy server includes: a receiving module 1301, a heartbeat module 1302, and a sending module 1303, where the proxy server further includes:
  • the third determining module 1304 is configured to: when receiving the data sent by the application server, determine whether there is an IP connection between the proxy server and the mobile terminal;
  • the sending module 1303 is further configured to: if the third determining module has an IP connection between the proxy server and the mobile terminal, send the data to the mobile terminal by using an IP connection with the mobile terminal. .
  • the sending module 1303 is further configured to: if the third determining module determines that there is no IP connection between the proxy server and the mobile terminal, send an IP connection notification to the mobile terminal;
  • the proxy server further includes:
  • the establishing module 1305 is configured to establish an IP connection with the mobile terminal when the receiving module receives the IP request for establishing the mobile terminal;
  • the sending module 1303 is further configured to send data to the mobile terminal by using an established IP connection.
  • FIG. 15 is a schematic structural diagram of another proxy server according to an embodiment of the present invention. See picture
  • the proxy server includes: a receiving module 1301, a heartbeat module 1302, a sending module 1303, and a third determining module 1304.
  • the fourth determining module 1306 is configured to: if the third determining module 1304 determines that there is no IP connection between the proxy server and the mobile terminal, determine whether the data is greater than a preset value; and the sending module 1303 is configured to: If the fourth determining module determines that the data is less than a preset value, the proxy server sends the data to the mobile terminal by using a Push mechanism;
  • the sending module 1303 is configured to: if the fourth determining module determines that the data is greater than or equal to a preset value, send an IP connection notification to the mobile terminal;
  • the establishing module 1305 is configured to establish an IP connection with the mobile terminal when the receiving module receives the establishment IP request of the mobile terminal;
  • the sending module 1303 is further configured to send data to the mobile terminal by using an established IP connection.
  • the proxy server provided in this embodiment is the same as the method embodiment, and the specific implementation process is described in the method embodiment, and details are not described herein again.
  • the embodiment of the invention provides a network system, where the network system includes:
  • a mobile terminal configured to send a registration message to the proxy server when the application on the mobile terminal switches to the background, so that the proxy server maintains a heartbeat connection with the application server according to the registration message and receives the application server to Data sent by the mobile terminal, the application server serving the application; receiving the data forwarded by the proxy server;
  • a proxy server configured to receive a registration message sent by the mobile terminal, and maintain a heartbeat connection with the application server according to the registration message; and send the data to the mobile terminal when receiving the data sent by the application server;
  • An application server configured to send data to the proxy server.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种接收数据的方法、发送数据的方法、移动终端和服务器,属于移动移动终端领域。该方法包括:当移动终端上的应用程序切换到后台时,该移动终端向推送服务器发送第一消息,使得该推送服务器向应用服务器发送第二消息;该第二消息用于指示该应用服务器在有数据需要向该移动终端发送时,将该数据发送给该推送服务器,该应用服务器为该应用程序服务;该移动终端接收该推送服务器发送的该数据。本发明使得移动终端无需与应用服务器保持心跳连接,不仅减小了移动终端的信令开销,且很大程度上节约了移动终端能耗,减少网络信令的交互。

Description

接收数据的方法、 发送数据的方法、 移动终端和服务器 技术领域
本发明涉及移动终端领域, 特别涉及一种接收数据的方法、 发送数据 的方法、 移动终端和服务器。 发明背景
目前的智能手机或平板电脑等移动终端上的应用, 特别是一些和移动 互联网相关的应用, 包括 IM ( Ins tant Mes saging, 即时通讯)、 Ema i l、 SNS ( Soc ia l Networking Services , 社会性网络服务)等, 移动终端需要实 时同网络侧的应用服务器进行通信。 现有技术中, 应用程序在移动终端的 后台运行时, 移动终端和应用服务器之间会以较小的时间间隔发送心跳信 令, 以保证应用服务器对移动终端 IP地址信息的时刻刷新, 并利用这个机 制维持移动终端和应用服务器之间的 I P连接长期有效, 并且在移动终端与 服务器之间无 IP连接时, 可以即时建立起 IP连接。 应用服务器通过 IP连接 向移动终端发送应用程序的相关业务数据。
但是, 应用程序在后台运行时, 移动终端需要一直向应用服务器发送 心跳信令, 保持心跳连接, 这造成了极大的信令浪费。 发明内容
为了减小移动终端的信令风暴, 本发明实施例提供了一种接收数据的 方法、 发送数据的方法、 移动终端和服务器。 所述技术方案如下:
一种接收数据的方法, 所述方法包括:
当移动终端上的应用程序切换到后台时, 所述移动终端向推送服务器 发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述第 二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将 所述数据发送给所述推送服务器 , 所述应用服务器为所述应用程序服务; 所述移动终端接收所述推送服务器发送的所述数据。 一种发送数据的方法, 所述方法包括:
推送服务器接收移动终端发送的第一消息;
所述推送服务器根据第一消息, 向应用服务器发送第二消息, 所述第 二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将 所述数据发送给所述推送服务器;
当所述推送服务器接收到所述应用服务器发送的数据时, 将所述数据 发送给所述移动终端。 一种发送数据的方法, 包括:
应用服务器接收推送服务器发送的第二消息;
当有数据需要向所述移动终端发送时, 所述应用服务器根据所述第二 消息将所述数据发送给所述推送服务器, 使得所述推送服务器接收到所述 数据后, 将所述数据发送给所述移动终端。 一种移动终端, 包括:
发送模块, 用于当移动终端上的应用程序切换到后台时, 向推送服务 器发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述 第二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所述数据发送给所述推送服务器, 所述应用服务器为所述应用程序服务; 接收模块, 用于接收所述推送服务器发送的所述数据。 一种推送服务器, 所述服务器包括:
接收模块, 用于接收移动终端发送的第一消息; 发送模块, 用于根据第一消息, 向应用服务器发送第二消息, 所述第 二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将 所述数据发送给所述推送服务器;
所述发送模块, 还用于当接收到所述应用服务器发送的数据时, 将所 述数据发送给所述移动终端。 一种应用服务器, 包括:
接收模块, 用于接收推送服务器发送的第二消息;
发送模块, 用于当所述用户标识和应用程序标识指示的应用程序有数 据需要向所述移动终端发送时, 根据所述第二消息将所述数据发送给所述 推送服务器, 使得所述推送服务器接收到所述数据后, 将所述数据发送给 所述移动终端。 一种网络***, 所述网络***包括:
移动终端, 用于当移动终端上的应用程序切换到后台时, 向推送服务 器发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述 第二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所述数据发送给所述推送服务器, 所述应用服务器为所述应用程序服务; 接收所述推送服务器发送的所述数据;
推送服务器, 用于接收移动终端发送的第一消息; 根据第一消息, 向 应用服务器发送第二消息, 所述第二消息用于指示所述应用服务器在有数 据需要向所述移动终端发送时, 将所述数据发送给所述推送服务器; 当接 收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端; 应用服务器, 用于接收推送服务器发送的第二消息; 当所述用户标识 和应用程序标识指示的应用程序有数据需要向所述移动终端发送时, 根据 所述第二消息将所述数据发送给所述推送服务器, 使得所述推送服务器接 收到所述数据后, 将所述数据发送给所述移动终端。 一种接收数据的方法, 所述方法包括:
当移动终端上的应用程序切换到后台时, 所述移动终端向代理服务器 发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器保持 心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应用服 务器为所述应用程序服务;
所述移动终端接收所述代理服务器转发的所述数据。 一种发送数据的方法, 所述方法包括:
代理服务器接收移动终端发送的注册消息;
所述代理服务器根据所述注册消息, 与应用服务器保持心跳连接; 当所述代理服务器接收到所述应用服务器发送的数据时, 将所述数据 发送给所述移动终端。 一种移动终端, 包括:
发送模块, 用于当移动终端上的应用程序切换到后台时, 所向代理服 务器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器 保持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应 用服务器为所述应用程序服务;
接收模块, 用于接收所述代理服务器转发的所述数据。 一种代理服务器, 包括:
接收模块, 用于接收移动终端发送的注册消息;
心跳模块, 用于根据所述注册消息, 与应用服务器保持心跳连接; 发送模块, 用于当所接收到所述应用服务器发送的数据时, 将所述数 据发送给所述移动终端。 一种网络***, 所述网络***包括:
移动终端, 用于当移动终端上的应用程序切换到后台时, 所向代理服 务器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器 保持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应 用服务器为所述应用程序服务; 接收所述代理服务器转发的所述数据; 代理服务器, 用于接收移动终端发送的注册消息; 根据所述注册消息, 与应用服务器保持心跳连接; 当所接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端;
应用服务器, 用于向所述代理服务器发送数据。 本发明实施例提供的技术方案带来的有益效果是:
通过利用推送服务器或代理服务器实现应用程序保持在线的场景, 当 应用程序切换至后台运行的时候, 由所述推送服务器或代理服务器与应用 服务器进行交互, 从而使得移动终端无需与应用服务器保持心跳连接, 不 仅减小了移动终端的信令开销, 且^艮大程度上节约了移动终端能耗, 减少 网络信令的交互。 附图简要说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述 中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性 劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种接收数据的方法的流程图;
图 2是本发明实施例提供的一种接收数据的方法的流程图; 图 3是本发明实施例提供的一种接收数据的方法的流程图;
图 4是本发明实施例提供的一种接收数据的方法的流程图;
图 5是本发明实施例提供的一种移动终端的结构示意图;
图 6是本发明实施例提供的另一种移动终端的结构示意图;
图 7是本发明实施例提供的一种推送服务器的结构示意图;
图 8是本发明实施例提供的另一种推送服务器的结构示意图; 图 9是本发明实施例提供的另一种推送服务器的结构示意图; 图 10是本发明实施例提供的一种应用服务器的结构示意图;
图 11是本发明实施例提供的一种移动终端的结构示意图;
图 12是本发明实施例提供的一种移动终端的结构示意图;
图 1 3是本发明实施例提供的一种代理服务器的结构示意图;
图 14是本发明实施例提供的另一种代理服务器的结构示意图; 图 15是本发明实施例提供的另一种代理服务器的结构示意图。 实施本发明的方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发 明实施方式作进一步地详细描述。
图 1是本发明实施例提供的一种接收数据的方法的流程图。该实施例的 执行主体为移动终端, 参见图 1 , 该方法包括:
1 01、 当移动终端上的应用程序切换到后台时, 该移动终端向推送服务 器发送第一消息, 使得该推送服务器向应用服务器发送第二消息; 该第二 消息用于指示该应用服务器在有数据需要向该移动终端发送时, 将该数据 发送给该推送服务器, 该应用服务器为该应用程序服务;
在本实施例中,移动终端的应用程序切换到后台时,移动终端不再通过 心跳信令与应用服务器之间保持心跳连接, 而是通过推送服务器与应用服 务器进行交互, 由推送服务器在接收到应用服务器发送的数据时, 再将数 据发送给移动终端。
1 02、 该移动终端接收该推送服务器发送的该数据。
本实施例提供的方法,通过利用推送服务器实现应用程序保持在线的场 景, 当应用程序切换至后台运行的时候, 由所述推送服务器与应用服务器 进行交互, 从而使得移动终端无需与应用服务器保持心跳连接, 不仅减小 了移动终端的信令开销, 且^艮大程度上节约了移动终端能耗, 减少网络信 令的交互。
图 2是本发明实施例提供的一种接收数据的方法的流程图。在该实施例 中, 通信网中包括移动终端、 推送服务器和应用服务器, 本领域技术人员 可以获知, 该移动终端可以为手机、 PDA等, 推送服务器一般设置在运营商 服务器当中, 利用短信等方式进行 PUSH推送, 应用服务器是指各个应用程 序的服务器, 例如, QQ服务器、 邮件服务器等。 推送服务器可以对应多个 应用服务器, 为应用服务器提供 PUSH推送服务。 参见图 2 , 该方法包括: 201、 移动终端上的应用程序从前台运行切换到后台运行;
在本实施例中, 应用程序是指需要保持状态更新的互联网应用程序。 本领域技术人员可以获知,在应用程序的使用过程中,可以分为前台运 行和后台运行两种状态。 该后台和前台是相对桌面而言的, 应用程序在前 台即桌面上执行时可为用户感知, 而当应用程序在后台运行时, 用户是看 不到的。 前台运行和后台运行的切换可以包括以下情况的任意一种: (1 ) 前台运行的应用程序闲置超过预设时间, 则切换为后台运行, 其中, 该预 设时间为用户设置, 本发明实施例不做具体限定。 (2 )用户打开第一应用 程序后, 又打开第二应用程序, 此时, 用户可见的为第二应用程序, 第一 应用程序不可见, 则第二应用程序为前台运行, 第一应用程序为后台运行。
进一步地, 当应用程序从前台运行切换到后台运行时,释放该移动终端 与为应用程序服务的应用服务器的 IP连接。 本领域技术人员可以获知, 所 序所有的数据发送和状态同步都会利用该 IP连接。 一个移动终端可以建立 多个 IP连接, 一个应用程序可以根据需要建立 IP连接或使用已有的 IP连 接。
需要说明的是, 该释放 IP连接的步骤可以在切换发生时进行, 也可以 在切换发生后的任意步骤进行, 例如在步骤 203之后进行, 本发明实施例 不做具体限定。在本实施例中,通过将后台运行的应用程序的 IP连接释放, 可以降低网络资源的占用。
202、 移动终端保存该发生切换的应用程序的应用程序标识;
需要说明的是,移动终端上可能有多个切换至后台运行的应用程序,则 保存多个应用程序的应用程序标识, 使得在后续的步骤中区分接收到的消 息及其对应的应用程序。
在本实施例中, 应用程序的应用程序标识可以为应用 ID ( APP ID ), 还 可以为应用程序描述, 例如: QQ、 MSN等。
203、 移动终端向推送服务器发送第一消息, 该第一消息携带该移动终 端的用户标识和应用程序的应用程序标识;
移动终端的用户标识可以为移动终端在注册该应用程序时应用 良务器 为移动终端分配的标识, 该用户标识与移动终端的电话号码——对应。
需要说明的是,该第一消息还可以携带应用程序的状态信息,用于通知 推送服务器当前应用程序的状态, 推送服务器在接收到第一消息后, 维护 该应用程序的状态信息和应用程序标识的映射关系列表。
在本实施例中,该步骤 203用于将该应用程序的应用程序标识通知给推 送服务器, 使得推送服务器获知该应用程序已经从前台运行切换至后台运 行, 并且激活 Push业务。
本领域技术人员可以获知, 本实施例所述的所有推送服务器是指具有 Push功能模块的服务器, 这里所说的推送服务器不一定是一个单独的服务 器, 也可以是其他服务器的一个功能模块。 204、 推送服务器接收第一消息, 并保存应用程序的应用程序标识和移 动终端的用户标识, 根据应用程序标识向为该应用程序服务的应用服务器 发送第二消息, 以激活该应用程序的 Push业务;
推送服务器接收到应用程序标识后,根据该应用程序标识查询为该应用 程序服务的应用服务器, 并向该应用服务器发送第二消息。 该第二消息包 括移动终端的用户标识。
在本实施例中,该第二消息携带推送服务器的地址标识和移动终端的用 户标识, 用于指示应用服务器在有数据需要向移动终端发送时, 将数据发 送给推送服务器。
205、当为该应用程序服务的应用服务器有数据需要向移动终端发送时, 该应用服务器判断是否收到推送服务器发送的包含移动终端的用户标识的 第二消息,
如果是, 则执行步骤 207;
如果否, 则执行步骤 206。
本实施例中, 改变了作为应用服务器的应用服务器的工作流程,使得应 用月良务器不必和移动终端维持心跳, 而是当应用程序标识和用户标识对应 的应用程序有数据需要发送时, 只要该应用服务器已经收到了包含所述移 动终端的用户标识的第二消息, 即由应用服务器将数据发送给推送服务器。
206、 应用服务器按照现有移动终端和应用服务器间通信的流程进行数 据发送, 跳至步骤 211 ;
207、 应用服务器向推送服务器发送该数据;
本领域技术人员可以获知,应用服务器和推送服务器之间的数据交互为 现有技术, 不再赘述。
208、 当推送服务器接收到应用服务器发送的数据时, 推送服务器判断 推送服务器与移动终端之间是否有 IP连接,
如果是, 则执行步骤 209; 如果否, 则执行步骤 210;
209、推送服务器通过与移动终端间的 IP连接向移动终端发送数据,跳 至步骤 211 ;
210、 推送服务器通过无线网络的 Push机制向移动终端发送该数据; 在本实施例中, 推送月良务器可通过例如 SMS Push, WAP Push等向移动 终端发送该数据;
而在另一实施例中,为了进一步避免信令风暴,该步骤 210可以替换为: 如果该推送服务器与该移动终端之间没有 IP连接, 该推送服务器判断该数 据是否大于预设数值; 如果该数据小于预设数值, 该推送服务器通过 Push 机制将该数据发送给移动终端; 如果该数据大于或等于预设数值, 推送服 务器向移动终端发送建立 IP连接通知, 当推送服务器接收到移动终端的建 立 IP连接请求, 与移动终端建立 IP连接, 通过建立的 IP连接将数据发送 给移动终端。 推送服务器一般设置在运营商服务器当中, 利用短信等方式 进行 PUSH推送, 无需 IP连接即可传送较小的数据, 可以在不建立移动终 端和推送服务器之间的 IP连接的情况下传输数据, 进一步减小了移动终端 的信令开销, 减少了网络信令交互。
其中, 预设数值可以预先设置, 在此不再赘述。
需要说明的是, 步骤 209、 210都是推送服务器向移动终端发送消息的 过程, 在本实施例中, 推送服务器与移动终端间的 IP连接可以在切换发生 后释放, 也可以在其他步骤时释放。
211、 移动终端接收数据, 该数据携带应用程序的状态指示信息; 在本实施例中,该应用程序的指示状态信息用于指示移动终端应该在何 种状态下运行程序, 可以在应用服务器处设置。
212、 移动终端根据应用程序的状态指示信息判断是否需要将应用程序 切换到前台运行;
如果需要将应用程序切换到前台运行, 则执行步骤 213; 如果不需要将应用程序切换到前台运行, 则执行步骤 214;
213、 移动终端将应用程序切换到前台运行, 将数据提示给移动终端用 户, 结束;
在本实施例中,该数据还可以携带应用程序的移动终端状态需求,该应 用程序的移动终端状态需求用于指示移动终端是否需要在激活状态下运行 程序, 可以由技术人员在应用服务器处设置。 则当需要拉起该应用程序时, 还需对移动终端当前状态进行判断, 一方面, 当移动终端处于休眠或屏幕 关闭的状态下, 判断该移动终端状态需求是否需要在移动终端的激活状态 下实现, 如果是, 激活该移动终端, 并将该数据提示给用户; 如果否, 保 存该数据, 并当移动终端转换为激活状态时, 将该数据提示给移动终端户; 需要说明的是, 网络侧下发每一个 Push消息之后, 会收到 Push消息的传 递标志, 网络侧才艮据 Push消息的传递标志来更新移动终端的状态信息。 该 移动终端的状态信息用于指示移动终端的状态, 激活状态或出于休眠状态 或屏幕关闭的状态。 另一方面, 当移动终端处于激活状态, 则将数据提示 给用户。
214、 移动终端保存数据, 并保持应用程序的后台运行状态, 直到应用 程序切换到前台运行时, 将数据提示给移动终端用户。
在本实施例中, 移动终端根据该数据的应用程序标识保存该消息, 当 该应用程序标识所指示的应用程序从后台运行切换到前台运行时, 将数据 提示给用户, 本领域技术人员可以获知, 提示的方法可以有多种, 包括在 显示屏上弹出消息或弹出消息提示等, 本发明实施例不做具体限定。
本实施例提供的方法,通过利用推送服务器实现应用程序保持在线的场 景, 当应用程序切换至后台运行的时候, 由所述推送服务器与应用服务器 进行交互, 从而使得移动终端无需与应用服务器保持心跳连接, 不仅减小 了移动终端的信令开销, 且^艮大程度上节约了移动终端能耗, 减少网络信 令的交互。 进一步地, 对于应用程序不存在 IP连接的情况, 通过 Push机 制实现移动终端的在线功能, 使得移动终端无需周期性的向应用服务器发 起注册、 建立连接, 避免了移动终端的信令风暴。 图 3是本发明实施例提供的一种接收数据的方法的流程图。在该实施例 中, 执行主体为移动终端, 参见图 3 , 该方法包括:
301、 当移动终端上的应用程序切换到后台时, 该移动终端向代理服务 器发送注册消息, 使得该代理服务器根据该注册消息与应用服务器保持心 跳连接并接收所述应用服务器要向该移动终端下发的数据, 该应用服务器 为该应用程序服务;
其中,注册信息携带移动终端的用户标识和所述应用程序的应用程序标 识。
在本实施例中,代理服务器接收移动终端发送的注册消息,代理服务器 根据所述注册消息, 与应用服务器保持心跳连接, 当所述代理服务器接收 到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端, 从而 将移动终端与应用服务器之间的心跳连接转移到代理服务器上, 使得代理 服务器与应用服务器保持心跳连接, 一旦应用服务器有数据需要发送, 则 将数据发送给代理服务器, 并由代理服务器作为中继向移动终端进行转发。
302、 该移动终端接收该代理服务器转发的该数据。
本实施例提供的方法,通过利用代理服务器实现应用程序保持在线的场 景, 当应用程序切换至后台运行的时候, 由所述代理服务器与应用服务器 进行交互, 从而使得移动终端无需与应用服务器保持心跳连接, 不仅减小 了移动终端的信令开销, 且^艮大程度上节约了移动终端能耗, 减少网络信 令的交互。 图 4是本发明实施例提供的一种接收数据的方法的流程图。在该实施例 中, 交互方为移动终端、 代理服务器和应用服务器, 该代理服务器由运营 商设置, 与应用服务器相连并服务于应用服务器, 参见图 4 , 该方法包括:
401、 移动终端上的应用程序从前台运行切换到后台运行;
在本实施例中,移动终端获知前后台转换的方法与步骤 201相同,不做 赘述。
402、 移动终端向代理服务器发送注册消息, 该注册消息携带该移动终 端的用户标识和应用程序的注册信息;
本领域技术人员可以获知,在现有技术中,为了维持应用程序的后台运 行, 移动终端需要周期性的向应用服务器进行注册, 而本发明实施例中, 移动终端向代理服务器, 由代理服务器发送注册消息, 使得代理服务器承 载该应用程序的注册功能。 优选地, 该应用程序的注册消息携带移动终端 的用户标识和应用程序的应用程序标识, 还可以携带应用程序状态信息和 应用程序心跳频率等。
403、 代理服务器接收注册消息, 并根据该注册消息向应用程序的应用 服务器发起注册;
在本发明实施例中,代理服务器使用接收到的注册消息,周期性的向应 用程序的应用服务器发起注册, 该注册用于将移动终端与应用服务器之间 的周期性注册转移到代理服务器上, 由代理服务器与应用服务器保持心跳 连接并进行通信, 减少了移动终端的信令, 避免了信令风暴的产生。 本领 域技术人员可以获知, 代理服务器和应用服务器之间需要建立 IP连接以便 进行注册, 该建立 IP连接的具体过程为现有技术, 在此不再赘述。
404、 代理服务器注册到应用服务器, 代理服务器根据注册消息设置与 应用服务器之间的心跳频率;
需要说明的是,代理服务器可以根据注册消息中移动终端与应用服务器 之间维持的心跳频率, 设置代理服务器和应用服务器之间的心跳频率, 该 心跳频率还可以由技术人员设置, 优选地, 该代理服务器和应用服务器之 间的心跳频率高于移动终端与应用服务器之间的心跳频率。 由于代理服务 器的处理能力和带宽能力高于移动终端, 所以在此基础上可以提高数据的 实时性。
405、 代理服务器按照设置的心跳频率与应用服务器保持应用程序的心 跳功能;
本实施例中的心跳功能是指代理服务器到应用服务器,以及从应用服务 器到代理服务器之间的双向心跳功能。 其具体实现方式与现有技术中的移 动终端到应用服务器之间的双向心跳功能一致, 都是通过事件通知消息将 本地的状态更新告知对端。 代理服务器通过心跳消息获知应用服务器是否 有需要发送给移动终端的数据。
在本发明实施例中, 当移动终端上的应用程序后台运行时,释放该应用 程序的 IP连接。 通过上述步骤, 将移动终端的心跳保持和数据更新功能转 移到代理服务器上。
需要说明的是,该心跳功能可以是双向的, 由代理服务器向应用服务器 发送心跳消息, 且应用服务器也向代理服务器发送心跳消息, 代理服务器 可以根据应用服务器发送的心跳消息或应用服务器的反馈获知应用服务器 是否有数据需要发送。
在本实施例中,作为应用服务器的应用服务器与现有应用服务器的基本 功能一致, 没有进行流程上的改变。
406、 应用服务器将数据发送给代理服务器;
在本实施例中, 当应用服务器有数据需要向移动终端发送时,通过其心 跳功能将该数据先发送给代理服务器, 再由该代理服务器转发给移动终端。
407、 代理服务器接收应用服务器发送的数据, 判断需要发送的数据是 否大于预设数值;
如果是, 则执行步骤 409 ,
如果否, 则执行步骤 408;
其中,预设数值由技术人员根据***能力设置,本发明实施例不做具体 限定。
408、 代理服务器通过 Push机制将数据发送给移动终端, 结束; 在本实施例中, 代理服务器通过 Push机制使得移动终端上的该应用程 序切换至前台运行, 并将数据发送给移动终端。
进一步地, 在通过 Push机制下发数据时, 代理服务器可获取移动终端 的当前在线状态, 并将获取的在线状态报告给应用服务器, 以便应用服务 器根据该在线状态报告来更新移动终端的状态信息。
409、代理服务器向移动终端发送建立 IP连接通知, 当代理服务器接收 到移动终端的建立 IP连接请求, 与移动终端建立 IP连接, 通过建立的 IP 连接将数据发送给移动终端。
当移动终端接收数据以及根据数据运行应用程序的过程与步骤 211-214同理, 在此不再赘述。
本实施例提供的方法,通过利用代理服务器实现应用程序保持在线的场 景, 当应用程序切换至后台运行的时候, 由所述代理服务器与应用服务器 进行交互, 从而使得移动终端无需与应用服务器保持心跳连接, 不仅减小 了移动终端的信令开销, 且^艮大程度上节约了移动终端能耗, 减少网络信 令的交互。
图 5是本发明实施例提供的一种移动终端的结构示意图。 参见图 5 , 该 移动终端包括:
发送模块 501 , 用于当移动终端上的应用程序切换到后台时, 向推送服 务器发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所 述第二消息用于指示所述应用服务器在有数据需要向所述移动终端发送 时, 将所述数据发送给所述推送服务器, 所述应用服务器为所述应用程序 服务;
接收模块 502 , 用于接收所述推送服务器发送的所述数据。
其中,所述第一消息携带所述移动终端的用户标识和所述应用程序的应 用程序标识。
进一步地,所述数据携带所述应用程序的状态信息, 图 6是本发明实施 例提供的另一种移动终端的结构示意图。 参见图 6 , 所述移动终端还包括: 提示模块 503 , 用于当所述应用程序的状态信息为前台运行时, 将所述 应用程序切换至前台, 将所述数据提示给移动终端用户;
所述提示模块 503 , 还用于当所述应用程序的状态信息为后台运行时, 保存所述数据, 并保持所述应用程序的后台运行状态, 直到所述应用程序 切换到前台时, 将所述数据提示给所述移动终端用户。
进一步地, 所述移动终端还包括:
释放模块 504 , 用于当移动终端上的应用程序切换到后台时, 释放所述 移动终端与为所述应用程序服务的应用服务器的 IP连接。
图 7是本发明实施例提供的一种推送服务器的结构示意图。 参见图 7 , 该推送服务器包括:
接收模块 701 , 用于接收移动终端发送的第一消息;
发送模块 702 , 用于根据第一消息, 向应用服务器发送第二消息, 所述 第二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所述数据发送给所述推送服务器;
所述发送模块 702 , 还用于当接收到所述应用服务器发送的数据时, 将 所述数据发送给所述移动终端。
其中,所述第一消息携带移动终端的用户标识和所述应用程序的应用程 序标识。
图 8是本发明实施例提供的另一种推送服务器的结构示意图。参见图 8 , 该推送服务器包括: 接收模块 701和发送模块 702 ,
进一步地, 该推送服务器还包括:
第一判断模块 703 , 用于判断与所述移动终端之间是否有 IP连接; 所述发送模块 702 ,还用于当所述第一判断模块确定与所述移动终端之 间有 IP连接, 通过与所述移动终端间的 IP连接向所述移动终端发送所述 数据。
所述发送模块 702 还用于当所述第一判断模块确定与所述移动终端之 间没有 IP连接, 向所述移动终端发送建立 IP连接通知,
建立模块 704 , 用于当所述接收模块接收到所述移动终端的建立 IP连 接请求时, 与所述移动终端建立 IP连接;
所述发送模块 702 , 还用于通过建立的 IP连接将数据发送给所述移动 终端。
图 9是本发明实施例提供的另一种推送服务器的结构示意图。参见图 9 , 该推送服务器包括: 接收模块 702、 发送模块 702和第一判断模块 703 , 进一步地, 该推送服务器还包括:
第二判断模块 705 ,用于当所述第一判断模块 703确定与所述移动终端 之间没有 IP连接时, 判断所述数据是否大于预设数值;
所述发送模块 702 ,还用于如果所述第二判断模块 705确定所述数据小 于预设数值, 通过 Push机制将所述数据发送给移动终端;
所述发送模块 702 ,还用于如果所述第二判断模块 705确定所述数据大 于预设数值, 向所述移动终端发送建立 IP连接通知;
建立模块 704 , 用于当所述接收模块接收到所述移动终端的建立 IP请 求时, 与所述移动终端建立 IP连接;
所述发送模块 702 , 还用于通过建立的 IP连接将数据发送给所述移动 终端。
本实施例提供的推送服务器,与方法实施例属于同一构思,其具体实现 过程详见方法实施例, 这里不再赘述。
图 10是本发明实施例提供的一种应用服务器的结构示意图。参见图 10, 该应用服务器包括:
接收模块 1001 , 用于接收推送服务器发送的第二消息; 发送模块 1002 , 用于当所述用户标识和应用程序标识指示的应用程序 有数据需要向所述移动终端发送时, 根据所述第二消息将所述数据发送给 所述推送服务器, 使得所述推送服务器接收到所述数据后, 将所述数据发 送给所述移动终端。
其中, 所述第二消息携带所述移动终端的用户标识。
本实施例提供的应用服务器,与方法实施例属于同一构思,其具体实现 过程详见方法实施例, 这里不再赘述。
本发明实施例提供的一种网络***,, 所述网络***包括:
上述任一项移动终端,用于当移动终端上的应用程序切换到后台时, 向 推送服务器发送第一消息, 使得所述推送服务器向应用服务器发送第二消 息; 所述第二消息用于指示所述应用服务器在有数据需要向所述移动终端 发送时, 将所述数据发送给所述推送服务器, 所述应用服务器为所述应用 程序服务; 接收所述推送服务器发送的所述数据;
上述任一项推送服务器,用于接收移动终端发送的第一消息;根据第一 消息, 向应用服务器发送第二消息, 所述第二消息用于指示所述应用服务 器在有数据需要向所述移动终端发送时, 将所述数据发送给所述推送服务 器; 当接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动 终端;
上述任一项应用服务器,用于接收推送服务器发送的第二消息; 当所述 用户标识和应用程序标识指示的应用程序有数据需要向所述移动终端发送 时, 根据所述第二消息将所述数据发送给所述推送服务器, 使得所述推送 服务器接收到所述数据后, 将所述数据发送给所述移动终端。
图 11是本发明实施例提供的一种移动终端的结构示意图。 参见图 11 , 该移动终端包括:
发送模块 1101 , 用于当移动终端上的应用程序切换到后台时, 所向代 理服务器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服 务器保持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所 述应用服务器为所述应用程序服务;
接收模块 1102 , 用于接收所述代理服务器转发的所述数据。
其中,所述注册消息携带所述移动终端的用户标识和所述应用程序的应 用程序标识。
所述数据携带所述应用程序的状态信息, 相应地, 参见图 12 , 所述移 动终端包括:
提示模块 1103 , 用于当所述应用程序的状态信息为前台运行时, 将所 述应用程序切换至前台, 将所述数据提示给移动终端用户;
所述提示模块 1103 ,还用于当所述应用程序的状态信息为后台运行时, 保存所述数据, 并保持所述应用程序的后台运行状态, 直到所述应用程序 切换到前台时, 将所述数据提示给所述移动终端用户。 图 1 3是本发明实施例提供的一种代理服务器的结构示意图。参见图 1 3 , 该代理服务器包括:
接收模块 1 301 , 用于接收移动终端发送的注册消息;
心跳模块 1 302 , 用于根据所述注册消息, 与应用服务器保持心跳连接; 发送模块 1 303 , 用于当所接收到所述应用服务器发送的数据时, 将所 述数据发送给所述移动终端。
其中,所述注册消息携带移动终端的用户标识和所述应用程序的应用程 序标识。
所述心跳模块 1 302包括:
注册单元, 用于根据所述注册信息, 注册到所述应用服务器; 心跳单元, 用于与所述应用服务器保持所述应用程序的心跳连接。 图 14是本发明实施例提供的另一种代理服务器的结构示意图。 参见图 14 , 该代理服务器包括: 接收模块 1301、 心跳模块 1302和发送模块 1303 , 所述代理服务器还包括:
第三判断模块 1304 , 用于当接收到所述应用服务器发送的数据时, 判 断所述代理服务器与所述移动终端之间是否有 IP连接;
所述发送模块 1303 , 还用于如果所述第三判断模块所述代理服务器与 所述移动终端之间有 IP连接, 通过与所述移动终端间的 IP连接向所述移 动终端发送所述数据。
所述发送模块 1303 , 还用于如果所述第三判断模块确定所述代理服务 器与所述移动终端之间没有 IP连接, 向所述移动终端发送建立 IP连接通 知;
所述代理服务器还包括:
建立模块 1305 ,用于当所述接收模块接收到所述移动终端的建立 IP请 求时, 与所述移动终端建立 IP连接;
所述发送模块 1303 ,还用于通过建立的 IP连接将数据发送给所述移动 终端。
图 15是本发明实施例提供的另一种代理服务器的结构示意图。 参见图
15 , 该代理服务器包括: 接收模块 1301、 心跳模块 1302、 发送模块 1303 和第三判断模块 1304 ,
第四判断模块 1306 ,用于如果所述第三判断模块 1304确定所述代理服 务器与所述移动终端之间没有 IP连接, 判断所述数据是否大于预设数值; 所述发送模块 1303 , 用于如果所述第四判断模块确定所述数据小于预 设数值, 所述代理服务器通过 Push机制将所述数据发送给移动终端;
所述发送模块 1303 , 用于如果所述第四判断模块确定如果所述数据大 于或等于预设数值, 向所述移动终端发送建立 IP连接通知;
建立模块 1305 ,用于当所述接收模块接收到所述移动终端的建立 IP请 求时, 与所述移动终端建立 IP连接; 所述发送模块 1303 ,还用于通过建立的 IP连接将数据发送给所述移动 终端。
本实施例提供的代理服务器,与方法实施例属于同一构思,其具体实现 过程详见方法实施例, 这里不再赘述。
本发明实施例提供了一种网络***, 所述网络***包括:
移动终端,用于当移动终端上的应用程序切换到后台时,所向代理服务 器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器保 持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应用 服务器为所述应用程序服务; 接收所述代理服务器转发的所述数据;
代理服务器, 用于接收移动终端发送的注册消息; 根据所述注册消息, 与应用服务器保持心跳连接; 当所接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端;
应用服务器, 用于向所述代理服务器发送数据。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以 通过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可 以存储于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存 储器, 磁盘或光盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的 精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发 明的保护范围之内。

Claims

权利要求
1、 一种接收数据的方法, 其特征在于, 所述方法包括:
当移动终端上的应用程序切换到后台时,所述移动终端向推送服务器发 送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述第二 消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所 述数据发送给所述推送服务器, 所述应用服务器为所述应用程序服务; 所述移动终端接收所述推送服务器发送的所述数据。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一消息携带所述 移动终端的用户标识和所述应用程序的应用程序标识。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述数据携带所述 应用程序的状态信息, 相应地, 所述移动终端接收所述推送服务器发送的 数据, 之后包括:
当所述应用程序的状态信息为前台运行时,所述移动终端将所述应用程 序切换至前台, 将所述数据提示给移动终端用户;
当所述应用程序的状态信息为后台运行时, 所述移动终端保存所述数 据, 并保持所述应用程序的后台运行状态, 直到所述应用程序切换到前台 时, 将所述数据提示给所述移动终端用户。
4、 根据权利要求 1-3任一项所述的方法, 其特征在于, 所述方法还包 括:
当移动终端上的应用程序切换到后台时,释放所述移动终端与为所述应 用程序服务的应用服务器的 IP连接。
5、 一种发送数据的方法, 其特征在于, 所述方法包括: 推送服务器接收移动终端发送的第一消息;
所述推送服务器根据第一消息, 向应用服务器发送第二消息,所述第二 消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所 述数据发送给所述推送服务器;
当所述推送服务器接收到所述应用服务器发送的数据时,将所述数据发 送给所述移动终端。
6、 根据权利要求 5所述的方法, 其特征在于, 所述第一消息携带移动 终端的用户标识和所述应用程序的应用程序标识。
7、 根据权利要求 5或 6所述的方法, 其特征在于, 当所述推送服务器 接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端, 包括:
当所述推送服务器接收到所述应用服务器发送的数据时,判断所述推送 服务器与所述移动终端之间是否有 IP连接;
如果所述推送服务器与所述移动终端之间有 IP连接, 通过与所述移动 终端间的 IP连接向所述移动终端发送所述数据。
8、 根据权利要求 7所述的方法, 其特征在于, 所述推送服务器接收所 述应用服务器发送的数据, 并将所述数据发送给所述移动终端, 还包括: 如果所述推送服务器与所述移动终端之间没有 IP连接, 所述推送服务 器通知所述移动终端建立与所述推送服务器之间的 IP连接, 通过所述 IP 连接将数据发送给所述移动终端;
或,
如果所述推送服务器与所述移动终端之间没有 IP连接, 所述推送服务 器判断所述数据是否大于预设数值; 如果所述数据小于预设数值, 所述推 送服务器通过 Push机制将所述数据发送给移动终端; 如果所述数据大于或 等于预设数值, 所述推送服务器通知所述移动终端建立与所述推送服务器 之间的 IP连接, 通过所述 IP连接将数据发送给所述移动终端。
9、 一种发送数据的方法, 其特征在于, 包括:
应用服务器接收推送服务器发送的第二消息;
当有数据需要向所述移动终端发送时,所述应用服务器根据所述第二消 息将所述数据发送给所述推送服务器, 使得所述推送服务器接收到所述数 据后, 将所述数据发送给所述移动终端。
10、根据权利要求 9所述的方法, 其特征在于, 所述第二消息携带所述 移动终端的用户标识。
11、 一种移动终端, 其特征在于, 包括:
发送模块,用于当移动终端上的应用程序切换到后台时, 向推送服务器 发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述第 二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将 所述数据发送给所述推送服务器, 所述应用服务器为所述应用程序服务; 接收模块, 用于接收所述推送服务器发送的所述数据。
12、 根据权利要求 11所述的移动终端, 其特征在于, 所述第一消息携 带所述移动终端的用户标识和所述应用程序的应用程序标识。
13、根据权利要求 11或 12所述的移动终端, 其特征在于, 所述数据携 带所述应用程序的状态信息, 所述移动终端还包括:
提示模块,用于当所述应用程序的状态信息为前台运行时,将所述应用 程序切换至前台 , 将所述数据提示给移动终端用户;
所述提示模块,还用于当所述应用程序的状态信息为后台运行时,保存 所述数据, 并保持所述应用程序的后台运行状态, 直到所述应用程序切换 到前台时, 将所述数据提示给所述移动终端用户。
14、根据权利要求 11-13任一项所述的移动终端, 其特征在于, 所述移 动终端还包括:
释放模块,用于当移动终端上的应用程序切换到后台时,释放所述移动 终端与为所述应用程序服务的应用服务器的 IP连接。
15、 一种推送服务器, 其特征在于, 所述服务器包括:
接收模块, 用于接收移动终端发送的第一消息;
发送模块, 用于根据第一消息, 向应用服务器发送第二消息, 所述第二 消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将所 述数据发送给所述推送服务器;
所述发送模块,还用于当接收到所述应用服务器发送的数据时,将所述 数据发送给所述移动终端。
16、 根据权利要求 15所述的推送服务器, 其特征在于, 所述第一消息 携带移动终端的用户标识和所述应用程序的应用程序标识。
17、根据权利要求 15或 16所述的推送服务器, 其特征在于, 所述推送 服务器包括:
第一判断模块, 用于判断与所述移动终端之间是否有 IP连接; 所述发送模块,还用于当所述第一判断模块确定与所述移动终端之间有 IP连接, 通过与所述移动终端间的 IP连接向所述移动终端发送所述数据。
18、 根据权利要求 17所述的推送服务器, 其特征在于, 所述发送模块还用于当所述第一判断模块确定与所述移动终端之间没 有 IP连接, 向所述移动终端发送建立 IP连接通知,
所述推送服务器还包括:
建立模块, 用于当所述接收模块接收到所述移动终端的建立 IP连接请 求时, 与所述移动终端建立 IP连接;
所述发送模块,还用于通过建立的 IP连接将数据发送给所述移动终端。
19、 根据权利要求 17所述的推送服务器, 其特征在于, 所述推送服务 器还包括:
第二判断模块,用于当所述第一判断模块确定与所述移动终端之间没有 IP连接时, 判断所述数据是否大于预设数值;
建立模块,用于当所述接收模块接收到所述移动终端的建立 IP请求时, 与所述移动终端建立 IP连接;
所述发送模块,还用于如果所述第二判断模块确定所述数据小于预设数 值, 通过 Push机制将所述数据发送给移动终端;
所述发送模块,还用于如果所述第二判断模块确定所述数据大于预设数 值, 向所述移动终端发送建立 IP连接通知;
建立模块,用于当所述接收模块接收到所述移动终端的建立 IP请求时, 与所述移动终端建立 IP连接;
所述发送模块,还用于通过建立的 IP连接将数据发送给所述移动终端。
20、 一种应用服务器, 其特征在于, 包括:
接收模块, 用于接收推送服务器发送的第二消息;
发送模块,用于当所述用户标识和应用程序标识指示的应用程序有数据 需要向所述移动终端发送时, 根据所述第二消息将所述数据发送给所述推 送服务器, 使得所述推送服务器接收到所述数据后, 将所述数据发送给所 述移动终端。
21、 根据权利要求 20所述的应用服务器, 其特征在于, 所述第二消息 携带所述移动终端的用户标识。
22、 一种网络***, 其特征在于, 所述网络***包括:
移动终端,用于当移动终端上的应用程序切换到后台时, 向推送服务器 发送第一消息, 使得所述推送服务器向应用服务器发送第二消息; 所述第 二消息用于指示所述应用服务器在有数据需要向所述移动终端发送时, 将 所述数据发送给所述推送服务器, 所述应用服务器为所述应用程序服务; 接收所述推送服务器发送的所述数据;
推送服务器, 用于接收移动终端发送的第一消息; 根据第一消息, 向应 用服务器发送第二消息, 所述第二消息用于指示所述应用服务器在有数据 需要向所述移动终端发送时, 将所述数据发送给所述推送服务器; 当接收 到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端;
应用服务器,用于接收推送服务器发送的第二消息; 当所述用户标识和 应用程序标识指示的应用程序有数据需要向所述移动终端发送时, 根据所 述第二消息将所述数据发送给所述推送服务器, 使得所述推送服务器接收 到所述数据后, 将所述数据发送给所述移动终端。
23、 一种接收数据的方法, 其特征在于, 所述方法包括:
当移动终端上的应用程序切换到后台时,所述移动终端向代理服务器发 送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器保持心 跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应用服务 器为所述应用程序服务;
所述移动终端接收所述代理服务器转发的所述数据。
24、 根据权利要求 23所述的方法, 其特征在于, 所述注册消息携带所 述移动终端的用户标识和所述应用程序的应用程序标识。
25、根据权利要求 23或 24所述的方法, 其特征在于, 所述数据携带所 述应用程序的状态信息, 相应地, 所述移动终端接收所述代理服务器发送 的所述数据, 之后包括:
当所述应用程序的状态信息为前台运行时,所述移动终端将所述应用程 序切换至前台, 将所述数据提示给移动终端用户;
当所述应用程序的状态信息为后台运行时, 所述移动终端保存所述数 据, 并保持所述应用程序的后台运行状态, 直到所述应用程序切换到前台 时, 将所述数据提示给所述移动终端用户。
26、 一种发送数据的方法, 其特征在于, 所述方法包括:
代理服务器接收移动终端发送的注册消息;
所述代理服务器根据所述注册消息, 与应用服务器保持心跳连接; 当所述代理服务器接收到所述应用服务器发送的数据时,将所述数据发 送给所述移动终端。
27、 根据权利要求 26所述的方法, 其特征在于, 所述注册消息携带所 述移动终端的用户标识和所述应用程序的应用程序标识。
28、 根据权利要求 26或 27所述的方法, 其特征在于, 所述代理服务 器根据所述注册消息, 与应用服务器保持心跳连接, 具体包括: 所述代理服务器根据所述注册信息,注册到所述应用服务器,与所述应 用服务器保持所述应用程序的心跳连接。
29、根据权利要求 26-28任一项所述的方法, 其特征在于, 当所述代理 服务器接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动 终端, 具体包括:
当所述代理服务器接收到所述应用服务器发送的数据时,判断所述代理 服务器与所述移动终端之间是否有 IP连接;
如果所述代理服务器与所述移动终端之间有 IP连接, 通过与所述移动 终端间的 IP连接向所述移动终端发送所述数据。
30、 根据权利要求 29所述的方法, 其特征在于, 当所述代理服务器接 收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端, 还 包括:
如果所述代理服务器与所述移动终端之间没有 IP连接, 所述代理服务 器通知所述移动终端建立与所述代理服务器之间的 IP连接, 通过所述 IP 连接将数据发送给所述移动终端;
或,
如果所述代理服务器与所述移动终端之间没有 IP连接, 所述代理服务 器判断所述数据是否大于预设数值; 如果所述数据小于预设数值, 所述代 理服务器通过 Push机制将所述数据发送给移动终端; 如果所述数据大于或 等于预设数值, 所述代理服务器通知所述移动终端建立与所述代理服务器 之间的 IP连接, 通过所述 IP连接将数据发送给所述移动终端。
31、 一种移动终端, 其特征在于, 包括:
发送模块,用于当移动终端上的应用程序切换到后台时,所向代理服务 器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器保 持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应用 服务器为所述应用程序服务;
接收模块, 用于接收所述代理服务器转发的所述数据。
32、 根据权利要求 31所述的移动终端, 其特征在于, 所述注册消息携 带所述移动终端的用户标识和所述应用程序的应用程序标识。
33、根据权利要求 31或 32所述的移动终端, 其特征在于, 所述数据携 带所述应用程序的状态信息, 相应地, 所述移动终端包括:
提示模块,用于当所述应用程序的状态信息为前台运行时,将所述应用 程序切换至前台, 将所述数据提示给移动终端用户;
所述提示模块,还用于当所述应用程序的状态信息为后台运行时,保存 所述数据, 并保持所述应用程序的后台运行状态, 直到所述应用程序切换 到前台时, 将所述数据提示给所述移动终端用户。
34、 一种代理服务器, 其特征在于, 包括:
接收模块, 用于接收移动终端发送的注册消息;
心跳模块, 用于根据所述注册消息, 与应用服务器保持心跳连接; 发送模块,用于当所接收到所述应用服务器发送的数据时,将所述数据 发送给所述移动终端。
35、 根据权利要求 34所述的代理服务器, 其特征在于, 所述注册消息 携带移动终端的用户标识和所述应用程序的应用程序标识。
36、 根据权利要求 34或 35所述的代理服务器, 其特征在于, 所述心 跳模块包括:
注册单元, 用于根据所述注册信息, 注册到所述应用服务器; 心跳单元, 用于与所述应用服务器保持所述应用程序的心跳连接。
37、根据权利要求 34-36任一项所述的代理服务器, 其特征在于, 所述 代理服务器还包括:
第三判断模块,用于当接收到所述应用服务器发送的数据时,判断所述 代理服务器与所述移动终端之间是否有 IP连接;
所述发送模块,还用于如果所述第三判断模块所述代理服务器与所述移 动终端之间有 IP连接, 通过与所述移动终端间的 IP连接向所述移动终端 发送所述数据。
38、 根据权利要求 37所述的代理服务器, 其特征在于,
所述发送模块,还用于如果所述第三判断模块确定所述代理服务器与所 述移动终端之间没有 IP连接, 向所述移动终端发送建立 IP连接通知; 所述代理服务器还包括:
建立模块,用于当所述接收模块接收到所述移动终端的建立 IP请求时, 与所述移动终端建立 IP连接;
所述发送模块,还用于通过建立的 IP连接将数据发送给所述移动终端。
39、 根据权利要求 37所述的代理服务器, 其特征在于,
第四判断模块,用于如果所述第三判断模块确定所述代理服务器与所述 移动终端之间没有 IP连接, 判断所述数据是否大于预设数值;
所述发送模块, 用于如果所述第四判断模块确定所述数据小于预设数 值, 所述代理服务器通过 Push机制将所述数据发送给移动终端;
所述发送模块,用于如果所述第四判断模块确定如果所述数据大于或等 于预设数值, 向所述移动终端发送建立 IP连接通知;
建立模块,用于当所述接收模块接收到所述移动终端的建立 IP请求时, 与所述移动终端建立 IP连接;
所述发送模块,还用于通过建立的 IP连接将数据发送给所述移动终端。
40、 一种网络***, 其特征在于, 所述网络***包括:
移动终端,用于当移动终端上的应用程序切换到后台时,所向代理服务 器发送注册消息, 使得所述代理服务器根据所述注册消息与应用服务器保 持心跳连接并接收所述应用服务器要向该移动终端下发的数据, 所述应用 服务器为所述应用程序服务; 接收所述代理服务器转发的所述数据;
代理服务器, 用于接收移动终端发送的注册消息; 根据所述注册消息, 与应用服务器保持心跳连接; 当所接收到所述应用服务器发送的数据时, 将所述数据发送给所述移动终端;
应用服务器, 用于向所述代理服务器发送数据。
PCT/CN2012/079101 2011-12-27 2012-07-24 接收数据的方法、发送数据的方法、移动终端和服务器 WO2013097452A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12861348.6A EP2713641B1 (en) 2011-12-27 2012-07-24 Method for receiving data, method for transmitting data, mobile terminal, and server
US14/145,496 US9712632B2 (en) 2011-12-27 2013-12-31 Method for receiving data, method for sending data, mobile terminal, and server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110444013.4A CN103188653B (zh) 2011-12-27 2011-12-27 接收数据的方法、发送数据的方法、移动终端和服务器
CN201110444013.4 2011-12-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/145,496 Continuation US9712632B2 (en) 2011-12-27 2013-12-31 Method for receiving data, method for sending data, mobile terminal, and server

Publications (1)

Publication Number Publication Date
WO2013097452A1 true WO2013097452A1 (zh) 2013-07-04

Family

ID=48679541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/079101 WO2013097452A1 (zh) 2011-12-27 2012-07-24 接收数据的方法、发送数据的方法、移动终端和服务器

Country Status (4)

Country Link
US (1) US9712632B2 (zh)
EP (1) EP2713641B1 (zh)
CN (1) CN103188653B (zh)
WO (1) WO2013097452A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2654539C2 (ru) * 2014-01-08 2018-05-21 Хуавэй Текнолоджиз Ко., Лтд. Система и способ постоянных соединений в системе беспроводной связи
EP3086577B1 (en) 2013-12-20 2020-07-01 Samsung Electronics Co., Ltd. Method and device for event notification in home network system

Families Citing this family (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11290912B2 (en) 2011-12-14 2022-03-29 Seven Networks, Llc Mobile device configured for operating in a power save mode and a traffic optimization mode and related method
CN104349288B (zh) * 2013-07-25 2020-04-07 腾讯科技(深圳)有限公司 一种消息传输方法及装置
CN109831492B (zh) * 2013-08-14 2021-06-22 华为技术有限公司 访问ott应用、服务器推送消息的方法及装置
CN104468649B (zh) * 2013-09-16 2018-06-05 北大方正集团有限公司 服务器、终端、数据推送***和数据推送方法
CN103501486B (zh) * 2013-09-29 2016-09-28 华为软件技术有限公司 一种消息推送方法及推送服务器
CN103501305A (zh) * 2013-10-14 2014-01-08 中国联合网络通信集团有限公司 互联网业务的实现方法、应用服务器和呼叫代理服务器
CN104579813B (zh) * 2013-10-29 2018-09-07 华为终端(东莞)有限公司 检测方法及终端
KR102148948B1 (ko) * 2013-12-06 2020-08-27 삼성전자주식회사 전자 장치의 멀티 태스킹 방법 및 그 전자 장치
CN103634322B (zh) * 2013-12-06 2017-01-11 中国联合网络通信集团有限公司 一种应用程序的心跳管理方法、装置及***
CN103686693B (zh) * 2013-12-11 2017-02-15 中国联合网络通信集团有限公司 应用状态递送方法和***
CN103746994A (zh) * 2014-01-07 2014-04-23 广东电网公司信息中心 一种用于移动智能终端的数据获取方法及其高级应用***
CN106662963B (zh) 2014-05-19 2020-12-08 三星电子株式会社 用于管理安装在移动通信终端中的应用程序包的方法及装置
WO2015179817A1 (en) * 2014-05-23 2015-11-26 Osix Corporation Computer-implemented methods, computer readable media, and systems for initiating co-use of applications
US9473912B2 (en) 2014-05-30 2016-10-18 Apple Inc. SMS proxying
US9654581B2 (en) * 2014-05-30 2017-05-16 Apple Inc. Proxied push
CN104065661B (zh) * 2014-06-27 2017-07-28 北京思特奇信息技术股份有限公司 一种降低移动互联网ott业务网络资源消耗的方法及***
CN105446803A (zh) * 2014-08-18 2016-03-30 阿里巴巴集团控股有限公司 一种应用程序管理方法和装置
CN105392187A (zh) * 2014-09-04 2016-03-09 中兴通讯股份有限公司 一种即时通讯应用程序管理方法、装置及其移动终端
CN105578440B (zh) * 2014-10-13 2019-06-25 ***通信集团公司 Lte***中的即时通讯业务心跳包的传输方法及装置
CN104486443B (zh) * 2014-12-24 2017-12-12 上海心动企业发展有限公司 消息推送***及其方法
WO2016129863A1 (en) 2015-02-12 2016-08-18 Samsung Electronics Co., Ltd. Payment processing method and electronic device supporting the same
US10193700B2 (en) 2015-02-27 2019-01-29 Samsung Electronics Co., Ltd. Trust-zone-based end-to-end security
CN105930040A (zh) * 2015-02-27 2016-09-07 三星电子株式会社 包含电子支付***的电子装置及其操作方法
WO2016137277A1 (en) 2015-02-27 2016-09-01 Samsung Electronics Co., Ltd. Electronic device providing electronic payment function and operating method thereof
KR102460459B1 (ko) 2015-02-27 2022-10-28 삼성전자주식회사 전자 장치를 이용한 카드 서비스 방법 및 장치
CN107408251B (zh) * 2015-02-27 2022-01-25 三星电子株式会社 提供电子支付功能的电子设备及其操作方法
CN104836920B (zh) * 2015-06-08 2017-04-26 浙江每日互动网络科技股份有限公司 一种基于服务器端进行移动终端应用间交叉唤醒的方法及***
BR122017025025A2 (pt) * 2015-06-30 2019-09-10 Huawei Tech Co Ltd métodos para interação entre um terminal e um dispositivo de rede, terminais e programa
CN105120495B (zh) * 2015-09-09 2018-10-02 北京京东尚科信息技术有限公司 一种智能移动终端的消息推送方法及***
KR102576420B1 (ko) * 2016-01-15 2023-09-08 삼성전자 주식회사 결제 수단의 인디케이션을 표시하는 방법 및 장치
US10225359B2 (en) 2016-09-22 2019-03-05 International Business Machines Corporation Push notifications from multiple tenant servers
US10715510B2 (en) * 2017-01-16 2020-07-14 Citrix Systems, Inc. Secure device notifications from remote applications
CN106941713A (zh) * 2017-05-16 2017-07-11 努比亚技术有限公司 一种降低移动终端功耗的方法及其装置
CN107484232A (zh) * 2017-08-21 2017-12-15 奇酷互联网络科技(深圳)有限公司 消息发送方法、***、网络设备和可读存储介质
US20210360418A1 (en) * 2018-09-07 2021-11-18 Nokia Solutions And Networks Oy Flexible usage data collection for environmental sensing capability in a shared spectrum
CN111130951B (zh) * 2019-12-31 2022-08-23 中消云(北京)物联网科技研究院有限公司 设备状态检测方法、装置及存储介质
CN111667615A (zh) * 2020-05-20 2020-09-15 惠州拓邦电气技术有限公司 智能锁无线下行数据提醒方法、装置、终端及存储介质
CN113765948B (zh) * 2020-06-02 2022-12-27 华为技术有限公司 长连接装置和网络***
CN113825123A (zh) * 2020-06-19 2021-12-21 阿里巴巴集团控股有限公司 通信方法、装置、电子设备及计算机存储介质
CN115314531B (zh) * 2022-06-30 2024-05-17 中国第一汽车股份有限公司 信息处理方法、装置及车辆

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585372A (zh) * 2004-05-25 2005-02-23 ***通信集团公司 从信息***向移动终端推送信息的方法及***
CN1705268A (zh) * 2004-05-31 2005-12-07 卡米尔资讯股份有限公司 将信息透过持续性tcp联机推送至移动终端的方法
CN102209302A (zh) * 2011-07-07 2011-10-05 深圳市金立通信设备有限公司 一种实现移动终端信息推送的***及方法

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001202310A (ja) * 2000-01-20 2001-07-27 Square Co Ltd 情報提供方法およびその方法を実現するためのプログラムを記録した記録媒体、ならびに、情報提供システム
JP4073819B2 (ja) * 2003-04-10 2008-04-09 エボリウム・エス・アー・エス 携帯電話への動画情報のプッシュ型配信方法
US20070197196A1 (en) * 2006-02-22 2007-08-23 Michael Shenfield Apparatus, and associated method, for facilitating delivery and processing of push content
US8045236B2 (en) * 2006-03-29 2011-10-25 Research In Motion Limited Apparatus, and associated method, for facilitating background processing of push content
ATE479243T1 (de) * 2006-03-29 2010-09-15 Research In Motion Ltd VORRICHTUNG UND ZUGEORDNETES VERFAHREN ZUR ERLEICHTERUNG DER HINTERGRUNDVERARBEITUNG VON ßPUSHß-INHALT
US8099764B2 (en) * 2007-12-17 2012-01-17 Microsoft Corporation Secure push and status communication between client and server
US20090252072A1 (en) * 2008-04-08 2009-10-08 Telefonaktiebolaget Lm Ericsson (Publ) Method and Apparatus for Maintaining Long-Lived Connections Between a Mobile Client and a Server
US8763089B2 (en) * 2010-01-12 2014-06-24 Microsoft Corporation Flexible authentication and authorization mechanism
WO2012061430A2 (en) * 2010-11-01 2012-05-10 Michael Luna Distributed management of keep-alive message signaling for mobile network resource conservation and optimization
CN102158802B (zh) * 2011-02-15 2015-02-18 广州市动景计算机科技有限公司 信息投放方法及装置
US20130159511A1 (en) * 2011-12-14 2013-06-20 Seven Networks, Inc. System and method for generating a report to a network operator by distributing aggregation of data
KR102036579B1 (ko) * 2012-11-09 2019-10-28 삼성전자주식회사 무선 통신 시스템에서 웹 서비스 제공 방법 및 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585372A (zh) * 2004-05-25 2005-02-23 ***通信集团公司 从信息***向移动终端推送信息的方法及***
CN1705268A (zh) * 2004-05-31 2005-12-07 卡米尔资讯股份有限公司 将信息透过持续性tcp联机推送至移动终端的方法
CN102209302A (zh) * 2011-07-07 2011-10-05 深圳市金立通信设备有限公司 一种实现移动终端信息推送的***及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2713641A4 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3086577B1 (en) 2013-12-20 2020-07-01 Samsung Electronics Co., Ltd. Method and device for event notification in home network system
EP3739911B1 (en) 2013-12-20 2022-02-02 Samsung Electronics Co., Ltd. Method and device for event notification in home network system
US11516041B2 (en) 2013-12-20 2022-11-29 Samsung Electronics Co., Ltd. Method and device for event notification in home network system
RU2654539C2 (ru) * 2014-01-08 2018-05-21 Хуавэй Текнолоджиз Ко., Лтд. Система и способ постоянных соединений в системе беспроводной связи
US11012940B2 (en) 2014-01-08 2021-05-18 Huawei Technologies Co., Ltd. System and method for always on connections in wireless communications system
US11012939B2 (en) 2014-01-08 2021-05-18 Huawei Technologies Co., Ltd. System and method for always on connections in wireless communications system
US11019570B2 (en) 2014-01-08 2021-05-25 Huawei Technologies Co., Ltd. System and method for always on connections in wireless communications system
US11259246B2 (en) 2014-01-08 2022-02-22 Huawei Technologies Co., Ltd. System and method for always on connections in wireless communications system

Also Published As

Publication number Publication date
EP2713641A1 (en) 2014-04-02
US20140115125A1 (en) 2014-04-24
EP2713641B1 (en) 2017-09-20
EP2713641A4 (en) 2014-10-01
CN103188653B (zh) 2016-06-08
CN103188653A (zh) 2013-07-03
US9712632B2 (en) 2017-07-18

Similar Documents

Publication Publication Date Title
WO2013097452A1 (zh) 接收数据的方法、发送数据的方法、移动终端和服务器
CN102395119B (zh) 一种支持应用客户端永久在线的方法、***及装置
CN103748934B (zh) 用于确定传送频率以维持远程应用服务器连通性的***和方法
CN104813637A (zh) 移动网络中的没有持久性tcp连接情况下的推送服务
EP2637365B1 (en) Method for controlling internet services, and relevant device and system
US20150019723A1 (en) Method and apparatus for processing messages
KR101637601B1 (ko) 모바일 메시지 수신 장치 및 방법
CN103312766B (zh) 一种支持应用客户端永久在线的方法、***及装置
CN103297470B (zh) 永远在线业务的处理方法、应用服务器、用户终端和***
WO2011150707A1 (zh) 一种m2m业务中终端状态或事件管理的方法及***
CN106686056A (zh) 一种安卓客户端通信装置及与服务器进行连接通信的方法
WO2021057526A1 (zh) 一种网关设备容灾的方法及通信设备
CN108781217A (zh) 多媒体数据传输的方法、服务器和终端
KR20070026682A (ko) 네트워크 장치들 사이의 데이터 전송방법
JP7373679B2 (ja) Wi-Fi制御方法、装置及び電子機器
US10097593B2 (en) Method and system for universal chat gateways
WO2010051739A1 (zh) 一种移动即时通讯的方法和装置
TW201101886A (en) Methods and apparatus for providing emergency alerts in a communication network
EP2949083A1 (en) Receiving a communication event
CN103781124A (zh) 一种上行数据传输方法及用户设备
TWI674806B (zh) 訊息推送系統、客戶設備及其訊息推送方法
CN114553936A (zh) 连接方法、装置、电子设备和计算机可读存储介质
CN105681436A (zh) 控制端与物联网设备之间基于alljoyn协议的通信方法
CN108270756B (zh) 一种设备间通信的方法及***
KR101975507B1 (ko) 푸시 기반의 영상통화에서의 그룹 내 사용자 전환을 수행하는 연결관리서버 및 연결관리방법

Legal Events

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

Ref document number: 12861348

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2012861348

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2012861348

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE