Network test method, client, server, electronic equipment and storage medium

By sending and receiving delay test packets on the video transmission channel between the client and the server, and calculating network delay information, the problems of inaccurate and poor universality of existing network delay test methods are solved, and different networks are realized accurate time delay measurement.

CN119071193APending Publication Date: 2024-12-03VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992660.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Existing network delay testing methods such as Ping testing tools are inaccurate and can only be used on the Internet, and cannot effectively test the delay of other types of networks, and have poor versatility.

Method used

By establishing a video transmission channel between the client and the server, sending a delay test packet and receiving feedback delay test response packets, calculating network delay information, and generating network delay test reports, achieving accurate measurement of network delays .

Benefits of technology

This method can accurately measure delays in different types of networks, reduce the influence of external factors, and improve the versatility and accuracy of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071193A_ABST
    Figure CN119071193A_ABST
Patent Text Reader

Abstract

The invention provides a network testing method, a client, a server, electronic equipment and a storage medium. The network testing method comprises the following steps: a client sends a data packet to a server based on a video transmission channel established between the client and the server, and indicates the type of the data packet to the server; if the client indicates that the type of the data packet is a time delay test packet, receiving a time delay test response packet fed back by the server through the video transmission channel, and calculating network time delay information corresponding to the time delay test packet based on the time delay test response packet; and the client generates a network time delay test report based on the network time delay information. In the embodiment of the invention, the client can calculate the network time delay information based on the time delay test response packet fed back by the server, the calculation mode is not influenced by other factors except the network, the network time delay information calculated according to the data packet is more accurate, and the network test mode is not limited by the network type and is higher in universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a network testing method, a client, a server, an electronic device and a storage medium. Background Art

[0002] Network latency testing is an important aspect of evaluating network performance, which measures the time it takes for data to be transmitted from one end of the network to the other.

[0003] The current network delay test method is usually based on the Internet Ping test tool, which sends ICMP (Internet Control Message Protocol) messages to detect network connectivity, delay, etc. However, the delay tested by the Ping test tool is inaccurate, and the Ping test tool can only be used on the Internet, and cannot be used to test the delay of other types of networks, so it has poor versatility. Summary of the invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a network testing method, a client, a server, an electronic device and a storage medium that overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect, an embodiment of the present invention discloses a network testing method, which is executed on a client and includes:

[0006] Sending a data packet to the server based on the video transmission channel established with the server, and indicating the type of the data packet to the server;

[0007] If the type of the data packet is indicated to be a delay test packet, receiving a delay test response packet fed back by the server through the video transmission channel, and calculating network delay information corresponding to the delay test packet based on the delay test response packet;

[0008] Based on the network delay information, a network delay test report is generated.

[0009] Optionally, indicating the type of the data packet to the server includes: when indicating that the type of the data packet is a delay test packet, adding a performance test identifier and a delay test identifier to the data packet.

[0010] Optionally, the data packet carries a first sending timestamp when the client sends the data packet; the delay test response packet carries a first sending timestamp when the client sends the data packet, a second receiving timestamp when the server receives the data packet, and a second sending timestamp when the server sends the delay test response packet;

[0011] Based on the delay test response packet, the network delay information corresponding to the delay test packet is calculated, including: obtaining a first receiving timestamp when the client receives the delay test response packet; calculating a first difference between the first receiving timestamp and the first sending timestamp, and a second difference between the second sending timestamp and the second receiving timestamp, and determining the difference between the first difference and the second difference as the network delay information corresponding to the delay test packet.

[0012] Optionally, based on the network delay information, a network delay test report is generated, including: obtaining network delay test statistical information based on the network delay information corresponding to each delay test packet; and generating a network delay test report including the network delay test statistical information.

[0013] Optionally, after sending a data packet based on the video transmission channel established with the server and indicating the type of the data packet to the server, it also includes: if the type of the data packet is indicated as a delay test packet, when a delay test response packet fed back by the server through the video transmission channel is not received within a preset time length, determining that the delay test packet is lost;

[0014] Based on the network delay information, a network delay test report is generated, including: based on the network delay information corresponding to each delay test packet, obtaining network delay test statistical information and obtaining delay test packet loss statistical information; generating a network delay test report including the network delay test statistical information and the delay test packet loss statistical information.

[0015] In a second aspect, an embodiment of the present invention discloses a network testing method, which is applied to a server, and the method includes:

[0016] Receiving a data packet sent by the client through a video transmission channel established between the client and the client;

[0017] If it is determined that the type of the data packet is a delay test packet, a delay test response packet is sent to the client through the video transmission channel; the delay test response packet is used by the client to calculate the network delay information corresponding to the delay test packet, and generate a network delay test report based on the network delay information.

[0018] Optionally, the data packet carries a performance test identifier and a delay test identifier; if it is determined that the type of the data packet is a delay test packet, sending a delay test response packet to the client through the video transmission channel, including: after determining that the data packet carries the performance test identifier, saving the data packet in a performance test queue; extracting the data packet from the performance test queue using a performance test dequeue thread, and after determining that the data packet carries the delay test identifier, determining that the type of the data packet is a delay test packet, and sending a delay test response packet to the client through the video transmission channel.

[0019] In a third aspect, an embodiment of the present invention discloses a client, wherein the client comprises:

[0020] A first sending module, configured to send a data packet to the server based on a video transmission channel established with the server, and indicate the type of the data packet to the server;

[0021] a calculation module, configured to receive a delay test response packet fed back by the server through the video transmission channel if the type of the data packet is indicated to be a delay test packet, and calculate network delay information corresponding to the delay test packet based on the delay test response packet;

[0022] A generating module is used to generate a network delay test report based on the network delay information.

[0023] Optionally, the first sending module is specifically configured to add a performance test identifier and a delay test identifier to the data packet when indicating that the type of the data packet is a delay test packet.

[0024] Optionally, the data packet carries a first sending timestamp when the client sends the data packet; the delay test response packet carries the first sending timestamp when the client sends the data packet, the second receiving timestamp when the server receives the data packet, and the second sending timestamp when the server sends the delay test response packet; the calculation module is specifically used to obtain the first receiving timestamp when the client receives the delay test response packet; calculate the first difference between the first receiving timestamp and the first sending timestamp, and the second difference between the second sending timestamp and the second receiving timestamp, and determine the difference between the first difference and the second difference as the network delay information corresponding to the delay test packet.

[0025] Optionally, the generation module includes: a first statistical unit, used to obtain network delay test statistical information based on the network delay information corresponding to each delay test packet; and a first generation unit, used to generate a network delay test report containing the network delay test statistical information.

[0026] Optionally, the client further includes: a packet loss processing module, configured to determine that the delay test packet is lost if the type of the data packet is indicated as a delay test packet and if a delay test response packet fed back by the server through the video transmission channel is not received within a preset time length;

[0027] The generation module includes: a second statistical unit, used to obtain network delay test statistical information and delay test packet loss statistical information based on the network delay information corresponding to each delay test packet; a second generation unit, used to generate a network delay test report containing the network delay test statistical information and the delay test packet loss statistical information.

[0028] In a fourth aspect, an embodiment of the present invention discloses a server, the server comprising:

[0029] A receiving module, used for receiving a data packet sent by a client through a video transmission channel established between the client and the client;

[0030] The second sending module is used to send a delay test response packet to the client through the video transmission channel if it is determined that the type of the data packet is a delay test packet; the delay test response packet is used by the client to calculate the network delay information corresponding to the delay test packet, and generate a network delay test report based on the network delay information.

[0031] Optionally, the data packet carries a performance test identifier and a delay test identifier; the second sending module includes: a first processing unit, used to save the data packet in a performance test queue after determining that the data packet carries the performance test identifier; a second processing unit, used to extract the data packet from the performance test queue using a performance test dequeue thread, and after determining that the data packet carries the delay test identifier, determine that the type of the data packet is a delay test packet, and send a delay test response packet to the client through the video transmission channel.

[0032] In a fifth aspect, an embodiment of the present invention discloses an electronic device, comprising a processor and a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium; when the computer program is executed by the processor, the processor executes the network testing method as described in any one of the above items executed by the client, or executes the network testing method as described in any one of the above items executed by the server.

[0033] In a sixth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes the network testing method as described in any of the above items executed by the client, or executes the network testing method as described in any of the above items executed by the server.

[0034] In an embodiment of the present invention, the client sends a data packet to the server based on the video transmission channel established between the client and the server, and indicates the type of the data packet to the server; if the type of the data packet is indicated to be a delay test packet, the client receives the delay test response packet fed back by the server through the video transmission channel, and calculates the network delay information corresponding to the delay test packet based on the delay test response packet; based on the network delay information, a network delay test report is generated. It can be seen that in an embodiment of the present invention, the client and the server interact with each other through delay test packets and delay test response packets based on the video transmission channel, and the client can calculate the network delay information based on the delay test response packet fed back by the server. This calculation method is not affected by other factors outside the network, and the network delay information calculated based on the data packet is more accurate. In addition, this network test method is not limited by the network type and has stronger versatility.

[0035] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the description of the embodiment of the present invention will be briefly introduced below. Obviously, the drawings described below are only some drawings of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 is a flowchart of the steps of a network testing method according to an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of a service transparent transmission channel and a video transmission channel in an embodiment of the present invention;

[0039] Figure 3 is a flowchart of another network testing method according to an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of a visual networking application environment according to an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of device interaction in a visual network according to an embodiment of the present invention;

[0042] Figure 6 is a structural block diagram of a client according to an embodiment of the present invention;

[0043] Figure 7 is a structural block diagram of a server in an embodiment of the present invention;

[0044] Figure 8 is a structural block diagram of an electronic device according to an embodiment of the present invention;

[0045] Fig. 9 It is a structural block diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] The network testing method in the embodiment of the present invention is not limited to the type of network, and can be applied in the Internet or in the visual network.

[0048] Reference Figure 1 , shows a flow chart of the steps of a network testing method according to an embodiment of the present invention. The network testing method according to the embodiment of the present invention can be applied to a client.

[0049] like Figure 1 As shown, the network testing method may include the following steps:

[0050] Step 101: The client sends a data packet to the server based on a video transmission channel established between the client and the server, and indicates the type of the data packet to the server.

[0051] In the embodiment of the present invention, it is necessary to first establish a video transmission channel between the client and the server.

[0052] The video transmission channel refers to a channel used to transmit data packets between the client and the server. The video transmission channel is a bidirectional video transmission channel. The client can send data packets to the server through the video transmission channel, and the server can also send data packets to the client through the video transmission channel. Exemplarily, the video transmission channel can be a bidirectional video transmission channel such as a videophone channel.

[0053] If it is on the Internet, the process of establishing a video transmission channel between the client and the server is as follows: the client can send a video transmission channel establishment request to the server. After receiving the video transmission channel establishment request from the client, the server can perform authentication, authorization and other operations to ensure the validity of the request. After confirmation, the server agrees to establish the video transmission channel. The server feeds back a video transmission channel establishment response to the client. After the client receives the video transmission channel establishment response, the video transmission channel between the client and the server is successfully established. In actual applications, depending on the network architecture and communication protocols of the Internet, the client and the server can communicate point-to-point or via a central server. The specific process can be handled according to the actual situation.

[0054] In the visual network, there are multiple transmission channels due to the different types of visual network services. For example, the visual network transparent transmission service uses the business transparent transmission channel, while the video phone service and live broadcast service use the video transmission channel. In addition, the transmission paths of the business transparent transmission channel and the video transmission channel are also different.

[0055] Reference Figure 2 , showing a schematic diagram of a service transparent transmission channel and a video transmission channel in an embodiment of the present invention.

[0056] like Figure 2 As shown in the figure, the transmission path from the client to the server in the business transparent transmission channel is: from the client to the visual network server, then processed by the visual network server and transmitted to the autonomous server, then processed by the autonomous server and transmitted to the visual network server, and then processed by the visual network server and transmitted to the server. The transmission path from the server to the client in the business transparent transmission channel is: from the server to the visual network server, then processed by the visual network server and transmitted to the autonomous server, then processed by the autonomous server and transmitted to the visual network server, and then processed by the visual network server and transmitted to the client.

[0057] like Figure 2 As shown in the figure, the transmission path from the client to the server in the video transmission channel is: from the client to the visual network server, and then processed by the visual network server and transmitted to the server. The transmission path from the server to the client in the video transmission channel is: from the server to the visual network server, and then processed by the visual network server and transmitted to the client.

[0058] Therefore, if it is in a visual network, the process of establishing a video transmission channel between the client and the server is as follows:

[0059] 1. Start the server and log in to the video network legally.

[0060] Configure the MAC (Media Access Control) address of the server. The server sends a connection packet to the visual network server based on its own MAC address to apply for access to the visual network. The visual network server obtains the request information in the connection packet of the server and performs legitimacy verification. After the verification is passed, the visual network number corresponding to the server's MAC address is sent to the server. After receiving its own visual network number, the server can save its own visual network number, and the server successfully enters the network.

[0061] 2. Start the client and log in to the video network legally.

[0062] Configure the client's MAC address. The client sends a connection packet to the visual network server based on its own MAC address to apply for access to the visual network. The visual network server obtains the request information in the client's connection packet and performs a legitimacy verification. After the verification is passed, the visual network number corresponding to the client's MAC address is sent to the client. After receiving its own visual network number, the client can save its own visual network number, and the client successfully accesses the network. In addition, multiple sub-device numbers can be set on the server. The server's visual network number and its sub-device numbers can be configured on the client to facilitate the subsequent establishment of a video transmission channel between the client and the server.

[0063] 3. Establish a video transmission channel between the client and the server.

[0064] The client initiates a request to establish a video transmission channel based on the visual network number and sub-device number of the server, and the visual network server forwards the request to establish a video transmission channel to the server. If the sub-device number in the request to establish the video transmission channel on the server is not occupied, the server allows the establishment of the video transmission channel, and the server sends the channel number of the video transmission channel to the client via the visual network server, and the video transmission channel between the client and the server is successfully established. If the sub-device number in the request to establish the video transmission channel on the server is occupied, the server returns an occupied notification to the client via the visual network server, and the client can switch to another sub-device number to re-initiate the request to establish the video transmission channel.

[0065] After successfully establishing a video transmission channel between the client and the server, the client and the server can exchange data through the video transmission channel, thereby realizing network testing.

[0066] The client sends a data packet to the server based on the video transmission channel established between the client and the server. In addition, in order to distinguish different types of data packets, the client can further indicate the type of the data packet to the server. For example, the type of data packet can include but is not limited to a delay test packet, a normal data packet, an encryption level packet, and the like.

[0067] In an embodiment of the present invention, when performing a network delay test, the client may indicate that the type of the data packet is a delay test packet. Exemplarily, when indicating that the type of the data packet is a delay test packet, the client may add a performance test identifier and a delay test identifier to the data packet.

[0068] Specifically, the client can add a performance test identifier and a delay test identifier to the packet header of the data packet according to the structure of the communication protocol, and add the packet sequence number, timestamp (that is, the first sending timestamp when the client sends the data packet), source address, destination address and other information, and encapsulate it according to the corresponding encapsulation format to obtain the corresponding data packet.

[0069] Taking the visual network as an example, the visual network environment has the advantages of structural security, fast speed and real-time data transmission. According to the visual network protocol structure, a performance test identifier can be added to the type identification field of the public message header part, and a delay test identifier can be added to the command type field of the data message payload part, and the Ethernet header, switch identifier, destination address, source address, packet sequence number, timestamp (that is, the first sending timestamp when the client sends the data packet), etc. are carried, and encapsulated according to the visual network video encapsulation format to obtain a data packet.

[0070] The format of the data packet is shown in Table 1:

[0071] Table 1

[0072]

[0073] The format of the type identifier of the public message header part is shown in Table 2:

[0074] Table 2

[0075] Type Identification Remark 0x00 General data 0x01 Performance Testing 0x1x Encryption level

[0076] In an embodiment of the present invention, the client can also calculate the packet sending amount in each packet sending period according to the specified bandwidth and the preset packet sending period, and send data packets to the server based on the video transmission channel established with the server according to the packet sending period and the corresponding packet sending amount.

[0077] Step 102: If the client indicates that the type of the data packet is a delay test packet, it receives the delay test response packet fed back by the server through the video transmission channel, and calculates the network delay information corresponding to the delay test packet based on the delay test response packet.

[0078] After receiving the data packet through the video transmission channel established between the server and the client, the server parses the data packet and sends a delay test response packet to the client through the video transmission channel if the server determines that the type of the data packet is a delay test packet.

[0079] When the client indicates that the type of the data packet is a delay test packet, it can receive the delay test response packet fed back by the server through the video transmission channel, and calculate the network delay information corresponding to the delay test packet based on the delay test response packet.

[0080] Exemplarily, after receiving the data packet through the video transmission channel established between the server and the client, the server may record the second receiving timestamp when the data packet is received. The latency test response packet returned by the server may carry the first sending timestamp when the client sends the data packet, the second receiving timestamp when the server receives the data packet, and the second sending timestamp when the server sends the latency test response packet.

[0081] Exemplarily, the server may add the second receiving timestamp and the second sending timestamp to the original packet of the delay test packet, thereby obtaining a delay test response packet.

[0082] Correspondingly, the process of the client calculating the network delay information corresponding to the delay test packet based on the delay test response packet may include: obtaining a first receiving timestamp when the client receives the delay test response packet; calculating a first difference between the first receiving timestamp and the first sending timestamp, and a second difference between the second sending timestamp and the second receiving timestamp, and determining the difference between the first difference and the second difference as the network delay information corresponding to the delay test packet.

[0083] That is, the network delay information corresponding to the delay test packet = the first receiving timestamp - the first sending timestamp - (the second sending timestamp - the second receiving timestamp). This method of calculating network delay information optimizes the server's processing time for data packets and can accurately calculate network delay.

[0084] Step 103: The client generates a network delay test report based on the network delay information.

[0085] The client can generate a network delay test report based on the network delay information corresponding to each delay test packet after the network test is completed; it can also generate a network delay test report based on the network delay information corresponding to each delay test packet at the end of one or more packet transmission cycles during the network test; it can also generate a network delay test report based on the network delay information corresponding to each delay test packet at other time points. This embodiment does not limit this.

[0086] In an optional implementation, the process of the client generating a network delay test report based on the network delay information may include: the client may obtain network delay test statistical information based on the network delay information corresponding to each delay test packet; and generate a network delay test report containing the network delay test statistical information.

[0087] Exemplarily, the network delay test statistical information may include, but is not limited to: maximum network delay information, minimum network delay information, average network delay information, and the like.

[0088] In an optional embodiment, after the client sends a data packet based on a video transmission channel established between the client and the server and indicates the type of the data packet to the server, if the type of the data packet is a delay test packet, if the client does not receive a delay test response packet fed back by the server through the video transmission channel within a preset time length, it is determined that the delay test packet is lost.

[0089] Correspondingly, the process of the client generating a network delay test report based on the network delay information may include: obtaining network delay test statistical information and obtaining delay test packet loss statistical information based on the network delay information corresponding to each delay test packet; and generating a network delay test report containing the network delay test statistical information and the delay test packet loss statistical information.

[0090] Exemplarily, the delay test packet loss statistics information may include but is not limited to: delay test packet loss rate, delay test packet loss number, and the like.

[0091] Of course, the above network delay test report may also include other relevant information, such as the total delay test duration, etc., which is not limited in this embodiment.

[0092] Reference Figure 3 , shows a flow chart of steps of another network testing method according to an embodiment of the present invention. The network testing method according to the embodiment of the present invention can be applied to a server.

[0093] like Figure 3 As shown, the network testing method may include the following steps:

[0094] Step 301: The server receives a data packet sent by the client through a video transmission channel established between the server and the client.

[0095] Step 302: If the server determines that the type of the data packet is a delay test packet, the server sends a delay test response packet to the client through the video transmission channel.

[0096] After receiving the data packet through the video transmission channel established between the server and the client, the server parses the data packet and sends a delay test response packet to the client through the video transmission channel if the server determines that the type of the data packet is a delay test packet.

[0097] In an optional embodiment, after the server receives the data packet through the video transmission channel established between the server and the client, if the server determines that the data packet carries the performance test identifier and the delay test identifier, the server can determine that the type of the data packet is a delay test packet, and send a delay test response packet to the client through the video transmission channel.

[0098] In an optional implementation, considering that the number of delay test packets may be large, in order to avoid congestion and improve the convenience of delay test packet processing, after receiving the data packet through the video transmission channel established between the server and the client, the server parses the data packet to determine whether the data packet carries the performance test identifier. If it is determined that the data packet carries the performance test identifier, the data packet is first saved in the performance test queue. The server sets up a separate performance test dequeue thread, uses the performance test dequeue thread to extract the data packet from the performance test queue, parses the data packet to determine whether the data packet carries the delay test identifier, and after determining that the data packet carries the delay test identifier, determines that the type of the data packet is a delay test packet, and the server sends a delay test response packet to the client through the video transmission channel.

[0099] In an embodiment of the present invention, a delay test packet and a delay test response packet are interacted between a client and a server based on a video transmission channel. The client can calculate network delay information based on the delay test response packet fed back by the server. This calculation method is not affected by other factors outside the network. The network delay information calculated based on the data packet is more accurate. In addition, this network test method is not limited by the network type and has stronger versatility.

[0100] Below, taking the visual networking environment as an example, the network testing process in the visual networking environment is introduced.

[0101] Reference Figure 4 , which shows a schematic diagram of a visual networking application environment according to an embodiment of the present invention. Figure 4 As shown, the network testing process in the visual networking environment involves visual networking management and performance testing management. Visual networking management includes: network access management, business management, data security management, and network exit management. For example, the network access process of the client and the server mentioned above involves network access management, etc. Performance testing management includes: time management, packet sending management, packet receiving management, statistical management, and scheduling management. For example, the client packet sending and the server packet sending in the above text involve packet sending management, the client packet receiving and the server packet receiving involve packet receiving management, the client packet sending also involves time management, and the client generates a delay test report. When the management involves statistical management, etc.

[0102] Reference Figure 5 , which shows a schematic diagram of device interaction in a visual network according to an embodiment of the present invention. Figure 5 As shown, in the visual networking, the client (which can be called VPing client) can be equipped with a video networking software development kit (VVSDK), and the server (which can be called VPing server) can also be equipped with a video networking software development kit. The client and the server can interact based on the visual networking through their own video networking software development kits. Among them, there can be multiple clients, such as Figure 5 Client A, Client B, and so on.

[0103] Network testing methods in a visual networking environment may include:

[0104] (1) Start the VPing server to legally log in to the visual network. Configure the legal MAC address of the VPing server. The VPing server sends a connection packet based on the MAC address through VVSDK to apply for access to the visual network. The visual network server obtains the request information in the connection packet of the VPing server and performs a legality verification. After the verification is passed, the visual network number corresponding to the MAC address of the VPing server is sent to the VPing server. The VPing server receives the visual network number information and can save the information. The VPing server successfully accesses the network.

[0105] (2) Start the VPing client to legally log in to the visual network. Configure the MAC address of the VPing client. The VPing client sends a connection packet to the visual network server through VVSDK based on its own MAC address to apply for access to the visual network. The visual network server obtains the request information in the connection packet of the VPing client and performs a legality verification. After the verification is passed, the visual network number corresponding to the MAC address of the VPing client is sent to the VPing client. After receiving its own visual network number, the VPing client can save its own visual network number, and the VPing client successfully accesses the network. In addition, multiple sub-device numbers can be set on the VPing server. The VPing server's visual network number and its sub-device numbers can be configured on the VPing client to facilitate the subsequent establishment of a video transmission channel between the VPing client and the VPing server.

[0106] (3) Establishing a video transmission channel between the VPing client and the VPing server. The VPing client initiates a request to establish a video transmission channel based on the visual network number and sub-device number of the VPing server, and the visual network server forwards the request to establish a video transmission channel to the VPing server. If the sub-device number in the request to establish the video transmission channel on the VPing server is not occupied, the VPing server allows the establishment of the video transmission channel, and the VPing server sends the channel number of the video transmission channel to the VPing client via the visual network server. The video transmission channel between the VPing client and the VPing server is successfully established. If the sub-device number in the request to establish the video transmission channel on the VPing server is occupied, the VPing server returns an occupied notification to the VPing client via the visual network server, and the VPing client can switch to another sub-device number and re-initiate the request to establish the video transmission channel.

[0107] (4) Network test. After the client successfully establishes a channel with the server, the client encapsulates data through VVSDK. According to the specified bandwidth, the number of packets that need to be sent per second is calculated, carrying the necessary packet type, packet sequence number, and timestamp.

[0108] ① The VPing client encapsulates and sends data packets through VVSDK. The data packets can carry information such as performance test identification, latency test identification, packet sequence number, and the first sending timestamp when the VPing client sends the data packet.

[0109] ②The VPing server receives the data packet through VVSDK and determines whether it carries the performance test identifier. If it carries the performance test identifier, it records the second receiving timestamp when the VPing server receives the data packet and puts the data packet into the performance test queue. Another performance test dequeue thread obtains the data packet from the performance test queue and determines whether it carries the delay test identifier. If it carries the delay test identifier, it sends a delay test response packet. When the original packet is returned, it carries the first sending timestamp, the second receiving timestamp, and the second sending timestamp when the VPing server sends the delay test response packet.

[0110] ③The VPing client receives the latency test response packet through VVSDK, extracts the packet sequence number, the first sending timestamp, the second receiving timestamp, and the second sending timestamp, and obtains the first receiving timestamp when the VPing client receives the latency test response packet. These four timestamps can be used to calculate the network latency information corresponding to the latency test packet. The formula is network latency information = first receiving timestamp - first sending timestamp - (second sending timestamp - second receiving timestamp).

[0111] ④If the VVSDK of the VPing client does not receive the latency test response packet within a timeout period, it determines that the latency test packet is lost and performs packet loss processing.

[0112] (5) The VPing client generates a network delay test report. At the end of the network test, the VPing client collects statistics on the maximum network delay information, the minimum network delay information, the average network delay information, the total network delay test duration, the number of packet losses, the packet loss rate, and other information to generate a network delay test report.

[0113] The embodiments of the present invention can improve network testing capabilities, support visual network performance testing from the protocol layer, and truly reflect the network performance of visual network video channels.

[0114] Reference Figure 6 , shows a structural block diagram of a client according to an embodiment of the present invention.

[0115] like Figure 6 As shown, the client can include the following modules:

[0116] A first sending module 601 is used to send a data packet to the server based on the video transmission channel established with the server, and indicate the type of the data packet to the server;

[0117] The calculation module 602 is used to receive the delay test response packet fed back by the server through the video transmission channel if the type of the data packet is indicated to be a delay test packet, and calculate the network delay information corresponding to the delay test packet based on the delay test response packet;

[0118] The generating module 603 is used to generate a network delay test report based on the network delay information.

[0119] Optionally, the first sending module 601 is specifically configured to add a performance test identifier and a delay test identifier to the data packet when indicating that the type of the data packet is a delay test packet.

[0120] Optionally, the data packet carries a first sending timestamp when the client sends the data packet; the delay test response packet carries the first sending timestamp when the client sends the data packet, the second receiving timestamp when the server receives the data packet, and the second sending timestamp when the server sends the delay test response packet; the calculation module 602 is specifically used to obtain the first receiving timestamp when the client receives the delay test response packet; calculate the first difference between the first receiving timestamp and the first sending timestamp, and the second difference between the second sending timestamp and the second receiving timestamp, and determine the difference between the first difference and the second difference as the network delay information corresponding to the delay test packet.

[0121] Optionally, the generation module 603 includes: a first statistical unit, used to obtain network delay test statistical information based on the network delay information corresponding to each delay test packet; and a first generation unit, used to generate a network delay test report containing the network delay test statistical information.

[0122] Optionally, the client further includes: a packet loss processing module, configured to determine that the delay test packet is lost if the type of the data packet is indicated as a delay test packet and if a delay test response packet fed back by the server through the video transmission channel is not received within a preset time length;

[0123] The generation module 603 includes: a second statistical unit, used to obtain network delay test statistical information and delay test packet loss statistical information based on the network delay information corresponding to each delay test packet; a second generation unit, used to generate a network delay test report containing the network delay test statistical information and the delay test packet loss statistical information.

[0124] Reference Figure 7 , shows a structural block diagram of a server in an embodiment of the present invention.

[0125] like Figure 7 As shown, the server can include the following modules:

[0126] The receiving module 701 is used to receive a data packet sent by the client through a video transmission channel established with the client;

[0127] The second sending module 702 is used to send a delay test response packet to the client through the video transmission channel if it is determined that the type of the data packet is a delay test packet; the delay test response packet is used by the client to calculate the network delay information corresponding to the delay test packet, and generate a network delay test report based on the network delay information.

[0128] Optionally, the data packet carries a performance test identifier and a delay test identifier; the second sending module 702 includes: a first processing unit, used to save the data packet in a performance test queue after determining that the data packet carries the performance test identifier; a second processing unit, used to extract the data packet from the performance test queue using a performance test dequeue thread, and after determining that the data packet carries the delay test identifier, determine that the type of the data packet is a delay test packet, and send a delay test response packet to the client through the video transmission channel.

[0129] In an embodiment of the present invention, a delay test packet and a delay test response packet are interacted between a client and a server based on a video transmission channel. The client can calculate network delay information based on the delay test response packet fed back by the server. This calculation method is not affected by other factors outside the network. The network delay information calculated based on the data packet is more accurate. In addition, this network test method is not limited by the network type and has stronger versatility.

[0130] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0131] In an embodiment of the present invention, an electronic device is further provided. The electronic device may include a processor and a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium; when the computer program is executed by the processor, the processor executes the network testing method of any of the above embodiments.

[0132] Reference Figure 8 , shows a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 8 As shown, the electronic device 80 includes a processor 801 and a computer-readable storage medium 802 , on which a computer program 8021 is stored.

[0133] The processor 801 is used to execute the computer program 8021 stored on the computer-readable storage medium 802. When executing the computer program 8021, the processor 801 implements the network testing method of any of the above embodiments and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0134] The processor 801 mentioned above may include but is not limited to: a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0135] The computer-readable storage medium 802 mentioned above may include but is not limited to: read-only memory (ROM), random access memory (RAM), compact disc read-only memory (CD-ROM), electronic erasable programmable read-only memory (EEPROM), hard disk, floppy disk, flash memory, etc.

[0136] In an embodiment of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored. The computer program can be executed by a processor of an electronic device. When the computer program is executed by the processor, the processor executes the network testing method described in any of the above embodiments.

[0137] Reference Fig. 9 , shows a block diagram of a computer-readable storage medium according to an embodiment of the present invention. Fig. 9 As shown, a computer program 901 is stored on a computer-readable storage medium 90. When the computer program 901 is executed by a processor, the processor executes the network testing method described in any of the above embodiments and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0138] It should be noted that all actions of acquiring signals, information or data in the present invention are performed in compliance with the corresponding data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0139] The various embodiments in this specification are interrelated, and each embodiment is described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referenced to each other.

[0140] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0141] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0144] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0145] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0146] The network testing method, client, server, electronic device and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A network testing method, characterized in that: The method is executed on a client, and comprises: Sending a data packet to the server based on the video transmission channel established with the server, and indicating the type of the data packet to the server; If the type of the data packet is indicated to be a delay test packet, receiving a delay test response packet fed back by the server through the video transmission channel, and calculating network delay information corresponding to the delay test packet based on the delay test response packet; Based on the network delay information, a network delay test report is generated.

2. The method according to claim 1, characterized in that The type of the data packet indicated to the server includes: When indicating that the type of the data packet is a delay test packet, a performance test identifier and a delay test identifier are added to the data packet.

3. The method according to claim 1, characterized in that The data packet carries a first sending timestamp when the client sends the data packet; the delay test response packet carries a first sending timestamp when the client sends the data packet, a second receiving timestamp when the server receives the data packet, and a second sending timestamp when the server sends the delay test response packet; Calculating network delay information corresponding to the delay test packet based on the delay test response packet includes: Obtaining a first receiving timestamp when the client receives the delay test response packet; Calculate a first difference between the first receiving timestamp and the first sending timestamp, and a second difference between the second sending timestamp and the second receiving timestamp, and determine the difference between the first difference and the second difference as the network delay information corresponding to the delay test packet.

4. The method according to claim 1, characterized in that: Based on the network delay information, a network delay test report is generated, including: Based on the network delay information corresponding to each delay test packet, obtain network delay test statistical information; Generate a network delay test report containing the network delay test statistical information.

5. The method according to claim 1, characterized in that After sending a data packet based on the video transmission channel established with the server and indicating the type of the data packet to the server, the method further includes: if the type of the data packet is a delay test packet, when a delay test response packet fed back by the server through the video transmission channel is not received within a preset time length, determining that the delay test packet is lost; Based on the network delay information, a network delay test report is generated, including: Based on the network delay information corresponding to each delay test packet, obtain network delay test statistical information and obtain delay test packet loss statistical information; Generate a network delay test report including the network delay test statistical information and the delay test packet loss statistical information.

6. A network testing method, characterized in that: Applied to the server, the method includes: Receiving a data packet sent by the client through a video transmission channel established between the client and the client; If it is determined that the type of the data packet is a delay test packet, a delay test response packet is sent to the client through the video transmission channel; the delay test response packet is used by the client to calculate the network delay information corresponding to the delay test packet, and generate a network delay test report based on the network delay information.

7. The method according to claim 6, characterized in that The data packet carries a performance test identifier and a delay test identifier; if it is determined that the type of the data packet is a delay test packet, sending a delay test response packet to the client through the video transmission channel, including: After determining that the data packet carries the performance test identifier, saving the data packet into a performance test queue; The data packet is extracted from the performance test queue by using a performance test dequeue thread, and after determining that the data packet carries the delay test identifier, the type of the data packet is determined to be a delay test packet, and a delay test response packet is sent to the client through the video transmission channel.

8. A client, characterized in that: The client comprises: A first sending module, configured to send a data packet to the server based on a video transmission channel established with the server, and indicate the type of the data packet to the server; A calculation module, configured to receive a delay test response packet fed back by the server through the video transmission channel if the type of the data packet is indicated to be a delay test packet, and calculate network delay information corresponding to the delay test packet based on the delay test response packet; A generating module is used to generate a network delay test report based on the network delay information.

9. A server, characterized in that: The server includes: A receiving module, used for receiving a data packet sent by a client through a video transmission channel established between the client and the client; The second sending module is used to send a delay test response packet to the client through the video transmission channel if it is determined that the type of the data packet is a delay test packet; the delay test response packet is used by the client to calculate the network delay information corresponding to the delay test packet, and generate a network delay test report based on the network delay information.

10. An electronic device, characterized in that: The electronic device includes a processor and a computer-readable storage medium, on which a computer program is stored; when the computer program is executed by the processor, the processor executes the network testing method as described in any one of claims 1 to 5, or executes the network testing method as described in any one of claims 6 to 7.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the network testing method according to any one of claims 1 to 5, or executes the network testing method according to any one of claims 6 to 7.