CN110022240B - Network state testing method and device and terminal equipment - Google Patents

Network state testing method and device and terminal equipment Download PDF

Info

Publication number
CN110022240B
CN110022240B CN201810018937.XA CN201810018937A CN110022240B CN 110022240 B CN110022240 B CN 110022240B CN 201810018937 A CN201810018937 A CN 201810018937A CN 110022240 B CN110022240 B CN 110022240B
Authority
CN
China
Prior art keywords
information
client
preset
trigger
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810018937.XA
Other languages
Chinese (zh)
Other versions
CN110022240A (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.)
Shenzhen Research Institute HKPU
Original Assignee
Shenzhen Research Institute HKPU
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 Shenzhen Research Institute HKPU filed Critical Shenzhen Research Institute HKPU
Priority to CN201810018937.XA priority Critical patent/CN110022240B/en
Publication of CN110022240A publication Critical patent/CN110022240A/en
Application granted granted Critical
Publication of CN110022240B publication Critical patent/CN110022240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Landscapes

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

Abstract

The invention is suitable for the technical field of internet communication, and provides a network state testing method, a testing device and terminal equipment, wherein the network state testing method comprises the following steps: receiving a first request sent by a client, and generating response information of the first request; feeding back response information of the first request to the client, and pushing first preset information to the client; receiving first feedback information and second feedback information sent by a client after executing the first preset information, and judging a network state by using the first feedback information and the second feedback information; the invention can quickly and accurately know the network state.

Description

Network state testing method and device and terminal equipment
Technical Field
The invention belongs to the technical field of internet communication, and particularly relates to a network state testing method, a testing device and terminal equipment.
Background
With the development of internet technology, the application of networks is spread over thousands of households. With the increase of the demand of web browsing, the amount of data transmitted by the network is also increased, which undoubtedly causes a great burden to the maintenance work of the network environment.
When browsing web pages, slow page loading is often encountered, which is often caused by network congestion. Therefore, how to quickly and accurately know the network state has important significance for improving the network data transmission efficiency, maintaining the network environment and improving the user experience.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a device and a terminal device for testing a network state, so as to solve the problem of how to quickly and accurately know a network state.
A first aspect of an embodiment of the present invention provides a method for testing a network state, including:
receiving a first request sent by a client, and generating response information of the first request;
feeding back response information of the first request to the client, and pushing first preset information to the client;
and receiving first feedback information and second feedback information which are sent by the client according to the sequence after the client executes the first preset information, and judging the network state by using the first feedback information and the second feedback information.
A second aspect of an embodiment of the present invention provides a network state testing apparatus, including:
the first receiving unit is used for receiving a first request sent by a client and generating response information of the first request;
the pushing unit is used for feeding back response information of the first request to the client and pushing first preset information to the client;
and the first judging unit is used for receiving first feedback information and second feedback information which are sent by the client according to the sequence after the first preset information is executed, and judging the network state by using the first feedback information and the second feedback information.
A third aspect of the present embodiment provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method provided in the first aspect of the present embodiment when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the method comprises the steps of receiving a first request sent by a client and generating response information of the first request; feeding back response information of the first request to the client, and pushing first preset information to the client; receiving first feedback information and second feedback information sent by a client after executing the first preset information, and judging a network state by using the first feedback information and the second feedback information; the network state can be rapidly and accurately known.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of a method for testing a network state according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a method for testing a network state according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a method for testing a network state according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a network state testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device provided in an embodiment of the present invention;
fig. 6 is a schematic diagram of a backward network state exception provided in this embodiment;
fig. 7 is a schematic diagram of a backward network state exception provided in this embodiment.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic implementation flow diagram of a method for testing a network state according to an embodiment of the present invention, and as shown in the drawing, the method may include the following steps:
step S101, receiving a first request sent by a client, and generating response information of the first request.
Step S102, feeding back response information of the first request to the client, and pushing first preset information to the client.
In practical application, after receiving a request sent by a client, a server returns response information corresponding to the request to the client, which can be regarded as a relationship between a request and a response. Illustratively, the server returns the page information to the client after receiving a request of the client to browse the page.
In the embodiment of the invention, the server sends the first preset information to the client while returning the response information corresponding to the request to the client. For example, the first preset information may be a JavaScript script. The client actively sends feedback information to the server after executing the JavaScript script, and specifically what feedback information is sent is preset in the JavaScript script. It should be noted that the "first" in the first request and the first preset information is only used to distinguish different requests and different preset information, and is not used for counting.
Step S103, receiving first feedback information and second feedback information which are sent by the client according to the sequence after the client executes the first preset information, and judging the network state by using the first feedback information and the second feedback information.
In practical application, the first preset information may be manually preset, and after the client executes the first preset information, two pieces of feedback information are generated and sent to the server according to the sequence. Specifically, the first feedback information is sent to the server first, and then the second feedback information is sent to the server according to the sequence. In practical applications, the interval between the sending of the first feedback information and the sending of the second feedback information is negligible.
Optionally, the determining a network status by using the first feedback information and the second feedback information includes:
if the first feedback information and the second feedback information are received according to a sending sequence within a first preset time, judging that the state of the forward network is normal, wherein the forward network is a network from the client to the server;
if the first feedback information is not received within a first preset time, judging that the first feedback information is lost;
and if the first feedback information is received within a first preset time and the second feedback information is not received, judging that the second feedback information is lost.
Optionally, the determining a network state by using the first feedback information and the second feedback information further includes:
and if the second feedback information and the first feedback information are received according to a first preset sequence within a first preset time, determining that the forward network is out of order.
In practical applications, the first preset time may be preset manually, and the set rule is that the first preset time is long enough to ensure that the server can completely receive the first feedback information and the second feedback information under the condition that the network is normal. Specifically, the receiving according to the sending sequence includes receiving the first feedback information first and then receiving the second feedback information. Specifically, the second feedback information is received first, and then the first feedback information is received according to the first preset sequence.
In this embodiment, the state of the forward network is tested, and the forward network is a network from the client to the server. In the forward network, the client is the sender and the server is the receiver.
For example, assuming that the time for the server to receive all the first feedback information and the second feedback information is 10s under the condition that the forward network is normal, the first preset time may be set to be 15s (with a certain grace time). If the first feedback information and the second feedback information are received within 15s, the forward network state is normal. If the first feedback information is received within 15s, but the second feedback information is not received, it indicates that the second feedback information is lost, i.e. it indicates that packet loss occurs to the network. If the first feedback information is not received within 15s, and the second feedback information is not received, it indicates that the first feedback information is lost, that is, it indicates that packet loss occurs to the network (because the first feedback information is received according to the transmission sequence, if the first feedback information is lost, the second feedback information will wait for the client to retransmit the first feedback information and then reach the server, and in this case, the second feedback information may also be lost). If the second feedback information is received first and then the first feedback information is received within 15s, the forward network disorder is indicated.
The embodiment of the invention receives a first request sent by a client and generates response information of the first request; feeding back response information of the first request to the client, and pushing first preset information to the client; receiving first feedback information and second feedback information which are sent by a client after the client executes the first preset information, and judging the network state by using the first feedback information and the second feedback information; the forward network state can be rapidly and accurately known.
Fig. 2 is a testing method of network status according to another embodiment of the present invention, and as shown in the figure, the method may include the following steps:
step S201, receiving a first request sent by a client, and generating response information of the first request.
Step S202, feeding back response information of the first request to the client, and pushing first preset information to the client.
Steps S201 and S202 are the same as steps S101 and S102, and specific contents can be found in steps S101 and S102.
Step S203, receiving a second request sent by the client, and generating response information of the second request.
Step S204, splitting the response information of the second request into first response information and second response information, and respectively constructing first trigger information and second trigger information for the first response information and the second response information; the first trigger information is used for indicating the client to send the first trigger information to the server after receiving the first response information, and the second trigger information is used for indicating the client to send the second trigger information to the server after receiving the second response information.
In practical applications, the first trigger information may be an RST _ STREAM frame (the role of this frame is termination), based on the characteristics of the HTTP/2 protocol; in this embodiment, the first response message may be made dependent on itself by using a PRIORITY frame, which may cause the client to send an RST _ STREAM frame to the server, and the second trigger message may be a SETTINGS frame (which may be used to cause the client to return an acknowledgment flag message to the server after receiving the frame). Step S205, after the first response information and the first preset trigger information are packaged, and the second response information and the second preset trigger information are packaged, they are respectively fed back to the client according to the sequence.
Optionally, after the first response information and the first preset trigger information are packaged, and the second response information and the second preset trigger information are packaged, and then are respectively fed back to the client according to the sequence, the method further includes:
if the first trigger information and the second trigger information fed back by the client are received according to the feedback sequence within a second preset time, the backward network state is normal, and the backward network is a network from the server to the client;
if the first trigger information fed back by the client is not received within a second preset time, determining that the first response information is lost;
and if the first trigger information fed back by the client and the second trigger information fed back by the client are not received within a second preset time, judging that the second response information is lost.
Optionally, after the first response information and the first preset trigger information are packaged, and the second response information and the second preset trigger information are packaged, and then are respectively fed back to the client according to the sequence, the method further includes:
and if second confirmation information, the first trigger information and the second trigger information corresponding to the second response information sent by the TCP layer are received within second preset time according to a second preset sequence, judging that the backward network is out of order.
In this embodiment, the backward network is a network from a server to a client, the server is a sender, and the client is a receiver.
The second preset sequence is specifically to receive first acknowledgement information corresponding to second response information sent by a Transmission Control Protocol (TCP) layer, and then receive the first trigger information and the second trigger information at the same time. In practical application, due to the TCP mechanism, if the two response messages are not returned according to the feedback sequence, the second response message will be buffered in the TCP layer, and the client will receive an acknowledgement message sent by the TCP layer to indicate that the TCP layer has received the second response message, until the client retransmits the first response message, the TCP layer will not submit the retransmitted first response message and the buffered second response message to the client together.
Illustratively, whether the first preset trigger information is triggered within the time A is confirmed; if the first preset trigger information is triggered in the time A, whether the second preset trigger information is triggered in the time B is confirmed; if the second preset trigger information is triggered within the time B, judging that the backward network state is normal; if the second preset trigger information is not triggered within the time B, judging that the second response information is lost; if the first preset trigger information is not triggered in the time A, whether confirmation information which is sent by a TCP layer and corresponds to the second response information is received in the time C is confirmed; if the confirmation information is received within the time C, the network is judged to be out of order; and if the confirmation information is not received within the time C, judging that the first response information is lost. It should be noted that A, B, C is only for distinguishing time, time a may be a time when the first preset trigger message is triggered in a normal network state, time B may be a time when the second preset trigger message is triggered after the first preset trigger message is triggered in a normal network state, and time C may be a time when the TCP layer receives the second preset trigger message after the first preset trigger message is triggered in a normal network state, where the specific time is not particularly limited.
Referring to fig. 6, fig. 6 is a schematic diagram of a backward network state exception provided in this embodiment. Fig. 6(a) shows a case where the first response information is lost, fig. 6(b) shows a case where the second response information is lost, and fig. 6(c) shows a case where the backward network is out of order. In the figure, client represents a client, server represents a server, Req _2 represents a second request, Resp _2_1 represents first response information, Resp _2_2 represents second response information, RST _ STREAM represents first preset trigger information, and SETTINGS ACK represents confirmation information of the second preset trigger information.
The embodiment of the invention receives a first request sent by a client and generates response information of the first request; feeding back response information of the first request to the client, and pushing first preset information to the client; receiving a second request sent by a client, and generating response information of the second request; splitting response information of the second request into first response information and second response information, and respectively constructing first trigger information and second trigger information for the first response information and the second response information; packaging the first response information and the first preset trigger information, and packaging the second response information and the second preset trigger information, and then feeding back the installation sequence to the client respectively; the state of the backward network can be rapidly and accurately known.
Fig. 3 is a testing method of network status according to another embodiment of the present invention, as shown in the figure, the method may further include the following steps:
step S301, sending second preset information to the client, where the second preset information is used to control the client to send a data packet to a server.
Step S302, if a data packet sent by the client to the server is not received after sending the second preset information to the client, determining that the currently sent second preset information is lost.
The embodiment is used for detecting the packet loss states of a plurality of streams. Wherein, the second preset information may be WINDOW _ UPDATE frame, and the role of this frame is: indicating the size of the data window to be increased. The client may send a response size packet back to the server only if the client receives the WINDOWs UPDATE frame sent by the server.
For example, assume that there are N streams, each with an ID of 2i-1, and i indicates the Nth stream. If the WINDOWs _ UPDATE frame sent by the server to the client, which is the ith to be used on the 2i-1 stream, is lost, the server can only receive packets on the 1 st to 2(i-1) -1 st streams. The client cannot send the data packets on the 2i-1 to 2N-1 streams to the server until the i-th retransmitted packet for the WINDOW _ UPDATE frame acting on the 2i-1 stream reaches the client. The server can determine which packet is lost by observing the stream ID of the collected data.
Referring to fig. 7, fig. 7 is a schematic diagram of a backward network state exception provided in this embodiment. In the figure, DATA represents a packet.
The embodiment of the invention sends second preset information to the client, wherein the second preset information is used for controlling the client to send a data packet to a server; if the data packet sent to the server by the client is not received after the second preset information is sent to the client, judging that the currently sent second preset information is lost; the lost packet can be quickly and accurately found out under the condition of transmitting a plurality of data packets.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic diagram of a network state testing apparatus provided in an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown.
The network state testing device 4 comprises:
a first receiving unit 41, configured to receive a first request sent by a client, and generate response information of the first request;
the pushing unit 42 is configured to feed back response information of the first request to the client, and push first preset information to the client;
a first determining unit 43, configured to receive first feedback information and second feedback information that are sent by the client according to the sequence after executing the first preset information, and determine a network state by using the first feedback information and the second feedback information.
Optionally, the determining unit 43 includes:
a first determining module, configured to determine that the forward network is in a normal state if the first feedback information and the second feedback information are received according to a sending sequence within a first preset time, where the forward network is a network from the client to the server;
the second judging module is used for judging that the first feedback information is lost if the first feedback information is not received within a first preset time;
and the third judging module is used for judging that the second feedback information is lost if the first feedback information is received within a first preset time and the second feedback information is not received.
Optionally, the determining unit 43 further includes:
a fourth determining module, configured to determine that the forward network is out of order if the second feedback information and the first feedback information are received according to a first preset order within a first preset time.
Optionally, the apparatus 4 further includes:
a second receiving unit 44, configured to receive a second request sent by the client after pushing the first preset information to the client, and generate response information of the second request;
a constructing unit 45, configured to split response information of the second request into first response information and second response information, and construct first trigger information and second trigger information for the first response information and the second response information, respectively; the first trigger information is used for indicating the client to send the first trigger information to the server after receiving the first response information, and the second trigger information is used for indicating the client to send the second trigger information to the server after receiving the second response information;
and a feedback unit 46, configured to respectively feed back the first response information and the first preset trigger information, and the second response information and the second preset trigger information to the client according to a sequence after the first response information and the first preset trigger information are packaged.
Optionally, the apparatus 4 further includes:
a second determining unit, configured to respectively feed back the first response information and the first preset trigger information, and the second response information and the second preset trigger information to the client according to a sequence after the first response information and the first preset trigger information are packaged, and if the first trigger information and the second trigger information fed back by the client are received according to a feedback sequence within a preset time, the backward network state is normal, where the backward network is a network from the server to the client;
a third determining unit, configured to determine that the first response message is lost if the first trigger message fed back by the client is not received within a preset time;
and the fourth judging unit is used for judging that the second response information is lost if the first triggering information fed back by the client and the second triggering information fed back by the client are not received within the preset time.
Optionally, the apparatus 4 further includes:
and a fifth determining unit, configured to, after the first response information and the first preset trigger information are packaged and the second response information and the second preset trigger information are packaged, respectively feed back to the client according to a sequence, and if second acknowledgement information, the first trigger information, and the second trigger information corresponding to the second response information sent by a TCP layer are received according to a second preset sequence within a second preset time, determine that the network is out of order backwards.
Optionally, the apparatus 4 further includes:
the sending unit is used for sending second preset information to the client, and the second preset information is used for controlling the client to send a data packet to the server;
a sixth determining unit, configured to determine that the currently sent second preset information is lost if a data packet sent to the server by the client is not received after the second preset information is sent to the client.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described respective camera control method embodiments, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 41 to 46 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a first receiving unit, a pushing unit, and a first determining unit, and the specific functions of each unit are as follows:
the first receiving unit is used for receiving a first request sent by a client and generating response information of the first request;
the pushing unit is used for feeding back response information of the first request to the client and pushing first preset information to the client;
and the first judging unit is used for receiving first feedback information and second feedback information which are sent by the client according to the sequence after the first preset information is executed, and judging the network state by using the first feedback information and the second feedback information.
Optionally, the determining unit includes:
a first determining module, configured to determine that the forward network is in a normal state if the first feedback information and the second feedback information are received according to a sending sequence within a first preset time, where the forward network is a network from the client to the server;
the second judging module is used for judging that the first feedback information is lost if the first feedback information is not received within a first preset time;
and the third judging module is used for judging that the second feedback information is lost if the first feedback information is received within a first preset time and the second feedback information is not received.
Optionally, the determining unit further includes:
a fourth determining module, configured to determine that the forward network is out of order if the second feedback information and the first feedback information are received according to a first preset order within a first preset time.
Optionally, the apparatus further comprises:
the second receiving unit is used for receiving a second request sent by the client after the first preset information is pushed to the client and generating response information of the second request;
a constructing unit, configured to split response information of the second request into first response information and second response information, and construct first trigger information and second trigger information for the first response information and the second response information, respectively; the first trigger information is used for indicating the client to send the first trigger information to the server after receiving the first response information, and the second trigger information is used for indicating the client to send the second trigger information to the server after receiving the second response information;
and the feedback unit is used for respectively feeding back the first response information and the first preset trigger information as well as the second response information and the second preset trigger information to the client according to the sequence after the first response information and the first preset trigger information are packaged.
Optionally, the apparatus further comprises:
a second determining unit, configured to respectively feed back the first response information and the first preset trigger information, and the second response information and the second preset trigger information to the client according to a sequence after the first response information and the first preset trigger information are packaged, and if the first trigger information and the second trigger information fed back by the client are received according to a feedback sequence within a preset time, the backward network state is normal, where the backward network is a network from the server to the client;
a third determining unit, configured to determine that the first response message is lost if the first trigger message fed back by the client is not received within a preset time;
and the fourth judging unit is used for judging that the second response information is lost if the first triggering information fed back by the client and the second triggering information fed back by the client are not received within the preset time.
Optionally, the apparatus further comprises:
and a fifth determining unit, configured to, after the first response information and the first preset trigger information are packaged and the second response information and the second preset trigger information are packaged, respectively feed back to the client according to a sequence, and if second acknowledgement information, the first trigger information, and the second trigger information corresponding to the second response information sent by a TCP layer are received according to a second preset sequence within a second preset time, determine that the network is out of order backwards.
Optionally, the apparatus further comprises:
the sending unit is used for sending second preset information to the client, and the second preset information is used for controlling the client to send a data packet to the server;
a sixth determining unit, configured to determine that the currently sent second preset information is lost if a data packet sent to the server by the client is not received after the second preset information is sent to the client.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (9)

1. A method for testing network status is characterized by comprising the following steps:
receiving a first request sent by a client, and generating response information of the first request;
feeding back response information of the first request to the client, and pushing first preset information to the client;
receiving first feedback information and second feedback information which are sent by a client according to the sequence after the client executes the first preset information, and judging the network state by using the first feedback information and the second feedback information;
after first preset information is pushed to the client, the method further comprises the following steps:
receiving a second request sent by a client, and generating response information of the second request;
splitting response information of the second request into first response information and second response information, and respectively constructing first trigger information and second trigger information for the first response information and the second response information; the first trigger information is used for indicating the client to send the first trigger information to a server after receiving the first response information, and the second trigger information is used for indicating the client to send the second trigger information to the server after receiving the second response information;
and after the first response information and the first trigger information are packaged and the second response information and the second trigger information are packaged, feeding back the packaged first response information and the packaged second trigger information to the client.
2. The method for testing network status according to claim 1, wherein the determining network status using the first feedback information and the second feedback information comprises:
if the first feedback information and the second feedback information are received according to a sending sequence within a first preset time, judging that a forward network state is normal, wherein the forward network is a network from the client to the server;
if the first feedback information is not received within a first preset time, judging that the first feedback information is lost;
and if the first feedback information is received within a first preset time and the second feedback information is not received, judging that the second feedback information is lost.
3. The method for testing network status according to claim 1, wherein the determining network status using the first feedback information and the second feedback information further comprises:
and if the second feedback information and the first feedback information are received according to a first preset sequence within a first preset time, judging that the forward network is out of order.
4. The method for testing network status according to claim 1, wherein after the first response information and the first trigger information are packaged and the second response information and the second trigger information are packaged, the first response information and the second trigger information are respectively fed back to the client according to a sequence, the method further comprises:
if the first trigger information and the second trigger information fed back by the client are received according to the feedback sequence within a second preset time, the backward network state is normal, and the backward network is a network from the server to the client;
if the first trigger information fed back by the client is not received within a second preset time, determining that the first response information is lost;
and if the first trigger information fed back by the client and the second trigger information fed back by the client are not received within a second preset time, judging that the second response information is lost.
5. The method for testing network status according to claim 1, wherein after the first response information and the first trigger information are packaged and the second response information and the second trigger information are packaged, the first response information and the second trigger information are respectively fed back to the client according to a sequence, the method further comprises:
and if second confirmation information, the first trigger information and the second trigger information corresponding to the second response information sent by the TCP layer are received within second preset time according to a second preset sequence, judging that the backward network is out of order.
6. The method for testing network status according to claim 1, further comprising:
sending second preset information to the client, wherein the second preset information is used for controlling the client to send a data packet to a server;
and if the data packet sent to the server by the client is not received after the second preset information is sent to the client, judging that the currently sent second preset information is lost.
7. A network status testing apparatus, comprising:
the first receiving unit is used for receiving a first request sent by a client and generating response information of the first request;
the pushing unit is used for feeding back response information of the first request to the client and pushing first preset information to the client;
a first determining unit, configured to receive first feedback information and second feedback information that are sent by a client according to a sequence after executing the first preset information, and determine a network state by using the first feedback information and the second feedback information;
after first preset information is pushed to the client, the method further comprises the following steps:
receiving a second request sent by a client, and generating response information of the second request;
splitting response information of the second request into first response information and second response information, and respectively constructing first trigger information and second trigger information for the first response information and the second response information; the first trigger information is used for indicating the client to send the first trigger information to a server after receiving the first response information, and the second trigger information is used for indicating the client to send the second trigger information to the server after receiving the second response information;
and after the first response information and the first trigger information are packaged and the second response information and the second trigger information are packaged, feeding back the packaged first response information and the packaged second trigger information to the client.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201810018937.XA 2018-01-09 2018-01-09 Network state testing method and device and terminal equipment Active CN110022240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810018937.XA CN110022240B (en) 2018-01-09 2018-01-09 Network state testing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810018937.XA CN110022240B (en) 2018-01-09 2018-01-09 Network state testing method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN110022240A CN110022240A (en) 2019-07-16
CN110022240B true CN110022240B (en) 2021-03-23

Family

ID=67187714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810018937.XA Active CN110022240B (en) 2018-01-09 2018-01-09 Network state testing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN110022240B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7457868B1 (en) * 2003-12-30 2008-11-25 Emc Corporation Methods and apparatus for measuring network performance
CN102150395A (en) * 2009-06-11 2011-08-10 香港理工大学 Method for non-cooperative measurement of network data-path quality
CN104506482A (en) * 2014-10-10 2015-04-08 香港理工大学 Detection method and detection device for network attack
CN105634836A (en) * 2014-10-27 2016-06-01 香港理工大学 Information processing method and device
CN106209970A (en) * 2016-06-17 2016-12-07 上海连尚网络科技有限公司 Determine the method and apparatus of the network state being connected between subscriber equipment with routing device
CN107438016A (en) * 2017-07-28 2017-12-05 深圳市万网博通科技有限公司 Network management, equipment, system and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356587B2 (en) * 2003-07-29 2008-04-08 International Business Machines Corporation Automatically detecting malicious computer network reconnaissance by updating state codes in a histogram
JP3931988B2 (en) * 2004-08-26 2007-06-20 日本電気株式会社 Network quality measuring method and measuring apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7457868B1 (en) * 2003-12-30 2008-11-25 Emc Corporation Methods and apparatus for measuring network performance
CN102150395A (en) * 2009-06-11 2011-08-10 香港理工大学 Method for non-cooperative measurement of network data-path quality
CN104506482A (en) * 2014-10-10 2015-04-08 香港理工大学 Detection method and detection device for network attack
CN105634836A (en) * 2014-10-27 2016-06-01 香港理工大学 Information processing method and device
CN106209970A (en) * 2016-06-17 2016-12-07 上海连尚网络科技有限公司 Determine the method and apparatus of the network state being connected between subscriber equipment with routing device
CN107438016A (en) * 2017-07-28 2017-12-05 深圳市万网博通科技有限公司 Network management, equipment, system and storage medium

Also Published As

Publication number Publication date
CN110022240A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
EP4123997A2 (en) Multi-path rdma transmission
CN103067214B (en) For testing the method for web site performance, client, server and system
US7171464B1 (en) Method of tracing data traffic on a network
US11064052B2 (en) Page insertion method and device
US9130740B2 (en) Variable acknowledge rate to reduce bus contention in presence of communication errors
CN113852445B (en) Method, system, equipment and storage medium for improving data transmission reliability
CN110022240B (en) Network state testing method and device and terminal equipment
CN103051722B (en) A kind ofly determine the method whether page is held as a hostage and relevant device
CN112422485B (en) Communication method and device of transmission control protocol
CN114584618A (en) Information interaction method, device, equipment, storage medium and system
CN115134254B (en) Network simulation method, device, equipment and storage medium
CN107566291B (en) Multicast transmission method, device, electronic equipment and storage medium
CN105306338B (en) Message reminding method and device
US20120066305A1 (en) Transmitting system and method thereof
CN111404842A (en) Data transmission method, device and computer storage medium
CN113490154B (en) Broadcast data transmission method, device, terminal equipment and storage medium
US9054968B2 (en) Business intelligence-infused smart retransmission processing
CN112230880B (en) Data transmission control method and device, FPGA and medium
CN112202784B (en) Anti-crawler method and device and storage medium
US11636198B1 (en) System and method for cybersecurity analyzer update and concurrent management system
CN113254097A (en) Configuration information issuing method and device, electronic equipment and storage medium
CN105677708A (en) Data access method and apparatus
CN113763660B (en) Multi-master network system and communication method
CN110768984A (en) Data transmission method and device and electronic equipment
CN113114606B (en) Method and device for collecting distribution data

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