CN111130948A - Network quality detection method and device - Google Patents

Network quality detection method and device Download PDF

Info

Publication number
CN111130948A
CN111130948A CN201911403121.XA CN201911403121A CN111130948A CN 111130948 A CN111130948 A CN 111130948A CN 201911403121 A CN201911403121 A CN 201911403121A CN 111130948 A CN111130948 A CN 111130948A
Authority
CN
China
Prior art keywords
network
data
detection
browser
data acquisition
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.)
Pending
Application number
CN201911403121.XA
Other languages
Chinese (zh)
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201911403121.XA priority Critical patent/CN111130948A/en
Publication of CN111130948A publication Critical patent/CN111130948A/en
Pending legal-status Critical Current

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
    • 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
    • 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/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to the technical field of data communication, and provides a network quality detection method and device. The network quality detection method comprises the following steps: starting a detection script embedded in a service page when the service page of the network service is loaded by a browser; the detection script instructs the browser to establish network connection with the data acquisition server; the detection script collects network quality detection data and sends the network quality detection data to the data collection server through network connection. The method has at least two beneficial effects: firstly, a detection script is executed by a browser on terminal equipment, so that end-to-end detection can be realized, and a detection result accurately reflects the network quality which can be felt by a user; secondly, a special detection client does not need to be installed on the terminal equipment, and the detection method is non-invasive to users and very convenient to implement.

Description

Network quality detection method and device
Technical Field
The present application relates to the field of data communication technologies, and in particular, to a method and an apparatus for detecting network quality.
Background
With the rapid development of computer and internet technologies, internet users are growing rapidly and the demand for network quality is also increasing. Under the premise, network quality detection technology is gradually gaining attention, because it is more beneficial to effectively detect network quality to provide network users with high-quality network services.
In the prior art, there are two main ways to detect network quality: one way is to deploy a detection tool on the server and detect according to the IP address of the user, but due to the complexity of the network structure, this way can only detect the network quality on the main network points in the network, and cannot obtain the network quality at the user terminal; the other method is to install a detection client on the user terminal and use the detection client to perform network detection on the server, and although the network quality data obtained by the method is accurate, it is very difficult to install the detection client on the user terminal.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method and an apparatus for detecting network quality to solve the above technical problem.
In order to achieve the above purpose, the present application provides the following technical solutions:
in a first aspect, an embodiment of the present application provides a network quality detection method, including: starting a detection script embedded in a service page of a network service when the service page is loaded by a browser; the detection script instructs the browser to establish network connection with a data acquisition server; the detection script collects network quality detection data and sends the network quality detection data to the data collection server through the network connection.
The working principle of the network quality detection method is as follows: the method comprises the steps that a detection script with a detection function is embedded into a service page of the network service, a user accesses the service page (thereby using the network service) through a browser installed on terminal equipment, the detection script is executed by the browser when the service page is loaded, the browser is indicated by the detection script when the detection script runs to establish network connection with a data acquisition server, and the acquired data are reported, so that the function of detecting the network quality is realized.
The method has the advantages over the prior art that: firstly, a detection script is executed by a browser, so that end-to-end (from a terminal device used by a user to a server providing a network server) detection can be realized, and a detection result accurately reflects the network quality which can be felt by the user; secondly, a special detection client does not need to be installed on the terminal equipment, and the detection method is non-invasive to users and very convenient to implement.
In a possible implementation manner of the first aspect, the network connection is a WebSocket connection.
In the above implementation manner, the network connection adopts a WebSocket connection, which is a protocol that starts to be provided by HTML5 and performs full-duplex communication on a single TCP connection, and the main features of the WebSocket connection include: firstly, WebSocket is a persistence protocol, once WebSocket connection is established, both sides can continuously transmit data; secondly, WebSocket uses full duplex communication, in particular to allow a server to push messages to a client. The above characteristics are all very suitable for the application scenario of the network quality detection method in the application.
In a possible implementation manner of the first aspect, the acquiring, by the probe script, network quality probe data includes: and the detection script acquires page access performance data recorded when the browser accesses the service page, and takes the page access performance data as the acquired network quality detection data.
At present, some mainstream browsers record page access performance data when accessing a service page, for example, the browsers record the data in a performance object, and a detection script can directly acquire corresponding data from the performance object as network quality detection data without independently executing detection by itself.
In one possible implementation manner of the first aspect, the page access performance data includes at least one of: the method comprises the following steps of obtaining DNS query time of the browser accessing the service page, network connection establishment time of the browser and a service server providing the network service, service request time sent to the service server by the browser, response message time of the browser receiving the service request from the service server, loading time of the service page and execution time of the service page.
In a possible implementation manner of the first aspect, the acquiring, by the detection script, network quality detection data, and sending the network quality detection data to the data acquisition server through the network connection includes: and the detection script acquires network quality detection data after receiving a data acquisition instruction sent by the data acquisition server, and sends the network quality detection data to the data acquisition server through the network connection.
The detection script has at least two modes for network quality detection: firstly, after network connection is established, detection is carried out according to rules preset in a script, and network quality detection data are reported; and secondly, after receiving a data acquisition instruction sent by the data acquisition server, detecting in real time and reporting network quality detection data. Certainly, the two modes can be performed alternatively or simultaneously, for example, the detection script performs detection every 5 minutes according to a preset rule, but the data acquisition server considers that the data of a certain user is worth attention at a certain time, and can issue a data acquisition instruction to the detection script on the terminal device where the user is located, and instruct the user to acquire the data in real time and report the data.
In a second aspect, an embodiment of the present application provides a network quality detection method, including: the data acquisition server establishes network connection with a browser loading a service page of the network service; a detection script is embedded in the service page, and the detection script is executed when the service page is loaded by the browser; and the data acquisition server receives the network quality detection data sent by the detection script through the network connection.
In a possible implementation manner of the second aspect, the establishing, by the data collection server, a network connection with a browser that loads a service page of a network service includes: and the data acquisition server judges whether the conditions for establishing the network connection are met or not according to the pre-configured data acquisition parameters, and if the conditions are met, the data acquisition server establishes the network connection with the browser.
In the implementation manner, the data acquisition server is allowed to be pre-configured with data acquisition parameters, some restrictions are made on the process of establishing the network connection, and the data acquisition server agrees to establish the network connection with the browser only when certain conditions are met. After all, establishing a large number of network connections occupies a large amount of resources of the data acquisition server, and connections that have exceeded acquisition requirements do not necessarily agree to their establishment.
In a possible implementation manner of the second aspect, the data acquisition parameter includes a total number of online acquisition users, and the data acquisition server determines whether a condition for establishing a network connection is satisfied according to a preconfigured data acquisition parameter, and if the condition is satisfied, the network connection is established with the browser, including: the data acquisition server acquires the total number of the established network connections; and if the data acquisition server determines that the total number of the established network connections is less than the total number of the online acquisition users, establishing the network connections with the browser.
In the above implementation manner, whenever a network connection between a browser and a data acquisition server is established, counting is performed on the data acquisition server, and if the total number of the established network connections reaches the preset total number of online acquisition users, it indicates that the acquisition requirement of the network quality detection data has been met, it is not necessary to agree to establish a new network connection.
In a possible implementation manner of the second aspect, the receiving, by the data acquisition server, network quality detection data sent by a detection script through the network connection includes: the data acquisition server sends a data acquisition instruction to the detection script; and the data acquisition server receives the network quality detection data acquired by the detection script according to the data acquisition instruction through the network connection.
In a third aspect, an embodiment of the present application provides a network quality detection apparatus, including: the script starting module is used for starting a detection script embedded in a service page of the network service when the service page is loaded by a browser; the first connection establishing module is used for indicating the browser to establish network connection with the data acquisition server by the detection script; and the network quality detection module is used for acquiring network quality detection data by the detection script and sending the network quality detection data to the data acquisition server through the network connection.
In a fourth aspect, an embodiment of the present application provides a network quality detection apparatus, including: the second connection establishing module is used for establishing network connection between the data acquisition server and a browser for loading a service page of the network service; a detection script is embedded in the service page, and the detection script is executed when the service page is loaded by the browser; and the detection data collection module is used for receiving the network quality detection data sent by the detection script through the network connection by the data acquisition server.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory stores computer program instructions, and when the computer program instructions are read and executed by the processor, the electronic device executes a method provided by any one of possible implementation manners of the first aspect, the second aspect, or both aspects.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are read and executed by a processor, the computer program instructions perform a method provided by any one of the possible implementation manners of the first aspect, the second aspect, or both aspects.
In order to make the aforementioned objects, technical solutions and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is an interaction diagram illustrating a network quality detection method provided by an embodiment of the present application;
fig. 2 is a functional block diagram of a network quality detection apparatus according to an embodiment of the present application;
fig. 3 is a functional block diagram of another network quality detection apparatus provided in an embodiment of the present application;
fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the comparative example, there are two main ways to detect the network quality: the first way is to deploy a probing tool (e.g., ping, traceroute, etc.) on the server and probe according to the user's IP address; the second method is to install special detection client software on the user terminal and use the detection client to perform network detection on the server.
The inventor finds that the two modes have some defects through long-term research: in the first method, due to the complexity of the network structure, usually only the network quality at the main network points (network points refer to network devices such as routers and switches) in the network can be detected, and the network quality at the user terminal cannot be obtained, and the accuracy of the detection result is not high. Although the second method can obtain more accurate network quality data, the prerequisite is that a detection client must be installed on a user terminal, which is very difficult to implement in practice, resulting in a solution with low practical value.
The above-mentioned defects existing in the comparative example are the results obtained after the inventor has practiced and studied carefully, and therefore, the discovery process of the above-mentioned problems and the solution proposed by the following embodiments of the present application to the above-mentioned problems should be the contribution of the inventor to the present invention in the process of invention.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
It is noted that, in the description of the present application, the terms "first", "second", and the like are used solely to distinguish one entity or action from another entity or action without necessarily being construed as indicating or implying any relative importance or order between such entities or actions.
Fig. 1 shows an interaction diagram of a network quality detection method provided in an embodiment of the present application. Referring to fig. 1, the implementation of the network quality detection method mainly depends on the interaction among three devices, namely a terminal device, a service server and a data acquisition server. The terminal device may be a computer, a mobile phone, etc. used by a user to generate network quality detection data, the service server is used to run a network service (such as a Web service) to be detected, and the data acquisition server is used to collect the network quality detection data and perform subsequent analysis processing. The data acquisition server and the service server may be the same server or not, and if the data acquisition server and the service server are the same server, the server can be understood to have two functions of detecting network quality and providing network service. The steps in fig. 1 are described in detail below:
step S100: the browser accesses a service page of the web service.
Step S101: a probe script embedded in the service page is launched.
The above two steps are described in combination. The service page of the web service to be detected is embedded with a detection script generated in advance, for example, the detection script can be a JavaScript script. In one implementation, the probe script may be generated on a data acquisition server, a developer configures data acquisition parameters, such as URL address of a network service, frequency of network probe, mode of network probe, total number of online acquisition users (the purpose of the parameters is described in detail later), and the data acquisition server automatically generates the probe script according to some or all of the data acquisition parameters. Then, the developer can embed the detection script into the service page, and the embedding mode can be either directly embedding the code of the detection script or embedding the URL address of the detection script; in the latter method, the URL address of the probe script may be generated together with the generation of the probe script, and at this time, the script file of the probe script may still be stored on the data collection server.
The terminal equipment used by the user is provided with a browser, and when the user needs to use a network service, the browser on the terminal equipment can be used for accessing a service page. During the process of loading the service page by the browser, the probe script embedded in the page is started and executed by the browser, so as to implement the network quality probe function (including at least the functions described in steps S102 to S104) predefined in the script.
Step S102: the detection script instructs the browser to establish a network connection with the data acquisition server.
The basic way for the detection script to implement network quality detection is to collect data and report the data to the data collection server (specifically described in steps S103 and S104), and to implement data reporting, first, a network connection needs to be established between the browser and the data collection server.
In one implementation, the network connection may be a WebSocket connection. WebSocket is a protocol which is provided by HTML5 and is used for carrying out full-duplex communication on a single TCP connection, and the WebSocket is mainly characterized by comprising the following steps: firstly, WebSocket is a persistence protocol, once WebSocket connection is established, both sides can continuously transmit data; secondly, WebSocket uses full duplex communication, in particular to allow a server to push messages to a client. In the present application, the detection script may continuously send data to the data acquisition server, and the data acquisition server may also issue a data acquisition command (described later) to the detection script, so that the above-mentioned features of the WebSocket connection are very suitable for the network quality detection method in the present application.
One possible procedure for network connection establishment is: the browser sends a request for establishing connection to a data acquisition server; the data acquisition server returns a response message aiming at the connection establishment request to the browser; and after receiving the response message, the browser establishes network connection with the data acquisition server.
Because the establishment of the network connection inevitably consumes resources of the data acquisition server, the process of establishing the network connection is often limited in the implementation of the data acquisition server, and the data acquisition server agrees to establish the network connection with the browser only when certain conditions are met, so that the server resource is prevented from being exhausted due to the establishment of a large number of connections.
In an alternative, the data collection server may determine whether a condition for establishing a network connection is satisfied according to some data collection parameters (mentioned in the introduction of step S100), and if the condition is satisfied, the data collection server establishes a network connection with the browser, otherwise, the data collection server refuses to establish a network connection with the browser. For example, the data acquisition server may attach the determination result to a response message sent to the browser, and the browser may parse the content of the message after receiving the response message, and establish a network connection with the data acquisition server if the determination result attached to the message indicates that the data acquisition server agrees to the connection establishment request, or not establish a network connection with the data acquisition server.
The total number of online collection users in the data collection parameter is taken as an example, and the parameter means the total number of users which are allowed to participate in the network quality detection at most at a certain moment. Every time when the network connection between the browser on a terminal device and the data acquisition server is established (which is equivalent to a user participating in the network quality detection), counting and updating are carried out on the data acquisition server, the total number of the established network connections is accumulated to 1, if the total number of the established network connections reaches the total number of the online acquisition users, the users participating in the network quality detection are enough to meet the preset data acquisition requirement, and at the moment, the establishment of new network connection is not required to be agreed; if the total number of the established network connections does not reach the total number of the online collection users, the data collection server can agree to establish a new network connection.
Step S103: the detection script collects network quality detection data.
Step S104: the detection script sends network quality detection data to the data acquisition server through the established network connection.
The above two steps are described in combination. After the browser and the data acquisition server establish network connection, the detection script can acquire network quality detection data according to a mode set in the script and report the data to the data acquisition server, and the data acquisition server can perform subsequent operations such as storage, analysis, processing and display after receiving the data, namely, the expected function of network quality detection is realized.
The network quality probing data may refer to data describing the network quality of a user when accessing a network service to be probed. In one implementation, the network quality detection data may be obtained by independently detecting the network service by the detection script, or in another implementation, the detection script may also obtain page access performance data recorded when the browser accesses the service page, and send the page access performance data pair as the acquired network quality detection data to the data acquisition server, where the detection script does not perform independent detection itself.
The latter is briefly described below: at present, some mainstream browsers can generate and store page access performance data when accessing a service page, and the content of the page access performance data is some performance parameters recorded or calculated in the process of accessing the service page by the browser and is used for representing the network quality experienced by a user. For example, some browsers may record the data in a performance object, and the probe script may directly obtain corresponding data from the performance object as network quality probe data without independently performing probing itself.
In some implementations of the browser, the page access performance data may include at least one of: the method includes the steps of obtaining a DNS query duration of a browser accessing a service page, a network connection setup duration of the browser and a service server providing a network service, a duration of a service request sent by the browser to the service server, a duration of a response message received by the browser from the service server to the service request, a loading duration of the service page, and an execution duration of the service page, which certainly does not exclude other data items. The detection script may obtain all the page access performance data, may also obtain part of the page access performance data as the network quality detection data, or may also perform certain processing on the page access performance data to be used as the network quality detection data.
As mentioned above, the detection script may be generated according to data acquisition parameters pre-configured on the data acquisition server, so that the generated detection script may perform detection in a manner specified in the parameters. For example, the frequency of network probing, which indicates how often a probing script performs probing (i.e., data acquisition); also for example, a mode of network probing, the parameter indicates in which mode the probing script performs probing, e.g., probing only once, periodically probing over a period of time, periodically probing permanently, probing at a specified time or times, etc.
What has been explained above is the detection behavior of the detection script according to its own logic, for example, network quality detection data is collected every 5 minutes according to the code logic of the script and reported, but in some implementations, the detection script can also perform real-time detection under the instruction of the data collection server: for example, the data acquisition server considers that data of a certain user is worth attention at a certain time, a data acquisition instruction can be issued to a detection script on the terminal equipment where the user is located through network connection, the detection script acquires network quality detection data in real time after receiving the data acquisition instruction, and the acquired data is reported to the data acquisition server.
The above two working modes of the detection script can be alternatively performed, or can be simultaneously performed: for example, the detection script may collect and report network quality detection data every 5 minutes according to the code logic, but may also respond to a data collection instruction issued by the data collection server, and detect and report data when the time point of the periodic data collection is not reached.
To sum up, the working principle of the network quality detection method provided by the embodiment of the present application is as follows: the method comprises the steps that a detection script with a detection function is embedded into a service page of the network service, a user accesses the service page (thereby using the network service) through a browser installed on terminal equipment, the detection script is started and executed by the browser when the service page is loaded, the browser is indicated to establish network connection with a data acquisition server when the detection script runs, and after the connection is established, the detection script acquires network quality detection data and reports the network quality detection data to the data acquisition server.
The main advantages of this method over the existing methods are: firstly, a detection script is executed by a browser, so that end-to-end (from a terminal device used by a user to a server providing a network server) detection can be realized, a detection result accurately reflects the network quality which can be felt by the user, and the data value is high; secondly, a special detection client does not need to be installed on the terminal equipment, because the detection script is embedded into the service page and is automatically executed when the page is loaded, the user does not directly perceive the detection script, and therefore the detection method is non-invasive to the user, very convenient to implement and high in practicability.
Fig. 2 shows a functional block diagram of a network quality detection apparatus 200 according to an embodiment of the present application. The device includes:
the script starting module 210 is configured to start a probe script embedded in a service page of a web service when the service page is loaded by a browser;
a first connection establishing module 220, configured to instruct, by the detection script, the browser to establish a network connection with a data acquisition server;
a network quality detection module 230, configured to collect network quality detection data by the detection script, and send the network quality detection data to the data collection server through the network connection.
In an implementation manner of the network quality detection apparatus 200, the network connection is a WebSocket connection.
In one implementation of the network quality detection apparatus 200, the detection script in the network quality detection module 230 collects network quality detection data, including: and the detection script acquires page access performance data recorded when the browser accesses the service page, and takes the page access performance data as the acquired network quality detection data.
In one implementation of the network quality detection apparatus 200, the page access performance data includes at least one of: the method comprises the following steps of obtaining DNS query time of the browser accessing the service page, network connection establishment time of the browser and a service server providing the network service, service request time sent to the service server by the browser, response message time of the browser receiving the service request from the service server, loading time of the service page and execution time of the service page.
In one implementation of the network quality detection apparatus 200, the detecting script in the network quality detection module 230 collects network quality detection data and sends the network quality detection data to the data collection server through the network connection, including: and the detection script acquires network quality detection data after receiving a data acquisition instruction sent by the data acquisition server, and sends the network quality detection data to the data acquisition server through the network connection.
The network quality detection apparatus 200 according to the embodiment of the present application, the implementation principle and the technical effects thereof have been introduced in the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the method embodiments where no part of the apparatus embodiments is mentioned.
Fig. 3 shows a functional block diagram of a network quality detection apparatus 300 according to an embodiment of the present application. The device includes:
a second connection establishing module 310, configured to establish a network connection between the data acquisition server and a browser that loads a service page of the network service; a detection script is embedded in the service page, and the detection script is executed when the service page is loaded by the browser;
a detection data collection module 320, configured to receive, by the data collection server, network quality detection data sent by the detection script through the network connection.
In one implementation manner of the network quality detection apparatus 300, the establishing a network connection between the data collection server in the second connection establishing module 310 and a browser loading a service page of a network service includes: and the data acquisition server judges whether the conditions for establishing the network connection are met or not according to the pre-configured data acquisition parameters, and if the conditions are met, the data acquisition server establishes the network connection with the browser.
In an implementation manner of the network quality detection apparatus 300, the data acquisition parameter includes a total number of online acquisition users, and the data acquisition server in the second connection establishment module 310 determines whether a condition for establishing a network connection is satisfied according to a preconfigured data acquisition parameter, and if the condition is satisfied, the establishing the network connection with the browser includes: the data acquisition server acquires the total number of the established network connections; and if the data acquisition server determines that the total number of the established network connections is less than the total number of the online acquisition users, establishing the network connections with the browser.
In one implementation of the network quality detection apparatus 300, the data collection server in the application of the detection data collection module 320 receives the network quality detection data sent by the detection script through the network connection, including: the data acquisition server sends a data acquisition instruction to the detection script; and the data acquisition server receives the network quality detection data acquired by the detection script according to the data acquisition instruction through the network connection.
The network quality detection apparatus 300 according to the embodiment of the present application, the implementation principle and the technical effects thereof have been introduced in the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the method embodiments where no part of the apparatus embodiments is mentioned.
Fig. 4 shows a possible structure of an electronic device 400 provided in an embodiment of the present application. Referring to fig. 4, the electronic device 400 includes: a processor 410, a memory 420, and a communication interface 430, which are interconnected and in communication with each other via a communication bus 440 and/or other form of connection mechanism (not shown).
The memory 420 stores computer program instructions that, when read and executed by the processor 410, perform the network quality detection method provided by the embodiments of the present application and other desired functions. The communication interface 430 is used for the electronic device 400 to communicate with other devices.
It will be appreciated that the configuration shown in fig. 4 is merely illustrative and that electronic device 400 may include more or fewer components than shown in fig. 4 or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented by hardware, software or a combination thereof, and the electronic device 400 in fig. 4 is not necessarily a single device, and may be a combination of multiple devices or a cluster of a large number of devices. For example, the terminal device and the data collection server in the present application may be implemented by the electronic device 400 in fig. 4.
The embodiment of the present application further provides a computer-readable storage medium, where computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are read and executed by a processor, the steps of the network quality detection method provided in the embodiment of the present application are executed. For example, the computer-readable storage medium may be, but is not limited to, memory 420 of electronic device 400 in FIG. 4.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for network quality detection, comprising:
starting a detection script embedded in a service page of a network service when the service page is loaded by a browser; the detection script instructs the browser to establish network connection with a data acquisition server;
the detection script collects network quality detection data and sends the network quality detection data to the data collection server through the network connection.
2. The method of claim 1, wherein the network connection is a WebSocket connection.
3. The method of claim 1, wherein the probing script collects network quality probing data, comprising:
and the detection script acquires page access performance data recorded when the browser accesses the service page, and takes the page access performance data as the acquired network quality detection data.
4. The method of claim 3, wherein the page access performance data comprises at least one of:
the method comprises the following steps of obtaining DNS query time of the browser accessing the service page, network connection establishment time of the browser and a service server providing the network service, service request time sent to the service server by the browser, response message time of the browser receiving the service request from the service server, loading time of the service page and execution time of the service page.
5. The network quality detection method of any one of claims 1-4, wherein the detecting script collects network quality detection data and sends the network quality detection data to the data collection server via the network connection, comprising:
and the detection script acquires network quality detection data after receiving a data acquisition instruction sent by the data acquisition server, and sends the network quality detection data to the data acquisition server through the network connection.
6. A method for network quality detection, comprising:
the data acquisition server establishes network connection with a browser loading a service page of the network service; a detection script is embedded in the service page, and the detection script is executed when the service page is loaded by the browser;
and the data acquisition server receives the network quality detection data sent by the detection script through the network connection.
7. The method according to claim 6, wherein the establishing a network connection between the data collection server and a browser loading a service page of the network service comprises:
and the data acquisition server judges whether the conditions for establishing the network connection are met or not according to the pre-configured data acquisition parameters, and if the conditions are met, the data acquisition server establishes the network connection with the browser.
8. The method according to claim 7, wherein the data collecting parameters include a total number of online collecting users, the data collecting server determines whether a condition for establishing a network connection is satisfied according to preconfigured data collecting parameters, and if the condition is satisfied, the network connection is established with the browser, including:
the data acquisition server acquires the total number of the established network connections;
and if the data acquisition server determines that the total number of the established network connections is less than the total number of the online acquisition users, establishing the network connections with the browser.
9. The network quality detection method according to any one of claims 6 to 8, wherein the data acquisition server receives the network quality detection data sent by the detection script through the network connection, and comprises:
the data acquisition server sends a data acquisition instruction to the detection script;
and the data acquisition server receives the network quality detection data acquired by the detection script according to the data acquisition instruction through the network connection.
10. A network quality detection apparatus, comprising:
the script starting module is used for starting a detection script embedded in a service page of the network service when the service page is loaded by a browser;
the first connection establishing module is used for indicating the browser to establish network connection with the data acquisition server by the detection script;
and the network quality detection module is used for acquiring network quality detection data by the detection script and sending the network quality detection data to the data acquisition server through the network connection.
11. A network quality detection apparatus, comprising:
the second connection establishing module is used for establishing network connection between the data acquisition server and a browser for loading a service page of the network service; a detection script is embedded in the service page, and the detection script is executed when the service page is loaded by the browser;
and the detection data collection module is used for receiving the network quality detection data sent by the detection script through the network connection by the data acquisition server.
CN201911403121.XA 2019-12-30 2019-12-30 Network quality detection method and device Pending CN111130948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911403121.XA CN111130948A (en) 2019-12-30 2019-12-30 Network quality detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403121.XA CN111130948A (en) 2019-12-30 2019-12-30 Network quality detection method and device

Publications (1)

Publication Number Publication Date
CN111130948A true CN111130948A (en) 2020-05-08

Family

ID=70505918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403121.XA Pending CN111130948A (en) 2019-12-30 2019-12-30 Network quality detection method and device

Country Status (1)

Country Link
CN (1) CN111130948A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726607A (en) * 2021-08-30 2021-11-30 北京百度网讯科技有限公司 Network detection method and device, electronic equipment and storage medium
CN114979132A (en) * 2022-04-13 2022-08-30 京东科技信息技术有限公司 Cluster component state detection method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340312A (en) * 2008-08-12 2009-01-07 腾讯科技(深圳)有限公司 Network quality monitoring method and system of internet data center
CN106100936A (en) * 2016-08-10 2016-11-09 乐视控股(北京)有限公司 Webpage method for monitoring performance and device and the webserver, client
CN106126395A (en) * 2016-06-15 2016-11-16 广州杰赛科技股份有限公司 A kind of cloud platform monitoring method and system
US20170230444A1 (en) * 2016-02-05 2017-08-10 Synology Inc. Cloud service server and method for managing cloud service server
CN107391343A (en) * 2017-07-25 2017-11-24 郑州云海信息技术有限公司 A kind of performance monitoring system and method
CN107579997A (en) * 2017-09-30 2018-01-12 北京奇虎科技有限公司 Wireless network intrusion detection system
CN107864070A (en) * 2017-10-30 2018-03-30 小草数语(北京)科技有限公司 Network status monitoring method, equipment and system
CN108563946A (en) * 2018-04-17 2018-09-21 广州大学 A kind of browser digs method, browser plug-in and the system of mine behavioral value
CN108874623A (en) * 2018-05-31 2018-11-23 郑州云海信息技术有限公司 Distributed type assemblies method for monitoring performance, device, equipment, system and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340312A (en) * 2008-08-12 2009-01-07 腾讯科技(深圳)有限公司 Network quality monitoring method and system of internet data center
US20170230444A1 (en) * 2016-02-05 2017-08-10 Synology Inc. Cloud service server and method for managing cloud service server
CN106126395A (en) * 2016-06-15 2016-11-16 广州杰赛科技股份有限公司 A kind of cloud platform monitoring method and system
CN106100936A (en) * 2016-08-10 2016-11-09 乐视控股(北京)有限公司 Webpage method for monitoring performance and device and the webserver, client
CN107391343A (en) * 2017-07-25 2017-11-24 郑州云海信息技术有限公司 A kind of performance monitoring system and method
CN107579997A (en) * 2017-09-30 2018-01-12 北京奇虎科技有限公司 Wireless network intrusion detection system
CN107864070A (en) * 2017-10-30 2018-03-30 小草数语(北京)科技有限公司 Network status monitoring method, equipment and system
CN108563946A (en) * 2018-04-17 2018-09-21 广州大学 A kind of browser digs method, browser plug-in and the system of mine behavioral value
CN108874623A (en) * 2018-05-31 2018-11-23 郑州云海信息技术有限公司 Distributed type assemblies method for monitoring performance, device, equipment, system and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TURBOROLEY: "如何实现类似浏览器调试中的网络数据监控功能?", 《百度》 *
雪V歌: "电脑浏览器上保存的网页在哪里找?", 《百度》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726607A (en) * 2021-08-30 2021-11-30 北京百度网讯科技有限公司 Network detection method and device, electronic equipment and storage medium
CN114979132A (en) * 2022-04-13 2022-08-30 京东科技信息技术有限公司 Cluster component state detection method and device
CN114979132B (en) * 2022-04-13 2024-05-17 京东科技信息技术有限公司 Cluster component state detection method and device

Similar Documents

Publication Publication Date Title
CN108768791B (en) Information acquisition configuration management system and method
US6625648B1 (en) Methods, systems and computer program products for network performance testing through active endpoint pair based testing and passive application monitoring
US10321342B2 (en) Methods and systems for performance monitoring for mobile applications
US7933988B2 (en) Method and system for monitoring performance of a client-server architecture
US8782215B2 (en) Performance testing in a cloud environment
CN108989136B (en) Business end-to-end performance monitoring method and device
CN107409071B (en) Method for obtaining diagnosis test result, control module and computer readable storage medium
CN105024872B (en) The method and device of applied in network performance test
CN106411629B (en) Method and equipment for monitoring state of CDN node
CN109600280B (en) Pressure testing system, method, device and computer readable storage medium
US7346678B1 (en) System and method for monitoring and managing a computing service
CN108616389B (en) Network evaluation method, equipment, storage medium and device based on cloud server
CN110851753A (en) Website access method, device, equipment and storage medium
JP2011239551A (en) Power consumption amount estimating system, information processing apparatus, server apparatus, and power consumption amount estimating method and program
CN105868040A (en) Log collection method and collection terminal
CN109714209A (en) A kind of diagnostic method and system of website visiting failure
Luo et al. Design and Implementation of TCP Data Probes for Reliable and Metric-Rich Network Path Monitoring.
CN110635965A (en) IPv6 network quality monitoring method, equipment and storage medium
CN111130948A (en) Network quality detection method and device
CN111106983A (en) Method and device for detecting network connectivity
CN102904774A (en) Terminal, server and server performance testing method
CN110955544A (en) Method, device and system for detecting usability of web system
CN101610183A (en) A kind of method and apparatus of probing processing ability of hypertext transfer protocol server
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN104104554B (en) The life cycle methodology and device of detection data access request

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication