WO2015100662A1 - Data processing method, device and system - Google Patents

Data processing method, device and system Download PDF

Info

Publication number
WO2015100662A1
WO2015100662A1 PCT/CN2013/091212 CN2013091212W WO2015100662A1 WO 2015100662 A1 WO2015100662 A1 WO 2015100662A1 CN 2013091212 W CN2013091212 W CN 2013091212W WO 2015100662 A1 WO2015100662 A1 WO 2015100662A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
data packet
status information
push
server
Prior art date
Application number
PCT/CN2013/091212
Other languages
French (fr)
Chinese (zh)
Inventor
张凯歌
张岳
江鹏
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to PCT/CN2013/091212 priority Critical patent/WO2015100662A1/en
Priority to CN201380075278.9A priority patent/CN105103515B/en
Publication of WO2015100662A1 publication Critical patent/WO2015100662A1/en

Links

Classifications

    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • the present invention relates to the field of communications, and in particular, to a data processing method, apparatus, and system.
  • Background Art With the widespread use of applications in mobile terminals, such as WeChat, weather forecasting, etc., PUSH (Pushing) technology is increasingly being applied to communication between mobile terminals and servers.
  • the method for establishing a PUSH channel between the mobile terminal and the server is: establishing a TLS (Transport Layer Protocol) link between the mobile terminal and the server, so that the mobile terminal and the server are on the TLS link.
  • the transmission of the data packet is performed.
  • the server After receiving the data packet sent by the application provider, the server directly PUSH the data packet to the mobile terminal through the TLS link.
  • the mobile terminal AP Appli a ti on Proces s or , the application processor
  • the modem will be woken up to perform the solution of the packet
  • the inventor found that at least the following problems exist in the prior art:
  • the server When the server receives a large number of data packets sent by the application provider, the server needs to pass each data packet through the TL S link. Send to mobile terminal.
  • the AP and the modem of the mobile terminal are frequently woken up, thereby increasing the power consumption of the mobile terminal, thereby shortening the standby time of the mobile terminal.
  • an embodiment of the present invention provides a data processing method, including: receiving a data packet; acquiring first state information of the terminal device; The first state information is used to identify a state of the terminal device; determining, according to the first state information of the terminal device, whether to push the data packet; if it is determined that the data packet is not pushed, storing the data packet to a cache Area.
  • the first state information of the terminal device includes: the first respiratory light state information of the terminal device
  • the first state according to the terminal device Determining whether to push the data packet includes: setting according to the terminal
  • the first breathing light state information determines whether to push the data packet; if it is determined that the data packet is not pushed, storing the data packet to the buffer area comprises: if it is determined that the breathing light of the terminal device is turned on In the state, if it is determined that the data packet is not pushed, the data packet is stored in the buffer area.
  • the method further includes: if it is determined that the respiratory light is in a closed state, determining to push the data packet, The data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the first state information of the terminal device includes: first respiratory light state information of the terminal device and first Determining whether to push the data packet according to the first state information of the terminal device, according to the first state information of the terminal device, determining, according to the first screen state information of the terminal device, whether the screen of the terminal device is in an open state; If it is determined that the screen of the terminal device is in the off state, determining, according to the first breathing lamp state information of the terminal device, whether the breathing light of the terminal device is in an open state; if it is determined that the data packet is not pushed, Storing the data packet to the buffer area includes: if the screen state of the terminal device is off and the breathing light of the terminal device is in an on state, determining to not push the data packet, storing the data packet to the cache Area.
  • the method further includes: if it is determined that the screen of the terminal device is in an on state, determining to push a data packet, Transmitting the data packet to the terminal device, and pushing the data packet stored in the buffer area to the terminal device; or, if the screen state of the terminal device is off and the breathing light of the terminal device is in the off state, After determining the push packet, the packet is pushed to the terminal device.
  • the method further includes: acquiring second screen state information of the terminal device; determining, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area; If the screen of the terminal device is in an open state, it is determined whether the buffer area stores a data packet; if the data packet is stored in the buffer area, The data packet stored in the buffer area is pushed to the terminal device.
  • the second respiratory light state information of the terminal device is obtained; Determining, by the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area; if it is determined that the breathing light of the terminal device is in a closed state, determining whether the buffer area stores a data packet; A data packet is stored in the buffer area, and the data packet stored in the buffer area is pushed to the terminal device.
  • the method further includes: determining whether the data packet stored in the buffer area reaches a first threshold; if the data packet stored in the buffer area reaches the first threshold, The data packet stored in the buffer area is pushed to the terminal device.
  • the method before receiving the data packet, the method further includes: acquiring an application priority And determining, according to the first state information of the terminal device, whether to push the data packet, the method further includes: determining, according to the data packet, a first application corresponding to the data packet; acquiring the first application a priority information, and determining, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority; determining, according to the status information of the terminal device, whether to push the data packet includes And if it is determined that the first application corresponding to the data packet has processing priority, the data packet is pushed to the terminal device; if it is determined that the first application corresponding to the data packet does not have processing priority, performing the Determining whether to push the data packet according to the first state information of the terminal device.
  • the obtaining the priority information of the application includes: receiving the first message sent by the terminal device, The first message carries the priority information of the application; and according to the first message, the priority information of the application is obtained.
  • the acquiring the first state information of the terminal device includes: Decoding a second message sent by the terminal device; carrying the second message The first state information of the terminal device is obtained; and the first state information of the terminal device is obtained according to the second message.
  • the embodiment of the present invention provides a data processing method, including: acquiring first state information of a terminal device; the first state information is used to identify a state of the terminal device; The first screen state information of the terminal device is sent to: the first state information of the terminal device is sent to the server according to the first screen state information of the terminal device.
  • the sending, by the first screen state information of the terminal device, the first state information of the terminal device to the server includes: When the screen state information indicates that the screen of the terminal device is in an open state, the first state information of the terminal device is sent to the server; or, if the first screen state information of the terminal device indicates the terminal device When the screen is in the off state, the first state information of the terminal device is sent to the server according to the first frequency.
  • the method further includes: obtaining priority information of the application; determining a priority of the obtained application Whether the information is the same as the priority information of the stored application; if it is determined that the obtained priority information of the application is different from the priority information of the stored application, sending the priority information of the application to the server .
  • the method before the sending the priority information of the application to the server, the method further includes: The priority information of the application is added to the first message; the sending the priority information of the application to the server comprises: sending the first message to the server.
  • the method further includes: adding the first state information of the terminal device to the second message; and the first screen state information according to the terminal device Sending the first status information of the terminal device to the server includes: performing the second cancellation according to the first screen state information of the terminal device Information is sent to the server.
  • the method further includes: receiving a data packet sent by the server.
  • an embodiment of the present invention provides a server, including: a receiving unit, an obtaining unit, a determining unit, and a processing unit; the receiving unit is configured to receive a data packet; and the acquiring unit is configured to acquire a terminal device. a first state information; the first state information is used to identify a state of the terminal device; the determining unit is configured to determine, according to the first state information of the terminal device, whether to push the data packet; And storing, when the determining unit determines not to push the data packet, the data packet to a buffer area.
  • the determining unit when the first state information of the terminal device includes: first respiratory light state information of the terminal device, the determining unit is configured to use the Determining whether to push the data packet, the determining unit is configured to determine, according to the first breathing light state information of the terminal device, whether to push the data packet; the processing unit is configured to: When the determining unit determines that the data packet is not to be pushed, storing the data packet to the buffer area, the method specifically includes: the processing unit is configured to: when the breathing light of the terminal device is in an open state, the determining unit determines In the case where the data packet is not pushed, the data packet is stored in the buffer area.
  • the method further includes: a sending unit, configured to determine, in the determining unit, that the breathing light is off a state, where it is determined that the data packet is pushed, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the first state information of the terminal device includes: first respiratory light state information of the terminal device and first In the case of the screen state information, the determining unit is configured to determine whether to push the data packet according to the first state information of the terminal device, specifically: the determining unit is configured to use, according to the first screen state of the terminal device Determining whether the screen of the terminal device is in an open state; determining that the screen of the terminal device is in a closed state And determining, by the first breathing lamp state information of the terminal device, whether the breathing light of the terminal device is in an open state; the processing unit is configured to: when the determining unit determines not to push the data packet,
  • the storing of the data packet to the buffer area specifically includes: the processing unit is configured to: when the screen of the terminal device is in a closed state and the breathing light of the terminal device is in an open state, the determining unit determines that the data packet is not pushed.
  • the sending unit is further configured to determine, in the determining unit, that a screen of the terminal device is in an open state And determining, in the case of pushing the data packet, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the sending unit is further configured to When the screen state of the terminal device is off and the breathing lamp of the terminal device is in the off state, in the case of determining to push the data packet, the data packet is pushed to the terminal device.
  • the acquiring unit is further configured to acquire the The determining unit is further configured to determine, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area; the determining unit is further configured to determine the terminal device If the screen is in an open state, determining whether the buffer area stores a data packet; the sending unit is further configured to: when the data packet is stored in the buffer area, the data stored in the buffer area The package is pushed to the terminal device.
  • the acquiring unit is further configured to acquire the The determining unit is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push the data packet of the buffer area; the determining unit is further configured to be used in the terminal device If the breathing light is in the off state, determining whether the buffer area stores a data packet; and the sending unit is further configured to store the data area in the buffer area The data packet is pushed to the terminal device.
  • the determining unit is further configured to determine the Whether the data packet stored in the storage area reaches the first threshold value; the sending unit is further configured to: when the determining unit determines that the data packet stored in the buffer area reaches the first threshold value, The data packet stored in the buffer area is pushed to the terminal device.
  • the acquiring unit is further configured to acquire priority information of the application;
  • the determining unit is further configured to determine, according to the data packet, a first application that is corresponding to the data packet, where the determining unit is further configured to obtain priority information of the first application, and according to the first Determining, by the priority information of the application, whether the first application corresponding to the data packet has a processing priority;
  • the determining unit is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: The determining unit, when determining that the first application corresponding to the data packet has processing priority, pushing the data packet to the terminal device; performing, when determining that the first application corresponding to the data packet has no processing priority Determining whether to push the data packet according to the first state information of the terminal device.
  • the receiving unit is further configured to receive a first message that is sent by the terminal device, where the first The message carries the priority information of the application.
  • the acquiring unit is configured to obtain the priority information of the application, and the method includes: the acquiring unit, configured to acquire, according to the first message received by the receiving unit, the application Priority information.
  • the receiving unit is further configured to receive the sending by the terminal device a second message; the second message carries the first state information of the terminal device; the acquiring unit is configured to acquire the first state information of the terminal device, specifically: the acquiring unit is configured to receive according to the The second message received by the unit acquires first state information of the terminal device.
  • an embodiment of the present invention provides a terminal device, including: an acquiring unit, a sending unit, where the acquiring unit is configured to acquire first state information of the terminal device, where the first state information is used to identify the a state of the terminal device; the first state information includes: first screen state information of the terminal device; the sending unit, configured to: according to the first screen state information of the terminal device acquired by the acquiring unit, The first status information of the terminal device is sent to the server.
  • the sending unit is configured to send, according to the first screen state information of the terminal device acquired by the acquiring unit, first state information of the terminal device to And the sending unit is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or When the first screen state information of the terminal device indicates that the screen of the terminal device is in a closed state, the first state information of the terminal device is sent to the server according to the first frequency.
  • the method further includes: determining a unit, where the acquiring unit is further configured to obtain an application priority
  • the determining unit is configured to determine whether the priority information of the application acquired by the acquiring unit is the same as the priority information of the stored application
  • the sending unit is further configured to determine the obtaining in the determining unit.
  • the priority information of the application is sent to the server.
  • the method further includes: a processing unit, configured to add priority information of the application to In the first message, the sending unit is configured to send the priority information of the application to the server, specifically: the sending unit is configured to send the first message to the server.
  • the processing unit is further configured to: And the sending, by the sending unit, the sending, by the sending unit, the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the acquiring unit, specifically: The sending unit is configured to send the second message to the server according to the first screen state information of the terminal device.
  • the fifth possible implementation manner of the fourth aspect further includes: a receiving unit, The data packet sent by the server.
  • an embodiment of the present invention provides a server, including: a receiver and a The processor is configured to receive a data packet, the processor is configured to acquire first state information of the terminal device, and the first state information is used to identify a state of the terminal device; And determining, according to the first state information of the terminal device, whether to push the data packet; the processor is further configured to: when determining to not push the data packet, store the data packet to a buffer area.
  • the processor when the first state information of the terminal device includes: first respiratory light state information of the terminal device, the processor is configured to use, according to the terminal Determining whether to push the data packet, the method includes: determining, by the processor, whether to push the data packet according to the first breathing light state information of the terminal device; When the data packet is pushed, the data packet is stored in the buffer area, and the method includes: the processor is configured to: when the breathing light of the terminal device is in an open state, and determine not to push the data packet, The data packet is stored in the buffer area.
  • the method further includes: a transmitter, configured to: when the breathing light is in a closed state, determine to push the In the case of a data packet, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the first state information of the terminal device includes: first respiratory light state information of the terminal device and first In the case of the screen state information, the determining, by the processor, whether to push the data packet according to the first state information of the terminal device, specifically: the processor is configured to use, according to the first screen state information of the terminal device, Determining whether the screen of the terminal device is in an open state; if the screen of the terminal device is in a closed state, determining, according to the first breathing light state information of the terminal device, whether the breathing light of the terminal device is in an open state
  • the processor is configured to store the data packet to the buffer area when determining that the data packet is not to be pushed, and the method includes: the processor is configured to be in a screen off state of the terminal device and the terminal device breaths When the light is on, it is determined that the data packet is not pushed, and the data packet is stored in the buffer area.
  • the transmitter is further configured to: when the screen of the terminal device is in an open state And determining, in the case of pushing the data packet, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the transmitter is further used in the When the screen state of the terminal device is off and the breathing lamp of the terminal device is in the off state, when the data packet is determined to be pushed, the data packet is pushed to the terminal device.
  • the processor is further configured to acquire the a second screen state information; the processor, configured to determine, according to the second screen state information of the terminal device, whether to push a data packet of the buffer area; the processor is further configured to be used on a screen of the terminal device In the case of being in an open state, determining whether the buffer area stores a data packet; and the transmitter is further configured to: when the data packet is stored in the buffer area, store the data packet in the buffer area Pushed to the terminal device.
  • the processor is further configured to acquire the terminal device
  • the second breathing lamp state information is further configured to: determine, according to the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area; the processor is further configured to be in the terminal device If the breathing light is in the off state, determining whether the buffer area stores a data packet; the transmitter is further configured to store the data area in the buffer area, where the buffer area is stored The data packet is pushed to the terminal device.
  • the processor is further configured to determine that the buffer area is stored Whether the data packet reaches the first threshold; the transmitter is further configured to: when determining that the data packet stored in the buffer area reaches the first threshold, push the data packet stored in the buffer area To the terminal device.
  • the processor is further configured to acquire priority information of the application;
  • the processor is further configured to determine, according to the data packet, a first application that is corresponding to the data packet, where the processor is further configured to acquire priority information of the first application, and according to the first Determining, by the priority information of the application, whether the first application corresponding to the data packet has a processing priority; the determining, by the processor, determining whether to push the data packet according to the first state information of the terminal device, specifically: a processor for determining the pair of data packets When the first application has a processing priority, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing the first state according to the terminal device The information determines whether to push the packet.
  • the receiver is further configured to receive a first message that is sent by the terminal device, where the first The message carries the priority information of the application; the processor is configured to obtain the priority information of the application, and the method is specifically configured to: obtain, by the processor, the priority of the application according to the first message received by the receiver information.
  • the receiver is further configured to receive the sending by the terminal device a second message; the second message carries the first state information of the terminal device; the acquiring, by the processor, the first state information of the terminal device, specifically: the processor is configured to receive according to the receiver The second message acquires first state information of the terminal device.
  • an embodiment of the present invention provides a terminal device, including: a processor, a transmitter, where the processor is configured to acquire first state information of the terminal device, where the first state information is used to identify the a state of the terminal device; the first state information includes: first screen state information of the terminal device; the transmitter, configured to: according to the first screen state information of the terminal device acquired by the processor, The first status information of the terminal device is sent to the server.
  • the transmitter is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the processor Specifically, the transmitter is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or When the first screen state information of the terminal device indicates that the screen of the terminal device is in the off state, the first state information of the terminal device is sent to the server according to the first frequency.
  • the processor is further configured to acquire priority information of the application;
  • the processor is further configured to determine whether the obtained priority information of the application is the same as the priority information of the stored application, where the transmitter is further configured to determine, by the processor, the acquired application When the priority information is different from the priority information of the stored application, the priority information of the application is sent to the server.
  • the processor is further configured to add the priority information of the application to the first message; The sending, by the sender, the first status information of the terminal device to the server, specifically: the sending, by the sender, sending the first message to the server.
  • the processor is further configured to: a state information is added to the second message; the sender is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor, specifically: The transmitter is configured to send the second message to the server according to the first screen state information of the terminal device.
  • the first to the fourth possible implementation manner of the sixth aspect the fifth possible implementation manner of the sixth aspect, further includes: a receiver; the receiver, configured to receive The data packet sent by the server.
  • the embodiment of the present invention provides a system for processing data, including: a server, a terminal device; the processor is a server described in the foregoing embodiment; the terminal device is described in the foregoing embodiment. Terminal Equipment.
  • An embodiment of the present invention provides a data processing method, apparatus, and system. After receiving a data packet, the server acquires first state information of the terminal device, and then determines whether to push the data according to the first state information of the terminal device. The packet, if it is determined that the data packet is not pushed, stores the data packet in a buffer area.
  • the server when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time.
  • the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal.
  • FIG. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another data processing method according to an embodiment of the present invention
  • FIG. 3 is another data provided by an embodiment of the present invention.
  • Figure 4 is a schematic flowchart of another data processing method according to an embodiment of the present invention
  • Figure 5 is a schematic diagram of a function of a server according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of functions of another terminal device according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another terminal device according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present invention;
  • FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
  • FIG. 13 is a schematic structural diagram of another terminal device according to an embodiment of the present invention;
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
  • the embodiment of the invention provides a data processing method, as shown in FIG
  • the first state information is used to identify a state of the terminal device.
  • the first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device. It should be noted that the first state information of the terminal device is state information that the terminal device is at the first time.
  • the first screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a first moment.
  • the first breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a first moment.
  • the screen when the screen is in the on state, the user is using the terminal device; when the screen is in the off state, the terminal device is in the standby state, and the user is not using the device.
  • the breathing light when the breathing light is on, it means that the user already knows that a new message arrives; when the breathing light is off, it means that no new message arrives at the terminal device.
  • the status information of the terminal device may change at any time, so the first state information of the terminal device acquired by the server needs to be updated in time, that is, as long as the terminal device is in the standby state, the terminal device Status information needs to be continuously sent to the server.
  • the acquiring the first state information of the terminal device includes receiving the second message sent by the terminal device, where the second message carries the first state information of the terminal device.
  • the terminal device may add the first state information of the terminal device to a message that the terminal device that is already existing in the prior art can send to the server to form a second message, and the terminal device sends the second message to the server.
  • the server parses the second message to obtain the first state information of the terminal device.
  • the one message may be an original heartbeat packet in the prior art.
  • the second message may be a heartbeat packet.
  • the heartbeat packet in the embodiment of the present invention is a special heartbeat packet in which the terminal device state information is added to the original heartbeat packet.
  • the second message may also be other existing messages, and the invention does not limit this.
  • the server determines, according to the first screen state information of the terminal device that has been stored in the server that is sent from the terminal device, or the first screen state information and the first respiratory light state information, whether to determine whether to the terminal The device pushes the packet. It should be noted that, according to the content included in the first state information of the terminal device, whether the server determines whether to push the data packet according to the first state information of the terminal device may be classified into two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, determining whether to push the data packet according to the first breathing lamp state information of the terminal device.
  • the server first determines, according to the first screen state information, whether the screen of the terminal device is in an open state, and if the screen of the terminal device is in an open state, determining to push the data packet.
  • the screen of the terminal device is in the off state, it is further determined whether the breathing lamp of the terminal device is in an open state, and if the breathing lamp of the terminal device is in the off state, it is determined to push the data packet. If the breathing light of the terminal device is in the on state, it is determined that the data packet is not pushed. It should be noted that, if the server determines that the screen of the terminal device is turned on, It is not necessary to continue to judge the state of the first breathing lamp, but to directly determine the push packet. It should be noted that when the screen of the terminal device is in the on state, the user is using the terminal device. At this time, the server needs to push the data packet to the terminal device in time so that the user can receive the new message in time.
  • the server determines to push the data packet to notify the user that there is new The news arrived.
  • the screen of the terminal device is in the off state and the breathing light of the terminal device is in the on state, it indicates that the user is not using the terminal device, but a new message has arrived, and the user is not eager to view the new message.
  • the server determines Do not send packets. It should be noted that the server performs different steps according to the determined result. If the server determines not to push the data packet, step 104 is performed. If the server determines to push the data packet, step 105 is performed.
  • the data packet is stored in a buffer area. Specifically, if the server determines, according to the first state information of the terminal device, that the data packet is not pushed, the server stores the data packet in a buffer area of the server. It should be noted that the data packet of the buffer area of the server is only temporarily stored in the server. When detecting the trigger condition that satisfies the buffer area, the server sends all the data buffered by the buffer area to the terminal device. It should be noted that there are two conditions for triggering the data of the transmission buffer area.
  • the first trigger condition is that the total amount of data buffered in the buffer area has reached the preset first threshold value
  • the second trigger condition is When the server determines, according to the second screen state information of the terminal device or the second breathing lamp state information, whether to store the stored data of the buffer area. As long as either of the two trigger conditions is met, the server needs to send all the data stored in the buffer to the terminal device.
  • the first threshold is a threshold of a buffer determined according to the size of the server memory before the server leaves the factory, and indicates a maximum amount of data that the server can buffer to be sent to a terminal device.
  • the second screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a second time.
  • the second breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a second moment.
  • the first time and the second time are different times. The first moment is when there is data arriving at the server.
  • the second time is the time after the first time, when no data arrives at the server, and the server receives the status information of the terminal. It should be noted that, according to different content included in the first state information of the terminal device, if it is determined that the data packet is not pushed, there are two cases in which the data packet is stored in the buffer area.
  • the data packet is stored to the buffer area.
  • the first state information of the terminal device includes the first breathing lamp state information of the terminal device, if it is determined that the breathing lamp of the terminal device is in an open state, it is determined that the data packet is not pushed. , the data packet is stored to the buffer area.
  • the first state information of the terminal device includes the first breathing light state information of the terminal device and the first screen state information of the terminal device, if the screen state of the terminal device is off and The breathing light of the terminal device is in an open state, and if it is determined that the data packet is not pushed, the data packet is stored in a buffer area.
  • the server After receiving a data packet, the server acquires first state information of the terminal device, and then determines whether to push the data packet according to the first state information of the terminal device, if If the data packet is not pushed, the data packet is stored in the buffer area. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal.
  • An embodiment of the present invention provides a data processing method. As shown in FIG. 2, the method includes: 2 01. Acquire first state information of a terminal device.
  • the first state information of the terminal device includes a first screen of the terminal device Status information, or first screen state information of the terminal device and first breathing light state information of the terminal device.
  • the status information of the terminal device may change at any time, and the first state information needs to be updated in time, that is, as long as the terminal device is in the standby state, the terminal device acquires the state information once every time.
  • the first state information of the terminal device is state information of the first time at the terminal device, and the first screen state information of the terminal device is used to identify the screen of the terminal device at the first time.
  • the first breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a first moment. It should be noted that when the screen is in the on state, the user is using the terminal device; when the screen is in the off state, the terminal device is only in the standby state, and the user is not using the device. It should be noted that when the breathing light is on, it means that the user already knows that a new message arrives; when the breathing light is off, it means that no new message arrives at the terminal device.
  • the terminal device determines, according to the first screen state information in the first state information, how to push the first state information to the server. Further, the sending, according to the first screen state information of the terminal device, the first state information of the terminal device to the server includes: if the first screen state information of the terminal device indicates the screen of the terminal device When the first screen state information of the terminal device indicates that the screen of the terminal device is in the off state, the first state information of the terminal device is sent to the server according to the first frequency. The first state information of the terminal device.
  • the first state information of the terminal device needs to be immediately sent to the server, so that after receiving the first state information of the terminal device, the server immediately sends the data of the buffer zone to the terminal. device.
  • the first state information of the terminal device is sent to the server, that is, the first state information of the terminal device is sent to the server at a fixed time interval.
  • the terminal device sends the first state information of the terminal device to the server at a certain frequency, so that the server receives the first state information of the terminal device.
  • An embodiment of the present invention provides a data processing method, after receiving the first state information of the terminal device, the terminal device sends the first state information of the terminal device to the server, so that the server is configured according to the first The status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device.
  • An embodiment of the present invention provides a data processing method, as shown in FIG. 3 and FIG. 4, including:
  • the terminal device acquires priority information of the application.
  • the priority information of the application is information for identifying the processing priority of the application installed on the terminal device.
  • the server needs to push the received data packet corresponding to the application to the terminal device immediately; when the priority information of the application is marked as having no processing priority And determining, according to the first state information of the terminal device, whether to push the data packet.
  • the priority information of the application includes priority information of all applications installed on the terminal device.
  • the terminal device can set the priority of each application before the terminal device leaves the factory.
  • the pre-level information can also be configured by the user for the priority information of each application.
  • the terminal device determines whether the priority information of the acquired application is the same as the priority information of the stored application.
  • the priority of the application may change, so when the change occurs, it is necessary to determine the priority information of the changed application and the stored application.
  • the priority information is the same.
  • the priority information of the stored application may be the default application priority set by the terminal device before leaving the factory, and may also be the priority information of the application set by the user of the terminal device last time. It should be noted that the priority information of the application that has been stored by the terminal device is consistent with the application priority information of the terminal device that is stored by the server. It should be noted that the terminal device performs different steps according to the determined result. If it is determined that the priority information of the acquired application is different from the priority information of the stored application, step 303 is performed. If it is determined that the priority information of the acquired application is the same as the priority information of the stored application, step 303 is skipped, and the subsequent steps are directly performed. .
  • the terminal device needs to be used.
  • the application priority information is sent to the server in time.
  • the first message is a message that is already in the prior art and can be sent from the terminal device to the server.
  • the first message may be a heartbeat packet, and may be other existing messages. The invention does not limit this.
  • the terminal device acquires first state information of the terminal device. For details, refer to step 201, and details are not described herein again.
  • the terminal device adds the first state information of the terminal device to the second message.
  • the second message is also a message that can be sent from the terminal device to the server that exists in the prior art.
  • the first message and the second message may be the same message, or may be different messages.
  • the message carries not only the priority information of the application but also the first state information of the terminal device.
  • the second message may be a heartbeat packet. It should be noted that the second message may also be other existing messages, and the invention does not limit this.
  • the first message and the second message are the same, and both are heartbeat packets as an example.
  • the terminal device adds the priority information of the application and the first state information of the terminal device to the heartbeat packet, and sends the heartbeat packet to the server.
  • the heartbeat packet received by the server is a special heartbeat packet carrying the priority information of the application and the first state information of the terminal device.
  • the second message and the first message are both heartbeat packets, and the terminal device customizes a 3-byte self-protocol to carry the first state information of the terminal device and the priority information of the application.
  • the terminal device adds the own protocol to the heartbeat packet, and sends the heartbeat packet to the server.
  • the format of the own protocol is: the first six bits of the first byte are protocol identifiers, and are used to parse the first state information of the terminal device and the priority information of the application by using the protocol identifier after the server receives the heartbeat packet. .
  • the seventh and eighth bits of the first byte are the first state information, wherein the seventh bit is the first screen state information of the terminal device, where 0 indicates that the screen of the terminal device is in the off state, and 1 indicates the terminal device.
  • the screen is on.
  • the eighth bit is the first breathing lamp state information of the terminal device, and 0 is used to indicate that the breathing lamp of the terminal device is in the off state, and 1 is used to indicate that the breathing lamp of the terminal device is in the on state.
  • the second byte and the third byte represent the priority information of the application, wherein the second byte is used to identify the number of each application in the terminal device, and the third byte is used to identify the priority of the application.
  • steps 301-303 and steps 304-305 are not sequential, and Steps 301-330 are performed first, then steps 304-305 are performed; steps 304-305 may be performed first, then steps 301-303 may be performed; steps 301-303 and steps 304-305 may also be performed simultaneously. In the embodiment of the present invention, steps 301-303 are performed first, and then steps 304-305 are performed as an example.
  • the terminal device sends the special heartbeat packet to a server according to the first screen state information of the terminal device, where the server receives the special heartbeat packet. Specifically, after acquiring the first state information, the terminal device determines, according to the first screen state information in the first state information, the situation to push the first state information to the server. Specifically, after acquiring the first state information, the terminal device determines, according to the first screen state in the first state message, what state the screen is in.
  • the terminal device When the screen of the terminal device is in the on state, the terminal device needs to immediately send the special heartbeat packet to the server, so that the server can send the data to the terminal device in time; when the screen of the terminal device is in the closed state, the terminal device follows the original The frequency of sending heartbeat packets sends a special heartbeat packet to the server. It should be noted that, at this time, the heartbeat packet received by the server is a special heartbeat packet carrying the priority information of the application and the first state letter I of the terminal device.
  • the server parses the special heartbeat packet, and obtains and stores priority information of the application and first state information of the terminal device. Specifically, after receiving the special heartbeat packet, the terminal device parses the special heartbeat packet to obtain priority information of the application and first state information of the terminal device, and prioritize the application.
  • the first state information of the information and the terminal device is stored in the server.
  • the server receives the data packet. Specifically, after the terminal device installs the application, the server of the terminal device receives a data packet about the application transmitted by the application provider.
  • the server determines, according to the data packet, a first application corresponding to the data packet. Specifically, after receiving the data packet, the server may parse the data packet, and determine the first application corresponding to the data packet. The server obtains the priority information of the first application, and determines, according to the priority information of the first application, whether the first application corresponding to the data packet has processing priority. Specifically, after determining the first application corresponding to the data packet, the server queries the priority information of all the stored applications. After obtaining the priority information of the first application, the server can know whether the first application has processing priority. That is, when the priority information of the first application identifies that the first application has processing priority, the server may determine that the first application has processing priority according to the priority information of the first application.
  • the server may determine that the first application does not process the priority according to the priority information of the first application. It should be noted that the server performs different steps according to the determined result. If the server determines that the first application has processing priority, step 31 1 is performed. If the server determines that the first application does not have processing priority, skip step 31 1 and directly perform subsequent steps.
  • the server sends the data packet to the terminal device. Specifically, the server may send the data packet to the terminal device when the first application corresponding to the data packet has processing priority according to the priority information of the first application, so that the terminal device receives and processes the data packet in time.
  • the server determines whether to push the data packet according to the first state information of the terminal device. Specifically, if the server determines that the first application corresponding to the data packet does not have a processing priority, it continues to determine whether to push the data packet according to the first state information of the terminal device. If the first application corresponding to the data packet does not have a processing priority, the server continues to determine whether to push the data packet according to the first state information of the terminal device, and the server determines whether the network device only uses the first state information of the terminal device. The steps of pushing the data packet are the same. For the specific determining step, refer to step 1 03, and details are not described herein again.
  • the server determines whether to push according to the first state information of the terminal device. The results of this packet are different, and the steps performed below are also different. If the server determines to push the data packet according to the first state information of the terminal device, step 31 3 is performed. If the server determines not to push the data packet according to the first state information of the terminal device, perform steps 3 1 4- 324.
  • the data packet is pushed to the terminal device. Specifically, if the server determines to push the data packet according to the first state information of the terminal device, the server immediately pushes the data packet to the terminal device. It should be noted that, according to the content included in the first state information of the terminal device, if the data packet is determined to be pushed, the data packet is pushed to the terminal device in two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, if it is determined that the breathing lamp is in the off state, determining to push the data packet, the data is The packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the breathing light of the terminal device is turned off.
  • the screen of the terminal device is in an open state.
  • the user is using the terminal device, so the data packet is pushed to the terminal device, and The buffered data is sent to the terminal device.
  • the other is that the screen of the terminal device is in the off state.
  • no data has been sent to the terminal device, and no data is stored in the buffer area, so the data packet needs to be sent to the terminal device, so as to notify the user that there is a new one. The message arrived.
  • the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device
  • the push data packet is determined, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or, if the screen state of the terminal device is off and the When the breathing light of the terminal device is in the off state, it is determined that the data packet is pushed, and the data packet is pushed to the terminal device.
  • the server determines, according to the first screen state information of the terminal device and the first breathing lamp state information of the terminal device, whether the server pushes the data packet, and the server determines, according to the first state information of the terminal device, that the data is obtained in two cases. Push the packet to the terminal device. the first In case, when the server determines that the screen of the terminal device is in the open state, regardless of the state of the first breathing lamp, that is, when the user is using the terminal device, the server will push the data packet to the terminal device, so that the user can view the time in time. information.
  • the server when the server determines that the screen of the terminal device is in the off state and the breathing light of the terminal device is in the off state, that is, the user is not using the terminal device, and does not know that a new message arrives, the server pushes the data packet. To the terminal device, so that the user knows that a new message has arrived.
  • step 1 04 If it is determined that the data packet is not pushed, the data packet is stored in a buffer area. For details, refer to step 1 04, and details are not described herein.
  • the server determines whether the data packet stored in the buffer area reaches a first threshold. Specifically, since the buffer space of the server is limited, the server detects whether the data stored in the storage area reaches the first threshold after storing one data packet.
  • the first threshold is a threshold of a buffer determined according to the size of the server memory before the server leaves the factory, and indicates a maximum amount of data that the server can buffer to be sent to a terminal device. It should be noted that, if the server detects that the data packet stored in the buffer does not reach the first threshold, the server does not process the data packet stored in the buffer.
  • the server pushes the data packet stored in the buffer area to the terminal device, and the terminal device receives the data packet sent by the server. Specifically, when the server detects that the total value of the data stored in the buffer area has reached the preset first threshold, the server pushes all the data packets stored in the buffer area to the terminal device together. Thereby emptying the buffer area. It should be noted that, according to different content included in the status information of the terminal device that is sent by the terminal device received by the server at the second time, the steps performed are different.
  • the server acquires second screen state information of the terminal device. It should be noted that the second screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a second time.
  • the server determines, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area. It should be noted that, when the server determines that the screen of the terminal device is in the closed state according to the second screen state information of the terminal device, the server does not perform any processing.
  • the server detects whether the data packet is stored in the buffer area. Specifically, when the server detects that the screen of the terminal device is in an open state, the server indicates that the user starts to use the terminal device, and the server may send the data packet stored in the buffer area to the terminal device, so that the terminal device performs the data packet. Processing accordingly. At this point, the server needs to detect if the buffer is stored in the buffer. Further, if the server detects that there is no data packet stored in the buffer area, it indicates that the server has pushed all the data packets stored in the buffer area to the terminal device, and the server does not perform any processing.
  • the server pushes the data packet stored in the buffer area to the terminal device, and the terminal device receives the data packet sent by the server. Specifically, the server detects that the terminal device screen is in an open state, and detects that a data packet is stored in the buffer area, and then pushes all the stored data packets to the terminal device, so that the terminal device processes the stored data packet accordingly. .
  • Second respiratory light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at the second moment.
  • the buffer area of the server may have data or no data.
  • the buffer area of the server must not store data that needs to be sent to the terminal device, so in this case, determining The buffer area must not store data. It should be noted that if the server detects that there is no data packet stored in the buffer area, it indicates that the server has pushed all the data packets stored in the buffer area to the terminal device, and the server does not perform any processing.
  • steps 315-316 and steps 317-324 are not limited. Steps 315-316 may be performed first, and then steps 317-324 may be performed.
  • Steps 317-324 may be performed first, then steps 315-316 may be performed, and steps 315-316 and steps 317-324 may be performed simultaneously. In the embodiment of the present invention, steps 315-316 are performed first, and steps 317-324 are performed as an example. .
  • the embodiment of the present invention provides a method for data forwarding. The terminal device adds the obtained first state information and the priority information of the application to the heartbeat packet to form a special heartbeat packet.
  • the server After receiving the special heartbeat packet, the server parses the first a status message and application priority information, of course After determining the priority of the application corresponding to the received data packet, determining whether to push the data packet according to the priority of the application corresponding to the data packet and the first state information, and determining that the data packet is not pushed, the data is The packet is stored in the buffer area, and when the trigger condition of the buffer area is satisfied, the data packet stored in the buffer area is pushed to the terminal device. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time.
  • the server includes: a receiving unit 511, an obtaining unit 502, a determining unit 503, and a processing unit 504.
  • the receiving unit 501 is configured to receive a data packet.
  • the obtaining unit 502 is configured to acquire first state information of the terminal device. The first state information is used to identify a state of the terminal device.
  • the determining unit 503 is configured to determine, according to the first state information of the terminal device, whether to push the data packet. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the determining unit may be divided into two cases. In the first case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device, the determining unit 503 is configured to determine, according to the first state information of the terminal device, whether Pushing the data packet specifically includes: determining, by the determining unit 503, determining whether to push the data packet according to the first breathing light state information of the terminal device.
  • the determining unit 503 is configured to use Determining whether the data packet is pushed by the first state information of the terminal device, specifically: the determining unit 503 is configured to determine, according to the first screen state information of the terminal device, whether the screen of the terminal device is in an open state In determining the place In the case that the screen of the terminal device is in the closed state, it is determined whether the breathing light of the terminal device is in an open state according to the first breathing lamp state information of the terminal device.
  • the processing unit 504 is configured to store the data packet to the buffer area when the determining unit 503 determines not to push the data packet.
  • the specific usage of the determining unit may be divided into two cases.
  • the processing unit 504 when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, the processing unit 504 is configured to determine, at the determining unit 503, not to push the When the data packet is stored in the buffer area, the processing unit 504 is configured to: when the breathing light of the terminal device is in an open state, the determining unit 503 determines not to push the data packet. In the case, the data packet is stored in the buffer area.
  • the processing unit 504 when the first state information of the terminal device includes the first breathing light state information of the terminal device and the first screen state information of the terminal device, the processing unit 504 is configured to When the determining unit 503 determines that the data packet is not to be pushed, storing the data packet to the buffer area specifically includes: the processing unit 504 is configured to be in a screen off state of the terminal device and a breathing light of the terminal device When the determining unit 503 determines not to push the data packet, the data packet is stored in the buffer area. Further, referring to FIG. 5, the server further includes: a sending unit 505. It should be noted that, according to the content included in the first state information of the terminal device, the sending unit 505 has two modes of application.
  • the sending unit 505 when the first status information of the terminal device includes the first breathing light state information of the terminal device, the sending unit 505 is configured to determine, at the determining unit 503, that the breathing light is in In the closed state, when it is determined that the data packet is pushed, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the sending unit 505 when the first state information of the terminal device includes the terminal device In the case of the first breathing light state information and the first screen state information of the terminal device, the sending unit 505 is further configured to determine, in the determining unit 503, that the screen of the terminal device is in an open state, and determine the push data.
  • the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the sending unit 505 is further used in the terminal device.
  • the acquiring unit 502 is further configured to acquire second screen state information of the terminal device.
  • the determining unit 503 is further configured to determine, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area.
  • the determining unit 503 is further configured to determine, if the screen of the terminal device is in an open state, whether the buffer area stores a data packet.
  • the sending unit 505 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device.
  • the acquiring unit 502 is further configured to acquire second breathing light state information of the terminal device.
  • the determining unit 503 is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push the data packet of the buffer area.
  • the determining unit 503 is further configured to determine, if the breathing light of the terminal device is in a closed state, whether the buffer area stores a data packet.
  • the sending unit 505 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device.
  • the determining unit 503 is further configured to determine whether the data packet stored in the buffer area reaches a first threshold.
  • the sending unit 505 is further configured to determine, in the determining unit 503, the cache area When the stored data packet reaches the first threshold, the data packet stored in the buffer area is pushed to the terminal device.
  • the acquiring unit 502 is further configured to acquire priority information of the application.
  • the determining unit 503 is further configured to determine, according to the data packet, a first application corresponding to the data packet.
  • the determining unit 503 is further configured to obtain the priority information of the first application, and determine, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority.
  • the determining unit 503 is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: the determining unit 503 is configured to determine, in determining that the first application corresponding to the data packet has When the priority is processed, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing, according to the first state information of the terminal device, determining whether to push the data pack. Further, the receiving unit 501 is further configured to receive the first message sent by the terminal device. The first message carries the priority information of the application.
  • the acquiring unit 502 is configured to acquire the priority information of the application, and the method includes: the obtaining unit 502 is configured to obtain the priority information of the application according to the first message received by the receiving unit 501. Further, the receiving unit 501 is further configured to receive a second message sent by the terminal device. The second message carries the first state information of the terminal device. At this time, the acquiring unit 502 is configured to acquire the first state information of the terminal device, and the method includes: the acquiring unit 502, configured to acquire, according to the second message received by the receiving unit 501, the terminal device A status message.
  • the embodiment of the invention provides a server, after receiving the data packet, the receiving unit obtains Obtaining, by the unit, the first state information of the terminal device, and then determining, by the determining unit, whether to push the data packet according to the first state information of the terminal device, and if it is determined that the data packet is not pushed, the processing unit stores the data packet To the cache area.
  • the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time.
  • the terminal device includes: an obtaining unit 601 and a sending unit 602.
  • the obtaining unit 601 is configured to acquire first state information of the terminal device.
  • the first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device.
  • the sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the acquiring unit 601. Specifically, the acquiring unit 601, after acquiring the first state information, the first screen state information in the first state information is different, and the sending unit 602 pushes the first state information to the server in different manners. .
  • the sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the acquiring unit 601, and specifically includes: the sending unit The 602 is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or, in the terminal device When the screen status information indicates that the screen of the terminal device is in the off state, the first status information of the terminal device is sent to the server according to the first frequency.
  • the terminal device as shown in FIG. 7, further includes: a determining unit 603. At this time, the acquiring unit 601 is further configured to acquire priority information of the application.
  • the determining unit 603 is configured to determine whether the priority information of the application acquired by the acquiring unit 601 is the same as the priority information of the stored application.
  • the sending unit 602 is further configured to: when the determining unit 603 determines that the priority information of the acquired application is different from the priority information of the stored application, send the priority information of the application to the server.
  • the terminal device as shown in FIG. 8, further includes: a processing unit 604.
  • the processing unit 604 is configured to add priority information of the application to the first message.
  • the sending unit 602 is configured to send the priority information of the application to the server, specifically: the sending unit 602 is configured to send the first message to the server.
  • the processing unit 604 is further configured to add the first state information of the terminal device to the second message.
  • the sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the acquiring unit 601, where the sending unit 602 is configured to: Sending the second message to the server according to the first screen state information of the terminal device.
  • the terminal device as shown in FIG. 9, further includes: a receiving unit 605.
  • the receiving unit 605 is configured to receive a data packet sent by the server.
  • the embodiment of the present invention provides a terminal device, after the acquiring unit acquires the first state information of the terminal device, the sending unit sends the first state information of the terminal device to the server, so that the server is configured according to the first
  • the status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device.
  • the received data packet is stored in the buffer area, so that it is not required to be sent to the terminal device every time the data packet is received, thereby reducing the number of times the AP and the modem of the terminal device are awakened, thereby reducing the number of times.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the server includes: a receiver 1001, a memory 1002, and a processor 1003 connected to the receiver 1001 and the memory 1002, respectively.
  • the memory 1002 stores a set of program codes, and the processor 1003 is used to call the program code in the memory 1002.
  • the receiver 1001 is configured to receive a data packet.
  • the processor 1003 is configured to acquire first state information of the terminal device.
  • the first state information is used to identify a state of the terminal device.
  • the processor 1003 is further configured to determine, according to the first state information of the terminal device, whether to push the data packet. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the processor 1003 may be divided into two cases.
  • the processor 1003 is configured to determine, according to the first state information of the terminal device, whether Pushing the data packet specifically includes: the processor 1003, configured to determine, according to the first breathing light state information of the terminal device, whether to push the data packet.
  • the processor 1003 is configured to use Determining whether the data packet is pushed by the first state information of the terminal device, the method specifically includes: determining, by the processor 1003, whether the screen of the terminal device is in an open state according to the first screen state information of the terminal device If the screen of the terminal device is in the closed state, determining whether the breathing light of the terminal device is in an open state according to the first breathing light state information of the terminal device.
  • the processor 1003 is further configured to: when determining that the data packet is not pushed, store the data packet to a buffer area.
  • the specific usage of the processor 1 003 may be divided into two cases.
  • the processor 1003 when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, the processor 1003 is configured to, when determining not to push the data packet,
  • the storing of the data packet to the buffer area includes: the processor 1 003, configured to: when the breathing light of the terminal device is in an open state, determining to not push the data packet, storing the data packet to Cache area.
  • the processor 1 003 when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the processor 1 003 is used to When it is determined that the data packet is not pushed, storing the data packet to the buffer area, the method specifically includes: the processor 1 003 is configured to be in a screen off state of the terminal device, and the breathing light of the terminal device is turned on. Status, if it is determined that the data packet is not pushed, the data packet is stored to the buffer area. Further, referring to FIG. 10, the server further includes: a transmitter 1 004. Specifically, according to different content included in the first state information of the terminal device, there are two cases in which the transmitter 1 004 is applied.
  • the transmitter 1 004 is configured to determine the push station when the breathing lamp is in the off state.
  • the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device.
  • the transmitter 1 004 when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the transmitter 1 004 further And configured to: when the screen of the terminal device is in an open state, determine to push a data packet, push the data packet to the terminal device, and push the data packet stored in the buffer area to the terminal device; or The transmitter 1 004 is further configured to: when the screen of the terminal device is off and the breathing light of the terminal device is in a closed state, determine to push the data packet, and push the data packet to the terminal device . Further, the processor 1 003 is further configured to acquire a second screen of the terminal device. status information.
  • the processor 1003 is further configured to determine, according to the second screen state information of the terminal device, whether to push a data packet of the buffer area.
  • the processor 1003 is further configured to determine, if the screen of the terminal device is in an open state, whether the buffer area stores a data packet.
  • the transmitter 1004 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device.
  • the processor 1003 is further configured to acquire second breathing light state information of the terminal device.
  • the processor 1003 is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area.
  • the processor 1003 is further configured to determine, if the breathing light of the terminal device is in a closed state, whether the buffer area stores a data packet.
  • the transmitter 1004 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device. Further, the processor 1003 is further configured to determine whether a data packet stored in the buffer area reaches a first threshold. The transmitter 1004 is further configured to: when determining that the data packet stored in the buffer area reaches the first threshold, push the data packet stored in the buffer area to the terminal device. Further, the processor 1003 is further configured to acquire priority information of the application. The processor 1003 is further configured to determine, according to the data packet, a first application corresponding to the data packet.
  • the processor 1003 is further configured to obtain the priority information of the first application, and determine, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority. At this time, the processor 1003 is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: the processor 1003 is configured to determine, in determining that the first application corresponding to the data packet has When the priority is processed, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing, according to the first state information of the terminal device, determining whether to push the data pack. Further, the receiver 1001 is further configured to receive the first message sent by the terminal device. The first message carries the priority information of the application.
  • the processor 1003 is configured to acquire the priority information of the application, and the method is specifically configured to: obtain the priority information of the application according to the first message received by the receiver 1001. Further, the receiver 1001 is further configured to receive a second message sent by the terminal device. The second message carries the first state information of the terminal device. The processor 1003 is configured to acquire the first state information of the terminal device, where the processor 1003 is configured to: acquire, according to the second message received by the receiver 1001, the first device of the terminal device. A status message.
  • An embodiment of the present invention provides a server, after receiving a data packet, the processor acquires first state information of the terminal device, and then determines whether to push the data packet according to the first state information of the terminal device, if If the data packet is not pushed, the data packet is stored in the buffer area.
  • the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time.
  • FIG. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device includes: a processor 1101, a transmitter 1102, and a memory 1103.
  • the memory 1103 stores a set of program codes, and the processor 1001 is used to call the program code in the memory 1103.
  • the processor 1101 is configured to acquire first state information of the terminal device.
  • the first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device.
  • the transmitter 1102 is configured to send first state information of the terminal device to a server according to the first screen state information of the terminal device acquired by the processor 1101. Specifically, after the processor 1101 acquires the first state information, the first screen state information in the first state information is different, and the transmitter 1102 pushes the first state information to the server in different manners. . Further, the transmitter 1102 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor 1101, and specifically includes: the transmitter 1102.
  • the first state information of the terminal device is sent to a server when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state; or, the first screen of the terminal device When the status information indicates that the screen of the terminal device is in the off state, the first status information of the terminal device is sent to the server according to the first frequency.
  • the processor 1101 is further configured to acquire priority information of the application.
  • the processor 1101 is further configured to determine whether the priority information of the acquired application is the same as the priority information of the stored application.
  • the transmitter 1102 is further configured to: when the processor 1101 determines that the priority information of the acquired application is different from the priority information of the stored application, send the priority information of the application to the Said server.
  • the processor 1101 is further configured to add priority information of the application to the first message.
  • the transmitter 1102 is configured to send the first state information of the terminal device to the server, and specifically includes: the transmitter 1102 is configured to send the first message to the server.
  • the processor 1101 is further configured to add the first state information of the terminal device to the second message.
  • the transmitter 1102 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor 1101, and specifically includes: the transmitter The 1102 is configured to send the second message to the server according to the first screen state information of the terminal device.
  • the terminal device as shown in FIG. 12, further includes: a receiver 1104.
  • the receiver 1104 is configured to receive a data packet sent by the server.
  • the embodiment of the present invention provides a terminal device, after the processor obtains the first state information of the device, the sender sends the first state information of the terminal device to the server, so that the server is configured according to the first device.
  • the status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device.
  • the embodiment of the present invention provides a system for data processing. As shown in FIG. 13, the system includes: a server 1301 and a terminal device 1302.
  • the server 1301 is the server described in the foregoing embodiment.
  • the terminal device 1302 is the terminal device described in the foregoing embodiment.
  • the embodiment of the present invention provides a system for data processing.
  • the terminal device adds the acquired first state information and the priority information of the application to the heartbeat packet to form a special heartbeat packet.
  • the server parses the first a status information and application priority information, and then determining a priority of the application corresponding to the received data packet, determining whether to push the data packet according to the priority of the application corresponding to the data packet and the first status information, and determining not to push the data packet data pack In the case that the data packet is stored in the buffer area, until the trigger condition of the buffer area is satisfied, the data packet stored in the buffer area is pushed to the terminal device.
  • the server when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time.
  • the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention.
  • a computer device which may be a personal computer, server, or network device, etc.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Provided in the embodiments of the present invention and relating to the field of communications are a data processing method, a device and a system for use in prolonging the standby time of a terminal device. The method comprises: reception of a data packet; obtaining a first status information of the terminal device, said first status information being used to identify the status of the terminal device; determining, on the basis of said terminal device first status information , whether or not to push said data packet; if determining not to push the data packet, storing same in a cache. The embodiments of the present invention apply to push environments.

Description

一种数据处理的方法、 装置及系统  Method, device and system for data processing
技术领域 本发明涉及通信领域, 尤其涉及一种数据处理的方法、 装置及系统。 背景技术 随着应用程序在移动终端的广泛使用,例如微信、天气预报等, PUSH (推送)技术也越来越多的被运用到移动终端与服务器的通信中。 其中, 在移动终端与服务器间建立 PUSH通道的方法为: 在移动终端与服务器之 间建立 TLS ( Trans por t Layer Secur i ty,安全传输层协议) 链路, 使得 移动终端与服务器在 TLS 链路上进行数据包的传输。 当服务器接收到应 用提供商发送的数据包后, 会将该数据包通过 TLS链路直接 PUSH给移动 终端, 移动终端一旦接收到数据包后, 移动终端的 AP ( App l i ca t i on Proces s or,应用处理器) 和调制解调器将被唤醒, 从而进行数据包的解 TECHNICAL FIELD The present invention relates to the field of communications, and in particular, to a data processing method, apparatus, and system. Background Art With the widespread use of applications in mobile terminals, such as WeChat, weather forecasting, etc., PUSH (Pushing) technology is increasingly being applied to communication between mobile terminals and servers. The method for establishing a PUSH channel between the mobile terminal and the server is: establishing a TLS (Transport Layer Protocol) link between the mobile terminal and the server, so that the mobile terminal and the server are on the TLS link. The transmission of the data packet is performed. After receiving the data packet sent by the application provider, the server directly PUSH the data packet to the mobile terminal through the TLS link. After receiving the data packet, the mobile terminal AP (Appli a ti on Proces s or , the application processor) and the modem will be woken up to perform the solution of the packet
在实现上述数据包推送的过程中, 发明人发现现有技术中至少存在 如下问题: 当服务器接收到应用提供商发送的数据包时比较多时, 服务 器需将每个数据包均通过 TL S链路发送至移动终端。这样,移动终端的 AP 和调制解调器就会被频繁唤醒, 从而使移动终端的功耗增大, 进而缩短 了移动终端的待机时间。 In the process of implementing the above-mentioned data packet push, the inventor found that at least the following problems exist in the prior art: When the server receives a large number of data packets sent by the application provider, the server needs to pass each data packet through the TL S link. Send to mobile terminal. In this way, the AP and the modem of the mobile terminal are frequently woken up, thereby increasing the power consumption of the mobile terminal, thereby shortening the standby time of the mobile terminal.
发明内容 本发明的实施例提供一种数据处理的方法、 装置及系统, 用以实现 通过降低移动终端的功耗, 延长移动终端的待机时间。 为达到上述目的, 本发明的实施例釆用如下技术方案: 第一方面, 本发明实施例提供了一种数据处理的方法, 包括: 接收 数据包; 获取终端设备的第一状态信息; 所述第一状态信息用于标识所 述终端设备的状态; 根据所述终端设备的第一状态信息确定是否推送所 述数据包; 若确定不推送所述数据包, 则将所述数据包存储至緩存区。 在第一方面的第一种可能的实现方式中, 当所述终端设备的第一状 态信息包括: 所述终端设备的第一呼吸灯状态信息时, 所述根据所述终 端设备的第一状态信息确定是否推送所述数据包包括: 根据所述终端设 备的第一呼吸灯状态信息确定是否推送所述数据包; 所述若确定不推送 所述数据包, 则将所述数据包存储至緩存区包括: 若确定所述终端设备 的呼吸灯处于开启状态时, 确定不推送所述数据包, 则将所述数据包存 储至緩存区。 结合第一方面的第一种可能的实现方式, 在第一方面的第二种可能 的实现方式中, 还包括: 若确定呼吸灯处于关闭状态时, 确定推送所述 数据包, 则将所述数据包推送至终端设备, 并将所述緩存区的数据推送 至终端设备。 结合第一方面, 在第一方面的第三种可能的实现方式中, 当所述终 端设备的第一状态信息包括: 所述终端设备的第一呼吸灯状态信息及所 述终端设备的第一屏幕状态信息时, 所述根据所述终端设备的第一状态 信息确定是否推送所述数据包包括: 根据所述终端设备的第一屏幕状态 信息, 确定所述终端设备的屏幕是否处于开启状态; 若确定所述终端设 备的屏幕处于关闭状态, 则根据所述终端设备的第一呼吸灯状态信息确 定所述终端设备的呼吸灯是否处于开启状态; 所述若确定不推送所述数 据包, 则将所述数据包存储至緩存区包括: 若所述终端设备的屏幕关闭 状态并且所述终端设备的呼吸灯处于开启状态时, 确定不推送所述数据 包, 则将所述数据包存储至緩存区。 结合第一方面的第三种可能的实现方式, 在第一方面的第四种可能 的实现方式中, 还包括: 若确定所述终端设备的屏幕处于开启状态, 确 定推送数据包, 则将所述数据包推送至终端设备, 并将所述緩存区中存 储的数据包推送至所述终端设备; 或者, 若所述终端设备的屏幕关闭状 态并且所述终端设备的呼吸灯处于关闭状态时, 确定推送数据包, 则将 所述数据包推送至终端设备。 结合第一方面或第一方面的第一至第四任一种可能的实现方式, 在 第一方面的第五种可能的实现方式中, 在所述若确定不推送所述数据包, 则将所述数据包存储至緩存区之后, 还包括: 获取所述终端设备的第二 屏幕状态信息; 根据所述终端设备的第二屏幕状态信息确定是否推送所 述緩存区的数据包; 若确定所述终端设备的屏幕处于开启状态, 则确定 所述緩存区是否存储有数据包; 若所述緩存区中存储有数据包, 则将所 述緩存区中存储的数据包推送至所述终端设备。 结合第一方面或第一方面的第一至第四任一种可能的实现方式, 在 第一方面的第六种可能的实现方式中, 获取所述终端设备的第二呼吸灯 状态信息; 根据所述终端设备的第二呼吸灯状态信息确定是否推送所述 緩存区的数据包; 若确定所述终端设备的呼吸灯处于关闭状态, 则确定 所述緩存区是否存储有数据包; 若所述緩存区中存储有数据包, 则将所 述緩存区中存储的数据包推送至所述终端设备。 结合第一方面或第一方面的第一至第六任一种可能的实现方式, 在 第一方面的第七种可能的实现方式中, 在所述若确定不推送所述数据包, 则将所述数据包存储至緩存区之后, 还包括: 确定所述緩存区存储的数 据包是否达到第 ―门限值; 若所述緩存区存储的数据包达到所述第 ―门 限值, 则将所述緩存区存储的数据包推送至所述终端设备。 结合第一方面或第一方面的第一至第七任一种可能的实现方式, 在 第一方面的第八种可能的实现方式中, 在接收数据包之前, 还包括: 获 取应用的优先级信息; 在所述根据所述终端设备的第一状态信息确定是 否推送所述数据包之前还包括: 根据所述数据包, 确定所述数据包对应 的第一应用; 获取所述第一应用的优先级信息, 并根据所述第一应用的 优先级信息, 确定所述数据包对应的第一应用是否有处理优先权; 所述 根据所述终端设备的状态信息确定是否推送所述数据包包括: 若确定所 述数据包对应的第一应用有处理优先权, 则将所述数据包推送至所述终 端设备; 若确定所述数据包对应的第一应用没有处理优先权, 则执行所 述根据所述终端设备的第一状态信息确定是否推送所述数据包。 结合第一方面的第八种可能的实现方式, 在第一方面的第九种可能 的实现方式中, 所述获取应用的优先级信息包括: 接收所述终端设备发 送的第一消息; 所述第一消息中携带有所述应用的优先级信息; 根据所 述第一消息, 获取所述应用的优先级信息。 结合第一方面或第一方面的第一至第九任一种可能的实现方式, 在 第一方面的第十种可能的实现方式中, 所述获取终端设备的第一状态信 息包括: 接收所述终端设备发送的第二消息; 所述第二消息中携带有所 述终端设备的第一状态信息; 根据所述第二消息, 获取所述终端设备的 第一状态信息。 第二方面, 本发明实施例提供了一种数据处理的方法, 包括: 获取 终端设备的第一状态信息; 所述第一状态信息用于标识所述终端设备的 状态; 所述第一状态信息包括: 所述终端设备的第一屏幕状态信息; 根 据所述终端设备的第一屏幕状态信息,将所述终端设备的第一状态信息 发送至服务器。 在第二方面的第一种可能的实现方式中, 所述根据所述终端设备的 第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务器包括: 若所述终端设备的第一屏幕状态信息指示所述终端设备的屏幕处于开启 状态, 则向所述服务器发送所述终端设备的第一状态信息; 或者, 若所 述终端设备的第一屏幕状态信息指示所述终端设备的屏幕处于关闭状 态, 则根据第一频率, 向所述服务器发送所述终端设备的第一状态信息。 结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的 第二种可能的实现方式中, 还包括: 获取应用的优先级信息; 确定获取 的所述应用的优先级信息与已存储的应用的优先级信息是否相同; 若确 定获取的所述应用的优先级信息与已存储的应用的优先级信息不相同, 则将所述应用的优先级信息发送至所述服务器。 结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能 的实现方式中, 在所述将所述应用的优先级信息发送至所述服务器之前, 还包括: 将所述应用的优先级信息添加至第一消息中; 所述将所述应用 的优先级信息发送至所述服务器包括: 将所述第一消息发送至所述服务 器。 结合第二方面或第二方面的第一至第三任一种可能的实现方式, 在 第二方面的第四种可能的实现方式中, 在所述根据所述终端设备的第一 屏幕状态信息,将所述终端设备的第一状态信息发送至所述服务器之前, 还包括: 将所述终端设备的第一状态信息添加至第二消息; 所述根据所 述终端设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送 至服务器包括: 根据所述终端设备的第一屏幕状态信息, 将所述第二消 息发送至所述服务器。 结合第二方面或第二方面的第一至第四任一种可能的实现方式, 在 第二方面的第五种可能的实现方式中, 在根据所述终端设备的第一屏幕 状态信息,将所述终端设备的第一状态信息发送至所述服务器之后, 还包 括:接收所述服务器发送的数据包。 第三方面, 本发明实施例提供了一种服务器, 包括: 接收单元, 获 取单元, 确定单元以及处理单元; 所述接收单元, 用于接收数据包; 所 述获取单元, 用于获取终端设备的第一状态信息; 所述第一状态信息用 于标识所述终端设备的状态; 所述确定单元, 用于根据所述终端设备的 第一状态信息确定是否推送所述数据包; 所述处理单元, 用于在所述确 定单元确定不推送所述数据包时, 将所述数据包存储至緩存区。 在第三方面的第一种可能的实现方式中, 当所述终端设备的第一状 态信息包括: 所述终端设备的第一呼吸灯状态信息的情况下, 所述确定 单元用于根据所述终端设备的第一状态信息确定是否推送所述数据包, 具体包括: 所述确定单元用于根据所述终端设备的第一呼吸灯状态信息 确定是否推送所述数据包; 所述处理单元用于在所述确定单元确定不推 送所述数据包时, 将所述数据包存储至緩存区, 具体包括: 所述处理单 元用于在所述终端设备的呼吸灯处于开启状态, 所述确定单元确定不推 送所述数据包的情况下, 将所述数据包存储至緩存区。 结合第三方面的第一种可能的实现方式, 在第三方面的第二种可能 的实现方式中, 还包括: 发送单元; 所述发送单元, 用于在所述确定单 元确定呼吸灯处于关闭状态, 确定推送所述数据包的情况下, 将所述数 据包推送至终端设备, 并将所述緩存区的数据推送至终端设备。 结合第三方面, 在第三方面的第三种可能的实现方式中, 当所述终 端设备的第一状态信息包括: 所述终端设备的第一呼吸灯状态信息及所 述终端设备的第一屏幕状态信息的情况下, 所述确定单元用于根据所述 终端设备的第一状态信息确定是否推送所述数据包, 具体包括: 所述确 定单元用于根据所述终端设备的第一屏幕状态信息, 确定所述终端设备 的屏幕是否处于开启状态; 在确定所述终端设备的屏幕处于关闭状态的 情况下, 根据所述终端设备的第一呼吸灯状态信息确定所述终端设备的 呼吸灯是否处于开启状态; 所述处理单元用于在所述确定单元确定不推 送所述数据包时, 将所述数据包存储至緩存区具体包括: 所述处理单元 用于在所述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于开 启状态, 所述确定单元确定不推送所述数据包的情况下, 将所述数据包 存储至緩存区。 结合第三方面的第三种可能的实现方式, 在第三方面的第四种可能 的实现方式中, 所述发送单元, 还用于在所述确定单元确定所述终端设 备的屏幕处于开启状态, 确定推送数据包的情况下, 将所述数据包推送 至终端设备, 并将所述緩存区中存储的数据包推送至所述终端设备; 或 者, 所述发送单元, 还用于在所述终端设备的屏幕关闭状态并且所述终 端设备的呼吸灯处于关闭状态时, 确定推送数据包的情况下, 将所述数 据包推送至终端设备。 结合第三方面或第三方面的第一至四任一种可能的实现方式, 在第 三方面的第五种可能的实现方式中, 所述获取单元, 还用于获取所述终 端设备的第二屏幕状态信息; 所述确定单元, 还用于根据所述终端设备 的第二屏幕状态信息确定是否推送所述緩存区的数据包; 所述确定单元, 还用于在确定所述终端设备的屏幕处于开启状态的情况下, 确定所述緩 存区是否存储有数据包; 所述发送单元, 还用于在所述緩存区中存储有 数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 结合第三方面或第三方面的第一至四任一种可能的实现方式, 在第 三方面的第六种可能的实现方式中, 所述获取单元, 还用于获取所述终 端设备的第二呼吸灯状态信息; 所述确定单元, 还用于根据所述终端设 备的第二呼吸灯状态信息确定是否推送所述緩存区的数据包; 所述确定 单元, 还用于在所述终端设备的呼吸灯处于关闭状态的情况下, 确定所 述緩存区是否存储有数据包; 所述发送单元, 还用于在所述緩存区中存 储有数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设 备。 结合第三方面或第三方面的第一至六任一种可能的实现方式, 在第 三方面的第七种可能的实现方式中, 所述确定单元, 还用于确定所述緩 存区存储的数据包是否达到第一门限值; 所述发送单元, 还用于在所述 确定单元确定所述緩存区存储的数据包达到所述第 ―门限值的情况下, 将所述緩存区存储的数据包推送至所述终端设备。 结合第三方面或第三方面的第一至七任一种可能的实现方式, 在第 三方面的第八种可能的实现方式中, 所述获取单元, 还用于获取应用的 优先级信息; 所述确定单元, 还用于根据所述数据包, 确定所述数据包 对应的第一应用; 所述确定单元, 还用于获取所述第一应用的优先级信 息, 并根据所述第一应用的优先级信息, 确定所述数据包对应的第一应 用是否有处理优先权; 所述确定单元用于根据所述终端设备的第一状态 信息确定是否推送所述数据包, 具体包括: 所述确定单元在确定所述数 据包对应的第一应用有处理优先权时, 将所述数据包推送至所述终端设 备; 在确定所述数据包对应的第一应用没有处理优先权时, 执行所述根 据所述终端设备的第一状态信息确定是否推送所述数据包。 结合第三方面的第八种可能的实现方式, 在第三方面的第九种可能 的实现方式中, 所述接收单元, 还用于接收所述终端设备发送的第一消 息; 所述第一消息中携带有应用的优先级信息; 所述获取单元用于获取 应用的优先级信息, 具体包括: 所述获取单元用于根据所述接收单元接 收的所述第一消息, 获取所述应用的优先级信息。 结合第三方面或第三方面的第一至九任一种可能的实现方式, 在第 三方面的第十种可能的实现方式中, 所述接收单元, 还用于接收所述终 端设备发送的第二消息; 所述第二消息中携带有所述终端设备的第一状 态信息; 所述获取单元用于获取终端设备的第一状态信息, 具体包括: 所述获取单元用于根据所述接收单元接收的所述第二消息, 获取所述终 端设备的第一状态信息。 第四方面, 本发明实施例提供了一种终端设备, 包括: 获取单元, 发送单元; 所述获取单元, 用于获取终端设备的第一状态信息; 所述第 一状态信息用于标识所述终端设备的状态; 所述第一状态信息包括: 所 述终端设备的第一屏幕状态信息; 所述发送单元, 用于根据所述获取单 元获取的所述终端设备的第一屏幕状态信息,将所述终端设备的第一状 态信息发送至服务器。 在第四方面的第一种可能的实现方式中, 所述发送单元用于根据所 述获取单元获取的所述终端设备的第一屏幕状态信息,将所述终端设备 的第一状态信息发送至服务器, 具体包括: 所述发送单元用于在所述终 端设备的第一屏幕状态信息指示所述终端设备的屏幕处于开启状态时, 向所述服务器发送所述终端设备的第一状态信息; 或者, 在所述终端设 备的第一屏幕状态信息指示所述终端设备的屏幕处于关闭状态时, 根据 第一频率, 向所述服务器发送所述终端设备的第一状态信息。 结合第四方面或第四方面的第一种可能的实现方式, 在第四方面的 第二种可能的实现方式中, 还包括: 确定单元; 所述获取单元, 还用于 获取应用的优先级信息; 所述确定单元, 用于确定所述获取单元获取的 所述应用的优先级信息与已存储的应用的优先级信息是否相同; 所述发 送单元, 还用于在所述确定单元确定获取的所述应用的优先级信息与已 存储的应用的优先级信息不相同时, 将所述应用的优先级信息发送至所 述服务器。 结合第四方面的第二种可能的实现方式, 在第四方面的第三种可能 的实现方式中, 还包括: 处理单元; 所述处理单元, 用于将所述应用的 优先级信息添加至第一消息中; 所述发送单元用于将所述应用的优先级 信息发送至所述服务器, 具体包括: 所述发送单元用于将所述第一消息 发送至所述服务器。 结合第四方面或第四方面的第一至三任一种可能的实现方式, 在第 四方面的第四种可能的实现方式中, 所述处理单元, 还用于将所述终端 设备的第一状态信息添加至第二消息; 所述发送单元用于根据所述获取 单元获取的所述终端设备的第一屏幕状态信息,将所述终端设备的第一 状态信息发送至服务器, 具体包括: 所述发送单元用于根据所述终端设 备的第一屏幕状态信息, 将所述第二消息发送至所述服务器。 结合第四方面或第四方面的第一至四任一种可能的实现方式, 在第 四方面的第五种可能的实现方式中, 还包括: 接收单元; 所述接收单元, 用于接收所述服务器发送的数据包。 第五方面, 本发明实施例提供了一种服务器, 包括: 接收器以及处 理器; 所述接收器, 用于接收数据包; 所述处理器, 用于获取终端设备 的第一状态信息; 所述第一状态信息用于标识所述终端设备的状态; 所 述处理器, 还用于根据所述终端设备的第一状态信息确定是否推送所述 数据包; 所述处理器, 还用于在确定不推送所述数据包时, 将所述数据 包存储至緩存区。 在第五方面的第一种可能的实现方式中, 当所述终端设备的第一状 态信息包括: 所述终端设备的第一呼吸灯状态信息的情况下, 所述处理 器用于根据所述终端设备的第一状态信息确定是否推送所述数据包, 具 体包括: 所述处理器用于根据所述终端设备的第一呼吸灯状态信息确定 是否推送所述数据包; 所述处理器用于在确定不推送所述数据包时, 将 所述数据包存储至緩存区, 具体包括: 所述处理器用于在所述终端设备 的呼吸灯处于开启状态, 确定不推送所述数据包的情况下, 将所述数据 包存储至緩存区。 结合第五方面的第一种可能的实现方式, 在第五方面的第二种可能 的实现方式中, 还包括发送器; 所述发送器, 用于在呼吸灯处于关闭状 态, 确定推送所述数据包的情况下, 将所述数据包推送至终端设备, 并 将所述緩存区的数据推送至终端设备。 结合第五方面, 在第五方面的第三种可能的实现方式中, 当所述终 端设备的第一状态信息包括: 所述终端设备的第一呼吸灯状态信息及所 述终端设备的第一屏幕状态信息的情况下, 所述处理器用于根据所述终 端设备的第一状态信息确定是否推送所述数据包, 具体包括: 所述处理 器用于根据所述终端设备的第一屏幕状态信息, 确定所述终端设备的屏 幕是否处于开启状态; 在所述终端设备的屏幕处于关闭状态的情况下, 根据所述终端设备的第一呼吸灯状态信息确定所述终端设备的呼吸灯是 否处于开启状态; 所述处理器用于在确定不推送所述数据包时, 将所述 数据包存储至緩存区, 具体包括: 所述处理器用于在所述终端设备的屏 幕关闭状态并且所述终端设备的呼吸灯处于开启状态, 确定不推送所述 数据包的情况下, 将所述数据包存储至緩存区。 结合第五方面的第三种可能的实现方式, 在第五方面的第四种可能 的实现方式中, 所述发送器, 还用于在所述终端设备的屏幕处于开启状 态, 确定推送数据包的情况下, 将所述数据包推送至终端设备, 并将所 述緩存区中存储的数据包推送至所述终端设备; 或者, 所述发送器, 还 用于在所述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于关 闭状态时, 确定推送数据包的情况下, 将所述数据包推送至终端设备。 结合第五方面或第五方面的第一至四任一种可能的实现方式, 在第 五方面的第五种可能的实现方式中, 所述处理器, 还用于获取所述终端 设备的第二屏幕状态信息; 所述处理器, 还用于根据所述终端设备的第 二屏幕状态信息确定是否推送所述緩存区的数据包; 所述处理器, 还用 于在所述终端设备的屏幕处于开启状态的情况下, 确定所述緩存区是否 存储有数据包; 所述发送器, 还用于在所述緩存区中存储有数据包的情 况下, 将所述緩存区中存储的数据包推送至所述终端设备。 结合第五方面或第五方面的第一至四任一种可能的实现方式, 在第 五方面的第六种可能的实现方式中, 所述处理器, 还用于获取所述终端 设备的第二呼吸灯状态信息; 所述处理器, 还用于根据所述终端设备的 第二呼吸灯状态信息确定是否推送所述緩存区的数据包; 所述处理器, 还用于在所述终端设备的呼吸灯处于关闭状态的情况下, 确定所述緩存 区是否存储有数据包; 所述发送器, 还用于在所述緩存区中存储有数据 包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 结合第五方面或第五方面的第一至六任一种可能的实现方式, 在第 五方面的第七种可能的实现方式中, 所述处理器, 还用于确定所述緩存 区存储的数据包是否达到第一门限值; 所述发送器, 还用于在确定所述 緩存区存储的数据包达到所述第一门限值的情况下, 将所述緩存区存储 的数据包推送至所述终端设备。 结合第五方面或第五方面的第一至七任一种可能的实现方式, 在第 五方面的第八种可能的实现方式中, 所述处理器, 还用于获取应用的优 先级信息; 所述处理器, 还用于根据所述数据包, 确定所述数据包对应 的第一应用; 所述处理器, 还用于获取所述第一应用的优先级信息, 并 根据所述第一应用的优先级信息, 确定所述数据包对应的第一应用是否 有处理优先权; 所述处理器用于根据所述终端设备的第一状态信息确定 是否推送所述数据包, 具体包括: 所述处理器用于在确定所述数据包对 应的第一应用有处理优先权时, 将所述数据包推送至所述终端设备; 在 确定所述数据包对应的第一应用没有处理优先权时, 执行所述根据所述 终端设备的第一状态信息确定是否推送所述数据包。 结合第五方面的第八种可能的实现方式, 在第五方面的第九种可能 的实现方式中, 所述接收器, 还用于接收所述终端设备发送的第一消息; 所述第一消息中携带有应用的优先级信息; 所述处理器用于获取应用的 优先级信息, 具体包括: 所述处理器用于根据所述接收器接收的所述第 一消息, 获取所述应用的优先级信息。 结合第五方面或第五方面的第一至九任一种可能的实现方式, 在第 五方面的第十种可能的实现方式中, 所述接收器, 还用于接收所述终端 设备发送的第二消息; 所述第二消息中携带有所述终端设备的第一状态 信息; 所述处理器获取终端设备的第一状态信息, 具体包括: 所述处理 器用于根据所述接收器接收的所述第二消息, 获取所述终端设备的第一 状态信息。 第六方面, 本发明实施例提供了一种终端设备, 包括: 处理器, 发 送器;所述处理器, 用于获取终端设备的第一状态信息; 所述第一状态信 息用于标识所述终端设备的状态; 所述第一状态信息包括: 所述终端设 备的第一屏幕状态信息; 所述发送器, 用于根据所述处理器获取的所述 终端设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送至 服务器。 在第六方面的第一种可能的实现方式中, 所述发送器用于根据所述 处理器获取的所述终端设备的第一屏幕状态信息,将所述终端设备的第 一状态信息发送至服务器, 具体包括: 所述发送器用于在所述终端设备 的第一屏幕状态信息指示所述终端设备的屏幕处于开启状态时, 向服务 器发送所述终端设备的第一状态信息; 或者, 在所述终端设备的第一屏 幕状态信息指示所述终端设备的屏幕处于关闭状态时, 根据第一频率, 向服务器发送所述终端设备的第一状态信息。 结合第六方面或第六方面的第一种可能的实现方式, 在第六方面的 第二种可能的实现方式中, 所述处理器, 还用于获取应用的优先级信息; 所述处理器, 还用于确定获取的所述应用的优先级信息与已存储的应用 的优先级信息是否相同; 所述发送器, 还用于在所述处理器确定获取的 所述应用的优先级信息与已存储的应用的优先级信息不相同时, 将所述 应用的优先级信息发送至所述服务器。 结合第六方面的第二种可能的实现方式, 在第六方面的第三种可能 的实现方式中, 所述处理器, 还用于将所述应用的优先级信息添加至第 一消息中; 所述发送器用于将所述终端设备的第一状态信息发送至服务 器, 具体包括: 所述发送器用于将所述第一消息发送至所述服务器。 结合第六方面或第六方面的第一至三任一种可能的实现方式, 在第 六方面的第四种可能的实现方式中, 所述处理器, 还用于将所述终端设 备的第一状态信息添加至第二消息; 所述发送器用于根据所述处理器获 取的所述终端设备的第一屏幕状态信息,将所述终端设备的第一状态信 息发送至服务器, 具体包括: 所述发送器用于根据所述终端设备的第一 屏幕状态信息, 将所述第二消息发送至所述服务器。 结合第六方面或第六方面的第一至第四任一种可能的实现方式, 在 第六方面的第五种可能的实现方式中, 还包括: 接收器; 所述接收器, 用于接收所述服务器发送的数据包。 第七方面, 本发明实施例提供了一种处理数据的系统, 包括: 服务 器, 终端设备; 所述处理器是上述实施例中所述的服务器; 所述终端设 备是上述实施例中所述的终端设备。 本发明实施例提供了一种数据处理的方法、 装置及系统, 服务器在 接收数据包之后, 获取终端设备的第一状态信息, 然后根据所述终端设 备的第一状态信息确定是否推送所述数据包, 若确定不推送所述数据包, 则将所述数据包存储至緩存区。 这样, 服务器接收到应用提供商发送的 多个数据包时, 可以在根据终端设备的状态信息确定不推送数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到数据包时, 均 发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒次数, 进而 降低了移动终端的功耗, 延长了移动终端的待机时间。 SUMMARY OF THE INVENTION Embodiments of the present invention provide a data processing method, apparatus, and system for extending standby time of a mobile terminal by reducing power consumption of the mobile terminal. In order to achieve the above object, an embodiment of the present invention uses the following technical solution: In a first aspect, an embodiment of the present invention provides a data processing method, including: receiving a data packet; acquiring first state information of the terminal device; The first state information is used to identify a state of the terminal device; determining, according to the first state information of the terminal device, whether to push the data packet; if it is determined that the data packet is not pushed, storing the data packet to a cache Area. In a first possible implementation manner of the first aspect, when the first state information of the terminal device includes: the first respiratory light state information of the terminal device, the first state according to the terminal device Determining whether to push the data packet includes: setting according to the terminal The first breathing light state information determines whether to push the data packet; if it is determined that the data packet is not pushed, storing the data packet to the buffer area comprises: if it is determined that the breathing light of the terminal device is turned on In the state, if it is determined that the data packet is not pushed, the data packet is stored in the buffer area. In conjunction with the first possible implementation of the first aspect, in a second possible implementation manner of the first aspect, the method further includes: if it is determined that the respiratory light is in a closed state, determining to push the data packet, The data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. With reference to the first aspect, in a third possible implementation manner of the first aspect, the first state information of the terminal device includes: first respiratory light state information of the terminal device and first Determining whether to push the data packet according to the first state information of the terminal device, according to the first state information of the terminal device, determining, according to the first screen state information of the terminal device, whether the screen of the terminal device is in an open state; If it is determined that the screen of the terminal device is in the off state, determining, according to the first breathing lamp state information of the terminal device, whether the breathing light of the terminal device is in an open state; if it is determined that the data packet is not pushed, Storing the data packet to the buffer area includes: if the screen state of the terminal device is off and the breathing light of the terminal device is in an on state, determining to not push the data packet, storing the data packet to the cache Area. In conjunction with the third possible implementation of the first aspect, in a fourth possible implementation manner of the foregoing aspect, the method further includes: if it is determined that the screen of the terminal device is in an on state, determining to push a data packet, Transmitting the data packet to the terminal device, and pushing the data packet stored in the buffer area to the terminal device; or, if the screen state of the terminal device is off and the breathing light of the terminal device is in the off state, After determining the push packet, the packet is pushed to the terminal device. With reference to the first aspect or the first to fourth possible implementation manners of the first aspect, in a fifth possible implementation manner of the first aspect, if the data packet is determined not to be pushed, After the data packet is stored in the buffer area, the method further includes: acquiring second screen state information of the terminal device; determining, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area; If the screen of the terminal device is in an open state, it is determined whether the buffer area stores a data packet; if the data packet is stored in the buffer area, The data packet stored in the buffer area is pushed to the terminal device. With reference to the first aspect or the first to fourth possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the second respiratory light state information of the terminal device is obtained; Determining, by the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area; if it is determined that the breathing light of the terminal device is in a closed state, determining whether the buffer area stores a data packet; A data packet is stored in the buffer area, and the data packet stored in the buffer area is pushed to the terminal device. With reference to the first aspect or the first to sixth possible implementation manners of the first aspect, in the seventh possible implementation manner of the first aspect, if the data packet is determined not to be pushed, After the data packet is stored in the buffer area, the method further includes: determining whether the data packet stored in the buffer area reaches a first threshold; if the data packet stored in the buffer area reaches the first threshold, The data packet stored in the buffer area is pushed to the terminal device. With reference to the first aspect, or any one of the first to the seventh possible implementation manners of the first aspect, in an eighth possible implementation manner of the first aspect, before receiving the data packet, the method further includes: acquiring an application priority And determining, according to the first state information of the terminal device, whether to push the data packet, the method further includes: determining, according to the data packet, a first application corresponding to the data packet; acquiring the first application a priority information, and determining, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority; determining, according to the status information of the terminal device, whether to push the data packet includes And if it is determined that the first application corresponding to the data packet has processing priority, the data packet is pushed to the terminal device; if it is determined that the first application corresponding to the data packet does not have processing priority, performing the Determining whether to push the data packet according to the first state information of the terminal device. With reference to the eighth possible implementation manner of the first aspect, in the ninth possible implementation manner of the first aspect, the obtaining the priority information of the application includes: receiving the first message sent by the terminal device, The first message carries the priority information of the application; and according to the first message, the priority information of the application is obtained. With reference to the first aspect, or any one of the first to the ninth possible implementation manners of the first aspect, in the tenth possible implementation manner of the first aspect, the acquiring the first state information of the terminal device includes: Decoding a second message sent by the terminal device; carrying the second message The first state information of the terminal device is obtained; and the first state information of the terminal device is obtained according to the second message. In a second aspect, the embodiment of the present invention provides a data processing method, including: acquiring first state information of a terminal device; the first state information is used to identify a state of the terminal device; The first screen state information of the terminal device is sent to: the first state information of the terminal device is sent to the server according to the first screen state information of the terminal device. In a first possible implementation manner of the second aspect, the sending, by the first screen state information of the terminal device, the first state information of the terminal device to the server includes: When the screen state information indicates that the screen of the terminal device is in an open state, the first state information of the terminal device is sent to the server; or, if the first screen state information of the terminal device indicates the terminal device When the screen is in the off state, the first state information of the terminal device is sent to the server according to the first frequency. With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the method further includes: obtaining priority information of the application; determining a priority of the obtained application Whether the information is the same as the priority information of the stored application; if it is determined that the obtained priority information of the application is different from the priority information of the stored application, sending the priority information of the application to the server . In conjunction with the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, before the sending the priority information of the application to the server, the method further includes: The priority information of the application is added to the first message; the sending the priority information of the application to the server comprises: sending the first message to the server. With reference to the second aspect or the first to the third possible implementation manners of the second aspect, in a fourth possible implementation manner of the second aspect, the first screen state information according to the terminal device Before the first state information of the terminal device is sent to the server, the method further includes: adding the first state information of the terminal device to the second message; and the first screen state information according to the terminal device Sending the first status information of the terminal device to the server includes: performing the second cancellation according to the first screen state information of the terminal device Information is sent to the server. With reference to the second aspect or the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, After the first status information of the terminal device is sent to the server, the method further includes: receiving a data packet sent by the server. In a third aspect, an embodiment of the present invention provides a server, including: a receiving unit, an obtaining unit, a determining unit, and a processing unit; the receiving unit is configured to receive a data packet; and the acquiring unit is configured to acquire a terminal device. a first state information; the first state information is used to identify a state of the terminal device; the determining unit is configured to determine, according to the first state information of the terminal device, whether to push the data packet; And storing, when the determining unit determines not to push the data packet, the data packet to a buffer area. In a first possible implementation manner of the third aspect, when the first state information of the terminal device includes: first respiratory light state information of the terminal device, the determining unit is configured to use the Determining whether to push the data packet, the determining unit is configured to determine, according to the first breathing light state information of the terminal device, whether to push the data packet; the processing unit is configured to: When the determining unit determines that the data packet is not to be pushed, storing the data packet to the buffer area, the method specifically includes: the processing unit is configured to: when the breathing light of the terminal device is in an open state, the determining unit determines In the case where the data packet is not pushed, the data packet is stored in the buffer area. In conjunction with the first possible implementation of the third aspect, in a second possible implementation manner of the third aspect, the method further includes: a sending unit, configured to determine, in the determining unit, that the breathing light is off a state, where it is determined that the data packet is pushed, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. With reference to the third aspect, in a third possible implementation manner of the third aspect, the first state information of the terminal device includes: first respiratory light state information of the terminal device and first In the case of the screen state information, the determining unit is configured to determine whether to push the data packet according to the first state information of the terminal device, specifically: the determining unit is configured to use, according to the first screen state of the terminal device Determining whether the screen of the terminal device is in an open state; determining that the screen of the terminal device is in a closed state And determining, by the first breathing lamp state information of the terminal device, whether the breathing light of the terminal device is in an open state; the processing unit is configured to: when the determining unit determines not to push the data packet, The storing of the data packet to the buffer area specifically includes: the processing unit is configured to: when the screen of the terminal device is in a closed state and the breathing light of the terminal device is in an open state, the determining unit determines that the data packet is not pushed. Next, the data packet is stored to the buffer area. With the third possible implementation of the third aspect, in a fourth possible implementation manner of the third aspect, the sending unit is further configured to determine, in the determining unit, that a screen of the terminal device is in an open state And determining, in the case of pushing the data packet, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the sending unit is further configured to When the screen state of the terminal device is off and the breathing lamp of the terminal device is in the off state, in the case of determining to push the data packet, the data packet is pushed to the terminal device. With reference to the third aspect, or any one of the first to the fourth possible implementation manners of the third aspect, in the fifth possible implementation manner of the third aspect, the acquiring unit is further configured to acquire the The determining unit is further configured to determine, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area; the determining unit is further configured to determine the terminal device If the screen is in an open state, determining whether the buffer area stores a data packet; the sending unit is further configured to: when the data packet is stored in the buffer area, the data stored in the buffer area The package is pushed to the terminal device. With reference to the third aspect, or any one of the first to the fourth possible implementation manners of the third aspect, in the sixth possible implementation manner of the third aspect, the acquiring unit is further configured to acquire the The determining unit is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push the data packet of the buffer area; the determining unit is further configured to be used in the terminal device If the breathing light is in the off state, determining whether the buffer area stores a data packet; and the sending unit is further configured to store the data area in the buffer area The data packet is pushed to the terminal device. With reference to the third aspect, or any one of the first to the sixth possible implementation manners of the third aspect, in the seventh possible implementation manner of the third aspect, the determining unit is further configured to determine the Whether the data packet stored in the storage area reaches the first threshold value; the sending unit is further configured to: when the determining unit determines that the data packet stored in the buffer area reaches the first threshold value, The data packet stored in the buffer area is pushed to the terminal device. With reference to the third aspect, or any one of the first to the seventh possible implementation manners of the third aspect, in the eighth possible implementation manner of the third aspect, the acquiring unit is further configured to acquire priority information of the application; The determining unit is further configured to determine, according to the data packet, a first application that is corresponding to the data packet, where the determining unit is further configured to obtain priority information of the first application, and according to the first Determining, by the priority information of the application, whether the first application corresponding to the data packet has a processing priority; the determining unit is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: The determining unit, when determining that the first application corresponding to the data packet has processing priority, pushing the data packet to the terminal device; performing, when determining that the first application corresponding to the data packet has no processing priority Determining whether to push the data packet according to the first state information of the terminal device. With the eighth possible implementation of the third aspect, in a ninth possible implementation manner of the third aspect, the receiving unit is further configured to receive a first message that is sent by the terminal device, where the first The message carries the priority information of the application. The acquiring unit is configured to obtain the priority information of the application, and the method includes: the acquiring unit, configured to acquire, according to the first message received by the receiving unit, the application Priority information. With reference to the third aspect, or any one of the first to the ninth possible implementation manners of the third aspect, in the tenth possible implementation manner of the third aspect, the receiving unit is further configured to receive the sending by the terminal device a second message; the second message carries the first state information of the terminal device; the acquiring unit is configured to acquire the first state information of the terminal device, specifically: the acquiring unit is configured to receive according to the The second message received by the unit acquires first state information of the terminal device. In a fourth aspect, an embodiment of the present invention provides a terminal device, including: an acquiring unit, a sending unit, where the acquiring unit is configured to acquire first state information of the terminal device, where the first state information is used to identify the a state of the terminal device; the first state information includes: first screen state information of the terminal device; the sending unit, configured to: according to the first screen state information of the terminal device acquired by the acquiring unit, The first status information of the terminal device is sent to the server. In a first possible implementation manner of the fourth aspect, the sending unit is configured to send, according to the first screen state information of the terminal device acquired by the acquiring unit, first state information of the terminal device to And the sending unit is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or When the first screen state information of the terminal device indicates that the screen of the terminal device is in a closed state, the first state information of the terminal device is sent to the server according to the first frequency. With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the method further includes: determining a unit, where the acquiring unit is further configured to obtain an application priority The determining unit is configured to determine whether the priority information of the application acquired by the acquiring unit is the same as the priority information of the stored application, and the sending unit is further configured to determine the obtaining in the determining unit. When the priority information of the application is different from the priority information of the stored application, the priority information of the application is sent to the server. In conjunction with the second possible implementation of the fourth aspect, in a third possible implementation manner of the fourth aspect, the method further includes: a processing unit, configured to add priority information of the application to In the first message, the sending unit is configured to send the priority information of the application to the server, specifically: the sending unit is configured to send the first message to the server. With reference to the fourth aspect, or any one of the first to third possible implementation manners of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the processing unit is further configured to: And the sending, by the sending unit, the sending, by the sending unit, the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the acquiring unit, specifically: The sending unit is configured to send the second message to the server according to the first screen state information of the terminal device. With reference to the fourth aspect, or any one of the first to fourth possible implementation manners of the fourth aspect, the fifth possible implementation manner of the fourth aspect, further includes: a receiving unit, The data packet sent by the server. In a fifth aspect, an embodiment of the present invention provides a server, including: a receiver and a The processor is configured to receive a data packet, the processor is configured to acquire first state information of the terminal device, and the first state information is used to identify a state of the terminal device; And determining, according to the first state information of the terminal device, whether to push the data packet; the processor is further configured to: when determining to not push the data packet, store the data packet to a buffer area. In a first possible implementation manner of the fifth aspect, when the first state information of the terminal device includes: first respiratory light state information of the terminal device, the processor is configured to use, according to the terminal Determining whether to push the data packet, the method includes: determining, by the processor, whether to push the data packet according to the first breathing light state information of the terminal device; When the data packet is pushed, the data packet is stored in the buffer area, and the method includes: the processor is configured to: when the breathing light of the terminal device is in an open state, and determine not to push the data packet, The data packet is stored in the buffer area. With reference to the first possible implementation manner of the fifth aspect, in a second possible implementation manner of the fifth aspect, the method further includes: a transmitter, configured to: when the breathing light is in a closed state, determine to push the In the case of a data packet, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. With reference to the fifth aspect, in a third possible implementation manner of the fifth aspect, the first state information of the terminal device includes: first respiratory light state information of the terminal device and first In the case of the screen state information, the determining, by the processor, whether to push the data packet according to the first state information of the terminal device, specifically: the processor is configured to use, according to the first screen state information of the terminal device, Determining whether the screen of the terminal device is in an open state; if the screen of the terminal device is in a closed state, determining, according to the first breathing light state information of the terminal device, whether the breathing light of the terminal device is in an open state The processor is configured to store the data packet to the buffer area when determining that the data packet is not to be pushed, and the method includes: the processor is configured to be in a screen off state of the terminal device and the terminal device breaths When the light is on, it is determined that the data packet is not pushed, and the data packet is stored in the buffer area. In conjunction with the third possible implementation of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the transmitter is further configured to: when the screen of the terminal device is in an open state And determining, in the case of pushing the data packet, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the transmitter is further used in the When the screen state of the terminal device is off and the breathing lamp of the terminal device is in the off state, when the data packet is determined to be pushed, the data packet is pushed to the terminal device. With reference to the fifth aspect or the first to the fourth possible implementation manners of the fifth aspect, in a fifth possible implementation manner of the fifth aspect, the processor is further configured to acquire the a second screen state information; the processor, configured to determine, according to the second screen state information of the terminal device, whether to push a data packet of the buffer area; the processor is further configured to be used on a screen of the terminal device In the case of being in an open state, determining whether the buffer area stores a data packet; and the transmitter is further configured to: when the data packet is stored in the buffer area, store the data packet in the buffer area Pushed to the terminal device. With reference to the fifth aspect or the first to the fourth possible implementation manners of the fifth aspect, in a sixth possible implementation manner of the fifth aspect, the processor is further configured to acquire the terminal device The second breathing lamp state information is further configured to: determine, according to the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area; the processor is further configured to be in the terminal device If the breathing light is in the off state, determining whether the buffer area stores a data packet; the transmitter is further configured to store the data area in the buffer area, where the buffer area is stored The data packet is pushed to the terminal device. With reference to the fifth aspect, or any one of the first to the sixth possible implementation manners of the fifth aspect, in a seventh possible implementation manner of the fifth aspect, the processor is further configured to determine that the buffer area is stored Whether the data packet reaches the first threshold; the transmitter is further configured to: when determining that the data packet stored in the buffer area reaches the first threshold, push the data packet stored in the buffer area To the terminal device. With reference to the fifth aspect, or any one of the first to the seventh possible implementation manners of the fifth aspect, in the eighth possible implementation manner of the fifth aspect, the processor is further configured to acquire priority information of the application; The processor is further configured to determine, according to the data packet, a first application that is corresponding to the data packet, where the processor is further configured to acquire priority information of the first application, and according to the first Determining, by the priority information of the application, whether the first application corresponding to the data packet has a processing priority; the determining, by the processor, determining whether to push the data packet according to the first state information of the terminal device, specifically: a processor for determining the pair of data packets When the first application has a processing priority, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing the first state according to the terminal device The information determines whether to push the packet. With reference to the eighth possible implementation manner of the fifth aspect, in a ninth possible implementation manner of the fifth aspect, the receiver is further configured to receive a first message that is sent by the terminal device, where the first The message carries the priority information of the application; the processor is configured to obtain the priority information of the application, and the method is specifically configured to: obtain, by the processor, the priority of the application according to the first message received by the receiver information. With reference to the fifth aspect, or any one of the first to the ninth possible implementation manners of the fifth aspect, in the tenth possible implementation manner of the fifth aspect, the receiver is further configured to receive the sending by the terminal device a second message; the second message carries the first state information of the terminal device; the acquiring, by the processor, the first state information of the terminal device, specifically: the processor is configured to receive according to the receiver The second message acquires first state information of the terminal device. According to a sixth aspect, an embodiment of the present invention provides a terminal device, including: a processor, a transmitter, where the processor is configured to acquire first state information of the terminal device, where the first state information is used to identify the a state of the terminal device; the first state information includes: first screen state information of the terminal device; the transmitter, configured to: according to the first screen state information of the terminal device acquired by the processor, The first status information of the terminal device is sent to the server. In a first possible implementation manner of the sixth aspect, the transmitter is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the processor Specifically, the transmitter is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or When the first screen state information of the terminal device indicates that the screen of the terminal device is in the off state, the first state information of the terminal device is sent to the server according to the first frequency. With reference to the sixth aspect, or the first possible implementation manner of the sixth aspect, in a second possible implementation manner of the sixth aspect, the processor is further configured to acquire priority information of the application; The processor is further configured to determine whether the obtained priority information of the application is the same as the priority information of the stored application, where the transmitter is further configured to determine, by the processor, the acquired application When the priority information is different from the priority information of the stored application, the priority information of the application is sent to the server. With the second possible implementation of the sixth aspect, in a third possible implementation manner of the sixth aspect, the processor is further configured to add the priority information of the application to the first message; The sending, by the sender, the first status information of the terminal device to the server, specifically: the sending, by the sender, sending the first message to the server. With reference to the sixth aspect, or any one of the first to the third possible implementation manners of the sixth aspect, in a fourth possible implementation manner of the sixth aspect, the processor is further configured to: a state information is added to the second message; the sender is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor, specifically: The transmitter is configured to send the second message to the server according to the first screen state information of the terminal device. With reference to the sixth aspect, the first to the fourth possible implementation manner of the sixth aspect, the fifth possible implementation manner of the sixth aspect, further includes: a receiver; the receiver, configured to receive The data packet sent by the server. In a seventh aspect, the embodiment of the present invention provides a system for processing data, including: a server, a terminal device; the processor is a server described in the foregoing embodiment; the terminal device is described in the foregoing embodiment. Terminal Equipment. An embodiment of the present invention provides a data processing method, apparatus, and system. After receiving a data packet, the server acquires first state information of the terminal device, and then determines whether to push the data according to the first state information of the terminal device. The packet, if it is determined that the data packet is not pushed, stores the data packet in a buffer area. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal.
附图说明 为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现 有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明实施例提供的一种数据处理方法的流程示意图; 图 2为本发明实施例提供的另一种数据处理方法的流程示意图; 图 3为本发明实施例提供的另一种数据处理方法的流程示意图; 图 4为本发明实施例提供的另一种数据处理方法的流程示意图; 图 5为本发明实施例提供的一种服务器的功能示意图; 图 6为本发明实施例提供的一种终端设备的功能示意图; 图 7为本发明实施例提供的另一种终端设备的功能示意图; 图 8为本发明实施例提供的另一种终端设备的功能示意图; 图 9为本发明实施例提供的另一种终端设备的功能示意图; 图 1 0为本发明实施例提供的一种服务器的结构示意图; 图 1 1为本发明实施例提供的一种终端设备的结构示意图; 图 1 2为本发明实施例提供的另一种终端设备的结构示意图; 图 1 3为本发明实施例提供的一种数据处理的系统的结构示意图。 具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案 进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实 施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术 人员在没有做出创造性劳动前提下所获得的所有其他实施例, 都属于本 发明保护的范围。 本发明实施例提供了一种数据处理的方法, 如图 1所示, 包括:DRAWINGS In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work. 1 is a schematic flowchart of a data processing method according to an embodiment of the present invention; FIG. 2 is a schematic flowchart of another data processing method according to an embodiment of the present invention; FIG. 3 is another data provided by an embodiment of the present invention. Figure 4 is a schematic flowchart of another data processing method according to an embodiment of the present invention; Figure 5 is a schematic diagram of a function of a server according to an embodiment of the present invention; FIG. 7 is a schematic diagram of functions of another terminal device according to an embodiment of the present invention; FIG. 8 is a schematic diagram of another terminal device according to an embodiment of the present invention; FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present invention; FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention; FIG. 13 is a schematic structural diagram of another terminal device according to an embodiment of the present invention; FIG. Configuration of FIG. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention. The embodiment of the invention provides a data processing method, as shown in FIG. 1 , including:
1 01、 接收数据包。 具体的, 在终端设备运行应用程序时, 需要通过为终端设备提供服 务的服务器将应用提供商传输的数据包传输至终端设备, 此时为所述终 端设备提供服务的服务器要接收应用提供商传输的有关所述应用程序的 数据包。 1 01, Receive data packets. Specifically, when the terminal device runs the application, the data packet transmitted by the application provider needs to be transmitted to the terminal device by using the server that provides the service for the terminal device, where The server that the end device provides services is to receive data packets transmitted by the application provider regarding the application.
1 02、 获取终端设备的第一状态信息。 其中, 所述第一状态信息用于标识所述终端设备的状态。 所述终端设备的第一状态信息包括所述终端设备的第一屏幕状态信 息, 或所述终端设备的第一屏幕状态信息及所述终端设备的第一呼吸灯 状态信息。 需要说明的是, 所述终端设备的第一状态信息是所述终端设备处于 第一时刻的状态信息。 所述终端设备的第一屏幕状态信息用于标识所述 终端设备在第一时刻的屏幕是处于关闭还是开启状态的信息。 所述终端 设备的第一呼吸灯状态信息用于标识所述终端设备在第一时刻的呼吸灯 是处于关闭还是开启状态的信息。 需要说明的是, 当屏幕处于开启状态时, 则说明用户正在使用所述 终端设备; 当屏幕处于关闭状态时, 则说明该终端设备处于待机状态, 用户没有正在使用该设备。 需要说明的是, 当呼吸灯处于开启状态时, 则说明用户已经知道有 新的消息到达; 当呼吸灯处于关闭状态时, 则说明没有新的消息到达该 终端设备。 需要说明的是, 所述终端设备的状态信息是随时可能变化的, 所以 服务器获取的终端设备的第一状态信息是需要及时更新的, 也就是说, 只要终端设备处于待机状态下, 终端设备的状态信息是需要持续发送给 服务器的。 进一步的, 获取终端设备的第一状态信息包括接收所述终端设备发 送的第二消息, 所述第二消息中携带有所述终端设备的第一状态信息。 根据所述第二消息, 获取所述终端设备的第一状态信息。 具体的, 终端设备可以将终端设备的第一状态信息添加到现有技术 中已经存在的终端设备能够发送给服务器的某一个消息中组成第二消 息, 终端设备将所述第二消息发送给服务器, 服务器在接收到第二消息 后, 对第二消息进行解析, 从而获取所述终端设备的第一状态信息。 可选的, 所述某一个消息可以是现有技术中的原始心跳包。 可选的, 所述第二消息可以是心跳包。 需要说明的是, 本发明实施例中的心跳包是在原始心跳包中添加了 终端设备状态信息的特殊心跳包。 需要说明的是, 所述第二消息还可以是其他已有消息, 本文发明对 此不做限制。 1 02. Obtain first state information of the terminal device. The first state information is used to identify a state of the terminal device. The first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device. It should be noted that the first state information of the terminal device is state information that the terminal device is at the first time. The first screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a first moment. The first breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a first moment. It should be noted that when the screen is in the on state, the user is using the terminal device; when the screen is in the off state, the terminal device is in the standby state, and the user is not using the device. It should be noted that when the breathing light is on, it means that the user already knows that a new message arrives; when the breathing light is off, it means that no new message arrives at the terminal device. It should be noted that the status information of the terminal device may change at any time, so the first state information of the terminal device acquired by the server needs to be updated in time, that is, as long as the terminal device is in the standby state, the terminal device Status information needs to be continuously sent to the server. Further, the acquiring the first state information of the terminal device includes receiving the second message sent by the terminal device, where the second message carries the first state information of the terminal device. Obtaining, according to the second message, first state information of the terminal device. Specifically, the terminal device may add the first state information of the terminal device to a message that the terminal device that is already existing in the prior art can send to the server to form a second message, and the terminal device sends the second message to the server. After receiving the second message, the server parses the second message to obtain the first state information of the terminal device. Optionally, the one message may be an original heartbeat packet in the prior art. Optionally, the second message may be a heartbeat packet. It should be noted that the heartbeat packet in the embodiment of the present invention is a special heartbeat packet in which the terminal device state information is added to the original heartbeat packet. It should be noted that the second message may also be other existing messages, and the invention does not limit this.
1 03、 根据所述终端设备的第一状态信息确定是否推送所述数据包。 具体的, 服务器接收到数据包后, 根据从终端设备发送来的已经存 储在服务器中的终端设备的第一屏幕状态信息, 或者第一屏幕状态信息 及第一呼吸灯状态信息, 判断是否向终端设备推送该数据包。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述服务器根据终端设备的第一状态信息确定是否推送所述数据包可以 分为两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息时, 根据所述终端设备的第一呼吸灯状态信息确定 是否推送所述数据包。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息时, 根据所述 终端设备的第一屏幕状态信息, 确定所述终端设备的屏幕是否处于开启 状态。 若确定所述终端设备的屏幕处于关闭状态, 则根据所述终端设备 的第一呼吸灯状态信息确定所述终端设备的呼吸灯是否处于开启状态。 具体的, 服务器先根据第一屏幕状态信息, 判断终端设备的屏幕是 否处于开启状态, 若终端设备的屏幕处于开启状态, 则确定推送数据包。 若终端设备的屏幕处于关闭状态, 则继续判断终端设备的呼吸灯是否处 于开启状态, 若终端设备的呼吸灯处于关闭状态, 则确定推送该数据包。 若终端设备的呼吸灯处于开启状态, 则确定不推送该数据包。 需要说明的是, 服务器若确定终端设备的屏幕处于开启状态时, 并 不需要继续判断第一呼吸灯的状态, 而是直接确定推送数据包。 需要说明的是, 当终端设备的屏幕处于开启状态时, 则说明用户正 在使用该终端设备, 此时, 服务器需要将数据包及时推送给终端设备以 便用户能够及时接收到新的消息。 当终端设备的屏幕处于关闭状态且终 端设备的呼吸灯处于关闭状态时, 则说明用户在没有正在使用该终端设 备并且没有消息已经传送给终端设备, 服务器确定推送数据包, 以通知 用户已经有新的消息到达。 当终端设备的屏幕处于关闭状态且终端设备 的呼吸灯处于开启状态时, 则说明用户没有正在使用该终端设备, 但是 已经有新消息到达, 并且用户不急于查看新的消息, 此时, 服务器确定 不发送数据包。 需要说明的是, 服务器根据确定的结果不同, 下面执行的步骤不同。 若服务器确定不推送所述数据包, 则执行步骤 1 04 , 若服务器确定推送所 述数据包, 则执行步骤 1 05。 1 03. Determine, according to the first state information of the terminal device, whether to push the data packet. Specifically, after receiving the data packet, the server determines, according to the first screen state information of the terminal device that has been stored in the server that is sent from the terminal device, or the first screen state information and the first respiratory light state information, whether to determine whether to the terminal The device pushes the packet. It should be noted that, according to the content included in the first state information of the terminal device, whether the server determines whether to push the data packet according to the first state information of the terminal device may be classified into two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, determining whether to push the data packet according to the first breathing lamp state information of the terminal device. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, according to the first screen state of the terminal device Information, determining whether the screen of the terminal device is in an open state. If it is determined that the screen of the terminal device is in the off state, determining whether the breathing light of the terminal device is in an open state according to the first breathing lamp state information of the terminal device. Specifically, the server first determines, according to the first screen state information, whether the screen of the terminal device is in an open state, and if the screen of the terminal device is in an open state, determining to push the data packet. If the screen of the terminal device is in the off state, it is further determined whether the breathing lamp of the terminal device is in an open state, and if the breathing lamp of the terminal device is in the off state, it is determined to push the data packet. If the breathing light of the terminal device is in the on state, it is determined that the data packet is not pushed. It should be noted that, if the server determines that the screen of the terminal device is turned on, It is not necessary to continue to judge the state of the first breathing lamp, but to directly determine the push packet. It should be noted that when the screen of the terminal device is in the on state, the user is using the terminal device. At this time, the server needs to push the data packet to the terminal device in time so that the user can receive the new message in time. When the screen of the terminal device is in the off state and the breathing light of the terminal device is in the off state, it indicates that the user is not using the terminal device and no message has been transmitted to the terminal device, and the server determines to push the data packet to notify the user that there is new The news arrived. When the screen of the terminal device is in the off state and the breathing light of the terminal device is in the on state, it indicates that the user is not using the terminal device, but a new message has arrived, and the user is not eager to view the new message. At this time, the server determines Do not send packets. It should be noted that the server performs different steps according to the determined result. If the server determines not to push the data packet, step 104 is performed. If the server determines to push the data packet, step 105 is performed.
1 04、 若确定不推送所述数据包, 则将所述数据包存储至緩存区。 具体的, 服务器在根据所述终端设备的第一状态信息确定不推送所 述数据包的情况下, 则将所述数据包存储到服务器的緩存区中。 需要说明的是,服务器的緩存区的数据包只是暂时存储在服务器中, 当检测到满足緩存区的触发条件时, 服务器会将緩存区緩存的所有数据 全部发送给终端设备。 需要说明的是, 所述触发发送緩存区的数据的条件有两个, 第一个 触发条件是緩存区中緩存的数据总量已经达到预设定第一门限值, 第二 个触发条件是当服务器根据终端设备的第二屏幕状态信息或第二呼吸灯 状态信息判断是否推送緩存区的存储的数据。 只要满足这两种触发条件 中的任意一种, 服务器都需要将緩存区中存储的数据全部发送给终端设 备。 需要说明的是, 所述第一门限值是服务器出厂前根据服务器内存的 大小确定的緩存区的门限值, 表示服务器能够緩存的需要发送给一个终 端设备的数据量的最大值。 需要说明的是, 所述终端设备的第二屏幕状态信息用于标识所述终 端设备在第二时刻的屏幕是处于关闭还是开启状态的信息。 所述终端设 备的第二呼吸灯状态信息用于标识所述终端设备在第二时刻的呼吸灯是 处于关闭还是开启状态的信息。 需要说明的是, 第一时刻与第二时刻是不同的时刻。 第一时刻是当 有数据到达服务器的时刻。 第二时刻是第一时刻之后, 没有数据到达服 务器, 且服务器接收到终端的状态信息的时刻。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述若确定不推送所述数据包, 则将所述数据包存储至緩存区有两种情 况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息时, 若确定所述终端设备的呼吸灯处于开启状态时, 确定不推送所述数据包, 则将所述数据包存储至緩存区。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息时, 若所述终 端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于开启状态, 确定 不推送所述数据包, 则将所述数据包存储至緩存区。 本发明实施例提供了一种数据处理的方法, 服务器在接收数据包之 后, 获取终端设备的第一状态信息, 然后根据所述终端设备的第一状态 信息确定是否推送所述数据包, 若确定不推送所述数据包, 则将所述数 据包存储至緩存区。 这样, 服务器接收到应用提供商发送的多个数据包 时, 可以在根据终端设备的状态信息确定不推送数据包时, 将接收到的 数据包存储至緩存区中, 从而无需在每次接到数据包时, 均发送至终端 设备, 减少了终端设备的 AP和调制解调器被唤醒次数, 进而降低了移动 终端的功耗, 延长了移动终端的待机时间。 本发明实施例提供了一种数据处理的方法, 如图 2所示, 包括: 2 01、 获取终端设备的第一状态信息。 其中, 所述终端设备的第一状态信息包括所述终端设备的第一屏幕 状态信息, 或所述终端设备的第一屏幕状态信息及所述终端设备的第一 呼吸灯状态信息。 具体的, 终端设备的状态信息是随时可能变化的, 第一状态信息是 需要及时更新的, 也就是说, 只要终端设备处于待机状态下, 终端设备 每过一段时间就会获取一次状态信息。 需要说明的是, 所述终端设备的第一状态信息是所述终端设备处第 ―时刻的状态信息, 所述终端设备的第一屏幕状态信息用于标识所述终 端设备在第一时刻的屏幕是处于关闭还是开启状态的信息。 所述终端设 备的第一呼吸灯状态信息用于标识所述终端设备在第一时刻的呼吸灯是 处于关闭还是开启状态的信息。 需要说明的是, 当屏幕处于开启状态时, 则说明用户正在使用所述 终端设备; 当屏幕处于关闭状态时, 则说明该终端设备只是处于待机状 态, 用户并没有正在使用该设备。 需要说明的是, 当呼吸灯处于开启状态时, 则说明用户已经知道有 新的消息到达; 当呼吸灯处于关闭状态时, 则说明没有新的消息到达该 终端设备。 1 04. If it is determined that the data packet is not pushed, the data packet is stored in a buffer area. Specifically, if the server determines, according to the first state information of the terminal device, that the data packet is not pushed, the server stores the data packet in a buffer area of the server. It should be noted that the data packet of the buffer area of the server is only temporarily stored in the server. When detecting the trigger condition that satisfies the buffer area, the server sends all the data buffered by the buffer area to the terminal device. It should be noted that there are two conditions for triggering the data of the transmission buffer area. The first trigger condition is that the total amount of data buffered in the buffer area has reached the preset first threshold value, and the second trigger condition is When the server determines, according to the second screen state information of the terminal device or the second breathing lamp state information, whether to store the stored data of the buffer area. As long as either of the two trigger conditions is met, the server needs to send all the data stored in the buffer to the terminal device. It should be noted that the first threshold is a threshold of a buffer determined according to the size of the server memory before the server leaves the factory, and indicates a maximum amount of data that the server can buffer to be sent to a terminal device. It should be noted that the second screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a second time. The second breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a second moment. It should be noted that the first time and the second time are different times. The first moment is when there is data arriving at the server. The second time is the time after the first time, when no data arrives at the server, and the server receives the status information of the terminal. It should be noted that, according to different content included in the first state information of the terminal device, if it is determined that the data packet is not pushed, there are two cases in which the data packet is stored in the buffer area. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, if it is determined that the breathing lamp of the terminal device is in an open state, it is determined that the data packet is not pushed. , the data packet is stored to the buffer area. In the second case, when the first state information of the terminal device includes the first breathing light state information of the terminal device and the first screen state information of the terminal device, if the screen state of the terminal device is off and The breathing light of the terminal device is in an open state, and if it is determined that the data packet is not pushed, the data packet is stored in a buffer area. An embodiment of the present invention provides a data processing method. After receiving a data packet, the server acquires first state information of the terminal device, and then determines whether to push the data packet according to the first state information of the terminal device, if If the data packet is not pushed, the data packet is stored in the buffer area. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal. An embodiment of the present invention provides a data processing method. As shown in FIG. 2, the method includes: 2 01. Acquire first state information of a terminal device. The first state information of the terminal device includes a first screen of the terminal device Status information, or first screen state information of the terminal device and first breathing light state information of the terminal device. Specifically, the status information of the terminal device may change at any time, and the first state information needs to be updated in time, that is, as long as the terminal device is in the standby state, the terminal device acquires the state information once every time. It should be noted that the first state information of the terminal device is state information of the first time at the terminal device, and the first screen state information of the terminal device is used to identify the screen of the terminal device at the first time. Is information that is off or on. The first breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at a first moment. It should be noted that when the screen is in the on state, the user is using the terminal device; when the screen is in the off state, the terminal device is only in the standby state, and the user is not using the device. It should be noted that when the breathing light is on, it means that the user already knows that a new message arrives; when the breathing light is off, it means that no new message arrives at the terminal device.
202、 根据所述终端设备的第一屏幕状态信息,将所述终端设备的第 一状态信息发送至服务器。 具体的, 终端设备在获取了第一状态信息后, 根据第一状态信息中 的第一屏幕状态信息, 确定以何种方式将所述第一状态信息推送至服务 器。 进一步的,所述根据所述终端设备的第一屏幕状态信息,将所述终端 设备的第一状态信息发送至服务器包括: 若所述终端设备的第一屏幕状 态信息指示所述终端设备的屏幕处于开启状态, 则向服务器发送所述终 端设备的第一状态信息; 若所述终端设备的第一屏幕状态信息指示所述 终端设备的屏幕处于关闭状态, 则根据第一频率, 向服务器发送所述终 端设备的第一状态信息。 需要说明的是, 由于当所述终端设备的屏幕处于开启状态时, 用户 正在使用该终端设备, 所以需要将所述终端设备的第一状态信息立即发 送至服务器, 以便服务器在接收到所述终端设备的第一状态信息后, 将 緩存区的数据立即发送至所述终端设备。 需要说明的是, 所述根据第一频率, 向服务器发送所述终端设备的 第一状态信息, 即以固定的时间间隔, 将所述终端设备的第一状态信息 发送至服务器。 需要说明的是, 由于所述终端设备的屏幕处于关闭状态时, 终端设 备以一定频率将所述终端设备的第一状态信息发送至服务器, 以便服务 器在接收到所述终端设备的第一状态信息后, 判断将接收到的数据包进 行緩存还是发送至终端设备。 本发明实施例提供了一种数据处理的方法, 终端设备在获取自身的 第一状态信息后, 将所述终端设备的第一状态信息发送给服务器, 以使 得服务器根据所述终端设备的第一状态信息确定是将接收到的数据包发 给终端设备, 还是将数据包存储至緩存区中, 这样, 服务器接收到应用 提供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推 送数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到 数据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤 醒次数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 本发明实施例提供了一种数据处理的方法, 如图 3 , 图 4 所示, 包 括: 202. Send first state information of the terminal device to a server according to the first screen state information of the terminal device. Specifically, after acquiring the first state information, the terminal device determines, according to the first screen state information in the first state information, how to push the first state information to the server. Further, the sending, according to the first screen state information of the terminal device, the first state information of the terminal device to the server includes: if the first screen state information of the terminal device indicates the screen of the terminal device When the first screen state information of the terminal device indicates that the screen of the terminal device is in the off state, the first state information of the terminal device is sent to the server according to the first frequency. The first state information of the terminal device. It should be noted that, when the screen of the terminal device is in the open state, the user The terminal device is being used, so the first state information of the terminal device needs to be immediately sent to the server, so that after receiving the first state information of the terminal device, the server immediately sends the data of the buffer zone to the terminal. device. It should be noted that, according to the first frequency, the first state information of the terminal device is sent to the server, that is, the first state information of the terminal device is sent to the server at a fixed time interval. It should be noted that, when the screen of the terminal device is in the off state, the terminal device sends the first state information of the terminal device to the server at a certain frequency, so that the server receives the first state information of the terminal device. After that, it is judged whether the received data packet is buffered or sent to the terminal device. An embodiment of the present invention provides a data processing method, after receiving the first state information of the terminal device, the terminal device sends the first state information of the terminal device to the server, so that the server is configured according to the first The status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device. When the data packet is not pushed, the received data packet is stored in the buffer area, so that it is not required to be sent to the terminal device every time the data packet is received, thereby reducing the number of times the AP and the modem of the terminal device are awakened, thereby reducing the number of times. The power consumption of the mobile terminal extends the standby time of the mobile terminal. An embodiment of the present invention provides a data processing method, as shown in FIG. 3 and FIG. 4, including:
301、 终端设备获取应用的优先级信息。 需要说明的是, 所述应用的优先级信息是用于标识终端设备上安装 的应用程序的处理优先权的信息。 当所述应用的优先级信, I,标识为有处 理优先权时, 服务器需要将接收到的该应用对应的数据包立即推送至终 端设备; 当所述应用的优先级信息标识为没有处理优先权时, 就要根据 所述终端设备的第一状态信息确定是否推送该数据包。 需要说明的是, 在本发明所有实施例中, 所述应用的优先级信息均 包含了终端设备上安装的所有应用的优先级信息。 需要说明的是, 终端设备可以在终端设备出厂前设置每个应用的优 先级信息, 也可以通过用户对每个应用的优先级信息进行配置。 301. The terminal device acquires priority information of the application. It should be noted that the priority information of the application is information for identifying the processing priority of the application installed on the terminal device. When the priority information of the application, I, is identified as having processing priority, the server needs to push the received data packet corresponding to the application to the terminal device immediately; when the priority information of the application is marked as having no processing priority And determining, according to the first state information of the terminal device, whether to push the data packet. It should be noted that, in all embodiments of the present invention, the priority information of the application includes priority information of all applications installed on the terminal device. It should be noted that the terminal device can set the priority of each application before the terminal device leaves the factory. The pre-level information can also be configured by the user for the priority information of each application.
302、终端设备确定获取的应用的优先级信息与存储的应用的优先级 信息是否相同。  302. The terminal device determines whether the priority information of the acquired application is the same as the priority information of the stored application.
需要说明的是, 由于用户可以对每个应用的优先级信息进行配置, 所以应用的优先级是可能变化的, 所以在发生变化时, 需要确定更改后 的应用的优先级信息与存储的应用的优先级信息是否相同。 需要说明的是, 所述存储的应用的优先级信息可能是终端设备出厂 前设置的默认应用优先级, 还可能是所述终端设备的用户上次设定的应 用的优先级信息。 需要说明的是, 所述终端设备已经存储的应用的优先级信息与所述 服务器存储的该终端设备的应用优先级信息是一致的。 需要说明的是, 终端设备根据确定的结果不同, 执行的步骤不同。 若确定出获取的应用的优先级信息与存储的应用的优先级信息不同, 则 执行步骤 303。若确定出获取的应用的优先级信息与存储的应用的优先级 信息相同, 则跳过步骤 303 , 直接执行后续步骤。 。  It should be noted that, since the user can configure the priority information of each application, the priority of the application may change, so when the change occurs, it is necessary to determine the priority information of the changed application and the stored application. The priority information is the same. It should be noted that the priority information of the stored application may be the default application priority set by the terminal device before leaving the factory, and may also be the priority information of the application set by the user of the terminal device last time. It should be noted that the priority information of the application that has been stored by the terminal device is consistent with the application priority information of the terminal device that is stored by the server. It should be noted that the terminal device performs different steps according to the determined result. If it is determined that the priority information of the acquired application is different from the priority information of the stored application, step 303 is performed. If it is determined that the priority information of the acquired application is the same as the priority information of the stored application, step 303 is skipped, and the subsequent steps are directly performed. .
303、若确定出获取的应用的优先级信息与存储的应用的优先级信息 不同, 则更新存储的应用的优先级信息, 并将获取的应用的优先级信息 添加至第一消息。 需要说明的是, 由于用户是在所述终端设备上更新的终端设备的每 一项应用的优先级信息, 但是服务器需要使用所述终端设备的应用的优 先级信息, 所以需要将所述终端设备的应用优先级信息及时发送给服务 器。 需要说明的是, 所述第一消息是现有技术中已经存在的能够从终端 设备发送给服务器的一种消息。 需要说明的是, 所述第一消息可以是心跳包, 还可以是其他已有消 息, 本文发明对此不做限制。 303. If it is determined that the priority information of the obtained application is different from the priority information of the stored application, update the priority information of the stored application, and add the obtained priority information of the application to the first message. It should be noted that, since the user is the priority information of each application of the terminal device updated on the terminal device, but the server needs to use the priority information of the application of the terminal device, the terminal device needs to be used. The application priority information is sent to the server in time. It should be noted that the first message is a message that is already in the prior art and can be sent from the terminal device to the server. It should be noted that the first message may be a heartbeat packet, and may be other existing messages. The invention does not limit this.
304、 终端设备获取终端设备的第一状态信息。 具体的, 可参考在步骤 201 , 在此不再赘述。 305、 终端设备将所述终端设备的第一状态信息添加至第二消息。 需要说明的是, 所述第二消息也是现有技术中已经存在的能够从终 端设备发送给服务器的一种消息。 需要说明的是, 所述第一消息和第二消息可以是同一个消息, 也可 以是不同的消息。 当所述第一消息和第二消息是同一个消息时, 所述消 息不仅携带有应用的优先级信息, 还携带有终端设备的第一状态信息。 可选的, 所述第二消息可以是心跳包。 需要说明的是, 所述第二消息还可以是其他已有消息, 本文发明对 此不做限制。 需要说明的是, 本发明实施例中, 以第一消息和第二消息相同, 且 都为心跳包为例进行说明。 具体的, 终端设备将应用的优先级信息和终端设备的第一状态信息 都添加到心跳包中, 将此心跳包发送给服务器。 此时服务器接收到的心 跳包为携带有应用的优先级信息和终端设备的第一状态信息的特殊心跳 包。 示例性的, 第二消息和第一消息同为心跳包, 终端设备自定义一个 3字节的自有协议,用来携带终端设备的第一状态信息和应用的优先级信 息。 终端设备将该自有协议添加到心跳包中, 将此心跳包发送给服务器。 该自有协议的格式为: 第一字节的前六比特为协议标识, 用于在服务器 接收到该心跳包后, 通过协议标识能够解析出终端设备的第一状态信息 和应用的优先级信息。 第一字节的第七与第八比特为第一状态信息, 其 中, 第七比特为终端设备的第一屏幕状态信息, 分别用 0表示终端设备 的屏幕处于关闭状态, 用 1 表示终端设备的屏幕处于开启状态。 第八比 特为终端设备的第一呼吸灯状态信息, 分别用 0 表示终端设备的呼吸灯 处于关闭状态, 用 1 表示终端设备的呼吸灯处于开启状态。 第二字节及 第三字节表示应用的优先级信息, 其中, 第二字节用来标识各项应用在 终端设备中的编号, 第三字节用于标识应用的优先级。 需要说明的是, 步骤 301-303与步骤 304- 305是没有顺序的, 可以 先执行步骤 301-303 ,然后执行步骤 304-305 ;也可以先执行步骤 304-305 , 然后执行步骤 301-303 ; 还可以步骤 301-303和步骤 304-305同时执行。 本发明实施例是以先执行步骤 301 -303 , 然后执行步骤 304-305为例。 304. The terminal device acquires first state information of the terminal device. For details, refer to step 201, and details are not described herein again. 305. The terminal device adds the first state information of the terminal device to the second message. It should be noted that the second message is also a message that can be sent from the terminal device to the server that exists in the prior art. It should be noted that the first message and the second message may be the same message, or may be different messages. When the first message and the second message are the same message, the message carries not only the priority information of the application but also the first state information of the terminal device. Optionally, the second message may be a heartbeat packet. It should be noted that the second message may also be other existing messages, and the invention does not limit this. It should be noted that, in the embodiment of the present invention, the first message and the second message are the same, and both are heartbeat packets as an example. Specifically, the terminal device adds the priority information of the application and the first state information of the terminal device to the heartbeat packet, and sends the heartbeat packet to the server. At this time, the heartbeat packet received by the server is a special heartbeat packet carrying the priority information of the application and the first state information of the terminal device. Exemplarily, the second message and the first message are both heartbeat packets, and the terminal device customizes a 3-byte self-protocol to carry the first state information of the terminal device and the priority information of the application. The terminal device adds the own protocol to the heartbeat packet, and sends the heartbeat packet to the server. The format of the own protocol is: the first six bits of the first byte are protocol identifiers, and are used to parse the first state information of the terminal device and the priority information of the application by using the protocol identifier after the server receives the heartbeat packet. . The seventh and eighth bits of the first byte are the first state information, wherein the seventh bit is the first screen state information of the terminal device, where 0 indicates that the screen of the terminal device is in the off state, and 1 indicates the terminal device. The screen is on. The eighth bit is the first breathing lamp state information of the terminal device, and 0 is used to indicate that the breathing lamp of the terminal device is in the off state, and 1 is used to indicate that the breathing lamp of the terminal device is in the on state. The second byte and the third byte represent the priority information of the application, wherein the second byte is used to identify the number of each application in the terminal device, and the third byte is used to identify the priority of the application. It should be noted that steps 301-303 and steps 304-305 are not sequential, and Steps 301-330 are performed first, then steps 304-305 are performed; steps 304-305 may be performed first, then steps 301-303 may be performed; steps 301-303 and steps 304-305 may also be performed simultaneously. In the embodiment of the present invention, steps 301-303 are performed first, and then steps 304-305 are performed as an example.
306、 终端设备根据所述终端设备的第一屏幕状态信息,将所述特殊 心跳包发送至服务器, 服务器接收所述特殊心跳包。 具体的, 终端设备在获取了第一状态信息后, 根据第一状态信息中 的第一屏幕状态信息, 确定以何种情况将所述第一状态信息推送至服务 器。 具体的, 终端设备在获取到第一状态信息后, 根据第一状态消息里 的第一屏幕状态判断屏幕处于何种状态。 当终端设备的屏幕处于开启状 态时, 终端设备需要立即将特殊心跳包发送至服务器, 以便服务器能够 及时将数据发送给终端设备; 当终端设备的屏幕处于关闭状态时, 终端 设备就按照原有的发送心跳包的频率向服务器发送特殊心跳包。 需要说明的是, 此时服务器接收到的心跳包为携带有应用的优先级 信息和终端设备的第一状态信 , I,的特殊心跳包。 306. The terminal device sends the special heartbeat packet to a server according to the first screen state information of the terminal device, where the server receives the special heartbeat packet. Specifically, after acquiring the first state information, the terminal device determines, according to the first screen state information in the first state information, the situation to push the first state information to the server. Specifically, after acquiring the first state information, the terminal device determines, according to the first screen state in the first state message, what state the screen is in. When the screen of the terminal device is in the on state, the terminal device needs to immediately send the special heartbeat packet to the server, so that the server can send the data to the terminal device in time; when the screen of the terminal device is in the closed state, the terminal device follows the original The frequency of sending heartbeat packets sends a special heartbeat packet to the server. It should be noted that, at this time, the heartbeat packet received by the server is a special heartbeat packet carrying the priority information of the application and the first state letter I of the terminal device.
307、 服务器解析所述特殊心跳包, 得到并存储应用的优先级信息及 终端设备的第一状态信息。 具体的, 终端设备在接收到所述特殊心跳包之后, 将所述特殊心跳 包进行解析, 从而得到所述应用的优先级信息及终端设备的第一状态信 息, 并将所述应用的优先级信息及终端设备的第一状态信息存储在服务 器中。 307. The server parses the special heartbeat packet, and obtains and stores priority information of the application and first state information of the terminal device. Specifically, after receiving the special heartbeat packet, the terminal device parses the special heartbeat packet to obtain priority information of the application and first state information of the terminal device, and prioritize the application. The first state information of the information and the terminal device is stored in the server.
308、 服务器接收数据包。 具体的, 在终端设备安装了应用程序之后, 所述终端设备的服务器 要接收应用提供商传输的有关所述应用程序的数据包。 308. The server receives the data packet. Specifically, after the terminal device installs the application, the server of the terminal device receives a data packet about the application transmitted by the application provider.
309、 服务器根据所述数据包, 确定所述数据包对应的第一应用。 具体的, 服务器在接收到数据包后, 可以对数据包进行解析, 可以 确定所述数据包对应的第一应用。 31 0、 服务器获取所述第一应用的优先级信息, 并根据所述第一应用 的优先级信息, 确定所述数据包对应的第一应用是否有处理优先权。 具体的, 服务器在确定所述数据包对应的第一应用之后, 通过查询 已存储的所有应用的优先级信息。 服务器在获取了第一应用的优先级信 息后, 可以获知第一应用是否有处理优先权。 也就是说, 在第一应用的优先级信息标识出第一应用有处理优先权 时, 服务器根据第一应用的优先级信息, 可以确定第一应用有处理优先 权。 在第一应用的优先级信息标识出第一应用没有处理优先权时, 服务 器根据第一应用的优先级信息, 可以确定第一应用没有处理优先权。 需要说明的是, 服务器根据确定的结果不同, 下面执行的步骤不同。 若服务器确定第一应用有处理优先权, 则执行步骤 31 1 , 若服务器确定第 一应用没有处理优先权, 则跳过步骤 31 1 , 直接执行后续步骤。 309. The server determines, according to the data packet, a first application corresponding to the data packet. Specifically, after receiving the data packet, the server may parse the data packet, and determine the first application corresponding to the data packet. The server obtains the priority information of the first application, and determines, according to the priority information of the first application, whether the first application corresponding to the data packet has processing priority. Specifically, after determining the first application corresponding to the data packet, the server queries the priority information of all the stored applications. After obtaining the priority information of the first application, the server can know whether the first application has processing priority. That is, when the priority information of the first application identifies that the first application has processing priority, the server may determine that the first application has processing priority according to the priority information of the first application. When the priority information of the first application identifies that the first application has no processing priority, the server may determine that the first application does not process the priority according to the priority information of the first application. It should be noted that the server performs different steps according to the determined result. If the server determines that the first application has processing priority, step 31 1 is performed. If the server determines that the first application does not have processing priority, skip step 31 1 and directly perform subsequent steps.
31 1、 服务器若确定所述数据包对应的第一应用有处理优先权, 则将 所述数据包发送至所述终端设备。 具体的, 服务器在根据第一应用的优先级信息确定所述数据包对应 的第一应用有处理优先权时, 可以将此数据包发送至终端设备, 以便终 端设备及时接收并处理此数据包。 If the server determines that the first application corresponding to the data packet has processing priority, the server sends the data packet to the terminal device. Specifically, the server may send the data packet to the terminal device when the first application corresponding to the data packet has processing priority according to the priority information of the first application, so that the terminal device receives and processes the data packet in time.
31 2、 服务器若确定所述数据包对应的第一应用没有处理优先权, 则 执行所述根据所述终端设备的第一状态信息确定是否推送所述数据包。 具体的, 在服务器确定该数据包对应的第一应用没有处理优先权的 情况下, 则继续根据所述终端设备的第一状态信息确定是否推送该数据 包。 其中, 数据包对应的第一应用没有处理优先权的情况下, 服务器继 续根据所述终端设备的第一状态信息确定是否推送该数据包的步骤与服 务器只根据终端设备的第一状态信息确定是否推送该数据包的步骤相 同, 具体确定步骤可参考步骤 1 03 , 在此不再赘述。 需要说明的是, 服务器根据终端设备的第一状态信息确定是否推送 该数据包的结果不同, 下面执行的步骤也不同。 若服务器根据终端设备 的第一状态信息确定推送该数据包, 则执行步骤 31 3。 若服务器根据终端 设备的第一状态信息确定不推送该数据包, 则执行步骤 3 1 4- 324。 If the server determines that the first application corresponding to the data packet does not have a processing priority, the server determines whether to push the data packet according to the first state information of the terminal device. Specifically, if the server determines that the first application corresponding to the data packet does not have a processing priority, it continues to determine whether to push the data packet according to the first state information of the terminal device. If the first application corresponding to the data packet does not have a processing priority, the server continues to determine whether to push the data packet according to the first state information of the terminal device, and the server determines whether the network device only uses the first state information of the terminal device. The steps of pushing the data packet are the same. For the specific determining step, refer to step 1 03, and details are not described herein again. It should be noted that the server determines whether to push according to the first state information of the terminal device. The results of this packet are different, and the steps performed below are also different. If the server determines to push the data packet according to the first state information of the terminal device, step 31 3 is performed. If the server determines not to push the data packet according to the first state information of the terminal device, perform steps 3 1 4- 324.
31 3、若确定推送所述数据包,则将所述数据包推送至所述终端设备。 具体的, 服务器在根据所述终端设备的第一状态信息确定推送所述 数据包的情况下, 则将所述数据包立即推送至终端设备。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述若确定推送所述数据包, 则将所述数据包推送至所述终端设备有两 种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息时, 若确定呼吸灯处于关闭状态时, 确定推送所述 数据包, 则将所述数据包推送至终端设备, 并将所述緩存区的数据推送 至终端设备。 需要说明的是, 终端设备的呼吸灯处于关闭有两种情况, 一种是终 端设备的屏幕处于开启状态, 此时, 用户在使用终端设备, 所以将所述 数据包推送至终端设备, 并且需要将緩存区緩存的数据发送至终端设备。 另一种是终端设备的屏幕处于关闭状态, 此时, 还没有数据已发送至终 端设备, 并且緩存区没有存储有数据, 所以需要将所述数据包发送至终 端设备, 以便通知用户有新的消息到达。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息时, 若确定所 述终端设备的屏幕处于开启状态, 确定推送数据包, 则将所述数据包推 送至终端设备, 并将所述緩存区中存储的数据包推送至所述终端设备; 或者, 若所述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于 关闭状态时, 确定推送数据包, 则将所述数据包推送至终端设备。 具体的, 服务器在根据终端设备的第一屏幕状态信息及终端设备的 第一呼吸灯状态信息确定是否推送数据包时, 服务器根据所述终端设备 的第一状态信息判断出在两种情况下会将数据包推送至终端设备。 第一 种情况, 服务器确定终端设备的屏幕处于开启状态时, 无论第一呼吸灯 处于何种状态, 即用户正在使用该终端设备时, 服务器会把该数据包推 送至终端设备, 以便用户能够及时查看该信息。 第二种情况, 服务器确 定终端设备的屏幕处于关闭状态且终端设备的呼吸灯处于关闭状态时, 即用户没有正在使用该终端设备, 并且不知道有新的消息到达时, 服务 器将该数据包推送至中终端设备, 以便用户知道有新的消息到达。 31 3. If it is determined that the data packet is pushed, the data packet is pushed to the terminal device. Specifically, if the server determines to push the data packet according to the first state information of the terminal device, the server immediately pushes the data packet to the terminal device. It should be noted that, according to the content included in the first state information of the terminal device, if the data packet is determined to be pushed, the data packet is pushed to the terminal device in two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, if it is determined that the breathing lamp is in the off state, determining to push the data packet, the data is The packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. It should be noted that there are two situations in which the breathing light of the terminal device is turned off. One is that the screen of the terminal device is in an open state. At this time, the user is using the terminal device, so the data packet is pushed to the terminal device, and The buffered data is sent to the terminal device. The other is that the screen of the terminal device is in the off state. At this time, no data has been sent to the terminal device, and no data is stored in the buffer area, so the data packet needs to be sent to the terminal device, so as to notify the user that there is a new one. The message arrived. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, if it is determined that the screen of the terminal device is turned on a state, the push data packet is determined, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or, if the screen state of the terminal device is off and the When the breathing light of the terminal device is in the off state, it is determined that the data packet is pushed, and the data packet is pushed to the terminal device. Specifically, the server determines, according to the first screen state information of the terminal device and the first breathing lamp state information of the terminal device, whether the server pushes the data packet, and the server determines, according to the first state information of the terminal device, that the data is obtained in two cases. Push the packet to the terminal device. the first In case, when the server determines that the screen of the terminal device is in the open state, regardless of the state of the first breathing lamp, that is, when the user is using the terminal device, the server will push the data packet to the terminal device, so that the user can view the time in time. information. In the second case, when the server determines that the screen of the terminal device is in the off state and the breathing light of the terminal device is in the off state, that is, the user is not using the terminal device, and does not know that a new message arrives, the server pushes the data packet. To the terminal device, so that the user knows that a new message has arrived.
31 4、 若确定不推送所述数据包, 则将所述数据包存储至緩存区。 具体的, 可参考步骤 1 04 , 在此不再赘述。 31 4. If it is determined that the data packet is not pushed, the data packet is stored in a buffer area. For details, refer to step 1 04, and details are not described herein.
31 5、 服务器确定所述緩存区存储的数据包是否达到第一门限值。 具体的, 由于服务器的緩存区空间是有限的, 所以服务器在每存储 一个数据包之后, 就会检测存储区中存储的数据是否达到第 ―门限值。 需要说明的是, 所述第一门限值是服务器出厂前根据服务器内存的 大小确定的緩存区的门限值, 表示服务器能够緩存的需要发送给一个终 端设备的数据量的最大值。 需要说明的是, 若服务器检测出緩存区存储的数据包没有达到第 ― 门限值, 则服务器对緩存区存储的数据包不进行处理。 31 5. The server determines whether the data packet stored in the buffer area reaches a first threshold. Specifically, since the buffer space of the server is limited, the server detects whether the data stored in the storage area reaches the first threshold after storing one data packet. It should be noted that the first threshold is a threshold of a buffer determined according to the size of the server memory before the server leaves the factory, and indicates a maximum amount of data that the server can buffer to be sent to a terminal device. It should be noted that, if the server detects that the data packet stored in the buffer does not reach the first threshold, the server does not process the data packet stored in the buffer.
31 6、 若所述緩存区存储的数据包达到第一门限值, 则服务器将所述 緩存区存储的数据包推送至所述终端设备, 终端设备接收服务器发送的 数据包。 具体的, 服务器在检测到緩存区存储的数据的总值已经达到所述预 先设定的第一门限值时, 服务器就会将所述緩存区中存储的所有数据包 一起推送至终端设备, 从而清空緩存区。 需要说明的是, 根据服务器接收到的终端设备在第二时刻发送的所 述终端设备的状态信息包含的内容不同, 执行的步骤不同。 若所述终端 设备发送所述终端设备的第二屏幕状态信息, 则执行步骤 31 7- 32 0 ; 若所 述终端设备发送所述终端设备的第二呼吸灯状态信息, 则执行步骤 32 1 - 324。 317、 服务器获取所述终端设备的第二屏幕状态信息。 需要说明的是, 所述终端设备的第二屏幕状态信息用于标识所述终 端设备在第二时刻的屏幕是处于关闭还是开启状态的信息。 If the data packet stored in the buffer area reaches the first threshold, the server pushes the data packet stored in the buffer area to the terminal device, and the terminal device receives the data packet sent by the server. Specifically, when the server detects that the total value of the data stored in the buffer area has reached the preset first threshold, the server pushes all the data packets stored in the buffer area to the terminal device together. Thereby emptying the buffer area. It should be noted that, according to different content included in the status information of the terminal device that is sent by the terminal device received by the server at the second time, the steps performed are different. If the terminal device sends the second screen state information of the terminal device, perform step 31 7-32 0; if the terminal device sends the second respiratory light state information of the terminal device, perform step 32 1 - 324. 317. The server acquires second screen state information of the terminal device. It should be noted that the second screen state information of the terminal device is used to identify information that the screen of the terminal device is in a closed state or an open state at a second time.
318、服务器根据所述终端设备的第二屏幕状态信息确定是否推送所 述緩存区的数据包。 需要说明的是, 服务器根据终端设备的第二屏幕状态信息确定所述 终端设备的屏幕处于关闭状态时, 服务器不做任何处理。 318. The server determines, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area. It should be noted that, when the server determines that the screen of the terminal device is in the closed state according to the second screen state information of the terminal device, the server does not perform any processing.
319、 若确定所述终端设备的屏幕处于开启状态, 服务器则检测所述 緩存区是否存储有数据包。 具体的, 服务器在检测到所述终端设备的屏幕处于开启状态时, 则 说明此时用户开始使用该终端设备, 服务器可以将緩存区存储的数据包 发送至终端设备, 以便终端设备对数据包进行相应处理。 此时, 服务器 需要检测所述緩存区是否存储有数据包。 进一步的, 若服务器检测出緩存区中没有存储的数据包, 则说明服 务器已将緩存区存储的所有数据包均推送至终端设备中, 此时, 服务器 不做任何处理。 319. If it is determined that the screen of the terminal device is in an open state, the server detects whether the data packet is stored in the buffer area. Specifically, when the server detects that the screen of the terminal device is in an open state, the server indicates that the user starts to use the terminal device, and the server may send the data packet stored in the buffer area to the terminal device, so that the terminal device performs the data packet. Processing accordingly. At this point, the server needs to detect if the buffer is stored in the buffer. Further, if the server detects that there is no data packet stored in the buffer area, it indicates that the server has pushed all the data packets stored in the buffer area to the terminal device, and the server does not perform any processing.
320、 若所述緩存区中存储有数据包, 服务器则将所述緩存区中存储 的数据包推送至所述终端设备, 终端设备接收所述服务器发送的数据包。 具体的, 服务器在检测到终端设备屏幕处于开启状态, 且检测到緩 存区中存储有数据包时, 则将已经存储的数据包全部推送至终端设备, 以便终端设备对存储的数据包进行相应处理。 320. If a data packet is stored in the buffer area, the server pushes the data packet stored in the buffer area to the terminal device, and the terminal device receives the data packet sent by the server. Specifically, the server detects that the terminal device screen is in an open state, and detects that a data packet is stored in the buffer area, and then pushes all the stored data packets to the terminal device, so that the terminal device processes the stored data packet accordingly. .
321、 获取所述终端设备的第二呼吸灯状态信息。 需要说明的是, 所述终端设备的第二呼吸灯状态信息用于标识所述 终端设备在第二时刻的呼吸灯是处于关闭还是开启状态的信息。 321. Acquire second respiratory light state information of the terminal device. It should be noted that the second breathing light state information of the terminal device is used to identify information that the breathing light of the terminal device is in a closed state or an open state at the second moment.
322、根据所述终端设备的第二呼吸灯状态信息确定是否推送所述緩 存区的数据包。 需要说明的是, 服务器根据所述终端设备的第二呼吸灯状态信息确 定所述终端设备的呼吸灯处于开启状态时, 服务器不做任何处理。 322. Determine, according to the second breathing light state information of the terminal device, whether to push a data packet of the buffer area. It should be noted that, when the server determines that the breathing light of the terminal device is in an open state according to the second breathing lamp state information of the terminal device, the server does not perform any processing.
323、 若确定所述终端设备的呼吸灯处于关闭状态, 则确定所述緩存 区是否存储有数据包。 需要说明的是, 终端设备呼吸灯处于关闭的情况有两种。 一种是所 述终端设备的屏幕处于开启状态, 另一种是所述终端设备的屏幕处于关 闭状态。 在所述终端设备的屏幕处于开启状态时, 呼吸灯一定处于关闭 状态, 此时服务器的緩存区可能有数据, 也可能没有数据。 在所述终端 设备的屏幕处于关闭状态且所述终端设备的呼吸灯处于关闭状态时, 所 述服务器的緩存区一定没有存储需要发送给所述终端设备的数据, 所以 在此种情况下, 确定所述緩存区一定没有存储数据。 需要说明的是, 若服务器检测出緩存区中没有存储的数据包, 则说 明服务器已将緩存区存储的所有数据包均推送至终端设备中, 此时, 服 务器不做任何处理。 323. If it is determined that the breathing light of the terminal device is in a closed state, determine whether the buffer area stores a data packet. It should be noted that there are two cases in which the terminal device breathing lamp is turned off. One is that the screen of the terminal device is in an on state, and the other is that the screen of the terminal device is in an off state. When the screen of the terminal device is turned on, the breathing lamp must be in the off state. At this time, the buffer area of the server may have data or no data. When the screen of the terminal device is in the off state and the breathing lamp of the terminal device is in the off state, the buffer area of the server must not store data that needs to be sent to the terminal device, so in this case, determining The buffer area must not store data. It should be noted that if the server detects that there is no data packet stored in the buffer area, it indicates that the server has pushed all the data packets stored in the buffer area to the terminal device, and the server does not perform any processing.
324、 若所述緩存区中存储有数据包, 则将所述緩存区中存储的数据 包推送至所述终端设备。 需要说明的是, 当呼吸灯处于关闭状态且服务器的緩存区中存储有 数据时, 也就是所述终端设备的屏幕处于开启状态时, 说明用户正在使 用该终端设备, 此时需要将緩存区的数据全部推送至终端设备, 以便用 户及时接收到緩存的数据。 需要说明的是, 在本发明实施中, 对步骤 315-316 , 及步骤 317-324 间的执行顺序不做限制。可以先执行步骤 315-316 ,再执行步骤 317-324 , 也可以先执行步骤 317-324 , 再执行步骤 315- 316 , 还可以同时执行步骤 315-316 , 及步骤 317-324。 本发明实施例是以先执行步骤 315- 316 , 在 执行步骤 317-324为例。 。 本发明实施例提供了一种数据转发的方法, 终端设备将获取的第一 状态信息和应用的优先级信息添加到心跳包中组成特殊心跳包, 服务器 在接收到特殊心跳包后, 解析出第一状态信息和应用的优先级信息, 然 后将确定接收的数据包对应的应用的优先级, 根据数据包对应的应用的 优先级与第一状态信息确定是否推送该数据包, 在确定不推送该数据包 的情况下, 将所述数据包存储至緩存区, 直到满足緩存区的触发条件时, 再将緩存区存储的数据包推送至终端设备。 这样, 服务器接收到应用提 供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推送 数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到数 据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒 次数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 如图 5所示, 其为本发明实施例提供了一种服务器的功能示意图, 参考图 5所示, 该服务器包括: 接收单元 5 01 , 获取单元 502 , 确定 单元 503 , 以及处理单元 504。 所述接收单元 501 , 用于接收数据包。 所述获取单元 502 , 用于获取终端设备的第一状态信息。 其中, 所述第一状态信息用于标识所述终端设备的状态。 所述确定单元 503 , 用于根据所述终端设备的第一状态信息确定是 否推送所述数据包。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述确定单元具体用法可以分为两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述确定单元 503 用于根据所述终端设 备的第一状态信息确定是否推送所述数据包, 具体包括: 所述确定单元 503 用于根据所述终端设备的第一呼吸灯状态信息确定是否推送所述数 据包。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述确定单元 503 用于根据所述终端设备的第一状态信息确定是否推送所 述数据包, 具体包括: 所述确定单元 503 用于根据所述终端设备的第一 屏幕状态信息, 确定所述终端设备的屏幕是否处于开启状态; 在确定所 述终端设备的屏幕处于关闭状态的情况下, 根据所述终端设备的第一呼 吸灯状态信息确定所述终端设备的呼吸灯是否处于开启状态。 所述处理单元 504 , 用于在确定单元 503确定不推送所述数据包时, 将所述数据包存储至緩存区。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述确定单元具体用法可以分为两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述处理单元 504 用于在所述确定单元 5 03确定不推送所述数据包时, 将所述数据包存储至緩存区, 具体包括: 所述处理单元 504 用于在所述终端设备的呼吸灯处于开启状态, 所述确 定单元 5 03 确定不推送所述数据包的情况下, 将所述数据包存储至緩存 区。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述处理单元 504用于在所述确定单元 503确定不推送所述数据包时, 将 所述数据包存储至緩存区具体包括: 所述处理单元 504 用于在所述终端 设备的屏幕关闭状态并且所述终端设备的呼吸灯处于开启状态, 所述确 定单元 5 03 确定不推送所述数据包的情况下, 将所述数据包存储至緩存 区。 进一步的, 参考图 5所示, 所述服务器, 还包括: 发送单元 5 05。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述发送单元 505应用方式有两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述发送单元 505 , 用于在所述确定单元 5 03确定呼吸灯处于关闭状态, 确定推送所述数据包的情况下, 将所述数 据包推送至终端设备, 并将所述緩存区的数据推送至终端设备。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述发送单元 505 ,还用于在所述确定单元 503确定所述终端设备的屏幕处 于开启状态, 确定推送数据包的情况下, 将所述数据包推送至终端设备, 并将所述緩存区中存储的数据包推送至所述终端设备; 或者, 所述发送 单元 505 ,还用于在所述终端设备的屏幕关闭状态并且所述终端设备的呼 吸灯处于关闭状态时, 确定推送数据包的情况下, 将所述数据包推送至 终端设备。 进一步的, 所述获取单元 502 , 还用于获取所述终端设备的第二屏 幕状态信息。 所述确定单元 503 , 还用于根据所述终端设备的第二屏幕状态信息 确定是否推送所述緩存区的数据包。 所述确定单元 503 , 还用于在确定所述终端设备的屏幕处于开启状 态的情况下, 确定所述緩存区是否存储有数据包。 所述发送单元 505 , 还用于在所述緩存区中存储有数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 或者, 所述获取单元 502 , 还用于获取所述终端设备的第二呼吸灯 状态信息。 所述确定单元 503 , 还用于根据所述终端设备的第二呼吸灯状态信 息确定是否推送所述緩存区的数据包。 所述确定单元 503 , 还用于在所述终端设备的呼吸灯处于关闭状态 的情况下, 确定所述緩存区是否存储有数据包。 所述发送单元 505 , 还用于在所述緩存区中存储有数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 进一步的, 所述确定单元 503 , 还用于确定所述緩存区存储的数据 包是否达到第一门限值。 所述发送单元 505 , 还用于在所述确定单元 503 确定所述緩存区存 储的数据包达到所述第一门限值的情况下, 将所述緩存区存储的数据包 推送至所述终端设备。 进一步的, 所述获取单元 502 , 还用于获取应用的优先级信息。 所述确定单元 503 , 还用于根据所述数据包, 确定所述数据包对应 的第一应用。 所述确定单元 503 , 还用于获取所述第一应用的优先级信息, 并根 据所述第一应用的优先级信息, 确定所述数据包对应的第一应用是否有 处理优先权。 此时, 所述确定单元 503用于根据所述终端设备的第一状态信息确 定是否推送所述数据包, 具体包括: 所述确定单元 503 用于在确定所述 数据包对应的第一应用有处理优先权时, 将所述数据包推送至所述终端 设备; 在确定所述数据包对应的第一应用没有处理优先权时, 执行所述 根据所述终端设备的第一状态信息确定是否推送所述数据包。 进一步的, 所述接收单元 501 , 还用于接收所述终端设备发送的第 一消息。 其中, 所述第一消息中携带有应用的优先级信息。 此时, 所述获取单元 502用于获取应用的优先级信息, 具体包括: 所述获取单元 502用于根据所述接收单元 501接收的所述第一消息, 获 取所述应用的优先级信息。 进一步的, 所述接收单元 501 , 还用于接收所述终端设备发送的第 二消息。 其中, 所述第二消息中携带有所述终端设备的第一状态信息。 此时, 所述获取单元 502用于获取终端设备的第一状态信息, 具体 包括: 所述获取单元 502用于根据所述接收单元 501接收的所述第二消 息, 获取所述终端设备的第一状态信息。 本发明实施例提供了一种服务器, 接收单元在接收数据包之后, 获 取单元获取终端设备的第一状态信息, 然后确定单元根据所述终端设备 的第一状态信息确定是否推送所述数据包, 若确定不推送所述数据包, 则处理单元将所述数据包存储至緩存区。 这样, 服务器接收到应用提供 商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推送数 据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到数据 包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒次 数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 如图 6所示,其为本发明实施例提供了一种终端设备的功能示意图, 参考图 6所示, 该终端设备包括: 获取单元 601 , 发送单元 602。 所述获取单元 601 , 用于获取终端设备的第一状态信息。 其中, 所述终端设备的第一状态信息包括所述终端设备的第一屏幕 状态信息, 或所述终端设备的第一屏幕状态信息及所述终端设备的第一 呼吸灯状态信息。 所述发送单元 602 , 用于根据所述获取单元 601 获取的所述终端设 备的第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务器。 具体的, 所述获取单元 601 在获取了第一状态信息后, 第一状态信 息中的第一屏幕状态信息的不同, 所述发送单元 602 以不同的方式将所 述第一状态信息推送至服务器。 进一步的, 所述发送单元 602用于根据所述获取单元 601获取的所 述终端设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送 至服务器, 具体包括: 所述发送单元 602 用于在所述终端设备的第一屏 幕状态信息指示所述终端设备的屏幕处于开启状态时, 向所述服务器发 送所述终端设备的第一状态信息; 或者, 在所述终端设备的第一屏幕状 态信息指示所述终端设备的屏幕处于关闭状态时, 根据第一频率, 向所 述服务器发送所述终端设备的第一状态信息。 进一步的, 所述终端设备, 如图 7所示, 还包括: 确定单元 603。 此时, 所述获取单元 601 , 还用于获取应用的优先级信息。 所述确定单元 603 , 用于确定所述获取单元 601 获取的应用的优先 级信息与已存储的应用的优先级信息是否相同。 所述发送单元 602 , 还用于在所述确定单元 603 确定获取的应用的 优先级信息与已存储的应用的优先级信息不相同时, 将所述应用的优先 级信息发送至所述服务器。 进一步的, 所述终端设备, 如图 8所示, 还包括: 处理单元 604。 所述处理单元 604 , 用于将所述应用的优先级信息添加至第一消息 中。 此时, 所述发送单元 602用于将所述应用的优先级信息发送至所述 服务器, 具体包括: 所述发送单元 602 用于将所述第一消息发送至所述 服务器。 所述处理单元 604 , 还用于将所述终端设备的第一状态信息添加至 第二消息。 所述发送单元 602用于根据所述获取单元 601获取的所述终端设备 的第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务器, 具 体包括: 所述发送单元 602用于根据所述终端设备的第一屏幕状态信息, 将所述第二消息发送至所述服务器。 进一步的, 所述终端设备, 如图 9所示, 还包括: 接收单元 605。 所述接收单元 605 , 用于接收所述服务器发送的数据包。 本发明实施例提供了一种终端设备, 获取单元在获取自身的第一状 态信息后, 发送单元将所述终端设备的第一状态信息发送给服务器, 以 使得服务器根据所述终端设备的第一状态信息确定是将接收到的数据包 发给终端设备, 还是将数据包存储至緩存区中, 这样, 服务器接收到应 用提供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不 推送数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接 到数据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被 唤醒次数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 如图 10所示,其为本发明实施例所提供的一种服务器的结构示 意图。 参考图 10所示, 该服务器包括: 接收器 1001、 存储器 1002, 以及分别与接收器 1001、 存储器 1002连接的处理器 1003。 324. If a data packet is stored in the buffer area, the data packet stored in the buffer area is pushed to the terminal device. It should be noted that when the breathing light is in the off state and the data is stored in the buffer area of the server, that is, when the screen of the terminal device is in the on state, the user is using the terminal device, and the buffer area is needed at this time. The data is all pushed to the terminal device, so that the user receives the cached data in time. It should be noted that, in the implementation of the present invention, the order of execution between steps 315-316 and steps 317-324 is not limited. Steps 315-316 may be performed first, and then steps 317-324 may be performed. Steps 317-324 may be performed first, then steps 315-316 may be performed, and steps 315-316 and steps 317-324 may be performed simultaneously. In the embodiment of the present invention, steps 315-316 are performed first, and steps 317-324 are performed as an example. . The embodiment of the present invention provides a method for data forwarding. The terminal device adds the obtained first state information and the priority information of the application to the heartbeat packet to form a special heartbeat packet. After receiving the special heartbeat packet, the server parses the first a status message and application priority information, of course After determining the priority of the application corresponding to the received data packet, determining whether to push the data packet according to the priority of the application corresponding to the data packet and the first state information, and determining that the data packet is not pushed, the data is The packet is stored in the buffer area, and when the trigger condition of the buffer area is satisfied, the data packet stored in the buffer area is pushed to the terminal device. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal. As shown in FIG. 5, it provides a function diagram of a server according to an embodiment of the present invention. Referring to FIG. 5, the server includes: a receiving unit 511, an obtaining unit 502, a determining unit 503, and a processing unit 504. The receiving unit 501 is configured to receive a data packet. The obtaining unit 502 is configured to acquire first state information of the terminal device. The first state information is used to identify a state of the terminal device. The determining unit 503 is configured to determine, according to the first state information of the terminal device, whether to push the data packet. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the determining unit may be divided into two cases. In the first case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device, the determining unit 503 is configured to determine, according to the first state information of the terminal device, whether Pushing the data packet specifically includes: determining, by the determining unit 503, determining whether to push the data packet according to the first breathing light state information of the terminal device. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the determining unit 503 is configured to use Determining whether the data packet is pushed by the first state information of the terminal device, specifically: the determining unit 503 is configured to determine, according to the first screen state information of the terminal device, whether the screen of the terminal device is in an open state In determining the place In the case that the screen of the terminal device is in the closed state, it is determined whether the breathing light of the terminal device is in an open state according to the first breathing lamp state information of the terminal device. The processing unit 504 is configured to store the data packet to the buffer area when the determining unit 503 determines not to push the data packet. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the determining unit may be divided into two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, the processing unit 504 is configured to determine, at the determining unit 503, not to push the When the data packet is stored in the buffer area, the processing unit 504 is configured to: when the breathing light of the terminal device is in an open state, the determining unit 503 determines not to push the data packet. In the case, the data packet is stored in the buffer area. In the second case, when the first state information of the terminal device includes the first breathing light state information of the terminal device and the first screen state information of the terminal device, the processing unit 504 is configured to When the determining unit 503 determines that the data packet is not to be pushed, storing the data packet to the buffer area specifically includes: the processing unit 504 is configured to be in a screen off state of the terminal device and a breathing light of the terminal device When the determining unit 503 determines not to push the data packet, the data packet is stored in the buffer area. Further, referring to FIG. 5, the server further includes: a sending unit 505. It should be noted that, according to the content included in the first state information of the terminal device, the sending unit 505 has two modes of application. In the first case, when the first status information of the terminal device includes the first breathing light state information of the terminal device, the sending unit 505 is configured to determine, at the determining unit 503, that the breathing light is in In the closed state, when it is determined that the data packet is pushed, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. In the second case, when the first state information of the terminal device includes the terminal device In the case of the first breathing light state information and the first screen state information of the terminal device, the sending unit 505 is further configured to determine, in the determining unit 503, that the screen of the terminal device is in an open state, and determine the push data. In the case of a packet, the data packet is pushed to the terminal device, and the data packet stored in the buffer area is pushed to the terminal device; or the sending unit 505 is further used in the terminal device. When the screen is off and the breathing light of the terminal device is in the off state, in the case of determining to push the data packet, the data packet is pushed to the terminal device. Further, the acquiring unit 502 is further configured to acquire second screen state information of the terminal device. The determining unit 503 is further configured to determine, according to the second screen state information of the terminal device, whether to push the data packet of the buffer area. The determining unit 503 is further configured to determine, if the screen of the terminal device is in an open state, whether the buffer area stores a data packet. The sending unit 505 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device. Or the acquiring unit 502 is further configured to acquire second breathing light state information of the terminal device. The determining unit 503 is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push the data packet of the buffer area. The determining unit 503 is further configured to determine, if the breathing light of the terminal device is in a closed state, whether the buffer area stores a data packet. The sending unit 505 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device. Further, the determining unit 503 is further configured to determine whether the data packet stored in the buffer area reaches a first threshold. The sending unit 505 is further configured to determine, in the determining unit 503, the cache area When the stored data packet reaches the first threshold, the data packet stored in the buffer area is pushed to the terminal device. Further, the acquiring unit 502 is further configured to acquire priority information of the application. The determining unit 503 is further configured to determine, according to the data packet, a first application corresponding to the data packet. The determining unit 503 is further configured to obtain the priority information of the first application, and determine, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority. At this time, the determining unit 503 is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: the determining unit 503 is configured to determine, in determining that the first application corresponding to the data packet has When the priority is processed, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing, according to the first state information of the terminal device, determining whether to push the data pack. Further, the receiving unit 501 is further configured to receive the first message sent by the terminal device. The first message carries the priority information of the application. At this time, the acquiring unit 502 is configured to acquire the priority information of the application, and the method includes: the obtaining unit 502 is configured to obtain the priority information of the application according to the first message received by the receiving unit 501. Further, the receiving unit 501 is further configured to receive a second message sent by the terminal device. The second message carries the first state information of the terminal device. At this time, the acquiring unit 502 is configured to acquire the first state information of the terminal device, and the method includes: the acquiring unit 502, configured to acquire, according to the second message received by the receiving unit 501, the terminal device A status message. The embodiment of the invention provides a server, after receiving the data packet, the receiving unit obtains Obtaining, by the unit, the first state information of the terminal device, and then determining, by the determining unit, whether to push the data packet according to the first state information of the terminal device, and if it is determined that the data packet is not pushed, the processing unit stores the data packet To the cache area. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal. As shown in FIG. 6 , it is a function diagram of a terminal device according to an embodiment of the present invention. Referring to FIG. 6 , the terminal device includes: an obtaining unit 601 and a sending unit 602. The obtaining unit 601 is configured to acquire first state information of the terminal device. The first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device. The sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device acquired by the acquiring unit 601. Specifically, the acquiring unit 601, after acquiring the first state information, the first screen state information in the first state information is different, and the sending unit 602 pushes the first state information to the server in different manners. . Further, the sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the acquiring unit 601, and specifically includes: the sending unit The 602 is configured to: when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state, send the first state information of the terminal device to the server; or, in the terminal device When the screen status information indicates that the screen of the terminal device is in the off state, the first status information of the terminal device is sent to the server according to the first frequency. Further, the terminal device, as shown in FIG. 7, further includes: a determining unit 603. At this time, the acquiring unit 601 is further configured to acquire priority information of the application. The determining unit 603 is configured to determine whether the priority information of the application acquired by the acquiring unit 601 is the same as the priority information of the stored application. The sending unit 602 is further configured to: when the determining unit 603 determines that the priority information of the acquired application is different from the priority information of the stored application, send the priority information of the application to the server. Further, the terminal device, as shown in FIG. 8, further includes: a processing unit 604. The processing unit 604 is configured to add priority information of the application to the first message. At this time, the sending unit 602 is configured to send the priority information of the application to the server, specifically: the sending unit 602 is configured to send the first message to the server. The processing unit 604 is further configured to add the first state information of the terminal device to the second message. The sending unit 602 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the acquiring unit 601, where the sending unit 602 is configured to: Sending the second message to the server according to the first screen state information of the terminal device. Further, the terminal device, as shown in FIG. 9, further includes: a receiving unit 605. The receiving unit 605 is configured to receive a data packet sent by the server. The embodiment of the present invention provides a terminal device, after the acquiring unit acquires the first state information of the terminal device, the sending unit sends the first state information of the terminal device to the server, so that the server is configured according to the first The status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device. When the data packet is not pushed, the received data packet is stored in the buffer area, so that it is not required to be sent to the terminal device every time the data packet is received, thereby reducing the number of times the AP and the modem of the terminal device are awakened, thereby reducing the number of times. The power consumption of the mobile terminal extends the standby time of the mobile terminal. FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present invention. Referring to FIG. 10, the server includes: a receiver 1001, a memory 1002, and a processor 1003 connected to the receiver 1001 and the memory 1002, respectively.
其中, 存储器 1002 中存储一组程序代码, 处理器 1003用于调 用存储器 1002 中的程序代码。 具体的, 所述接收器 1001, 用于接收数据包。 所述处理器 1003, 用于获取终端设备的第一状态信息。 其中, 所述第一状态信息用于标识所述终端设备的状态。 所述处理器 1003, 还用于根据所述终端设备的第一状态信息确定是 否推送所述数据包。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述处理器 1003具体用法可以分为两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述处理器 1003用于根据所述终端设备 的第一状态信息确定是否推送所述数据包, 具体包括: 所述处理器 1003 用于根据所述终端设备的第一呼吸灯状态信息确定是否推送所述数据 包。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述处理器 1003用于根据所述终端设备的第一状态信息确定是否推送所述 数据包, 具体包括: 所述处理器 1003用于根据所述终端设备的第一屏幕 状态信息, 确定所述终端设备的屏幕是否处于开启状态; 在所述终端设 备的屏幕处于关闭状态的情况下, 根据所述终端设备的第一呼吸灯状态 信息确定所述终端设备的呼吸灯是否处于开启状态。 所述处理器 1003, 还用于在确定不推送所述数据包时, 将所述数据 包存储至緩存区。 需要说明的是,根据所述终端设备的第一状态信息包含的内容不同, 所述处理器 1 003具体用法可以分为两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述处理器 1 003用于在确定不推送所述 数据包时, 将所述数据包存储至緩存区, 具体包括: 所述处理器 1 003用 于在所述终端设备的呼吸灯处于开启状态, 确定不推送所述数据包的情 况下, 将所述数据包存储至緩存区。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述处理器 1 003用于在确定不推送所述数据包时, 将所述数据包存储至緩 存区, 具体包括: 所述处理器 1 003用于在所述终端设备的屏幕关闭状态 并且所述终端设备的呼吸灯处于开启状态, 确定不推送所述数据包的情 况下, 将所述数据包存储至緩存区。 进一步的, 参考图 1 0所示, 所述服务器还包括: 发送器 1 004。 具体的, 根据所述终端设备的第一状态信息包含的内容不同, 所述 发送器 1 004应用方式有两种情况。 第一种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息的情况下, 所述发送器 1 004 , 用于在呼吸灯处于关 闭状态, 确定推送所述数据包的情况下, 将所述数据包推送至终端设备, 并将所述緩存区的数据推送至终端设备。 第二种情况, 当所述终端设备的第一状态信息包括所述终端设备的 第一呼吸灯状态信息及所述终端设备的第一屏幕状态信息的情况下, 所 述发送器 1 004 , 还用于在所述终端设备的屏幕处于开启状态, 确定推送 数据包的情况下, 将所述数据包推送至终端设备, 并将所述緩存区中存 储的数据包推送至所述终端设备; 或者, 所述发送器 1 004 , 还用于在所 述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于关闭状态 时, 确定推送数据包的情况下, 将所述数据包推送至终端设备。 进一步的, 所述处理器 1 003 , 还用于获取所述终端设备的第二屏幕 状态信息。 所述处理器 1003, 还用于根据所述终端设备的第二屏幕状态信息确 定是否推送所述緩存区的数据包。 所述处理器 1003, 还用于在确定所述终端设备的屏幕处于开启状态 的情况下, 确定所述緩存区是否存储有数据包。 所述发送器 1004, 还用于在所述緩存区中存储有数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 或者, 所述处理器 1003, 还用于获取所述终端设备的第二呼吸灯状 态信息。 所述处理器 1003, 还用于根据所述终端设备的第二呼吸灯状态信息 确定是否推送所述緩存区的数据包。 所述处理器 1003, 还用于在所述终端设备的呼吸灯处于关闭状态的 情况下, 确定所述緩存区是否存储有数据包。 所述发送器 1004, 还用于在所述緩存区中存储有数据包的情况下, 将所述緩存区中存储的数据包推送至所述终端设备。 进一步的, 所述处理器 1003, 还用于确定所述緩存区存储的数据包 是否达到第一门限值。 所述发送器 1004, 还用于在确定所述緩存区存储的数据包达到所述 第一门限值的情况下, 将所述緩存区存储的数据包推送至所述终端设备。 进一步的, 所述处理器 1003, 还用于获取应用的优先级信息。 所述处理器 1003, 还用于根据所述数据包, 确定所述数据包对应的 第一应用。 所述处理器 1003, 还用于获取所述第一应用的优先级信息, 并根据 所述第一应用的优先级信息, 确定所述数据包对应的第一应用是否有处 理优先权。 此时,所述处理器 1003用于根据所述终端设备的第一状态信息确定 是否推送所述数据包, 具体包括: 所述处理器 1003用于在确定所述数据 包对应的第一应用有处理优先权时, 将所述数据包推送至所述终端设备; 在确定所述数据包对应的第一应用没有处理优先权时, 执行所述根据所 述终端设备的第一状态信息确定是否推送所述数据包。 进一步的, 所述接收器 1001, 还用于接收所述终端设备发送的第一 消息。 其中, 所述第一消息中携带有应用的优先级信息。 此时, 所述处理器 1003用于获取应用的优先级信息, 具体包括: 所 述处理器 1003用于根据所述接收器 1001接收的所述第一消息, 获取所 述应用的优先级信息。 进一步的, 所述接收器 1001, 还用于接收所述终端设备发送的第二 消息。 其中, 所述第二消息中携带有所述终端设备的第一状态信息。 此时, 所述处理器 1003用于获取终端设备的第一状态信息, 具体包 括: 所述处理器 1003用于根据所述接收器 1001接收的所述第二消息, 获取所述终端设备的第一状态信息。 本发明实施例提供了一种服务器, 接收器在接收数据包之后, 处理 器获取终端设备的第一状态信息, 然后根据所述终端设备的第一状态信 息确定是否推送所述数据包, 若确定不推送所述数据包, 则将所述数据 包存储至緩存区。 这样, 服务器接收到应用提供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推送数据包时, 将接收到的数据 包存储至緩存区中, 从而无需在每次接到数据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒次数, 进而降低了移动终端的 功耗, 延长了移动终端的待机时间。 如图 11 所示, 其为本发明实施例提供了一种终端设备的结构示意 图, 参考图 11所示, 该终端设备包括: 处理器 1101, 发送器 1102, 存储器 1103。 其中, 存储器 1103 中存储一组程序代码, 处理器 1001 用于调 用存储器 1103 中的程序代码。 具体的, 所述处理器 1101, 用于获取终端设备的第一状态信息。 其中, 所述终端设备的第一状态信息包括所述终端设备的第一屏幕 状态信息, 或所述终端设备的第一屏幕状态信息及所述终端设备的第一 呼吸灯状态信息。 所述发送器 1102, 用于根据所述处理器 1101 获取的所述终端设备 的第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务器。 具体的, 所述处理器 1101在获取了第一状态信息后, 第一状态信息 中的第一屏幕状态信息的不同, 所述发送器 1102以不同的方式将所述第 一状态信息推送至服务器。 进一步的, 所述发送器 1102用于根据所述处理器 1101获取的所述 终端设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送至 服务器, 具体包括: 所述发送器 1102用于在所述终端设备的第一屏幕状 态信息指示所述终端设备的屏幕处于开启状态时, 向服务器发送所述终 端设备的第一状态信息; 或者, 在所述终端设备的第一屏幕状态信息指 示所述终端设备的屏幕处于关闭状态时, 根据第一频率, 向服务器发送 所述终端设备的第一状态信息。 进一步的, 所述处理器 1101, 还用于获取应用的优先级信息。 所述处理器 1101, 还用于确定获取的应用的优先级信息与已存储的 应用的优先级信息是否相同。 此时, 所述发送器 1102, 还用于在所述处理器 1101 确定获取的应 用的优先级信息与已存储的应用的优先级信息不相同时, 将所述应用的 优先级信息发送至所述服务器。 进一步的, 所述处理器 1101, 还用于将所述应用的优先级信息添加 至第一消息中。 此时,所述发送器 1102用于将所述终端设备的第一状态信息发送至 服务器, 具体包括: 所述发送器 1102用于将所述第一消息发送至所述服 务器。 所述处理器 1101, 还用于将所述终端设备的第一状态信息添加至第 二消息。 此时, 所述发送器 1102用于根据所述处理器 1101获取的所述终端 设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务 器, 具体包括: 所述发送器 1102用于根据所述终端设备的第一屏幕状态 信息, 将所述第二消息发送至所述服务器。 进一步的, 所述终端设备, 如图 12所示, 还包括: 接收器 1104。 所述接收器 1104, 用于接收所述服务器发送的数据包。 本发明实施例提供了一种终端设备, 处理器在获取自身的第一状态 信息后, 发送器将所述终端设备的第一状态信息发送给服务器, 以使得 服务器根据所述终端设备的第一状态信息确定是将接收到的数据包发给 终端设备, 还是将数据包存储至緩存区中, 这样, 服务器接收到应用提 供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推送 数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到数 据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒 次数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 本发明实施例提供了一种数据处理的系统, 如图 13所示, 包括: 服务器 1301及终端设备 1302。 其中, 所述服务器 1301是上述实施例所述的服务器。 所述终端设备 1302是上述实施例所述的终端设备。 本发明实施例提供了一种数据处理的系统, 终端设备将获取的第一 状态信息和应用的优先级信息添加到心跳包中组成特殊心跳包, 服务器 在接收到特殊心跳包后, 解析出第一状态信息和应用的优先级信息, 然 后将确定接收的数据包对应的应用的优先级, 根据数据包对应的应用的 优先级与第一状态信息确定是否推送该数据包, 在确定不推送该数据包 的情况下, 将所述数据包存储至緩存区, 直到满足緩存区的触发条件时, 再将緩存区存储的数据包推送至终端设备。 这样, 服务器接收到应用提 供商发送的多个数据包时, 可以在根据终端设备的状态信息确定不推送 数据包时, 将接收到的数据包存储至緩存区中, 从而无需在每次接到数 据包时, 均发送至终端设备, 减少了终端设备的 AP和调制解调器被唤醒 次数, 进而降低了移动终端的功耗, 延长了移动终端的待机时间。 The memory 1002 stores a set of program codes, and the processor 1003 is used to call the program code in the memory 1002. Specifically, the receiver 1001 is configured to receive a data packet. The processor 1003 is configured to acquire first state information of the terminal device. The first state information is used to identify a state of the terminal device. The processor 1003 is further configured to determine, according to the first state information of the terminal device, whether to push the data packet. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the processor 1003 may be divided into two cases. In the first case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device, the processor 1003 is configured to determine, according to the first state information of the terminal device, whether Pushing the data packet specifically includes: the processor 1003, configured to determine, according to the first breathing light state information of the terminal device, whether to push the data packet. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the processor 1003 is configured to use Determining whether the data packet is pushed by the first state information of the terminal device, the method specifically includes: determining, by the processor 1003, whether the screen of the terminal device is in an open state according to the first screen state information of the terminal device If the screen of the terminal device is in the closed state, determining whether the breathing light of the terminal device is in an open state according to the first breathing light state information of the terminal device. The processor 1003 is further configured to: when determining that the data packet is not pushed, store the data packet to a buffer area. It should be noted that, according to different content included in the first state information of the terminal device, the specific usage of the processor 1 003 may be divided into two cases. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, the processor 1003 is configured to, when determining not to push the data packet, The storing of the data packet to the buffer area includes: the processor 1 003, configured to: when the breathing light of the terminal device is in an open state, determining to not push the data packet, storing the data packet to Cache area. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the processor 1 003 is used to When it is determined that the data packet is not pushed, storing the data packet to the buffer area, the method specifically includes: the processor 1 003 is configured to be in a screen off state of the terminal device, and the breathing light of the terminal device is turned on. Status, if it is determined that the data packet is not pushed, the data packet is stored to the buffer area. Further, referring to FIG. 10, the server further includes: a transmitter 1 004. Specifically, according to different content included in the first state information of the terminal device, there are two cases in which the transmitter 1 004 is applied. In the first case, when the first state information of the terminal device includes the first breathing lamp state information of the terminal device, the transmitter 1 004 is configured to determine the push station when the breathing lamp is in the off state. In the case of the data packet, the data packet is pushed to the terminal device, and the data of the buffer area is pushed to the terminal device. In the second case, when the first state information of the terminal device includes the first respiratory light state information of the terminal device and the first screen state information of the terminal device, the transmitter 1 004 further And configured to: when the screen of the terminal device is in an open state, determine to push a data packet, push the data packet to the terminal device, and push the data packet stored in the buffer area to the terminal device; or The transmitter 1 004 is further configured to: when the screen of the terminal device is off and the breathing light of the terminal device is in a closed state, determine to push the data packet, and push the data packet to the terminal device . Further, the processor 1 003 is further configured to acquire a second screen of the terminal device. status information. The processor 1003 is further configured to determine, according to the second screen state information of the terminal device, whether to push a data packet of the buffer area. The processor 1003 is further configured to determine, if the screen of the terminal device is in an open state, whether the buffer area stores a data packet. The transmitter 1004 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device. Alternatively, the processor 1003 is further configured to acquire second breathing light state information of the terminal device. The processor 1003 is further configured to determine, according to the second breathing lamp state information of the terminal device, whether to push a data packet of the buffer area. The processor 1003 is further configured to determine, if the breathing light of the terminal device is in a closed state, whether the buffer area stores a data packet. The transmitter 1004 is further configured to: when the data packet is stored in the buffer area, push the data packet stored in the buffer area to the terminal device. Further, the processor 1003 is further configured to determine whether a data packet stored in the buffer area reaches a first threshold. The transmitter 1004 is further configured to: when determining that the data packet stored in the buffer area reaches the first threshold, push the data packet stored in the buffer area to the terminal device. Further, the processor 1003 is further configured to acquire priority information of the application. The processor 1003 is further configured to determine, according to the data packet, a first application corresponding to the data packet. The processor 1003 is further configured to obtain the priority information of the first application, and determine, according to the priority information of the first application, whether the first application corresponding to the data packet has a processing priority. At this time, the processor 1003 is configured to determine, according to the first state information of the terminal device, whether to push the data packet, specifically: the processor 1003 is configured to determine, in determining that the first application corresponding to the data packet has When the priority is processed, the data packet is pushed to the terminal device; when it is determined that the first application corresponding to the data packet has no processing priority, performing, according to the first state information of the terminal device, determining whether to push the data pack. Further, the receiver 1001 is further configured to receive the first message sent by the terminal device. The first message carries the priority information of the application. At this time, the processor 1003 is configured to acquire the priority information of the application, and the method is specifically configured to: obtain the priority information of the application according to the first message received by the receiver 1001. Further, the receiver 1001 is further configured to receive a second message sent by the terminal device. The second message carries the first state information of the terminal device. The processor 1003 is configured to acquire the first state information of the terminal device, where the processor 1003 is configured to: acquire, according to the second message received by the receiver 1001, the first device of the terminal device. A status message. An embodiment of the present invention provides a server, after receiving a data packet, the processor acquires first state information of the terminal device, and then determines whether to push the data packet according to the first state information of the terminal device, if If the data packet is not pushed, the data packet is stored in the buffer area. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal. FIG. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. Referring to FIG. 11, the terminal device includes: a processor 1101, a transmitter 1102, and a memory 1103. The memory 1103 stores a set of program codes, and the processor 1001 is used to call the program code in the memory 1103. Specifically, the processor 1101 is configured to acquire first state information of the terminal device. The first state information of the terminal device includes first screen state information of the terminal device, or first screen state information of the terminal device, and first respiratory light state information of the terminal device. The transmitter 1102 is configured to send first state information of the terminal device to a server according to the first screen state information of the terminal device acquired by the processor 1101. Specifically, after the processor 1101 acquires the first state information, the first screen state information in the first state information is different, and the transmitter 1102 pushes the first state information to the server in different manners. . Further, the transmitter 1102 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor 1101, and specifically includes: the transmitter 1102. The first state information of the terminal device is sent to a server when the first screen state information of the terminal device indicates that the screen of the terminal device is in an open state; or, the first screen of the terminal device When the status information indicates that the screen of the terminal device is in the off state, the first status information of the terminal device is sent to the server according to the first frequency. Further, the processor 1101 is further configured to acquire priority information of the application. The processor 1101 is further configured to determine whether the priority information of the acquired application is the same as the priority information of the stored application. At this time, the transmitter 1102 is further configured to: when the processor 1101 determines that the priority information of the acquired application is different from the priority information of the stored application, send the priority information of the application to the Said server. Further, the processor 1101 is further configured to add priority information of the application to the first message. At this time, the transmitter 1102 is configured to send the first state information of the terminal device to the server, and specifically includes: the transmitter 1102 is configured to send the first message to the server. The processor 1101 is further configured to add the first state information of the terminal device to the second message. At this time, the transmitter 1102 is configured to send the first state information of the terminal device to the server according to the first screen state information of the terminal device that is acquired by the processor 1101, and specifically includes: the transmitter The 1102 is configured to send the second message to the server according to the first screen state information of the terminal device. Further, the terminal device, as shown in FIG. 12, further includes: a receiver 1104. The receiver 1104 is configured to receive a data packet sent by the server. The embodiment of the present invention provides a terminal device, after the processor obtains the first state information of the device, the sender sends the first state information of the terminal device to the server, so that the server is configured according to the first device. The status information determines whether the received data packet is sent to the terminal device or the data packet is stored in the buffer area, so that when the server receives the multiple data packets sent by the application provider, the server may determine according to the status information of the terminal device. When the data packet is not pushed, the received data packet is stored in the buffer area, so that it is not required to be sent to the terminal device every time the data packet is received, thereby reducing the number of times the AP and the modem of the terminal device are awakened, thereby reducing the number of times. The power consumption of the mobile terminal extends the standby time of the mobile terminal. The embodiment of the present invention provides a system for data processing. As shown in FIG. 13, the system includes: a server 1301 and a terminal device 1302. The server 1301 is the server described in the foregoing embodiment. The terminal device 1302 is the terminal device described in the foregoing embodiment. The embodiment of the present invention provides a system for data processing. The terminal device adds the acquired first state information and the priority information of the application to the heartbeat packet to form a special heartbeat packet. After receiving the special heartbeat packet, the server parses the first a status information and application priority information, and then determining a priority of the application corresponding to the received data packet, determining whether to push the data packet according to the priority of the application corresponding to the data packet and the first status information, and determining not to push the data packet data pack In the case that the data packet is stored in the buffer area, until the trigger condition of the buffer area is satisfied, the data packet stored in the buffer area is pushed to the terminal device. In this way, when the server receives multiple data packets sent by the application provider, when the server determines that the data packet is not pushed according to the state information of the terminal device, the server stores the received data packet in the buffer area, so that it does not need to be received every time. When the data packet is sent to the terminal device, the number of times the AP and the modem of the terminal device are awakened is reduced, thereby reducing the power consumption of the mobile terminal and prolonging the standby time of the mobile terminal.
在本申请所提供的几个实施例中, 应该理解, 所揭露的系统, 装置 和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅 仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实 际实现时可以有另外的划分方式, 例如多个单元或组件可以结合或者可 以集成到另一个系统, 或一些特征可以忽略, 或不执行。 另一点, 所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接 口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其它的形 式。 所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于 一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选 择其中的部分或者全部单元来实现本实施例方案的目的。 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单 元中, 也可以是各个单元单独物理包括, 也可以两个或两个以上单元集 成在一个单元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以 釆用硬件加软件功能单元的形式实现。 上述以软件功能单元的形式实现的集成的单元, 可以存储在一个计 算机可读取存储介质中。 上述软件功能单元存储在一个存储介质中, 包 括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或 者网络设备等) 执行本发明各个实施例所述方法的部分步骤。 而前述的 存储介质包括: U盘、 移动硬盘、 只读存储器 ( Read-On l y Memory , 简称 ROM ) 、 随机存取存储器 ( Random Acce s s Memo ry , 简称 RAM ) 、 磁碟或 者光盘等各种可以存储程序代码的介质。 最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案 进行修改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替 换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和 范围。 In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units. The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a USB flash drive, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The medium in which the program code is stored. Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, and not The invention is described in detail with reference to the foregoing embodiments, and those skilled in the art should understand that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalent. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 claims
1、 一种数据处理的方法, 其特征在于, 包括: 接收数据包; 获取终端设备的第一状态信息; 所述第一状态信息用于标识所述终 端设备的状态; 根据所述终端设备的第一状态信息确定是否推送所述数据包; 若确定不推送所述数据包, 则将所述数据包存储至緩存区。 1. A data processing method, characterized in that it includes: receiving a data packet; obtaining first status information of a terminal device; the first status information is used to identify the status of the terminal device; according to the status of the terminal device The first status information determines whether to push the data packet; if it is determined not to push the data packet, store the data packet in the cache area.
2、 根据权利要求 1所述的方法, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息时, 所述根据所述终端设备的第一状态信息确定是否推送所述数据包包 括: 根据所述终端设备的第一呼吸灯状态信息确定是否推送所述数据 包; 所述若确定不推送所述数据包, 则将所述数据包存储至緩存区包括: 若确定所述终端设备的呼吸灯处于开启状态时, 确定不推送所述数 据包, 则将所述数据包存储至緩存区。 2. The method according to claim 1, characterized in that, when the first status information of the terminal device includes: the first breathing light status information of the terminal device, the first status information of the terminal device is: Determining whether to push the data packet based on the status information includes: determining whether to push the data packet based on the first breathing light status information of the terminal device; and if it is determined not to push the data packet, storing the data packet in The cache area includes: if it is determined that the breathing light of the terminal device is on and it is determined not to push the data packet, then the data packet is stored in the cache area.
3、 根据权利要求 2所述的方法, 其特征在于, 还包括: 若确定呼吸灯处于关闭状态时, 确定推送所述数据包, 则将所述数 据包推送至终端设备, 并将所述緩存区的数据推送至终端设备。 3. The method according to claim 2, further comprising: if it is determined that the breathing light is turned off and it is determined to push the data packet, then push the data packet to the terminal device and cache the data packet. The data in the area is pushed to the terminal device.
4、 根据权利要求 1所述的方法, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息及所述终端设备的第一屏幕状态信息时, 所述根据所述终端设备的第一状态信息确定是否推送所述数据包包 括: 根据所述终端设备的第一屏幕状态信息, 确定所述终端设备的屏幕 是否处于开启状态; 若确定所述终端设备的屏幕处于关闭状态, 则根据所述终端设备的 第一呼吸灯状态信息确定所述终端设备的呼吸灯是否处于开启状态; 所述若确定不推送所述数据包, 则将所述数据包存储至緩存区包括: 若所述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于开 启状态时, 确定不推送所述数据包, 则将所述数据包存储至緩存区。 4. The method according to claim 1, characterized in that, when the first status information of the terminal device includes: the first breathing light status information of the terminal device and the first screen status information of the terminal device , Determining whether to push the data packet according to the first status information of the terminal device includes: determining whether the screen of the terminal device is in an on state according to the first screen status information of the terminal device; if it is determined that the terminal If the screen of the device is off, determine whether the breathing light of the terminal device is on according to the first breathing light status information of the terminal device; if it is determined not to push the data packet, then send the data packet to Storing into the cache area includes: if the screen of the terminal device is turned off and the breathing light of the terminal device is on, and it is determined not to push the data packet, then storing the data packet in the cache area.
5、 根据权利要求 4所述的方法, 其特征在于, 还包括: 若确定所述终端设备的屏幕处于开启状态, 确定推送数据包, 则将 所述数据包推送至终端设备, 并将所述緩存区中存储的数据包推送至所 述终端设备; 或者, 若所述终端设备的屏幕关闭状态并且所述终端设备的呼吸灯处于关 闭状态时, 确定推送数据包, 则将所述数据包推送至终端设备。 5. The method according to claim 4, further comprising: if it is determined that the screen of the terminal device is on and it is determined to push the data packet, then push the data packet to the terminal device and send the data packet to the terminal device. The data packet stored in the buffer area is pushed to the terminal device; or, if the screen of the terminal device is turned off and the breathing light of the terminal device is turned off, it is determined to push the data packet, then the data packet is pushed. to the terminal device.
6、 根据权利要求 1 -5任一项所述的方法, 其特征在于, 在所述若确 定不推送所述数据包, 则将所述数据包存储至緩存区之后, 还包括: 获取所述终端设备的第二屏幕状态信息; 根据所述终端设备的第二屏幕状态信息确定是否推送所述緩存区的 数据包; 若确定所述终端设备的屏幕处于开启状态, 则确定所述緩存区是否 存储有数据包; 若所述緩存区中存储有数据包, 则将所述緩存区中存储的数据包推 送至所述终端设备。 6. The method according to any one of claims 1 to 5, characterized in that, after storing the data packet in a cache area if it is determined not to push the data packet, it further includes: obtaining the data packet. The second screen status information of the terminal device; Determine whether to push the data packet of the cache area according to the second screen status information of the terminal device; If it is determined that the screen of the terminal device is in an open state, determine whether the cache area Data packets are stored; if data packets are stored in the cache area, push the data packets stored in the cache area to the terminal device.
7、 根据权利要求 1 -5任一项所述的方法, 其特征在于, 在所述若确 定不推送所述数据包, 则将所述数据包存储至緩存区之后, 还包括: 获取所述终端设备的第二呼吸灯状态信息; 根据所述终端设备的第二呼吸灯状态信息确定是否推送所述緩存区 的数据包; 若确定所述终端设备的呼吸灯处于关闭状态, 则确定所述緩存区是 否存储有数据包; 若所述緩存区中存储有数据包, 则将所述緩存区中存储的数据包推 送至所述终端设备。 7. The method according to any one of claims 1 to 5, characterized in that, after storing the data packet in a cache area if it is determined not to push the data packet, it further includes: obtaining the data packet. The second breathing light status information of the terminal device; Determine whether to push the data packet of the buffer area according to the second breathing light status information of the terminal device; If it is determined that the breathing light of the terminal device is in an off state, determine that the Whether the data packet is stored in the cache area; if the data packet is stored in the cache area, push the data packet stored in the cache area to the terminal device.
8、 根据权利要求 1 -7任一项所述的方法, 其特征在于, 在所述若确 定不推送所述数据包, 则将所述数据包存储至緩存区之后, 还包括: 确定所述緩存区存储的数据包是否达到第一门限值; 若所述緩存区存储的数据包达到所述第一门限值, 则将所述緩存区 存储的数据包推送至所述终端设备。 8. The method according to any one of claims 1 to 7, characterized in that, after storing the data packet in a cache area if it is determined not to push the data packet, it further includes: determining that the data packet is not pushed. Whether the data packets stored in the cache area reach the first threshold value; if the data packets stored in the cache area reach the first threshold value, push the data packets stored in the cache area to the terminal device.
9、 根据权利要求 1 -8任一项所述的方法, 其特征在于, 在接收数据包之前, 还包括: 获取应用的优先级信息; 在所述根据所述终端设备的第一状态信息确定是否推送所述数据包 之前还包括: 根据所述数据包, 确定所述数据包对应的第一应用; 获取所述第一应用的优先级信息, 并根据所述第一应用的优先级信 息, 确定所述数据包对应的第一应用是否有处理优先权; 所述根据所述终端设备的状态信息确定是否推送所述数据包包括: 若确定所述数据包对应的第一应用有处理优先权, 则将所述数据包 推送至所述终端设备; 若确定所述数据包对应的第一应用没有处理优先权, 则执行所述根 据所述终端设备的第一状态信息确定是否推送所述数据包。 9. The method according to any one of claims 1 to 8, characterized in that, before receiving the data packet, further comprising: obtaining priority information of the application; and determining according to the first status information of the terminal device. Whether to push the data packet also includes: determining the first application corresponding to the data packet according to the data packet; obtaining the priority information of the first application, and based on the priority information of the first application, Determine whether the first application corresponding to the data packet has processing priority; Determining whether to push the data packet according to the status information of the terminal device includes: If it is determined that the first application corresponding to the data packet has processing priority, then push the data packet to the terminal device; if it is determined that the first application corresponding to the data packet does not have processing priority, then execute the method according to The first status information of the terminal device determines whether to push the data packet.
10、 根据权利要求 9 所述的方法, 其特征在于, 所述获取应用的优 先级信息包括: 接收所述终端设备发送的第 ―消息; 所述第一消息中携带有所述应 用的优先级信息; 根据所述第一消息, 获取所述应用的优先级信息。 10. The method according to claim 9, characterized in that: obtaining priority information of an application includes: receiving a first message sent by the terminal device; and the first message carries the priority of the application. Information; According to the first message, obtain the priority information of the application.
11、 根据权利要求 1 -10任一项所述的方法, 其特征在于, 所述获取终端设备的第一状态信息包括: 接收所述终端设备发送的第二消息; 所述第二消息中携带有所述终 端设备的第一状态信息; 根据所述第二消息, 获取所述终端设备的第一状态信息。 11. The method according to any one of claims 1 to 10, characterized in that: obtaining the first status information of a terminal device includes: receiving a second message sent by the terminal device; and carrying in the second message There is first status information of the terminal device; and according to the second message, the first status information of the terminal device is obtained.
12、 一种数据处理的方法, 其特征在于, 包括: 获取终端设备的第一状态信息; 所述第一状态信息用于标识所述终 端设备的状态; 所述第一状态信息包括: 所述终端设备的第一屏幕状态 信息; 根据所述终端设备的第一屏幕状态信息,将所述终端设备的第一状 态信息发送至服务器。 12. A data processing method, characterized in that it includes: obtaining first status information of a terminal device; the first status information is used to identify the status of the terminal device; the first status information includes: The first screen status information of the terminal device; sending the first status information of the terminal device to the server according to the first screen status information of the terminal device.
1 3、 根据权利要求 12所述的方法, 其特征在于, 所述根据所述终端 设备的第一屏幕状态信息,将所述终端设备的第一状态信息发送至服务 器包括: 若所述终端设备的第一屏幕状态信息指示所述终端设备的屏幕处于 开启状态, 则向所述服务器发送所述终端设备的第一状态信息; 或者, 若所述终端设备的第一屏幕状态信息指示所述终端设备的屏幕处于 关闭状态, 则根据第一频率, 向所述服务器发送所述终端设备的第一状 态信息。 13. The method according to claim 12, wherein: sending the first status information of the terminal device to the server according to the first screen status information of the terminal device includes: if the terminal device If the first screen status information indicates that the screen of the terminal device is on, then the first status information of the terminal device is sent to the server; Alternatively, if the first screen status information of the terminal device indicates that the screen of the terminal device is in a closed state, the first status information of the terminal device is sent to the server according to the first frequency.
14、 根据权利要求 1 2或 1 3所述的方法, 其特征在于, 还包括: 获取应用的优先级信息; 确定获取的所述应用的优先级信息与已存储的应用的优先级信息是 否相同; 若确定获取的所述应用的优先级信息与已存储的应用的优先级信息 不相同, 则将所述应用的优先级信息发送至所述服务器。 14. The method according to claim 12 or 13, further comprising: obtaining the priority information of the application; determining whether the obtained priority information of the application is the same as the stored priority information of the application. ; If it is determined that the obtained priority information of the application is different from the stored priority information of the application, then send the priority information of the application to the server.
1 5、 根据权利要求 1 4所述的方法, 其特征在于, 在所述将所述应用的优先级信息发送至所述服务器之前, 还包括: 将所述应用的优先级信息添加至第一消息中; 所述将所述应用的优先级信息发送至所述服务器包括: 将所述第一消息发送至所述服务器。 15. The method according to claim 14, characterized in that, before sending the priority information of the application to the server, further comprising: adding the priority information of the application to the first message; sending the priority information of the application to the server includes: sending the first message to the server.
1 6、 根据权利要求 1 2-1 5任一项所述的方法, 其特征在于, 在所述 根据所述终端设备的第一屏幕状态信息,将所述终端设备的第一状态信 息发送至服务器之前, 还包括: 将所述终端设备的第一状态信息添加至第二消息; 所述根据所述终端设备的第一屏幕状态信息,将所述终端设备的第 一状态信息发送至所述服务器包括: 根据所述终端设备的第一屏幕状态信息, 将所述第二消息发送至所 述服务器。 16. The method according to any one of claims 12-15, characterized in that, according to the first screen status information of the terminal device, the first status information of the terminal device is sent to Before the server, the method further includes: adding the first status information of the terminal device to the second message; and sending the first status information of the terminal device to the second message according to the first screen status information of the terminal device. The server includes: sending the second message to the server according to the first screen status information of the terminal device.
1 7、 根据权利要求 1 2-1 6任一项所述的方法, 其特征在于, 在根据所述终端设备的第一屏幕状态信息,将所述终端设备的第一 状态信息发送至所述服务器之后, 还包括: 接收所述服务器发送的数据包。 17. The method according to any one of claims 12-16, characterized in that, according to the first screen status information of the terminal device, the first status information of the terminal device is sent to the After the server, the method further includes: receiving the data packet sent by the server.
1 8、 一种服务器, 其特征在于, 包括: 接收单元, 获取单元, 确定 单元, 以及处理单元; 所述接收单元, 用于接收数据包; 所述获取单元, 用于获取终端设备的第一状态信息; 所述第一状态 信息用于标识所述终端设备的状态; 所述确定单元, 用于根据所述终端设备的第一状态信息确定是否推 送所述数据包; 所述处理单元, 用于在所述确定单元确定不推送所述数据包时, 将 所述数据包存储至緩存区。 18. A server, characterized in that it includes: a receiving unit, an obtaining unit, a determining unit, and a processing unit; the receiving unit is used to receive data packets; the obtaining unit is used to obtain the first data of a terminal device Status information; The first status information is used to identify the status of the terminal device; The determination unit is used to determine whether to push the data packet according to the first status information of the terminal device; The processing unit is used When the determining unit determines not to push the data packet, the data packet is stored in the cache area.
1 9、 根据权利要求 1 8所述的服务器, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息的情况下, 所述确定单元用于根据所述终端设备的第一状态信息确定是否推送 所述数据包, 具体包括: 所述确定单元用于根据所述终端设备的第一呼 吸灯状态信息确定是否推送所述数据包; 所述处理单元用于在所述确定单元确定不推送所述数据包时, 将所 述数据包存储至緩存区, 具体包括: 所述处理单元用于在所述终端设备 的呼吸灯处于开启状态, 所述确定单元确定不推送所述数据包的情况下, 将所述数据包存储至緩存区。 19. The server according to claim 18, wherein when the first status information of the terminal device includes: the first breathing light status information of the terminal device, the determining unit is configured to: Determining whether to push the data packet according to the first status information of the terminal device specifically includes: the determining unit is configured to determine whether to push the data packet according to the first breathing light status information of the terminal device; the processing The unit is configured to store the data packet in a cache area when the determining unit determines not to push the data packet, specifically including: the processing unit is configured to: when the breathing light of the terminal device is on, the If the determining unit determines not to push the data packet, it stores the data packet in the cache area.
20、 根据权利要求 1 9所述的服务器, 其特征在于, 还包括: 发送单 元; 所述发送单元, 用于在所述确定单元确定呼吸灯处于关闭状态, 确 定推送所述数据包的情况下, 将所述数据包推送至终端设备, 并将所述 緩存区的数据推送至终端设备。 20. The server according to claim 19, further comprising: a sending unit; The sending unit is configured to push the data packet to the terminal device and push the data in the cache area to the terminal when the determining unit determines that the breathing light is in an off state and determines to push the data packet. equipment.
2 1、 根据权利要求 1 8所述的服务器, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息及所述终端设备的第一屏幕状态信息的情况下, 所述确定单元用于根据所述终端设备的第一状态信息确定是否推送 所述数据包, 具体包括: 所述确定单元用于根据所述终端设备的第一屏 幕状态信息, 确定所述终端设备的屏幕是否处于开启状态; 在确定所述 终端设备的屏幕处于关闭状态的情况下, 根据所述终端设备的第一呼吸 灯状态信息确定所述终端设备的呼吸灯是否处于开启状态; 所述处理单元用于在所述确定单元确定不推送所述数据包时, 将所 述数据包存储至緩存区, 具体包括: 所述处理单元用于在所述终端设备 的屏幕关闭状态并且所述终端设备的呼吸灯处于开启状态, 所述确定单 元确定不推送所述数据包的情况下, 将所述数据包存储至緩存区。 21. The server according to claim 18, characterized in that when the first status information of the terminal device includes: the first breathing light status information of the terminal device and the first screen status of the terminal device In the case of information, the determining unit is configured to determine whether to push the data packet based on the first status information of the terminal device, specifically including: the determining unit is configured to determine based on the first screen status information of the terminal device, Determine whether the screen of the terminal device is in an on state; when it is determined that the screen of the terminal device is in an off state, determine whether the breathing light of the terminal device is on according to the first breathing light status information of the terminal device state; the processing unit is configured to store the data packet in a cache area when the determining unit determines not to push the data packet, specifically including: the processing unit is configured to process the screen in a closed state of the terminal device And the breathing light of the terminal device is in the on state, and when the determining unit determines not to push the data packet, it stores the data packet in the cache area.
22、 根据权利要求 2 1所述的服务器, 其特征在于, 所述发送单元, 还用于在所述确定单元确定所述终端设备的屏幕处 于开启状态, 确定推送数据包的情况下, 将所述数据包推送至终端设备, 并将所述緩存区中存储的数据包推送至所述终端设备; 或者, 所述发送单元, 还用于在所述终端设备的屏幕关闭状态并且所述终 端设备的呼吸灯处于关闭状态时, 确定推送数据包的情况下, 将所述数 据包推送至终端设备。 22. The server according to claim 21, wherein the sending unit is further configured to send the data packet when the determining unit determines that the screen of the terminal device is on and determines to push the data packet. Push the data packet to the terminal device, and push the data packet stored in the buffer area to the terminal device; or, the sending unit is also used to close the screen of the terminal device and the terminal device When the breathing light is turned off, when it is determined to push the data packet, the data packet is pushed to the terminal device.
2 3、 根据权利要求 1 8-22任一项所述的服务器, 其特征在于, 所述获取单元, 还用于获取所述终端设备的第二屏幕状态信息; 所述确定单元, 还用于根据所述终端设备的第二屏幕状态信息确定 是否推送所述緩存区的数据包; 所述确定单元, 还用于在确定所述终端设备的屏幕处于开启状态的 情况下, 确定所述緩存区是否存储有数据包; 所述发送单元, 还用于在所述緩存区中存储有数据包的情况下, 将 所述緩存区中存储的数据包推送至所述终端设备。 23. The server according to any one of claims 18-22, characterized in that, the obtaining unit is also used to obtain the second screen status information of the terminal device; the determining unit is also used to obtain Determined based on the second screen status information of the terminal device Whether to push the data packet in the cache area; the determination unit is also configured to determine whether the cache area stores a data packet when it is determined that the screen of the terminal device is on; the sending unit is also It is used to push the data packet stored in the cache area to the terminal device when the data packet is stored in the cache area.
24、 根据权利要求 18-22任一项所述的服务器, 其特征在于, 所述获取单元, 还用于获取所述终端设备的第二呼吸灯状态信息; 所述确定单元, 还用于根据所述终端设备的第二呼吸灯状态信息确 定是否推送所述緩存区的数据包; 所述确定单元, 还用于在所述终端设备的呼吸灯处于关闭状态的情 况下, 确定所述緩存区是否存储有数据包; 所述发送单元, 还用于在所述緩存区中存储有数据包的情况下, 将 所述緩存区中存储的数据包推送至所述终端设备。 24. The server according to any one of claims 18 to 22, characterized in that: the obtaining unit is also used to obtain the second breathing light status information of the terminal device; the determining unit is also used to obtain the second breathing light status information of the terminal device; The second breathing light status information of the terminal device determines whether to push the data packet of the cache area; the determination unit is also configured to determine the cache area when the breathing light of the terminal device is in an off state. Whether data packets are stored; the sending unit is also configured to push the data packets stored in the cache area to the terminal device when data packets are stored in the cache area.
25、 根据权利要求 18-24任一项所述的服务器, 其特征在于, 所述确定单元, 还用于确定所述緩存区存储的数据包是否达到第 ― 门限值; 所述发送单元, 还用于在所述确定单元确定所述緩存区存储的数据 包达到所述第一门限值的情况下, 将所述緩存区存储的数据包推送至所 述终端设备。 25. The server according to any one of claims 18 to 24, characterized in that, the determining unit is also used to determine whether the data packet stored in the cache area reaches the -th threshold value; the sending unit, It is also configured to push the data packet stored in the cache area to the terminal device when the determining unit determines that the data packet stored in the cache area reaches the first threshold value.
26、 根据权利要求 18-25任一项所述的服务器, 其特征在于, 所述获取单元, 还用于获取应用的优先级信息; 所述确定单元, 还用于根据所述数据包, 确定所述数据包对应的第 一应用; 所述确定单元, 还用于获取所述第一应用的优先级信息, 并根据所 述第一应用的优先级信息, 确定所述数据包对应的第一应用是否有处理 优先权; 所述确定单元用于根据所述终端设备的第一状态信息确定是否推送 所述数据包, 具体包括: 所述确定单元用于在确定所述数据包对应的第 一应用有处理优先权时, 将所述数据包推送至所述终端设备; 在确定所 述数据包对应的第一应用没有处理优先权时, 执行所述根据所述终端设 备的第一状态信息确定是否推送所述数据包。 26. The server according to any one of claims 18 to 25, characterized in that: the obtaining unit is also used to obtain the priority information of the application; the determining unit is also used to determine based on the data packet The first application corresponding to the data packet; the determining unit is also used to obtain the priority information of the first application, and determine the priority information according to the The priority information of the first application is used to determine whether the first application corresponding to the data packet has processing priority; the determining unit is used to determine whether to push the data packet according to the first status information of the terminal device, specifically The method includes: the determining unit is configured to push the data packet to the terminal device when it is determined that the first application corresponding to the data packet has processing priority; and when it is determined that the first application corresponding to the data packet does not have processing priority. When authorized, the step of determining whether to push the data packet according to the first status information of the terminal device is performed.
27、 根据权利要求 26所述的服务器, 其特征在于, 所述接收单元, 还用于接收所述终端设备发送的第一消息; 所述第 ―消息中携带有应用的优先级信息; 所述获取单元用于获取应用的优先级信息, 具体包括: 所述获取单 元用于根据所述接收单元接收的所述第一消息, 获取所述应用的优先级 信息。 27. The server according to claim 26, wherein the receiving unit is further configured to receive the first message sent by the terminal device; the first message carries priority information of the application; The obtaining unit is configured to obtain the priority information of the application, specifically including: the obtaining unit is configured to obtain the priority information of the application according to the first message received by the receiving unit.
28、 根据权利要求 18-27任一项所述的服务器, 其特征在于, 所述接收单元, 还用于接收所述终端设备发送的第二消息; 所述第 二消息中携带有所述终端设备的第一状态信息; 所述获取单元用于获取终端设备的第一状态信息, 具体包括: 所述 获取单元用于根据所述接收单元接收的所述第二消息, 获取所述终端设 备的第一状态信息。 28. The server according to any one of claims 18 to 27, characterized in that: the receiving unit is also configured to receive a second message sent by the terminal device; the second message carries the terminal The first status information of the device; the obtaining unit is configured to obtain the first status information of the terminal device, specifically including: the obtaining unit is configured to obtain the first status information of the terminal device according to the second message received by the receiving unit. First status information.
29、 一种终端设备, 其特征在于, 包括: 获取单元, 发送单元; 所述获取单元, 用于获取终端设备的第一状态信息; 所述第一状态 信息用于标识所述终端设备的状态; 所述第一状态信息包括: 所述终端 设备的第一屏幕状态信息; 所述发送单元, 用于根据所述获取单元获取的所述终端设备的第一 屏幕状态信息,将所述终端设备的第一状态信息发送至服务器。 29. A terminal device, characterized in that it includes: an acquisition unit, a sending unit; the acquisition unit is used to acquire the first status information of the terminal device; the first status information is used to identify the status of the terminal device ; The first status information includes: the first screen status information of the terminal device; the sending unit, configured to send the terminal device to the terminal device according to the first screen status information of the terminal device obtained by the acquisition unit. The first status information is sent to the server.
30、 根据权利要求 29所述的终端设备, 其特征在于, 所述发送单元用于根据所述获取单元获取的所述终端设备的第一屏 幕状态信息,将所述终端设备的第一状态信息发送至服务器, 具体包括: 所述发送单元用于在所述终端设备的第一屏幕状态信息指示所述终端设 备的屏幕处于开启状态时, 向所述服务器发送所述终端设备的第一状态 信息; 或者, 在所述终端设备的第一屏幕状态信息指示所述终端设备的 屏幕处于关闭状态时, 根据第一频率, 向所述服务器发送所述终端设备 的第一状态信息。 30. The terminal device according to claim 29, characterized in that, The sending unit is configured to send the first status information of the terminal device to the server according to the first screen status information of the terminal device acquired by the acquisition unit, specifically including: the sending unit is configured to: When the first screen status information of the terminal device indicates that the screen of the terminal device is on, send the first status information of the terminal device to the server; or, when the first screen status information of the terminal device indicates that the screen is on. When the screen of the terminal device is in a closed state, the first status information of the terminal device is sent to the server according to the first frequency.
31、 根据权利要求 29或 30所述的终端设备, 其特征在于, 还包括: 确定单元; 所述获取单元, 还用于获取应用的优先级信息; 31. The terminal device according to claim 29 or 30, further comprising: a determining unit; the obtaining unit, also used to obtain the priority information of the application;
息与已存储的应用的优先级信息是否相同; 所述发送单元, 还用于在所述确定单元确定获取的所述应用的优先 级信息与已存储的应用的优先级信息不相同时, 将所述应用的优先级信 息发送至所述服务器。 whether the obtained priority information of the application is the same as the stored priority information of the application; the sending unit is also configured to: when the determining unit determines that the obtained priority information of the application is not the same as the stored priority information of the application, The priority information of the application is sent to the server.
32、 根据权利要求 31所述的终端设备, 其特征在于, 还包括: 处理 单元; 所述处理单元, 用于将所述应用的优先级信息添加至第一消息中; 所述发送单元用于将所述应用的优先级信息发送至所述服务器, 具 体包括: 所述发送单元用于将所述第一消息发送至所述服务器。 32. The terminal device according to claim 31, further comprising: a processing unit; the processing unit, configured to add priority information of the application to the first message; and the sending unit, configured to Sending the priority information of the application to the server specifically includes: the sending unit is configured to send the first message to the server.
33、 根据权利要求 29-32任一项所述的终端设备, 其特征在于, 所述处理单元, 还用于将所述终端设备的第一状态信息添加至第二 消息; 所述发送单元用于根据所述获取单元获取的所述终端设备的第一屏 幕状态信息,将所述终端设备的第一状态信息发送至服务器, 具体包括: 所述发送单元用于根据所述终端设备的第一屏幕状态信息, 将所述第二 消息发送至所述服务器。 33. The terminal device according to any one of claims 29 to 32, wherein the processing unit is further configured to add the first status information of the terminal device to the second message; the sending unit uses Based on the first screen status information of the terminal device acquired by the acquisition unit, sending the first status information of the terminal device to the server specifically includes: the sending unit is configured to: screen status information, the second The message is sent to the server.
34、 根据权利要求 29-33任一项所述的终端设备, 其特征在于, 还 包括: 接收单元; 所述接收单元, 用于接收所述服务器发送的数据包。 34. The terminal device according to any one of claims 29 to 33, further comprising: a receiving unit; the receiving unit, configured to receive the data packet sent by the server.
35、 一种服务器, 其特征在于, 包括: 接收器以及处理器; 所述接收器, 用于接收数据包; 所述处理器, 用于获取终端设备的第一状态信息; 所述第一状态信 息用于标识所述终端设备的状态; 所述处理器, 还用于根据所述终端设备的第一状态信息确定是否推 送所述数据包; 所述处理器, 还用于在确定不推送所述数据包时, 将所述数据包存 储至緩存区。 35. A server, characterized in that it includes: a receiver and a processor; the receiver is used to receive data packets; the processor is used to obtain the first status information of the terminal device; the first status The information is used to identify the status of the terminal device; the processor is also used to determine whether to push the data packet according to the first status information of the terminal device; the processor is also used to determine not to push the data packet; When the data packet is described, the data packet is stored in the cache area.
36、 根据权利要求 35所述的服务器, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息的情况下, 所述处理器用于根据所述终端设备的第一状态信息确定是否推送所 述数据包, 具体包括: 所述处理器用于根据所述终端设备的第一呼吸灯 状态信息确定是否推送所述数据包; 所述处理器用于在确定不推送所述数据包时, 将所述数据包存储至 緩存区, 具体包括: 所述处理器用于在所述终端设备的呼吸灯处于开启 状态, 确定不推送所述数据包的情况下, 将所述数据包存储至緩存区。 36. The server according to claim 35, wherein when the first status information of the terminal device includes: the first breathing light status information of the terminal device, the processor is configured to: Determining whether to push the data packet based on the first status information of the terminal device specifically includes: The processor is configured to determine whether to push the data packet based on the first breathing light status information of the terminal device; The processor is configured to determine whether to push the data packet. When the data packet is not pushed, the data packet is stored in the cache area, which specifically includes: the processor is configured to: when the breathing light of the terminal device is on and determines not to push the data packet, The data packet is stored in the buffer area.
37、 根据权利要求 36所述的服务器, 其特征在于, 还包括发送器, 所述发送器, 用于在呼吸灯处于关闭状态, 确定推送所述数据包的 情况下, 将所述数据包推送至终端设备, 并将所述緩存区的数据推送至 终端设备。 37. The server according to claim 36, further comprising a transmitter, the transmitter is configured to push the data packet when the breathing light is turned off and it is determined to push the data packet. to the terminal device, and push the data in the cache area to the terminal device.
38、 根据权利要求 35所述的服务器, 其特征在于, 当所述终端设备的第一状态信息包括: 所述终端设备的第一呼吸灯 状态信息及所述终端设备的第一屏幕状态信息的情况下, 所述处理器用于根据所述终端设备的第一状态信息确定是否推送所 述数据包, 具体包括: 所述处理器用于根据所述终端设备的第一屏幕状 态信息, 确定所述终端设备的屏幕是否处于开启状态; 在所述终端设备 的屏幕处于关闭状态的情况下, 根据所述终端设备的第一呼吸灯状态信 息确定所述终端设备的呼吸灯是否处于开启状态; 所述处理器用于在确定不推送所述数据包时, 将所述数据包存储至 緩存区, 具体包括: 所述处理器用于在所述终端设备的屏幕关闭状态并 且所述终端设备的呼吸灯处于开启状态, 确定不推送所述数据包的情况 下, 将所述数据包存储至緩存区。 38. The server according to claim 35, wherein when the first status information of the terminal device includes: the first breathing light status information of the terminal device and the first screen status information of the terminal device, In this case, the processor is configured to determine whether to push the data packet according to the first status information of the terminal device, specifically including: the processor is configured to determine whether to push the data packet according to the first screen status information of the terminal device. Whether the screen of the device is on; In the case where the screen of the terminal device is off, determining whether the breathing light of the terminal device is on according to the first breathing light status information of the terminal device; The processing The processor is configured to store the data packet in a cache area when it is determined not to push the data packet, specifically including: the processor is configured to turn off the screen of the terminal device and the breathing light of the terminal device is on. , if it is determined not to push the data packet, store the data packet in the cache area.
39、 根据权利要求 38所述的服务器, 其特征在于, 所述发送器, 还用于在所述终端设备的屏幕处于开启状态, 确定推 送数据包的情况下, 将所述数据包推送至终端设备, 并将所述緩存区中 存储的数据包推送至所述终端设备; 或者, 所述发送器, 还用于在所述终端设备的屏幕关闭状态并且所述终端 设备的呼吸灯处于关闭状态时, 确定推送数据包的情况下, 将所述数据 包推送至终端设备。 39. The server according to claim 38, wherein the transmitter is further configured to push the data packet to the terminal when the screen of the terminal device is on and it is determined to push the data packet. device, and push the data packets stored in the buffer area to the terminal device; or, the transmitter is also used to turn off the screen of the terminal device and the breathing light of the terminal device is off. When it is determined to push the data packet, the data packet is pushed to the terminal device.
40、 根据权利要求 35-39任一项所述的服务器, 其特征在于, 所述处理器, 还用于获取所述终端设备的第二屏幕状态信息; 所述处理器, 还用于根据所述终端设备的第二屏幕状态信息确定是 否推送所述緩存区的数据包; 所述处理器,还用于在所述终端设备的屏幕处于开启状态的情况下, 确定所述緩存区是否存储有数据包; 所述发送器, 还用于在所述緩存区中存储有数据包的情况下, 将所 述緩存区中存储的数据包推送至所述终端设备。 40. The server according to any one of claims 35 to 39, characterized in that: the processor is also used to obtain the second screen status information of the terminal device; the processor is also used to obtain the second screen status information according to the The second screen status information of the terminal device determines whether to push the data packet of the cache area; the processor is also configured to determine whether the cache area stores the data when the screen of the terminal device is in the on state. data pack; The transmitter is also configured to push the data packet stored in the buffer area to the terminal device when the data packet is stored in the buffer area.
41、 根据权利要求 35-39任一项所述的服务器, 其特征在于, 所述处理器, 还用于获取所述终端设备的第二呼吸灯状态信息; 所述处理器, 还用于根据所述终端设备的第二呼吸灯状态信息确定 是否推送所述緩存区的数据包; 所述处理器, 还用于在所述终端设备的呼吸灯处于关闭状态的情况 下, 确定所述緩存区是否存储有数据包; 所述发送器, 还用于在所述緩存区中存储有数据包的情况下, 将所 述緩存区中存储的数据包推送至所述终端设备。 41. The server according to any one of claims 35 to 39, characterized in that: the processor is also used to obtain the second breathing light status information of the terminal device; the processor is also used to obtain the second breathing light status information of the terminal device; The second breathing light status information of the terminal device determines whether to push the data packet of the cache area; the processor is also configured to determine the cache area when the breathing light of the terminal device is in an off state. Whether data packets are stored; the transmitter is also configured to push the data packets stored in the cache area to the terminal device when data packets are stored in the buffer area.
42、 根据权利要求 35-41任一项所述的服务器, 其特征在于, 所述处理器, 还用于确定所述緩存区存储的数据包是否达到第 ―门 限值; 所述发送器, 还用于在确定所述緩存区存储的数据包达到所述第一 门限值的情况下, 将所述緩存区存储的数据包推送至所述终端设备。 42. The server according to any one of claims 35 to 41, characterized in that, the processor is also used to determine whether the data packets stored in the cache area reach the -th threshold value; the transmitter, It is also configured to push the data packet stored in the cache area to the terminal device when it is determined that the data packet stored in the cache area reaches the first threshold value.
43、 根据权利要求 35-42任一项所述的服务器, 其特征在于, 所述处理器, 还用于获取应用的优先级信息; 所述处理器, 还用于根据所述数据包, 确定所述数据包对应的第一 应用; 所述处理器, 还用于获取所述第一应用的优先级信息, 并根据所述 第一应用的优先级信息, 确定所述数据包对应的第一应用是否有处理优 先权; 所述处理器用于根据所述终端设备的第一状态信息确定是否推送所 述数据包, 具体包括: 所述处理器用于在确定所述数据包对应的第一应 用有处理优先权时, 将所述数据包推送至所述终端设备; 在确定所述数 据包对应的第一应用没有处理优先权时, 执行所述根据所述终端设备的 第一状态信息确定是否推送所述数据包。 43. The server according to any one of claims 35 to 42, characterized in that: the processor is also used to obtain the priority information of the application; the processor is also used to determine based on the data packet The first application corresponding to the data packet; the processor is also configured to obtain the priority information of the first application, and determine the first application corresponding to the data packet according to the priority information of the first application. Whether the application has processing priority; the processor is configured to determine whether to push the data packet according to the first status information of the terminal device, specifically including: the processor is configured to determine whether the first application corresponding to the data packet has processing priority; When processing the priority, push the data packet to the terminal device; When the first application corresponding to the data packet does not have processing priority, the step of determining whether to push the data packet according to the first status information of the terminal device is performed.
44、 根据权利要求 43所述的服务器, 其特征在于, 所述接收器, 还用于接收所述终端设备发送的第一消息; 所述第一 消息中携带有应用的优先级信息; 所述处理器用于获取应用的优先级信息, 具体包括: 所述处理器用 于根据所述接收器接收的所述第一消息, 获取所述应用的优先级信息。 44. The server according to claim 43, wherein the receiver is further configured to receive the first message sent by the terminal device; the first message carries priority information of the application; The processor is configured to obtain the priority information of the application, which specifically includes: the processor is configured to obtain the priority information of the application according to the first message received by the receiver.
45、 根据权利要求 35-44任一项所述的服务器, 其特征在于, 所述接收器, 还用于接收所述终端设备发送的第二消息; 所述第二 消息中携带有所述终端设备的第一状态信息; 所述处理器用于获取终端设备的第一状态信息, 具体包括: 所述处 理器用于根据所述接收器接收的所述第二消息, 获取所述终端设备的第 一状态信息。 45. The server according to any one of claims 35 to 44, characterized in that: the receiver is also used to receive a second message sent by the terminal device; the second message carries the terminal The first status information of the device; the processor is configured to obtain the first status information of the terminal device, specifically including: the processor is configured to obtain the first status information of the terminal device according to the second message received by the receiver. status information.
46、 一种终端设备, 其特征在于, 包括: 处理器, 发送器; 所述处理器, 用于获取终端设备的第一状态信息; 所述第一状态信 息用于标识所述终端设备的状态; 所述第一状态信息包括: 所述终端设 备的第一屏幕状态信息; 所述发送器, 用于根据所述处理器获取的所述终端设备的第一屏幕 状态信息,将所述终端设备的第一状态信息发送至服务器。 46. A terminal device, characterized in that it includes: a processor, a transmitter; the processor is used to obtain the first status information of the terminal device; the first status information is used to identify the status of the terminal device ; The first status information includes: the first screen status information of the terminal device; the transmitter, configured to send the terminal device to the terminal device according to the first screen status information of the terminal device obtained by the processor. The first status information is sent to the server.
47、 根据权利要求 46所述的终端设备, 其特征在于, 所述发送器用于根据所述处理器获取的所述终端设备的第一屏幕状 态信息,将所述终端设备的第一状态信息发送至服务器, 具体包括: 所述 发送器用于在所述终端设备的第一屏幕状态信息指示所述终端设备的屏 幕处于开启状态时, 向服务器发送所述终端设备的第一状态信息; 或者, 在所述终端设备的第一屏幕状态信息指示所述终端设备的屏幕处于关闭 状态时, 根据第一频率, 向服务器发送所述终端设备的第一状态信息。 47. The terminal device according to claim 46, wherein the transmitter is configured to send the first status information of the terminal device according to the first screen status information of the terminal device obtained by the processor. to the server, specifically including: the sender being configured to send the first status information of the terminal device to the server when the first screen status information of the terminal device indicates that the screen of the terminal device is on; or, When the first screen status information of the terminal device indicates that the screen of the terminal device is in a closed state, the first status information of the terminal device is sent to the server according to the first frequency.
48、 根据权利要求 46或 47所述的终端设备, 其特征在于, 所述处理器, 还用于获取应用的优先级信息; 所述处理器, 还用于确定获取的所述应用的优先级信息与已存储的 应用的优先级信息是否相同; 所述发送器, 还用于在所述处理器确定获取的所述应用的优先级信 息与已存储的应用的优先级信息不相同时, 将所述应用的优先级信息发 送至所述服务器。 48. The terminal device according to claim 46 or 47, characterized in that, the processor is also used to obtain the priority information of the application; the processor is also used to determine the obtained priority of the application. Whether the information is the same as the stored priority information of the application; the transmitter is also configured to: when the processor determines that the obtained priority information of the application is not the same as the stored priority information of the application, The priority information of the application is sent to the server.
49、 根据权利要求 48所述的终端设备, 其特征在于, 所述处理器, 还用于将所述应用的优先级信息添加至第一消息中; 所述发送器用于将所述终端设备的第一状态信息发送至服务器, 具 体包括: 所述发送器用于将所述第一消息发送至所述服务器。 49. The terminal device according to claim 48, wherein the processor is further configured to add the priority information of the application to the first message; and the sender is configured to add the priority information of the terminal device to the first message. Sending the first status information to the server specifically includes: the sender is configured to send the first message to the server.
50、 根据权利要求 46-49任一项所述的终端设备, 其特征在于, 所述处理器, 还用于将所述终端设备的第一状态信息添加至第二消 息; 所述发送器用于根据所述处理器获取的所述终端设备的第一屏幕状 态信息,将所述终端设备的第一状态信息发送至服务器, 具体包括: 所述 发送器用于根据所述终端设备的第一屏幕状态信息, 将所述第二消息发 送至所述服务器。 50. The terminal device according to any one of claims 46 to 49, wherein the processor is further configured to add the first status information of the terminal device to the second message; the transmitter is configured to According to the first screen status information of the terminal device obtained by the processor, sending the first status information of the terminal device to the server specifically includes: the sender is configured to: according to the first screen status of the terminal device information, sending the second message to the server.
51、 根据权利要求 46-50任一项所述的终端设备, 其特征在于, 还 包括: 接收器; 所述接收器, 用于接收所述服务器发送的数据包。 51. The terminal device according to any one of claims 46 to 50, further comprising: a receiver; the receiver is used to receive the data packet sent by the server.
52、 一种处理数据的系统, 其特征在于, 包括: 服务器, 终端设备; 所述服务器是权利要求 18-28任一项所述的服务器; 所述终端设备是权利要求 29-34任一项所述的终端设备。 5 3、 一种处理数据的系统, 其特征在于, 包括: 服务器, 终端设备; 所述服务器是权利要求 35-45任一项所述的服务器; 52. A system for processing data, characterized in that it includes: a server, and a terminal device; the server is the server according to any one of claims 18-28; the terminal device is any one of claims 29-34 the terminal equipment. 53. A system for processing data, characterized in that it includes: a server, and a terminal device; the server is the server described in any one of claims 35-45;
所述终端设备是权利要求 46-51任一项所述的终端设备。 The terminal device is the terminal device according to any one of claims 46-51.
PCT/CN2013/091212 2013-12-31 2013-12-31 Data processing method, device and system WO2015100662A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/091212 WO2015100662A1 (en) 2013-12-31 2013-12-31 Data processing method, device and system
CN201380075278.9A CN105103515B (en) 2013-12-31 2013-12-31 A kind of method, apparatus and system of data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/091212 WO2015100662A1 (en) 2013-12-31 2013-12-31 Data processing method, device and system

Publications (1)

Publication Number Publication Date
WO2015100662A1 true WO2015100662A1 (en) 2015-07-09

Family

ID=53493002

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/091212 WO2015100662A1 (en) 2013-12-31 2013-12-31 Data processing method, device and system

Country Status (2)

Country Link
CN (1) CN105103515B (en)
WO (1) WO2015100662A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493568A (en) * 2017-08-31 2017-12-19 锤子科技(北京)股份有限公司 Message treatment method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669591A (en) * 2020-12-23 2021-04-16 深圳市骏普科技开发有限公司 Meter reading data transmission method, slave device, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378408A (en) * 2008-10-10 2009-03-04 深圳华为通信技术有限公司 Method, apparatus, gateway and proxy for pushing message to multiple terminals
CN102892089A (en) * 2012-09-25 2013-01-23 中国联合网络通信集团有限公司 Message pushing method, device and system
CN103166921A (en) * 2011-12-13 2013-06-19 中国移动通信集团公司 Method supplying service to terminal, network side device and terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8219621B2 (en) * 2003-09-04 2012-07-10 Nokia Corporation Method and device for handling push type e-mails for a mobile terminal device according to a user profile
CN101304563B (en) * 2008-06-18 2012-03-21 腾讯科技(深圳)有限公司 Method and system for pushing-transmitting message
CN101572725A (en) * 2009-05-11 2009-11-04 卓望数码技术(深圳)有限公司 Method for pushing data to mobile terminal, system and mobile terminal
CN103327585B (en) * 2013-05-27 2018-04-13 努比亚技术有限公司 Communication terminal and its communication means

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378408A (en) * 2008-10-10 2009-03-04 深圳华为通信技术有限公司 Method, apparatus, gateway and proxy for pushing message to multiple terminals
CN103166921A (en) * 2011-12-13 2013-06-19 中国移动通信集团公司 Method supplying service to terminal, network side device and terminal
CN102892089A (en) * 2012-09-25 2013-01-23 中国联合网络通信集团有限公司 Message pushing method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493568A (en) * 2017-08-31 2017-12-19 锤子科技(北京)股份有限公司 Message treatment method and device
CN107493568B (en) * 2017-08-31 2020-10-30 北京字节跳动网络技术有限公司 Message processing method and device

Also Published As

Publication number Publication date
CN105103515A (en) 2015-11-25
CN105103515B (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN106357364B (en) Data transmission method, device and system
AU2014269271B2 (en) Electronic device using logical channels for communication
EP3007494B1 (en) Data processing method and device
US10660067B2 (en) Systems and methods for efficient signaling of IoT devices in a wireless telecommunications network
CN110191066B (en) Method, equipment and system for determining maximum transmission unit (PMTU)
KR20160060091A (en) Paging method, network device and communication system
CN110536415B (en) NAS message processing method, cluster terminal and cluster core network
WO2017091994A1 (en) Data transmission method, device and terminal
KR20090080460A (en) Method for suspending and resuming delivery of content
WO2014121471A1 (en) Method, base station and user equipment for data transmission and acquisition
US9456325B2 (en) Transmission of a multimedia message doubled with the transmission of a text message
WO2014040279A1 (en) Information processing method and load balancing device
WO2016011643A1 (en) Method for terminating call, application processor and modem
CN114363351B (en) Proxy connection suppression method, network architecture and proxy server
CN111385068B (en) Data transmission method, device, electronic equipment and communication system
JP5997198B2 (en) Terminal management apparatus, terminal, communication system, terminal management method, and program
WO2015100662A1 (en) Data processing method, device and system
CN110856213B (en) Method and device for switching data transmission modes, storage medium and electronic equipment
CN107431965B (en) Method and device for realizing Transmission Control Protocol (TCP) transmission
US10321395B2 (en) Data packet processing method and related device
US10560817B2 (en) Variable volume data transmission in a mobile communication network
WO2018107368A1 (en) Connection establishment method and device for data transmission
CN107548105B (en) Data transmission confirmation method based on UDP (user Datagram protocol) and base station
EP4373108A1 (en) Data transmission method, data transmission apparatus and storage medium
WO2015196473A1 (en) Method, device, intelligent terminal and system for data sending/receiving

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380075278.9

Country of ref document: CN

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

Ref document number: 13900745

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13900745

Country of ref document: EP

Kind code of ref document: A1