[go: up one dir, main page]

CN104836698B - The method and apparatus of monitoring network environment - Google Patents

The method and apparatus of monitoring network environment Download PDF

Info

Publication number
CN104836698B
CN104836698B CN201410235575.1A CN201410235575A CN104836698B CN 104836698 B CN104836698 B CN 104836698B CN 201410235575 A CN201410235575 A CN 201410235575A CN 104836698 B CN104836698 B CN 104836698B
Authority
CN
China
Prior art keywords
network
flow
traffic
record
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410235575.1A
Other languages
Chinese (zh)
Other versions
CN104836698A (en
Inventor
柯佳春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410235575.1A priority Critical patent/CN104836698B/en
Publication of CN104836698A publication Critical patent/CN104836698A/en
Application granted granted Critical
Publication of CN104836698B publication Critical patent/CN104836698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of method and apparatus of monitoring network environment, belong to the communications field.The method includes:In locally applied operational process, network identity is obtained in real time and starts real-time network monitoring acquisition data on flows, the data on flows includes at least flow or network speed;Discharge record is periodically established according to the event in the application, the discharge record includes the network identity and data on flows;This discharge record and a upper discharge record are compared, if network identity indicates that currently used network is unchanged but data on flows shows that the changes in flow rate of other networks or network speed variation reach preset condition, it is determined that network environment is abnormal.Described device includes:Acquisition module establishes module and the first determining module.The present invention is based on network identities and flow monitoring comprehensive descision network environment, improve the accuracy rate of network environment judgement, avoid the single dependence to network identity, prevent from unnecessary interests being brought to lose to user due to judging by accident.

Description

Method and device for monitoring network environment
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for monitoring a network environment.
Background
At present, online video applications on iPhone devices have a function of judging network environments. The function generally judges the Network environment based on a Network state flag, Network flag, provided by a Network module interface reality of the system, and whether a local area Network IP (Internet protocol) allocated when WiFi is accessed is effective.
However, the online video application is prone to misjudgment at the boundary time of network environment switching, which may bring undesirable traffic cost to the user and affect the user experience. For example, the online video application is switched from the WiFi network to the 3G network at a certain time, but the result of the network environment judgment is still displayed as the status flag of the WiFi network, so that the traffic is charged according to the 3G network after the user does not know, which brings loss to the user.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for monitoring a network environment, so as to improve accuracy of network environment judgment. The technical scheme is as follows:
in one aspect, a method for monitoring a network environment is provided, including:
in the running process of the local application, acquiring a network mark in real time and starting real-time network monitoring to acquire flow data, wherein the flow data at least comprises flow or network speed;
periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data;
and comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition.
In another aspect, an apparatus for monitoring a network environment is provided, including:
the acquisition module is used for acquiring a network mark in real time and starting real-time network monitoring to acquire flow data in the running process of local application, wherein the flow data at least comprises flow or network speed;
the establishing module is used for periodically establishing a flow record according to the event in the application, wherein the flow record comprises the network mark and the flow data;
and the first determining module is used for comparing the current flow record with the previous flow record, and if the network mark indicates that the current used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition, determining that the network environment is abnormal.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: in the running process of the local application, acquiring a network mark in real time and starting real-time network monitoring to acquire flow data, wherein the flow data at least comprises flow or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for monitoring a network environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for monitoring a network environment according to another embodiment of the present invention;
FIG. 3 is a flow chart of a method for monitoring a network environment according to another embodiment of the present invention;
fig. 4 is a block diagram of an apparatus for monitoring a network environment according to another embodiment of the present invention;
FIG. 5 is a block diagram of another apparatus for monitoring a network environment according to another embodiment of the present invention;
fig. 6 is a diagram of a terminal structure according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for monitoring a network environment, including:
101: in the running process of the local application, a network mark is obtained in real time, and real-time network monitoring is started to obtain flow data, wherein the flow data at least comprises flow or network speed.
In this embodiment, the application may be any locally installed application, and generally refers to an application that uses network traffic, such as an online video application, and the like, which is not specifically limited in this embodiment.
The Network mark is a Network flag provided by Network module interface realability of the system, and is used for marking a currently used Network, if the Network mark is WiFi, the currently used Network is indicated to be a WiFi Network, or if the Network mark is 3G, the currently used Network is indicated to be a 3G Network, and the like.
The network monitoring refers to monitoring traffic, and specifically, the traffic may be monitored through a traffic interface provided by the system, which is not described in this embodiment. The monitored traffic data may include various information, such as a record ID, a service type, an event name, an event start time, WiFi traffic, 3G traffic, a download speed, and the like, which is not specifically limited in this embodiment.
102: periodically creating a traffic record based on events within the application, the traffic record including the network tag and traffic data.
The event in the application related to the present embodiment may be any event, including but not limited to: watching a video online, browsing a web page online, downloading a file offline, uploading a file, playing a video file while the network environment is switched from WiFi to 3G, switching the network environment from 3G to WiFi, and the like.
The periodic establishment may be established according to a pre-specified period, the specified period may be set according to needs, and the specific numerical value is not limited in this embodiment.
The created flow records may be stored in a statistical table, each flow record being uniquely identified by a record ID. The statistical table is stored in the local device and can be updated periodically.
103: and comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition.
In this embodiment, the flow records are multiple, and the flow refers to any one of the multiple records except the first one. The comparison between the current flow record and the previous flow record is performed in a circulating manner, that is, any two adjacent flow records in the flow records are compared, so that the change condition of the network environment can be mastered in time.
Further, in this embodiment, after determining that the network environment is abnormal, alarm information of the network environment abnormality may be locally output. The alarm information is used for prompting the user that the current network environment is abnormal, and the method has various modes including but not limited to: a text message prompt, an audible alarm, etc., which are not specifically limited in this embodiment.
In this embodiment, optionally, the comparing the current traffic record with the previous traffic record, and if the network flag indicates that the currently used network is not changed but the traffic data indicates that the traffic change or the network speed change of other networks reaches the preset condition, determining that the network environment is abnormal may include:
under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value, determining that the network environment is abnormal; or,
and under the condition that the network marks in the current flow record and the last flow record are both the first network, if the network speed of the second network is increased to reach a preset speed threshold, determining that the network environment is abnormal.
In this embodiment, further, the determining that the network environment is abnormal if the traffic increase of the second network reaches the preset traffic threshold may include:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow increase of the second network reaches a flow threshold preset for the service type.
In this embodiment, optionally, the method further includes:
if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; or,
and if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase.
In addition, it is worth mentioning that if the network flag in the current traffic record and the network flag in the previous traffic record are changed, it is considered as a normal network switch and belongs to a critical situation, and therefore, the traffic change situation does not need to be counted. Moreover, the time for network handover is usually very short, e.g. the network handover is completed within 1 minute, and even if the traffic or network speed of the network increases within the 1 minute, the network handover is usually within a tolerable range. Therefore, the invention considers that the situation of the traffic or the network speed change does not need to be counted in the short time of the network switching, and the situation that the network marks in the current traffic record and the last traffic record are changed is not explained too much in various embodiments.
In this embodiment, optionally, the acquiring a network marker in real time and starting real-time network monitoring to acquire traffic data in the running process of the local application may include:
and in the running process of the local application, acquiring the network mark in real time, and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
In this embodiment, optionally, the periodically establishing a flow record according to the event in the application may include:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
In this embodiment, optionally, the method may further include:
and after determining that the network environment is abnormal, suspending the current service of the application.
In the method provided by this embodiment, in the running process of the local application, the network marker is obtained in real time, and real-time network monitoring is started to obtain traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
Referring to fig. 2, another embodiment of the present invention provides a method for monitoring a network environment, including:
201: in the running process of the local application, a network mark is obtained in real time, and real-time network monitoring is started to obtain flow data, wherein the flow data at least comprises flow or network speed.
This step may include the steps of:
and in the running process of the local application, acquiring the network mark in real time, and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
202: periodically creating a traffic record based on events within the application, the traffic record including the network tag and traffic data.
The step may specifically include:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
For example, a flow record is established when the network environment is switched from WiFi to 3G, a flow record is established when a file is downloaded offline, a flow record is also established whenever a specified period is reached during offline downloading, and so on.
203: and under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value or if the network speed increase of the second network reaches a preset speed threshold value, determining that the network environment is abnormal.
In this embodiment, the first network may be a WiFi network, and the second network may be a 3G network; or, the first network is a 3G network, the second network is a WiFi network, and the like, which is not specifically limited in this embodiment.
There may be multiple networks accessible to the local device, that is, there may be multiple networks accessible at the same time, but the local device can only use one of the networks to access the network.
In this embodiment, the traffic and the network speed of each network can be obtained through network monitoring. For any network, the traffic of the network in the current traffic record is subtracted from the traffic of the network in the previous traffic record, so that whether the traffic of the network increases and how much the traffic of the network increases can be known. The traffic threshold may be set as required, and may be set as a uniform traffic threshold, or different traffic thresholds may be set according to the service types, and the like, which is not specifically limited in this embodiment. Similarly, for any network, the network speed of the network in the current traffic record is subtracted from the network speed of the network in the previous traffic record, so as to know whether the network speed of the network increases and how much the network speed of the network increases. The speed threshold may be set as required, and the present embodiment does not limit the specific value.
In this embodiment, a situation that the network marker is misjudged may be that the traffic increase of the second network reaches the preset traffic threshold or the network speed increase of the second network reaches the preset speed threshold. For example, the network flag is a WiFi network, and the traffic of the 3G network increases to reach the preset traffic threshold, so it may be determined that the local device is currently using the 3G network instead of the WiFi network indicated by the network flag, in which case it is considered that the network environment is abnormal.
Wherein, if the traffic increase of the second network reaches the preset traffic threshold, determining that the network environment is abnormal may include:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow increase of the second network reaches a flow threshold preset for the service type.
In this embodiment, multiple traffic thresholds may be set, and the traffic thresholds correspond to different service types, respectively. For example, a first traffic threshold is set for a file downloading service, a second traffic threshold is set for a web browsing service, a third traffic threshold is set for an online video watching service, and the like, which is not specifically limited in this embodiment.
In addition, it is worth mentioning that when the traffic threshold is set, the traffic threshold may be set in combination with the charging rule of the operator for the traffic, for example, when the operator charges the traffic according to 1 yuan/MB, the traffic threshold may be set to 1MB, and when the traffic increases beyond 1MB, the network environment is considered to be abnormal. Of course, a corresponding flow threshold may also be calculated by using a preset formula according to the charging rule, and the like, which is not specifically limited in this embodiment.
In this embodiment, optionally, the method may further include:
if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; or,
and if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase.
In this embodiment, optionally, after determining that the network environment is abnormal, alarm information of the network environment abnormality may be locally output.
In this embodiment, optionally, the method may further include:
and after determining that the network environment is abnormal, suspending the current service of the application.
In the method provided by this embodiment, in the running process of the local application, the network marker is obtained in real time, and real-time network monitoring is started to obtain traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network exceeds a preset flow threshold or if the network speed increase exceeds a preset speed threshold, determining that the network environment is abnormal; locally outputting alarm information of network environment abnormity; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
Referring to fig. 3, another embodiment of the present invention provides a method for monitoring a network environment, including:
301: in the running process of the local application, the network mark is obtained in real time, and when a registration notice sent by the current service is received, real-time network monitoring is started to obtain flow data, wherein the flow data at least comprises flow or network speed.
In this embodiment, whether to send the registration notification is configurable, which may be configured as required, and when the configuration is to send the registration notification, the registration notification is a trigger condition for network monitoring, and only when receiving the registration notification sent by the current service, the real-time network monitoring is started.
For example, when the current service is an online watching video, after receiving a registration notification sent by the service, the current service starts real-time network monitoring to acquire flow data when the online watching video.
302: periodically creating a traffic record based on events within the application, the traffic record including the network tag and traffic data.
The step may specifically include:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
303: comparing the current flow record with the previous flow record, and executing 304 if the network mark indicates that the currently used network is not changed but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; if the network flag indicates that the currently used network is unchanged and the traffic data indicates that traffic or network speed is unchanged, then 305 is performed; if the network flag indicates that the currently used network is unchanged but the traffic data indicates that the traffic growth or wire speed growth of the network reaches a preset condition, then 306 is performed.
304: and determining the network environment is abnormal, locally outputting alarm information of the network environment abnormality, suspending the current service of the application, and ending the process.
Wherein, if the network flag indicates that the currently used network is not changed but the traffic data indicates that the traffic change or the network speed change of other networks reaches a preset condition, determining that the network environment is abnormal may include:
and under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value or if the network speed increase of the second network reaches a preset speed threshold value, determining that the network environment is abnormal.
Wherein, if the traffic increase of the second network reaches a preset traffic threshold, determining that the network environment is abnormal, including:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow increase of the second network reaches a flow threshold preset for the service type.
In this embodiment, the step of suspending the current service of the application is to consider that traffic brought by the current service may cause a loss to a user due to an abnormal network environment, so that the step of suspending the current service may ask the user whether to continue the current service, and ensure that the user determines whether to continue the current service under an informed condition.
For example, if the current service of the local application is downloading a file offline, after determining that the network environment is abnormal, suspending downloading the file, popping up a message to inquire whether the user continues downloading, continuing downloading the file after obtaining the user's consent, and ending the downloading task if the user disagrees.
305: and determining that the network environment is normal, and ending the process.
306: and outputting prompt information of flow increase or network speed increase, and ending the process.
For example, under the condition that the network tags in the current traffic record and the previous traffic record are both WiFi, if the traffic or the network speed of the WiFi network is not changed, and the traffic or the network speed of the 3G network is also not changed, it is determined that the network environment is normal; or if the flow increase of the 3G network reaches a preset flow threshold, determining that the network environment is abnormal, and outputting an alarm; or if the flow rate increase or the network speed increase of the WiFi network reaches a preset condition, outputting prompt information of the flow rate increase or the network speed increase of the WiFi network.
For another example, under the condition that the network tags in the current traffic record and the previous traffic record are both 3G, if the traffic or the network speed of the 3G network is not changed, and the traffic or the network speed of the WiFi network is also not changed, it is determined that the network environment is normal; or if the flow increase or the network speed increase of the 3G network reaches a preset condition, outputting prompt information of the 3G flow increase or the network speed increase; or if the flow increase or the network speed increase of the WiFi network reaches a preset condition, determining that the network environment is abnormal, and outputting an alarm.
In the method provided by this embodiment, in the running process of the local application, the network tag is obtained in real time, and when a registration notification sent by the current service is received, real-time network monitoring is started to obtain traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, if the network mark indicates that the current used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches the preset condition, determining that the network environment is abnormal, locally outputting alarm information of the network environment abnormality, and suspending the current service of the application; if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
Referring to fig. 4, another embodiment of the present invention provides an apparatus for monitoring a network environment, including:
an obtaining module 401, configured to obtain a network tag in real time and start real-time network monitoring to obtain traffic data in the running process of a local application, where the traffic data at least includes traffic or network speed;
an establishing module 402, configured to periodically establish a traffic record according to an event in the application, where the traffic record includes the network tag and traffic data;
a first determining module 403, configured to compare the current traffic record with the previous traffic record, and determine that a network environment is abnormal if the network flag indicates that the currently used network is not changed but the traffic data indicates that traffic change or network speed change of other networks reaches a preset condition.
Referring to fig. 5, in this embodiment, optionally, the first determining module 403 may include:
a traffic determining unit 403a, configured to determine that a network environment is abnormal if traffic of a second network increases to reach a preset traffic threshold when the network flags in the current traffic record and the previous traffic record are both the first network; or,
a network speed determining unit 403b, configured to determine that a network environment is abnormal if the network speed of the second network increases to reach a preset speed threshold when the network tags in the current traffic record and the previous traffic record are both the first network.
Further, the flow determination unit may be configured to:
and under the condition that the network marks in the current flow record and the last flow record are both the first network, acquiring the current service type of the application, and if the flow increase of the second network reaches a flow threshold preset for the service type, determining that the network environment is abnormal.
In this embodiment, the apparatus may further include:
the second determining module is used for determining that the network environment is normal if the network mark indicates that the currently used network is unchanged and the flow data indicates that the flow or the network speed is unchanged; or,
and the third determining module is used for outputting prompt information of flow increase or network speed increase if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow increase or network speed increase of the network reaches a preset condition.
In this embodiment, optionally, the obtaining module 401 may include:
the obtaining unit 401a is configured to obtain the network tag in real time during the running process of the local application, and start real-time network monitoring to obtain traffic data when receiving a registration notification sent by the current service.
In this embodiment, optionally, the establishing module 402 may include:
a creating unit 402a, configured to create a flow record when an event occurs in the application or a specified period is reached.
In this embodiment, optionally, the apparatus may further include:
and the processing module is used for suspending the current service of the application after determining that the network environment is abnormal.
The apparatus provided in this embodiment may perform the method provided in any of the above method embodiments, and the detailed process is described in the method embodiments and is not described herein again.
In the device provided by this embodiment, in the running process of the local application, the network marker is obtained in real time, and real-time network monitoring is started to obtain traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
Referring to fig. 6, the present embodiment provides a terminal 600, which may include a communication unit 610, a memory 620 including one or more nonvolatile readable storage media, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a WiFi (wireless fidelity) module 670, a processor 680 including one or more processing cores, and a power supply 690.
Those skilled in the art will appreciate that the terminal structure shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the communication unit 610 may be used for receiving and transmitting signals during information transmission and reception or during a call, and the communication unit 610 may be an RF (Radio Frequency) circuit, a router, a modem, or other network communication devices. In particular, when the communication unit 610 is an RF circuit, downlink information of a base station is received and then processed by one or more processors 680; in addition, data relating to uplink is transmitted to the base station. Generally, the RF circuit as a communication unit includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the communication unit 610 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (general packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (long term Evolution), email, SMS (Short Messaging Service), and the like. The memory 620 may be used to store software programs and modules, and the processor 680 may execute various functional applications and data processing by operating the software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 600, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 620 may also include a memory controller to provide the processor 680 and the input unit 630 access to the memory 620.
The input unit 630 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Alternatively, the input unit 630 may include a touch-sensitive surface 630a and other input devices 630 b. The touch-sensitive surface 630a, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 630a (e.g., operations by a user on or near the touch-sensitive surface 630a using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch-sensitive surface 630a may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch-sensitive surface 630a may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 630 may include other input devices 630b in addition to the touch-sensitive surface 630 a. Alternatively, other input devices 630b may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 640 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 600, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 640 may include a Display panel 640a, and optionally, the Display panel 640a may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 630a may overlay display panel 640a, and when touch-sensitive surface 630a detects a touch operation thereon or nearby, processor 680 may determine the type of touch event, and processor 680 may then provide a corresponding visual output on display panel 640a according to the type of touch event. Although in FIG. 6, touch-sensitive surface 630a and display panel 640a are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 630a may be integrated with display panel 640a for input and output functions.
The terminal 600 may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Alternatively, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 640a according to the brightness of ambient light, and a proximity sensor that turns off the display panel 640a and/or the backlight when the terminal 600 moves to the ear. As a type of the motion sensor, there is a,
the gravity acceleration sensor can detect the acceleration in each direction (generally three axes), can detect the gravity and the direction when the mobile phone is static, and can be used for identifying the application of the mobile phone gesture (such as horizontal and vertical screen switching, related games and magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking) and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 600, detailed descriptions thereof are omitted.
The audio circuit 660, speaker 660a, microphone 660b may provide an audio interface between a user and the terminal 600. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the loudspeaker 660a, and the electrical signal is converted into a sound signal by the loudspeaker 660a and output; on the other hand, the microphone 660b converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 660, and then processes the audio data by the audio data output processor 680, and then transmits the audio data to, for example, another terminal via the RF circuit 610, or outputs the audio data to the memory 620 for further processing. The audio circuit 660 may also include an earbud jack to provide communication of a peripheral headset with the terminal 600.
To implement wireless communication, a wireless communication unit 670 may be disposed on the terminal, and the wireless communication unit 670 may be a WiFi module. WiFi belongs to a short-range wireless transmission technology, and the terminal 600 may help a user to send and receive e-mails, browse web pages, access streaming media, and the like through the wireless communication unit 670, which provides the user with wireless broadband internet access. Although fig. 6 shows the wireless communication unit 670, it is understood that it does not belong to the essential constitution of the terminal 600 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 680 is a control center of the terminal 600, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 600 and processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory 620, thereby integrally monitoring the handset. Optionally, processor 680 may include one or more processing cores; preferably, the processor 680 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 680.
The terminal 600 also includes a power supply 690 (e.g., a battery) for powering the various components, which may be logically coupled to the processor 680 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 690 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal 600 may further include a camera, a bluetooth module, and the like, which will not be described herein.
An alternative architecture for a terminal 600 is presented above in connection with fig. 6, in which one or more modules are stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functionality:
in the running process of the local application, acquiring a network mark in real time and starting real-time network monitoring to acquire flow data, wherein the flow data at least comprises flow or network speed;
periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data;
and comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition.
Wherein, comparing the current flow record with the previous flow record, if the network mark indicates that the current network is not changed but the flow data indicates that the flow change or the network speed change of other networks reaches the preset condition, determining that the network environment is abnormal, including:
under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value, determining that the network environment is abnormal; or,
and under the condition that the network marks in the current flow record and the last flow record are both the first network, if the network speed of the second network is increased to reach a preset speed threshold, determining that the network environment is abnormal.
Wherein, if the traffic increase of the second network reaches a preset traffic threshold, determining that the network environment is abnormal, including:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow of the second network increases to reach a flow threshold preset for the service type.
Wherein the one or more modules further have the following functionality:
if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; or,
and if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase.
In the running process of the local application, acquiring the network mark in real time and starting real-time network monitoring to acquire flow data includes:
and in the running process of the local application, acquiring the network mark in real time, and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
Wherein said periodically establishing a flow record according to events within said application comprises:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
Wherein the one or more modules further have the following functionality:
and after determining that the network environment is abnormal, suspending the current service of the application.
In the operation process of the local application, the terminal provided by this embodiment acquires the network tag in real time and starts real-time network monitoring to acquire traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
An embodiment of the present invention further provides a non-volatile readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied in a device, the device may execute instructions (instructions) for:
in the running process of the local application, acquiring a network mark in real time and starting real-time network monitoring to acquire flow data, wherein the flow data at least comprises flow or network speed;
periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data;
and comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition.
Wherein, comparing the current flow record with the previous flow record, if the network mark indicates that the current network is not changed but the flow data indicates that the flow change or the network speed change of other networks reaches the preset condition, determining that the network environment is abnormal, including:
under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value, determining that the network environment is abnormal; or,
and under the condition that the network marks in the current flow record and the last flow record are both the first network, if the network speed of the second network is increased to reach a preset speed threshold, determining that the network environment is abnormal.
Wherein, if the traffic increase of the second network reaches a preset traffic threshold, determining that the network environment is abnormal, including:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow of the second network increases to reach a flow threshold preset for the service type.
Wherein the apparatus may further execute instructions for:
if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; or,
and if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase.
In the running process of the local application, acquiring the network mark in real time and starting real-time network monitoring to acquire flow data includes:
and in the running process of the local application, acquiring the network mark in real time, and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
Wherein said periodically establishing a flow record according to events within said application comprises:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
Wherein the apparatus may further execute instructions for:
and after determining that the network environment is abnormal, suspending the current service of the application.
In the operation process of the local application, the non-volatile readable storage medium provided in this embodiment obtains a network tag in real time and starts real-time network monitoring to obtain traffic data, where the traffic data at least includes traffic or network speed; periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data; comparing the current flow record with the previous flow record, and determining that the network environment is abnormal if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow change or the network speed change of other networks reaches a preset condition; the network environment is comprehensively judged based on the network mark and the flow monitoring, even if the network mark is judged by mistake, the network environment can be accurately judged by combining the flow, the accuracy of network environment judgment is improved, single dependence on the network mark is avoided, and unnecessary benefit loss caused by misjudgment to a user is prevented.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a non-volatile readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A method of monitoring a network environment, the method comprising:
in the running process of the local application, acquiring a network mark in real time and starting real-time network monitoring to acquire flow data, wherein the flow data at least comprises flow or network speed;
periodically establishing a traffic record according to an event in the application, wherein the traffic record comprises the network tag and traffic data;
under the condition that the network marks in the current flow record and the last flow record are both the first network, if the flow increase of the second network reaches a preset flow threshold value, determining that the network environment is abnormal; or, under the condition that the network marks in the current traffic record and the last traffic record are both the first network, if the network speed of the second network increases to reach the preset speed threshold, determining that the network environment is abnormal.
2. The method of claim 1, wherein determining that the network environment is abnormal if the traffic of the second network increases to reach a preset traffic threshold comprises:
and acquiring the current service type of the application, and determining that the network environment is abnormal if the flow of the second network increases to reach a flow threshold preset for the service type.
3. The method of claim 1, further comprising:
if the network mark indicates that the currently used network is unchanged and the traffic data indicates that the traffic or the network speed is unchanged, determining that the network environment is normal; or,
and if the network mark indicates that the currently used network is unchanged but the traffic data indicates that the traffic increase or the network speed increase of the network reaches a preset condition, outputting prompt information of the traffic increase or the network speed increase.
4. The method of claim 1, wherein the obtaining the network tag in real time and starting real-time network monitoring to obtain the traffic data during the running process of the local application comprises:
and in the running process of the local application, acquiring the network mark in real time, and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
5. The method of claim 1, wherein said periodically establishing a flow record based on events within said application comprises:
and when an event occurs in the application or a specified period is reached, establishing a flow record.
6. The method of claim 1, further comprising:
and after determining that the network environment is abnormal, suspending the current service of the application.
7. An apparatus for monitoring a network environment, the apparatus comprising:
the acquisition module is used for acquiring a network mark in real time and starting real-time network monitoring to acquire flow data in the running process of local application, wherein the flow data at least comprises flow or network speed;
the establishing module is used for periodically establishing a flow record according to the event in the application, wherein the flow record comprises the network mark and the flow data;
the first determining module is used for determining that the network environment is abnormal if the flow of the second network increases to reach a preset flow threshold under the condition that the network marks in the current flow record and the last flow record are both the first network; or, under the condition that the network marks in the current traffic record and the last traffic record are both the first network, if the network speed of the second network increases to reach the preset speed threshold, determining that the network environment is abnormal.
8. The apparatus of claim 7, wherein the flow determination unit is configured to:
and under the condition that the network marks in the current flow record and the last flow record are both the first network, acquiring the current service type of the application, and if the flow increase of the second network reaches a flow threshold preset for the service type, determining that the network environment is abnormal.
9. The apparatus of claim 7, further comprising:
the second determining module is used for determining that the network environment is normal if the network mark indicates that the currently used network is unchanged and the flow data indicates that the flow or the network speed is unchanged; or,
and the third determining module is used for outputting prompt information of flow increase or network speed increase if the network mark indicates that the currently used network is unchanged but the flow data indicates that the flow increase or network speed increase of the network reaches a preset condition.
10. The apparatus of claim 7, wherein the obtaining module comprises:
and the acquisition unit is used for acquiring the network mark in real time in the running process of the local application and starting real-time network monitoring to acquire flow data when receiving a registration notification sent by the current service.
11. The apparatus of claim 7, wherein the establishing module comprises:
and the establishing unit is used for establishing the flow record when an event occurs in the application or a specified period is reached.
12. The apparatus of claim 7, further comprising:
and the processing module is used for suspending the current service of the application after determining that the network environment is abnormal.
CN201410235575.1A 2014-05-29 2014-05-29 The method and apparatus of monitoring network environment Active CN104836698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410235575.1A CN104836698B (en) 2014-05-29 2014-05-29 The method and apparatus of monitoring network environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410235575.1A CN104836698B (en) 2014-05-29 2014-05-29 The method and apparatus of monitoring network environment

Publications (2)

Publication Number Publication Date
CN104836698A CN104836698A (en) 2015-08-12
CN104836698B true CN104836698B (en) 2018-06-08

Family

ID=53814348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410235575.1A Active CN104836698B (en) 2014-05-29 2014-05-29 The method and apparatus of monitoring network environment

Country Status (1)

Country Link
CN (1) CN104836698B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487808A (en) * 2016-11-21 2017-03-08 武汉斗鱼网络科技有限公司 A kind of dynamic method for uploading of live video and system
CN109376062B (en) * 2018-09-28 2022-10-18 Oppo广东移动通信有限公司 Network state prompting method and related device
CN112583635B (en) * 2020-11-24 2024-05-28 视联动力信息技术股份有限公司 Method, device, terminal equipment and storage medium for detecting network status of visual network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420346A (en) * 2008-11-20 2009-04-29 四川长虹电器股份有限公司 Network connection state controlling method
US7599293B1 (en) * 2002-04-25 2009-10-06 Lawrence Michael Bain System and method for network traffic and I/O transaction monitoring of a high speed communications network
CN201937832U (en) * 2010-12-24 2011-08-17 厦门市美亚柏科信息股份有限公司 Detecting device for WIFI (wireless fidelity) connection status
CN103024462A (en) * 2012-12-11 2013-04-03 深圳市同洲电子股份有限公司 Method for network detection and digital terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7599293B1 (en) * 2002-04-25 2009-10-06 Lawrence Michael Bain System and method for network traffic and I/O transaction monitoring of a high speed communications network
CN101420346A (en) * 2008-11-20 2009-04-29 四川长虹电器股份有限公司 Network connection state controlling method
CN201937832U (en) * 2010-12-24 2011-08-17 厦门市美亚柏科信息股份有限公司 Detecting device for WIFI (wireless fidelity) connection status
CN103024462A (en) * 2012-12-11 2013-04-03 深圳市同洲电子股份有限公司 Method for network detection and digital terminal

Also Published As

Publication number Publication date
CN104836698A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
KR101978590B1 (en) Message updating method, device and terminal
US10831161B2 (en) Method and device for sending communication message
US10652287B2 (en) Method, device, and system for managing information recommendation
CN106302938B (en) Communication event processing method and device
CN105227598B (en) Resource sharing method, device and system based on cloud storage
CN110913455B (en) Method for forbidding abnormal cell, electronic equipment and server
CN110022405B (en) Radio frequency parameter adjusting method, device and storage medium
CN107122036B (en) Method and device for adjusting frequency of central processing unit
CN107104930A (en) It is a kind of that the methods, devices and systems for checking authority are set
CN114049967A (en) Epidemic situation monitoring method and device, storage medium and electronic equipment
CN104836698B (en) The method and apparatus of monitoring network environment
CN106997425B (en) Method, device and system for displaying physiological state information
CN106302101B (en) Message reminding method, terminal and server
CN106470234B (en) Equipment discovery method and device
CN106899624A (en) A kind of method and apparatus for updating interlock account information
CN106330875B (en) Message display method and device
CN105577712A (en) File uploading method, file uploading device, and file uploading system
CN105159655B (en) Behavior event playing method and device
US20160335256A1 (en) Display control method and apparatus for multimedia data
US20140380198A1 (en) Method, device, and terminal apparatus for processing session based on gesture
CN105635379B (en) Noise suppression method and device
CN106406921B (en) Method and device for installing patch
CN105636075A (en) Flow statistical method and device
US20140366094A1 (en) Communication method, communication apparatus and terminal
CN108111553B (en) Method and device for providing service

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant