WO2015188761A1 - Traffic acquiring method and apparatus based on operating system - Google Patents

Traffic acquiring method and apparatus based on operating system Download PDF

Info

Publication number
WO2015188761A1
WO2015188761A1 PCT/CN2015/081223 CN2015081223W WO2015188761A1 WO 2015188761 A1 WO2015188761 A1 WO 2015188761A1 CN 2015081223 W CN2015081223 W CN 2015081223W WO 2015188761 A1 WO2015188761 A1 WO 2015188761A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
terminal
network traffic
active state
push message
Prior art date
Application number
PCT/CN2015/081223
Other languages
French (fr)
Inventor
Haifeng Ding
Zebin CHEN
Original Assignee
Tencent Technology (Shenzhen) Company Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2015188761A1 publication Critical patent/WO2015188761A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/50Service provisioning or reconfiguring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests

Definitions

  • the present disclosure relates to the field of Internet technologies, and in particular, to a traffic acquiring method and apparatus based on an operating system.
  • hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main user interface (UI) of the terminal device, so as not to hinder normal use of a user for the device.
  • a client application namely, a client application
  • the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main user interface (UI) of the terminal device, so as not to hinder normal use of a user for the device.
  • UI main user interface
  • the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
  • the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time.
  • the client in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone.
  • the client for a client whose authority is limited and that needs to be running in the background of an operating system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal. For such a problem, currently, no effective solution has yet been provided.
  • Embodiments of the present invention provide a traffic acquiring method and apparatus based on an operating system, to at least solve the technical problem that a client whose authority is limited and that needs to be running in the background of an operating system for a long time cannot acquire network traffic of a terminal.
  • a traffic acquiring method based on an operating system including: receiving a push message sent by a server corresponding to a client running on a terminal installed with an Operating system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the Operating system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state; switching the client from the inactive state to the active state in response to the push message; and acquiring the network traffic by using the client when the client is in the active state.
  • a traffic acquiring apparatus based on an operating system
  • the embodiments of the present invention provide a traffic acquiring method in which a push message is used to "awaken" a client running in the background of an operating system, and then network traffic of a terminal is counted in time by using the awakened client.
  • the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client.
  • the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the technical problem that a client whose authority is limited and that needs to be running in the background of an operating system for a long time cannot acquire network traffic of a terminal.
  • a standard network traffic acquiring manner such as accessing a network adapter
  • FIG. 1 illustrates a schematic diagram of an optional traffic acquiring method based on an operating system according to an embodiment of the present invention
  • FIG. 2 illustrates a schematic diagram of an optional message sending method based on an operating system according to an embodiment of the present invention
  • FIG. 3 illustrates a schematic diagram of an optional traffic acquiring apparatus based on an operating system according to an embodiment of the present invention.
  • FIG. 4 illustrates a schematic diagram of an optional message sending apparatus based on an operating system according to an embodiment of the present invention.
  • the method as disclosed as following may be implemented by any appropriate computing device having one or more processors and memory.
  • the computing device used herein, may refer to a terminal device with certain computing capabilities (e.g., of controlling media data to be placed at a constant speed) , such as a personal computer (PC) , a work station computer, a hand-inactive computing device (tablet) , a mobile terminal (amobile phone or a smart phone) , a sever, a network server, a smart terminal, or any other user-side or server-side computing device.
  • PC personal computer
  • work station computer a hand-inactive computing device
  • mobile terminal amobile phone or a smart phone
  • a sever a network server
  • smart terminal or any other user-side or server-side computing device.
  • the memory includes storage medium, which may further include memory modules, e.g., a read-only memory (ROM) , a random access memory (RAM) , and flash memory modules, and mass storages, e.g., a CD-ROM, a U-disk, a removable hard disk, etc., which are all non-transitory storage mediums.
  • the storage medium may be a non-transitory computer readable storage medium that stores program modules for implementing various processes, when executed by the processors.
  • a traffic acquiring method based on an Operating system is provided.
  • the operating system may be an IOS system, Unix, Linux, Android, or any other types of operating system.
  • the present disclosure gives an example of the IOS system hereinafter. As shown in FIG. 1, the method includes:
  • S102 Receive a push message sent by a server corresponding to a client running on a terminal installed with an IOS system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the IOS system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • S104 Switch the client from an inactive state to an active state in response to the push message.
  • S106 Acquire network traffic by using the client when the client is in the active state.
  • one of the problems to be solved in this embodiment of the present invention is to provide a method, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
  • hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device.
  • the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
  • the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems.
  • the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background.
  • preset duration after the application is switched to the background for example, after 10 seconds, the application is generally switched from an active state to an inactive state.
  • the client application cannot automatically perform a calculation operation, until the user returns to the application.
  • the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time.
  • the client in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone.
  • the client cannot acquire network traffic of a terminal.
  • this embodiment of the present invention provides a traffic acquiring method in which a push message is used to "awaken" a client running in the background of an IOS system, and then network traffic of a terminal is counted in time by using the awakened client.
  • the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client.
  • the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
  • a standard network traffic acquiring manner such as accessing a network adapter
  • a push message sent by a server may be received, where the push message may be used to instruct to switch a client from an inactive state to an active state, where the client is set as running in the background of an IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of a terminal in the inactive state, and allowing acquiring network traffic of a terminal in the active state.
  • a terminal or a client may receive a push message sent by a server.
  • the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application.
  • applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
  • the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state.
  • a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server.
  • the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation.
  • the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
  • the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal.
  • the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
  • inactive/active states of the client do not equivalent to the foreground/background running.
  • the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application.
  • a system generally endows the client with an authority of running and maintaining an active state in the background.
  • the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, by using step S106, network traffic may be acquired by using the client when the client is in the active state.
  • the function of switching the client from the inactive state to the active state in response to the push message described in step S104 generally may be provided by the terminal and its system, so that interaction is performed between the client and the server.
  • a more complex identification logic may also be combined in step S104 to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages.
  • the foregoing step S104 may include:
  • S2 Determine whether the push message meets a first preset condition.
  • S4 Switch the client from an inactive state to an active state if the push message meets the first preset condition.
  • step S106 in this embodiment of the present invention, multiple feasible manners known by a person skilled in the art currently or in the future may be used for implementation.
  • the foregoing step S106 may include:
  • S6 Read network adapter information of the terminal by using the client when it is determined that the client is switched from the inactive state to the active state, where the network adapter information includes data inflow and data outflow.
  • an interface and a function provided by the terminal and its system may be used to acquire network traffic, and subsequent processing may further be performed in combination with a read parameter, for example, one or more related parameters may be selected to acquire more detailed use situations of the network traffic, which is not limited in the present disclosure.
  • a network adapter may also not be directly accessed, but another function such as a traffic monitoring interface provided by a system is called to complete traffic counting, which is not limited in the present disclosure.
  • the present disclosure may further be implemented in combination with another feasible means known by a person skilled in the art.
  • implementation manners shall be considered to be within the protection scope of the present disclosure.
  • richer prompt functions may further be implemented in combination with further processing of acquired network traffic data.
  • the foregoing method may further include:
  • S10 Determine whether the acquired network traffic meets a second preset condition.
  • S12 Prompt network traffic used in a preset time to the terminal by using the client if the acquired network traffic meets the second preset condition.
  • a use situation of network traffic of a terminal may be monthly counted, that is, the preset time is set as a period between the beginning of this month and a current moment.
  • network traffic may be cleared at the beginning of this month, and network traffic acquired at the current moment is regarded as network traffic used in this period, or a difference between network traffic acquired at the current moment and network traffic acquired at the beginning of this month may be regarded as network traffic used in this period.
  • the present disclosure does not limit the specific processing logic of step S12. In addition, the present disclosure also does not limit the specific prompt manner described in step S12.
  • a client may perform prompting by using a number or warning symbol in a pop-up window or a floating window, or may perform prompting by using specified ringtone or voice, which is not limited in the present disclosure.
  • the prompt generally should be subject to be capable of being identified by a user, and another subsequent processing module or system.
  • a message sending method based on an IOS system that is corresponding to the traffic acquiring method in Embodiment 1 is further provided. As shown in FIG. 2, the method includes:
  • S202 Set a push message that may be identified by a terminal installed with an IOS system, the push message being used to instruct a client running in the background of the IOS system to be switched from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • S204 Send the push message to the client in a preset time period.
  • one of the problems to be solved in this embodiment of the present invention is to provide a method, so that network traffic of a terminal or a terminal device is acquired by using the client in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic by using the client, to avoid generating excessive consumption on network traffic when the user is unaware.
  • hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device.
  • the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
  • the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems.
  • the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background.
  • preset duration after the application is switched to the background for example, after 10 seconds, the application is generally switched from an active state to an inactive state.
  • the client application cannot automatically perform a calculation operation, until the user returns to the application.
  • the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time.
  • the client in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone.
  • the client cannot acquire network traffic of a terminal.
  • this embodiment of the present invention provides a message push method in which a push message is used to "awaken" a client running in the background of an IOS system, and then network traffic of a terminal is counted in time by using the awakened client.
  • a manner in which a server sends a predetermined push message to a client is used, and by using a response mechanism of a terminal for a push message, after receiving the push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client.
  • the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
  • a standard network traffic acquiring manner such as accessing a network adapter
  • a server may set a push message that may be identified by a terminal by using step S202, and further sends the set push message to a client in a preset time period by using step S204.
  • the push message may be used to instruct to switch a client running in the background of an IOS system from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • the terminal or the client may receive the push message sent by the server, where the push message may be used to instruct to switch the client from the inactive state to the active state, where the client is set as running in the background of the IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • a terminal or a client may receive a push message sent by a server.
  • the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application.
  • applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
  • the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state.
  • a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server.
  • the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation.
  • the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
  • the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal.
  • the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
  • inactive/active states of the client do not equivalent to the foreground/background running.
  • the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application.
  • a system generally endows the client with an authority of running and maintaining an active state in the background.
  • the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, network traffic may be acquired by using the client when the client is in the active state.
  • the foregoing function of switching the client from the inactive state to the active state in response to the push message generally may be provided by the terminal and its system, so that interaction is performed between the client and the server.
  • a more complex identification logic may also be combined to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages.
  • the foregoing step S202 may include:
  • S14 Generate the push message according to a rule pre-agreed with the client, where the generated push message meets a first preset condition.
  • the operation that is executed by the terminal and of switching the client from an inactive state to an active state may include:
  • a push mechanism may be used to "awaken" a client running in the background of the IOS system, and therefore, network traffic of a terminal may be acquired by using the client in the active state, thereby achieving an effect of acquiring network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of the user for the terminal, thereby solving the problem that a client whose authority is limited and that needs to be running in the background of the IOS system for a long time cannot acquire the network traffic of the terminal.
  • a server may further send a push message in combination with a more complex sending logic.
  • the foregoing step S204 may include:
  • S20 Send push messages to multiple clients sat multiple moments in a preset time period respectively, where the multiple moments and multiple clients are in a one-to-one correspondence.
  • the server may select to send the push messages to different clients at different moments.
  • Using a manner of sending at different time can avoid the problems of excessively large instantaneous processing pressure of the server and excessively high I/O occupation caused because the server sends push information intensively at one moment to multiple clients connected to the server.
  • the preset time period may be set as repeated according to a preset cycle. More specifically, the preset cycle is set as one of the following: one day, one week, and one month. In the foregoing scenario, in an example that a preset cycle is set as one day, one or more time periods for sending push messages may be set for a server in each day.
  • the time period may be set as at time periods in which a user uses a network frequently, that is, a requirement for updating a count value of network traffic is obvious, such as 10: 00 to 12: 00 at noon, 16: 00 to 18: 00 in the afternoon, or 20: 00 to 22: 00 in the evening, and these time periods are repeated daily, that is, push messages may be sent to a terminal in these fixed time periods in each day, so that time periods can be selected to avoid sending push messages to the terminal excessively frequently, to improve the processing efficiency of the server and the terminal.
  • the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware; but the former is a better implementation manner in many situations.
  • the technical solutions of the present disclosure essentially or a part contributing to the existing technology may be expressed in a form of a software product, and the computer software product is stored in one storage medium (such as a ROM/RAM, a magnetic disk or an optical disc) , including several instruction for making a terminal device (which may be a mobile phone, a computer, a server, a network device, or the like) execute the methods of the embodiments of the present invention.
  • a traffic acquiring apparatus based on an IOS system that is configured to implement the traffic acquiring apparatus in Embodiment 1 is further provided. As shown in FIG. 3, the apparatus includes:
  • a receiving unit 302 configured to receive a push message sent by a server corresponding to a client running on a terminal installed with an IOS system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the IOS system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
  • a switch unit 304 configured to switch the client from an inactive state to an active state in response to the push message
  • an acquiring unit 306 configured to acquire network traffic by using the client when the client is in the active state.
  • one of the problems to be solved in this embodiment of the present invention is to provide an apparatus, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
  • hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device.
  • the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
  • the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems.
  • the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background.
  • preset duration after the application is switched to the background for example, after 10 seconds, the application is generally switched from an active state to an inactive state.
  • the client application cannot automatically perform a calculation operation, until the user returns to the application.
  • the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time.
  • the client in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone.
  • the client cannot acquire network traffic of a terminal.
  • this embodiment of the present invention provides a traffic acquiring apparatus that uses a push message to "awaken" a client running in the background of an IOS system, and then counts network traffic of a terminal in time by using the awakened client.
  • the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client.
  • the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
  • a standard network traffic acquiring manner such as accessing a network adapter
  • the receiving unit 302 may be used to receive a push message sent by a server, where the push message may be used to instruct to switch a client from an inactive state to an active state, where the client is set as running in the background of an IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of a terminal in the inactive state, and allowing acquiring network traffic of a terminal in the active state.
  • a terminal or a client may receive a push message sent by a server.
  • the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application.
  • applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
  • the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state.
  • a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server.
  • the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation.
  • the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
  • the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal.
  • the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
  • inactive/active states of the client do not equivalent to the foreground/background running.
  • the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application.
  • a system generally endows the client with an authority of running and maintaining an active state in the background.
  • the traffic acquiring apparatus disposed in the terminal may further switch the client from the inactive state to the active state in response to the push message by using the switch unit 304, and therefore, network traffic may be acquired by using the acquiring unit 306 by using the client when the client is in the active state.
  • the function of switching the client from the inactive state to the active state in response to the push message described in the switch unit 304 generally may be provided by the terminal and its system, so that interaction is performed between the client and the server.
  • a more complex identification logic may also be combined in the switch unit 304, to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages.
  • the switch unit 304 may include:
  • a first determining module configured to determine whether the push message meets a first preset condition
  • a switch module configured to switch the client from the inactive state to the active state when it is determined that the push message meets the first preset condition.
  • the acquiring unit 306 in this embodiment of the present invention, multiple feasible manners known by a person skilled in the art currently or in the future may be used for implementation.
  • the acquiring unit 306 may include:
  • a read module configured to read network adapter information of the terminal by using the client when it is determined that the client is switched from the inactive state to the active state, where the network adapter information includes data inflow and data outflow;
  • a processing module configured to use a total sum of the data inflow and the data outflow as the network traffic.
  • an interface and a function provided by the terminal and its system may be used to acquire network traffic, and subsequent processing may further be performed in combination with a read parameter, for example, one or more related parameters may be selected to acquire more detailed use situations of the network traffic, which is not limited in the present disclosure.
  • a network adapter may also not be directly accessed, but another function such as a traffic monitoring interface provided by a system is called to complete traffic counting, which is not limited in the present disclosure.
  • the present disclosure may further be implemented in combination with another feasible means known by a person skilled in the art.
  • implementation manners shall be considered to be in the protection scope of the present disclosure.
  • richer prompt functions may further be implemented in combination with further processing of acquired network traffic data.
  • the apparatus may further include:
  • a determining unit configured to determine whether the acquired network traffic meets a second preset condition
  • a prompt unit configured to prompt network traffic used in the preset time to the terminal by using the client when the acquired network traffic meets the second preset condition.
  • a use situation of network traffic of a terminal may be monthly counted, that is, the preset time is set as a period between the beginning of this month and a current moment.
  • network traffic may be cleared at the beginning of this month, and network traffic acquired at the current moment is regarded as network traffic used in this period, or a difference between network traffic acquired at the current moment and network traffic acquired at the beginning of this month may be regarded as network traffic used in this period.
  • the present disclosure does not limit the specific processing logic of the prompt unit. In addition, the present disclosure also does not limit the specific prompt manner described in the prompt unit.
  • a client may perform prompting by using a number or warning symbol in a pop-up window or a floating window, or may perform prompting by using specified ringtone or voice, which is not limited in the present disclosure.
  • the prompt generally should be subject to be capable of being identified by a user, and another subsequent processing module or system.
  • a message sending apparatus based on an IOS system for implementing the message sending method described in Embodiment 2 is further provided. As shown in FIG. 4, the apparatus includes:
  • a setting unit 402 configured to set a push message that may be identified by a terminal installed with an IOS system, the push message being used to instruct a client running in the background of the IOS system to be switched from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
  • a sending unit 404 configured to send the push message to the client in the preset time period.
  • one of the problems to be solved in this embodiment of the present invention is to provide an apparatus, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
  • hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device.
  • the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
  • the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems.
  • the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background.
  • preset duration after the application is switched to the background for example, after 10 seconds, the application is generally switched from an active state to an inactive state.
  • the client application cannot automatically perform a calculation operation, until the user returns to the application.
  • the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time.
  • the client in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone.
  • the client cannot acquire network traffic of a terminal.
  • this embodiment of the present invention provides a message push apparatus that uses a push message to "awaken" a client running in the background of an IOS system, and then counts network traffic of a terminal in time by using the awakened client.
  • a manner in which a server sends a predetermined push message to a client is used, and by using a response mechanism of a terminal for a push message, after receiving the push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client.
  • the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
  • a standard network traffic acquiring manner such as accessing a network adapter
  • the apparatus disposed in a server may set, by using a setting unit 402, a push message that may be identified by a terminal, and further sends the set push message to a client in a preset time period by using a sending unit 404.
  • the push message may be used to instruct to switch a client running in the background of an IOS system from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • the terminal or the client may receive the push message sent by the server, where the push message may be used to instruct to switch the client from the inactive state to the active state, where the client is set as running in the background of the IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
  • a terminal or a client may receive a push message sent by a server.
  • the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application.
  • applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
  • the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state.
  • a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server.
  • the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation.
  • the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
  • the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal.
  • the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
  • inactive/active states of the client do not equivalent to the foreground/background running.
  • the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application.
  • a system generally endows the client with an authority of running and maintaining an active state in the background.
  • the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, network traffic may be acquired by using the client when the client is in the active state.
  • the foregoing function of switching the client from the inactive state to the active state in response to the push message generally may be provided by the terminal and its system, so that interaction is performed between the client and the server.
  • a more complex identification logic may also be combined to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages.
  • the foregoing setting unit 402 may include:
  • a generating module configured to generate the push message according to a rule pre-agreed with the client, where the generated push message meets a first preset condition.
  • the terminal may include:
  • a first determining module configured to determine whether the push message meets the first preset condition
  • a switch module configured to switch the client from the inactive state to the active state when it is determined that the push message meets the first preset condition.
  • a push mechanism may be used to "awaken" a client running in the background of the IOS system, and therefore, network traffic of a terminal may be acquired by using the client in the active state, thereby achieving an effect of acquiring network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of the user for the terminal, thereby solving the problem that a client whose authority is limited and that needs to be running in the background of the IOS system for a long time cannot acquire the network traffic of the terminal.
  • a server may further send a push message in combination with a more complex sending logic.
  • the foregoing sending unit 404 may include:
  • a sending module configured to send push messages to multiple clients sat multiple moments in a preset time period respectively, where the multiple moments and multiple clients are in a one-to-one correspondence.
  • the server may select to send the push messages to different clients at different moments.
  • Using a manner of sending at different time can avoid the problems of excessively large instantaneous processing pressure of the server and excessively high I/O occupation caused because the server sends push information intensively at one moment to multiple clients connected to the server.
  • the preset time period may be set as repeated according to a preset cycle. More specifically, the preset cycle is set as one of the following: one day, one week, and one month. In the foregoing scenario, in an example that a preset cycle is set as one day, one or more time periods for sending push messages may be set for a server in each day.
  • the time period may be set as at time periods in which a user uses a network frequently, that is, a requirement for updating a count value of network traffic is obvious, such as 10: 00 to 12: 00 at noon, 16: 00 to 18: 00 in the afternoon, or 20: 00 to 22: 00 in the evening, and these time periods are repeated daily, that is, push messages may be sent to a terminal in these fixed time periods in each day, so that time periods can be selected to avoid sending push messages to the terminal excessively frequently, to improve the processing efficiency of the server and the terminal.
  • the disclosed client may be implemented in another manner.
  • the apparatus embodiments described above are merely exemplary.
  • the division of units is merely a division of logic functions, and may be other division manners during actual implementation.
  • multiple units or components may be combined or may be integrated into another system, or some features may be ignored, or not executed.
  • the displayed or discussed coupling or direct coupling or communication connection may be indirect coupling or communication connection by using some interfaces, units or modules, and may be in electrical or another form.
  • the units described as separate parts may be or may not be separated physically, and parts displayed as units may be or may not be physical units, that is, may be located at a position, or may be distributed to multiple network units. A part or all units thereof may be selected according to actual needs to implement the objective of the solution of the embodiments.
  • the functional units in embodiments of the present invention may be integrated into a processing unit, or the units may physically exist alone, or two or more than two of the foregoing units may be integrated into a unit.
  • the foregoing integrated unit may be implemented in a hardware form, or may be implemented in a software function unit form.
  • the integrated unit may be stored in a computer readable storage medium.
  • the technical solutions of the present disclosure essentially or a part contributing to the existing technology or all or a part contributing to the technical solutions may be expressed in a form of a software product, and the computer software product is stored in one storage medium, including several instructions for making a computer device (which may be a personal computer, a server, a network device, or the like) execute all or a part of steps of the methods of the embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program code, such as a USB flash drive, a Read-Only Memory (ROM) , a Random Access Memory (RAM) , a removable hard disk, a magnetic disk or an optical disc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephone Function (AREA)

Abstract

A traffic acquiring method and apparatus based on an operating system are described. A push message sent by a server corresponding to a client running on a terminal installed with an operating system is received, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the operating system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state; the client is switched from the inactive state to the active state in response to the push message; and the network traffic is acquired by using the client when the client is in the active state.

Description

TRAFFIC ACQUIRING METHOD AND APPARATUS BASED ON AN OPERATING SYSTEM
FIELD OF THE TECHNOLOGY
The present disclosure relates to the field of Internet technologies, and in particular, to a traffic acquiring method and apparatus based on an operating system.
BACKGROUND OF THE DISCLOSURE
In some solutions known by the inventor, hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main user interface (UI) of the terminal device, so as not to hinder normal use of a user for the device. For example, for a mobile application running in a smart phone installed with an Android system, the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
However, if the foregoing solution is applied to a smart phone installed with an operating system such as an IOS system, there exist some problems. Generally, because the operating system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background. In preset duration after the application is switched to the background, for example, after 10 seconds, the application is generally switched from an active state to an inactive state. However, in the inactive state, the client application cannot automatically perform a calculation operation, until the user returns to the application. In the foregoing scenario, to avoid interference on normal use of the user for the smart phone installed with the operating system, the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time. However, in preset duration after the application is  switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone. In other words, for a client whose authority is limited and that needs to be running in the background of an operating system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal. For such a problem, currently, no effective solution has yet been provided.
SUMMARY
Embodiments of the present invention provide a traffic acquiring method and apparatus based on an operating system, to at least solve the technical problem that a client whose authority is limited and that needs to be running in the background of an operating system for a long time cannot acquire network traffic of a terminal.
According to an aspect of the embodiments of the present invention, a traffic acquiring method based on an operating system is provided, including: receiving a push message sent by a server corresponding to a client running on a terminal installed with an Operating system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the Operating system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state; switching the client from the inactive state to the active state in response to the push message; and acquiring the network traffic by using the client when the client is in the active state.
According to another aspect of the embodiments of the present invention, a traffic acquiring apparatus based on an operating system is further provided, including: a receiving unit, configured to receive a push message sent by a server corresponding to a client running on a terminal installed with an operating system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the operating system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state; a switch unit, configured to switch the client from the inactive state to the active state in response to the push message; and an acquiring unit, configured to acquire the network traffic by using the client when the client is in the active state.
The embodiments of the present invention provide a traffic acquiring method in which a push message is used to "awaken" a client running in the background of an operating  system, and then network traffic of a terminal is counted in time by using the awakened client. Specifically, in the embodiments of the present invention, by using a response mechanism of a terminal for a push message, after receiving a pre-agreed push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client. Because the client in the active state has an authority of accessing hardware in the terminal, the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the technical problem that a client whose authority is limited and that needs to be running in the background of an operating system for a long time cannot acquire network traffic of a terminal.
BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings described herein are used to provide a further understanding to the present disclosure, and constitute a part of the present application. The exemplary embodiments of the present disclosure and descriptions thereof are used to explain the present disclosure, but do not constitute an inappropriate constitution of the present disclosure. In the accompanying drawings:
FIG. 1 illustrates a schematic diagram of an optional traffic acquiring method based on an operating system according to an embodiment of the present invention;
FIG. 2 illustrates a schematic diagram of an optional message sending method based on an operating system according to an embodiment of the present invention;
FIG. 3 illustrates a schematic diagram of an optional traffic acquiring apparatus based on an operating system according to an embodiment of the present invention; and
FIG. 4 illustrates a schematic diagram of an optional message sending apparatus based on an operating system according to an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
To make a person skilled in the art better understand the solutions of the present disclosure, the following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by  persons of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present disclosure.
It should be noted that, the terms such as "first" and "second" in the specification and the claims of the present disclosure, and the foregoing accompanying drawings are used to distinguish similar objects, but are not necessarily used to describe a particular sequence or order. It should be understood that, data used in this way may interchange in appropriate situations, so that the embodiments of the present invention described herein can be implemented in a sequence apart from the sequence of the accompanying drawings or descriptions herein. In addition, the terms "include" , "comprise" and any variants thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to clearly listed steps or units, but may include steps or units not clearly listed or other inherent steps or units of the process, method, product or device.
The method as disclosed as following may be implemented by any appropriate computing device having one or more processors and memory. The computing device, used herein, may refer to a terminal device with certain computing capabilities (e.g., of controlling media data to be placed at a constant speed) , such as a personal computer (PC) , a work station computer, a hand-inactive computing device (tablet) , a mobile terminal (amobile phone or a smart phone) , a sever, a network server, a smart terminal, or any other user-side or server-side computing device. The memory includes storage medium, which may further include memory modules, e.g., a read-only memory (ROM) , a random access memory (RAM) , and flash memory modules, and mass storages, e.g., a CD-ROM, a U-disk, a removable hard disk, etc., which are all non-transitory storage mediums. The storage medium may be a non-transitory computer readable storage medium that stores program modules for implementing various processes, when executed by the processors.
Embodiment 1
According to this embodiment of the present invention, a traffic acquiring method based on an Operating system is provided. In the embodiment, the operating system may be an IOS system, Unix, Linux, Android, or any other types of operating system. The present disclosure gives an example of the IOS system hereinafter. As shown in FIG. 1, the method includes:
S102: Receive a push message sent by a server corresponding to a client running on a terminal installed with an IOS system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the IOS system in both the inactive state and the active state, and the client being set as forbidding acquiring  network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
S104: Switch the client from an inactive state to an active state in response to the push message.
S106: Acquire network traffic by using the client when the client is in the active state.
It should be noted that, one of the problems to be solved in this embodiment of the present invention is to provide a method, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
To solve such a problem, in some solutions known by the inventor, hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device. For example, for a mobile application running in a smart phone installed with an Android system, the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
However, if the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems. Generally, because the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background. In preset duration after the application is switched to the background, for example, after 10 seconds, the application is generally switched from an active state to an inactive state. However, in the inactive state, the client application cannot automatically perform a calculation operation, until the  user returns to the application. In the foregoing scenario, to avoid interference on normal use of the user for the smart phone installed with the IOS system, the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time. However, in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone. In other words, for a client whose authority is limited and that needs to be running in the background of an IOS system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal.
To solve the foregoing problem, this embodiment of the present invention provides a traffic acquiring method in which a push message is used to "awaken" a client running in the background of an IOS system, and then network traffic of a terminal is counted in time by using the awakened client. Specifically, in this embodiment of the present invention, by using a response mechanism of a terminal for a push message, after receiving a pre-agreed push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client. Because the client in the active state has an authority of accessing hardware in the terminal, the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
The technical solutions of the present disclosure and the working principles thereof are described in detail below with reference to the accompanying drawings and specific embodiments.
As shown in FIG. 1, according to a traffic acquiring method provided in this embodiment of the present invention, in step S102, a push message sent by a server may be received, where the push message may be used to instruct to switch a client from an inactive state to an active state, where the client is set as running in the background of an IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of a terminal in the inactive state, and allowing acquiring network traffic of a terminal in the active state.
In this embodiment of the present invention, a terminal or a client may receive a push message sent by a server. Specifically, the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to  receiving of the push message generally are developed for a developer of a client application. For example, applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
Further, the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state. Specifically, such a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server. More specifically, in this embodiment of the present invention, the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation. For example, the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
In another aspect, in this embodiment of the present invention, for a client generally adapted to a system installed on a terminal, the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal. In addition, in this embodiment of the present invention, the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
It should be noted that herein, in this embodiment of the present invention, inactive/active states of the client do not equivalent to the foreground/background running. For example, for a client application for playing music, the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application. Certainly, for the client for playing music, a system generally endows the client with an authority of running and maintaining an active state in the background. However, for a general client application, some systems such as IOS do not allow a background application to maintain in the active state for a long time, instead, mandatorily switch the application to the inactive state. Just on this premise, the inventor provides a solution of using a push mechanism to "awaken" a client for  counting network traffic to the active state, which overcomes the problem that the client cannot count network traffic because a client whose authority is limited cannot maintain in the active state in the background.
On this basis, as shown in FIG. 1, according to the traffic acquiring method provided in this embodiment of the present invention, in step S104, the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, by using step S106, network traffic may be acquired by using the client when the client is in the active state.
As described above, in this embodiment of the present invention, the function of switching the client from the inactive state to the active state in response to the push message described in step S104 generally may be provided by the terminal and its system, so that interaction is performed between the client and the server. Certainly, in some embodiments of the present invention, a more complex identification logic may also be combined in step S104 to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages. In total, as an optional manner, in this embodiment of the present invention, the foregoing step S104 may include:
S2: Determine whether the push message meets a first preset condition.
S4: Switch the client from an inactive state to an active state if the push message meets the first preset condition.
For step S106, in this embodiment of the present invention, multiple feasible manners known by a person skilled in the art currently or in the future may be used for implementation. For example, as an optional manner, in this embodiment of the present invention, the foregoing step S106 may include:
S6: Read network adapter information of the terminal by using the client when it is determined that the client is switched from the inactive state to the active state, where the network adapter information includes data inflow and data outflow.
S8: Use a total sum of the data inflow and the data outflow as the network traffic.
That is, in this embodiment of the present invention, an interface and a function provided by the terminal and its system may be used to acquire network traffic, and subsequent processing may further be performed in combination with a read parameter, for example, one or  more related parameters may be selected to acquire more detailed use situations of the network traffic, which is not limited in the present disclosure.
Certainly, the foregoing embodiment is merely an example, but is not an exclusive implementation manner of the present disclosure. For example, in some embodiments of the present invention, a network adapter may also not be directly accessed, but another function such as a traffic monitoring interface provided by a system is called to complete traffic counting, which is not limited in the present disclosure. Similarly, the present disclosure may further be implemented in combination with another feasible means known by a person skilled in the art. However, it should be understood that, such implementation manners shall be considered to be within the protection scope of the present disclosure.
On the basis of the foregoing descriptions, richer prompt functions may further be implemented in combination with further processing of acquired network traffic data. For example, as an optional manner, in this embodiment of the present invention, after step S106, the foregoing method may further include:
S10: Determine whether the acquired network traffic meets a second preset condition.
S12: Prompt network traffic used in a preset time to the terminal by using the client if the acquired network traffic meets the second preset condition.
For example, in this embodiment of the present invention, a use situation of network traffic of a terminal may be monthly counted, that is, the preset time is set as a period between the beginning of this month and a current moment. Specifically, in the foregoing scenario, network traffic may be cleared at the beginning of this month, and network traffic acquired at the current moment is regarded as network traffic used in this period, or a difference between network traffic acquired at the current moment and network traffic acquired at the beginning of this month may be regarded as network traffic used in this period. The present disclosure does not limit the specific processing logic of step S12. In addition, the present disclosure also does not limit the specific prompt manner described in step S12. For example, a client may perform prompting by using a number or warning symbol in a pop-up window or a floating window, or may perform prompting by using specified ringtone or voice, which is not limited in the present disclosure. However, the prompt generally should be subject to be capable of being identified by a user, and another subsequent processing module or system.
Embodiment 2
According to this embodiment of the present invention, a message sending method based on an IOS system that is corresponding to the traffic acquiring method in Embodiment 1 is further provided. As shown in FIG. 2, the method includes:
S202: Set a push message that may be identified by a terminal installed with an IOS system, the push message being used to instruct a client running in the background of the IOS system to be switched from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
S204: Send the push message to the client in a preset time period.
It should be noted that, one of the problems to be solved in this embodiment of the present invention is to provide a method, so that network traffic of a terminal or a terminal device is acquired by using the client in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic by using the client, to avoid generating excessive consumption on network traffic when the user is unaware.
To solve such a problem, in some solutions known by the inventor, hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device. For example, for a mobile application running in a smart phone installed with an Android system, the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
However, if the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems. Generally, because the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background. In  preset duration after the application is switched to the background, for example, after 10 seconds, the application is generally switched from an active state to an inactive state. However, in the inactive state, the client application cannot automatically perform a calculation operation, until the user returns to the application. In the foregoing scenario, to avoid interference on normal use of the user for the smart phone installed with the IOS system, the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time. However, in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone. In other words, for a client whose authority is limited and that needs to be running in the background of an IOS system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal.
To solve the foregoing problem, this embodiment of the present invention provides a message push method in which a push message is used to "awaken" a client running in the background of an IOS system, and then network traffic of a terminal is counted in time by using the awakened client. Specifically, in the embodiments of the present invention, a manner in which a server sends a predetermined push message to a client is used, and by using a response mechanism of a terminal for a push message, after receiving the push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client. In the forgoing scenario, because the client in the active state has an authority of accessing hardware in the terminal, the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
The technical solutions of the present disclosure and the working principles thereof are described in detail below with reference to the accompanying drawings and specific embodiments.
As shown in FIG. 2, in the message push method provided according to this embodiment of the present invention, a server may set a push message that may be identified by a terminal by using step S202, and further sends the set push message to a client in a preset time period by using step S204. The push message may be used to instruct to switch a client running in the background of an IOS system from an inactive state to an active state, where the client is set as  forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state. Correspondingly, the terminal or the client may receive the push message sent by the server, where the push message may be used to instruct to switch the client from the inactive state to the active state, where the client is set as running in the background of the IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
In this embodiment of the present invention, a terminal or a client may receive a push message sent by a server. Specifically, the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application. For example, applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
Further, the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state. Specifically, such a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server. More specifically, in this embodiment of the present invention, the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation. For example, the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
In another aspect, in this embodiment of the present invention, for a client generally adapted to a system installed on a terminal, the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal. In addition, in this embodiment of the present invention, the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
It should be noted that herein, in this embodiment of the present invention, inactive/active states of the client do not equivalent to the foreground/background running. For example, for a client application for playing music, the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application. Certainly, for the client for playing music, a system generally endows the client with an authority of running and maintaining an active state in the background. However, for a general client application, some systems such as IOS do not allow a background application to maintain in the active state for a long time, instead, mandatorily switch the application to the inactive state. Just on this premise, the inventor provides a solution of using a push mechanism to "awaken" a client for counting network traffic to the active state, which overcomes the problem that the client cannot count network traffic because a client whose authority is limited cannot maintain in the active state in the background.
On this basis, the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, network traffic may be acquired by using the client when the client is in the active state.
As described above, in this embodiment of the present invention, the foregoing function of switching the client from the inactive state to the active state in response to the push message generally may be provided by the terminal and its system, so that interaction is performed between the client and the server. Certainly, in some embodiments of the present invention, a more complex identification logic may also be combined to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages. In total, as an optional manner, in this embodiment of the present invention, the foregoing step S202 may include:
S14: Generate the push message according to a rule pre-agreed with the client, where the generated push message meets a first preset condition.
Correspondingly, the operation that is executed by the terminal and of switching the client from an inactive state to an active state may include:
S16: Determine whether the received push message meets the first preset condition.
S18: Switch the client from the inactive state to the active state if the received push message meets the first preset condition.
By using the foregoing manner, a push mechanism may be used to "awaken" a client running in the background of the IOS system, and therefore, network traffic of a terminal may be acquired by using the client in the active state, thereby achieving an effect of acquiring network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of the user for the terminal, thereby solving the problem that a client whose authority is limited and that needs to be running in the background of the IOS system for a long time cannot acquire the network traffic of the terminal.
On the basis of the foregoing description, a server may further send a push message in combination with a more complex sending logic. For example, as an optional manner, in this embodiment of the present invention, the foregoing step S204 may include:
S20: Send push messages to multiple clients sat multiple moments in a preset time period respectively, where the multiple moments and multiple clients are in a one-to-one correspondence.
In this embodiment of the present invention, the server may select to send the push messages to different clients at different moments. Using a manner of sending at different time can avoid the problems of excessively large instantaneous processing pressure of the server and excessively high I/O occupation caused because the server sends push information intensively at one moment to multiple clients connected to the server.
Further optionally, in this embodiment of the present invention, the preset time period may be set as repeated according to a preset cycle. More specifically, the preset cycle is set as one of the following: one day, one week, and one month. In the foregoing scenario, in an example that a preset cycle is set as one day, one or more time periods for sending push messages may be set for a server in each day. For example, in a same day, the time period may be set as at time periods in which a user uses a network frequently, that is, a requirement for updating a count value of network traffic is obvious, such as 10: 00 to 12: 00 at noon, 16: 00 to 18: 00 in the afternoon, or 20: 00 to 22: 00 in the evening, and these time periods are repeated daily, that is, push messages may be sent to a terminal in these fixed time periods in each day, so that time periods can be selected to avoid sending push messages to the terminal excessively frequently, to improve the processing efficiency of the server and the terminal.
It should be noted that, for ease of description, the foregoing method embodiments are expressed as a series of action combinations, but a person skilled in the art should know that, the present disclosure is not limited by the action sequence of the description because according to the present disclosure, and some steps may be performed in another sequence or simultaneously. Secondly, a person skilled in the art should also know that, the embodiments described in this specification all belong to exemplary embodiments, and the involved actions and modules are not necessarily needed by the present disclosure.
Through the foregoing descriptions of the implementation manners, a person skilled in the art may clearly understand that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware; but the former is a better implementation manner in many situations. Based on such an understanding, the technical solutions of the present disclosure essentially or a part contributing to the existing technology may be expressed in a form of a software product, and the computer software product is stored in one storage medium (such as a ROM/RAM, a magnetic disk or an optical disc) , including several instruction for making a terminal device (which may be a mobile phone, a computer, a server, a network device, or the like) execute the methods of the embodiments of the present invention.
Embodiment 3
According to an embodiment of the present invention, a traffic acquiring apparatus based on an IOS system that is configured to implement the traffic acquiring apparatus in Embodiment 1 is further provided. As shown in FIG. 3, the apparatus includes:
1) a receiving unit 302, configured to receive a push message sent by a server corresponding to a client running on a terminal installed with an IOS system, the push message being used to instruct to switch the client from an inactive state to an active state, the client being set as running in the background of the IOS system in both the inactive state and the active state, and the client being set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
2) a switch unit 304, configured to switch the client from an inactive state to an active state in response to the push message; and
3) an acquiring unit 306, configured to acquire network traffic by using the client when the client is in the active state.
It should be noted that, one of the problems to be solved in this embodiment of the present invention is to provide an apparatus, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
To solve such a problem, in some solutions known by the inventor, hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device. For example, for a mobile application running in a smart phone installed with an Android system, the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
However, if the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems. Generally, because the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the application is generally switched from running in the foreground to running in the background. In preset duration after the application is switched to the background, for example, after 10 seconds, the application is generally switched from an active state to an inactive state. However, in the inactive state, the client application cannot automatically perform a calculation operation, until the user returns to the application. In the foregoing scenario, to avoid interference on normal use of the user for the smart phone installed with the IOS system, the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time. However, in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone. In other words, for a client  whose authority is limited and that needs to be running in the background of an IOS system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal.
To solve the foregoing problem, this embodiment of the present invention provides a traffic acquiring apparatus that uses a push message to "awaken" a client running in the background of an IOS system, and then counts network traffic of a terminal in time by using the awakened client. Specifically, in this embodiment of the present invention, by using a response mechanism of a terminal for a push message, after receiving a pre-agreed push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client. Because the client in the active state has an authority of accessing hardware in the terminal, the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
The technical solutions of the present disclosure and the working principles thereof are described in detail below with reference to the accompanying drawings and specific embodiments.
As shown in FIG. 3, according to the traffic acquiring apparatus provided in this embodiment of the present invention, the receiving unit 302 may be used to receive a push message sent by a server, where the push message may be used to instruct to switch a client from an inactive state to an active state, where the client is set as running in the background of an IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of a terminal in the inactive state, and allowing acquiring network traffic of a terminal in the active state.
In this embodiment of the present invention, a terminal or a client may receive a push message sent by a server. Specifically, the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application. For example, applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism. 
Further, the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state. Specifically, such a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server. More specifically, in this embodiment of the present invention, the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation. For example, the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
In another aspect, in this embodiment of the present invention, for a client generally adapted to a system installed on a terminal, the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal. In addition, in this embodiment of the present invention, the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
It should be noted that herein, in this embodiment of the present invention, inactive/active states of the client do not equivalent to the foreground/background running. For example, for a client application for playing music, the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application. Certainly, for the client for playing music, a system generally endows the client with an authority of running and maintaining an active state in the background. However, for a general client application, some systems such as IOS do not allow a background application to maintain in the active state for a long time, instead, mandatorily switch the application to the inactive state. Just on this premise, the inventor provides a solution of using a push mechanism to "awaken" a client for counting network traffic to the active state, which overcomes the problem that the client cannot count network traffic because a client whose authority is limited cannot maintain in the active state in the background.
On this basis, as shown in FIG. 3, the traffic acquiring apparatus disposed in the terminal may further switch the client from the inactive state to the active state in response to the  push message by using the switch unit 304, and therefore, network traffic may be acquired by using the acquiring unit 306 by using the client when the client is in the active state.
As described above, in this embodiment of the present invention, the function of switching the client from the inactive state to the active state in response to the push message described in the switch unit 304 generally may be provided by the terminal and its system, so that interaction is performed between the client and the server. Certainly, in some embodiments of the present invention, a more complex identification logic may also be combined in the switch unit 304, to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages. In total, as an optional manner, in this embodiment of the present invention, the switch unit 304 may include:
1) a first determining module, configured to determine whether the push message meets a first preset condition; and
2) a switch module, configured to switch the client from the inactive state to the active state when it is determined that the push message meets the first preset condition.
For the acquiring unit 306, in this embodiment of the present invention, multiple feasible manners known by a person skilled in the art currently or in the future may be used for implementation. For example, as an optional manner, in this embodiment of the present invention, the acquiring unit 306 may include:
1) a read module, configured to read network adapter information of the terminal by using the client when it is determined that the client is switched from the inactive state to the active state, where the network adapter information includes data inflow and data outflow; and
2) a processing module, configured to use a total sum of the data inflow and the data outflow as the network traffic.
That is, in this embodiment of the present invention, an interface and a function provided by the terminal and its system may be used to acquire network traffic, and subsequent processing may further be performed in combination with a read parameter, for example, one or more related parameters may be selected to acquire more detailed use situations of the network traffic, which is not limited in the present disclosure.
Certainly, the foregoing embodiment is merely an example, but is not an exclusive implementation manner of the present disclosure. For example, in some embodiments of the present invention, a network adapter may also not be directly accessed, but another function such as a traffic monitoring interface provided by a system is called to complete traffic counting, which is not limited in the present disclosure. Similarly, the present disclosure may further be implemented in combination with another feasible means known by a person skilled in the art. However, it should be understood that, such implementation manners shall be considered to be in the protection scope of the present disclosure.
On the basis of the foregoing descriptions, richer prompt functions may further be implemented in combination with further processing of acquired network traffic data. For example, as an optional manner, in this embodiment of the present invention, coupled to the acquiring unit 306, the apparatus may further include:
1) a determining unit, configured to determine whether the acquired network traffic meets a second preset condition; and
2) a prompt unit, configured to prompt network traffic used in the preset time to the terminal by using the client when the acquired network traffic meets the second preset condition.
For example, in this embodiment of the present invention, a use situation of network traffic of a terminal may be monthly counted, that is, the preset time is set as a period between the beginning of this month and a current moment. Specifically, in the foregoing scenario, network traffic may be cleared at the beginning of this month, and network traffic acquired at the current moment is regarded as network traffic used in this period, or a difference between network traffic acquired at the current moment and network traffic acquired at the beginning of this month may be regarded as network traffic used in this period. The present disclosure does not limit the specific processing logic of the prompt unit. In addition, the present disclosure also does not limit the specific prompt manner described in the prompt unit. For example, a client may perform prompting by using a number or warning symbol in a pop-up window or a floating window, or may perform prompting by using specified ringtone or voice, which is not limited in the present disclosure. However, the prompt generally should be subject to be capable of being identified by a user, and another subsequent processing module or system.
Embodiment 4
According to this embodiment of the present invention, a message sending apparatus based on an IOS system for implementing the message sending method described in Embodiment 2 is further provided. As shown in FIG. 4, the apparatus includes:
1) a setting unit 402, configured to set a push message that may be identified by a terminal installed with an IOS system, the push message being used to instruct a client running in the background of the IOS system to be switched from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state; and
2) a sending unit 404, configured to send the push message to the client in the preset time period.
It should be noted that, one of the problems to be solved in this embodiment of the present invention is to provide an apparatus, so that network traffic of a terminal or a terminal device is acquired in time on the premise of not affecting normal use of a user of the terminal or the terminal device for the device, and further the user of the terminal device may be notified of the acquired network traffic, to avoid generating excessive consumption on network traffic when the user is unaware.
To solve such a problem, in some solutions known by the inventor, hardware of a terminal device may be accessed by running a client on a terminal, namely, a client application, so as to directly acquire network traffic of the terminal, and the client configured to acquire network traffic may run in the terminal or the background of an operating system of the terminal, instead of being directly displayed on a main UI of the terminal device, so as not to hinder normal use of a user for the device. For example, for a mobile application running in a smart phone installed with an Android system, the application may run in the background as a client, and access a network adapter, used as a terminal, of a smart phone at any time, so as to count in real time network traffic generated by the smart phone, and may show the counted traffic to the user of the mobile phone by means of a pop-up window or in response to a user operation, so that the user may master the use situation of traffic in time, and therefore the user may adjust a network access policy according to the situation. For example, when traffic is consumed excessively fast, accessing a 3G network to browse a web page by using a mobile phone may be limited, and the mobile phone is accessed to a Wi-Fi network more frequently.
However, if the foregoing solution is applied to a smart phone installed with an IOS system, there exist some problems. Generally, because the IOS system limits a running authority of a client application downloaded by using a standard approach, when a user presses a home key, the  application is generally switched from running in the foreground to running in the background. In preset duration after the application is switched to the background, for example, after 10 seconds, the application is generally switched from an active state to an inactive state. However, in the inactive state, the client application cannot automatically perform a calculation operation, until the user returns to the application. In the foregoing scenario, to avoid interference on normal use of the user for the smart phone installed with the IOS system, the client configured to acquire network traffic obviously cannot run in the foreground and occupy the main UI progress for a long time. However, in preset duration after the application is switched to be running in the background, the client is set as in an inactive state, and therefore cannot access a hardware device of the mobile phone, that is, cannot acquire network traffic of the mobile phone. In other words, for a client whose authority is limited and that needs to be running in the background of an IOS system for a long time, there exists a problem that the client cannot acquire network traffic of a terminal.
To solve the foregoing problem, this embodiment of the present invention provides a message push apparatus that uses a push message to "awaken" a client running in the background of an IOS system, and then counts network traffic of a terminal in time by using the awakened client. Specifically, in the embodiments of the present invention, a manner in which a server sends a predetermined push message to a client is used, and by using a response mechanism of a terminal for a push message, after receiving the push message, the terminal or the client may switch a state of the client from an inactive state to an active state provisionally, that is, "awaken" the client. In the forgoing scenario, because the client in the active state has an authority of accessing hardware in the terminal, the awakened client may acquire network traffic of the terminal by using a standard network traffic acquiring manner such as accessing a network adapter, thereby achieving an effect of acquiring the network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of a user for the terminal, and further solving the problem that a client whose authority is limited and that needs to be running in the background of an IOS system for a long time cannot acquire network traffic of a terminal.
The technical solutions of the present disclosure and the working principles thereof are described in detail below with reference to the accompanying drawings and specific embodiments.
As shown in FIG. 4, in the message push apparatus provided according to this embodiment of the present invention, the apparatus disposed in a server may set, by using a setting unit 402, a push message that may be identified by a terminal, and further sends the set push message to a client in a preset time period by using a sending unit 404. The push message may be  used to instruct to switch a client running in the background of an IOS system from an inactive state to an active state, where the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state. Correspondingly, the terminal or the client may receive the push message sent by the server, where the push message may be used to instruct to switch the client from the inactive state to the active state, where the client is set as running in the background of the IOS system in both the inactive state and the active state, and the client is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state.
In this embodiment of the present invention, a terminal or a client may receive a push message sent by a server. Specifically, the function generally is provided by the terminal or its chip and an operating system installed in the terminal, and a function and authority related to receiving of the push message generally are developed for a developer of a client application. For example, applications admitted by application markets in both an Android system and an IOS system may be designed with a push mechanism from the server to the client, so that when the developer updates an application or needs to push related information to a terminal user, the developer can send a push message to a terminal or a client by using the push mechanism.
Further, the push message may be used to instruct the terminal or its system to switch the client from the inactive state to the active state. Specifically, such a function generally may also be provided by the terminal and its system, which facilitates the client in responding to the push message in the active state, thereby enriching interaction between a client and a server, or a user performing interaction between a client and a server. More specifically, in this embodiment of the present invention, the push message generally may be a message pre-agreed by the server and the client or the terminal, so that the client or the terminal responds based on the identification on the message, and executes a subsequent processing operation. For example, the message may carry a preset symbol item, or carry a time label of a preset time, or the like, which is not limited in the present disclosure.
In another aspect, in this embodiment of the present invention, for a client generally adapted to a system installed on a terminal, the client may be set as running in the background of an IOS system in both the inactive state and the active state, to avoid interference on normal use of a user for the terminal. In addition, in this embodiment of the present invention, the client generally is set as forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state, which is similar to routine settings of the IOS system.
It should be noted that herein, in this embodiment of the present invention, inactive/active states of the client do not equivalent to the foreground/background running. For example, for a client application for playing music, the application generally may be running in the background, but maintain in an active state in a general situation, so as to complete processing operations of related tasks in the background such as music play or song switch, thereby ensuring that the user can listen to music at any time without the need of staying on an interface of the application. Certainly, for the client for playing music, a system generally endows the client with an authority of running and maintaining an active state in the background. However, for a general client application, some systems such as IOS do not allow a background application to maintain in the active state for a long time, instead, mandatorily switch the application to the inactive state. Just on this premise, the inventor provides a solution of using a push mechanism to "awaken" a client for counting network traffic to the active state, which overcomes the problem that the client cannot count network traffic because a client whose authority is limited cannot maintain in the active state in the background.
On this basis, the terminal and its system may further switch the client from the inactive state to the active state in response to the push message, and therefore, network traffic may be acquired by using the client when the client is in the active state.
As described above, in this embodiment of the present invention, the foregoing function of switching the client from the inactive state to the active state in response to the push message generally may be provided by the terminal and its system, so that interaction is performed between the client and the server. Certainly, in some embodiments of the present invention, a more complex identification logic may also be combined to achieve the objective of more accurately responding to the predetermined push message and switching a state of the client from the inactive state to the active state, to avoid the problem of unnecessary occupation of processor resources, I/O resources and internal memory resources caused because the terminal or the client wrongly switches the state of the client in response to other messages. In total, as an optional manner, in this embodiment of the present invention, the foregoing setting unit 402 may include:
1) a generating module, configured to generate the push message according to a rule pre-agreed with the client, where the generated push message meets a first preset condition.
Correspondingly, the terminal may include:
1) a first determining module, configured to determine whether the push message meets the first preset condition; and
2) a switch module, configured to switch the client from the inactive state to the active state when it is determined that the push message meets the first preset condition.
By using the foregoing manner, a push mechanism may be used to "awaken" a client running in the background of the IOS system, and therefore, network traffic of a terminal may be acquired by using the client in the active state, thereby achieving an effect of acquiring network traffic of the terminal by using a client whose authority is limited on the premise of not interfering normal use of the user for the terminal, thereby solving the problem that a client whose authority is limited and that needs to be running in the background of the IOS system for a long time cannot acquire the network traffic of the terminal.
On the basis of the foregoing description, a server may further send a push message in combination with a more complex sending logic. For example, as an optional manner, in this embodiment of the present invention, the foregoing sending unit 404 may include:
1) a sending module, configured to send push messages to multiple clients sat multiple moments in a preset time period respectively, where the multiple moments and multiple clients are in a one-to-one correspondence.
In this embodiment of the present invention, the server may select to send the push messages to different clients at different moments. Using a manner of sending at different time can avoid the problems of excessively large instantaneous processing pressure of the server and excessively high I/O occupation caused because the server sends push information intensively at one moment to multiple clients connected to the server.
Further optionally, in this embodiment of the present invention, the preset time period may be set as repeated according to a preset cycle. More specifically, the preset cycle is set as one of the following: one day, one week, and one month. In the foregoing scenario, in an example that a preset cycle is set as one day, one or more time periods for sending push messages may be set for a server in each day. For example, in a same day, the time period may be set as at time periods in which a user uses a network frequently, that is, a requirement for updating a count value of network traffic is obvious, such as 10: 00 to 12: 00 at noon, 16: 00 to 18: 00 in the afternoon, or 20: 00 to 22: 00 in the evening, and these time periods are repeated daily, that is, push messages may be sent to a terminal in these fixed time periods in each day, so that time periods can be selected to avoid sending push messages to the terminal excessively frequently, to improve the processing efficiency of the server and the terminal.
The sequence numbers of the foregoing embodiments of the present invention are merely for description, but do not represent the advantages and disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the description on each embodiment has its emphasis, and for a part not described in an embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that, the disclosed client may be implemented in another manner. The apparatus embodiments described above are merely exemplary. For example, the division of units is merely a division of logic functions, and may be other division manners during actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be ignored, or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection may be indirect coupling or communication connection by using some interfaces, units or modules, and may be in electrical or another form.
The units described as separate parts may be or may not be separated physically, and parts displayed as units may be or may not be physical units, that is, may be located at a position, or may be distributed to multiple network units. A part or all units thereof may be selected according to actual needs to implement the objective of the solution of the embodiments.
In addition, the functional units in embodiments of the present invention may be integrated into a processing unit, or the units may physically exist alone, or two or more than two of the foregoing units may be integrated into a unit. The foregoing integrated unit may be implemented in a hardware form, or may be implemented in a software function unit form.
If implemented in a form of a software function unit, and sold or used as a separate product, the integrated unit may be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present disclosure essentially or a part contributing to the existing technology or all or a part contributing to the technical solutions may be expressed in a form of a software product, and the computer software product is stored in one storage medium, including several instructions for making a computer device (which may be a personal computer, a server, a network device, or the like) execute all or a part of steps of the methods of the embodiments of the present invention. The foregoing storage medium includes various media that can store program code, such as a USB flash drive, a Read-Only Memory (ROM) , a Random Access Memory (RAM) , a removable hard disk, a magnetic disk or an optical disc.
The foregoing descriptions are merely exemplary implementation manners of the present disclosure. It should be noted that, several improvements and modifications can further be made by a person of ordinary skill in the art without departing from the principle of the present disclosure, and these improvements and modifications should also fall within the protection scope of the present disclosure.

Claims (11)

  1. A traffic acquiring method based on an operating system, comprising:
    at a terminal device having one or more processors and a memory storing programs executed by the one or more processors:
    receiving a push message sent by a server corresponding to a running client, the client being a client on a terminal installed with an operating system, and being set as running in the background of the operating system in both an inactive state and an active state, forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
    switching the client from the inactive state to the active state in response to the push message; and
    acquiring the network traffic by using the client when the client is in the active state.
  2. The method according to claim 1, the switching the client from the inactive state to the active state in response to the push message comprises:
    determining whether the push message meets a first preset condition; and
    switching the client from the inactive state to the active state if the push message meets the first preset condition.
  3. The method according to claim 1, the acquiring the network traffic by using the client comprises:
    reading, when it is determined that the client is switched from the inactive state to the active state, network adapter information of the terminal by using the client, the network adapter information comprising data inflow and data outflow; and
    using a total sum of the data inflow and the data outflow as the network traffic.
  4. The method according to any one of claims 1 to 3, after the acquiring the network traffic by using the client, the method comprising:
    determining whether the acquired network traffic meets a second preset condition; and
    prompting network traffic used in a preset time to the terminal by using the client, if the acquired network traffic meets the second preset condition.
  5. The method according to claim 4, wherein
    the determining whether the acquired network traffic meets a second preset condition comprises: determining whether the acquired network traffic is greater than or equal to a traffic threshold; and
    the prompting network traffic used in a preset time to the terminal by using the client comprises: prompting the network traffic used in the preset time to the terminal by using the client, if the acquired network traffic is greater than or equal to the traffic threshold.
  6. A traffic acquiring apparatus, comprising:
    one or more processors;
    a memory; and
    one or more program modules stored in the memory and executed by the one or more processors, the one or more program modules comprising:
    a receiving unit, configured to receive a push message sent by a server corresponding to a running client, the client being a client on a terminal installed with an operating system, and being set as running in the background of the operating system in both an inactive state and an active state, forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
    a switch unit, configured to switch the client from the inactive state to the active state in response to the push message; and
    an acquiring unit, configured to acquire the network traffic by using the client when the client is in the active state.
  7. The apparatus according to claim 6, the switch unit comprising:
    a first determining module, configured to determine whether the push message meets a first preset condition; and
    a switch module, configured to switch the client from the inactive state to the active state when the push message meets the first preset condition.
  8. The apparatus according to claim 6, the acquiring unit comprising:
    a read module, configured to read, when it is determined that the client is switched from the inactive state to the active state, network adapter information of the terminal by using the client, the network adapter information comprising data inflow and data outflow; and
    a processing module, configured to use a total sum of the data inflow and the data outflow as the network traffic.
  9. The apparatus according to any one of claims 6 to 8, comprising:
    a determining unit, configured to determine whether the acquired network traffic meets a second preset condition; and
    a prompt unit, configured to prompt network traffic used in a preset time to the terminal by using the client when the acquired network traffic meets the second preset condition.
  10. The apparatus according to claim 9, wherein
    the determining unit comprises: a second determining module, configured to determine whether the acquired network traffic is greater than or equal to a traffic threshold; and
    the prompt unit comprises: a prompt module, configured to prompt the network traffic used in the preset time to the terminal by using the client when the acquired network traffic is greater than or equal to the traffic threshold.
  11. A non-transitory computer readable storage medium having stored therein one or more instructions, which, when executed by a terminal device, cause the terminal device to:
    receive a push message sent by a server corresponding to a running client, the client being a client on a terminal installed with an operating system, and being set as running in the background of the operating system in both an inactive state and an active state, forbidding acquiring network traffic of the terminal in the inactive state, and allowing acquiring network traffic of the terminal in the active state;
    switch the client from the inactive state to the active state in response to the push message; and
    acquire the network traffic by using the client when the client is in the active state.
PCT/CN2015/081223 2014-06-12 2015-06-11 Traffic acquiring method and apparatus based on operating system WO2015188761A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410262164.1A CN105281965B (en) 2014-06-12 2014-06-12 Traffic acquisition method and device based on IOS (input/output system)
CN201410262164.1 2014-06-12

Publications (1)

Publication Number Publication Date
WO2015188761A1 true WO2015188761A1 (en) 2015-12-17

Family

ID=54832915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081223 WO2015188761A1 (en) 2014-06-12 2015-06-11 Traffic acquiring method and apparatus based on operating system

Country Status (2)

Country Link
CN (1) CN105281965B (en)
WO (1) WO2015188761A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231386A (en) * 2016-03-23 2017-10-03 华为技术有限公司 Application state conversion method, device and mobile terminal
CN113411272A (en) * 2020-03-16 2021-09-17 阿里巴巴集团控股有限公司 Traffic scheduling method and device and electronic equipment
CN114125023A (en) * 2021-11-12 2022-03-01 青岛海尔科技有限公司 Data connection determining method and device, storage medium and electronic device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250236A (en) * 2016-07-27 2016-12-21 北京金山安全软件有限公司 Application control method and device and terminal
CN106452946A (en) * 2016-09-21 2017-02-22 深圳市金立通信设备有限公司 Flow control method and terminal
CN113656240A (en) * 2021-07-08 2021-11-16 上海二三四五网络科技有限公司 Control method and control device for judging activation state of app application program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103079224A (en) * 2013-01-08 2013-05-01 北京瓦力网络科技有限公司 Operation method and device of application for detecting network flow
CN103095528A (en) * 2013-01-08 2013-05-08 北京瓦力网络科技有限公司 Method and device for operating application for detecting network flow
US20140113611A1 (en) * 2012-10-23 2014-04-24 Tencent Technology (Shenzhen) Company Limited Traffic control method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188112B (en) * 2011-12-28 2016-09-07 阿里巴巴集团控股有限公司 Network flow detection method and device
CN104135561B (en) * 2013-07-08 2016-03-16 腾讯科技(深圳)有限公司 A kind of flow based reminding method of terminal, device and terminal
CN103686663B (en) * 2013-12-20 2017-01-11 海信集团有限公司 Network flow monitoring method and device
CN103813269B (en) * 2014-02-28 2016-01-06 宇龙计算机通信科技(深圳)有限公司 Traffic management device and flow managing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140113611A1 (en) * 2012-10-23 2014-04-24 Tencent Technology (Shenzhen) Company Limited Traffic control method and device
CN103079224A (en) * 2013-01-08 2013-05-01 北京瓦力网络科技有限公司 Operation method and device of application for detecting network flow
CN103095528A (en) * 2013-01-08 2013-05-08 北京瓦力网络科技有限公司 Method and device for operating application for detecting network flow

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231386A (en) * 2016-03-23 2017-10-03 华为技术有限公司 Application state conversion method, device and mobile terminal
CN107231386B (en) * 2016-03-23 2020-07-07 华为技术有限公司 Application state conversion method and device and mobile terminal
CN113411272A (en) * 2020-03-16 2021-09-17 阿里巴巴集团控股有限公司 Traffic scheduling method and device and electronic equipment
CN114125023A (en) * 2021-11-12 2022-03-01 青岛海尔科技有限公司 Data connection determining method and device, storage medium and electronic device
CN114125023B (en) * 2021-11-12 2024-03-22 青岛海尔科技有限公司 Method and device for determining data connection, storage medium and electronic device

Also Published As

Publication number Publication date
CN105281965A (en) 2016-01-27
CN105281965B (en) 2020-02-07

Similar Documents

Publication Publication Date Title
WO2015188761A1 (en) Traffic acquiring method and apparatus based on operating system
US10629013B2 (en) Unlocking control methods and related products
US20150365360A1 (en) Method and apparatus for processing push message in notification center of mobile terminal, and storage medium
CN107851050B (en) Device with watchdog timer and method for operating watchdog timer
US20200333930A1 (en) Information processing method, terminal, server, and computer storage medium
TWI654601B (en) Voice signal detection method and device
CN105718791B (en) A kind of method and apparatus for protecting application data
JP2017510864A (en) Method, terminal and system for pushing information
CN109656440B (en) Application icon display method, device and medium
US20190354983A1 (en) Payment method and device
CN104142844A (en) Method and device for clearing processes of mobile terminal
US10097019B2 (en) Alternate alarm notifications based on battery condition
CN105704758A (en) Method and device of closing social applications based on flow monitoring
KR20160145755A (en) Method, device and mobile terminal for reducing power consumption
EP3486823A1 (en) System notification service control method, apparatus, terminal device, and storage medium
CN110868693A (en) Application program flow control method, terminal device and storage medium
US20170160778A1 (en) Method and device for monitoring power-consuming applications, user terminal, computer program and storage medium
CN111580769A (en) Display control system, method, device, storage medium and processor
CN109658934B (en) Method and device for controlling multimedia app through voice
CN110457125A (en) Freezing method, terminal device and the storage medium of terminal applies
CN104063316A (en) Application testing method and device
CN104834553B (en) Service concurrent processing method of user terminal and user terminal
CN110868347A (en) Message prompting method, device and system
CN109960572B (en) Equipment resource management method and device and intelligent terminal
CN107943268B (en) Scheduling job control method, device, terminal equipment and storage medium

Legal Events

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

Ref document number: 15807416

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.05.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15807416

Country of ref document: EP

Kind code of ref document: A1