CN114866446A - Data transmission rate testing method, system, electronic device and storage medium - Google Patents
Data transmission rate testing method, system, electronic device and storage medium Download PDFInfo
- Publication number
- CN114866446A CN114866446A CN202210399512.4A CN202210399512A CN114866446A CN 114866446 A CN114866446 A CN 114866446A CN 202210399512 A CN202210399512 A CN 202210399512A CN 114866446 A CN114866446 A CN 114866446A
- Authority
- CN
- China
- Prior art keywords
- data transmission
- time
- equipment
- transmission rate
- moment
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 245
- 238000012360 testing method Methods 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 claims description 29
- 238000004891 communication Methods 0.000 claims description 28
- 230000004044 response Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 8
- 238000010998 test method Methods 0.000 abstract description 5
- 238000012545 processing Methods 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 230000008034 disappearance Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0888—Throughput
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The application relates to a data transmission rate test method, a system, an electronic device and a storage medium, wherein the data transmission rate test method comprises the following steps: acquiring a first moment, wherein the first moment is a moment when the second equipment responds to the data transmission request and agrees to perform data transmission with the first equipment; acquiring a second moment, wherein the second moment is the moment when the prompt message disappears, and the prompt message is used for prompting that data transmission is carried out between the first equipment and the second equipment; determining a data transmission rate according to the first time, the second time and the size of a preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device. Therefore, the data transmission rate can be tested under the condition of not manually processing, and the problem that errors possibly exist in test data due to the fact that deviation exists in the data transmission duration obtained through manual timing is solved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and a system for testing a data transmission rate, an electronic device, and a storage medium.
Background
In the prior art, a manual timing mode is usually adopted to test the data transmission rate of a module or a device where the module is located. Taking bluetooth transmission as an example, in the process of transmitting data, the data transmission duration is obtained by manually recording the time from the time when the device starts to transmit data to the time when the sending bullet frame/receiving bullet frame of the device disappears, and the data transmission rate is calculated based on the data transmission duration and the size of the transmission data packet. However, the data transmission time length obtained by manual timing may have a deviation, so that the test data, i.e., the data transmission rate calculated as described above, has an error.
Disclosure of Invention
The application provides a data transmission rate testing method, a data transmission rate testing system, electronic equipment and a storage medium, and aims to solve the problem that errors exist in test data due to the fact that deviation possibly exists in data transmission duration obtained through manual timing.
In a first aspect, the present application provides a data transmission rate testing method, including:
acquiring a first moment, wherein the first moment is a moment when the second equipment responds to the data transmission request and agrees to perform data transmission with the first equipment;
acquiring a second moment, wherein the second moment is the moment when the prompt message disappears, and the prompt message is used for prompting that data transmission is carried out between the first equipment and the second equipment;
determining a data transmission rate according to the first time, the second time and the size of a preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
Optionally, the number of the preset data packets is at least one;
determining a data transmission rate according to the first time, the second time and the size of a preset data packet, comprising:
determining the difference value between the first time and the second time as the data transmission duration;
determining the accumulated size of all preset data packets as the size of the preset data packets;
and determining the ratio of the size of the preset data packet to the data transmission time length as the data transmission rate.
Optionally, the method further comprises:
acquiring a third moment, and determining a difference value between the second moment and the third moment; the third time is the time when the first device completes the transmission of the preset data packet.
Optionally, before acquiring the first time, the method further includes:
configuring information to be tested, wherein the information to be tested at least comprises a data transmission rate;
and sending a test command to the first device based on the information to be tested, so that the first device sends a data transmission request to the second device in response to the test command.
Optionally, the information to be tested further includes network load information;
before sending the test command to the first device, the method further comprises:
and scanning the network environment where the first equipment and the second equipment are located, and obtaining network load information.
Optionally, the information to be tested further includes a packet loss rate;
the method further comprises the following steps:
acquiring the number of first preset data packets, wherein the number of the first preset data packets is the number of the preset data packets sent to the second equipment by the first equipment;
acquiring the number of second preset data packets, wherein the number of the second preset data packets is the number of the preset data packets received by the second equipment from the first equipment;
and calculating the packet loss rate according to the number of the first data packets and the number of the second data packets.
In a second aspect, the present application provides a data transmission rate testing apparatus, including:
the first acquisition module is used for acquiring a first moment, wherein the first moment is a moment when the second equipment responds to the data transmission request and agrees to perform data transmission with the first equipment;
the second acquisition module is used for acquiring a second moment, wherein the second moment is a moment when the prompt message disappears, and the prompt message is used for prompting that data transmission is carried out between the first equipment and the second equipment;
the determining module is used for determining the data transmission rate according to the first time, the second time and the size of the preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
In a third aspect, the present application provides a data transmission rate testing system, which includes a first device, a second device, and a third device; wherein,
the first device is used for sending a data transmission request to the second device;
the second equipment is used for receiving the data transmission request sent by the first equipment; recording the time when the data transmission request is responded to and the data transmission with the first equipment is agreed as a first time;
the first device is further used for recording the moment when the prompt message disappears as a second moment after the second device responds to the data transmission request and agrees to perform data transmission with the first device, wherein the prompt message is used for prompting that the data transmission is performed between the first device and the second device;
the third equipment is used for acquiring the first time and the second time and determining the data transmission rate according to the first time, the second time and the size of the preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
In a fourth aspect, the present application provides a data transmission rate testing system, which includes a first device and a second device; wherein,
the first device is used for sending a data transmission request to the second device;
the second equipment is used for receiving the data transmission request sent by the first equipment; recording the time when the data transmission request is responded to and the data transmission with the first equipment is agreed as a first time;
the first device is further used for recording the moment when the prompt message disappears as a second moment after the second device responds to the data transmission request and agrees to perform data transmission with the first device, wherein the prompt message is used for prompting that the data transmission is performed between the first device and the second device;
the first device is configured to obtain a first time and a second time, and determine the data transmission rate according to the first time, the second time, and a size of a preset data packet; the preset data packet is a pre-generated data packet used for transmission between the first device and the second device.
In a fifth aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the data transmission rate testing method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the data transmission rate testing method according to any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the data transmission rate testing method provided in the embodiment of the application obtains a first time, that is, a time when the second device agrees to perform data transmission with the first device in response to the data transmission request, that is, a time when the data transmission is started, and obtains a second time, that is, a time when the prompt information for prompting that the data transmission is being performed between the first device and the second device disappears, that is, a time when the data transmission is finished. And then, determining the data transmission rate based on the data transmission starting time, the data transmission ending time and the size of a preset data packet transmitted between the first device and the second device, so that the data transmission rate is tested without manual processing, the data transmission rate is obtained, and the problem that errors possibly exist in the test data due to the fact that the data transmission time length obtained by manual timing in the prior art is deviated is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a data transmission rate testing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a data transmission rate testing system according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another data transmission rate testing system according to an embodiment of the present application;
fig. 4 is a schematic diagram of a data transmission rate testing process according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data transmission rate testing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the problem that errors exist in test data due to possible deviation of data transmission duration obtained by manual timing, the embodiment of the application provides a data transmission rate test method which is applied to any equipment. As shown in fig. 1, the data transmission rate method includes steps 101 to 103:
step 101: a first time is obtained.
The first moment is the moment when the second equipment responds to the data transmission request and agrees to perform data transmission with the first equipment.
Specifically, a first time is obtained from a second device.
The data transmission may be, for example, data transmission via bluetooth, or other types of short-range wireless data transmission.
Optionally, before the first time is obtained from the second device, the second device receives the data transmission request sent by the first device, and then records, as the first time, a time when the second device agrees to perform data transmission with the first device in response to the data transmission request. At this time, the second device locally stores the first time.
In a possible implementation manner, after receiving the data transmission request, the second device generates and displays a target pop-up box, where the target pop-up box is used to prompt whether the second device agrees to perform data transmission with the first device. For example, the content in the target pop-up box may include "whether to receive", "yes", and "no", and if a click operation on "yes" is detected, it may be determined that the second device agrees to data transmission with the first device, and the current time is recorded as the first time.
Generally, after receiving a data transmission request, if the second device agrees to perform data transmission with the first device, parameters of a relevant register in the second device are changed. Therefore, in another possible implementation manner, after receiving the data transmission request, the second device records a time when the parameter of the relevant register changes as the first time.
Or, in another possible implementation manner, after receiving the data transmission request, the second device automatically grants the data transmission with the first device.
Step 102: a second time is obtained.
The second moment is the moment when the prompt message disappears, and the prompt message is used for prompting that data transmission is in progress between the first device and the second device.
Specifically, the second time is acquired from the first device.
Optionally, before the second time is obtained from the first device, the first device records a time when the prompt information disappears as the second time after the second device agrees to perform data transmission with the first device in response to the data transmission request. At this time, the first device locally stores the second time.
The prompt message is used for prompting that data transmission is carried out between the first device and the second device.
In a possible implementation manner, when the second device responds to the data transmission request and agrees to perform data transmission with the first device, the second device feeds back a data transmission response to the first device, and the first device generates and displays the prompt information based on the data transmission response.
Optionally, before the first device sends the data transmission request to the second device, the first device receives a test command, and sends the data transmission request to the second device in response to the test command.
Step 103: and determining the data transmission rate according to the first time, the second time and the size of the preset data packet.
The preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
In one possible implementation, the size of the predetermined data packet is obtained before step 103. Typically, the size of the predetermined packet is fixed, for example, 10M.
Specifically, the size of the preset data packet may be pre-configured.
Alternatively, in order to ensure the accuracy and reliability of the data transmission rate, the average data transmission rate of transmitting a plurality of data packets may be taken as the required data transmission rate obtained by the test.
In one possible implementation, the number of the predetermined packets is at least one. At this time, in the process of determining the data transmission rate according to the first time, the second time and the size of the preset data packet, the difference value of the first time and the second time is determined as the data transmission duration, the accumulated size of all the preset data packets is determined as the size of the preset data packet, and finally the ratio of the size of the preset data packet to the data transmission duration is determined as the data transmission rate.
Illustratively, the number of the preset data packets is 3. The size of each of the 3 predetermined packets is 10M, and therefore, the cumulative size of the 3 predetermined packets is 30M, which is determined as the size of the predetermined packet. Taking the difference between the first time and the second time, that is, the data transmission time length is 20s as an example, it is determined that the data transmission rate is 30M/20s — 1.5M/s.
Optionally, after the second time is obtained, a third time is obtained, and a difference between the second time and the third time is determined. And the third moment is the moment when the first equipment completes the transmission of the preset data packet. By recording the third moment and the difference value between the second moment and the third moment, the corresponding program can be adjusted conveniently according to the third moment and the difference value between the second moment and the third moment, so that the third moment and the second moment are infinitely close to each other, and the measured data transmission rate is more accurate.
Specifically, the third time is acquired from the first device.
Of course, before the third time is obtained from the first device, when the first device completes sending the preset data packet, the first device records the current time when sending the preset data packet is completed as the third time.
In a possible implementation manner, the third time may be obtained simultaneously with the second time, or the second time may be obtained first, and then the third time is obtained.
Optionally, before the first time is obtained, information to be tested is configured, and a test is performed based on the information to be tested to obtain a required measurement index. Therefore, before the data transmission rate test is carried out, the to-be-tested information is configured, so that the device or a user using the device can determine the index needing to be measured according to the actual test requirement through the device.
In one possible implementation manner, information to be tested is configured, the information to be tested at least includes a data transmission rate, and then, based on the information to be tested, a test command is sent to the first device, so that the first device sends a data transmission request to the second device in response to the test command.
Because the actual network environment has a certain interference to the data transmission process, under different network environments such as network load information, the data transmission rate has a large difference. Therefore, the reliability of the data transmission rate obtained by the individual test is poor. In another possible implementation manner, in order to enhance the reliability of the data transmission rate obtained by the test, the information to be tested further includes network load information, and at this time, before the test command is sent to the first device, the network environments where the first device and the second device are located are scanned, and the network load information is obtained. Therefore, when the data transmission rate is obtained through testing, the network load information of the environment where the first equipment and the second equipment are located before data transmission is recorded and obtained, and the referential performance of the data transmission rate obtained through testing is enhanced.
Specifically, the network load information may be the number of network devices in the current environment.
For example, if the data transmission process is performed through bluetooth, the network load information may be the number of bluetooth devices in the current network environment.
Generally, after the configuration of the information to be tested is completed, the network load information in the current environment is scanned until the test is started. Specifically, after the configuration of the information to be tested is completed, if the information to be tested includes the network load information, scanning of the network load information in the current environment is started, after the scanning time length reaches the preset time length, the scanning is stopped, and the network load information obtained by the last scanning is used as the network load information obtained by testing. Subsequently, a test command is sent to the first device to initiate a test of the data transfer rate. The preset time period may be determined according to an actual working condition, or may be predetermined.
Therefore, before data transmission is carried out, scanning is stopped, the network load information obtained by the last scanning is determined as the network load information obtained by testing, the influence of scanning the network load information in a network environment on data transmission rate testing can be reduced, the influence of scanning the network load information in the data transmission testing process and the data transmission rate testing is reduced, and the accuracy of the data transmission rate obtained by testing is improved.
Similarly, in order to enhance the reliability of the data transmission rate obtained by the test, in another possible implementation manner, the information to be tested further includes a packet loss rate. At this time, the first preset data packet quantity, that is, the quantity of the preset data packets sent by the first device to the second device, is obtained, and the second preset data packet quantity, that is, the quantity of the preset data packets received by the second device from the first device, is obtained. And then, calculating to obtain the packet loss rate according to the first preset data packet quantity and the second preset data packet quantity. Therefore, the packet loss rate is recorded while the data transmission rate is tested, so that the referential of the tested data transmission rate is further enhanced, and the data transmission performance of the equipment is more comprehensively evaluated.
Specifically, a first preset number of data packets is obtained from the first device, and a second preset number of data packets is obtained from the second device. And then, determining a difference value between the first preset data packet quantity and the second preset data packet quantity, and determining a ratio of the difference value to the first preset data packet quantity as a packet loss rate. At this time, the larger the value of the packet loss rate is, the worse the data transmission performance of the device is.
Or, the first preset data packet quantity is obtained from the first device, and the second preset data packet quantity is obtained from the second device. And then, determining the ratio of the first preset data packet quantity to the second preset data packet quantity as the packet loss rate. At this time, the larger the value of the packet loss rate is, the worse the data transmission performance of the device is.
It should be noted that, through the above process, the data transmission rate is determined based on the data transmission start time, i.e., the first time, the data transmission end time, i.e., the second time, and the size of the preset data packet transmitted between the first device and the second device, so that the data transmission rate is tested without manual processing, the data transmission rate is obtained, and the problem that errors may exist in the test data due to the deviation of the data transmission duration obtained by manual timing in the prior art is solved.
Optionally, before the test, configuring information to be tested, and testing according to the information to be tested. For a detailed description of the testing process according to the information to be tested, reference is made to the above description, and further description is not provided herein.
In order to solve the problem that errors exist in test data due to possible deviation of data transmission duration obtained by manual timing, the application also discloses a data transmission rate test system, and as shown in fig. 2, the data transmission rate test system comprises first equipment, second equipment and third equipment.
The first device is used for sending a data transmission request to the second device.
The second equipment is used for receiving the data transmission request sent by the first equipment; and recording the time when the data transmission request is responded to and the data transmission is approved to the first equipment as the first time.
The first equipment is also used for recording the moment when the prompt message disappears as a second moment after the second equipment responds to the data transmission request and agrees to carry out data transmission with the first equipment; the prompt message is used for prompting that data transmission is carried out between the first device and the second device.
The third equipment is used for acquiring the first time and the second time and determining the data transmission rate according to the first time, the second time and the size of the preset data packet; the preset data packet is a data packet which is generated in advance and used for transmission between the first device and the second device.
At this time, the third device acquires the first time from the second device, and acquires the second time from the first device. Specifically, the second device sends the recorded first time to the third device, and the first device sends the recorded second time to the third device, so that the third device determines the data transmission rate according to the first time obtained from the second device and the second time obtained from the first device, in combination with the size of the preset data packet.
In a possible implementation manner, the first device generates at least one preset data packet, sends the size of each data packet in the at least one preset data packet to the third device, and after receiving the test command, the first device sends the preset data packet to the second device to perform the data transmission rate test.
Or, in another possible implementation manner, the third device generates at least one preset data packet, and sends the at least one preset data packet to the first device, so that the first device sends the at least one preset data packet to the second device after receiving the test command from the third device, and performs the data transmission rate test.
That is, the data transmission rate test method shown in fig. 1 described above is applied to the third device shown in fig. 2.
It should be noted that the data transmission rate testing method shown in fig. 1 can be applied to a communication module, and in this case, the communication module is located in a third device.
In order to solve the problem that errors exist in test data due to possible deviation of data transmission duration obtained by manual timing, the application also discloses another data transmission rate test system, and as shown in fig. 3, the data transmission rate test system comprises first equipment and second equipment.
The first device is used for sending a data transmission request to the second device.
The second equipment is used for receiving the data transmission request sent by the first equipment; and recording the time when the data transmission request is responded to and the data transmission is approved to the first equipment as the first time.
The first equipment is also used for recording the moment when the prompt message disappears as a second moment after the second equipment responds to the data transmission request and agrees to carry out data transmission with the first equipment; the prompt message is used for prompting that data transmission is carried out between the first device and the second device.
The first device or the second device is used for acquiring a first moment and a second moment and determining a data transmission rate according to the first moment, the second moment and the size of a preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
In a possible implementation manner, the first device is configured to generate at least one preset data packet, and the first device is configured to send the preset data packet to the second device after receiving the test command, so that the first device performs a data transmission rate test.
Or, in another possible implementation manner, the second device is configured to generate at least one preset data packet, and send the at least one preset data packet to the first device, so that after receiving the test command, the first device sends the at least one preset data packet to the second device, so that the second device performs a data transmission rate test.
That is, the data transmission rate test method shown in fig. 1 described above is applied to the first device or the second device shown in fig. 2.
It should be noted that the data transmission rate testing method shown in fig. 1 can be applied to a communication module, and in this case, the communication module is located in the first device or the second device.
For example, as shown in fig. 4, taking the data transmission rate testing system shown in fig. 2 as an example, after the third device is powered on, the current environmental load condition is scanned until the scanning is stopped before the data transmission test is started, and the network load information is obtained and stored. Subsequently, the test device (i.e., the first device) sends a data transfer request to the auxiliary device (i.e., the second device), which grants the test device's data transfer request. At this time, the test device sends a preset data packet to the auxiliary device, the parameters of the relevant registers change, and the time point a at this time is recorded. And recording the number of the preset data packets sent by the test equipment and the number of the preset data packets received by the auxiliary equipment from the test equipment in the data transmission process. And recording a time point B when the test equipment completes sending the data packet along with the progress of the data transmission process, and recording a time point C when the bullet box prompt of the status bar of the test equipment disappears. And finally, calculating the data transmission time length D as C-A, the time difference E from the completion of the data transmission to the disappearance of the bullet frame in the status column of the testing equipment as C-B, the data transmission rate (namely the size of the transmitted preset data packet/the data transmission time length D) and the packet loss rate in the data transmission process, and recording. The packet loss rate is a ratio of a difference value between the number of the preset data packets sent by the testing equipment and the number of the preset data packets received by the auxiliary equipment to the number of the preset data packets sent by the testing equipment.
For example, the data testing process may be implemented by software such as an application program or a python script. Specifically, the process of testing with the application is as follows: and starting the test equipment and the auxiliary equipment, configuring a product realized by the process, namely the information to be tested, and running a test program. Firstly, a background generates a file with a fixed size, namely the preset data packet, and automatically detects and records the network load conditions around the test equipment and the auxiliary equipment. After a period of detection, stopping detection, enabling the test equipment to initiate a file transmission request to the auxiliary equipment, enabling the auxiliary equipment to pop up a popup box for 'receiving or not', enabling the test program to control the auxiliary equipment to agree to receive, and recording the time point at the moment. After the auxiliary equipment agrees to transmit the file, the testing equipment monitors the number of the data packets sent by the auxiliary equipment in real time and records the data packets, and the auxiliary equipment monitors the number of the data packets received by the auxiliary equipment in real time and records the data packets. Secondly, after the transmission of the test equipment is finished, the test program records the time point, the number of the sent data packets in the data transmission process and the disappearance time point of the upper status column of the test equipment. Of course, after the auxiliary device completes the file reception, the test program records the number of received data packets during the data transmission process. And finally, the test program calculates and records the data transmission rate according to the recorded data, and calculates and records the packet loss rate according to the number of the data packets sent by the test equipment and the number of the data packets received by the auxiliary equipment.
As shown in fig. 5, an embodiment of the present application provides a data transmission rate testing apparatus, which includes a first obtaining module 501, a second obtaining module 502, and a determining module 503.
The first obtaining module 501 is configured to obtain a first time, where the first time is a time when the second device grants a data transmission with the first device in response to the data transmission request.
The second obtaining module 502 is configured to obtain a second time, where the second time is a time when the prompt message disappears, and the prompt message is used to prompt that data transmission is being performed between the first device and the second device.
A determining module 503, configured to determine a data transmission rate according to the first time, the second time, and the size of the preset data packet; the preset data packet is a data packet generated in advance and used for transmission between the first device and the second device.
As shown in fig. 6, an electronic device according to an embodiment of the present application includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604,
a memory 603 for storing a computer program;
in an embodiment of the present application, the processor 601, when executing the program stored in the memory 603, implements the steps of the data transmission rate testing method provided in any of the foregoing method embodiments.
The electronic device provided by the embodiment of the application can be a module capable of realizing a communication function or a terminal device comprising the module, and the terminal device can be a mobile terminal or an intelligent terminal. The mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer and the like; the intelligent terminal can be a terminal containing a wireless communication module, such as an intelligent automobile, an intelligent watch, a shared bicycle, an intelligent cabinet and the like; the module may be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and an NB-IOT communication module.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data transmission rate testing method provided in any one of the foregoing method embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for testing data transmission rate, the method comprising:
acquiring a first moment, wherein the first moment is a moment when the second equipment responds to the data transmission request and agrees to perform data transmission with the first equipment;
acquiring a second moment, wherein the second moment is a moment when a prompt message disappears, and the prompt message is used for prompting that data transmission is in progress between the first device and the second device;
determining the data transmission rate according to the first time, the second time and the size of a preset data packet; the preset data packet is a pre-generated data packet used for transmission between the first device and the second device.
2. The data transmission rate testing method of claim 1,
the number of the preset data packets is at least one;
determining the data transmission rate according to the first time, the second time and the size of a preset data packet includes:
determining the difference value between the first time and the second time as the data transmission duration;
determining the accumulated size of all preset data packets as the size of the preset data packets;
and determining the ratio of the size of the preset data packet to the data transmission time length as the data transmission rate.
3. The data transmission rate testing method of claim 1, wherein after the obtaining the second time, the method further comprises:
acquiring a third moment, and determining a difference value between the second moment and the third moment; the third time is the time when the first device completes sending the preset data packet.
4. The data transmission rate testing method according to any one of claims 1 to 3, wherein before the acquiring the first time, the method further comprises:
configuring information to be tested, wherein the information to be tested at least comprises a data transmission rate;
and sending a test command to the first device based on the information to be tested, so that the first device sends the data transmission request to the second device in response to the test command.
5. The data transmission rate testing method of claim 4,
the information to be tested also comprises network load information;
prior to the sending of the test command to the first device, the method further comprises:
and scanning the network environment of the first equipment and the second equipment, and obtaining the network load information.
6. The data transmission rate testing method of claim 4,
the information to be tested also comprises a packet loss rate;
the method further comprises the following steps:
acquiring the number of first preset data packets, wherein the number of the first preset data packets is the number of the preset data packets sent to the second equipment by the first equipment;
acquiring a second preset data packet quantity, wherein the second preset data packet quantity is the quantity of preset data packets received by the second equipment from the first equipment;
and calculating to obtain the packet loss rate according to the first preset data packet quantity and the second preset data packet quantity.
7. A data transmission rate test system, comprising a first device, a second device and a third device; wherein,
the first device is used for sending a data transmission request to the second device;
the second equipment is used for receiving the data transmission request sent by the first equipment; recording the time when the data transmission request agrees to carry out data transmission with the first equipment as a first time;
the first device is further configured to record, as a second time, a time when the second device disappears after responding to the data transmission request and agreeing to perform data transmission with the first device, where the prompt is used to prompt that data transmission is being performed between the first device and the second device;
the third device is configured to obtain a first time and a second time, and determine the data transmission rate according to the first time, the second time, and a size of a preset data packet; the preset data packet is a pre-generated data packet used for transmission between the first device and the second device.
8. A data transmission rate test system, comprising a first device and a second device; wherein,
the first device is used for sending a data transmission request to the second device;
the second equipment is used for receiving the data transmission request sent by the first equipment; recording the time when the data transmission request agrees to carry out data transmission with the first equipment as a first time;
the first device is further configured to record, as a second time, a time when the second device disappears after responding to the data transmission request and agreeing to perform data transmission with the first device, where the prompt is used to prompt that data transmission is being performed between the first device and the second device;
the first device or the second device is configured to obtain a first time and a second time, and determine the data transmission rate according to the first time, the second time, and a size of a preset data packet; the preset data packet is a pre-generated data packet used for transmission between the first device and the second device.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the data transmission rate testing method according to any one of claims 1 to 6 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the data transmission rate testing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210399512.4A CN114866446A (en) | 2022-04-15 | 2022-04-15 | Data transmission rate testing method, system, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210399512.4A CN114866446A (en) | 2022-04-15 | 2022-04-15 | Data transmission rate testing method, system, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114866446A true CN114866446A (en) | 2022-08-05 |
Family
ID=82631625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210399512.4A Pending CN114866446A (en) | 2022-04-15 | 2022-04-15 | Data transmission rate testing method, system, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114866446A (en) |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2355901A (en) * | 1999-11-01 | 2001-05-02 | Mitel Corp | Measuring the delay of audio stream packets across a network using marker packets |
CN101841394A (en) * | 2010-06-09 | 2010-09-22 | 中南大学 | Method for measuring and calculating document transmission energy consumption of Bluetooth equipment and device thereof |
CN102970716A (en) * | 2012-12-17 | 2013-03-13 | 中国科学技术大学 | Transmission method with optimal energy efficiency under actual power consumption model |
CN103002413A (en) * | 2012-12-03 | 2013-03-27 | 北京小米科技有限责任公司 | Method and device for displaying multimedia message transmission schedule |
CN104168093A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | File transmission method and device |
CN104184753A (en) * | 2013-05-20 | 2014-12-03 | 腾讯科技(深圳)有限公司 | File transmission method and device thereof |
CN105929976A (en) * | 2016-05-25 | 2016-09-07 | 广州市久邦数码科技有限公司 | Input method-based dynamic expression input method and system |
CN107318173A (en) * | 2016-04-26 | 2017-11-03 | 腾讯科技(深圳)有限公司 | The data transmission method and system of mobile terminal and onboard system |
CN107612881A (en) * | 2017-08-01 | 2018-01-19 | 广州视源电子科技股份有限公司 | Method, device, terminal and storage medium for transmitting picture during file transmission |
CN110247959A (en) * | 2019-05-24 | 2019-09-17 | 深圳龙图腾创新设计有限公司 | A kind of data transmission method and device |
CN111132292A (en) * | 2020-03-26 | 2020-05-08 | 金陵科技学院 | Energy consumption minimizing method for sequentially transmitting a plurality of data packets |
CN111158929A (en) * | 2019-12-23 | 2020-05-15 | 维沃移动通信有限公司 | Application processing method and electronic equipment |
CN112230924A (en) * | 2020-11-09 | 2021-01-15 | 平安普惠企业管理有限公司 | Bullet box prompting method, device, computer equipment and storage medium |
CN112383572A (en) * | 2021-01-14 | 2021-02-19 | 广州快云信息科技有限公司 | Data transmission system and method |
CN112422406A (en) * | 2020-10-27 | 2021-02-26 | 刘鹏飞 | Automatic reply method and device for intelligent terminal, computer equipment and storage medium |
CN114217831A (en) * | 2021-11-17 | 2022-03-22 | 航天科工微电子系统研究院有限公司 | Multifunctional software upgrading method and system for embedded system |
-
2022
- 2022-04-15 CN CN202210399512.4A patent/CN114866446A/en active Pending
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2355901A (en) * | 1999-11-01 | 2001-05-02 | Mitel Corp | Measuring the delay of audio stream packets across a network using marker packets |
CN101841394A (en) * | 2010-06-09 | 2010-09-22 | 中南大学 | Method for measuring and calculating document transmission energy consumption of Bluetooth equipment and device thereof |
CN103002413A (en) * | 2012-12-03 | 2013-03-27 | 北京小米科技有限责任公司 | Method and device for displaying multimedia message transmission schedule |
CN102970716A (en) * | 2012-12-17 | 2013-03-13 | 中国科学技术大学 | Transmission method with optimal energy efficiency under actual power consumption model |
CN104168093A (en) * | 2013-05-20 | 2014-11-26 | 腾讯科技(深圳)有限公司 | File transmission method and device |
CN104184753A (en) * | 2013-05-20 | 2014-12-03 | 腾讯科技(深圳)有限公司 | File transmission method and device thereof |
CN107318173A (en) * | 2016-04-26 | 2017-11-03 | 腾讯科技(深圳)有限公司 | The data transmission method and system of mobile terminal and onboard system |
CN105929976A (en) * | 2016-05-25 | 2016-09-07 | 广州市久邦数码科技有限公司 | Input method-based dynamic expression input method and system |
CN107612881A (en) * | 2017-08-01 | 2018-01-19 | 广州视源电子科技股份有限公司 | Method, device, terminal and storage medium for transmitting picture during file transmission |
CN110247959A (en) * | 2019-05-24 | 2019-09-17 | 深圳龙图腾创新设计有限公司 | A kind of data transmission method and device |
CN111158929A (en) * | 2019-12-23 | 2020-05-15 | 维沃移动通信有限公司 | Application processing method and electronic equipment |
CN111132292A (en) * | 2020-03-26 | 2020-05-08 | 金陵科技学院 | Energy consumption minimizing method for sequentially transmitting a plurality of data packets |
CN112422406A (en) * | 2020-10-27 | 2021-02-26 | 刘鹏飞 | Automatic reply method and device for intelligent terminal, computer equipment and storage medium |
CN112230924A (en) * | 2020-11-09 | 2021-01-15 | 平安普惠企业管理有限公司 | Bullet box prompting method, device, computer equipment and storage medium |
CN112383572A (en) * | 2021-01-14 | 2021-02-19 | 广州快云信息科技有限公司 | Data transmission system and method |
CN114217831A (en) * | 2021-11-17 | 2022-03-22 | 航天科工微电子系统研究院有限公司 | Multifunctional software upgrading method and system for embedded system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107291068B (en) | Vehicle diagnostic method and vehicle diagnostic apparatus | |
CN104021218A (en) | Information display method and device | |
CN106681774B (en) | Software upgrading method of Bluetooth loudspeaker and intelligent terminal | |
EP3955694B1 (en) | Method and apparatus for back-connecting bluetooth device, terminal and computer-readable storage medium | |
CN111756597B (en) | Wireless module testing system, method and device applied to gateway | |
CN113207144A (en) | Wireless network detection method and device for screen projection equipment, medium and screen projection equipment | |
CN102474892B (en) | Method and apparatus for being connected to external equipment | |
CN112911560A (en) | Electronic business card transmission method and device | |
EP0612162A2 (en) | Apparatus for monitoring the transmission power level in a TDMA communications system | |
CN106817179B (en) | Self-adaptive test system and method | |
CN106254465B (en) | A kind of data transmission method, system and electronic equipment | |
CN114866446A (en) | Data transmission rate testing method, system, electronic device and storage medium | |
CN115243306A (en) | Signal measurement method and device, SME, MLME and terminal | |
CN105138373A (en) | Vehicle diagnosis device firmware upgrading method and device | |
WO2019000608A1 (en) | Network parameter matching method, device and system technology field therefor | |
CN107623526B (en) | A kind of method and communication terminal adjusting antenna receiving sensitivity | |
CN111740881B (en) | Network card link detection method, system, equipment and computer storage medium | |
CN115469525A (en) | Input/output time measuring method, system, device, terminal device and medium | |
CN115278649B (en) | Telephone number acquisition method, equipment, system and medium based on machine learning | |
CN112711495A (en) | Display screen fault diagnosis method and device and computer readable storage medium | |
CN110572479A (en) | electronic scale management method, electronic scale and storage medium | |
CN109688032B (en) | Network transmission performance testing method and device | |
CN115643289B (en) | Data transmission method, device, equipment and medium | |
CN115225939B (en) | Distance reminding method, device and equipment based on Bluetooth and computer storage medium | |
CN117177285A (en) | Bluetooth performance detection method, device, equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220805 |