CN107733732B - Method and device for judging network condition - Google Patents

Method and device for judging network condition Download PDF

Info

Publication number
CN107733732B
CN107733732B CN201710721518.8A CN201710721518A CN107733732B CN 107733732 B CN107733732 B CN 107733732B CN 201710721518 A CN201710721518 A CN 201710721518A CN 107733732 B CN107733732 B CN 107733732B
Authority
CN
China
Prior art keywords
packet loss
loss rate
client
uplink packet
network
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
CN201710721518.8A
Other languages
Chinese (zh)
Other versions
CN107733732A (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.)
Guiyang Longmaster Information and Technology Co ltd
Original Assignee
Guiyang Longmaster Information and Technology 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 Guiyang Longmaster Information and Technology Co ltd filed Critical Guiyang Longmaster Information and Technology Co ltd
Priority to CN201710721518.8A priority Critical patent/CN107733732B/en
Publication of CN107733732A publication Critical patent/CN107733732A/en
Application granted granted Critical
Publication of CN107733732B publication Critical patent/CN107733732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone

Abstract

The invention belongs to the technical field of networks, and particularly relates to a method and a device for judging network conditions, wherein the method comprises the following steps: acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; and judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates. The method can be used for timely and accurately judging the network condition of the client and the network conditions of the clients of other members in the video room in the process of video chat of the user.

Description

Method and device for judging network condition
Technical Field
The invention belongs to the technical field of networks, and particularly relates to a method and a device for judging network conditions.
Background
With the development of broadband networks, the quality and the form of traditional network communication are changed, communication is not limited to common language characters any more, and friends of every party can meet each other by using video chat. Video chat is a service that uses a network to implement a two-or multi-person visual chat function. At present, the video chat function is utilized to carry out entertainment communication, video conference, remote medical treatment and the like.
The video chat brings convenience to communication among people to a great extent, and communication cost is reduced. However, since the video chat requires a better broadband network, the experience of people on the video chat is greatly limited under the condition of poor network conditions, and especially when the video chat is being performed, if the network is blocked, people in the video chat cannot quickly and accurately know which party of the network has the problem, and then the phenomenon of network blockage cannot be quickly solved, so that the experience effect of users is poor.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a method and an apparatus for determining a network status, which can be used to accurately determine the network status of a client and the network status of clients of other members in a video room in time during a video chat process of a user.
The invention mainly aims to provide a method for judging network conditions, which comprises the following steps:
acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of the client uploading the video stream to the server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in the video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room which is entered by the client user through the client;
and judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates.
In the method for determining a network status, it is preferable that the determining of the network status of the client and the network status of the client of the other member in the video room includes:
setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
comparing the first uplink packet loss rate and the downlink packet loss rate with x and y respectively to obtain a first comparison result, and judging the network condition of the client according to the first comparison result;
the judging the network status of the client according to the first comparison result comprises:
if the first uplink packet loss rate is greater than y, judging that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y, determining that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x, judging that the network condition of the client is good;
and if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y, judging that the network condition of the client is middle.
Further, the determining the network status of the client and the network status of the clients of other members in the video room further includes:
respectively comparing other uplink packet loss rates with x and y to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the judging the network conditions of the clients of other members in the video room according to the second comparison result comprises:
if the other uplink packet loss rates are larger than y, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are poor;
if the other uplink packet loss rate is less than or equal to x, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are good;
if the other uplink packet loss rates are larger than x and smaller than or equal to y, the network conditions of the clients of the other members corresponding to the uplink packet loss rate in the video room are determined to be middle.
In a preferred embodiment, the method for determining a network condition further includes: and responding to the display operation of the client user, and displaying the network condition of the client and the network conditions of the clients of other members in the video room.
Preferably, the obtaining of the first uplink packet loss rate, the downlink packet loss rate and the other uplink packet loss rates is performed once per second.
The invention also provides a device for judging network conditions, which comprises:
the acquisition module is used for acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of the client uploading the video stream to the server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in the video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room which is entered by the client user through the client;
and the judging module is used for judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates.
Preferably, the device for determining a network status includes:
the setting unit is used for setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
a first comparison unit, configured to compare the first uplink packet loss rate and the first downlink packet loss rate with x and y, respectively, to obtain a first comparison result, and determine a network status of the client according to the first comparison result;
the first comparison unit includes:
a first determining subunit, configured to determine that a network status of the client is poor if the first uplink packet loss rate is greater than y;
a second determining subunit, configured to determine that the network condition of the client is poor if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y;
a third determining subunit, configured to determine that the network status of the client is good if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x;
a fourth determining subunit, configured to determine that the network status of the client is medium if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y.
Preferably, the judging module further comprises:
the second comparison unit is used for comparing other uplink packet loss rates with x and y respectively to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the second comparison unit includes:
a fifth determining subunit, configured to determine that, if the other uplink packet loss rate is greater than y, the network conditions of the clients of the other members in the video room corresponding to the uplink packet loss rate are poor;
a sixth determining subunit, configured to determine that the network status of the client of the other member in the video room corresponding to the uplink packet loss rate is good if the uplink packet loss rate is less than or equal to x;
and a seventh determining subunit, configured to determine that the network status of the client of the other member in the video room corresponding to the uplink packet loss rate is middle if the other uplink packet loss rate is greater than x and less than or equal to y.
The device for judging the network condition preferably further comprises a display module, which is used for responding to the display operation of the client user and displaying the network condition of the client and the network conditions of the clients of other members in the video room.
The device for judging the network condition obtains the first uplink packet loss rate, the downlink packet loss rate and other uplink packet loss rates once per second.
The method for judging the network condition can timely and accurately judge the network condition of the client and the network conditions of the clients of other members in the video room in the process of video chat of the user, if the network is blocked, people in the video chat can quickly and accurately know which party of the network has the problem, so that the user can conveniently and quickly solve the phenomenon of network blockage, and the experience effect of the video chat of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings used in the description of the present invention or the prior art 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 that other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a flowchart of a method for determining a network condition according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of a first uplink packet loss rate statistical method in the method for determining a network condition shown in fig. 1.
Fig. 3 is a flowchart illustrating the method for determining a network status of the client and the network statuses of the clients of other members in the video room shown in fig. 1.
Fig. 4 is a block diagram of an apparatus for determining a network condition according to a preferred embodiment of the present invention.
Fig. 5 is a block diagram of an apparatus for determining a network condition according to another preferred embodiment of the present invention.
Fig. 6 is a block diagram of an apparatus for determining a network condition according to another preferred embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second" in the embodiments of the present invention are used to distinguish some features, which are set for convenience of understanding and are not limited in other aspects.
The method for determining the network condition as shown in fig. 1 comprises the following steps:
s101: acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of the client uploading the video stream to the server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in the video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room that the client user enters through the client.
There may be two or more members in the video room, and the number of the other uplink packet loss rates may correspond to the number of the other members in the video room, and may be one or more. The other members in the video room refer to the user members corresponding to other clients except the user member corresponding to the client. When two members in a video room perform video chat, one other member in the video room is provided, and the other uplink packet loss rate is one; when three members in a video room are in video chat, two other members in the video room are in the video chat, and the other uplink packet loss rate can be one or two; when more than three members of the video room are in video chat, more than two other members in the video room are in video chat, and the other uplink packet loss rate can be one or two or more.
As shown in fig. 2, the first uplink packet loss rate statistics method may include:
s1011: the server or the client defines a statistical period T1 of a data packet; that is, the server counts the packet loss rate once when the client sends T1 data packets;
s1012: the client numbers the sent data packets and then sends the data packets to the server according to the numbering sequence;
s1013: after receiving a data packet sent by a client, a server judges the number of the data packet; if the server receives the first data packet with the number n1, the server records the number n1 of the data packet;
s1014: when the server judges that the number of the received data packets is greater than or equal to n1+ T1-1, counting the number of the received data packets in the period, and calculating the first uplink packet loss rate in the period;
s1015: if the server judges that the number of the received data packet is more than n1+ T1-1, the received data packet is used as the start of the next statistical period; if the server judges that the number of the received data packet is equal to n1+ T1-1, the next received data packet is used as the start of the next statistical period; and calculating the first uplink packet loss rate in each period according to the circulation.
T1 may be a positive integer such as 10, 30, 55, 80, 100, 200, or 500, and the number may be a natural number in the order of 0, 1, 2, 3, or 4, starting from 0, or may be a number starting from another natural number.
Specifically, let T1 be 10, that is, the server counts the packet loss rate once every time the client sends 10 data packets; assuming that the number of the first data packet is 10 (the number of the data packet sent by the client is 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, etc.), when the server receives the data packet, the number of the data packet is recorded; and when the server judges that the number of the received data packets is greater than or equal to 19, counting the number of the received data packets, and calculating the first uplink packet loss rate in the period. If the server judges that the number of the received data packet is larger than 19, the received data packet is used as the start of the next statistical period; if the server judges that the number of the received data packet is equal to 19, taking the next received data packet as the start of the next statistical period; and calculating the first uplink packet loss rate of each period according to the circulation.
Further, taking the first period as an example, when the server receives the first data packet, the server records the number 10 of the data packet. If the server receives the data packet number 19, the server starts to count the received data packets, and if the number of the received data packets is 10, 14, 15, 17, 18, 19, the lost data packets are 11, 12, 13, 16, and the packet loss rate in the counting period is 4/10; if the server receives the data packet number 18 and then directly receives the data packet number 20, the server starts to count the received data packets, and if the number of the received data packets is 10, 14, 15, 17, and 18, the number of the lost data packets is 11, 12, 13, 16, and 19, and the packet loss rate in this counting period is 5/10.
Further, after the server receives the data packet No. 20, the server takes the received data packet as the start of the next statistical period, and when the server judges that the number of the received data packet is greater than or equal to 29, the server performs statistics on the received data packet and calculates the packet loss rate of the period. If the server receives the number 18 data packet and directly receives the number 21 data packet, the server takes the received number 21 data packet as the start of the next statistical period, and when the server judges that the number of the received data packet is greater than or equal to 30, the server performs statistics on the number of the received data packets and calculates the packet loss rate of the period. If the server receives the data packet number 30, the server starts to count the received data packets, and assuming that the numbers of the received data packets are 21, 24, 25, 27, 28, 29 and 30, the lost data packets are 22, 23 and 26, and the packet loss rate in this counting period is 3/10.
The method for counting the downlink packet loss rate may be similar to the method for counting the first uplink packet loss rate, and specifically may include:
step 1: the server or the client defines a statistical period T2 of a data packet; that is, the client side counts the packet loss rate once when the server sends T2 data packets;
step 2: the server numbers the sent data packets and then sends the data packets to the client according to the numbering sequence;
and step 3: after receiving a data packet sent by a server, a client firstly judges the number of the data packet; if the client receives the first data packet with the number n2, the client records the number n2 of the data packet;
and 4, step 4: when the client judges that the number of the received data packets is greater than or equal to n2+ T2-1, counting the number of the received data packets in the period, and calculating the first uplink packet loss rate in the period;
and 5: if the client judges that the number of the received data packet is larger than n2+ T2-1, the received data packet is used as the start of the next statistical period; if the client judges that the number of the received data packet is equal to n2+ T2-1, taking the next received data packet as the start of the next statistical period; according to the circulation, calculating the downlink packet loss rate in each period;
t2 may be a positive integer such as 10, 30, 55, 80, 100, 200, or 500, and the number may be a natural number in the order of 0, 1, 2, 3, or 4, starting from 0, or may be a number starting from another natural number.
The other uplink packet loss rates are packet loss rates of the clients of other members in the video room uploading the video streams to the server, and are counted in the process that the server receives the video streams uploaded by the clients of other members in the video room, and the counting method can be the same as the counting method of the first uplink packet loss rate, but is different from the client object.
The obtaining of the first uplink packet loss rate, the downlink packet loss rate, and the other uplink packet loss rates may specifically be that the client obtains the first uplink packet loss rate and the other uplink packet loss rates from the server, and obtains the downlink packet loss rate from the inside of the client.
S102: and judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates.
The network status of the client and the network status of other members in the video room may be divided into a good level and a poor level, or divided into a good level, a medium level and a poor level, or divided into other levels.
Specifically, a parameter m can be set, wherein m is more than 0 and less than 1;
if the first uplink packet loss rate is greater than m, judging that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to m and the downlink packet loss rate is greater than m, determining that the network condition of the client is poor;
and if the first uplink packet loss rate is less than or equal to m and the downlink packet loss rate is less than or equal to m, judging that the network condition of the client is good.
If the other uplink packet loss rates are larger than m, judging that the network conditions of other member clients corresponding to the uplink packet loss rate in the video room are poor;
and if the other uplink packet loss rate is less than or equal to m, judging that the network condition of other member clients corresponding to the uplink packet loss rate in the video room is good.
The method for judging the network condition can timely and accurately judge the network condition of the client and the network conditions of the clients of other members in the video room in the process of video chat of the user, if the network is blocked, people in the video chat can quickly and accurately know which party of the network has the problem, so that the user can conveniently and quickly solve the phenomenon of network blockage, and the experience effect of the video chat of the user is improved.
Generally, in order to more quickly and accurately determine the network status of the client and the network status of other members in the video room, the method for determining the network status is based on the method shown in fig. 1, as shown in fig. 3, where the determining the network status of the client and the network status of the client of other members in the video room includes:
s201: setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
s202: comparing the first uplink packet loss rate and the downlink packet loss rate with x and y respectively to obtain a first comparison result, and judging the network condition of the client according to the first comparison result;
the judging the network status of the client according to the first comparison result comprises:
if the first uplink packet loss rate is greater than y, judging that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y, determining that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x, judging that the network condition of the client is good;
and if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y, judging that the network condition of the client is middle.
Further, as shown in fig. 3, the determining the network status of the client and the network status of the clients of other members in the video room further includes:
s203: respectively comparing other uplink packet loss rates with x and y to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the judging the network conditions of the clients of other members in the video room according to the second comparison result comprises:
and if the other uplink packet loss rates are greater than y, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are poor.
And if the other uplink packet loss rate is less than or equal to x, judging that the network conditions of the clients of the other members corresponding to the uplink packet loss rate in the video room are good.
If the other uplink packet loss rates are larger than x and smaller than or equal to y, the network conditions of the clients of the other members corresponding to the uplink packet loss rate in the video room are determined to be middle.
The method for judging the network condition based on fig. 1 further includes: and responding to the display operation of the client user, and displaying the network condition of the client and the network conditions of the clients of other members in the video room.
After judging the network status of the client and the network status of the clients of other members in the video room, directly displaying the network status of the client and the network status of the clients of other members in the video room; the client user may also perform a display operation when the client user finds the network comparison checkpoint, and display the network status of the client and the network status of the clients of other members in the video room in order to respond to the display operation of the client user. The latter can avoid influencing the video communication among users due to frequent display of the network condition under the condition of better network condition.
Based on the method for determining a network condition shown in fig. 1, preferably, the obtaining of the first uplink packet loss rate, the downlink packet loss rate, and the other uplink packet loss rates is performed once per second. Of course, the frequency for obtaining the first uplink packet loss rate, the downlink packet loss rate, and other uplink packet loss rates may also be obtained once per minute, once every 0.5 second, or other frequencies. And the first uplink packet loss rate, the downlink packet loss rate and other uplink packet loss rates are obtained once every second, so that the real-time performance of monitoring the network quality can be ensured, and the network is not influenced by frequently obtaining the first uplink packet loss rate, the downlink packet loss rate and other uplink packet loss rates.
The method for determining the network status according to the present invention is described below as an example in conjunction with a scenario in which a doctor and a patient perform a telemedicine via the internet. The video room of the embodiment of the present invention has only one doctor and one patient.
The method for judging the network condition by the doctor client comprises the following steps:
s301: acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates once every second; the first uplink packet loss rate is the packet loss rate of the doctor client for uploading the video stream to the server, the downlink packet loss rate is the packet loss rate of the doctor client for downloading the video stream of the patient member in the video room from the server, and the other uplink packet loss rates are the packet loss rates of the client of the patient member in the video room for uploading the video stream to the server; the video room is a virtual video room which is entered by the doctor client user through the doctor client;
s302: setting parameters x and y, wherein x is 1% and y is 5%;
s303: comparing the first uplink packet loss rate and the first downlink packet loss rate with x and y respectively;
s304: if the first uplink packet loss rate is greater than y, judging that the network condition of the doctor client is poor; if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y, judging that the network condition of the doctor client is poor; if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x, judging that the network condition of the doctor client is good; if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y, judging that the network condition of the doctor client is middle;
s305: comparing other uplink packet loss rates with x and y respectively;
s306: if the other uplink packet loss rates are larger than y, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are poor; if the other uplink packet loss rate is less than or equal to x, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are good; if the other uplink packet loss rates are larger than x and smaller than or equal to y, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rates in the video room are in the middle;
s307: and responding to the display operation of the doctor user, and displaying the network condition of the doctor client and the network condition of the patient client in the video room.
According to the embodiment of the invention, when a doctor and a patient carry out remote medical treatment, the network condition of the doctor client and the network condition of the patient client in a video room can be timely and accurately judged, if the network is blocked, the doctor can more quickly and accurately know which party of the network has the problem, so that the doctor user can conveniently and quickly solve the phenomenon of network blockage, and the remote medical effect of the doctor user is improved.
An embodiment of the present invention further provides a device for determining a network status, as shown in fig. 4, where the device includes:
the acquisition module is used for acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of the client uploading the video stream to the server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in the video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room which is entered by the client user through the client;
and the judging module is used for judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates.
The device for judging the network condition of the embodiment of the invention can be used for realizing the method for judging the network condition shown in figure 1, and can timely and accurately judge the network condition of a client and the network conditions of the clients of other members in a video room in the process of video chat of a user.
The apparatus for determining a network condition may further include a packet loss rate statistics module, as shown in fig. 5, which specifically includes:
a first defining unit, which is used for defining a statistic period T1 of a data packet by the server or the client; that is, the server counts the packet loss rate once when the client sends T1 data packets;
the first numbering unit is used for numbering the sent data packets by the client and then sending the data packets to the server according to the numbering sequence;
the first recording unit is used for judging the serial number of the data packet after the server receives the data packet sent by the client; if the server receives the first data packet with the number n1, the server records the number n1 of the data packet;
the first calculating unit is used for counting the number of the received data packets in the period and calculating the first uplink packet loss rate in the period when the server judges that the number of the received data packets is greater than or equal to n1+ T1-1;
the first computing unit is further configured to, if the server determines that the number of the received data packet is greater than n1+ T1-1, use the received data packet as the start of the next statistical period; if the server judges that the number of the received data packet is equal to n1+ T1-1, the next received data packet is used as the start of the next statistical period; and calculating the first uplink packet loss rate in each period according to the circulation.
As shown in fig. 5, the packet loss rate statistics module further includes:
the second defining unit is also used for defining a statistical period T2 of a data packet by the server or the client; that is, the client side counts the packet loss rate once when the server sends T2 data packets;
the second numbering unit is also used for numbering the sent data packets by the server and then sending the data packets to the client according to the numbering sequence;
the second recording unit is used for judging the serial number of the data packet after the client receives the data packet sent by the server; if the client receives the first data packet with the number n2, the client records the number n2 of the data packet;
the second calculating unit is used for counting the number of the received data packets in the period and calculating the first uplink packet loss rate in the period when the client judges that the number of the received data packets is greater than or equal to n2+ T2-1;
the second computing unit is further configured to, if the client determines that the number of the received data packet is greater than n2+ T2-1, use the received data packet as the start of the next statistical period; if the client judges that the number of the received data packet is equal to n2+ T2-1, taking the next received data packet as the start of the next statistical period; and calculating the downlink packet loss rate in each period according to the circulation.
In general, in order to more quickly and accurately determine the network status of the client and the network status of other members in the video room, in the apparatus for determining the network status, as shown in fig. 6, the determining module includes:
the setting unit is used for setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
a first comparison unit, configured to compare the first uplink packet loss rate and the first downlink packet loss rate with x and y, respectively, to obtain a first comparison result, and determine a network status of the client according to the first comparison result;
the first comparison unit includes:
a first determining subunit, configured to determine that a network status of the client is poor if the first uplink packet loss rate is greater than y;
a second determining subunit, configured to determine that the network condition of the client is poor if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y;
a third determining subunit, configured to determine that the network status of the client is good if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x;
a fourth determining subunit, configured to determine that the network status of the client is medium if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y.
Further, as shown in fig. 6, the determining module further includes:
the second comparison unit is used for comparing other uplink packet loss rates with x and y respectively to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the second comparison unit includes:
and a fifth determining subunit, configured to determine that the network conditions of the clients of the other members in the video room corresponding to the uplink packet loss rate are poor if the uplink packet loss rate is greater than y.
And a sixth determining subunit, configured to determine that the network condition of the client of the other member in the video room corresponding to the uplink packet loss rate is good if the uplink packet loss rate is less than or equal to x.
And a seventh determining subunit, configured to determine that the network status of the client of the other member in the video room corresponding to the uplink packet loss rate is middle if the other uplink packet loss rate is greater than x and less than or equal to y.
Further, as shown in fig. 6, the apparatus for determining a network status further includes a display module, configured to respond to a display operation of a user at the client, and display the network status of the client and the network status of the clients of other members in the video room.
The device for judging the network condition obtains the first uplink packet loss rate, the downlink packet loss rate and other uplink packet loss rates once per second.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a terminal device (which may be a mobile phone, a personal computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be integrated into one body, or may be separately deployed; the sub-modules can be combined into one module, or can be further split into a plurality of sub-modules.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (10)

1. A method for determining a network condition, comprising the steps of:
acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of a client uploading a video stream to a server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in a video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room which is entered by the client user through the client;
judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, downlink packet loss rate and other uplink packet loss rates;
the method for counting the first uplink packet loss rate comprises the following steps:
the server or the client defines a statistical period T1 of a data packet; that is, the server counts the packet loss rate once when the client sends T1 data packets;
the client numbers the sent data packets and then sends the data packets to the server according to the numbering sequence;
after receiving a data packet sent by a client, a server judges the number of the data packet; if the server receives the first data packet with the number n1, the server records the number n1 of the data packet;
when the server judges that the number of the received data packets is greater than or equal to n1+ T1-1, counting the number of the received data packets in the period, and calculating the first uplink packet loss rate in the period;
if the server judges that the number of the received data packet is more than n1+ T1-1, the received data packet is used as the start of the next statistical period; if the server judges that the number of the received data packet is equal to n1+ T1-1, the next received data packet is used as the start of the next statistical period; and calculating the first uplink packet loss rate in each period according to the circulation.
2. The method of claim 1, wherein determining the network status of the client and the network status of the clients of other members in the video room comprises:
setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
comparing the first uplink packet loss rate and the downlink packet loss rate with x and y respectively to obtain a first comparison result, and judging the network condition of the client according to the first comparison result;
the judging the network status of the client according to the first comparison result comprises:
if the first uplink packet loss rate is greater than y, judging that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y, determining that the network condition of the client is poor;
if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x, judging that the network condition of the client is good;
and if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y, judging that the network condition of the client is middle.
3. The method of claim 2, wherein determining the network status of the client and the network status of the clients of other members in the video room further comprises:
respectively comparing other uplink packet loss rates with x and y to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the judging the network conditions of the clients of other members in the video room according to the second comparison result comprises:
if the other uplink packet loss rates are larger than y, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are poor;
if the other uplink packet loss rate is less than or equal to x, judging that the network conditions of the clients of other members corresponding to the uplink packet loss rate in the video room are good;
if the other uplink packet loss rates are larger than x and smaller than or equal to y, the network conditions of the clients of the other members corresponding to the uplink packet loss rate in the video room are determined to be middle.
4. The method of determining network conditions of claim 1, further comprising: and responding to the display operation of the client user, and displaying the network condition of the client and the network conditions of the clients of other members in the video room.
5. The method according to claim 1, wherein the obtaining of the first uplink packet loss rate, the downlink packet loss rate, and the other uplink packet loss rates is performed every second.
6. An apparatus for determining a network condition, comprising:
the acquisition module is used for acquiring a first uplink packet loss rate, a downlink packet loss rate and other uplink packet loss rates; the first uplink packet loss rate is the packet loss rate of a client uploading a video stream to a server, the downlink packet loss rate is the packet loss rate of the client downloading the video streams of other members in a video room from the server, and the other uplink packet loss rates are the packet loss rates of the client uploading the video streams of other members in the video room to the server; the video room is a virtual video room which is entered by the client user through the client; the method for counting the first uplink packet loss rate comprises the following steps:
the server or the client defines a statistical period T1 of a data packet; that is, the server counts the packet loss rate once when the client sends T1 data packets;
the client numbers the sent data packets and then sends the data packets to the server according to the numbering sequence;
after receiving a data packet sent by a client, a server judges the number of the data packet; if the server receives the first data packet with the number n1, the server records the number n1 of the data packet;
when the server judges that the number of the received data packets is greater than or equal to n1+ T1-1, counting the number of the received data packets in the period, and calculating the first uplink packet loss rate in the period;
if the server judges that the number of the received data packet is more than n1+ T1-1, the received data packet is used as the start of the next statistical period; if the server judges that the number of the received data packet is equal to n1+ T1-1, the next received data packet is used as the start of the next statistical period; according to the circulation, the first uplink packet loss rate in each period is calculated
And the judging module is used for judging the network condition of the client and the network conditions of the clients of other members in the video room according to the acquired first uplink packet loss rate, the acquired downlink packet loss rate and the acquired other uplink packet loss rates.
7. The apparatus for determining network condition according to claim 6, wherein the determining module comprises:
the setting unit is used for setting parameters x and y, wherein x is more than 0 and less than y and less than 1;
a first comparison unit, configured to compare the first uplink packet loss rate and the first downlink packet loss rate with x and y, respectively, to obtain a first comparison result, and determine a network status of the client according to the first comparison result;
the first comparison unit includes:
a first determining subunit, configured to determine that a network status of the client is poor if the first uplink packet loss rate is greater than y;
a second determining subunit, configured to determine that the network condition of the client is poor if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than y;
a third determining subunit, configured to determine that the network status of the client is good if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is less than or equal to x;
a fourth determining subunit, configured to determine that the network status of the client is medium if the first uplink packet loss rate is less than or equal to y and the downlink packet loss rate is greater than x and less than or equal to y.
8. The apparatus for determining network conditions of claim 7, wherein the determining module further comprises:
the second comparison unit is used for comparing other uplink packet loss rates with x and y respectively to obtain a second comparison result, and judging the network conditions of the client sides of other members in the video room according to the second comparison result;
the second comparison unit includes:
a fifth determining subunit, configured to determine that, if the other uplink packet loss rate is greater than y, the network conditions of the clients of the other members in the video room corresponding to the uplink packet loss rate are poor;
a sixth determining subunit, configured to determine that the network status of the client of the other member in the video room corresponding to the uplink packet loss rate is good if the uplink packet loss rate is less than or equal to x;
and a seventh determining subunit, configured to determine that the network status of the client of the other member in the video room corresponding to the uplink packet loss rate is middle if the other uplink packet loss rate is greater than x and less than or equal to y.
9. The apparatus for determining network status as claimed in claim 6, further comprising a display module for displaying the network status of the client and the network status of the client of other members in the video room in response to the display operation of the client user.
10. The apparatus according to claim 6, wherein the first uplink packet loss rate, the downlink packet loss rate and other uplink packet loss rates are obtained once per second.
CN201710721518.8A 2017-08-22 2017-08-22 Method and device for judging network condition Active CN107733732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710721518.8A CN107733732B (en) 2017-08-22 2017-08-22 Method and device for judging network condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710721518.8A CN107733732B (en) 2017-08-22 2017-08-22 Method and device for judging network condition

Publications (2)

Publication Number Publication Date
CN107733732A CN107733732A (en) 2018-02-23
CN107733732B true CN107733732B (en) 2021-03-05

Family

ID=61204700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710721518.8A Active CN107733732B (en) 2017-08-22 2017-08-22 Method and device for judging network condition

Country Status (1)

Country Link
CN (1) CN107733732B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110197447B (en) * 2019-04-17 2022-09-30 哈尔滨沥海佳源科技发展有限公司 Communication index based online education method and device, electronic equipment and storage medium
CN111669468B (en) * 2020-06-05 2021-10-29 平安科技(深圳)有限公司 Network state display method and device in call process, computer equipment and medium
CN112135119A (en) * 2020-09-11 2020-12-25 上海七牛信息技术有限公司 Method and system for automatically monitoring and alarming network condition in real-time audio and video communication

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024868A (en) * 2014-04-17 2015-11-04 北京视联动力国际信息技术有限公司 Network quality detection method and network quality detection system for video Internet
CN105703977A (en) * 2016-04-29 2016-06-22 腾讯科技(深圳)有限公司 Audio/video quality monitoring method, device and system
CN106385374A (en) * 2016-08-17 2017-02-08 武汉精伦电气有限公司 Transmission control method and system of local area network transmitting terminal for relieving network congestion
CN106888104A (en) * 2015-12-15 2017-06-23 杭州华为企业通信技术有限公司 A kind of the Internet telephone calls method, relevant device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9948889B2 (en) * 2014-07-04 2018-04-17 Telefonaktiebolaget Lm Ericsson (Publ) Priority of uplink streams in video switching

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024868A (en) * 2014-04-17 2015-11-04 北京视联动力国际信息技术有限公司 Network quality detection method and network quality detection system for video Internet
CN106888104A (en) * 2015-12-15 2017-06-23 杭州华为企业通信技术有限公司 A kind of the Internet telephone calls method, relevant device and system
CN105703977A (en) * 2016-04-29 2016-06-22 腾讯科技(深圳)有限公司 Audio/video quality monitoring method, device and system
CN106385374A (en) * 2016-08-17 2017-02-08 武汉精伦电气有限公司 Transmission control method and system of local area network transmitting terminal for relieving network congestion

Also Published As

Publication number Publication date
CN107733732A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
EP2767039B1 (en) Quality of user experience testing for video transmissions
CN105163134B (en) Video coding parameter setting method, device and the video encoder of live video
US9419875B2 (en) Video quality assessment method and apparatus
CN110881144B (en) Data processing method based on live broadcast platform and related equipment
CN107733732B (en) Method and device for judging network condition
CN106161219B (en) Message treatment method and device
CN106331739B (en) Live broadcasting method, equipment, server, system and live state monitoring method
CN106993234A (en) Barrage display methods and device
CN108347580B (en) Method for processing video frame data and electronic equipment
EP3606050A1 (en) Video frame coding method, terminal, and storage medium
CN109168013B (en) Method, device and equipment for extracting frame and computer readable storage medium
CN103916367A (en) Method and apparatus for transmission of multimedia data
CN106604078B (en) A kind of network video recommended method and device
CN105262699A (en) Network adaptive coding adjustment method and device
CN111669468B (en) Network state display method and device in call process, computer equipment and medium
CN112738538B (en) Live broadcasting room on-hook behavior detection method and device, electronic equipment and computer readable storage medium
CN104270649A (en) Image encoding device and image encoding method
EP4161013A1 (en) Video data processing method and apparatus, and electronic device
CN106911926B (en) A kind of video code rate recognition methods and device
CN109392002A (en) A kind of method and apparatus of report network performance parameter
US10044833B2 (en) Data processing method and apparatus used for terminal application
US20150358378A1 (en) Method and apparatus for adjusting streaming media data transmission
CN107147583A (en) A kind of intelligent assistance processing method and intelligent assistance processing wireless router
CN105703977A (en) Audio/video quality monitoring method, device and system
CN105992280B (en) A kind of data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180223

Assignee: Guiyang Longma Video Technology Co.,Ltd.

Assignor: GUIYANG LONGMASTER INFORMATION & TECHNOLOGY Co.,Ltd.

Contract record no.: X2022520000003

Denomination of invention: A method and device for judging network condition

Granted publication date: 20210305

License type: Common License

Record date: 20220302

Application publication date: 20180223

Assignee: GUIYANG SANJIU INTERNET MEDICAL Co.,Ltd.

Assignor: GUIYANG LONGMASTER INFORMATION & TECHNOLOGY Co.,Ltd.

Contract record no.: X2022520000002

Denomination of invention: A method and device for judging network condition

Granted publication date: 20210305

License type: Common License

Record date: 20220301

EE01 Entry into force of recordation of patent licensing contract