Network detection method and apparatus, electronic device, and storage medium
By sending detection requests to servers and resource objects through terminal devices, receiving and analyzing collected data to generate network detection results, the problem of narrow coverage and cumbersome process in network connectivity detection in cross-regional and multi-terminal environments is solved, and efficient network detection is achieved without the user's awareness.
Patent Information
- Application Number
- CN202310805388.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-08-04
- Estimated Expiration
- 2043-06-30
AI Technical Summary
Existing technologies cannot effectively detect network connectivity between user devices and servers, especially in cross-regional and multi-terminal environments where the detection coverage is narrow and the process is cumbersome.
The terminal device responds to the network detection trigger command, sends detection requests to the server and resource objects, receives collected data, and generates network detection results based on this data. The network status is detected by using request time and loading time, and detection labels and standard deviations are generated. A matrix knowledge base is generated by using a graph database.
It achieves a seamless network detection process, simplifies the detection workflow, improves detection coverage, is applicable to different network environments and terminals across regions, and provides quantitative network status analysis.
Smart Images

Figure CN116800638B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a network detection method, a network detection device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the development of network technology, users often need to communicate with servers while using their devices. For this communication, it's necessary to test network connectivity to ensure the stability of data exchange. Specifically, testing network connectivity from the user terminal to the application server requires users to execute commands such as ping, telnet, and tracert, and then report the results to the network administrator for analysis and confirmation. However, when the application system involves a wide range of terminal environments and users across multiple regions, effective network connectivity testing becomes difficult, and the process suffers from narrow coverage and cumbersome procedures. Summary of the Invention
[0003] This invention provides a network detection method, apparatus, electronic device, and computer-readable storage medium to solve or partially solve the problems of ineffective network connectivity detection, narrow coverage, and cumbersome detection process.
[0004] This invention discloses a network detection method, comprising:
[0005] In response to a network detection trigger command, a target object to be detected is determined, the target object including a server and at least one resource object;
[0006] Send a detection request to the server and at least one of the resource objects;
[0007] Receive the first collection data returned by the server corresponding to the detection request, and the second collection data returned by the resource object corresponding to the detection request;
[0008] Based on the first and second collected data, network detection is performed to generate network detection results corresponding to the terminal.
[0009] Optionally, the first collected data includes the first request time of the terminal initiating the detection request to the server, and the second collected data includes the loading time of each resource object loading the target detection sample file and the second request time of the terminal initiating the detection request to the resource object. The target detection sample file is a file with a known file size. The step of performing network detection based on the first collected data and the second collected data to generate a network detection result corresponding to the terminal includes:
[0010] The network communication status between the terminal and the server is detected by using the first request time and the second request time, and a first detection result for the communication status between the terminal and the server is generated;
[0011] The network communication status between the terminal and the resource object is detected by using the loading time corresponding to the resource object, and a second detection result for the communication status between the terminal and the resource object is generated.
[0012] Optionally, the step of detecting the network communication status between the terminal and the server using the first request time and the second request time, and generating a first detection result for the communication status between the terminal and the server, includes:
[0013] Using the first request time as a baseline value, the second request time is subtracted from the first request time to obtain the deviation value corresponding to the terminal;
[0014] The network communication status between the terminal and the server is detected based on the magnitude of the deviation value, and a first detection result for the communication status between the terminal and the server is generated.
[0015] Optionally, the step of detecting the network communication status between the terminal and the server based on the magnitude of the deviation value, and generating a first detection result for the communication status between the terminal and the server, includes:
[0016] If the deviation value is less than a first preset threshold, a first detection tag is generated for the communication status between the terminal and the server, and the first detection tag indicates that the communication status between the terminal and the server is excellent.
[0017] If the deviation value is greater than or equal to the first preset threshold and less than the second preset threshold, a second detection tag is generated for the communication status between the terminal and the server. The second detection tag indicates that the communication status between the terminal and the server is good.
[0018] If the deviation value is greater than or equal to the second preset threshold and less than the third preset threshold, a third detection tag is generated for the communication status between the terminal and the server. The third detection tag indicates that the communication status between the terminal and the server is fluctuating.
[0019] If the deviation value is greater than the third preset threshold, a fourth detection tag is generated for the communication status between the terminal and the server, and the fourth detection tag indicates that the communication status between the terminal and the server is abnormal.
[0020] Optionally, the step of detecting the network communication status between the terminal and the resource object using the loading time corresponding to the resource object, and generating a second detection result for the communication status between the terminal and the resource object, includes:
[0021] Calculate the average loading time for each of the resource objects;
[0022] Based on the average value, calculate the standard deviation corresponding to the terminal;
[0023] If the loading time of the resource object is greater than n times the standard deviation, then an attention detection result is generated for the communication state between the terminal and the resource object. The attention detection result indicates that attention needs to be paid to the communication state between the terminal and the resource object.
[0024] If the loading time of the resource object is less than n times the standard deviation, a normal network result is generated for the communication status between the terminal and the resource object.
[0025] Wherein, n is a positive integer greater than 0.
[0026] Optionally, the network detection result includes detection labels and standard deviation, and the method further includes:
[0027] Obtain the target detection sample file corresponding to the detection request;
[0028] The detection label, the standard deviation, and the target detection sample file are sent to the data center. The data center is used to generate a matrix knowledge base corresponding to the network detection result based on the detection label, the standard deviation, and the target detection sample file. The matrix knowledge base is used to ensure the detection results and communication status of network connectivity between the terminal, the server, and the resource object.
[0029] Optionally, determining the target object to be detected in response to the network detection trigger command includes:
[0030] In response to a network detection trigger command, obtain the detection script;
[0031] Run the detection script to extract the target object to be detected.
[0032] Optionally, the detection model is generated in the following manner:
[0033] Acquire IT resources, which include at least logical resources and physical resources;
[0034] Obtain a front-end script for network detection, several detection sample files, and back-end parsing information. Use the front-end script, the several detection sample files, the back-end parsing information, and the IT resources to perform graph database processing to generate the detection model.
[0035] The logical resources include at least one of IP address, middleware service, and virtual machine, and the physical resources include at least one of computer room, network equipment, and terminal.
[0036] Optionally, the step of obtaining the detection model in response to a network detection trigger command includes:
[0037] In response to user access to web pages in the browser within a preset time period, or in response to user-inputted trigger commands for network detection, the detection model is obtained.
[0038] Optionally, it also includes:
[0039] Obtain the standard JavaScript script template and the file path of the test sample file;
[0040] The IT resources and the file path are input into the standard JavaScript script template for compilation to generate the front-end script.
[0041] This invention also discloses a network detection device, comprising:
[0042] The object determination module is used to determine the target object to be detected in response to a network detection trigger command. The target object includes a server and at least one resource object.
[0043] A request sending module is used to send a detection request to the server and at least one of the resource objects;
[0044] The data collection receiving module is used to receive the first collection data returned by the server corresponding to the detection request, and the second collection data returned by the resource object corresponding to the detection request;
[0045] The network detection module is used to perform network detection based on the first collected data and the second collected data, and generate network detection results corresponding to the terminal.
[0046] Optionally, the first collected data includes the first request time of the terminal initiating the detection request to the server, and the second collected data includes the loading time of each resource object loading the target detection sample file, and the second request time of the terminal initiating the detection request to the resource object. The target detection sample file is a file with a known file size. The network detection module is specifically used for:
[0047] The network communication status between the terminal and the server is detected by using the first request time and the second request time, and a first detection result for the communication status between the terminal and the server is generated;
[0048] The network communication status between the terminal and the resource object is detected by using the loading time corresponding to the resource object, and a second detection result for the communication status between the terminal and the resource object is generated.
[0049] Optionally, the network detection module is specifically used for:
[0050] Using the first request time as a baseline value, the second request time is subtracted from the first request time to obtain the deviation value corresponding to the terminal;
[0051] The network communication status between the terminal and the server is detected based on the magnitude of the deviation value, and a first detection result for the communication status between the terminal and the server is generated.
[0052] Optionally, the network detection module is specifically used for:
[0053] If the deviation value is less than a first preset threshold, a first detection tag is generated for the communication status between the terminal and the server, and the first detection tag indicates that the communication status between the terminal and the server is excellent.
[0054] If the deviation value is greater than or equal to the first preset threshold and less than the second preset threshold, a second detection tag is generated for the communication status between the terminal and the server. The second detection tag indicates that the communication status between the terminal and the server is good.
[0055] If the deviation value is greater than or equal to the second preset threshold and less than the third preset threshold, a third detection tag is generated for the communication status between the terminal and the server. The third detection tag indicates that the communication status between the terminal and the server is fluctuating.
[0056] If the deviation value is greater than the third preset threshold, a fourth detection tag is generated for the communication status between the terminal and the server, and the fourth detection tag indicates that the communication status between the terminal and the server is abnormal.
[0057] Optionally, the network detection module is specifically used for:
[0058] Calculate the average loading time for each of the resource objects;
[0059] Based on the average value, calculate the standard deviation corresponding to the terminal;
[0060] If the loading time of the resource object is greater than n times the standard deviation, then an attention detection result is generated for the communication state between the terminal and the resource object. The attention detection result indicates that attention needs to be paid to the communication state between the terminal and the resource object.
[0061] If the loading time of the resource object is less than n times the standard deviation, a normal network result is generated for the communication status between the terminal and the resource object.
[0062] Wherein, n is a positive integer greater than 0.
[0063] Optionally, the network detection result includes detection labels and standard deviation, and the device further includes:
[0064] The file acquisition module is used to acquire the target detection sample file corresponding to the detection request;
[0065] The data sending module is used to send the detection label, the standard deviation, and the target detection sample file to the data center. The data center is used to generate a matrix knowledge base corresponding to the network detection result based on the detection label, the standard deviation, and the target detection sample file. The matrix knowledge base is used to ensure the detection results and communication status of network connectivity between the terminal, the server, and the resource object.
[0066] Optionally, the object determination module is specifically used for:
[0067] In response to a network detection trigger command, obtain the detection script;
[0068] Run the detection script to extract the target object to be detected.
[0069] Optionally, the detection model is generated through the following modules:
[0070] The resource acquisition module is used to acquire IT resources, which include at least logical resources and physical resources.
[0071] The model generation module is used to obtain a front-end script for network detection, several detection sample files, and back-end parsing information. It uses the front-end script, the several detection sample files, the back-end parsing information, and the IT resources to perform graph database processing to generate the detection model.
[0072] The logical resources include at least one of IP address, middleware service, and virtual machine, and the physical resources include at least one of computer room, network equipment, and terminal.
[0073] Optionally, the object determination module is specifically used for:
[0074] In response to user access to web pages in the browser within a preset time period, or in response to user-inputted trigger commands for network detection, the detection model is obtained.
[0075] Optionally, it also includes:
[0076] The script acquisition module is used to obtain the standard JavaScript script template and the file path of the detection sample file;
[0077] The script generation module is used to compile the IT resources and the file path into the standard JavaScript script template to generate the front-end script.
[0078] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0079] The memory is used to store computer programs;
[0080] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0081] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0082] The embodiments of the present invention have the following advantages:
[0083] In this embodiment of the invention, when network equipment changes, such as when a network device (or system) is moved from an old data center to a new data center, it is necessary to test whether the network is stable after the relocation. The terminal responds to a network detection trigger command, identifies the target objects to be tested, including a server and at least one resource object. The terminal then 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. Network detection is then performed based on the first and second collected data, generating a network detection result corresponding to the terminal. For each terminal, when it triggers a network detection command, it can send a detection request to the server and at least one resource object, and then perform network detection based on the collected data returned by the server and resource object. On the one hand, the network detection process is seamless, ensuring normal terminal use and simplifying the detection process. On the other hand, each terminal uses the same detection method, improving the detection coverage while achieving network detection, making it applicable to terminals in different network environments, across regions, and with different systems. Attached Figure Description
[0084] Figure 1 This is a flowchart of the steps of a network detection method provided in an embodiment of the present invention;
[0085] Figure 2 This is a schematic diagram of the modeling of the detection model provided in this embodiment of the invention;
[0086] Figure 3 This is a schematic diagram of the execution timing of data acquisition and detection provided in this embodiment of the invention;
[0087] Figure 4 This is a schematic diagram of the network connectivity detection process provided in this embodiment of the invention;
[0088] Figure 5 This is a schematic diagram of the business process provided in an embodiment of the present invention;
[0089] Figure 6 This is a structural block diagram of a network detection device provided in an embodiment of the present invention;
[0090] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0091] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0092] As an example, traditional network connectivity testing of user terminal devices to application servers requires users to execute commands such as ping, telnet, and tracert, and then report the results back to the network administrator for analysis and confirmation. When the application system involves a wide range of terminal environments and users across multiple regions, existing methods have the following drawbacks: 1. They cannot quantitatively analyze network status; 2. They cannot guarantee the coverage of the tested terminals and users; 3. They cannot continuously track and compare the test results; 4. The testing work is complex and requires the full participation of network professionals.
[0093] For example, in some implementation scenarios, for network systems, due to reasons such as equipment upgrades, it is necessary to migrate the system from the old data center to a new data center. Due to the large number of system users, complex terminal environments, multiple geographical locations, and involvement of external systems, it is difficult to quickly measure the network differences between user terminals (hereinafter referred to as terminals) and the new data center.
[0094] In this invention, when network equipment changes, such as relocating network equipment (or systems) from an old data center to a new data center, it is necessary to test whether the network is stable after the relocation. The terminal responds to a network detection trigger command, identifies the target objects to be tested, including a server and at least one resource object. The terminal then sends a detection request to the server and at least one resource object, and receives first collected data corresponding to the detection request from the server, and second collected data corresponding to the detection request from the resource object. Network detection is then performed based on the first and second collected data, generating a network detection result corresponding to the terminal. For each terminal, when it triggers a network detection command, it can send a detection request to the server and at least one resource object, and then perform network detection based on the collected data returned by the server and resource object. On the one hand, the network detection process is seamless, ensuring normal terminal use and simplifying the detection process. On the other hand, each terminal uses the same detection method, improving the detection coverage while achieving network detection, making it applicable to terminals in different network environments, across regions, and with different systems.
[0095] Specifically, refer to Figure 1 The diagram illustrates a flowchart of a network detection method provided in an embodiment of the present invention, which may specifically include the following steps:
[0096] Step 101: In response to the network detection trigger command, determine the target object to be detected, the target object including the server and at least one resource object;
[0097] In this embodiment of the invention, it can be applied to a user terminal (hereinafter referred to as the terminal). During the normal use of the terminal by the user, network detection can be triggered imperceptibly, or the user can actively trigger network detection on the terminal. This invention does not limit this.
[0098] For network detection, it can detect network connectivity between terminals and servers, and between terminals and resource objects. Resource objects can include IP addresses, middleware services, virtual machines, data centers, network devices, and terminals. Specifically, during the network detection process, terminals can perform network detection based on corresponding detection models. For the detection models, it supports manual input or batch import of model information to standardize the scope, conditions, and methods of network detection.
[0099] In some alternative embodiments, a detection model can be generated by acquiring IT resources, which include at least logical and physical resources, followed by acquiring a front-end script for network detection, several detection sample files, and back-end parsing information. The front-end script, the detection sample files, the back-end parsing information, and the IT resources are then used for graph database processing. Logical resources are represented as virtual resource objects, such as IP addresses, middleware services, and virtual machines; physical resources are represented as physical resource objects, such as data centers, network devices, and terminals.
[0100] Furthermore, the front-end script can be a JavaScript script that runs in the front-end browser. By obtaining a standard JavaScript script template and the file path of the test sample file, the IT resources and file path are then input into the standard JavaScript script template for compilation to generate the front-end script. The test sample file can be a file with different memory sizes set according to the requirements of the test scenario. For example, the test sample file can include files with memory sizes of 1K, 10K, 50K, 100K, 1M, 2M, 5M, and 10M, with the specification value ranging from 1K to 10M. The back-end parsed information can be class information. Through reflection mechanism technology, the uploaded data is converted into class information corresponding to the entity at the interface so as to realize dynamic calling of objects to complete the persistent storage of data.
[0101] In one example, refer to Figure 2This illustration shows a modeling diagram of the detection model provided in this embodiment of the invention. By selecting the IT resources to be detected—logical resources (IP addresses / domain names, middleware services, virtual machines), physical resources (computer rooms, network equipment, user terminal equipment), etc.—the model uses graph database technology (Neo4J) to visualize the settings of the detection objects. Combining the attributes of the detection objects and the selected detection model, it generates detection modeling instance information (including terminal environment information, IT resource information, time period information, user information, difference information, etc.).
[0102] When a terminal triggers network detection, it can send a corresponding request to the detection system to obtain the corresponding detection script. When the detection system receives the request, it can automatically compile the detection model to obtain the corresponding detection script and return the detection script to the terminal. Then, the terminal runs the detection script and determines the target object and detection sample file to be detected through the front-end script. After the detection is completed, the corresponding data can be persistently stored based on the parsed information in the background.
[0103] Furthermore, in some optional embodiments, in response to a user's access to a web page in a browser within a preset time period, or in response to a user's input of a trigger command for network detection, a detection model is obtained. Thus, network detection can be triggered imperceptibly during the user's use of the terminal, or it can be actively triggered by the user, improving the convenience of network detection.
[0104] Step 102: Send a detection request to the server and at least one of the resource objects;
[0105] For a server and at least one resource object that need to be detected, the terminal can send corresponding detection requests to the server and resource object respectively, instructing the server and resource object to perform corresponding network data collection and return the corresponding data collection results to the terminal. Specifically, for the server, since it is the host system for data interaction, it needs to send corresponding detection requests during the network detection process. For resource objects, one or more resource objects can be selected for detection during a single network detection process. For example, one or more logical resources, one or more physical resources, or a combination of these can be selected; this invention does not impose any limitations on this.
[0106] In one example, the terminal can send a URL request for the target detection sample file to the server and the resource object to be detected, respectively. After receiving the URL request, the server and the resource object to be detected can obtain the corresponding detection script, obtain the corresponding data based on the detection script, and return the data to the terminal.
[0107] Step 103: Receive the first collection data returned by the server corresponding to the detection request, and the second collection data returned by the resource object corresponding to the detection request;
[0108] For the server, after receiving a detection request from the terminal, it can respond to the request and obtain the corresponding response duration, which is then used as the first request time and returned to the terminal. For each resource object, after receiving a detection request from the terminal, it can parse the request to determine the corresponding target detection sample file, load the target detection sample file, and obtain the loading time after loading. Simultaneously, it responds to the detection request and obtains the corresponding response duration, which is then used as the second request time. Finally, it returns the loading time and the second request time to the terminal so that the terminal can perform network detection based on the collected data sent by the server and the resource object.
[0109] It should be noted that since different specifications of test sample files require different loading times, during the same batch of network testing, for the same resource object, loading test sample files of different specifications can detect the loading time of the resource object in different testing scenarios, so as to analyze the network status of the same resource object in different network demand scenarios. Correspondingly, for the same specification of test sample file, testing the same specification of test sample file with different resource objects can check the loading time of different resource objects in the same testing scenario, so as to analyze the network status between the terminal and each resource object in different demand scenarios.
[0110] Step 104: Perform network detection based on the first collected data and the second collected data to generate network detection results corresponding to the terminal.
[0111] In a specific implementation, as in the above embodiment, the first collected data includes the first request time of the terminal initiating a detection request to the server, and the second collected data includes the loading time of each resource object loading the target detection sample file and the second request time of the terminal initiating a detection request to the resource object. The target detection sample file is a file with a known file memory size. Then, the terminal can use the first request time and the second request time to detect the network communication status between the terminal and the server, and generate a first detection result for the communication status between the terminal and the server. The terminal can also use the loading time corresponding to the resource object to detect the network communication status between the terminal and the resource object, and generate a second detection result for the communication status between the terminal and the resource object.
[0112] For network detection of the server, the terminal can use the first request time as a benchmark value, subtract the first request time from the second request time to obtain the deviation value corresponding to the terminal, and then detect the network communication status between the terminal and the server based on the magnitude of the deviation value to generate a first detection result for the communication status between the terminal and the server.
[0113] Specifically, if the deviation value is less than a first preset threshold, a first detection tag is generated for the communication status between the terminal and the server, indicating that the communication status between the terminal and the server is excellent; if the deviation value is greater than or equal to the first preset threshold and less than a second preset threshold, a second detection tag is generated for the communication status between the terminal and the server, indicating that the communication status between the terminal and the server is good; if the deviation value is greater than or equal to the second preset threshold and less than a third preset threshold, a third detection tag is generated for the communication status between the terminal and the server, indicating that the communication status between the terminal and the server is fluctuating; if the deviation value is greater than the third preset threshold, a fourth detection tag is generated for the communication status between the terminal and the server, indicating that the communication status between the terminal and the server is abnormal.
[0114] In one example, the network time x (i.e., the first request time) from the terminal sending a request to the server and the server responding to the request is used as the baseline value. The network time y (i.e., the second request time) for the terminal to request a detected IT resource is used as the baseline value. The deviation value is calculated according to "deviation value = yx" to obtain the deviation value for each terminal in this round of testing. Then, the deviation value is labeled:
[0115] 1. Excellent: Deviation value is less than 0.
[0116] 2. Health: 0 <= Deviation value < 100 milliseconds
[0117] 3. Fluctuation: 100 <= deviation value < 2000 milliseconds;
[0118] 4. Abnormal: Greater than 2000 milliseconds or network unavailability
[0119] After obtaining the above tags, the proportion of each tag can be used to focus on terminals tagged with "fluctuation" or "abnormal" in order to optimize the corresponding network.
[0120] For each resource object, the terminal can calculate the average loading time of each resource object, and then calculate the standard deviation of the terminal based on the average. If the loading time of a resource object is greater than n times the standard deviation, a detection result indicating the need to pay attention to the communication status between the terminal and the resource object is generated. If the loading time of a resource object is less than n times the standard deviation, a normal network result indicating the communication status between the terminal and the resource object is generated. Here, n is a positive integer greater than 0.
[0121] In one example, for network detection of resource objects, the terminal can first calculate the average network latency μ of the current round of detection results: xN represents the network time spent loading the target sample file in each IT resource environment during a round of testing; then, the standard deviation σ of this round of testing is calculated based on the average value μ. Then, resource objects with network latency values greater than 3σ can be given special attention, i.e., corresponding attention detection results can be generated.
[0122] Through the above process, when each terminal triggers the network detection command, it can send a detection request to the server and at least one resource object. Then, network detection is performed based on the collected data returned by the server and resource object. On the one hand, the network detection process is seamless, ensuring the normal use of the terminal and simplifying the detection process. On the other hand, each terminal uses the same detection method, which improves the detection coverage while realizing network detection, and can be applied to terminals in different network environments, across regions and different systems.
[0123] It should be noted that the network detection of servers and resource objects in this invention includes, but is not limited to, the examples described above. It is understood that, based on the ideas and teachings of this invention, those skilled in the art can also use other methods, and this invention does not limit such methods.
[0124] In addition, after the terminal completes network detection based on the collected data returned by the server and resource objects, it can further obtain the target detection sample file corresponding to the detection request. Then, the detection label, standard deviation, and target detection sample file are sent to the data center. The data center is used to generate a matrix knowledge base corresponding to the network detection results based on the detection label, standard deviation, and target detection sample file. The matrix knowledge base is used to ensure the detection results and communication status of network connectivity between the terminal, server, and resource objects.
[0125] Specifically, based on IT resource information, modeling information, and the data collected this time, the terminal uses graph database technology to generate the detection results and status information (terminal connectivity, IT resource connectivity, terminal device information, detection user information, network differences between IT resources, etc.) in a visual form for the objects being detected. The executor can quickly determine the network connectivity between the objects being detected and the differences between different objects through the visualized detection results. Simultaneously, the detection results (such as 3σ or excellent, healthy, fluctuating, abnormal percentage, etc. in the above embodiment) can clearly, quantitatively, and quickly guide network administrators to analyze and locate abnormal network devices or network policy ranges. The detection model and results can be stored in the system as a historical valid case library, enabling rapid execution templates and tracking comparison models for secondary detection.
[0126] For example, by collecting sample files of different specifications and multiple rounds of test results, the average value μ for different networks is generated and stored in a data center. The data center can then form a matrix knowledge base of network test results based on the network environment, the tested sample files, and the standard deviation. This knowledge base is then combined with Six Sigma quality management theory to assess network connectivity quality. For instance, in a DCN network environment, a sample file of 1024KB, an average loading time μ of 300 milliseconds, and a standard deviation σ of 50 milliseconds are considered optimal, with a network environment achieving 6σ. Through continuous testing, improvement, and accumulation of test results, the test matrix knowledge base can more effectively guide subsequent similar network status testing work, making it more instructive and practical.
[0127] In this embodiment of the invention, when network equipment changes, such as when a network device (or system) is moved from an old data center to a new data center, it is necessary to test whether the network is stable after the relocation. The terminal responds to a network detection trigger command, identifies the target objects to be tested, including a server and at least one resource object. The terminal then 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. Network detection is then performed based on the first and second collected data, generating a network detection result corresponding to the terminal. For each terminal, when it triggers a network detection command, it can send a detection request to the server and at least one resource object, and then perform network detection based on the collected data returned by the server and resource object. On the one hand, the network detection process is seamless, ensuring normal terminal use and simplifying the detection process. On the other hand, each terminal uses the same detection method, improving the detection coverage while achieving network detection, making it applicable to terminals in different network environments, across regions, and with different systems.
[0128] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, some optional examples are provided below for illustrative purposes. These examples do not limit the scope of the present invention.
[0129] Reference Figure 3 This diagram illustrates the execution timing of the data acquisition and detection process provided in this embodiment of the invention. The terminal device (browser / application) triggers detection by sending an HTTP request to the host system. Upon receiving the HTTP request, the host system outputs the detection script to return it 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 and the target system / environment being detected, requesting them to collect data. For the host system, it can execute the corresponding detection script and output the detected sample object, returning the output result to the terminal device (e.g., returning the time taken for the first request). Similarly, for the target system / environment being detected, it can also execute the corresponding detection script and output the detected sample object, returning the output result to the terminal device (e.g., returning the time taken for the second request, loading time, etc.). After receiving the corresponding data, the terminal device can perform network detection and package the detection results, including the detection status, time consumption, and environmental information, and then send them to the data collection center (equivalent to the data center mentioned above). The data collection center will then perform further data processing on the packaged data, such as visualizing the network connectivity between different terminals, host systems, and resource objects.
[0130] Reference Figure 4 The diagram illustrates a network connectivity detection process provided in an embodiment of the present invention, including:
[0131] S1. System Extraction: The system provides a visual selection of detection models based on historical storage detection models;
[0132] S2. User Input: Create a new system detection model, supporting manual input or batch import of model information, and setting the scope of the target system for detection;
[0133] S3. Detection Modeling: By selecting the IT resources to be detected, such as logical resources (IP addresses / domain names, middleware services, virtual machines) and physical resources (computer rooms, network equipment, user terminal equipment), the detection objects are visualized using graph database technology (Neo4J). Combined with the detection object attributes and model selection, detection modeling information is generated.
[0134] S4. Automatic compilation: Based on the set detection model, the intelligent detection brain automatically completes the compilation of the model script.
[0135] S5. Detection Script Deployment: Execute the deployment to publish the detection script file to the host machine. The detection model parameters can be modified and optimized in real time based on the business test or inspection results.
[0136] S6. Collect detection execution information: The detection script automatically completes the detection task according to the set strategy and automatically uploads the corresponding detection result information to the database according to the set settings.
[0137] S7. Automatic Generation of Detection Results: Based on IT resource information and collected data (modeling information, data collected in this instance), graph database technology is used to generate, in a visual format, the detection results and status information corresponding to the detected objects (terminal connectivity, IT resource connectivity, terminal device information, detection user information, network differences between IT resources, etc.). The executor can quickly determine the network connectivity between the currently detected objects and the differences between different detected objects through the visualized detection results. Simultaneously, the detection results can clearly and quickly guide network administrators to analyze and locate abnormal network devices or network policy scopes. The detection model and results can be stored in the system as a historical valid case library, enabling rapid execution templates and tracking comparison models for secondary detection.
[0138] Furthermore, refer to Figure 5 This illustration shows a schematic diagram of the business process provided in an embodiment of the present invention. During the construction or migration of a new IT system, the network connectivity detection business process between user terminals and servers can be implemented based on a smart detection brain (i.e., a data center), a business terminal group (a group of terminals composed of different user terminals), and a corresponding network administrator. Specifically, the rule package can first be configured in the smart detection brain according to the detection requirements, then a detection task can be issued and sent to the business terminal group. The terminals in the business terminal group can execute the network detection process provided in the aforementioned embodiment and return the detection results to the smart detection brain. After receiving the detection results, the smart detection brain can perform multi-dimensional result quantification on the collected detection data and complete network status assessment to determine whether network communication is successful. If successful, the detection task ends; if unsuccessful, corresponding data analysis and processing information is sent to the network administrator so that the network administrator can optimize the network. Simultaneously, the network administrator can send corresponding detection instructions to the smart detection brain according to actual needs so that the smart detection brain can continue to issue detection tasks. Here, "network administrator" refers to the terminal device to which the network administrator is located.
[0139] Through the above process, implementing the embodiments of the present invention has at least the following beneficial effects:
[0140] The testing process is simple and safe, flexible in scope, efficient, and yields quantitative and accurate results.
[0141] Significantly reduce the time and manpower costs of network debugging during the cutover and migration of traditional Web business systems.
[0142] Based on the collected data, comparative analysis is conducted to clearly locate network bottlenecks and fault points, and to accurately notify and guide relevant network administrators and personnel to troubleshoot and handle the fault points; this changes the traditional passive and inefficient approach that relies on experience, guesswork, cross-disciplinary disputes, and waiting for users to report faults.
[0143] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0144] Reference Figure 6 The diagram shows a structural block diagram of a network detection device provided in an embodiment of the present invention, which may specifically include the following modules:
[0145] The object determination module 601 is used to determine the target object to be detected in response to a network detection trigger command. The target object includes a server and at least one resource object.
[0146] Request sending module 602 is used to send a detection request to the server and at least one of the resource objects;
[0147] The data acquisition receiving module 603 is used to receive the first data acquisition returned by the server corresponding to the detection request, and the second data acquisition returned by the resource object corresponding to the detection request;
[0148] The network detection module 604 is used to perform network detection based on the first collected data and the second collected data, and generate network detection results corresponding to the terminal.
[0149] In an optional embodiment, the first collected data includes the first request time of the terminal initiating the detection request to the server, the second collected data includes the loading time of each resource object loading the target detection sample file, and the second request time of the terminal initiating the detection request to the resource object, wherein the target detection sample file is a file with a known file memory size, and the network detection module 604 is specifically used for:
[0150] The network communication status between the terminal and the server is detected by using the first request time and the second request time, and a first detection result for the communication status between the terminal and the server is generated;
[0151] The network communication status between the terminal and the resource object is detected by using the loading time corresponding to the resource object, and a second detection result for the communication status between the terminal and the resource object is generated.
[0152] In one optional embodiment, the network detection module 604 is specifically used for:
[0153] Using the first request time as a baseline value, the second request time is subtracted from the first request time to obtain the deviation value corresponding to the terminal;
[0154] The network communication status between the terminal and the server is detected based on the magnitude of the deviation value, and a first detection result for the communication status between the terminal and the server is generated.
[0155] In one optional embodiment, the network detection module 604 is specifically used for:
[0156] If the deviation value is less than a first preset threshold, a first detection tag is generated for the communication status between the terminal and the server, and the first detection tag indicates that the communication status between the terminal and the server is excellent.
[0157] If the deviation value is greater than or equal to the first preset threshold and less than the second preset threshold, a second detection tag is generated for the communication status between the terminal and the server. The second detection tag indicates that the communication status between the terminal and the server is good.
[0158] If the deviation value is greater than or equal to the second preset threshold and less than the third preset threshold, a third detection tag is generated for the communication status between the terminal and the server. The third detection tag indicates that the communication status between the terminal and the server is fluctuating.
[0159] If the deviation value is greater than the third preset threshold, a fourth detection tag is generated for the communication status between the terminal and the server, and the fourth detection tag indicates that the communication status between the terminal and the server is abnormal.
[0160] In one optional embodiment, the network detection module 604 is specifically used for:
[0161] Calculate the average loading time for each of the resource objects;
[0162] Based on the average value, calculate the standard deviation corresponding to the terminal;
[0163] If the loading time of the resource object is greater than n times the standard deviation, then an attention detection result is generated for the communication state between the terminal and the resource object. The attention detection result indicates that attention needs to be paid to the communication state between the terminal and the resource object.
[0164] If the loading time of the resource object is less than n times the standard deviation, a normal network result is generated for the communication status between the terminal and the resource object.
[0165] Wherein, n is a positive integer greater than 0.
[0166] In one optional embodiment, the network detection result includes detection labels and standard deviation, and the device further includes:
[0167] The file acquisition module is used to acquire the target detection sample file corresponding to the detection request;
[0168] The data sending module is used to send the detection label, the standard deviation, and the target detection sample file to the data center. The data center is used to generate a matrix knowledge base corresponding to the network detection result based on the detection label, the standard deviation, and the target detection sample file. The matrix knowledge base is used to ensure the detection results and communication status of network connectivity between the terminal, the server, and the resource object.
[0169] In one alternative embodiment, the object determination module 601 is specifically used for:
[0170] In response to a network detection trigger command, obtain the detection script;
[0171] Run the detection script to extract the target object to be detected.
[0172] In one alternative embodiment, the detection model is generated through the following modules:
[0173] The resource acquisition module is used to acquire IT resources, which include at least logical resources and physical resources.
[0174] The model generation module is used to obtain a front-end script for network detection, several detection sample files, and back-end parsing information. It uses the front-end script, the several detection sample files, the back-end parsing information, and the IT resources to perform graph database processing to generate the detection model.
[0175] The logical resources include at least one of IP address, middleware service, and virtual machine, and the physical resources include at least one of computer room, network equipment, and terminal.
[0176] In one alternative embodiment, the object determination module 601 is specifically used for:
[0177] In response to user access to web pages in the browser within a preset time period, or in response to user-inputted trigger commands for network detection, the detection model is obtained.
[0178] In one alternative embodiment, it further includes:
[0179] The script acquisition module is used to obtain the standard JavaScript script template and the file path of the detection sample file;
[0180] The script generation module is used to compile the IT resources and the file path into the standard JavaScript script template to generate the front-end script.
[0181] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0182] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described network detection method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0183] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described network detection method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0184] Figure 7 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0185] The electronic device 700 includes, but is not limited to, components such as: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, and a power supply 711. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptop computers, PDAs, in-vehicle terminals, wearable devices, and pedometers.
[0186] It should be understood that, in this embodiment of the invention, the radio frequency unit 701 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 710; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 701 can also communicate with networks and other devices through a wireless communication system.
[0187] Electronic devices provide users with wireless broadband internet access through network module 702, such as helping users send and receive emails, browse web pages, and access streaming media.
[0188] The audio output unit 703 can convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into audio signals and output them as sound. Furthermore, the audio output unit 703 can also provide audio output related to specific functions performed by the electronic device 700 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, and a receiver, etc.
[0189] Input unit 704 is used to receive audio or video signals. Input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 706. The image frames processed by GPU 7041 can be stored in memory 709 (or other storage medium) or transmitted via radio frequency unit 701 or network module 702. Microphone 7042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 701 in telephone call mode.
[0190] 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 and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 7071 according to the ambient light level, and the proximity sensor can turn off the display panel 7071 and / or backlight when the electronic device 700 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 705 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.
[0191] The display unit 706 is used to display information input by the user or information provided to the user. The display unit 706 may include a display panel 7071, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0192] User input unit 707 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 707 includes a touch panel 7071 and other input devices 7072. Touch panel 7071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 7071). Touch panel 7071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the 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 it to the processor 710, which receives and executes commands from the processor 710. In addition, touch panel 7071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 7071, user input unit 707 may also include other input devices 7072. Specifically, other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.
[0193] Furthermore, the touch panel 7071 can cover the display panel 7071. When the touch panel 7071 detects a touch operation on or near it, it transmits the information to the processor 710 to determine the type of touch event. Subsequently, the processor 710 provides corresponding visual output on the display panel 7071 according to the type of touch event. It is understood that in one embodiment, the touch panel 7071 and the display panel 7071 are implemented as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 7071 and the display panel 7071 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.
[0194] Interface unit 708 serves as an interface for connecting external devices to electronic device 700. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 708 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 700, or it can be used to transmit data between electronic device 700 and external devices.
[0195] The memory 709 can be used to store software programs and various data. The memory 709 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0196] The processor 710 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 709, and by calling data stored in the memory 709, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 710.
[0197] The electronic device 700 may also include a power supply 711 (such as a battery) for supplying power to various components. Preferably, the power supply 711 is logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.
[0198] In addition, the electronic device 700 includes some functional modules not shown, which will not be described in detail here.
[0199] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0200] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0201] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
[0202] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0203] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0204] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0205] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0206] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0207] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0208] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A network detection method, characterized in that, include: In response to a network detection trigger command, a target object to be detected is determined, the target object including a server and at least one resource object; Send a detection request to the server and at least one of the resource objects; Receive the first collection data returned by the server corresponding to the detection request, and the second collection data returned by the resource object corresponding to the detection request; Based on the first and second collected data, network detection is performed to generate network detection results corresponding to the terminal. The first collected data includes the first request time when the terminal initiates the detection request to the server; the second collected data includes the loading time of each resource object loading the target detection sample file and the second request time when the terminal initiates the detection request to the resource object; the target detection sample file is a file with a known file size; and the step of performing network detection based on the first collected data and the second collected data to generate a network detection result corresponding to the terminal includes: The network communication status between the terminal and the server is detected by using the first request time and the second request time, and a first detection result for the communication status between the terminal and the server is generated; The network communication status between the terminal and the resource object is detected by using the loading time corresponding to the resource object, and a second detection result for the communication status between the terminal and the resource object is generated; The step of detecting the network communication status between the terminal and the server using the first request time and the second request time, and generating a first detection result for the communication status between the terminal and the server, includes: Using the first request time as a baseline value, the second request time is subtracted from the first request time to obtain the deviation value corresponding to the terminal; The network communication status between the terminal and the server is detected based on the magnitude of the deviation value, and a first detection result for the communication status between the terminal and the server is generated. The step of detecting the network communication status between the terminal and the resource object using the loading time corresponding to the resource object, and generating a second detection result for the communication status between the terminal and the resource object, includes: Calculate the average loading time for each of the resource objects; Based on the average value, calculate the standard deviation corresponding to the terminal; If the loading time of the resource object is greater than n times the standard deviation, then an attention detection result is generated for the communication state between the terminal and the resource object. The attention detection result indicates that attention needs to be paid to the communication state between the terminal and the resource object. If the loading time of the resource object is less than n times the standard deviation, a normal network result is generated for the communication status between the terminal and the resource object. Wherein, n is a positive integer greater than 0.
2. The method according to claim 1, characterized in that, The step of detecting the network communication status between the terminal and the server based on the magnitude of the deviation value, and generating a first detection result for the communication status between the terminal and the server, includes: If the deviation value is less than a first preset threshold, a first detection tag is generated for the communication status between the terminal and the server, and the first detection tag indicates that the communication status between the terminal and the server is excellent. If the deviation value is greater than or equal to the first preset threshold and less than the second preset threshold, a second detection tag is generated for the communication status between the terminal and the server. The second detection tag indicates that the communication status between the terminal and the server is good. If the deviation value is greater than or equal to the second preset threshold and less than the third preset threshold, a third detection tag is generated for the communication status between the terminal and the server. The third detection tag indicates that the communication status between the terminal and the server is fluctuating. If the deviation value is greater than the third preset threshold, a fourth detection tag is generated for the communication status between the terminal and the server, and the fourth detection tag indicates that the communication status between the terminal and the server is abnormal.
3. The method according to claim 1 or 2, characterized in that, The network detection results include detection labels and standard deviations, and the method further includes: Obtain the target detection sample file corresponding to the detection request; The detection label, the standard deviation, and the target detection sample file are sent to the data center. The data center is used to generate a matrix knowledge base corresponding to the network detection result based on the detection label, the standard deviation, and the target detection sample file. The matrix knowledge base is used to ensure the detection results and communication status of network connectivity between the terminal, the server, and the resource object.
4. The method according to claim 1, characterized in that, The process of responding to a network detection trigger command to determine the target object to be detected includes: In response to a network detection trigger command, obtain the detection script; Run the detection script to extract the target object to be detected.
5. The method according to claim 4, characterized in that, The detection model is generated in the following manner: Acquire IT resources, which include at least logical resources and physical resources; Obtain a front-end script for network detection, several detection sample files, and back-end parsing information. Use the front-end script, the several detection sample files, the back-end parsing information, and the IT resources to perform graph database processing to generate the detection model. The logical resources include at least one of IP address, middleware service, and virtual machine, and the physical resources include at least one of computer room, network equipment, and terminal.
6. The method according to claim 4, characterized in that, The process of obtaining the detection model in response to a network detection trigger command includes: In response to user access to web pages in the browser within a preset time period, or in response to user-inputted trigger commands for network detection, the detection model is obtained.
7. The method according to claim 5, characterized in that, Also includes: Obtain the standard JavaScript script template and the file path of the test sample file; The IT resources and the file path are input into the standard JavaScript script template for compilation to generate the front-end script.
8. A network detection device, characterized in that, include: The object determination module is used to determine the target object to be detected in response to a network detection trigger command. The target object includes a server and at least one resource object. A request sending module is used to send a detection request to the server and at least one of the resource objects; The data collection receiving module is used to receive the first collection data returned by the server corresponding to the detection request, and the second collection data returned by the resource object corresponding to the detection request; The network detection module is used to perform network detection based on the first collected data and the second collected data, and generate network detection results corresponding to the terminal. The first collected data includes the first request time when the terminal initiates the detection request to the server; the second collected data includes the loading time of each resource object loading the target detection sample file, and the second request time when the terminal initiates the detection request to the resource object; the target detection sample file is a file with a known file size; and the network detection module is specifically used for: The network communication status between the terminal and the server is detected by using the first request time and the second request time, and a first detection result for the communication status between the terminal and the server is generated; The network communication status between the terminal and the resource object is detected by using the loading time corresponding to the resource object, and a second detection result for the communication status between the terminal and the resource object is generated; Specifically, the network detection module is used for: Using the first request time as a baseline value, the second request time is subtracted from the first request time to obtain the deviation value corresponding to the terminal; The network communication status between the terminal and the server is detected based on the magnitude of the deviation value, and a first detection result for the communication status between the terminal and the server is generated. Specifically, the network detection module is used for: Calculate the average loading time for each of the resource objects; Based on the average value, calculate the standard deviation corresponding to the terminal; If the loading time of the resource object is greater than n times the standard deviation, then an attention detection result is generated for the communication state between the terminal and the resource object. The attention detection result indicates that attention needs to be paid to the communication state between the terminal and the resource object. If the loading time of the resource object is less than n times the standard deviation, a normal network result is generated for the communication status between the terminal and the resource object. Wherein, n is a positive integer greater than 0.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-7.