CN110572299A - equipment testing method, system, device, network node, terminal and storage medium - Google Patents

equipment testing method, system, device, network node, terminal and storage medium Download PDF

Info

Publication number
CN110572299A
CN110572299A CN201910816095.7A CN201910816095A CN110572299A CN 110572299 A CN110572299 A CN 110572299A CN 201910816095 A CN201910816095 A CN 201910816095A CN 110572299 A CN110572299 A CN 110572299A
Authority
CN
China
Prior art keywords
network node
data
sending
rate
state
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.)
Granted
Application number
CN201910816095.7A
Other languages
Chinese (zh)
Other versions
CN110572299B (en
Inventor
孙祥宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910816095.7A priority Critical patent/CN110572299B/en
Publication of CN110572299A publication Critical patent/CN110572299A/en
Application granted granted Critical
Publication of CN110572299B publication Critical patent/CN110572299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Abstract

the embodiment of the invention provides a device testing method, a system, a device, a network node, a terminal and a storage medium, and relates to the technical field of network communication, wherein the device testing method comprises the following steps: the method comprises the steps that a client sends a data acquisition request to a network node according to a first sending rate, the network node responds to the data acquisition request, sends data requested by the received data acquisition request to the client, detects the running state of the network node, sends a rate adjustment request to the client under the condition that the running state is not a stable state, and the client adjusts the first sending rate to obtain a second sending rate and sends the data acquisition request according to the second sending rate; and under the condition that the operation state is a stable state, obtaining the stable sending rate of the data sent by the network node to the client under the stable state, and taking the stable sending rate as a test result for testing the data sending performance of the network node. By applying the scheme provided by the embodiment of the invention, the performance of the data sent by the network node can be tested.

Description

equipment testing method, system, device, network node, terminal and storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a device testing method, system, apparatus, network node, terminal, and storage medium.
Background
in a P2P (Peer-to-Peer computer network) network, network nodes may share a portion of the data resources they own. Specifically, the client may send a data acquisition request to a network node in the network, and after receiving the data acquisition request, the network node sends data requested by the request to the client. Wherein, the sending rate of data is an important index for measuring the performance of the network node. In the prior art, in order to fully test the performance of a network node and thus achieve continuous optimization of the network node, it is necessary to detect the data transmission rate of the network node.
Therefore, a method for testing a device of a network node is needed to test the performance of the network node for sending data.
disclosure of Invention
the embodiment of the invention aims to provide a device testing method, a system, a device, a network node, a terminal and a storage medium, so as to test the performance of data sent by the network node. The specific technical scheme is as follows:
In a first aspect, an embodiment of the present invention provides an apparatus testing method, which is applied to a system including a client and a network node, where the method includes:
The client sends a data acquisition request to the network node according to a first sending rate;
the network node responds to the data acquisition request, sends the data requested by the received data acquisition request to the client, and detects the running state of the network node; and sending a rate adjustment request to the client under the condition that the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate; and, under the condition that the operating state is a steady state, obtaining a steady sending rate at which the network node sends data to the client in the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance;
And the client adjusts the first sending rate according to the rate adjustment request to obtain a second sending rate, and sends a data acquisition request according to the second sending rate.
In a second aspect, an embodiment of the present invention provides an apparatus testing method, which is applied to a network node, and the method includes:
Receiving a data acquisition request sent by a client according to a first sending rate, sending data requested by the received data acquisition request to the client, and detecting the running state of the network node;
sending a rate adjustment request to the client when the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate;
under the condition that the running state is a steady state, obtaining a steady sending rate of the data sent by the network node to the client under the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, wherein the steady state is as follows: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
In an embodiment of the present invention, the non-steady state includes an overload state and an underload state, and sending a rate adjustment request to the client when the operating state is the non-steady state includes:
Sending a rate reduction request to the client under the condition that the running state is an overload state;
And sending a rate up-regulation request to the client under the condition that the running state is an underload state.
in an embodiment of the present invention, the detecting the operation status of the network node includes:
Detecting the ratio of non-overtime data in the sent data to the sent data, and obtaining the operation state of the network node according to the ratio, wherein the non-overtime data is as follows: the time interval between the data sending time and the data request receiving time is less than the first preset time;
Or
and detecting the testing time length between the current time and the time of receiving the data acquisition request for the first time, and acquiring the running state of the network node according to the testing time length.
in an embodiment of the present invention, the obtaining the operation status of the network node according to the ratio includes:
Under the condition that the ratio is smaller than a preset lower limit threshold, acquiring that the running state of the network node is an overload state;
and under the condition that the ratio is greater than a preset upper limit threshold value, acquiring that the running state of the network node is an underload state.
in an embodiment of the present invention, the obtaining the operation state of the network node according to the test duration includes:
Under the condition that the test duration reaches a second preset duration, acquiring that the running state of the network node is a stable state;
And under the condition that the test duration does not reach the second preset duration, acquiring that the running state of the network node is a non-stable state.
In an embodiment of the present invention, the obtaining a smooth sending rate at which the network node sends data to the client in a smooth state includes:
and acquiring the rate of sending data to the client within a third preset time length in a steady state by the network node as a steady sending rate.
in an embodiment of the present invention, the network node is in the same lan as the client.
In an embodiment of the present invention, after the step of using the smooth sending rate as a test result for testing the data sending performance of the network node, the method further includes:
And sending the test result to the client.
in a third aspect, an embodiment of the present invention provides an apparatus testing method, which is applied to a client, and the method includes:
Sending a data acquisition request to a network node according to a first sending rate;
Receiving a rate adjustment request sent by the network node under the condition that the running state is a non-steady state;
And adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending a data acquisition request according to the second sending rate.
In an embodiment of the present invention, before the sending the data obtaining request to the network node according to the first sending rate, the method further includes:
Acquiring a data acquisition request template and acquiring data information of data to be requested;
And generating a data acquisition request according to the data acquisition request template and the data information.
In an embodiment of the present invention, an initial value of the first sending rate is lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to data processing performance of the network node.
In an embodiment of the present invention, the adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate includes:
When the rate adjustment request is a rate up-regulation request, the first sending rate is up-regulated to obtain a second sending rate;
Or
And when the rate adjustment request is a rate down-regulation request, the first sending rate is down-regulated to obtain a second sending rate.
in a fourth aspect, an embodiment of the present invention provides an apparatus testing system, where the system includes a client and a network node, where:
The client is used for sending a data acquisition request to the network node according to a first sending rate;
The network node is used for responding to the data acquisition request, sending the data requested by the received data acquisition request to the client, and detecting the running state of the network node; and sending a rate adjustment request to the client under the condition that the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate; and, under the condition that the operating state is a steady state, obtaining a steady sending rate at which the network node sends data to the client in the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance;
And the client is used for adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending a data acquisition request according to the second sending rate.
In a fifth aspect, an embodiment of the present invention provides an apparatus for testing devices, which is applied to a network node, and the apparatus includes:
The request response module is used for receiving a data acquisition request sent by a client according to a first sending rate and sending data requested by the received data acquisition request to the client;
The state detection module is used for detecting the running state of the network node;
a request sending module, configured to send a rate adjustment request to the client when the operating state is a non-steady state, where the non-steady state is: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate;
The device testing module is configured to, when the operating state is a steady state, obtain a steady sending rate at which the network node sends data to the client in the steady state, and use the steady sending rate as a test result for testing data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
In an embodiment of the present invention, the non-steady state includes an overload state and an underload state, and the request sending module is specifically configured to:
sending a rate reduction request to the client under the condition that the running state is an overload state;
And sending a rate up-regulation request to the client under the condition that the running state is an underload state.
In an embodiment of the present invention, the status detection module includes:
a ratio detection unit, configured to detect a ratio of non-timeout data in the sent data to the sent data, and obtain an operating state of the network node according to the ratio, where the non-timeout data is: the time interval between the data sending time and the data request receiving time is less than the first preset time;
Or
and the time length detection unit is used for detecting the test time length between the current time and the time of receiving the data acquisition request for the first time and obtaining the running state of the network node according to the test time length.
in an embodiment of the present invention, the ratio detecting unit is specifically configured to:
Detecting the ratio of non-overtime data in the sent data to the sent data, and acquiring that the running state of the network node is an overload state under the condition that the ratio is smaller than a preset lower limit threshold;
and under the condition that the ratio is greater than a preset upper limit threshold value, acquiring that the running state of the network node is an underload state.
In an embodiment of the present invention, the duration detecting unit is specifically configured to:
detecting the testing time length between the current time and the time when the data acquisition request is received for the first time, and acquiring that the running state of the network node is a stable state under the condition that the testing time length reaches a second preset time length;
and under the condition that the test duration does not reach the second preset duration, acquiring that the running state of the network node is a non-stable state.
in an embodiment of the present invention, the device testing module is specifically configured to:
And under the condition that the running state is a steady state, obtaining the rate of sending data to the client by the network node within a third preset time length in the steady state as a steady sending rate, and using the steady sending rate as a test result for testing the data sending performance of the network node.
In an embodiment of the present invention, the network node is in the same lan as the client.
In one embodiment of the present invention, the apparatus further comprises:
And the result sending module is used for sending the test result to the client after the equipment testing module is triggered.
In a sixth aspect, an embodiment of the present invention provides an apparatus for testing devices, which is applied to a client, where the apparatus includes:
the data request module is used for sending a data acquisition request to the network node according to a first sending rate;
a request receiving module, configured to receive a rate adjustment request sent by the network node when the operation state is a non-steady state;
And the rate adjusting module is used for adjusting the first sending rate according to the rate adjusting request to obtain a second sending rate, and sending a data obtaining request according to the second sending rate.
in one embodiment of the present invention, the apparatus further comprises:
and the request generation module is used for acquiring a data acquisition request template before the data request module is triggered, acquiring data information of data to be requested, and generating a data acquisition request according to the data acquisition request template and the data information.
In an embodiment of the present invention, an initial value of the first sending rate is lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to data processing performance of the network node.
In an embodiment of the present invention, the rate adjustment module is specifically configured to:
When the rate adjustment request is a rate up-regulation request, the first sending rate is up-regulated to obtain a second sending rate; or, in the case that the rate adjustment request is a rate down-regulation request, down-regulating the first sending rate to obtain a second sending rate;
And sending a data acquisition request according to the second sending rate.
In a seventh aspect, an embodiment of the present invention provides a network node, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
A memory for storing a computer program;
A processor for implementing the method steps of the second aspect when executing the program stored in the memory.
in an eighth aspect, an embodiment of the present invention provides a terminal, where the terminal is equipped with a client, and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the third aspect when executing the program stored in the memory.
In a ninth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the second aspects.
in a tenth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps in any one of the third aspects.
the embodiment of the invention has the following beneficial effects:
it can be seen from the above technical solutions that, when the device testing scheme provided by the embodiments of the present invention is applied to perform a performance test on a network node, a client sends a data acquisition request to the network node according to a first sending rate, the network node sends, in response to the data acquisition request, data requested by the received data acquisition request to the client, and detects an operating state of the network node, and when the operating state is in a non-steady state, it indicates that a data acquisition request amount that the network node needs to respond does not match its own data processing performance, so that a rate adjustment request is sent to the client, the client adjusts the first sending rate to adjust the data acquisition request amount, and when the operating state is in a steady state, it indicates that the data acquisition request amount that the network node needs to respond matches its own data processing performance, the obtained stable sending rate of the data sent by the network node to the client is close to the maximum rate of the data sent by the network node, so that the maximum rate of the data sent by the network node can be accurately tested by applying the scheme provided by the embodiment of the invention.
and because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the obtained test result can truly and accurately reflect the performance of the network node. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
Drawings
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
fig. 1 is an interaction diagram of an apparatus testing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a first device testing method according to an embodiment of the present invention;
Fig. 3 is a schematic flowchart of a second device testing method according to an embodiment of the present invention;
Fig. 4 is a schematic flowchart of a third method for testing devices according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus testing system according to an embodiment of the present invention;
FIG. 6 is an interaction diagram of another device testing system according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a first apparatus testing device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a second apparatus testing device according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a third apparatus testing device according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a fourth apparatus testing device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a fifth apparatus testing device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a network node according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
referring to fig. 1, fig. 1 is an interaction schematic diagram of a device testing method according to an embodiment of the present invention, and is applied to a system including a client and a network node.
the network node may be any node in the P2P network that provides shared data resources. Specifically, the physical machine corresponding to the network node may be an edge device such as a computer or a server. The client may be a test software installed on a terminal, the terminal is connected to the network node, and the connection mode may be physical connection, for example, the terminal and the network node may be connected by a data transmission cable; the connection may also be a network connection, for example, the terminal and the network node are connected via the internet.
the specific method of the equipment testing method comprises the following steps:
S101, a client sends a data acquisition request to a network node according to a first sending rate;
s102, the network node responds to the data acquisition request;
S103, the network node sends the data requested by the received data acquisition request to the client;
s104, the network node detects the running state;
s105, the network node sends a rate adjustment request to the client under the condition that the running state is a non-steady state, wherein the non-steady state is as follows: a state that the data acquisition request quantity needing to be responded is not matched with the data processing performance of the network node, wherein the data acquisition request quantity needing to be responded is positively correlated with the first sending rate;
s106, the client adjusts the first sending rate according to the rate adjustment request to obtain a second sending rate, and sends a data acquisition request according to the second sending rate;
s107, when the operation state of the network node is a steady state, obtaining a steady sending rate of the network node sending data to the client side in the steady state, and using the steady sending rate as a test result for testing the data sending performance of the network node, wherein the steady state is as follows: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
the operation state is information reflecting the operation condition of the network device, and is related to the data acquisition request quantity to be responded by the network node and the data processing performance of the network node. The data acquisition request amount that the network node needs to respond is the number of data acquisition requests that the network node has received. The data acquisition request quantity is positively correlated with a first sending rate at which the client sends the data acquisition request, and the larger the first sending rate is, the larger the data acquisition request quantity is, the smaller the first sending rate is, and the smaller the data acquisition request quantity is. The data processing performance of the network node is generally determined by the hardware performance of the network node, wherein the hardware performance includes the memory, the CPU frequency, and the like of the network node.
Specifically, when the performance of sending data by the network node is tested, the client may send a data obtaining request to the network node. The data obtaining request is used for requesting to obtain data stored in a network node, where the data may be all data stored in the network node or a part of data openly shared in the network node. The data obtaining request carries data information of a request instruction and data expected to be requested, and the data information can be a data name, a data identifier, a data storage position and the like. Each data acquisition request may be for requesting one or more of the data stored by the network node.
after receiving a data acquisition request sent by a client, a network node processes the received request, and the data acquisition request amount that the network node can respond to in unit time is related to the data processing performance of the network node, that is, the data processing performance of the network node can be measured by the data acquisition request amount that the network node can respond to in unit time.
When the amount of data acquisition requests received by the network node in unit time is large, a situation that the data acquisition requests are queued may occur in one situation, and further the data acquisition requests cannot be responded to in time. Another situation may arise where there are fewer resources available to respond to each data fetch request, resulting in a slow response to each data fetch request. In any case, it is shown that the amount of data acquisition requests that the network node needs to respond to exceeds its own data processing performance, that is, the amount of data acquisition requests that need to respond does not match its own data processing performance.
when the amount of the data acquisition request received by the network node in unit time is small, a large amount of resources of the network node are idle, which obviously means that the amount of the data acquisition request to be responded by the network node is lower than the data processing performance of the network node, and the amount of the data acquisition request to be responded is not matched with the data processing performance of the network node.
Under the two conditions, the data acquisition request quantity to be responded by the network node is not matched with the data processing performance of the network node, and the data acquisition request quantity to be responded by the network node needs to be continuously adjusted in order to ensure that the network node can normally operate.
in the case where the amount of the data acquisition request requiring response matches the data processing performance of the network node, the operation state of the network node may be referred to as a stationary state, corresponding to the non-stationary state.
that is, the operation state of the network node may be divided into a stationary state and a non-stationary state. The non-stationary state may further include an underload state and an overload state, because the non-stationary state may be caused by the amount of data acquisition requests that the network node needs to respond to exceeding its own data processing performance, and may be caused by the amount of data acquisition requests that the network node needs to respond to being lower than its own data processing performance.
In view of the above, in one embodiment of the present invention, the various states referred to above, from the perspective of standing per unit time, can be understood in light of the following description.
The above-mentioned steady state can be understood as: the data acquisition request quantity received in unit time of the network node is matched with the data processing performance of the network node.
The above-mentioned non-stationary state can be understood as: and the state that the data acquisition request quantity received in the unit time of the network node is not matched with the data processing performance of the network node.
the overload state can be understood as: the data acquisition request quantity received in unit time by the network node exceeds the data processing performance of the network node.
the above-mentioned underrun condition can be understood as: the data acquisition request quantity received in unit time by the network node is lower than the data processing performance of the network node.
under the condition that the running state of the network node is a stable state, the stable sending rate of the data sent by the network node to the client is obtained and used as a test result for performing performance test on the network node, and thus the obtained test result can truly reflect the optimal performance of the network node.
It can be seen from the above technical solutions that, when the device testing scheme provided by the embodiments of the present invention is applied to perform a performance test on a network node, a client sends a data acquisition request to the network node according to a first sending rate, the network node sends, in response to the data acquisition request, data requested by the received data acquisition request to the client, and detects an operating state of the network node, and when the operating state is in a non-steady state, it indicates that a data acquisition request amount that the network node needs to respond does not match its own data processing performance, so that a rate adjustment request is sent to the client, the client adjusts the first sending rate to adjust the data acquisition request amount, and when the operating state is in a steady state, it indicates that the data acquisition request amount that the network node needs to respond matches its own data processing performance, the obtained stable sending rate of the data sent by the network node to the client is close to the maximum rate of the data sent by the network node, so that the maximum rate of the data sent by the network node can be accurately tested by applying the scheme provided by the embodiment of the invention.
and because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the performance of the network node can be truly and accurately reflected. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first device testing method provided in the embodiment of the present invention, and is applied to a network node.
S201, receiving a data acquisition request sent by a client according to a first sending rate, sending data requested by the received data acquisition request to the client, and detecting the running state of a network node.
in an embodiment of the present invention, a terminal for installing a client and a network node first establish a communication connection, and specifically, the communication connection may be established based on a TCP (Transmission Control Protocol) or a UDP (User Datagram Protocol), which is not limited in the embodiments of the present invention.
In one embodiment of the invention, the network node is in the same local area network as the terminal where the client is installed. The local area network is a closed network, and data is transmitted in the local area network with strong stability, high reliability and high transmission rate.
the client receives an Internet Protocol (IP) Address of a network node which is expected to perform a device test and a port number of the network node, which are input by a user. Therefore, the client can directionally send the data acquisition request to the network node which is expected to carry out the equipment test according to the IP and the port number of the network node.
after receiving a data acquisition request sent by a client, a network node determines data requested by the data acquisition request from data stored in the network node, sends the determined data to the client, and detects an operating state in a process of processing the data acquisition request by the network node.
In an embodiment of the present invention, a ratio of non-timeout data in the sent data to the sent data may be detected, and the operation state of the network node may be obtained according to the ratio.
Wherein, the non-overtime data is: the time interval between the data sending time and the time of receiving the data request is less than a first preset time length, where the first preset time length may be 10 milliseconds, 50 milliseconds, 100 milliseconds, and the like, and the embodiment of the present invention does not limit this. For example, for a data acquisition request, the time when the network node obtains the request is 0 ms, the time when the data requested by the request is sent to the client is 30 ms, and the first preset time duration is 50 ms, since the time interval between the sending time of the data and the time when the data request is received is 30 ms, which is smaller than the first preset time duration, the data requested by the request is non-timeout data.
specifically, the ratio of the non-overtime data in the data sent by the network node to the sent data may be detected within a preset time period before the current time, or the ratio of the non-overtime data in a preset number of data sent by the network node before the current time to the sent data may be detected.
For example, it is detected that 100 pieces of data are sent by the network node within a preset time period before the current time, where 80 pieces of non-timeout data are detected, and the ratio of the non-timeout data to the sent data is 80%.
The ratio of the non-overtime data to the sent data can directly reflect the operation state of the network node, and when the operation state of the network node is good, the network node can send out the data in time, so that the ratio of the non-overtime data to the sent data is large; on the contrary, when the network node is in a poor operation state, the network node cannot send out the data in time, which may cause task accumulation, and the proportion of the data which is sent out overtime will be larger and larger, that is, the proportion of the data which is not overtime will be smaller and smaller. By detecting the ratio of the non-overtime data, the operation state of the network node can be accurately obtained.
in an embodiment of the present invention, after detecting a ratio of non-overtime data in transmitted data to the transmitted data, in a case that the ratio is greater than a preset upper threshold, it indicates that a data acquisition request amount that a network node needs to respond is lower than its own data processing performance, and therefore, it may be considered that an operating state of the network node is an underloaded state; under the condition that the ratio is smaller than the preset lower limit threshold, it is indicated that the data acquisition request quantity to be responded by the network node exceeds the data processing performance of the network node, so that the operation state of the network node can be considered as an overload state; in the case that the above ratio is between the upper threshold and the lower threshold, it means that the data acquisition request amount to which the network node needs to respond matches the data processing performance of the network node itself, and therefore the operation state of the network node can be considered to be a steady state.
Wherein the upper threshold is greater than the lower threshold. The specific values of the upper threshold and the lower threshold can be obtained according to application scenarios and empirical values. By adjusting the upper threshold and the lower threshold, the judgment condition of the network node operation state can be limited according to the requirement. When the precision of the upper limit threshold and the lower limit threshold is higher, the judgment on the running state of the network node is more accurate, and the accuracy of the obtained performance test result is higher.
Under the condition that the network node is in an underload state or an overload state, the task amount received by the network node in unit time is not matched with the data processing performance of the network node, and therefore the network node can be considered to be in a non-steady state.
The following is a description by way of specific examples. If the calculated ratio is 90% and is greater than the upper threshold 80%, it is assumed that the upper threshold is 80% and the lower threshold is 40%, which indicates that the data acquisition request amount that the network node needs to respond to is lower than the data processing performance of the network node itself, and therefore the operation state of the network node may be considered as an underload state; if the calculated ratio is 20% and is less than the lower threshold 40%, it indicates that the data acquisition request amount that the network node needs to respond exceeds the data processing performance of the network node itself, and therefore the operation state of the network node can be considered as an overload state; if the calculated ratio is 60% and is between the upper threshold 80% and the lower threshold 40%, it indicates that the data acquisition request amount to which the network node needs to respond matches with its own data processing performance, and therefore the network node may be considered to be in a steady state.
on the basis of the above embodiment, in an embodiment of the present invention, the operation state of the network node may also be determined according to a duration that the above ratio is within the threshold range. Wherein, the threshold range is: a range from a lower threshold to an upper threshold.
specifically, when the duration of which the ratio is within the threshold reaches the duration threshold, it is determined that the task amount received by the network node in unit time matches the data processing performance of the network node, and the operating state of the network node is considered to be a steady state, otherwise, it is determined that the task amount received by the network node in unit time does not match the data processing performance of the network node, and the operating state of the network node is considered to be a non-steady state. The duration threshold value can be obtained according to an application scene and a preliminary experiment.
In an embodiment of the present invention, a test duration between the current time and the time when the data acquisition request is received for the first time may also be detected, and the operation state of the network node may be obtained according to the test duration.
the network node starts to respond to the received request and detects the running state of the network node from the moment when the network node receives the data acquisition request for the first time, and sends a rate adjustment request to the client under the condition that the running state of the network node is in a non-steady state until the running state of the network node is in a steady state. That is, the rate at which the client sends the data acquisition request to the network node is continuously adjusted, and then the data acquisition request amount that the network node needs to respond is continuously adjusted, based on which, it can be considered that the data acquisition request amount that the network node needs to respond matches the data processing performance of the network node itself after a certain time period has elapsed since the network node first received the data acquisition request, and then it can be considered that the network node has finished adjusting the sending rate of the data acquisition request to the client, that is, the network node is in a stable state. Therefore, the running state of the network node is judged by detecting the test duration, the network node does not need to perform complex calculation, the performance resources of the network node can be saved, and the network node can better respond to the data acquisition request.
In one embodiment of the invention, after the test duration is obtained, when the test duration reaches a second preset duration, the client is considered to finish adjusting the first sending rate, and the data acquisition request quantity to be responded by the network node is matched with the data processing performance of the network node, so that the operation state of the network node is a stable state; under the condition that the test time length does not reach the second preset time length, the client is considered to have not adjusted the first sending rate, and the data acquisition request quantity to be responded by the network node is not matched with the data processing performance of the network node, so that the operation state of the network node is obtained to be a non-steady state.
the second preset time period may be 3 minutes, 5 minutes, 1 minute, and the like, and the specific value may be obtained according to an application scenario and an empirical value. Therefore, the time required by the test can be controlled by limiting the second preset time, when the second preset time is longer, the obtained running state of the network node is more accurate in a stable state, and when the second preset time is shorter, the time required by the equipment test is shorter, so that the test efficiency can be accelerated.
s202, sending a rate adjustment request to the client under the condition that the running state is a non-steady state.
under the condition that the operation state is a non-steady state, it is described that the data acquisition request quantity to be responded by the network node is not matched with the data processing performance of the network node, and therefore, the rate at which the client sends data to the network node to obtain the request needs to be adjusted, so that the data acquisition request quantity to be responded by the network node is matched with the data processing performance of the network node, and the network node can send a rate adjustment request to the client based on the rate adjustment request. And after receiving the rate adjustment request, the client adjusts the rate of sending the data acquisition request.
Referring to fig. 3, fig. 3 is a schematic flow chart of a second device testing method according to an embodiment of the present invention, where after receiving a rate adjustment request sent by a network node, a client adjusts the first sending rate to obtain a second sending rate, and continues to send a data acquisition request at the adjusted second sending rate. The network node needs to return to execute step S201, receive a data acquisition request sent by the client, send the requested data to the client, and detect the operating state of the network node.
in one embodiment of the invention, the non-steady state comprises an underload state and an overload state, and the speed down-regulation request is sent to the client terminal under the condition that the running state is the overload state, and the speed up-regulation request is sent to the client terminal under the condition that the running state is the underload state.
The rate down-regulation request is used for requesting the client to down-regulate the rate of sending the data acquisition request, and the rate up-regulation request is used for requesting the client to up-regulate the rate of sending the data acquisition request.
Under the condition that the operation state of the network node is an overload state, the data acquisition request amount required to be responded by the network node exceeds the data processing performance of the network node, and the data acquisition request amount received by the network node in unit time is related to the rate of sending the data acquisition request by the client, so that a rate down-regulation request needs to be sent to the client, and after the client receives the rate down-regulation request, the sending rate of the currently sent data acquisition request can be down-regulated, so that the rate is reduced when the client continuously sends the data acquisition request to the network node, namely, the data acquisition request amount received by the network node in unit time is reduced, and the data acquisition request amount required to be responded by the network node is reduced.
under the condition that the running state of the network node is an underload state, it is described that the data acquisition request amount required to be responded by the network node is lower than the data processing performance of the network node, and the data acquisition request amount received by the network node in unit time is related to the rate of sending the data acquisition request by the client, so that a rate up-regulation request needs to be sent to the client, and after receiving the rate up-regulation request, the client can up-regulate the sending rate of the currently sent data acquisition request, so that the rate of the client continuously sending the data acquisition request to the network node is reduced, that is, the data acquisition request amount sent to the network node in unit time is reduced, thereby being beneficial to reducing the data acquisition request amount required to be responded by the network node.
by sending the rate up-regulation request or the rate down-regulation request to the client, the client regulates the rate in a targeted manner according to the received rate up-regulation request or the received rate down-regulation request, so that the data acquisition request quantity required to be responded by the network node can be regulated, the running state of the network node can be further regulated, and finally, the network node can reach a stable state.
S203, under the condition that the operation state is a stable state, obtaining the stable sending rate of the data sent by the network node to the client under the stable state, and taking the stable sending rate as a test result for testing the data sending performance of the network node.
under the condition that the operation state of the network node is a stable state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, and the data acquisition request sending rate of the client and the data sending rate of the network node reach a balanced state.
In an embodiment of the present invention, a rate at which the network node sends data to the client within a third preset duration in a steady state may be obtained as a steady sending rate.
specifically, the data sending rate of the network node is fluctuating, and by obtaining the data sending rate of the network node within a period of time, the interference of the peak value or the trough value of the data sending rate of the network node can be eliminated, so that the obtained stable sending rate can reflect the performance of the network node more truly.
in an embodiment of the present invention, a rate at which the network node sends data to the client within a preset third duration may be obtained according to a preset time interval, and an average value of the obtained multiple rates is calculated to be used as a sending rate at which the network node sends data to the client.
for example, the preset time interval may be 10 seconds, the third duration may be 1 minute, the rate at which the network node sends data to the client within 1 minute is obtained every 10 seconds, 7 rates are obtained in total, and an average value of the 7 rates is calculated as the sending rate at which the network node sends data to the client.
in an embodiment of the present invention, the data amount of data sent by the network node to the client within a third preset time period in a steady state may also be counted, and an average sending rate of the network node within the third preset time period is calculated according to the data amount and the third preset time period, and is used as the steady sending rate.
It should be noted that there is no execution sequence for the above steps S202 and S203, and the execution of S202 and S203 depends only on the result of the operation state detected in S201.
in an embodiment of the present invention, after obtaining the test result, the network node may further send the test result to the client. Therefore, the client can conveniently display the test result, and the user can conveniently obtain the test result.
As can be seen from the above technical solutions, when the device testing scheme provided by the embodiments of the present invention is applied to perform a performance test on a network node, the network node receives a data acquisition request sent by a client at a first sending rate, sends data requested by the received data acquisition request to the client, and detects an operating state of the network node; under the condition that the operation state is a non-steady state, the data acquisition request quantity required to be responded by the network node is not matched with the data processing performance of the network node, so that a rate adjustment request is sent to the client, the first sending rate is adjusted by the client to realize the adjustment of the data acquisition request quantity, under the condition that the operation state is a steady state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, and the obtained steady sending rate of the data sent to the client by the network node is close to the maximum rate of the data sent by the network node.
And because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the obtained test result can truly and accurately reflect the performance of the network node. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
referring to fig. 4, fig. 4 is a schematic flowchart of a third device testing method provided in the embodiment of the present invention, and is applied to a client.
S401, sending a data acquisition request to a network node according to a first sending rate.
in one embodiment of the present invention, the initial value of the first sending rate may be lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to the data processing performance of the network node. Therefore, the client side sends the data acquisition request at a lower rate at first, then gradually adjusts the first sending rate according to the received rate adjustment request, and finally enables the network node to reach a stable state.
In an embodiment of the present invention, before sending the data acquisition request to the network node according to the first sending rate, the data acquisition request template may be further obtained, the data information of the data to be requested is obtained, and the data acquisition request is generated according to the data acquisition request template and the data information.
specifically, the data obtaining request template includes an instruction template and a data information template, and the data information template is replaced with the data information of the obtained data to be requested, so as to generate a data obtaining request. Therefore, a user does not need to manually input a data acquisition request, and the efficiency of the performance test of the equipment is improved.
in an embodiment of the present invention, a manually input data acquisition request template may be directly obtained, or a data acquisition request template may be generated according to a data acquisition request stored in a data acquisition request log. Specifically, when the network node uploads data, a data acquisition request log is generated, the data acquisition request actually received by the network node is stored in the log, and a data acquisition request template is obtained according to the actually received data acquisition request. The data obtaining request log may be a log generated during a network peak period of the network node, for example, the network peak period may be 20: 00-22:00.
s402, receiving a rate adjustment request sent by the network node under the condition that the operation state is a non-steady state.
s403, according to the rate adjustment request, adjusting the first sending rate to obtain a second sending rate, and sending the data acquisition request according to the second sending rate.
in one embodiment of the present invention, the rate adjustment request includes a rate up-adjustment request and a rate down-adjustment request, wherein, in a case that the rate adjustment request is the rate up-adjustment request, the first sending rate is up-adjusted to obtain a second sending rate; and under the condition that the rate adjustment request is a rate down-regulation request, down-regulating the first sending rate to obtain a second sending rate. The client adjusts the rate in a targeted manner according to the received rate up-regulation request or rate down-regulation request, so that the data acquisition request quantity required to be responded by the network node can be adjusted, the running state of the network node can be further adjusted, and finally the network node can reach a stable state.
In an embodiment of the present invention, when the first sending rate is adjusted to obtain the second sending rate, the first sending rate may be adjusted according to a preset ratio. Wherein the preset ratio may be 10%, 5%, 20%, etc.
for example, assuming that the preset ratio is 10%, the first transmission rate is 10Mbps, and in the case of up-regulating the first transmission rate, the second transmission rate is
10Mbps*(1+10%)=11Mbps
In another embodiment of the present invention, when the first sending rate is adjusted to obtain the second sending rate, the adjustment may be performed according to a preset difference. Wherein, the preset difference value can be 0.1Mbps, 0.2Mbps, 0.05Mbps, etc.
for example, assuming that the preset difference is 0.1Mbps and the first transmission rate is 10Mbps, in the case of up-regulating the first transmission rate, the second transmission rate is
10Mbps+0.1Mbps=10.1Mbps
As can be seen from the above technical solutions, when the performance of the network node is tested by applying the device testing scheme provided by the embodiment of the present invention, the client sends a data acquisition request to the network node according to the first sending rate; receiving a rate adjustment request sent by a network node under the condition that the running state is a non-steady state; and adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending the data acquisition request according to the second sending rate. The network node receives a data acquisition request sent by a client according to a first sending rate, sends data requested by the received data acquisition request to the client, and detects the running state of the network node; under the condition that the operation state is a non-steady state, the data acquisition request quantity required to be responded by the network node is not matched with the data processing performance of the network node, so that a rate adjustment request is sent to the client, the first sending rate is adjusted by the client to realize the adjustment of the data acquisition request quantity, under the condition that the operation state is a steady state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, and the obtained steady sending rate of the data sent to the client by the network node is close to the maximum rate of the data sent by the network node.
and because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the obtained test result can truly and accurately reflect the performance of the network node. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus testing system provided in an embodiment of the present invention, where the system includes a client 501 and a network node 502, where:
The client 501 is configured to send a data acquisition request to the network node 502 according to a first sending rate;
The network node 502 is configured to respond to the data obtaining request, send data requested by the received data obtaining request to the client 501, and detect an operating state of the network node 502; and sending a rate adjustment request to the client 501 when the operating state is a non-steady state, where the non-steady state is: a state in which a data acquisition request amount to be responded, which is positively correlated with the first sending rate, is not matched with the data processing performance of the network node 502; and, when the operating state is a steady state, obtaining a steady sending rate at which the network node 502 sends data to the client in the steady state, and using the steady sending rate as a test result for testing the data sending performance of the network node 502, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance;
The client 501 is configured to adjust the first sending rate according to the rate adjustment request to obtain a second sending rate, and send a data acquisition request according to the second sending rate.
It can be seen from the above technical solutions that, when the device testing scheme provided by the embodiments of the present invention is applied to perform a performance test on a network node, a client sends a data acquisition request to the network node according to a first sending rate, the network node sends, in response to the data acquisition request, data requested by the received data acquisition request to the client, and detects an operating state of the network node, and when the operating state is in a non-steady state, it indicates that a data acquisition request amount that the network node needs to respond does not match its own data processing performance, so that a rate adjustment request is sent to the client, the client adjusts the first sending rate to adjust the data acquisition request amount, and when the operating state is in a steady state, it indicates that the data acquisition request amount that the network node needs to respond matches its own data processing performance, the obtained stable sending rate of the data sent by the network node to the client is close to the maximum rate of the data sent by the network node, so that the maximum rate of the data sent by the network node can be accurately tested by applying the scheme provided by the embodiment of the invention.
And because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the performance of the network node can be truly and accurately reflected. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
Referring to fig. 6, fig. 6 is an interaction schematic diagram of another device testing system provided in the embodiment of the present invention, where the system includes a client and a network node, where the client and the network node implement testing on the network node according to the following steps:
S601, the client generates a data acquisition request;
S602, the client sends a data acquisition request to the network node according to a first sending rate;
s603, the network node responds to the data acquisition request, specifically, the network node receives the data acquisition request and searches the data requested by the data acquisition request in the data stored in the network node;
S604, the network node sends the data requested by the searched data acquisition request to the client;
S605, the network node detects the running state;
s606, the network node sends a speed adjustment request to the client according to the detected running state until the test time is reached;
s607, the client adjusts the first sending rate of the data obtaining request according to the received rate adjusting request, and continues to send the data obtaining request to the network node until the test is finished;
s608, when the testing time is up, the network node obtains the stable sending rate of the sending data, and the stable sending rate is used as the testing result of the performance test of the network node;
s609, the network node sends the performance test result to the client;
S610, the client receives the performance test result and displays the performance test result.
referring to fig. 7, fig. 7 is a schematic structural diagram of a first device testing apparatus according to an embodiment of the present invention, which is applied to a network node, and the apparatus includes:
A request response module 701, configured to receive a data acquisition request sent by a client at a first sending rate, and send data requested by the received data acquisition request to the client;
A state detection module 702, configured to detect an operating state of the network node;
a request sending module 703, configured to send a rate adjustment request to the client when the operating state is a non-steady state, where the non-steady state is: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate;
An apparatus testing module 704, configured to, when the operating state is a steady state, obtain a steady sending rate at which the network node sends data to the client in the steady state, and use the steady sending rate as a test result for testing data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
in an embodiment of the present invention, the non-steady state includes an overload state and an underload state, and the request sending module 703 is specifically configured to:
Sending a rate reduction request to the client under the condition that the running state is an overload state;
And sending a rate up-regulation request to the client under the condition that the running state is an underload state.
By sending the rate up-regulation request or the rate down-regulation request to the client, the client regulates the rate in a targeted manner according to the received rate up-regulation request or the received rate down-regulation request, so that the data acquisition request quantity required to be responded by the network node can be regulated, the running state of the network node can be further regulated, and finally, the network node can reach a stable state.
As shown in fig. 8, in an embodiment of the present invention, the status detection module 702 includes:
a ratio detecting unit 7021, configured to detect a ratio of non-timeout data in the sent data to the sent data, and obtain an operating state of the network node according to the ratio, where the non-timeout data is: and the time interval between the data sending time and the data request receiving time is less than the first preset time.
the ratio of the non-overtime data to the sent data can directly reflect the operation state of the network node, and when the operation state of the network node is good, the network node can send out the data in time, so that the ratio of the non-overtime data to the sent data is large; on the contrary, when the network node is in a poor operation state, the network node cannot send out the data in time, which may cause task accumulation, and the proportion of the data which is sent out overtime will be larger and larger, that is, the proportion of the data which is not overtime will be smaller and smaller. By detecting the ratio of the non-overtime data, the operation state of the network node can be accurately obtained.
As shown in fig. 9, in an embodiment of the present invention, the status detection module 702 includes:
A duration detecting unit 7022, configured to detect a test duration between the current time and the time when the data obtaining request is received for the first time, and obtain the operating state of the network node according to the test duration.
therefore, the running state of the network node is judged by detecting the test duration, the network node does not need to perform complex calculation, the performance resources of the network node can be saved, and the network node can better respond to the data acquisition request.
In an embodiment of the present invention, the ratio detecting unit 7021 is specifically configured to:
Detecting the ratio of non-overtime data in the sent data to the sent data, and acquiring that the running state of the network node is an overload state under the condition that the ratio is smaller than a preset lower limit threshold;
And under the condition that the ratio is greater than a preset upper limit threshold value, acquiring that the running state of the network node is an underload state.
The specific values of the upper threshold and the lower threshold can be obtained according to application scenarios and empirical values. By adjusting the upper threshold and the lower threshold, the judgment condition of the network node operation state can be limited according to the requirement. When the precision of the upper limit threshold and the lower limit threshold is higher, the judgment on the running state of the network node is more accurate, and the accuracy of the obtained performance test result is higher.
In an embodiment of the present invention, the duration detecting unit 7022 is specifically configured to:
Detecting the testing time length between the current time and the time when the data acquisition request is received for the first time, and acquiring that the running state of the network node is a stable state under the condition that the testing time length reaches a second preset time length;
and under the condition that the test duration does not reach the second preset duration, acquiring that the running state of the network node is a non-stable state.
therefore, the time required by the test can be controlled by limiting the second preset time, when the second preset time is longer, the obtained running state of the network node is more accurate in a stable state, and when the second preset time is shorter, the time required by the equipment test is shorter, so that the test efficiency can be accelerated.
In an embodiment of the present invention, the device testing module 704 is specifically configured to:
And under the condition that the running state is a steady state, obtaining the rate of sending data to the client by the network node within a third preset time length in the steady state as a steady sending rate, and using the steady sending rate as a test result for testing the data sending performance of the network node.
Specifically, the data sending rate of the network node is fluctuating, and by obtaining the data sending rate of the network node within a period of time, the interference of the peak value or the trough value of the data sending rate of the network node can be eliminated, so that the obtained stable sending rate can reflect the performance of the network node more truly.
in an embodiment of the present invention, the network node is in the same lan as the client. The local area network is a closed network, and data is transmitted in the local area network with strong stability, high reliability and high transmission rate.
As can be seen from the above technical solutions, when the device testing scheme provided by the embodiments of the present invention is applied to perform a performance test on a network node, the network node receives a data acquisition request sent by a client at a first sending rate, sends data requested by the received data acquisition request to the client, and detects an operating state of the network node; under the condition that the operation state is a non-steady state, the data acquisition request quantity required to be responded by the network node is not matched with the data processing performance of the network node, so that a rate adjustment request is sent to the client, the first sending rate is adjusted by the client to realize the adjustment of the data acquisition request quantity, under the condition that the operation state is a steady state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, and the obtained steady sending rate of the data sent to the client by the network node is close to the maximum rate of the data sent by the network node.
And because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the obtained test result can truly and accurately reflect the performance of the network node. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
referring to fig. 10, fig. 10 is a schematic structural diagram of an apparatus testing device according to an embodiment of the present invention, which is applied to a client, and the apparatus includes:
a data request module 1001, configured to send a data acquisition request to a network node according to a first sending rate;
A request receiving module 1002, configured to receive a rate adjustment request sent by the network node when the operation state is a non-steady state;
A rate adjustment module 1003, configured to adjust the first sending rate according to the rate adjustment request, to obtain a second sending rate, and send a data acquisition request according to the second sending rate.
As shown in fig. 11, in an embodiment of the present invention, the apparatus further includes:
The request generating module 1101 is configured to, before the data requesting module 901 is triggered, obtain a data obtaining request template, obtain data information of data to be requested, and generate a data obtaining request according to the data obtaining request template and the data information. Therefore, a user does not need to manually input a data acquisition request, and the efficiency of the performance test of the equipment is improved.
in an embodiment of the present invention, an initial value of the first sending rate is lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to data processing performance of the network node. Therefore, the client side sends the data acquisition request at a lower rate at first, then gradually adjusts the first sending rate according to the received rate adjustment request, and finally enables the network node to reach a stable state.
in an embodiment of the present invention, the rate adjustment module 1003 is specifically configured to:
When the rate adjustment request is a rate up-regulation request, the first sending rate is up-regulated to obtain a second sending rate; or, in the case that the rate adjustment request is a rate down-regulation request, down-regulating the first sending rate to obtain a second sending rate;
And sending a data acquisition request according to the second sending rate.
The client adjusts the rate in a targeted manner according to the received rate up-regulation request or rate down-regulation request, so that the data acquisition request quantity required to be responded by the network node can be adjusted, the running state of the network node can be further adjusted, and finally the network node can reach a stable state.
as can be seen from the above technical solutions, when the performance of the network node is tested by applying the device testing scheme provided by the embodiment of the present invention, the client sends a data acquisition request to the network node according to the first sending rate; receiving a rate adjustment request sent by a network node under the condition that the running state is a non-steady state; and adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending the data acquisition request according to the second sending rate. The network node receives a data acquisition request sent by a client according to a first sending rate, sends data requested by the received data acquisition request to the client, and detects the running state of the network node; under the condition that the operation state is a non-steady state, the data acquisition request quantity required to be responded by the network node is not matched with the data processing performance of the network node, so that a rate adjustment request is sent to the client, the first sending rate is adjusted by the client to realize the adjustment of the data acquisition request quantity, under the condition that the operation state is a steady state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, and the obtained steady sending rate of the data sent to the client by the network node is close to the maximum rate of the data sent by the network node.
And because the maximum rate of the data sent by the network node can represent the optimal performance of the network node, the stable sending rate is used as a test result for testing the data sending performance of the network node, and the obtained test result can truly and accurately reflect the performance of the network node. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
An embodiment of the present invention further provides a network node, as shown in fig. 12, including a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, where the processor 1201, the communication interface 1202, and the memory 1203 complete mutual communication through the communication bus 1204,
a memory 1203 for storing a computer program;
The processor 1201 is configured to implement the steps of the device testing method applied to the network node when executing the program stored in the memory 1203.
The embodiment of the invention also provides a terminal, the terminal is provided with a client and comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus,
A memory for storing a computer program;
And the processor is used for realizing the steps of the equipment testing method applied to the client when executing the program stored in the memory.
the communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
in yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned device testing methods.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform any of the above-described device testing methods.
It can be seen that, when performing a device test by using the network node provided in the foregoing embodiment, when performing a device test by using the terminal provided in the foregoing embodiment, when performing a device test by using the computer program stored in the computer-readable storage medium provided in the foregoing embodiment, and when performing a device test by running the computer program product provided in the foregoing embodiment on a computer, the client sends a data acquisition request to the network node according to a first sending rate, the network node sends, in response to the data acquisition request, data requested by the received data acquisition request to the client, detects an operating state of the network node, and in a case that the operating state is a non-steady state, indicates that a data acquisition request amount that the network node needs to respond to does not match its own data processing performance, so as to send a rate adjustment request to the client, and adjusts the data acquisition request amount by adjusting the client at the first sending rate, under the condition that the operation state is a steady state, the data acquisition request quantity required to be responded by the network node is matched with the data processing performance of the network node, so that the steady sending rate of the network node for sending data to the client side under the steady state is obtained, and the steady sending rate is used as a test result for testing the data sending performance of the network node.
the network node, the terminal, the readable storage medium and the computer program product provided by the embodiment of the invention can quickly and accurately realize the equipment testing method provided by the embodiment of the invention. Therefore, the scheme provided by the embodiment of the invention can be used for testing the performance of the data sent by the network node.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
it is noted that, herein, 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, system embodiments, device embodiments, terminal embodiments, network node embodiments, computer-readable storage medium embodiments, and computer program product embodiments are substantially similar to method embodiments and are therefore described in a relatively simple manner, with reference to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (29)

1. a device testing method is applied to a system comprising a client and a network node, and comprises the following steps:
the client sends a data acquisition request to the network node according to a first sending rate;
The network node responds to the data acquisition request, sends the data requested by the received data acquisition request to the client, and detects the running state of the network node; and sending a rate adjustment request to the client under the condition that the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate; and, under the condition that the operating state is a steady state, obtaining a steady sending rate at which the network node sends data to the client in the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance;
And the client adjusts the first sending rate according to the rate adjustment request to obtain a second sending rate, and sends a data acquisition request according to the second sending rate.
2. An apparatus testing method applied to a network node, the method comprising:
Receiving a data acquisition request sent by a client according to a first sending rate, sending data requested by the received data acquisition request to the client, and detecting the running state of the network node;
Sending a rate adjustment request to the client when the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate;
Under the condition that the running state is a steady state, obtaining a steady sending rate of the data sent by the network node to the client under the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, wherein the steady state is as follows: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
3. the method of claim 2, wherein the non-steady state comprises an overload state and an underrun state, and wherein sending a rate adjustment request to the client if the operating state is the non-steady state comprises:
Sending a rate reduction request to the client under the condition that the running state is an overload state;
And sending a rate up-regulation request to the client under the condition that the running state is an underload state.
4. the method according to claim 2 or 3, wherein the detecting the operational status of the network node comprises:
detecting the ratio of non-overtime data in the sent data to the sent data, and obtaining the operation state of the network node according to the ratio, wherein the non-overtime data is as follows: the time interval between the data sending time and the data request receiving time is less than the first preset time;
or
And detecting the testing time length between the current time and the time of receiving the data acquisition request for the first time, and acquiring the running state of the network node according to the testing time length.
5. the method of claim 4, wherein the obtaining the operational status of the network node according to the ratio comprises:
under the condition that the ratio is smaller than a preset lower limit threshold, acquiring that the running state of the network node is an overload state;
And under the condition that the ratio is greater than a preset upper limit threshold value, acquiring that the running state of the network node is an underload state.
6. the method of claim 4, wherein obtaining the operational status of the network node according to the test duration comprises:
under the condition that the test duration reaches a second preset duration, acquiring that the running state of the network node is a stable state;
And under the condition that the test duration does not reach the second preset duration, acquiring that the running state of the network node is a non-stable state.
7. the method according to claim 2 or 3, wherein the obtaining of a steady sending rate at which the network node sends data to the client in a steady state comprises:
And acquiring the rate of sending data to the client within a third preset time length in a steady state by the network node as a steady sending rate.
8. A method according to claim 2 or 3, wherein the network node is in the same local area network as the client.
9. the method according to claim 2 or 3, wherein after the step of using the smooth sending rate as a test result for testing the data sending performance of the network node, the method further comprises:
And sending the test result to the client.
10. a device testing method is applied to a client side, and the method comprises the following steps:
Sending a data acquisition request to a network node according to a first sending rate;
receiving a rate adjustment request sent by the network node under the condition that the running state is a non-steady state;
And adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending a data acquisition request according to the second sending rate.
11. the method of claim 10, wherein prior to said sending data acquisition requests to the network node at the first sending rate, the method further comprises:
acquiring a data acquisition request template and acquiring data information of data to be requested;
And generating a data acquisition request according to the data acquisition request template and the data information.
12. the method according to claim 10 or 11, wherein the initial value of the first sending rate is lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to the data processing performance of the network node.
13. The method according to claim 10 or 11, wherein the adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate comprises:
When the rate adjustment request is a rate up-regulation request, the first sending rate is up-regulated to obtain a second sending rate;
Or
And when the rate adjustment request is a rate down-regulation request, the first sending rate is down-regulated to obtain a second sending rate.
14. A device testing system, the system comprising a client and a network node, wherein:
the client is used for sending a data acquisition request to the network node according to a first sending rate;
the network node is used for responding to the data acquisition request, sending the data requested by the received data acquisition request to the client, and detecting the running state of the network node; and sending a rate adjustment request to the client under the condition that the running state is a non-steady state, wherein the non-steady state is as follows: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate; and, under the condition that the operating state is a steady state, obtaining a steady sending rate at which the network node sends data to the client in the steady state, and taking the steady sending rate as a test result for testing the data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance;
and the client is used for adjusting the first sending rate according to the rate adjustment request to obtain a second sending rate, and sending a data acquisition request according to the second sending rate.
15. An apparatus for testing devices, disposed at a network node, the apparatus comprising:
The request response module is used for receiving a data acquisition request sent by a client according to a first sending rate and sending data requested by the received data acquisition request to the client;
the state detection module is used for detecting the running state of the network node;
A request sending module, configured to send a rate adjustment request to the client when the operating state is a non-steady state, where the non-steady state is: a state in which a data acquisition request amount to be responded does not match the data processing performance of the network node, the data acquisition request amount to be responded being positively correlated with the first sending rate;
The device testing module is configured to, when the operating state is a steady state, obtain a steady sending rate at which the network node sends data to the client in the steady state, and use the steady sending rate as a test result for testing data sending performance of the network node, where the steady state is: a state in which the amount of data acquisition requests that need to be responded matches the data processing performance.
16. the apparatus of claim 15, wherein the non-steady state comprises an overload state and an underrun state, and wherein the request sending module is specifically configured to:
Sending a rate reduction request to the client under the condition that the running state is an overload state;
and sending a rate up-regulation request to the client under the condition that the running state is an underload state.
17. the apparatus of claim 15 or 16, wherein the status detection module comprises:
A ratio detection unit, configured to detect a ratio of non-timeout data in the sent data to the sent data, and obtain an operating state of the network node according to the ratio, where the non-timeout data is: the time interval between the data sending time and the data request receiving time is less than the first preset time;
Or
and the time length detection unit is used for detecting the test time length between the current time and the time of receiving the data acquisition request for the first time and obtaining the running state of the network node according to the test time length.
18. the apparatus according to claim 17, wherein the ratio detection unit is specifically configured to:
Detecting the ratio of non-overtime data in the sent data to the sent data, and acquiring that the running state of the network node is an overload state under the condition that the ratio is smaller than a preset lower limit threshold;
and under the condition that the ratio is greater than a preset upper limit threshold value, acquiring that the running state of the network node is an underload state.
19. The apparatus according to claim 17, wherein the duration detecting unit is specifically configured to:
detecting the testing time length between the current time and the time when the data acquisition request is received for the first time, and acquiring that the running state of the network node is a stable state under the condition that the testing time length reaches a second preset time length;
and under the condition that the test duration does not reach the second preset duration, acquiring that the running state of the network node is a non-stable state.
20. The apparatus according to claim 15 or 16, wherein the device testing module is specifically configured to:
And under the condition that the running state is a steady state, obtaining the rate of sending data to the client by the network node within a third preset time length in the steady state as a steady sending rate, and using the steady sending rate as a test result for testing the data sending performance of the network node.
21. the apparatus according to claim 15 or 16, wherein the network node is in the same local area network as the client.
22. An apparatus for testing devices, which is provided at a client, the apparatus comprising:
The data request module is used for sending a data acquisition request to the network node according to a first sending rate;
a request receiving module, configured to receive a rate adjustment request sent by the network node when the operation state is a non-steady state;
And the rate adjusting module is used for adjusting the first sending rate according to the rate adjusting request to obtain a second sending rate, and sending a data obtaining request according to the second sending rate.
23. The apparatus of claim 22, further comprising:
and the request generation module is used for acquiring a data acquisition request template before the data request module is triggered, acquiring data information of data to be requested, and generating a data acquisition request according to the data acquisition request template and the data information.
24. The apparatus according to claim 22 or 23, wherein the initial value of the first sending rate is lower than a preset data processing rate, wherein the data processing rate is a rate obtained according to the data processing performance of the network node.
25. the apparatus according to claim 22 or 23, wherein the rate adjustment module is specifically configured to:
When the rate adjustment request is a rate up-regulation request, the first sending rate is up-regulated to obtain a second sending rate; or, in the case that the rate adjustment request is a rate down-regulation request, down-regulating the first sending rate to obtain a second sending rate;
And sending a data acquisition request according to the second sending rate.
26. a network node 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 the communication between the processor and the memory through the communication bus;
A memory for storing a computer program;
a processor for implementing the method steps of any of claims 2 to 9 when executing a program stored in the memory.
27. a terminal is provided with a client and is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 10 to 13 when executing a program stored in the memory.
28. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 2-9.
29. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 10-13.
CN201910816095.7A 2019-08-30 2019-08-30 Equipment testing method, system, device, network node, terminal and storage medium Active CN110572299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910816095.7A CN110572299B (en) 2019-08-30 2019-08-30 Equipment testing method, system, device, network node, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910816095.7A CN110572299B (en) 2019-08-30 2019-08-30 Equipment testing method, system, device, network node, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110572299A true CN110572299A (en) 2019-12-13
CN110572299B CN110572299B (en) 2021-10-22

Family

ID=68776980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910816095.7A Active CN110572299B (en) 2019-08-30 2019-08-30 Equipment testing method, system, device, network node, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110572299B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821019A (en) * 2021-11-22 2021-12-21 成都市卫莱科技有限公司 FPGA high-speed transceiver and dynamic control method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052583A1 (en) * 2006-11-02 2008-05-08 Nokia Siemens Networks Gmbh & Co. Kg Monitoring method and apparatus of processing of a data stream with high rate/flow
CN104580288A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Method and device for controlling request volumes of clients
CN105828391A (en) * 2015-01-22 2016-08-03 ***通信集团公司 Method for adjusting service rate, user equipment and base station
CN106921587A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 Message traffic control method, device and related system
CN107920027A (en) * 2016-10-08 2018-04-17 腾讯科技(深圳)有限公司 A kind of flow control methods and device
CN109257402A (en) * 2017-07-14 2019-01-22 阿里巴巴集团控股有限公司 Request amount control method and equipment
CN110022266A (en) * 2014-05-29 2019-07-16 华为技术有限公司 The control method and device of load transmission
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052583A1 (en) * 2006-11-02 2008-05-08 Nokia Siemens Networks Gmbh & Co. Kg Monitoring method and apparatus of processing of a data stream with high rate/flow
CN104580288A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Method and device for controlling request volumes of clients
CN110022266A (en) * 2014-05-29 2019-07-16 华为技术有限公司 The control method and device of load transmission
CN105828391A (en) * 2015-01-22 2016-08-03 ***通信集团公司 Method for adjusting service rate, user equipment and base station
CN106921587A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 Message traffic control method, device and related system
CN107920027A (en) * 2016-10-08 2018-04-17 腾讯科技(深圳)有限公司 A kind of flow control methods and device
CN109257402A (en) * 2017-07-14 2019-01-22 阿里巴巴集团控股有限公司 Request amount control method and equipment
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘拥民: "Internet端到端拥塞控制研究综述", 《计算机科学》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821019A (en) * 2021-11-22 2021-12-21 成都市卫莱科技有限公司 FPGA high-speed transceiver and dynamic control method thereof
CN113821019B (en) * 2021-11-22 2022-03-04 成都市卫莱科技有限公司 FPGA high-speed transceiver and dynamic control method thereof

Also Published As

Publication number Publication date
CN110572299B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
RU2419848C2 (en) Background sharing of network bandwidth after gateway devices
EP2808795B1 (en) Apparatus and method for monitoring a computer system
CN106385459B (en) Method and device for distributing connection request message
CN107409071B (en) Method for obtaining diagnosis test result, control module and computer readable storage medium
CN107395783B (en) IP address processing method, system, device and electronic equipment
US10230602B2 (en) Endpoint web monitoring system and method for measuring popularity of a service or application on a web server
WO2018031131A1 (en) Systems and methods for managing processing load
CN108616429B (en) reconnection method and device for push service
CN110519183B (en) Node speed limiting method and device, electronic equipment and storage medium
CN109921925B (en) Dial testing method and device
US8069236B2 (en) Flow control of events based on threshold, grace period, and event signature
CN112311628B (en) Network speed measuring method, system, network equipment and storage medium
EP2820432A1 (en) Method, apparatus and computer program for providing battery information
CN112015557A (en) Resource adjusting method and device and server
CN112118151A (en) Network speed measuring method, device, system, electronic equipment and storage medium
CN110874304A (en) Pressure testing method, device, equipment and computer readable storage medium
CN110572299B (en) Equipment testing method, system, device, network node, terminal and storage medium
CN112506619A (en) Job processing method, apparatus, electronic device, storage medium, and program product
CN109067794A (en) A kind of detection method and device of network behavior
CN114553762B (en) Method and device for processing flow table items in flow table
EP1684458A1 (en) A method of calculating broadband access server dhcp user's on-line time
CN109729016B (en) Message sending method, message sending equipment and computer readable storage medium
CN105245591A (en) Method and system for monitoring desktop cloud performance experience
CN108804152B (en) Method and device for adjusting configuration parameters
WO2019169727A1 (en) Network traffic test method and apparatus, device, and computer-readable 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
GR01 Patent grant
GR01 Patent grant