CN111628902B - Rate testing method and apparatus, electronic device, and computer-readable storage medium - Google Patents

Rate testing method and apparatus, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN111628902B
CN111628902B CN201910153256.9A CN201910153256A CN111628902B CN 111628902 B CN111628902 B CN 111628902B CN 201910153256 A CN201910153256 A CN 201910153256A CN 111628902 B CN111628902 B CN 111628902B
Authority
CN
China
Prior art keywords
communication network
transmission rate
time
data
amount
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
CN201910153256.9A
Other languages
Chinese (zh)
Other versions
CN111628902A (en
Inventor
江沛合
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910153256.9A priority Critical patent/CN111628902B/en
Publication of CN111628902A publication Critical patent/CN111628902A/en
Application granted granted Critical
Publication of CN111628902B publication Critical patent/CN111628902B/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/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The present disclosure provides a communication network transmission rate test method and apparatus for an electronic device, an electronic device using the communication network transmission rate test method, and a computer-readable storage medium. The communication network transmission rate testing method comprises the following steps: at a first time point, analyzing a specific file of an operating system of the electronic equipment to acquire first data traffic information; performing a communication network based data transmission between a first point in time and a second point in time thereafter; at a second time point, analyzing the specific file to acquire second data traffic information; and determining a transmission rate of the communication network based on the amount of time between the first point in time and the second point in time, and the first and second data traffic information. The whole receiving and sending data volume of the electronic equipment in unit time is obtained by analyzing the kernel file of the operating system, and the transmission data volume of a single application is not considered, so that the uplink and downlink transmission rate of the communication network can be accurately determined.

Description

Rate testing method and apparatus, electronic device, and computer-readable storage medium
Technical Field
The present disclosure relates to the field of network communications, and more particularly, to a method and an apparatus for testing a transmission rate of a communication network for an electronic device, an electronic device using the method, and a computer-readable storage medium.
Background
With the continuous development of communication technology and various applications based on high-speed communication, users can use electronic devices such as smart phones and tablet computers for work and entertainment. The transmission rate of the communication network used by the user thus plays a crucial role in the user experience, and therefore the user often desires to be able to know the transmission rate of the currently used communication network accurately in real time.
The current communication network transmission rate test method usually only focuses on a communication connection condition for speed measurement established by the current rate test application, and the uplink and downlink speeds are calculated only by the size of data downloaded in unit time or uploaded in unit time through the communication connection for speed measurement. Since the situation of communication bandwidth occupied by other applications is not concerned during such speed measurement, it is often inaccurate. For example, in the speed measurement process, if other applications also occupy a large network bandwidth when downloading or uploading data, the speed measurement result is greatly reduced.
Disclosure of Invention
The present disclosure has been made in view of the above problems. The present disclosure provides a communication network transmission rate test method and apparatus for an electronic device, an electronic device using the communication network transmission rate test method, and a computer-readable storage medium.
According to one aspect of the present disclosure, there is provided a communication network transmission rate test method for an electronic device, including: at a first time point, analyzing a specific file of an operating system of the electronic equipment to acquire first data traffic information; performing a data transmission over the communication network between the first point in time and a second point in time thereafter; at the second time point, analyzing the specific file to acquire second data traffic information; and determining a transmission rate of the communication network based on the amount of time between the first point in time and the second point in time, and the first data traffic information and the second data traffic information.
Further, a communication network transmission rate testing method according to an aspect of the present disclosure, wherein the specific file is a kernel file of the operating system.
In addition, according to the communication network transmission rate testing method in one aspect of the present disclosure, the operating system is an android operating system, and the kernel file is an iface _ stat _ all file.
Further, a transmission rate test method of a communication network according to an aspect of the present disclosure, wherein the first data traffic information indicates at least a first transmission data amount and a first reception data amount of the electronic device at the first time point, and the second data traffic information indicates at least a second transmission data amount and a second reception data amount of the electronic device at the second time point, the determining the transmission rate of the communication network includes: dividing the time amount by the difference between the second sending data amount and the first sending data amount to be used as an uplink transmission rate of the communication network, and dividing the time amount by the difference between the second receiving data amount and the first receiving data amount to be used as a downlink transmission rate of the communication network.
In addition, the method for testing the transmission rate of the communication network according to one aspect of the present disclosure further includes: receiving a transmission rate test request; determining whether the communication network is a mobile network or a wireless local area network in response to the rate test request, in the case that the communication network is the mobile network, requesting confirmation of the rate test request, and in response to receiving the confirmation, initiating a communication network rate test; and initiating a communication network rate test if the communication network is the wireless local area network.
According to another aspect of the present disclosure, there is provided a communication network transmission rate testing apparatus for an electronic device, including: the analysis unit is used for analyzing a specific file of an operating system of the electronic equipment at a first time point to acquire first data traffic information, and analyzing the specific file at a second time point after the first time point to acquire second data traffic information; a data transmission unit configured to perform data transmission based on the communication network between the first time point and the second time point; a transmission rate determination unit for determining a transmission rate of the communication network based on an amount of time between the first point in time and the second point in time, and the first data traffic information and the second data traffic information.
Further, a communication network transmission rate test apparatus according to another aspect of the present disclosure, wherein the specific file is a kernel file of the operating system.
In addition, according to another aspect of the present disclosure, the communication network transmission rate testing apparatus, wherein the operating system is an android operating system, and the kernel file is an iface _ stat _ all file.
Further, a communication network transmission rate test apparatus according to another aspect of the present disclosure, wherein the first data traffic information indicates at least a first transmission data amount and a first reception data amount of the electronic device at the first time point, and the second data traffic information indicates at least a second transmission data amount and a second reception data amount of the electronic device at the second time point, the transmission rate determination unit divides a difference between the second transmission data amount and the first transmission data amount by the amount of time as an upstream transmission rate of the communication network, and divides a difference between the second reception data amount and the first reception data amount by the amount of time as a downstream transmission rate of the communication network.
Furthermore, a communication network transmission rate testing apparatus according to another aspect of the present disclosure further includes: a request receiving unit configured to receive a transmission rate test request and determine whether the communication network is a mobile network or a wireless local area network in response to the rate test request; in the event that the communications network is the mobile network, requiring acknowledgement of the rate test request and, in response to receiving acknowledgement, initiating a communications network rate test; and initiating a communication network rate test if the communication network is the wireless local area network.
According to yet another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing computer program instructions; wherein when the computer program instructions are loaded and run by the processor, the processor performs the communication network rate testing method as described above.
According to yet another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when loaded and executed by a processor, cause the processor to perform the method of communication network rate testing as described above.
As will be described in detail below, according to the communication network transmission rate testing method and apparatus for an electronic device, the electronic device using the communication network transmission rate testing method, and the computer-readable storage medium of the embodiments of the present disclosure, in a communication network transmission rate testing process, a received data amount and a sent data amount of the whole electronic device per unit time are acquired by parsing a kernel file of an operating system, instead of considering only a transmission data amount of a single application, so that an uplink transmission rate and a downlink transmission rate of a communication network can be accurately determined.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and are intended to provide further explanation of the claimed technology.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description of the embodiments of the present disclosure when taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a schematic diagram summarizing an application scenario of a communication network transmission rate testing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a communication network transmission rate test interface according to an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a communication network transmission rate testing method according to an embodiment of the present disclosure;
fig. 4A is a schematic diagram illustrating a kernel file parsed in a communication network transmission rate testing method according to an embodiment of the present disclosure;
FIG. 4B is a diagram for further explaining the data volume related field in the kernel file;
FIG. 5 is a flow chart further illustrating a communication network transmission rate testing method according to an embodiment of the present disclosure;
FIG. 6 is a block diagram illustrating a communication network transmission rate testing arrangement according to an embodiment of the present disclosure;
FIG. 7 is a hardware block diagram illustrating an electronic device according to an embodiment of the disclosure; and
fig. 8 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions, and advantages of the present disclosure more apparent, example embodiments according to the present disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the described embodiments are only some of the embodiments of the present disclosure, and not all of the embodiments of the present disclosure, and it is to be understood that the present disclosure is not limited by the example embodiments described herein.
First, an application scenario of the communication network transmission rate test method according to the embodiment of the present disclosure is schematically described with reference to fig. 1.
As shown in fig. 1, an electronic device 10 (such as a smart phone, tablet computer, etc.) is capable of data communication through a mobile network 11 or a wireless local area network 12. The mobile network 11 includes, for example, but not limited to, a fourth generation mobile communication network, a fifth generation mobile communication network, and the like; the wireless local area network 12 includes, for example, but is not limited to, a wireless fidelity (Wi-Fi) network or the like. It is desirable for the user of the electronic device 10 to be able to know the transmission rate of the currently used communication network (the mobile network 11 or the wireless local area network 12) in real time and accurately so that an application matching the transmission rate of the communication network can be appropriately selected or that an appropriate selection of the communication network service to be used can be made in accordance with the requirements of the application.
Fig. 2 is a schematic diagram illustrating a communication network transmission rate test interface according to an embodiment of the disclosure. As shown in fig. 2, when the method for testing the transmission rate of the communication network according to the embodiment of the present disclosure is executed, the type of the test currently being executed (for example, whether the upload speed or the download speed is tested), the network delay resulting from the test, the download speed, the upload speed, the current network stability, the option of stopping the test, and the like can be displayed on the test interface of the transmission rate of the communication network in real time. As determined by the principles of the communication network transmission rate test method to be described, the communication network transmission rate test according to the embodiments of the present disclosure is generally capable of displaying smooth and accurate test results.
Hereinafter, the communication network transmission rate test method will be described in detail with reference to fig. 3 to 5. As shown in fig. 3, a communication network transmission rate test method according to an embodiment of the present disclosure includes the following steps.
In step S301, at a first time point, a specific file of an operating system of the electronic device is parsed, and first data traffic information is acquired.
In one embodiment of the present disclosure, an electronic device according to an embodiment of the present disclosure is a smartphone or tablet computer using the android operating system. The specific file is a kernel file of the android operating system. More specifically, the kernel file is an iface _ stat _ all file, which is located in/proc/net/xt _ qtaguid/iface _ stat _ all and is used for keeping statistics of the amount of data transmitted and received by all wireless local area networks and mobile networks since the system is started.
Specifically, fig. 4A is a schematic diagram illustrating a kernel file parsed in a communication network transmission rate testing method according to an embodiment of the present disclosure. The second line (i.e., rmnet _ data0 line) and the third line (i.e., wlan0 line) as shown in fig. 4A record the statistics of the data transmitted and received by the mobile network and the wlan, respectively.
Fig. 4B is a diagram for further explaining the data amount-related field in the kernel file. As shown in fig. 4B, the first bit of the field related to the amount of data to be transmitted and received indicates an interface name (i.e., network type rmnet _ data0 or wlan 0), the second bit indicates whether the network is currently active, the third to sixth bits indicate the total amount of data received, the total number of packets received, the total amount of forwarded data, and the total number of packets forwarded at the current time point, respectively, and the seventh to tenth bits indicate the amount of data received, the number of packets received, the amount of data forwarded, and the number of packets forwarded since the system is started.
Specifically, in step S301, only the first sending data amount (i.e., the fifth bit in fig. 4B) and/or the first receiving data amount (i.e., the third bit in fig. 4B) of the electronic device at the first time point obtained by parsing the iface _ stat _ all file need to be focused.
In step S302, a communication network based data transmission is performed between a first point in time and a second point in time thereafter.
In one embodiment of the present disclosure, the amount of time between the first point in time and the second point in time is a communication network transmission rate test unit time (e.g., 0.5 seconds).
Depending on whether the upstream transmission rate or the downstream transmission rate is tested, the data transmission based on the communication network may be uploading data to the test server or downloading data from the test server. It should be understood that the amount of data uploaded and downloaded should be large enough relative to the actual bandwidth of the communication network to avoid situations where the actual bandwidth of the communication network is not fully occupied. For example, the amount of data used for uploading and downloading may be several hundred megabytes in size to accommodate the actual bandwidth conditions of currently mainstream mobile and wireless local area networks.
In step S303, at the second time point, the specific file is parsed to obtain the second data traffic information.
As described above, the second transmission data amount (i.e., the fifth bit in fig. 4B) and/or the second reception data amount (i.e., the third bit in fig. 4B) of the electronic device at the second time point obtained by parsing the iface _ stat _ all file.
In step S304, a transmission rate of the communication network is determined based on the amount of time between the first point in time and the second point in time, and the first data traffic information and the second data traffic information.
In one embodiment of the present disclosure, when performing an uplink transmission rate test, dividing a difference between the second transmission data amount and the first transmission data amount by the amount of time as an uplink transmission rate of the communication network; when the downlink transmission rate test is executed, dividing the difference between the second receiving data quantity and the first receiving data quantity by the time quantity to be used as the downlink transmission rate of the communication network.
Fig. 5 is a flow chart further illustrating a communication network transmission rate testing method according to an embodiment of the present disclosure.
As shown in fig. 5, before the communication network rate test is started, in step S501, a transmission rate test request is received.
In step S502, it is determined whether the communication network is a mobile network in response to the rate test request.
If a positive result is obtained in step S502, it proceeds to step S503. In step S503, a request for confirming the rate test request is requested.
If the user does not confirm the rate test request in consideration of the traffic consumption in the test under the mobile network in step S503, the response rate test request is ended.
In contrast, if the user confirms the rate test request again in step S503, it proceeds to step S504. Further, if a negative result is obtained in step S502, i.e., the communication network is a mobile local area network, it directly proceeds to step S504.
Steps S504 to S507 are the same as steps S301 to S304 described above with reference to fig. 3, i.e., one test procedure within a unit time (e.g., 0.5 second) of the communication network transmission rate test, and a description thereof will be omitted herein.
After the communication network transmission rate in the current unit time is determined in step S507, it is judged in step S508 whether the total test time is reached. This total test time needs to be a compromise between the user experience and the accuracy of the test. I.e. not too long to cause cracking of the user experience, nor too short to cause test misalignment. For example, the total test time may be set to about 5-10 seconds.
If a negative result is obtained in step S508, that is, the total test time has not been reached, the process returns to step S504, and the test procedure per unit time of steps S504 to S507 is continued. Conversely, if a positive result is obtained at step S508, i.e., the total test time is reached, the communication network transmission rate test ends.
As described above with reference to fig. 3 to fig. 5, according to the method for testing the transmission rate of the communication network for the electronic device according to the embodiment of the present disclosure, in the test process, the kernel file of the operating system is analyzed to obtain the whole received data volume and the whole sent data volume of the electronic device in unit time, instead of considering only the transmission data volume of a single test application, so that interference of other applications possibly existing at the same time on the transmission rate test is avoided, and the uplink and downlink transmission rates of the communication network can be accurately determined.
The communication network transmission rate test method according to the embodiments of the present disclosure is described above with reference to the drawings, and a communication network transmission rate test apparatus, an electronic device, and a computer-readable storage medium that implement the communication network transmission rate test method will be described below with further reference to the drawings.
Fig. 6 is a block diagram illustrating a communication network transmission rate testing apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the communication network transmission rate test apparatus 60 according to the embodiment of the present disclosure includes a request receiving unit 601, a parsing unit 602, a data transmission unit 603, and a transmission rate determining unit 604. The modules described above may respectively perform the steps of the communication network transmission rate testing method according to the embodiment of the present disclosure described above with reference to fig. 3 to 5. Those skilled in the art understand that: these unit modules may be implemented in various ways by hardware alone, by software alone, or by a combination thereof, and the present disclosure is not limited to any one of them.
The request receiving unit 601 is configured to receive a transmission rate test request, and determine whether the communication network is a mobile network or a wireless local area network in response to the rate test request; in the event that the communications network is the mobile network, requiring acknowledgement of the rate test request and, in response to receiving acknowledgement, initiating a communications network rate test; and in the case that the communication network is the wireless local area network, initiating a communication network rate test.
The parsing unit 602 is configured to parse a specific file of an operating system of the electronic device at a first time point to obtain first data traffic information, and parse the specific file at a second time point after the first time point to obtain second data traffic information. The specific file is a kernel file of the operating system. More specifically, the operating system is an android operating system, and the kernel file is an iface _ stat _ all file. The first data traffic information indicates at least a first amount of transmission data and a first amount of reception data of the electronic device at the first point in time, and the second data traffic information indicates at least a second amount of transmission data and a second amount of reception data of the electronic device at the second point in time.
The data transmission unit 603 is configured to perform data transmission based on the communication network between the first time point and the second time point.
The transmission rate determining unit 604 is configured to determine a transmission rate of the communication network based on the amount of time between the first point in time and the second point in time, and the first data traffic information and the second data traffic information. The transmission rate determining unit 604 divides the time amount by the difference between the second transmission data amount and the first transmission data amount as the uplink transmission rate of the communication network, and divides the time amount by the difference between the second reception data amount and the first reception data amount as the downlink transmission rate of the communication network.
Fig. 7 is a hardware block diagram illustrating an electronic device according to an embodiment of the disclosure. An electronic device according to an embodiment of the present disclosure includes at least a processor; and a memory for storing computer program instructions. When the computer program instructions are loaded and run by a processor, the processor performs the communication network transmission rate testing method as described above.
The electronic device 10 shown in fig. 7 specifically includes: a Central Processing Unit (CPU) 22, a Graphics Processing Unit (GPU) 24, and a main memory 26. These units are interconnected by a bus 30. A Central Processing Unit (CPU) 22 and/or a Graphics Processing Unit (GPU) 24 may be used as the processor, and a main memory 26 may be used as the memory for storing computer program instructions. Further, the electronic device 10 comprises a communication unit 32, a storage unit 34, an output unit 36, an input unit 38 and an external device 40, which are also connected to the bus 30.
Fig. 8 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in fig. 8, a computer-readable storage medium 800 according to an embodiment of the present disclosure has computer-readable instructions 801 stored thereon. The computer readable instructions 801, when executed by a processor, perform a method of communication network transmission rate testing according to embodiments of the present disclosure described with reference to the above figures. The computer-readable storage medium includes, but is not limited to, volatile memory and/or non-volatile memory, for example. The volatile memory may include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, optical disks, magnetic disks, and so forth.
In the above, the communication network transmission rate testing method and apparatus for an electronic device, the electronic device using the communication network transmission rate testing method, and the computer readable storage medium according to the embodiments of the present disclosure are described with reference to the drawings, in the communication network transmission rate testing process, the kernel file of the operating system is analyzed to obtain the whole received data amount and sent data amount of the electronic device in unit time, instead of considering only the transmission data amount of a single application, so that interference of other applications to the transmission rate testing, which may exist at the same time, is avoided, and the uplink and downlink transmission rates of the communication network can be accurately determined.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The basic principles of the present disclosure have been described above in connection with specific embodiments, but it should be noted that advantages, effects, and the like, mentioned in the present disclosure are only examples and not limitations, and should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
In addition, as used herein, "or" as used in a list of items beginning with "at least one" indicates a separate list, such that, for example, a list of "A, B or at least one of C" means a or B or C, or AB or AC or BC, or ABC (i.e., a and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
It should also be noted that, in the systems and methods of the present disclosure, various components or steps may be decomposed and/or recombined. Such decomposition and/or recombination should be considered as equivalents of the present disclosure.
Various changes, substitutions and alterations to the techniques described herein may be made without departing from the techniques of the teachings as defined by the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. Processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (8)

1. A communication network transmission rate test method for electronic equipment comprises the following steps:
in response to a received transmission rate test request for a communication network, determining whether the communication network is a mobile network or a wireless local area network;
judging whether to confirm the speed test request under the condition that the communication network is a mobile network; if the speed test request is confirmed, a communication network transmission speed test process is carried out;
under the condition that the communication network is a wireless local area network, directly carrying out a communication network transmission rate test process;
analyzing a kernel file of an operating system of the electronic equipment at a first time point in a communication network transmission rate testing process to acquire first data traffic information, wherein the kernel file is used for storing data volume statistics sent and received by all wireless local area networks and mobile networks since the system of the electronic equipment is started;
performing data transmission based on the communication network within a transmission rate test unit time constituted by an amount of time between the first time point and a second time point later, the data transmission having a data amount large enough relative to an actual bandwidth of the communication network to be adapted to the bandwidth of the communication network;
at the second time point, analyzing the kernel file to acquire second data traffic information;
determining a transmission rate of the communication network for one transmission rate test unit of time based on the amount of time between the first point in time and the second point in time, and the first data traffic information and the second data traffic information;
if the test time of the communication network transmission rate reaches the total test time, ending the communication network transmission rate test process, wherein the duration corresponding to the total test time is associated with user experience and test accuracy;
and if the test time of the transmission rate of the communication network does not reach the total test time, continuing to execute the process of testing the transmission rate of the communication network in the transmission rate test unit time.
2. The communication network transmission rate testing method of claim 1, wherein the operating system is an android operating system, and the kernel file is an iface _ stat _ all file.
3. The communication network transmission rate testing method of one of claims 1 to 2, wherein the first data traffic information indicates at least a first amount of transmission data and a first amount of reception data of the electronic device at the first point in time, and the second data traffic information indicates at least a second amount of transmission data and a second amount of reception data of the electronic device at the second point in time,
said determining a transmission rate of said communication network per unit time of said transmission rate test comprises:
dividing the difference between the second sending data amount and the first sending data amount by the time amount to serve as an uplink transmission rate of the communication network in one transmission rate test unit time, and dividing the difference between the second receiving data amount and the first receiving data amount by the time amount to serve as a downlink transmission rate of the communication network in one transmission rate test unit time.
4. A communication network transmission rate testing apparatus for an electronic device, comprising:
a request receiving unit configured to determine whether a communication network is a mobile network or a wireless local area network in response to a received transmission rate test request for the communication network; judging whether to confirm the speed test request under the condition that the communication network is a mobile network, and if the speed test request is confirmed, carrying out a communication network transmission speed test process; under the condition that the communication network is a wireless local area network, directly carrying out a communication network transmission rate test process;
the analysis unit is used for analyzing a kernel file of an operating system of the electronic equipment at a first time point in a communication network transmission rate test process to acquire first data traffic information, wherein the kernel file is used for storing data volume statistics sent and received by all wireless local area networks and mobile networks since the system of the electronic equipment is started, and analyzing the kernel file at a second time point after the first time point to acquire second data traffic information;
a data transmission unit configured to perform data transmission based on the communication network within a transmission rate test unit time constituted by an amount of time between the first time point and the second time point, the amount of data transmission being large enough relative to an actual bandwidth of the communication network to be suitable for the bandwidth of the communication network;
a transmission rate determining unit configured to determine a transmission rate of the communication network per unit time of the transmission rate test based on an amount of time between the first time point and the second time point, and the first data traffic information and the second data traffic information;
if the testing time of the communication network transmission rate reaches the total testing time, ending the testing process of the communication network transmission rate, wherein the duration corresponding to the total testing time is associated with user experience and testing accuracy; and if the test time of the transmission rate of the communication network does not reach the total test time, continuing to execute the process of testing the transmission rate of the communication network in the transmission rate test unit time.
5. The communication network transmission rate testing apparatus according to claim 4, wherein the operating system is an android operating system, and the kernel file is an iface _ stat _ all file.
6. The communication network transmission rate test apparatus of any of claims 4 to 5, wherein the first data traffic information indicates at least a first amount of transmission data and a first amount of reception data of the electronic device at the first point in time, and the second data traffic information indicates at least a second amount of transmission data and a second amount of reception data of the electronic device at the second point in time,
the transmission rate determining unit divides the difference between the second transmission data amount and the first transmission data amount by the time amount as an uplink transmission rate of the communication network in one transmission rate test unit time, and divides the difference between the second reception data amount and the first reception data amount by the time amount as a downlink transmission rate of the communication network in one transmission rate test unit time.
7. An electronic device, comprising:
a processor; and
a memory for storing computer program instructions;
wherein, when the computer program instructions are loaded and run by the processor, the processor performs the communication network transmission rate testing method of any one of claims 1 to 3.
8. A computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when loaded and executed by a processor, cause the processor to perform a communication network transmission rate testing method according to any one of claims 1 to 3.
CN201910153256.9A 2019-02-28 2019-02-28 Rate testing method and apparatus, electronic device, and computer-readable storage medium Active CN111628902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910153256.9A CN111628902B (en) 2019-02-28 2019-02-28 Rate testing method and apparatus, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910153256.9A CN111628902B (en) 2019-02-28 2019-02-28 Rate testing method and apparatus, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111628902A CN111628902A (en) 2020-09-04
CN111628902B true CN111628902B (en) 2022-10-04

Family

ID=72259645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910153256.9A Active CN111628902B (en) 2019-02-28 2019-02-28 Rate testing method and apparatus, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111628902B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039895B (en) * 2021-10-15 2023-11-21 深圳市有方科技股份有限公司 Method and device for testing data transmission rate
CN116915670B (en) * 2023-09-14 2023-12-05 浙江国利信安科技有限公司 Method, apparatus and medium for determining network recovery time

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100478900C (en) * 2006-06-14 2009-04-15 华为技术有限公司 Method for testing CPU system performance
CN104009892A (en) * 2014-06-12 2014-08-27 北京奇虎科技有限公司 Monitoring method and device for traffic of mobile terminal and client side
US10178569B1 (en) * 2016-02-23 2019-01-08 Headspin, Inc. Adaptive application behavior based on assessed network characteristics
CN105847075A (en) * 2016-03-11 2016-08-10 珠海市瑞励科技有限公司 Speed measuring method and device based on traffic monitoring
CN106231067A (en) * 2016-07-13 2016-12-14 浪潮电子信息产业股份有限公司 A kind of quick test Android App starts the method for flow
CN107220160B (en) * 2017-05-27 2021-01-15 北京奇虎科技有限公司 Method and device for determining electric quantity consumption of application program
CN107770746B (en) * 2017-09-30 2020-04-24 Oppo广东移动通信有限公司 Data processing method and device, computer equipment and computer readable storage medium
CN107708092B (en) * 2017-09-30 2019-09-17 Oppo广东移动通信有限公司 Flow information update method and device, terminal, computer readable storage medium
CN108519934A (en) * 2018-03-15 2018-09-11 广州视源电子科技股份有限公司 Board test method, device, readable storage medium storing program for executing and computer equipment
CN108804292A (en) * 2018-06-20 2018-11-13 郑州云海信息技术有限公司 A kind of CPU pressure test monitoring methods for Linux

Also Published As

Publication number Publication date
CN111628902A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
US9282012B2 (en) Cognitive data delivery optimizing system
CN106850402B (en) Message transmission method and device
US8737243B2 (en) Methods and apparatus for monitoring network link quality
CN107624233B (en) VPN transmission tunnel scheduling method and device and VPN client server
CN109936514B (en) Message processing method and device
US20170373984A1 (en) Server intelligence for network speed testing control
CN111628902B (en) Rate testing method and apparatus, electronic device, and computer-readable storage medium
CN112787877B (en) Network delay detection method and related equipment
CN106357561B (en) Access port queuing and resource management
CN109981214B (en) Transmission control method and device
CN109194706B (en) Network resource dial testing method and terminal
CN107426042A (en) A kind of message transmitting method and transmission equipment
CN110248379B (en) Performance test method and device for base station in wireless local area network
CN107851083B (en) Content delivery network aware of mobility state
US9979793B2 (en) Methods and systems for sending and receiving information data
CN103312540A (en) User service requirement parameter determining method and device
CN108541000A (en) A kind of method, medium and the equipment of detection network connection
CN112422604A (en) File uploading method, device and system and computer equipment
De Silva et al. Throughput estimation for short lived TCP cubic flows
CN114158104B (en) Network selection method, device, terminal and storage medium
CN113626402A (en) Log data acquisition method and device, electronic equipment and storage medium
EP3313115A1 (en) Voice quality evaluation method and device
US20240031252A1 (en) Methods for measuring user experience and satisfaction and identifying bottlenecks on communications networks
CN114124761B (en) Electronic device, system, method and medium for bandwidth consistency verification
JP6450336B2 (en) Response time measurement method

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40028476

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant