CN116800638A - Network detection method, device, electronic equipment and storage medium - Google Patents
Network detection method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116800638A CN116800638A CN202310805388.1A CN202310805388A CN116800638A CN 116800638 A CN116800638 A CN 116800638A CN 202310805388 A CN202310805388 A CN 202310805388A CN 116800638 A CN116800638 A CN 116800638A
- Authority
- CN
- China
- Prior art keywords
- detection
- terminal
- network
- server
- communication 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.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 445
- 238000004891 communication Methods 0.000 claims abstract description 127
- 238000000034 method Methods 0.000 claims abstract description 66
- 238000013515 script Methods 0.000 claims description 49
- 238000004458 analytical method Methods 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 11
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 239000000523 sample Substances 0.000 description 51
- 230000008569 process Effects 0.000 description 31
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 210000004556 brain Anatomy 0.000 description 9
- 230000000007 visual effect Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000012360 testing method Methods 0.000 description 7
- 230000005856 abnormality Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008447 perception Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000003324 Six Sigma (6σ) Methods 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000011002 quantification Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
Landscapes
- Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a network detection method, a device, electronic equipment and a storage medium, which are applied to the technical field of network communication, wherein the method comprises the following steps: responding to a triggering instruction of network detection, and determining a target object to be detected, wherein the target object comprises a server and at least one resource object; sending a detection request to the server and at least one of the resource objects; receiving first acquired data corresponding to the detection request returned by the server and second acquired data corresponding to the detection request returned by the resource object; and performing network detection according to the first acquired data and the second acquired data, and generating a network detection result corresponding to the terminal.
Description
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a network detection method, a network detection device, an electronic device, and a computer readable storage medium.
Background
With the development of network technology, users often need to perform corresponding data communication with a server in the process of using user equipment. For communication between the user equipment and the server, network communication between the user equipment and the server needs to be detected to ensure stability of data interaction between the user equipment and the server. For network connectivity from the user terminal device to the application server, the user is required to execute ping, telnet, tracert and other commands, and the result is fed back to the network administrator for analysis and confirmation; when the application system relates to a terminal environment and a wide range of users and spans multiple regions, the network connectivity cannot be effectively detected, and the problems of narrow detection coverage and complicated detection process exist.
Disclosure of Invention
The embodiment of the invention provides a network detection method, a network detection device, electronic equipment and a computer readable storage medium, which are used for solving or partially solving the problems that network connectivity cannot be effectively detected, coverage area is narrow and detection process is complicated.
The embodiment of the invention discloses a network detection method, which comprises the following steps:
responding to a triggering instruction of network detection, and determining a target object to be detected, wherein the target object comprises a server and at least one resource object;
sending a detection request to the server and at least one of the resource objects;
receiving first acquired data corresponding to the detection request returned by the server and second acquired data corresponding to the detection request returned by the resource object;
and performing network detection according to the first acquired data and the second acquired data, and generating a network detection result corresponding to the terminal.
Optionally, the first collected data includes a first request time consuming process that the terminal initiates the detection request to the server, the second collected data includes a loading time consuming process that each resource object loads a target detection sample file, and a second request time consuming process that the terminal initiates the detection request to the resource object, the target detection sample file is a file with a known file memory size, and the network detection is performed according to the first collected data and the second collected data, so as to generate a network detection result corresponding to the terminal, where the network detection result includes:
Detecting a network communication state between the terminal and the server by adopting the first request time consumption and the second request time consumption, and generating a first detection result for the communication state between the terminal and the server;
and detecting the network communication state between the terminal and the resource object by adopting the loading time consumption corresponding to the resource object, and generating a second detection result aiming at the communication state between the terminal and the resource object.
Optionally, the detecting the network communication state between the terminal and the server by using the first request time consumption and the second request time consumption, and generating a first detection result for the communication state between the terminal and the server includes:
taking the first request time consumption as a reference value, subtracting the first request time consumption from the second request time consumption, and obtaining a deviation value corresponding to the terminal;
and detecting the network communication state between the terminal and the server according to the magnitude of the deviation value, and generating a first detection result for the communication state between the terminal and the server.
Optionally, the detecting the network communication state between the terminal and the server according to the magnitude of the deviation value, and generating a first detection result for the communication state between the terminal and the server includes:
If the deviation value is smaller than a first preset threshold value, generating a first detection tag for the communication state between the terminal and the server, wherein the first detection tag characterizes that the communication state between the terminal and the server is excellent;
if the deviation value is larger than or equal to a first preset threshold value and smaller than a second preset threshold value, generating a second detection tag aiming at the communication state between the terminal and the server, wherein the second detection tag characterizes that the communication state between the terminal and the server is good;
if the deviation value is greater than or equal to the second preset threshold value and smaller than a third preset threshold value, generating a third detection tag aiming at the communication state between the terminal and the server, wherein the third detection tag characterizes that the communication state between the terminal and the server is fluctuation;
and if the deviation value is larger than the third preset threshold value, generating a fourth detection tag aiming at the communication state between the terminal and the server, wherein the fourth detection tag represents that the communication state between the terminal and the server is abnormal.
Optionally, the detecting the network communication state between the terminal and the resource object with the loading time consumption corresponding to the resource object, and generating a second detection result for the communication state between the terminal and the resource object, includes:
Calculating the average value of the loading time consumption corresponding to each resource object;
calculating a standard deviation value corresponding to the terminal based on the average value;
if the loading time consumption of the resource object is greater than n times of the standard deviation value, generating an attention detection result aiming at the communication state between the terminal and the resource object, wherein the attention detection result represents that attention is required to be paid to the communication state between the terminal and the resource object;
if the loading time consumption of the resource object is less than n times of the standard deviation value, generating a network normal result aiming at the communication state between the terminal and the resource object;
wherein n is a positive integer greater than 0.
Optionally, the network detection result includes a detection label and a standard deviation value, and the method further includes:
acquiring a target detection sample file corresponding to the detection request;
and sending the detection tag, the standard deviation and the target detection sample file to a data center, wherein the data center is used for generating a matrix knowledge base corresponding to the network detection result according to the detection tag, the standard deviation and the target detection sample file, and the matrix knowledge base is used for guaranteeing the detection result and the communication state of the network communication among the terminal, the server and the resource object.
Optionally, the determining, in response to a triggering instruction of network detection, a target object to be detected includes:
responding to a triggering instruction of network detection, and acquiring a detection script;
and running the detection script and extracting the target object to be detected.
Optionally, the detection model is generated by:
acquiring IT resources, wherein the IT resources at least comprise logic resources and physical resources;
acquiring a front-end script, a plurality of detection sample files and background analysis information for network detection, and performing graph database processing by adopting the front-end script, the plurality of detection sample files, the background analysis information and the IT resource to generate the detection model;
the logic resource at least comprises one of an IP address, a middleware service and a virtual machine, and the physical resource at least comprises one of a machine room, network equipment and a terminal.
Optionally, the acquiring the detection model in response to the triggering instruction of the network detection includes:
and responding to the access operation of the user to the web page in the browser within a preset time period, or responding to a triggering instruction input by the user for network detection, and acquiring a detection model.
Optionally, the method further comprises:
obtaining a standard JavaScript script template and a file path of the detection sample file;
and inputting the IT resources and the file path into the standard JavaScript template for compiling to generate the front-end script.
The embodiment of the invention also discloses a network detection device, which comprises:
the object determining module is used for responding to a triggering instruction of network detection and determining a target object to be detected, wherein the target object comprises a server and at least one resource object;
a request sending module, configured to send a detection request to the server and at least one of the resource objects;
the acquisition data receiving module is used for receiving first acquisition data corresponding to the detection request and returned by the server and second acquisition data corresponding to the detection request and returned by the resource object;
and the network detection module is used for carrying out network detection according to the first acquired data and the second acquired data and generating a network detection result corresponding to the terminal.
Optionally, the first collected data includes a first request time consuming process that the terminal initiates the detection request to the server, the second collected data includes a loading time consuming process that each resource object loads a target detection sample file, and a second request time consuming process that the terminal initiates the detection request to the resource object, where the target detection sample file is a file with a known file memory size, and the network detection module is specifically configured to:
Detecting a network communication state between the terminal and the server by adopting the first request time consumption and the second request time consumption, and generating a first detection result for the communication state between the terminal and the server;
and detecting the network communication state between the terminal and the resource object by adopting the loading time consumption corresponding to the resource object, and generating a second detection result aiming at the communication state between the terminal and the resource object.
Optionally, the network detection module is specifically configured to:
taking the first request time consumption as a reference value, subtracting the first request time consumption from the second request time consumption, and obtaining a deviation value corresponding to the terminal;
and detecting the network communication state between the terminal and the server according to the magnitude of the deviation value, and generating a first detection result for the communication state between the terminal and the server.
Optionally, the network detection module is specifically configured to:
if the deviation value is smaller than a first preset threshold value, generating a first detection tag for the communication state between the terminal and the server, wherein the first detection tag characterizes that the communication state between the terminal and the server is excellent;
If the deviation value is larger than or equal to a first preset threshold value and smaller than a second preset threshold value, generating a second detection tag aiming at the communication state between the terminal and the server, wherein the second detection tag characterizes that the communication state between the terminal and the server is good;
if the deviation value is greater than or equal to the second preset threshold value and smaller than a third preset threshold value, generating a third detection tag aiming at the communication state between the terminal and the server, wherein the third detection tag characterizes that the communication state between the terminal and the server is fluctuation;
and if the deviation value is larger than the third preset threshold value, generating a fourth detection tag aiming at the communication state between the terminal and the server, wherein the fourth detection tag represents that the communication state between the terminal and the server is abnormal.
Optionally, the network detection module is specifically configured to:
calculating the average value of the loading time consumption corresponding to each resource object;
calculating a standard deviation value corresponding to the terminal based on the average value;
if the loading time consumption of the resource object is greater than n times of the standard deviation value, generating an attention detection result aiming at the communication state between the terminal and the resource object, wherein the attention detection result represents that attention is required to be paid to the communication state between the terminal and the resource object;
If the loading time consumption of the resource object is less than n times of the standard deviation value, generating a network normal result aiming at the communication state between the terminal and the resource object;
wherein n is a positive integer greater than 0.
Optionally, the network detection result includes a detection label and a standard deviation value, and the apparatus further includes:
the file acquisition module is used for acquiring a target detection sample file corresponding to the detection request;
the data transmission module is used for transmitting the detection tag, the standard deviation value and the target detection sample file to a data center, and the data center is used for generating a matrix knowledge base corresponding to the network detection result according to the detection tag, the standard deviation value and the target detection sample file, and the matrix knowledge base is used for guaranteeing the detection result and the communication state of the network communication among the terminal, the server and the resource object.
Optionally, the object determining module is specifically configured to:
responding to a triggering instruction of network detection, and acquiring a detection script;
and running the detection script and extracting the target object to be detected.
Optionally, the detection model is generated by:
The resource acquisition module is used for acquiring IT resources, and the IT resources at least comprise logical resources and physical resources;
the model generation module is used for acquiring a front-end script, a plurality of detection sample files and background analysis information for network detection, and performing graph database processing by adopting the front-end script, the plurality of detection sample files, the background analysis information and the IT resources to generate the detection model;
the logic resource at least comprises one of an IP address, a middleware service and a virtual machine, and the physical resource at least comprises one of a machine room, network equipment and a terminal.
Optionally, the object determining module is specifically configured to:
and responding to the access operation of the user to the web page in the browser within a preset time period, or responding to a triggering instruction input by the user for network detection, and acquiring a detection model.
Optionally, the method further comprises:
the script acquisition module is used for acquiring a standard JavaScript template and a file path of the detection sample file;
and the script generation module is used for inputting the IT resources and the file path into the standard JavaScript template for compiling to generate the front-end script.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Embodiments of the present invention also disclose a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method according to the embodiments of the present invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, if network equipment changes, such as network equipment (or a system) is moved from an old machine room to a new machine room, whether the moved network is stable or not needs to be detected, a trigger instruction of network detection is responded by a terminal, a target object to be detected is determined, the target object comprises a server and at least one resource object, then the terminal sends a detection request to the server and the at least one resource object, and receives first acquired data corresponding to the detection request and second acquired data corresponding to the detection request and returned by the server, and then network detection is carried out according to the first acquired data and the second acquired data to generate a network detection result corresponding to the terminal.
Drawings
Fig. 1 is a flowchart of steps of a network detection method according to an embodiment of the present invention;
FIG. 2 is a schematic modeling diagram of a detection model provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of the execution timing of acquisition detection provided in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a network connectivity detection flow provided in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a business process provided in an embodiment of the present invention;
fig. 6 is a block diagram of a network detection device according to an embodiment of the present invention;
fig. 7 is a block diagram of an electronic device provided in an embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
As an example, conventional network connectivity detects network connectivity of a user terminal device to an application server, requires a user to analyze and confirm the result by executing a command ping, telnet, tracert or the like, and feeding back the result to a network administrator; when the application system relates to the terminal environment and the wide and multi-region crossing of users, the existing means have the following defects: 1. the network state cannot be quantitatively analyzed; 2. coverage of the detection terminal and the user cannot be guaranteed; 3. the detection result cannot be continuously tracked and compared; 4. the detection work is complicated and requires the whole participation of network professionals.
For example, in some implementation scenarios, for a network system, it is necessary to move the system from an old machine room to a new machine room due to equipment upgrade or the like, and it is difficult to quickly detect a network difference between a user terminal (hereinafter referred to as a terminal) and the new machine room due to a huge amount of users of the system, a complex terminal environment, a plurality of regions, and an external system.
In this regard, in the present invention, when a network device changes, such as a network device (or a system) moves from an old machine room to a new machine room, whether the moved network is stable needs to be detected, a trigger instruction of network detection is responded by a terminal, a target object to be detected is determined, the target object includes a server and at least one resource object, then the terminal sends a detection request to the server and at least one resource object, and receives first collected data corresponding to the detection request returned by the server and second collected data corresponding to the detection request returned by the resource object, then network detection is performed according to the first collected data and the second collected data, a network detection result corresponding to the terminal is generated, and for each terminal, when the terminal triggers an instruction of network detection, a detection request can be sent to the server and at least one resource object, and then network detection is performed based on the collected data returned by the server and the resource object.
Specifically, referring to fig. 1, a step flowchart of a network detection method provided in an embodiment of the present invention is shown, and the method specifically may include the following steps:
step 101, responding to a triggering instruction of network detection, and determining a target object to be detected, wherein the target object comprises a server and at least one resource object;
the embodiment of the invention can be applied to a user terminal (hereinafter referred to as a terminal), and can trigger network detection without perception in the process of normally using the terminal by a user or trigger network detection on the terminal by the initiative of the user, and the invention is not limited to the above.
For network detection, it may be the detection of network connectivity between a terminal and a server, a terminal and a resource object, which may include an IP address, a middleware service, a virtual machine, a machine room, a network device, a terminal, and the like. Specifically, in the network detection process, the terminal can perform network detection based on a corresponding detection model, and for the detection model, it supports manual input or batch import of model information, so as to normalize the network detection range, detection conditions, detection modes and the like.
In some alternative embodiments, the detection model may be generated by acquiring IT resources, where the IT resources include at least logical resources and physical resources, then acquiring a front-end script, a plurality of detection sample files, and background analysis information for performing network detection, and performing graph database processing using the front-end script, the plurality of detection sample files, the background analysis information, and the IT resources. Wherein, the logic resource is characterized as a virtual resource object, such as the IP address, the middleware service and the virtual machine; physical resources are characterized as physical resource objects, such as the machine room, the network equipment, the terminal and the like.
In addition, the front-end script can be a JavaScript script operated by a front-end browser, and the front-end script is generated by acquiring a standard JavaScript script template and detecting a file path of a sample file, and then inputting IT resources and the file path into the standard JavaScript script template for compiling; the detection sample file can be a file with different memory sizes set according to the detection scene requirement, for example, the detection sample file can comprise files with the memory sizes of 1K, 10K, 50K, 100K, 1M, 2M, 5M, 10M and the like, and the range of the values of the specification can be 1K to 10M; the background analysis information can be class information, and the uploaded data is converted into class information corresponding to the entity on the interface through a reflection mechanism technology, so that the persistent storage of the data is completed by the dynamic call object.
In one example, referring to FIG. 2, a schematic modeling diagram of a detection model provided in an embodiment of the present invention is shown by selecting IT resources to be detected: detection objects such as logic resources (IP addresses/domain names, middleware services and virtual machines), physical resources (machine rooms, network equipment and user terminal equipment), and the like, visual setting of the detection objects is realized by utilizing a graph database technology (Neo 4J), and detection modeling example information (comprising terminal environment information, IT resource information, time period information, user information, difference information and the like) is generated by combining detection object attributes and selected detection models
When the terminal triggers network detection, a corresponding request can be sent to a detection system to request for obtaining a corresponding detection script, when the detection system receives the request, the detection model can be compiled automatically to obtain the corresponding detection script, the detection script is returned to the terminal, then the terminal runs the detection script, a target object and a detection sample file to be detected are determined through a front-end script, and after detection is completed, corresponding data can be stored in a lasting mode based on background analysis information.
Further, in some optional embodiments, the detection model is obtained in response to an access operation of the user to the web page in the browser within a preset time period or in response to a trigger instruction for network detection input by the user, so that the network detection can be triggered without perception in a process that the user uses the terminal, and can be actively triggered by the user, thereby improving the convenience of network detection.
Step 102, sending a detection request to the server and at least one resource object;
for the server and at least one resource object to be detected, the terminal can respectively send corresponding detection requests to the server and the resource object to instruct the server and the resource object to perform corresponding network data acquisition, and return corresponding data acquisition results to the terminal. For the server, since the server is a data interaction host system, a corresponding detection request needs to be sent to the server in the network detection process, and for the resource objects, one or more resource objects can be selected for detection in one network detection process, for example, one or more of logic resources can be selected, one or more of physical resources can be selected, and the selection can be performed in a mixed manner, which is not limited in the invention.
In one example, the terminal may initiate URL requests of the target detection sample file to the server and the resource object to be detected, respectively, and after receiving the URL requests, the server and the resource object to be detected may acquire corresponding detection scripts, acquire corresponding data based on the detection scripts, and return the data to the terminal.
Step 103, receiving first collected data corresponding to the detection request returned by the server and second collected data corresponding to the detection request returned by the resource object;
for the server, after receiving a detection request sent by the terminal, the server can respond to the detection request, acquire corresponding response time length, take the response time length as first request time consumption and return the first request time length to the terminal; for each resource object, after receiving a detection request sent by a terminal, the detection request can be analyzed to determine a corresponding target detection sample file, then the target detection sample file is loaded, after loading is completed, the loading time for loading the target detection sample file is obtained, meanwhile, the detection request is responded, the corresponding response time is obtained, the response time is used as a second request time, and then the loading time and the second request time are returned to the terminal, so that the terminal can perform network detection according to the acquired data sent by the server and the resource object.
It should be noted that, because the test sample files with different specifications are loaded in different time periods, in the network test process of the same batch, the loading time of the resource object in different test scenes can be detected by loading the test sample files with different specifications for the same resource object, so as to analyze the network state of the same resource object in different network requirement scenes; correspondingly, for the detection sample files with the same specification, the detection sample files with the same specification are detected through different resource objects, so that the loading time consumption of different resource objects in the same detection scene can be checked, and the network state between the terminal and each resource object in different demand scenes can be analyzed.
And 104, performing network detection according to the first acquired data and the second acquired data, and generating a network detection result corresponding to the terminal.
In a specific implementation, in the above embodiment, the first collected data includes a first request time consuming when the terminal initiates a detection request to the server, the second collected data includes a loading time consuming when each resource object loads a target detection sample file and a second request time consuming when the terminal initiates a detection request to the resource object, and the target detection sample file is a file with a known file memory size, so that the terminal can detect a network communication state between the terminal and the server by adopting the first request time consuming and the second request time consuming, generate a first detection result for the communication state between the terminal and the server, and detect the network communication state between the terminal and the resource object by adopting the loading time consuming corresponding to the resource object, so as to generate a second detection result for the communication state between the terminal and the resource object.
For network detection of a server, a terminal may use the first request time consumption as a reference value, subtract the first request time consumption from the second request time consumption to obtain a deviation value corresponding to the terminal, and then detect a network communication state between the terminal and the server according to the magnitude of the deviation value, so as to generate a first detection result for the communication state between the terminal and the server.
If the deviation value is smaller than a first preset threshold value, a first detection tag for the communication state between the terminal and the server is generated, and the first detection tag characterizes that the communication state between the terminal and the server is excellent; if the deviation value is larger than or equal to a first preset threshold value and smaller than a second preset threshold value, generating a second detection tag aiming at the communication state between the terminal and the server, wherein the second detection tag characterizes that the communication state between the terminal and the server is good; if the deviation value is greater than or equal to the second preset threshold value and smaller than a third preset threshold value, generating a third detection tag aiming at the communication state between the terminal and the server, wherein the third detection tag characterizes that the communication state between the terminal and the server is fluctuation; and if the deviation value is larger than the third preset threshold value, generating a fourth detection tag aiming at the communication state between the terminal and the server, wherein the fourth detection tag represents that the communication state between the terminal and the server is abnormal.
In one example, taking the network time x (i.e. the first request time) of the terminal sending a request to the server and the network time x (i.e. the first request time) of the server responding to the request as a reference value, the network time of the terminal requesting a detected IT resource is a y (i.e. the second request time) value, calculating according to the "deviation value=y-x" to obtain a deviation value of each terminal of the current round of test, and then labeling the deviation value:
1. preferably: the deviation value is less than 0 and the deviation value is less than 0,
2. health: 0< = offset <100 ms,
3. wave motion: 100< = offset <2000 ms;
4. abnormality: greater than 2000 milliseconds or network failure
After the labels are obtained, the terminals with the labels being 'fluctuation' and 'abnormality' can be focused by combining the duty ratio of each label so as to optimize the corresponding network.
For the resource objects, the terminal can calculate an average value of loading time consumption corresponding to each resource object, then calculate a standard deviation value corresponding to the terminal based on the average value, and if the loading time consumption of the resource objects is greater than n times of the standard deviation value, generate an attention detection result aiming at the communication state between the terminal and the resource objects, wherein the attention detection result represents that the communication state between the terminal and the resource objects needs to be paid attention; if the loading time consumption of the resource object is less than n times of the standard deviation value, generating a network normal result aiming at the communication state between the terminal and the resource object; wherein n is a positive integer greater than 0.
In one example, for network detection of resource objects, the terminal may first find the network time-consuming average μ of the detection results of this round:xN is the network time consumption of loading the target sample file for each IT resource environment in a round of detection; then, the standard deviation sigma of the test is calculated according to the average value mu: />And then, the resource objects with the network consumption values larger than 3 sigma can be focused, namely, corresponding focusing detection results are generated.
Through the above process, when each terminal triggers a network detection instruction, a detection request can be sent to the server and at least one resource object, and then network detection is performed based on the acquired data returned by the server and the resource object, so that on one hand, the network detection process is non-perception detection, normal use of the terminal is ensured, and the simplified detection flow is ensured, on the other hand, each terminal adopts the same detection mode, and the coverage of detection is improved while the network detection is realized, and the method is applicable to terminals of different network environments, cross-territories and different systems.
It should be noted that, for network detection of a server and a resource object, embodiments of the present invention include, but are not limited to, the foregoing examples, and it is to be understood that, based on the teaching of the idea of embodiments of the present invention, those skilled in the art may also use other manners, which are not limited to this aspect of the present invention.
In addition, after the terminal completes network detection based on the collected data returned by the server and the resource object, a target detection sample file corresponding to the detection request can be further obtained, then the detection label, the standard deviation value and the target detection sample file are sent to the data center, and the data center is used for generating a matrix knowledge base corresponding to the network detection result according to the detection label, the standard deviation value and the target detection sample file, wherein the matrix knowledge base is used for guaranteeing the detection result and the communication state of network communication among the terminal, the server and the resource object.
Specifically, the terminal generates a detection result and state information (such as terminal connectivity, IT resource connectivity, terminal equipment information, detection user information, network difference among IT resources and the like) corresponding to the detection object in a visual form by utilizing a graph database technology according to IT resource information, modeling information and the acquired data; and the executor rapidly judges the conditions of network connectivity between the current detection objects, differences among different detection objects and the like through the visual detection results. Meanwhile, the detection result (such as 3 sigma or excellent, healthy, fluctuating, abnormal duty ratio and the like in the embodiment) can clearly, quantitatively and quickly guide a network manager to analyze and locate the network equipment or the network policy range with abnormality. The detection model and the result can be stored into a system as a historical effective case library, so that a quick execution template and a tracking comparison template for secondary detection are realized.
For example, the average value mu of different networks is generated and stored in a data center through collecting sample files with different specifications and multiple rounds of detection results; the data center can form a matrix knowledge base of network detection results according to the network environment, the detected sample file and the standard deviation value; the method is used for judging the network connectivity quality by combining a six-sigma quality management theory; for example: in the network environment of the DCN network, the sample file is 1024KB, the loading time-consuming average value μ is 300 ms, the standard deviation σ is 50 ms, and the network environment reaching 6σ in this environment is preferable. Through continuous detection, perfection and detection result accumulation, the detection matrix knowledge base can more effectively guide the subsequent similar network state detection work, so that the detection matrix knowledge base has stronger guidance and practicability.
In the embodiment of the invention, if network equipment changes, such as network equipment (or a system) is moved from an old machine room to a new machine room, whether the moved network is stable or not needs to be detected, a trigger instruction of network detection is responded by a terminal, a target object to be detected is determined, the target object comprises a server and at least one resource object, then the terminal sends a detection request to the server and the at least one resource object, and receives first acquired data corresponding to the detection request and second acquired data corresponding to the detection request and returned by the server, and then network detection is carried out according to the first acquired data and the second acquired data to generate a network detection result corresponding to the terminal.
In order to enable those skilled in the art to better understand the technical solutions of the embodiments of the present invention, the following description is made by using some optional examples, which are not limiting to the present invention:
referring to fig. 3, a schematic diagram of an execution timing sequence of acquisition detection provided in an embodiment of the present invention is shown, where a terminal device (browser/application) triggers detection, sends an HTTP request to a host system, and after the host system receives the HTTP request, outputs a probe script to return the probe script to the terminal device. The terminal device executes the detection rules in the detection script, and sends HTTP requests (such as URL requests) to the host system, the detected target system/environment and the like respectively, so as to request the host system and the detected target system/environment to acquire data. For the host system, the host system can execute a corresponding detection script and output the detection sample object so as to return the output result to the terminal equipment (for example, time-consuming return of the first request to the terminal equipment and the like); for the detected target system/environment, the corresponding detection script can be executed, and the detection sample object is output, so that the output result is returned to the terminal device (such as the second request consuming time, the loading consuming time, and the like are returned to the terminal device). After receiving the corresponding data, the terminal device can perform network detection, package the detection state, time consumption, environment and other result information contained in the detection result, and then send the detection result to a data collection center (which is identical to the data center described above), and the data collection center performs further data processing on the packaged data, such as visualizing network connectivity among different terminals, host systems, resource objects and the like.
Referring to fig. 4, a schematic diagram of a network connectivity detection flow provided in an embodiment of the present invention is shown, including:
s1, system extraction: the system provides a visual detection model selection according to the historical storage detection model;
s2, user input: newly building a system detection model, supporting manual input or batch import of model information, and setting a detection target system range;
s3, detection modeling: by selecting the IT resource to be detected: detecting objects such as logic resources (IP addresses/domain names, middleware services and virtual machines), physical resources (machine rooms, network equipment and user terminal equipment), and the like, realizing visual setting of the detecting objects by utilizing a graph database technology (Neo 4J), and generating detection modeling information by combining with detecting object attributes and model selection;
s4, automatic compiling: based on a set detection model, the intelligent detection of the brain self intelligent algorithm automatically completes the compiling of the model script;
s5, issuing a detection script: executing the release, releasing the detection script file to the host machine, and modifying and optimizing the detection model parameters in real time according to the service test or inspection result;
s6, collecting detection execution information: the detection script automatically completes the detection task according to a set strategy, and corresponding detection result information is automatically uploaded and put in storage according to the set strategy;
S7, automatically generating a detection result: generating detection results and state information (such as terminal connectivity, IT resource connectivity, terminal equipment information, detection user information, network difference among IT resources and the like) corresponding to the detection objects in a visual form by utilizing a graph database technology according to the IT resource information and the acquired data (modeling information and the acquired data); the executor rapidly judges the conditions of network connectivity between the current detection objects, differences among different detection objects and the like through the visual detection results; meanwhile, the detection result can clearly and quickly guide a network administrator to analyze and locate abnormal network equipment or network policy range. The detection model and the result can be stored into a system as a historical effective case library, so that a quick execution template and a tracking comparison template for secondary detection are realized.
Further, referring to fig. 5, a schematic diagram of a service flow provided in an embodiment of the present invention is shown, in a process of building a new IT system or migrating a system, a network connectivity detection service flow between a user terminal and a server may be implemented based on an intelligent detection brain (i.e. a data center), a service terminal group (a terminal group composed of different user terminals), and a corresponding network administrator, specifically, the configuration of a rule packet may be completed in the intelligent detection brain according to a detection requirement, then a detection task is issued, the detection task is sent to the service terminal group, and a terminal in the service terminal group may execute the network detection process provided in the foregoing embodiment and return a detection result to the intelligent detection brain. After the intelligent detection brain receives the detection result, the collected detection data can be subjected to multidimensional result quantification, network state evaluation is completed, whether network communication passes or not is judged, and if the network communication passes, a detection task is ended; if the intelligent detection brain does not pass through the intelligent detection brain, corresponding data analysis and processing information is sent to a network manager so that the network manager optimizes the network, and meanwhile, the network manager can send corresponding detection instructions to the intelligent detection brain according to actual requirements so that the intelligent detection brain can continuously issue detection tasks. Wherein, for the network manager, it refers to the terminal device to which the network manager belongs.
Through the above process, the implementation of the embodiment of the invention has at least the following beneficial effects:
the detection execution process is simple and safe, the range is flexible, the process is efficient, and the result is quantitative and accurate.
The time cost and the labor cost of network adjustment and measurement by the traditional Web service system cutover migration are greatly reduced.
Based on the collected data, comparing and analyzing are carried out, network bottlenecks and fault points are clearly positioned, and relevant network administrators and relevant personnel are accurately notified and guided to conduct troubleshooting and processing on the fault points; the passive low-efficiency mode of traditional user fault reporting by experience, guessing, tearing skin across professions, sitting and the like is changed.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 6, a block diagram of a network detection device provided in an embodiment of the present invention is shown, which may specifically include the following modules:
an object determining module 601, configured to determine a target object to be detected in response to a triggering instruction of network detection, where the target object includes a server and at least one resource object;
a request sending module 602, configured to send a detection request to the server and at least one of the resource objects;
an acquisition data receiving module 603, configured to receive first acquisition data corresponding to the detection request returned by the server, and second acquisition data corresponding to the detection request returned by the resource object;
the network detection module 604 is configured to perform network detection according to the first collected data and the second collected data, and generate a network detection result corresponding to the terminal.
In an alternative embodiment, the first collected data includes a first request time consuming for the terminal to initiate the detection request to the server, the second collected data includes a load time consuming for loading a target detection sample file by each of the resource objects, and a second request time consuming for the terminal to initiate the detection request to the resource object, where the target detection sample file is a file with a known file memory size, and the network detection module 604 is specifically configured to:
Detecting a network communication state between the terminal and the server by adopting the first request time consumption and the second request time consumption, and generating a first detection result for the communication state between the terminal and the server;
and detecting the network communication state between the terminal and the resource object by adopting the loading time consumption corresponding to the resource object, and generating a second detection result aiming at the communication state between the terminal and the resource object.
In an alternative embodiment, the network detection module 604 is specifically configured to:
taking the first request time consumption as a reference value, subtracting the first request time consumption from the second request time consumption, and obtaining a deviation value corresponding to the terminal;
and detecting the network communication state between the terminal and the server according to the magnitude of the deviation value, and generating a first detection result for the communication state between the terminal and the server.
In an alternative embodiment, the network detection module 604 is specifically configured to:
if the deviation value is smaller than a first preset threshold value, generating a first detection tag for the communication state between the terminal and the server, wherein the first detection tag characterizes that the communication state between the terminal and the server is excellent;
If the deviation value is larger than or equal to a first preset threshold value and smaller than a second preset threshold value, generating a second detection tag aiming at the communication state between the terminal and the server, wherein the second detection tag characterizes that the communication state between the terminal and the server is good;
if the deviation value is greater than or equal to the second preset threshold value and smaller than a third preset threshold value, generating a third detection tag aiming at the communication state between the terminal and the server, wherein the third detection tag characterizes that the communication state between the terminal and the server is fluctuation;
and if the deviation value is larger than the third preset threshold value, generating a fourth detection tag aiming at the communication state between the terminal and the server, wherein the fourth detection tag represents that the communication state between the terminal and the server is abnormal.
In an alternative embodiment, the network detection module 604 is specifically configured to:
calculating the average value of the loading time consumption corresponding to each resource object;
calculating a standard deviation value corresponding to the terminal based on the average value;
if the loading time consumption of the resource object is greater than n times of the standard deviation value, generating an attention detection result aiming at the communication state between the terminal and the resource object, wherein the attention detection result represents that attention is required to be paid to the communication state between the terminal and the resource object;
If the loading time consumption of the resource object is less than n times of the standard deviation value, generating a network normal result aiming at the communication state between the terminal and the resource object;
wherein n is a positive integer greater than 0.
In an alternative embodiment, the network detection result includes a detection tag and a standard deviation value, and the apparatus further includes:
the file acquisition module is used for acquiring a target detection sample file corresponding to the detection request;
the data transmission module is used for transmitting the detection tag, the standard deviation value and the target detection sample file to a data center, and the data center is used for generating a matrix knowledge base corresponding to the network detection result according to the detection tag, the standard deviation value and the target detection sample file, and the matrix knowledge base is used for guaranteeing the detection result and the communication state of the network communication among the terminal, the server and the resource object.
In an alternative embodiment, the object determining module 601 is specifically configured to:
responding to a triggering instruction of network detection, and acquiring a detection script;
and running the detection script and extracting the target object to be detected.
In an alternative embodiment, the detection model is generated by the following modules:
the resource acquisition module is used for acquiring IT resources, and the IT resources at least comprise logical resources and physical resources;
the model generation module is used for acquiring a front-end script, a plurality of detection sample files and background analysis information for network detection, and performing graph database processing by adopting the front-end script, the plurality of detection sample files, the background analysis information and the IT resources to generate the detection model;
the logic resource at least comprises one of an IP address, a middleware service and a virtual machine, and the physical resource at least comprises one of a machine room, network equipment and a terminal.
In an alternative embodiment, the object determining module 601 is specifically configured to:
and responding to the access operation of the user to the web page in the browser within a preset time period, or responding to a triggering instruction input by the user for network detection, and acquiring a detection model.
In an alternative embodiment, further comprising:
the script acquisition module is used for acquiring a standard JavaScript template and a file path of the detection sample file;
And the script generation module is used for inputting the IT resources and the file path into the standard JavaScript template for compiling to generate the front-end script.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In addition, the embodiment of the invention also provides electronic equipment, which comprises: the processor, the memory, store the computer program on the memory and can run on the processor, this computer program realizes each process of the above-mentioned network detection method embodiment when being carried out by the processor, and can reach the same technical result, in order to avoid repetition, will not be repeated here.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the network detection method embodiment and can achieve the same technical effects, and in order to avoid repetition, the description is omitted. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, and power supply 711. It will be appreciated by those skilled in the art that the structure of the electronic device according to the embodiments of the present invention is not limited to the electronic device, and the electronic device may include more or less components than those illustrated, or may combine some components, or may have different arrangements of components. In the embodiment of the invention, the electronic equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, receiving downlink data from a base station, and then processing the received downlink data by the processor 710; and, the uplink data is transmitted to the base station. Typically, the radio unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio unit 701 may also communicate with networks and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 702, such as helping the user to send and receive e-mail, browse web pages, and access streaming media, etc.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic device 700. The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used for receiving an audio or video signal. The input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, the graphics processor 7041 processing image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 706. The image frames processed by the graphics processor 7041 may be stored in memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 701 in the case of a telephone call mode.
The electronic device 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7071 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7071 and/or the backlight when the electronic device 700 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 705 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., and will not be described again here.
The display unit 706 is used to display information input by a user or information provided to the user. The display unit 706 may include a display panel 7071, and the display panel 7071 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 7071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 7071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 710, and receives and executes commands sent from the processor 710. In addition, the touch panel 7071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
Further, the touch panel 7071 may be overlaid on the display panel 7071, and when the touch panel 7071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7071 according to the type of the touch event. It will be appreciated that in one embodiment, the touch panel 7071 and the display panel 7071 are implemented as two separate components to implement the input and output functions of the electronic device, but in some embodiments, the touch panel 7071 and the display panel 7071 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 708 is an interface to which an external device is connected to the electronic apparatus 700. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from an external device and to transmit the received input to one or more elements within the electronic apparatus 700 or may be used to transmit data between the electronic apparatus 700 and an external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby performing overall monitoring of the electronic device. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 710.
The electronic device 700 may also include a power supply 711 (e.g., a battery) for powering the various components, and the power supply 711 may preferably be logically coupled to the processor 710 via a power management system, such as to perform functions such as managing charge, discharge, and power consumption by the power management system.
In addition, the electronic device 700 includes some functional modules, which are not shown, and will not be described herein.
It should be noted that, in this document, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
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 solution. 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.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (13)
1. A network detection method, comprising:
responding to a triggering instruction of network detection, and determining a target object to be detected, wherein the target object comprises a server and at least one resource object;
sending a detection request to the server and at least one of the resource objects;
receiving first acquired data corresponding to the detection request returned by the server and second acquired data corresponding to the detection request returned by the resource object;
and performing network detection according to the first acquired data and the second acquired data, and generating a network detection result corresponding to the terminal.
2. The method according to claim 1, wherein the first collected data includes a first request time consuming for the terminal to initiate the detection request to the server, the second collected data includes a loading time consuming for loading a target detection sample file by each of the resource objects, and a second request time consuming for the terminal to initiate the detection request to the resource objects, the target detection sample file is a file with a known file memory size, and the network detection is performed according to the first collected data and the second collected data, so as to generate a network detection result corresponding to the terminal, and the method includes:
Detecting a network communication state between the terminal and the server by adopting the first request time consumption and the second request time consumption, and generating a first detection result for the communication state between the terminal and the server;
and detecting the network communication state between the terminal and the resource object by adopting the loading time consumption corresponding to the resource object, and generating a second detection result aiming at the communication state between the terminal and the resource object.
3. The method of claim 2, wherein the detecting the network communication state between the terminal and the server using the first request time consuming and the second request time consuming, and generating the first detection result for the communication state between the terminal and the server, comprises:
taking the first request time consumption as a reference value, subtracting the first request time consumption from the second request time consumption, and obtaining a deviation value corresponding to the terminal;
and detecting the network communication state between the terminal and the server according to the magnitude of the deviation value, and generating a first detection result for the communication state between the terminal and the server.
4. A method according to claim 3, wherein the detecting the network communication status between the terminal and the server according to the magnitude of the deviation value, and generating the first detection result for the communication status between the terminal and the server, comprises:
if the deviation value is smaller than a first preset threshold value, generating a first detection tag for the communication state between the terminal and the server, wherein the first detection tag characterizes that the communication state between the terminal and the server is excellent;
if the deviation value is larger than or equal to a first preset threshold value and smaller than a second preset threshold value, generating a second detection tag aiming at the communication state between the terminal and the server, wherein the second detection tag characterizes that the communication state between the terminal and the server is good;
if the deviation value is greater than or equal to the second preset threshold value and smaller than a third preset threshold value, generating a third detection tag aiming at the communication state between the terminal and the server, wherein the third detection tag characterizes that the communication state between the terminal and the server is fluctuation;
and if the deviation value is larger than the third preset threshold value, generating a fourth detection tag aiming at the communication state between the terminal and the server, wherein the fourth detection tag represents that the communication state between the terminal and the server is abnormal.
5. The method according to claim 2, wherein the detecting the network communication status between the terminal and the resource object with the loading time corresponding to the resource object, and generating the second detection result for the communication status between the terminal and the resource object, includes:
calculating the average value of the loading time consumption corresponding to each resource object;
calculating a standard deviation value corresponding to the terminal based on the average value;
if the loading time consumption of the resource object is greater than n times of the standard deviation value, generating an attention detection result aiming at the communication state between the terminal and the resource object, wherein the attention detection result represents that attention is required to be paid to the communication state between the terminal and the resource object;
if the loading time consumption of the resource object is less than n times of the standard deviation value, generating a network normal result aiming at the communication state between the terminal and the resource object;
wherein n is a positive integer greater than 0.
6. The method of any of claims 1-5, wherein the network detection result comprises a detection tag and a standard deviation, the method further comprising:
Acquiring a target detection sample file corresponding to the detection request;
and sending the detection tag, the standard deviation and the target detection sample file to a data center, wherein the data center is used for generating a matrix knowledge base corresponding to the network detection result according to the detection tag, the standard deviation and the target detection sample file, and the matrix knowledge base is used for guaranteeing the detection result and the communication state of the network communication among the terminal, the server and the resource object.
7. The method of claim 1, wherein the determining the target object to be detected in response to the triggering instruction of the network detection comprises:
responding to a triggering instruction of network detection, and acquiring a detection script;
and running the detection script and extracting the target object to be detected.
8. The method of claim 7, wherein the detection model is generated by:
acquiring IT resources, wherein the IT resources at least comprise logic resources and physical resources;
acquiring a front-end script, a plurality of detection sample files and background analysis information for network detection, and performing graph database processing by adopting the front-end script, the plurality of detection sample files, the background analysis information and the IT resource to generate the detection model;
The logic resource at least comprises one of an IP address, a middleware service and a virtual machine, and the physical resource at least comprises one of a machine room, network equipment and a terminal.
9. The method of claim 7, wherein the acquiring the detection model in response to the triggering instruction for network detection comprises:
and responding to the access operation of the user to the web page in the browser within a preset time period, or responding to a triggering instruction input by the user for network detection, and acquiring a detection model.
10. The method as recited in claim 8, further comprising:
obtaining a standard JavaScript script template and a file path of the detection sample file;
and inputting the IT resources and the file path into the standard JavaScript template for compiling to generate the front-end script.
11. A network detection device, comprising:
the object determining module is used for responding to a triggering instruction of network detection and determining a target object to be detected, wherein the target object comprises a server and at least one resource object;
a request sending module, configured to send a detection request to the server and at least one of the resource objects;
The acquisition data receiving module is used for receiving first acquisition data corresponding to the detection request and returned by the server and second acquisition data corresponding to the detection request and returned by the resource object;
and the network detection module is used for carrying out network detection according to the first acquired data and the second acquired data and generating a network detection result corresponding to the terminal.
12. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to any one of claims 1-8 when executing a program stored on a memory.
13. A computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310805388.1A CN116800638A (en) | 2023-06-30 | 2023-06-30 | Network detection method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310805388.1A CN116800638A (en) | 2023-06-30 | 2023-06-30 | Network detection method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116800638A true CN116800638A (en) | 2023-09-22 |
Family
ID=88043469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310805388.1A Pending CN116800638A (en) | 2023-06-30 | 2023-06-30 | Network detection method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116800638A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117914930A (en) * | 2024-03-15 | 2024-04-19 | 苔花科迈(西安)信息技术有限公司 | Mobile equipment operation method and device based on network state detection under coal mine |
-
2023
- 2023-06-30 CN CN202310805388.1A patent/CN116800638A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117914930A (en) * | 2024-03-15 | 2024-04-19 | 苔花科迈(西安)信息技术有限公司 | Mobile equipment operation method and device based on network state detection under coal mine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108345543B (en) | Data processing method, device, equipment and storage medium | |
CN110209639B (en) | Information processing method, device and system | |
CN109947650B (en) | Script step processing method, device and system | |
CN106649126B (en) | Method and device for testing application program | |
CN111555938B (en) | Information processing method and related device | |
CN110335386B (en) | Identity authentication method, device, terminal and storage medium | |
CN111984401A (en) | Memory overflow management method and device, electronic equipment and storage medium | |
CN116800638A (en) | Network detection method, device, electronic equipment and storage medium | |
CN112749074B (en) | Test case recommending method and device | |
CN115333928B (en) | Network early warning method and device, electronic equipment and storage medium | |
CN116610508A (en) | Heat dissipation test method and device, electronic equipment and storage medium | |
CN115987786A (en) | Configuration change method, system, terminal equipment and storage medium | |
CN115589432A (en) | Message push management method, device, medium and equipment | |
CN115328770A (en) | Application program testing method and device, electronic equipment and storage medium | |
CN105740396B (en) | HTTP data processing method and device | |
CN117097635B (en) | Method, device, storage medium and equipment for calling link sampling | |
CN117579648A (en) | Method and device for uploading check data, electronic equipment and storage medium | |
CN115495383A (en) | Data pushing method and device, storage medium and electronic equipment | |
CN117435457A (en) | Platform performance automatic test method, device, medium and equipment | |
CN117742883A (en) | Expansion method and system of heterogeneous container, electronic equipment and storage medium | |
CN118694814A (en) | Terminal equipment monitoring method and device, electronic equipment and readable storage medium | |
CN116048858A (en) | System error processing method and device, electronic equipment and storage medium | |
CN115509936A (en) | Program testing method, device, medium and equipment | |
CN116521523A (en) | Stability test method and device of participant equipment, electronic equipment and storage medium | |
CN115981631A (en) | Code management method, device, storage medium and electronic equipment |
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 |