CN107979695B - Network message receiving method and device and storage medium - Google Patents

Network message receiving method and device and storage medium Download PDF

Info

Publication number
CN107979695B
CN107979695B CN201711162909.7A CN201711162909A CN107979695B CN 107979695 B CN107979695 B CN 107979695B CN 201711162909 A CN201711162909 A CN 201711162909A CN 107979695 B CN107979695 B CN 107979695B
Authority
CN
China
Prior art keywords
terminal
network function
sleep mode
preset
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711162909.7A
Other languages
Chinese (zh)
Other versions
CN107979695A (en
Inventor
刘任
张晓亮
张通
邢旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711162909.7A priority Critical patent/CN107979695B/en
Publication of CN107979695A publication Critical patent/CN107979695A/en
Application granted granted Critical
Publication of CN107979695B publication Critical patent/CN107979695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72418User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting emergency services
    • H04M1/72421User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting emergency services with automatic activation of emergency service functions, e.g. upon sensing an alarm
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0238Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is an unwanted signal, e.g. interference or idle signal
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to a network message receiving method and device and a storage medium, and belongs to the technical field of networks. The method comprises the following steps: when the terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. The method and the device solve the problem that the user misses the network message in the sleep mode, and are beneficial to avoiding the user missing the network message.

Description

Network message receiving method and device and storage medium
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a method and an apparatus for receiving a network message, and a storage medium.
Background
With the development of network technology, terminals such as smart phones and tablet computers realized based on network technology are increasingly popularized. The terminal typically has a sleep mode to which the user can adjust the terminal before entering the sleep state. In the related art, when a terminal is in a sleep mode, the terminal turns off a network function.
However, after the terminal turns off the network function, the terminal cannot receive the network message, which may cause the user to miss the network message.
Disclosure of Invention
The present disclosure provides a network message receiving method, device and storage medium, which can solve the problem that a user misses a network message in a sleep mode, and the technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a network message receiving method, including:
when a terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets the preset network function starting condition, starting the network function of the terminal;
and receiving a network message in the sleep mode through the opened network function.
Optionally, the method further comprises:
after the network function of the terminal is started, detecting whether the terminal meets a preset network function closing condition;
and when the terminal meets the preset network function closing condition, closing the opened network function.
Optionally, when the terminal is in the sleep mode, detecting whether the terminal meets a preset network function start condition includes: detecting whether the terminal meets the preset network function starting condition every a first preset time length from the moment when the terminal enters the sleep mode;
after the network function of the terminal is started, detecting whether the terminal meets a preset network function closing condition or not comprises the following steps: and detecting whether the terminal meets the preset network function closing condition every second preset time length from the moment of starting the network function of the terminal, wherein the second preset time length is less than the first preset time length.
Optionally, the preset network function starting condition includes: at least one of reaching a first preset moment and enabling a screen of the terminal to enter an awakening state;
the preset network function closing condition comprises the following steps: and at least one of reaching a second preset time and enabling the screen of the terminal to enter a blanking state, wherein the first preset time is different from the second preset time.
Optionally, the first preset time is determined by determining whether an interval network function start period is reached;
the second preset time is determined by determining whether the network function closing period reaches an interval, or the second preset time is determined by determining whether the network function opening time reaches a preset time.
Optionally, the method further comprises:
judging whether the terminal meets a preset sleep mode starting condition or not;
and when the terminal meets the preset sleep mode starting condition, starting the sleep mode of the terminal, wherein when the terminal starts the sleep mode, the network function of the terminal is closed.
Optionally, the preset sleep mode enabling condition includes: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user.
Optionally, the method further comprises:
receiving a classifier sent by a classifier generating device, wherein the classifier is obtained by training the classifier generating device according to a classification algorithm by using a mode sample set as training data and is used for determining whether a terminal is in a sleep mode, the mode sample set comprises n sleep mode samples collected when the sample terminal is in the sleep mode and m non-sleep mode samples collected when the sample terminal is in the non-sleep mode, and both n and m are integers greater than 0;
obtaining a mode sample of the terminal at the current moment;
inputting the pattern sample into the classifier to output a pattern label through the classifier, the pattern label indicating a category of the pattern sample;
when the class of the mode sample indicated by the mode label is in a sleep mode, determining that the terminal is in the sleep mode.
Optionally, the starting the network function of the terminal includes:
detecting whether a wireless local area network exists in the environment where the terminal is located;
when a wireless local area network exists in the environment where the terminal is located, starting the wireless local area network function of the terminal;
and when the wireless local area network does not exist in the environment where the terminal is located, starting the data network function of the terminal.
According to a second aspect of the embodiments of the present disclosure, there is provided a network message receiving apparatus, the apparatus including:
the terminal comprises a first detection module, a second detection module and a third detection module, wherein the first detection module is configured to detect whether a terminal meets a preset network function starting condition when the terminal is in a sleep mode;
a first starting module configured to start a network function of the terminal when the terminal satisfies the preset network function starting condition;
a receiving module configured to receive a network message in the sleep mode through the network function turned on.
Optionally, the apparatus further comprises:
the second detection module is configured to detect whether the terminal meets a preset network function closing condition after the network function of the terminal is started;
and the closing module is configured to close the opened network function when the terminal meets the preset network function closing condition.
Optionally, the first detecting module is configured to detect, every first preset time period, from a time when the terminal enters the sleep mode, whether the terminal meets the preset network function starting condition;
the second detection module is configured to detect whether the terminal meets the preset network function closing condition every second preset time period from the moment of starting the network function of the terminal, wherein the second preset time period is shorter than the first preset time period.
Optionally, the preset network function starting condition includes: at least one of reaching a first preset moment and enabling a screen of the terminal to enter an awakening state;
the preset network function closing condition comprises the following steps: and at least one of reaching a second preset time and enabling the screen of the terminal to enter a blanking state, wherein the first preset time is different from the second preset time.
Optionally, the first preset time is determined by determining whether an interval network function start period is reached;
the second preset time is determined by determining whether the network function closing period reaches an interval, or the second preset time is determined by determining whether the network function opening time reaches a preset time.
Optionally, the apparatus further comprises:
the judging module is configured to judge whether the terminal meets a preset sleep mode starting condition;
and the second starting module is configured to start the sleep mode of the terminal when the terminal meets the preset sleep mode starting condition, wherein when the terminal starts the sleep mode, the network function of the terminal is closed.
Optionally, the preset sleep mode enabling condition includes: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user.
Optionally, the apparatus further comprises:
a receiving module, configured to receive a classifier sent by a classifier generating device, where the classifier is obtained by the classifier generating device through training according to a classification algorithm by using a mode sample set as training data and is used for determining whether a terminal is in a sleep mode, the mode sample set includes n sleep mode samples collected by the sample terminal when the sample terminal is in the sleep mode and m non-sleep mode samples collected by the sample terminal when the sample terminal is in the non-sleep mode, and n and m are integers greater than 0;
the acquisition module is configured to acquire a mode sample of the terminal at the current moment;
an input module configured to input the pattern sample into the classifier to output a pattern tag by the classifier, the pattern tag indicating a category of the pattern sample;
a determining module configured to determine that the terminal is in a sleep mode when the class of the mode sample indicated by the mode tag is in the sleep mode.
Optionally, the first opening module includes:
the detection submodule is configured to detect whether a wireless local area network exists in the environment where the terminal is located;
the first starting submodule is configured to start a wireless local area network function of the terminal when the wireless local area network exists in the environment where the terminal is located;
and the second starting sub-module is configured to start the data network function of the terminal when the wireless local area network does not exist in the environment where the terminal is located.
According to a third aspect of the embodiments of the present disclosure, there is provided a network message receiving apparatus, including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
when a terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets the preset network function starting condition, starting the network function of the terminal;
and receiving a network message in the sleep mode through the opened network function.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a processing component of a computer, cause the processing component to execute the network message receiving method of the first aspect or any alternative of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the network message receiving method, the device and the storage medium provided by the embodiment of the disclosure detect whether the terminal meets the preset network function starting condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure, the drawings that are needed to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flow chart illustrating a method of receiving a network message in accordance with an exemplary embodiment;
fig. 2 is a flow chart illustrating a method of another method of network message reception in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of determining that a terminal is in a sleep mode in accordance with an example embodiment;
FIG. 4 is a diagram illustrating a mode setting interface in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating another method of determining that a terminal is in a sleep mode in accordance with an example embodiment;
fig. 6 is a flow chart illustrating a method for turning on a network function of a terminal according to an example embodiment;
FIG. 7 is a block diagram illustrating a network message receiving device in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating another network message receiving device in accordance with an illustrative embodiment;
FIG. 9 is a block diagram illustrating yet another network message receiving device in accordance with an exemplary embodiment;
FIG. 10 is a block diagram illustrating yet another network message receiving device in accordance with an illustrative embodiment;
FIG. 11 is a block diagram illustrating a first opening module in accordance with an exemplary embodiment;
fig. 12 is a block diagram illustrating a network message receiving device in accordance with an example embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a method of a network message receiving method according to an exemplary embodiment, which is illustrated in the present embodiment as being applied to a terminal. The terminal may be a smartphone, tablet, laptop portable computer, or smart watch, among others. Referring to fig. 1, the network message receiving method may include:
in step 101, when the terminal is in the sleep mode, it is detected whether the terminal meets a preset network function starting condition.
In step 102, when the terminal satisfies a preset network function starting condition, the network function of the terminal is started.
In step 103, a network message is received in sleep mode with the network function turned on.
To sum up, the network message receiving method provided by the embodiment of the present disclosure detects whether the terminal satisfies the preset network function start condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
Fig. 2 is a flowchart illustrating a method of another network message receiving method according to an exemplary embodiment, which is illustrated in the present embodiment as being applied to a terminal. The terminal may be a smartphone, tablet, laptop portable computer, or smart watch, among others. Referring to fig. 2, the network message receiving method may include:
in step 201, the terminal determines that the terminal is in a sleep mode.
In the embodiment of the present disclosure, the determining, by the terminal, that the terminal is in the sleep mode may include the following two implementation manners:
referring to fig. 3, a flowchart of a method for a terminal to determine that the terminal is in a sleep mode is shown in a first implementation manner, and referring to fig. 3, the method includes:
in sub-step 2011A, the terminal determines whether the terminal meets a preset sleep mode enabling condition. When the terminal meets the preset sleep mode starting condition, executing step 2012A; and executing the step 2013A when the terminal does not meet the preset sleep mode starting condition.
In an embodiment of the present disclosure, the preset sleep mode enabling condition may include: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user. For different preset sleep mode starting conditions, the terminal detecting whether the terminal meets the preset sleep mode starting conditions may include the following two aspects:
in a first aspect: when the preset sleep mode starting condition comprises that the preset sleep time period is reached, the terminal can judge whether the preset sleep time period is reached, when the preset sleep time period is reached, the terminal determines that the terminal meets the preset sleep mode starting condition, and when the preset sleep time period is not reached, the terminal determines that the terminal does not meet the preset sleep mode starting condition. In this embodiment of the present disclosure, the terminal may store a preset sleep time period, where the preset sleep time period may include a start time and an end time, and a clock is disposed in the terminal, and the terminal may acquire a time through the clock and compare the acquired time with the start time of the preset sleep time period (or any time in the preset sleep time period) to determine whether the preset sleep time period is reached.
It should be noted that, in the embodiment of the present disclosure, the preset sleep time period may be a time period set in the terminal by the user, or the preset sleep time period may be a time period configured by a technician before the terminal leaves a factory, or the preset sleep time period may also be a time period obtained by the terminal counting the use habit of the user on the sleep mode of the terminal.
When the preset sleep time period is a fixed time period set in the terminal by the user, the terminal may provide a sleep time period setting interface, the user may input the sleep time period in the sleep time period setting interface, and the terminal may store the sleep time period.
When the preset sleep time period is a time period configured by a technician before the terminal leaves a factory, before the terminal leaves the factory, the technician may count the longest screen-off time period (in the embodiment of the present disclosure, it is assumed that each user uses one terminal) of the terminal of each of the plurality of users in one day (24 hours), obtain a plurality of longest screen-off time periods, then process the plurality of longest screen-off time periods through a mathematical algorithm, obtain sleep time periods of most users of the plurality of users, determine the sleep time periods of the most users as the preset sleep time period, and configure the preset sleep time period in the terminal. The screen of the terminal can be extinguished in a plurality of different time periods within one day, and the longest screen extinguishing time period refers to: the longest time period of the plurality of different time periods. For example, the technician statistically determines that the sleep time periods of most users are 21:00 to 7:00, and then the technician may determine the sleep time periods 21:00 to 7:00 as preset sleep time periods and configure the preset sleep time periods 21:00 to 7:00 in the terminal.
It should be noted that, in practical applications, after the terminal leaves a factory, the terminal may acquire sleep information of the user during a process in which the user uses the terminal, where the sleep information may include a sleep time period, and the terminal may adjust a preset sleep time period preset in the terminal according to the sleep information of the user. Illustratively, the terminal adjusts the preset sleep time period from 21:00 to 7:00 according to the sleep information of the user, for example, the terminal adjusts the preset sleep time period from 21:00 to 7:00 to 22:00 to 7:00 according to the sleep information of the user.
When the preset sleep time period is a time period obtained by counting the use habit of the user on the sleep mode of the terminal by the terminal, the terminal can count the use habit of the user on the sleep mode of the terminal, and the preset sleep time period is determined according to the use habit of the user on the sleep mode of the terminal.
In a second aspect: when the preset sleep mode starting condition comprises a sleep mode starting instruction triggered by a user, the terminal can detect whether the sleep mode starting instruction triggered by the user is received, when the sleep mode starting instruction triggered by the user is received, the terminal determines that the terminal meets the preset sleep mode starting condition, and when the sleep mode starting instruction triggered by the user is not received, the terminal determines that the terminal does not meet the preset sleep mode starting condition. In the embodiment of the present disclosure, the terminal may provide a mode setting interface, and the user may trigger the sleep mode activation instruction in the mode setting interface. For example, the mode setting interface may be as shown in fig. 4, referring to fig. 4, a sleep mode, a mute mode, an airplane mode, and a custom mode are displayed in the mode setting interface 30, and a user may click any one of the modes in the mode setting interface 30 to trigger an open instruction for the corresponding mode, for example, the user clicks the sleep mode in the mode setting interface 30 to trigger a sleep mode open instruction.
It should be noted that, in practical applications, the terminal may determine whether the terminal meets the preset sleep mode enabling condition by combining the first aspect and the second aspect of the sub-step 2011A, which is not described herein again in this disclosure.
In sub-step 2012A, the terminal turns on a sleep mode of the terminal.
If the terminal determines that the terminal satisfies the preset sleep mode enabling condition in the sub-step 2011A, the terminal enables the sleep mode of the terminal. After the terminal starts the sleep mode of the terminal, the terminal is in a sleep state, the screen of the terminal is turned off, and the network function of the terminal is turned off.
In sub-step 2013A, the terminal prohibits turning on the sleep mode of the terminal.
If the terminal determines that the terminal does not satisfy the preset sleep mode enabling condition in the sub-step 2011A, the terminal prohibits enabling the sleep mode of the terminal. For example, if the terminal determines that the preset sleep time period has not been reached and the sleep mode activation command triggered by the user has not been received in the sub-step 2011A, the terminal prohibits activation of the sleep mode of the terminal.
Referring to fig. 5, a flowchart of another method for a terminal to determine that the terminal is in a sleep mode according to the embodiment of the present disclosure is shown, and referring to fig. 5, the method includes:
in sub-step 2011B, the terminal receives the classifier transmitted by the classifier generating device.
The classifier is obtained by training a classifier generating device according to a classification algorithm by using a mode sample set as training data and is used for determining whether the terminal is in a sleep mode. The mode sample set comprises n sleep mode samples collected when the sample terminal is in a sleep mode and m non-sleep mode samples collected when the sample terminal is in a non-sleep mode, wherein n and m are integers larger than 0.
Optionally, the operation of training the classifier according to the classification algorithm by using the pattern sample set as training data by the classifier generating device may include: the classifier generating device acquires n sleep mode samples and m non-sleep mode samples from a plurality of sample terminals, and combines the n sleep mode samples and the m non-sleep mode samples into a mode sample set; and training according to a classification algorithm by taking the pattern sample set as training data to obtain a classifier. In this disclosure, the classifier generating device may be a desktop computer, a notebook computer, a server or a server cluster, and the like, and the sample terminals may include a plurality of sample terminals of the same type or model, each sample terminal is used for acquiring a sleep mode sample and a non-sleep mode sample, and the greater the number of the sample terminals is, the faster the generation speed of the mode sample set is, and further the faster the generation speed of the classifier is.
In order to obtain n sleep mode samples and m non-sleep mode samples from a plurality of sample terminals, the classifier generating means may obtain a first running log of the plurality of sample terminals in the sleep mode and a second running log of the plurality of sample terminals in the non-sleep mode, respectively, and obtaining a plurality of sleep mode samples from the first run log, obtaining a plurality of non-sleep mode samples from the second run log, any one of the plurality of sleep pattern samples may include p characteristic parameters and a label indicating a class of any one of the sleep pattern samples, the class of any one of the sleep pattern samples being in a sleep mode, p being an integer greater than 0, any one of the plurality of non-sleep mode samples comprises p characteristic parameters and a label indicating a category of any one of the non-sleep mode samples, the category of any one of the non-sleep mode samples being not in the sleep mode; and respectively carrying out format check processing and missing value completion processing on the plurality of sleep mode samples and the plurality of non-sleep mode samples to obtain n sleep mode samples and m sleep mode samples.
It should be noted that the p feature parameters may include: the system comprises at least three of parameters obtained by an acceleration sensor, system time of a sample mobile terminal, parameters obtained by a light sensor, a program operated by the sample terminal and a screen display interface of the sample terminal. In addition, in practical applications, the p characteristic parameters may also include other characteristic parameters of the sample terminal, such as parameters acquired by a distance sensor. The larger p, the higher the accuracy of the generated classifier.
It should be further noted that, among the p characteristic parameters, the parameter obtained by the acceleration sensor is used for reflecting the acceleration of the sample terminal, and when the acceleration of the sample terminal is continuously 0, the possibility that the sample terminal is in the sleep mode is high; parameters acquired by the light sensor are used for reflecting the light intensity around the sample terminal, and when the light intensity around the sample terminal is low, the possibility that the sample terminal is in a sleep mode is high; the system time of the sample terminal may be used to assist and calibrate the occasional anomaly ratio of the parameters acquired by the light sensor. For example, the intensity of light around the sample terminal is low, but the sample terminal is in a non-sleep mode; the program run by the sample terminal and the screen display interface of the sample terminal may be used to reflect the current behavior of the user, for example, if the sample terminal runs a game application and the screen display interface is the game interface of the game application, the sample terminal is less likely to be in the sleep mode.
In sub-step 2012B, the terminal obtains a pattern sample for the current time of the terminal.
After receiving the classifier sent by the classifier generating device, the terminal may obtain a mode sample of the terminal at the current time, where the mode sample is an unlabeled mode sample, that is, the mode sample only includes a plurality of feature parameters, and the types of the feature parameters may be the same as the types of the feature parameters of any sleep mode sample or any non-sleep mode sample obtained by the classifier generating device. For example, any sleep mode sample acquired by the classifier generating device includes characteristic parameters that are parameters acquired by the acceleration sensor, system time of the sample terminal, and parameters acquired by the light sensor, and the mode sample of the current time acquired by the terminal includes parameters acquired by the acceleration sensor, system time, and parameters acquired by the light sensor of the current time.
In sub-step 2013B, the terminal inputs the pattern sample into the classifier to output a pattern tag through the classifier, the pattern tag indicating a class of the pattern sample.
After the terminal acquires the mode sample of the terminal at the current moment, the mode sample can be input into the classifier, the mode sample includes a plurality of characteristic parameters, the classifier compares the characteristic parameters with the characteristic parameters of any sleep mode sample or any non-sleep mode sample acquired by the classifier generating device to obtain the mode label of the mode sample, and outputs the mode label of the mode sample, the mode label is used for indicating the class of the mode sample, and whether the terminal is in the sleep mode can be judged according to the class of the mode sample indicated by the mode label.
In sub-step 2014B, when the class of mode samples indicated by the mode label is in sleep mode, it is determined that the terminal is in sleep mode.
In the embodiment of the present disclosure, the mode tag is used to indicate the class of the mode sample, and the class may be in a sleep mode or in a non-sleep mode, and when the class of the mode sample indicated by the classifier output mode tag in sub-step 2013B is in the sleep mode, the terminal determines that the terminal is in the sleep mode.
In sub-step 2015B, when the class of mode samples indicated by the mode label is in the non-sleep mode, it is determined that the terminal is in the non-sleep mode.
When the class of the mode sample indicated by the classifier output mode tag in sub-step 2013B is in the non-sleep mode, the terminal determines that the terminal is in the non-sleep mode.
In step 202, when the terminal is in the sleep mode, the terminal detects whether the terminal meets a preset network function start condition. When the terminal satisfies the preset network function starting condition, step 203 is executed, and when the terminal does not satisfy the preset network function starting condition, step 208 is executed.
In the embodiment of the disclosure, when the terminal is in the sleep mode, the terminal may detect whether the terminal satisfies a preset network function start condition. Optionally, the terminal may detect whether the terminal meets a preset network function starting condition every a first preset time period from a time when the terminal enters the sleep mode. The first preset time duration can be set according to an actual situation, and the first preset time duration can be fixed preset time duration or can be changed preset time duration, when the first preset time duration is fixed preset time duration, the terminal can store the fixed preset time duration, the fixed preset time duration can be 30 minutes, 1 hour or 2 hours and the like, when the first preset time duration is changed preset time duration, the terminal can store a preset time duration set {30 minutes, 1 hour, 2 hours, 3 hours }, the preset time duration set comprises 30 minutes, 1 hour, 2 hours and 3 hours, and each of the 30 minutes, 1 hour, 2 hours and 3 hours can be the first preset time duration.
The preset network function starting condition may include: and at least one of reaching the first preset time and enabling the screen of the terminal to enter an awakening state. The terminal may periodically turn on the network function, and the first preset time may be determined by determining whether an interval network function turn-on period is reached. The network function starting period of the interval may be a fixed period or a variable period, which is not limited in this embodiment. For example, the network function turn-on period of the interval may be a fixed 10-minute period, and the network function turn-on period of the interval may also be a period that randomly changes, such as 10 minutes, 5 minutes, and 8 minutes.
For the difference of the preset network function starting conditions, the terminal detecting whether the terminal meets the preset network function starting conditions may include two aspects:
in a first aspect: when the preset network function starting condition comprises that the first preset time is reached, the terminal can detect whether the first preset time is reached or not at intervals of a first preset time from the time when the terminal enters the sleep mode, when the first preset time is reached, the terminal determines that the terminal meets the preset network function starting condition, and when the first preset time is not reached, the terminal determines that the terminal does not meet the preset network function starting condition. In the embodiment of the present disclosure, the terminal may store a first preset time, a clock is disposed in the terminal, and the terminal may obtain the time through the clock and compare the obtained time with the first preset time to determine whether the first preset time is reached.
For example, assuming that the time when the terminal enters the sleep mode is t1, the first preset time is c1, and the first preset time is t2, the terminal detects whether the first preset time t2 is reached at time t1+ c1 (i.e. whether the terminal detection time t1+ c1 is equal to the first preset time t 2) from time t1, and then detects whether the first preset time t2 is reached at time t1+2c1 (i.e. whether the terminal detection time t1+2c1 is equal to the first preset time t 2), and so on, wherein c1 may be a fixed preset time, for example, c1 may be 30 minutes, or c1 may be a variable preset time, for example, c1 may be a time in a preset time set {30 minutes, 1 hour, 2 hours, 3 hours }.
In a second aspect: when the preset network function starting condition comprises that a screen of the terminal enters an awakening state, the terminal can detect whether the screen of the terminal enters the awakening state or not at intervals of a first preset time length from the moment when the terminal enters a sleep mode, when the screen of the terminal enters the awakening state, the terminal determines that the terminal meets the preset network function starting condition, and when the screen of the terminal does not enter the awakening state, the terminal determines that the terminal does not meet the preset network function starting condition. Optionally, when the screen of the terminal enters the awake state, a backlight of the screen of the terminal is turned on, and the terminal may detect whether the screen of the terminal enters the awake state by detecting whether the backlight of the screen of the terminal is turned on, and if the backlight of the screen of the terminal is turned on, the terminal determines that the screen of the terminal enters the awake state, and if the backlight of the screen of the terminal is not turned on, the terminal determines that the screen of the terminal does not enter the awake state.
For example, assuming that the time when the terminal enters the sleep mode is t1, the first preset time is c1, and the first preset time is t2, the terminal starts from time t1, detects whether the screen of the terminal enters the awake state at time t1+ c1, and detects whether the screen of the terminal enters the awake state at time t1+2c1, and so on, where c1 may be a fixed preset time, e.g., c1 may be 30 minutes, or c1 may be a changing preset time, e.g., c1 may be a time in a preset time set {30 minutes, 1 hour, 2 hours, 3 hours }.
It should be noted that, in practical applications, the terminal may determine whether the terminal satisfies the preset network function starting condition by combining the first aspect and the second aspect of step 203, which is not described herein again in this disclosure.
In step 203, the terminal turns on a network function of the terminal.
If the terminal determines that the terminal satisfies the preset network function starting condition in step 202, the terminal starts the network function of the terminal. For example, if the terminal determines that the first preset time t2 is reached in step 202, or the terminal determines that the screen of the terminal enters the wake-up state, the terminal turns on the network function of the terminal.
In the disclosed embodiments, the network functions may include wireless local area network functions and data network functions, and the wireless local area network may include, but is not limited to: wireless Fidelity (WIFI for short), bluetooth network, infrared network or Zigbee (Zigbee) network, and the data network may include: a fourth Generation mobile communication technology (hereinafter, referred to as the 4G) data network, a third Generation mobile communication technology (hereinafter, referred to as the 3G) data network, or a second Generation mobile communication technology (hereinafter, referred to as the 2nd Generation mobile communication technology, referred to as the 2G) data network, which is not limited in the embodiments of the present disclosure.
Optionally, referring to fig. 6, a flowchart of a method for a terminal to start a network function of the terminal according to an embodiment of the present disclosure is shown, and referring to fig. 6, the method includes:
in sub-step 2031, the terminal detects whether there is a wireless local area network in the environment in which the terminal is located. When the wireless local area network exists in the environment where the terminal is located, the substep 2032 is executed; when no wireless local area network exists in the environment in which the terminal is located, sub-step 2033 is performed.
Optionally, the terminal may detect whether a wireless local area network exists in an environment in which the terminal is located through a network detection technology, where the environment in which the terminal is located may be a space surrounded by a sphere whose radius is a preset distance with a location point in which the terminal is located as a center of the sphere, and the preset distance may be determined according to a coverage range of the wireless local area network, for example, the preset distance may be 50 meters or 60 meters. The implementation process that the terminal can detect whether the wireless local area network exists in the environment where the terminal is located through the network detection technology may refer to related technologies, and details of the embodiments of the present disclosure are not repeated herein.
In sub-step 2032, the terminal turns on the wireless local area network function of the terminal.
If the terminal determines that the wireless local area network exists in the environment where the terminal is located in the sub-step 2031, the terminal starts the wireless local area network function of the terminal. For example, the terminal starts a WIFI network function or a bluetooth network function of the terminal.
In sub-step 2033, the terminal turns on the data network functions of the terminal.
If the terminal determines that the wireless local area network does not exist in the environment where the terminal is located in the sub-step 2031, the terminal starts the data network function of the terminal. For example, the terminal turns on a 4G network function or a 3G network function of the terminal.
In step 204, the terminal receives a network message in a sleep mode through the network function turned on.
In the embodiment of the present disclosure, after the terminal starts the network function of the terminal in the sleep mode, the terminal may receive the received network message in the sleep mode through the started network function. For example, when the network function activated in step 203 is a wireless local area network function, the terminal receives a network message through the activated wireless local area network function; when the network function activated in step 203 is a data network function, the terminal receives a network message through the activated data network function. The network message may be a chat message, or a push message of a client, or a news message, and the like, which is not limited in this disclosure.
It should be noted that, in practical applications, in the sleep mode, the user may set a white list, where the white list includes names of application software installed in the terminal, and when the terminal is in the sleep mode and the network function of the terminal is turned on, the terminal may receive corresponding network messages through the application software corresponding to the names of the application software in the white list. For example, if the white list of the terminal includes chat software a (AA chat) and news software B (e.g., BB news) installed in the terminal, when the terminal is in the sleep mode, the chat message may be received through the chat software a, the news message may be received through the news software B, and so on.
In step 205, the terminal detects whether the terminal satisfies a preset network function shutdown condition. When the terminal meets the preset network function closing condition, executing step 206; and when the terminal does not meet the preset network function closing condition, executing step 207.
In the embodiment of the disclosure, when the terminal starts the network function of the terminal, the terminal may detect whether the terminal satisfies a preset network function closing condition. Optionally, the terminal may detect whether the terminal satisfies a preset network function closing condition every second preset duration from a time when the terminal opens the network function of the terminal. The second preset duration may be set according to an actual situation, the second preset duration may be smaller than the first preset duration, and the second preset duration may be a fixed preset duration or a variable preset duration, when the second preset duration is the fixed preset duration, the terminal may store the fixed preset duration, the fixed preset duration may be 20 minutes, 50 minutes, or 1 hour, and the like, and when the second preset duration is the variable preset duration, the terminal may store a preset duration set {20 minutes, 50 minutes, 1 hour, 2 hours }, where the preset duration set includes 20 minutes, 50 minutes, 1 hour, and 2 hours, and each of the 20 minutes, 50 minutes, 1 hour, and 2 hours may be the second preset duration.
The preset network function closing condition comprises the following steps: and at least one of reaching a second preset moment and enabling the screen of the terminal to enter a turning-off state. Alternatively, the terminal may periodically turn off the network function, and the second preset time may be determined by determining whether the network function turn-off period of the interval is reached. The network function starting period of the interval may be a fixed period or a variable period, which is not limited in this embodiment. For example, the network function turn-on period of the interval may be a fixed 10-minute period, and the network function turn-on period of the interval may also be a period that randomly changes, such as 10 minutes, 5 minutes, and 8 minutes. Alternatively, the second preset time may be determined by determining whether the network function start time reaches a preset time, where the preset time may be equal to the second preset time.
For different preset network function closing conditions, the terminal detecting whether the terminal meets the preset network function closing conditions may include the following two aspects:
in a first aspect: when the preset network function closing condition includes that the second preset time is reached, the terminal can detect whether the second preset time is reached or not at intervals of a second preset time from the time when the terminal opens the network function, when the second preset time is reached, the terminal determines that the terminal meets the preset network function closing condition, and when the second preset time is not reached, the terminal determines that the terminal does not meet the preset network function closing condition. In the embodiment of the present disclosure, the terminal may store a second preset time, a clock is disposed in the terminal, and the terminal may obtain the time through the clock and compare the obtained time with the second preset time to determine whether the second preset time is reached.
For example, assuming that the time when the terminal turns on the network function is t4, the second preset time duration is c2, and the second preset time duration is t3, the terminal detects whether the second preset time t3 is reached at time t4+ c2 (i.e., whether the terminal detection time t4+ c2 is equal to the second preset time t 3) from time t4, and further detects whether the second preset time t3 is reached at time t4+2c2 (i.e., whether the terminal detection time t4+2c2 is equal to the second preset time t 3), and so on, where c2 may be a fixed preset time duration, e.g., c2 may be 20 minutes, or c2 may be a variable preset time duration, e.g., c2 may be a time duration in a preset time duration set {20 minutes, 50 minutes, 1 hour, 2 hours }.
In a second aspect: when the preset network function closing condition includes that the screen of the terminal enters a blanking state, the terminal can detect whether the screen of the terminal enters the blanking state or not at intervals of a second preset duration from the moment when the terminal starts the network function, when the screen of the terminal enters the blanking state, the terminal determines that the terminal meets the preset network function closing condition, and when the screen of the terminal does not enter the blanking state, the terminal determines that the terminal does not meet the preset network function closing condition. Optionally, when the screen of the terminal enters the extinguished state, the backlight of the screen of the terminal is turned off, and the terminal may detect whether the screen of the terminal enters the extinguished state by detecting whether the backlight of the screen of the terminal is turned off, where if the backlight of the screen of the terminal is turned off, the terminal determines that the screen of the terminal enters the extinguished state, and if the backlight of the screen of the terminal is not turned off, the terminal determines that the screen of the terminal does not enter the extinguished state.
For example, assuming that the time when the terminal turns on the network function is t4, the second preset time is c2, and the second preset time is t3, the terminal starts from time t4, detects whether the screen of the terminal enters the extinguished state at time t4+ c2, and then detects whether the screen of the terminal enters the extinguished state at time t4+2c2, and so on, where c2 may be a fixed preset time, for example, c2 may be 20 minutes, or c2 may be a changing preset time, for example, c2 may be a time in a preset time set {20 minutes, 50 minutes, 1 hour, 2 hours }.
It should be noted that, in practical application, when the network function started in step 203 is a data network function of the terminal, the preset network function shutdown condition may also be: the data traffic used by the terminal reaches a preset traffic threshold, at this time, the terminal can monitor the data traffic used by the terminal after starting the data network function, and compare the data traffic used by the terminal with the preset traffic threshold. The implementation process of the data traffic used by the terminal monitoring terminal may refer to related technologies, and details of the embodiments of the present disclosure are not repeated herein.
Exemplarily, assuming that the preset traffic threshold is 500MB, after the terminal starts the data network function, the terminal monitors the data traffic used by the terminal, when the data traffic used by the terminal reaches 500MB, the terminal determines that the data traffic used by the terminal reaches the preset traffic threshold, thereby determining that the terminal satisfies the preset network function shutdown condition, and when the data traffic used by the terminal reaches 400MB, the terminal determines that the data traffic used by the terminal does not reach the preset traffic threshold, thereby determining that the terminal does not satisfy the preset network function shutdown condition.
It should be noted that, in practical applications, the terminal may determine whether the terminal satisfies the preset network function shutdown condition by combining the first aspect and the second aspect of step 205, which is not described herein again in this disclosure.
In step 206, the terminal turns off the network function that is turned on.
If the terminal determines in step 205 that the terminal meets the preset network function shutdown condition, the terminal shuts down the network function of the terminal, where the network function that is shut down is the network function that is turned on by the terminal in step 203. Illustratively, when the network function turned on by the terminal in step 203 is a wireless local area network function, the terminal turns off the wireless local area network function of the terminal, and when the network function turned on by the terminal in step 203 is a data network function, the terminal turns off the data network function of the terminal.
In step 207, the terminal prohibits turning off the turned-on network function.
If the terminal determines that the terminal does not satisfy the preset network function shutdown condition in step 205, the terminal prohibits shutdown of the network function of the terminal. Illustratively, the terminal prohibits turning off the wireless local area network function of the terminal, or the terminal prohibits turning off the data network function of the terminal.
In step 208, the terminal prohibits the network function of the terminal from being turned on.
If the terminal determines that the terminal does not satisfy the preset network function starting condition in step 202, the terminal prohibits starting the network function of the terminal. For example, if the terminal determines that the screen of the terminal does not enter the awake state neither at the first preset time in step 202, the terminal prohibits the network function of the terminal from being turned on.
In the related art, when the terminal is in the sleep mode, the network function of the terminal is turned off, so that, on one hand, the user may miss the network message, and on the other hand, when the user adjusts the terminal to the non-sleep mode (for example, the ring mode), the terminal may receive a large amount of network messages, so that the terminal continuously emits a prompt sound or continuously vibrates, and the user experience is poor; according to the network message receiving method provided by the embodiment of the disclosure, when the terminal is in the sleep mode, the network function of the terminal can be periodically started, and the network message is received through the started network function, so that on one hand, the user can be prevented from missing the network message, and on the other hand, when the user adjusts the terminal to the non-sleep mode (such as the ring mode), the terminal can be prevented from continuously giving out prompt tones or continuously vibrating, and the user experience is improved.
To sum up, the network message receiving method provided by the embodiment of the present disclosure detects whether the terminal satisfies the preset network function start condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
The terminal usually has a do-not-disturb mode, and in the related art, the user can adjust the terminal to the do-not-disturb mode before taking a rest, in the do-not-disturb mode, the terminal can perform a reminding operation (such as ringing or vibration) when receiving the network message of the application software allowed by the user, and the terminal does not perform the reminding operation when receiving the network message of other application software, so that the receiving of the network message can be prevented from disturbing the user. However, in the do-not-disturb mode, the terminal is always in the networking state, resulting in a large power consumption of the terminal. In the network message receiving method provided by the embodiment of the disclosure, because the terminal can start the network function and also can close the network function in the sleep mode, the user is prevented from missing the network message under the condition of ensuring that the terminal saves power.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 7 is a block diagram illustrating a network message receiving apparatus 1000 according to an exemplary embodiment, where the network message receiving apparatus 1000 may be implemented as part or all of a terminal, which may be a smart phone, a tablet computer, a smart tv, a smart watch, a laptop computer, etc., through software, hardware, or a combination of the two, and referring to fig. 7, the network message receiving apparatus 1000 may include:
the first detecting module 1010 is configured to detect whether the terminal meets a preset network function starting condition when the terminal is in the sleep mode.
A first starting module 1020 configured to start the network function of the terminal when the terminal satisfies a preset network function starting condition.
A receiving module 1030 configured to receive a network message in the sleep mode through the network function that is turned on.
To sum up, the network message receiving apparatus provided in the embodiment of the present disclosure detects whether the terminal satisfies the preset network function start condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
Optionally, referring to fig. 8, which shows a block diagram of another network message receiving apparatus 1000 provided in the embodiment of the present disclosure, referring to fig. 8, on the basis of fig. 7, the network message receiving apparatus 1000 further includes:
the second detecting module 1040 is configured to detect whether the terminal satisfies a preset network function closing condition after the network function of the terminal is turned on.
A closing module 1050 configured to close the opened network function when the terminal satisfies a preset network function closing condition.
Optionally, the first detecting module 1010 is configured to detect whether the terminal meets a preset network function starting condition every a first preset time period from a time when the terminal enters the sleep mode;
the second detecting module 1040 is configured to detect, from the time of starting the network function of the terminal, whether the terminal satisfies the preset network function closing condition every second preset duration, where the second preset duration is less than the first preset duration.
Optionally, the preset network function starting condition includes: at least one of reaching a first preset moment and enabling a screen of the terminal to enter an awakening state;
the preset network function shutdown conditions include: and when the first preset time is different from the second preset time, the screen of the terminal enters a turning-off state.
Optionally, the first preset time is determined by determining whether an interval network function start period is reached; the second preset time is determined by determining whether the network function off period of the interval is reached, or the second preset time is determined by determining whether the network function on period reaches the preset period.
Optionally, referring to fig. 9, which shows a block diagram of a network message receiving apparatus 1000 according to an embodiment of the present disclosure, referring to fig. 9, on the basis of fig. 8, the network message receiving apparatus 1000 further includes:
the determining module 1060 is configured to determine whether the terminal satisfies a preset sleep mode enabling condition.
A second starting module 1070 is configured to start the sleep mode of the terminal when the terminal meets a preset sleep mode starting condition, wherein when the terminal starts the sleep mode, the network function of the terminal is turned off.
Optionally, the preset sleep mode enabling condition includes: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user.
Optionally, referring to fig. 10, which shows a block diagram of another network message receiving apparatus 1000 provided in an embodiment of the present disclosure, referring to fig. 10, on the basis of fig. 8, the network message receiving apparatus 1000 further includes:
a receiving module 1080 configured to receive the classifier sent by the classifier generating device by the terminal. The classifier is obtained by a classifier generating device by taking a mode sample set as training data and training according to a classification algorithm, and is used for determining whether a terminal is in a sleep mode, wherein the mode sample set comprises n sleep mode samples collected when the sample terminal is in the sleep mode and m non-sleep mode samples collected when the sample terminal is in the non-sleep mode, and both n and m are integers larger than 0;
an obtaining module 1090 configured to obtain a mode sample of the terminal at the current time;
an input module 1100 configured to input the pattern sample into the classifier by the terminal to output a pattern tag through the classifier, the pattern tag indicating a category of the pattern sample;
the determining module 1110 is configured to determine that the terminal is in the sleep mode when the class of the mode sample indicated by the mode tag is in the sleep mode.
Optionally, referring to fig. 11, which shows a block diagram of a first enabling module 1020 provided in an embodiment of the present disclosure, referring to fig. 11, the first enabling module 1020 includes:
the detection submodule 1021 is configured to detect whether a wireless local area network exists in an environment where the terminal is located.
The first enabling sub-module 1022 is configured to enable the wireless lan function of the terminal when the wireless lan exists in the environment where the terminal is located.
The second enabling submodule 1023 is configured to enable the data network function of the terminal when the wireless local area network does not exist in the environment where the terminal is located.
To sum up, the network message receiving apparatus provided in the embodiment of the present disclosure detects whether the terminal satisfies the preset network function start condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 12, a block diagram of a network message receiving device 400 is shown in an exemplary embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and so forth.
Referring to fig. 12, the apparatus 400 may include one or more of the following components: processing component 402, memory 404, power component 406, multimedia component 408, audio component 410, input/output (I/O) interface 412, sensor component 414, and communication component 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, positioning, camera operations, and recording operations. Processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the network message receiving method described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations on the apparatus 400. Examples of such data include instructions for any application or method operating on the apparatus 400, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 404 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 may include a Microphone (MIC) configured to receive external audio signals when the device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor assembly 414 may detect an open/closed state of the apparatus 400, the relative positioning of the components, such as a display and keypad of the apparatus 400, the sensor assembly 414 may also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a WIreless local area network based on a communication standard, such as WIreless FIdelity (WIFI), 2G, 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the network message receiving method.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as memory 404 comprising instructions, executable by processor 420 of device 400 to perform the network message receiving method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a Compact disc read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, instructions in the storage medium, when executed by a processor of a device 400, enable the device 400 to perform a network message receiving method, the method comprising:
when the terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets a preset network function starting condition, starting the network function of the terminal;
and receiving the network message in the sleep mode through the opened network function.
To sum up, the network message receiving apparatus provided in the embodiment of the present disclosure detects whether the terminal satisfies the preset network function start condition when the terminal is in the sleep mode; when the terminal meets a preset network function starting condition, starting the network function of the terminal; and receiving the network message in the sleep mode through the opened network function. Because the network function of the terminal can be started when the terminal is in the sleep mode, the terminal can receive the network message when the terminal is in the sleep mode, the problem that the user misses the network message in the sleep mode is solved, and the network message missing of the user is avoided.
The embodiment of the present disclosure further provides a network message receiving apparatus, where the network message receiving apparatus includes:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
when the terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets a preset network function starting condition, starting the network function of the terminal;
and receiving the network message in the sleep mode through the opened network function.
The disclosed embodiments also provide a computer-readable storage medium having stored therein instructions that, when run on a processing component of a computer, cause the processing component to execute the network message receiving method shown in fig. 1 or fig. 2.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A method for receiving a network message, the method comprising:
when a terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets the preset network function starting condition, starting the network function of the terminal;
receiving a network message through application software corresponding to the name of the application software in a white list under the sleep mode through the started network function;
the method further comprises the following steps:
after the network function of the terminal is started, detecting whether the terminal meets a preset network function closing condition;
when the terminal meets the preset network function closing condition, closing the opened network function;
when the network function that is started is the data network function of the terminal, the preset network function closing condition includes: the data flow used by the terminal reaches a preset flow threshold;
the method further comprises the following steps:
receiving a classifier sent by a classifier generating device, wherein the classifier is obtained by the classifier generating device by taking a mode sample set as training data and training according to a classification algorithm, and is used for determining whether a terminal is in a sleep mode, the mode sample set comprises n sleep mode samples collected by the sample terminal when the sample terminal is in the sleep mode and m non-sleep mode samples collected by the sample terminal when the sample terminal is in the non-sleep mode, both n and m are integers greater than 0, the sleep mode samples comprise p feature parameters and a label used for indicating that the class of the sleep mode sample is the sleep mode, the non-sleep mode samples comprise p feature parameters and a label used for indicating that the class of the non-sleep mode sample is the non-sleep mode, and the p feature parameters comprise: at least three of parameters obtained by an acceleration sensor, system time of the sample mobile terminal, parameters obtained by a light sensor, a program operated by the sample terminal and a screen display interface of the sample terminal;
obtaining a mode sample of the terminal at the current moment;
inputting the pattern sample into the classifier to output a pattern label through the classifier, the pattern label indicating a category of the pattern sample;
when the class of the mode sample indicated by the mode label is in a sleep mode, determining that the terminal is in the sleep mode.
2. The method of claim 1,
when the terminal is in the sleep mode, detecting whether the terminal meets a preset network function starting condition or not, wherein the method comprises the following steps: detecting whether the terminal meets the preset network function starting condition every a first preset time length from the moment when the terminal enters the sleep mode;
after the network function of the terminal is started, detecting whether the terminal meets a preset network function closing condition or not comprises the following steps: and detecting whether the terminal meets the preset network function closing condition every second preset time length from the moment of starting the network function of the terminal, wherein the second preset time length is less than the first preset time length.
3. The method of claim 2,
the preset network function starting conditions comprise: at least one of reaching a first preset moment and enabling a screen of the terminal to enter an awakening state;
the preset network function closing condition comprises the following steps: and at least one of reaching a second preset time and enabling the screen of the terminal to enter a blanking state, wherein the first preset time is different from the second preset time.
4. The method of claim 3,
the first preset time is determined by determining whether the network function starting period of the interval is reached;
the second preset time is determined by determining whether the network function closing period reaches an interval, or the second preset time is determined by determining whether the network function opening time reaches a preset time.
5. The method according to any one of claims 1 to 2, further comprising:
judging whether the terminal meets a preset sleep mode starting condition or not;
and when the terminal meets the preset sleep mode starting condition, starting the sleep mode of the terminal, wherein when the terminal starts the sleep mode, the network function of the terminal is closed.
6. The method of claim 5, wherein the preset sleep mode enabling conditions comprise: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user.
7. The method according to any one of claims 1 to 2, wherein the starting of the network function of the terminal comprises:
detecting whether a wireless local area network exists in the environment where the terminal is located;
when a wireless local area network exists in the environment where the terminal is located, starting the wireless local area network function of the terminal;
and when the wireless local area network does not exist in the environment where the terminal is located, starting the data network function of the terminal.
8. A network message receiving apparatus, the apparatus comprising:
the terminal comprises a first detection module, a second detection module and a third detection module, wherein the first detection module is configured to detect whether a terminal meets a preset network function starting condition when the terminal is in a sleep mode;
a first starting module configured to start a network function of the terminal when the terminal satisfies the preset network function starting condition;
the receiving module is configured to receive a network message through application software corresponding to the name of the application software in a white list in the sleep mode through the started network function;
the device further comprises:
the second detection module is configured to detect whether the terminal meets a preset network function closing condition after the network function of the terminal is started;
a closing module configured to close the opened network function when the terminal satisfies the preset network function closing condition;
when the network function that is started is the data network function of the terminal, the preset network function closing condition includes: the data flow used by the terminal reaches a preset flow threshold;
the device further comprises:
receiving a classifier sent by a classifier generating device, wherein the classifier is obtained by the classifier generating device by taking a mode sample set as training data and training according to a classification algorithm, and is used for determining whether a terminal is in a sleep mode, the mode sample set comprises n sleep mode samples collected by the sample terminal when the sample terminal is in the sleep mode and m non-sleep mode samples collected by the sample terminal when the sample terminal is in the non-sleep mode, n and m are integers greater than 0, the sleep mode samples comprise p feature parameters and a label used for indicating the category of any sleep mode sample, the non-sleep mode samples comprise p feature parameters and a label used for indicating the category of any non-sleep mode sample, and the p feature parameters comprise: at least three of parameters obtained by an acceleration sensor, system time of the sample mobile terminal, parameters obtained by a light sensor, a program operated by the sample terminal and a screen display interface of the sample terminal;
obtaining a mode sample of the terminal at the current moment;
inputting the pattern sample into the classifier to output a pattern label through the classifier, the pattern label indicating a category of the pattern sample;
when the class of the mode sample indicated by the mode label is in a sleep mode, determining that the terminal is in the sleep mode.
9. The apparatus of claim 8,
the first detection module is configured to detect whether the terminal meets the preset network function starting condition every a first preset time period from the time when the terminal enters the sleep mode;
the second detection module is configured to detect whether the terminal meets the preset network function closing condition every second preset time period from the moment of starting the network function of the terminal, wherein the second preset time period is shorter than the first preset time period.
10. The apparatus according to claim 8 or 9,
the preset network function starting conditions comprise: at least one of reaching a first preset moment and enabling a screen of the terminal to enter an awakening state;
the preset network function closing condition comprises the following steps: and at least one of reaching a second preset time and enabling the screen of the terminal to enter a blanking state, wherein the first preset time is different from the second preset time.
11. The apparatus of claim 10,
the first preset time is determined by determining whether the network function starting period of the interval is reached;
the second preset time is determined by determining whether the network function closing period reaches an interval, or the second preset time is determined by determining whether the network function opening time reaches a preset time.
12. The apparatus of any one of claims 8 to 9, further comprising:
the judging module is configured to judge whether the terminal meets a preset sleep mode starting condition;
and the second starting module is configured to start the sleep mode of the terminal when the terminal meets the preset sleep mode starting condition, wherein when the terminal starts the sleep mode, the network function of the terminal is closed.
13. The apparatus of claim 11, wherein the preset sleep mode enabling conditions comprise: and at least one of reaching a preset sleep time period and receiving a sleep mode starting instruction triggered by a user.
14. The apparatus of any one of claims 8 to 11, wherein the first opening module comprises:
the detection submodule is configured to detect whether a wireless local area network exists in the environment where the terminal is located;
the first starting submodule is configured to start a wireless local area network function of the terminal when the wireless local area network exists in the environment where the terminal is located;
and the second starting sub-module is configured to start the data network function of the terminal when the wireless local area network does not exist in the environment where the terminal is located.
15. A network message receiving apparatus, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
when a terminal is in a sleep mode, detecting whether the terminal meets a preset network function starting condition;
when the terminal meets the preset network function starting condition, starting the network function of the terminal;
receiving a network message through application software corresponding to the name of the application software in a white list under the sleep mode through the started network function;
the processor is further configured to:
after the network function of the terminal is started, detecting whether the terminal meets a preset network function closing condition;
when the terminal meets the preset network function closing condition, closing the opened network function;
when the network function that is started is the data network function of the terminal, the preset network function closing condition includes: the data flow used by the terminal reaches a preset flow threshold;
the device further comprises:
receiving a classifier sent by a classifier generating device, wherein the classifier is obtained by the classifier generating device by taking a mode sample set as training data and training according to a classification algorithm, and is used for determining whether a terminal is in a sleep mode, the mode sample set comprises n sleep mode samples collected by the sample terminal when the sample terminal is in the sleep mode and m non-sleep mode samples collected by the sample terminal when the sample terminal is in the non-sleep mode, n and m are integers greater than 0, the sleep mode samples comprise p feature parameters and a label used for indicating the category of any sleep mode sample, the non-sleep mode samples comprise p feature parameters and a label used for indicating the category of any non-sleep mode sample, and the p feature parameters comprise: at least three of parameters obtained by an acceleration sensor, system time of the sample mobile terminal, parameters obtained by a light sensor, a program operated by the sample terminal and a screen display interface of the sample terminal;
obtaining a mode sample of the terminal at the current moment;
inputting the pattern sample into the classifier to output a pattern label through the classifier, the pattern label indicating a category of the pattern sample;
when the class of the mode sample indicated by the mode label is in a sleep mode, determining that the terminal is in the sleep mode.
16. A computer-readable storage medium having stored therein instructions which, when run on a processing component of a computer, cause the processing component to perform the network message receiving method of any of claims 1 to 7.
CN201711162909.7A 2017-11-21 2017-11-21 Network message receiving method and device and storage medium Active CN107979695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711162909.7A CN107979695B (en) 2017-11-21 2017-11-21 Network message receiving method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711162909.7A CN107979695B (en) 2017-11-21 2017-11-21 Network message receiving method and device and storage medium

Publications (2)

Publication Number Publication Date
CN107979695A CN107979695A (en) 2018-05-01
CN107979695B true CN107979695B (en) 2021-06-29

Family

ID=62010670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711162909.7A Active CN107979695B (en) 2017-11-21 2017-11-21 Network message receiving method and device and storage medium

Country Status (1)

Country Link
CN (1) CN107979695B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110579291A (en) * 2019-09-11 2019-12-17 武汉里得电力科技股份有限公司 Temperature measurement intelligence ring

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546951A (en) * 2013-10-31 2014-01-29 惠州Tcl移动通信有限公司 Mobile device and sleeping managing method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030022704A1 (en) * 2001-07-26 2003-01-30 Inventec Appliances Corp. Method for saving power of cellular phone
CN104125077B (en) * 2014-07-28 2018-02-23 深圳市双赢伟业科技股份有限公司 The communication means and device of a kind of network-termination device
CN106060909B (en) * 2016-05-26 2019-07-16 珠海市魅族科技有限公司 A kind of method for connecting network and mobile terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546951A (en) * 2013-10-31 2014-01-29 惠州Tcl移动通信有限公司 Mobile device and sleeping managing method thereof

Also Published As

Publication number Publication date
CN107979695A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
EP3188066B1 (en) A method and an apparatus for managing an application
EP3136793B1 (en) Method and apparatus for awakening electronic device
EP3306441A1 (en) Temperature control method and apparatus
CN106766022B (en) Sensor control method and device
CN107872576B (en) Alarm clock reminding method and device and computer readable storage medium
CN107608561B (en) Touch screen control method and device
US20170055221A1 (en) Method and apparatus for starting energy saving mode
CN108200279B (en) Backlight adjusting method, device and equipment
CN112037787A (en) Wake-up control method, device and computer readable storage medium
US11194297B2 (en) Method and apparatus for controlling alarm clock
CN106843706B (en) Shutdown control method and device and terminal equipment
EP3232323A1 (en) Method and apparatus for displaying status information of application
CN110262692B (en) Touch screen scanning method, device and medium
CN107480785B (en) Convolutional neural network training method and device
CN107885307B (en) Equipment control method and device
CN109522058B (en) Wake-up method, device, terminal and storage medium
CN109862169B (en) Electronic equipment control method, device and storage medium
CN111601377B (en) Temperature control method, device and storage medium
CN105786561B (en) Method and device for calling process
CN107979695B (en) Network message receiving method and device and storage medium
CN112509596A (en) Wake-up control method and device, storage medium and terminal
CN111966412A (en) Method, device and storage medium for waking up terminal
CN107809538B (en) Alarm clock reminding method and device and computer readable storage medium
CN107677363B (en) Noise prompting method and intelligent terminal
CN112748817A (en) Information control method and device, terminal and storage medium

Legal Events

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