CN114024869A - Method, device, equipment and storage medium for detecting network connection state between terminals - Google Patents

Method, device, equipment and storage medium for detecting network connection state between terminals Download PDF

Info

Publication number
CN114024869A
CN114024869A CN202111300322.4A CN202111300322A CN114024869A CN 114024869 A CN114024869 A CN 114024869A CN 202111300322 A CN202111300322 A CN 202111300322A CN 114024869 A CN114024869 A CN 114024869A
Authority
CN
China
Prior art keywords
network connection
connection state
target
network
state detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111300322.4A
Other languages
Chinese (zh)
Other versions
CN114024869B (en
Inventor
曲鸣
王蒴
孟庆凯
牛春雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Civic Se Commercial Middleware Co ltd
Original Assignee
Shandong Civic Se Commercial Middleware Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Civic Se Commercial Middleware Co ltd filed Critical Shandong Civic Se Commercial Middleware Co ltd
Priority to CN202111300322.4A priority Critical patent/CN114024869B/en
Publication of CN114024869A publication Critical patent/CN114024869A/en
Application granted granted Critical
Publication of CN114024869B publication Critical patent/CN114024869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention discloses a method for detecting the network connection state between terminals, which comprises the following steps: receiving a network connection state detection task; analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected; searching a target network protocol interface corresponding to a target network protocol from the network protocol interface set obtained by pre-packaging; and calling a target network protocol interface to detect the network connection state between the source end and the target end. The method for detecting the network connection state between the terminals greatly simplifies the detection process, saves the labor cost and improves the readability of the detection result. The invention also discloses a device, equipment and a storage medium for detecting the network connection state between the terminals, and the device, the equipment and the storage medium have corresponding technical effects.

Description

Method, device, equipment and storage medium for detecting network connection state between terminals
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for detecting a network connection state between terminals.
Background
The detailed information of the device resources in the current monitoring product is displayed as the relevant data of the running state of the target resource device, and the connection state of the device is obtained according to different differences of the manual resource device access monitoring modes (such as SNMP service connection state, proxy connection state, etc.). The state data can only embody the connection state between the server where the monitoring product service is located and the monitoring target resource equipment on one side, the network connection state between the monitoring resource equipment cannot be further detected and analyzed, and the readability of the detection result is low. The network connection state detection method for manually setting the resource equipment access monitoring mode has high requirements on the programming level of a user, complex detection process and high labor cost.
In summary, how to effectively solve the problems of low readability of the detection result, complex detection flow, high labor cost and the like of the existing network connection state detection method is a problem that needs to be solved urgently by technical personnel in the field at present.
Disclosure of Invention
The invention aims to provide a method for detecting the network connection state between terminals, which greatly simplifies the detection process, saves the labor cost and improves the readability of the detection result; another object of the present invention is to provide a device, an apparatus and a computer-readable storage medium for detecting a network connection status between terminals.
In order to solve the technical problems, the invention provides the following technical scheme:
a method for detecting the network connection state between terminals includes:
receiving a network connection state detection task;
analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected;
searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging;
and calling the target network protocol interface to detect the network connection state between the source end and the target end.
In a specific embodiment of the present invention, invoking the target network protocol interface to detect the network connection state between the source end and the target end includes:
acquiring an execution time rule corresponding to the network connection state detection task;
and calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
In a specific embodiment of the present invention, invoking the target network protocol interface to detect the network connection state between the source end and the target end includes:
and sending a detection command to a preset network state detection agent so that the network state detection agent calls the target network protocol interface to detect the network connection state between the source end and the target end.
In a specific embodiment of the present invention, after sending the detection command to the preset network status detection agent, the method further includes:
receiving a detection result returned by the network state detection agent;
repeatedly executing the step of sending the detection command to a preset network state detection agent;
judging whether the repetition times reach a preset value or not;
and if so, determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results.
In a specific embodiment of the present invention, after determining, according to the returned detection result, network connection status information of the source peer and the target peer based on the target network protocol, the method further includes:
and generating a network connection state detection report.
In a specific embodiment of the present invention, receiving a network connection status detection task includes:
and when a network connection state detection request is detected, calling an available thread from a preset shared thread pool to receive the network connection state detection task.
An apparatus for detecting a network connection state between terminals, comprising:
the task receiving module is used for receiving a network connection state detection task;
the task analysis module is used for analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected;
the interface searching module is used for searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging;
and the network connection state detection module is used for calling the target network protocol interface to detect the network connection state between the source end and the target end.
In a specific embodiment of the present invention, the network connection status detecting module includes:
the time rule obtaining submodule is used for obtaining an execution time rule corresponding to the network connection state detection task;
and the network connection state detection submodule is used for calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
An apparatus for detecting a network connection status between terminals, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for detecting the network connection state between the terminals when the computer program is executed.
A computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for detecting a network connection status between terminals as described above.
The method for detecting the network connection state between the terminals receives a network connection state detection task; analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected; searching a target network protocol interface corresponding to a target network protocol from the network protocol interface set obtained by pre-packaging; and calling a target network protocol interface to detect the network connection state between the source end and the target end.
According to the technical scheme, the network protocol interface set comprising the plurality of network protocol interfaces is obtained by encapsulating each network protocol in advance. And adding a target network protocol in the initiated network connection state detection task, directly searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set after receiving the network connection state detection task, and calling the target network protocol interface to detect the network connection state between the source end and the target end. Compared with a network connection state detection method for manually setting a resource device access monitoring mode, the method and the device can automatically trigger the detection of the network connection state between the terminals, greatly simplify the detection process and save the labor cost. The network connection state detection analysis of the network protocol layer can be realized according to the detection requirement, and the readability of the detection result is improved.
Correspondingly, the invention also provides a device, equipment and a computer readable storage medium for detecting the network connection state between the terminals, which correspond to the method for detecting the network connection state between the terminals.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a method for detecting a network connection status between terminals according to an embodiment of the present invention;
fig. 2 is a flowchart of another implementation of the method for detecting the network connection status between terminals according to the embodiment of the present invention;
fig. 3 is a block diagram of a device for detecting a network connection status between terminals according to an embodiment of the present invention;
fig. 4 is a block diagram of a device for detecting a network connection status between terminals according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for detecting a network connection state between terminals according to this embodiment.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an implementation of a method for detecting a network connection state between terminals according to an embodiment of the present invention, where the method may include the following steps:
s101: and receiving a network connection state detection task.
When the network connection state between the terminals needs to be detected, a network connection state detection task is generated and sent to a network connection state detection center, and the network connection state detection center receives the network connection state detection task.
S102: and analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected.
The network connection state detection task comprises a source end to be detected, a target end and a target network protocol. After receiving the network connection state detection task, the network connection state detection center analyzes the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected.
The source end is a communication sending end corresponding to the network connection state detection task, and the target end is a communication receiving end corresponding to the network connection state detection task. The target network protocol may be HTTP, TCP, ICMP, POST, etc., where the detection purpose of each network protocol is:
and (3) detecting an HTTP (hyper text transport protocol): defining Request Header information, and judging contents of Http status/Http response Header/Http Body;
and (3) TCP protocol detection: monitoring the state of a service component port, and defining and monitoring an application layer protocol;
ICMP protocol detection: a host activity detection mechanism;
and (3) detecting a POST protocol: interface connectivity, etc.
S103: and searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging.
Each network protocol probing method can be encapsulated into an interface through a blackbox-exporter black box test tool. After the source end, the target end and the target network protocol to be detected are obtained through analysis, the target network protocol interface corresponding to the target network protocol is searched in a concentrated mode from the network protocol interface obtained through pre-encapsulation. By encapsulating each network protocol detection method into an interface in advance, a user can conveniently call the interface.
S104: and calling a target network protocol interface to detect the network connection state between the source end and the target end.
After the target network protocol interface corresponding to the target network protocol is found from the network protocol interface set obtained by pre-packaging, the target network protocol interface is called to detect the network connection state between the source end and the target end. The detailed detection result of the network protocol interface is fully utilized, the return speed of the detection result is high, and the Go language has the advantages of small memory occupation and the like. Compared with a network connection state detection method for manually setting a resource device access monitoring mode, the method and the device can automatically trigger the detection of the network connection state between the terminals, greatly simplify the detection process and save the labor cost. The network connection state detection analysis of the network protocol layer can be realized according to the detection requirement, and the readability of the detection result is improved.
According to the technical scheme, the network protocol interface set comprising the plurality of network protocol interfaces is obtained by encapsulating each network protocol in advance. And adding a target network protocol in the initiated network connection state detection task, directly searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set after receiving the network connection state detection task, and calling the target network protocol interface to detect the network connection state between the source end and the target end. Compared with a network connection state detection method for manually setting a resource device access monitoring mode, the method and the device can automatically trigger the detection of the network connection state between the terminals, greatly simplify the detection process and save the labor cost. The network connection state detection analysis of the network protocol layer can be realized according to the detection requirement, and the readability of the detection result is improved.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the following embodiments, steps that are the same as or correspond to those in the above embodiments may be referred to one another, and corresponding advantageous effects may also be referred to one another, which is not described in detail in the following modified embodiments.
Referring to fig. 2, fig. 2 is a flowchart of another implementation of the method for detecting a network connection state between terminals according to the embodiment of the present invention, where the method may include the following steps:
s201: and when the network connection state detection request is detected, calling an available thread from a preset shared thread pool to receive a network connection state detection task.
A shared thread pool comprising a plurality of threads is preset, and the plurality of threads in the shared thread pool are used for providing running infrastructure for each network connection state detection task. The Quartz task scheduling service can be integrated, the Quartz task scheduling service is realized by a Quartz framework, the Quartz framework is a full-function and open-source task scheduling service, and the Quartz framework comprises the following 3 parts: tasks (JobDetail), triggers (Trigger), and schedulers (Scheduler).
JobDetail is used to bind group names as well as task names to custom tasks to distinguish each task in the scheduler.
The Trigger is used for describing the execution time rule of the task and can comprise two subclasses, namely Simpletrigger and Crontrigger. SimpleTrigger is used to describe a trigger or a fixed time interval, and CrontTrigger specifies a fixed time point through a Cron expression.
The Scheduler is a running container of the Quartz framework, the Trigger and the JobDetail can be registered in the Scheduler, and both have respective groups and names in the Scheduler, the groups and names are the basis for the Scheduler to find an object in the location container, the groups and names of the Trigger must be unique, and the groups and names of the JobDetail must also be unique (but may be the same as the groups and names of the Trigger because they are different types). The Scheduler may bind the Trigger to a certain JobDetail, so that when the Trigger triggers, the corresponding Job is executed. One Job can correspond to multiple triggers, but one Trigger can only correspond to one Job.
When the network connection state between the terminals needs to be detected, a network connection state detection request and a network connection state detection task are generated, the network connection state detection request is firstly sent to a network connection state detection center, when the network connection state detection request is detected, an available thread is called from a preset shared thread pool, and task receiving preparation work completion prompt information can be returned to a request sending end. After receiving prompt information of completion of task receiving preparation work returned by the network connection state detection center, the request sending end sends a network connection state detection task to the network connection state detection center, and the network connection state detection center receives the network connection state detection task. By setting the shared thread pool containing a plurality of threads to provide running infrastructure for each network connection state detection task, the parallel processing of the plurality of network connection state detection tasks can be realized, and the task processing efficiency is improved.
S202: and analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected.
S203: and searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging.
S204: and acquiring an execution time rule corresponding to the network connection state detection task.
The method comprises the steps of presetting detection task configuration items, wherein the detection task configuration items can comprise detection execution strategy configuration and detection task related configuration. The detection strategy configuration can select modes such as single immediate execution, single fixed point execution, interval execution or periodic execution and the like according to the task execution time strategy, and configures corresponding execution strategy time. The detection task configuration can be configured according to indexes such as a detection source end, a detection target end, a detection mode, detection times, timeout time and the like. The detection task configuration can perform management operations such as addition, modification and query of detection task configuration information records, and support operations such as enabling and disabling of detection tasks.
Presetting an execution time rule corresponding to the network connection state detection task, and acquiring the execution time rule corresponding to the network connection state detection task, so as to determine whether to perform network connection state detection on the source end and the target end according to a preset period or perform network connection state detection on the source end and the target end at regular time.
S205: and sending a detection command to a preset network state detection agent so that the network state detection agent calls a target network protocol interface to detect the network connection state between the source end and the target end according to the execution time rule.
And a network state detection agent is preset, and after an execution time rule corresponding to the network connection state detection task is acquired, a detection command is sent to the preset network state detection agent. And after receiving the detection command, the network state detection agent calls a target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
S206: and receiving a detection result returned by the network state detection agent.
After receiving the detection command and calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end, the network state detection agent returns a detection result to the network connection state detection center. And the network connection state detection center receives the detection result returned by the network state detection agent. The detection result is one of two network state detection results of network state detection success or network state detection failure.
When the network connection state detection center judges whether the network state is detected successfully, the detection agent connection time length can be preset, if the detection agent connection time length exceeds the configured detection timeout time and a detection result of successful detection is not returned, the detection is judged to be overtime, the detection is failed, otherwise, the detection is judged to be successful.
S207: and judging whether the repeated execution times of the step S205 reach a preset value, if not, executing the step S205, and if so, executing the step S208.
And presetting an upper limit value of the repeated execution times of sending the detection command to a preset network state detection agent. After receiving the detection result returned by the network status detection agent, determining whether the number of times of repeated execution of sending the detection command to the preset network status detection agent reaches a preset value, if not, executing step S205, retrying the network status detection of the source end and the target end, and adding 1 to the task detection count, if so, executing step S208. By repeatedly executing the network state detection of the source end and the target end, the contingency of a single detection result caused by network fluctuation can be reduced to the maximum extent, and the reliability of the detection result is improved.
S208: and determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results.
After the step of repeatedly executing the step of sending the detection command to the preset network state detection agent for the preset times, determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results, so as to obtain the network connection state of the source end and the target end under the target network protocol through detection.
S209: and generating a network connection state detection report.
And after determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results, generating a network connection state detection report. The invention replaces the manual network connection state detection mode, realizes the periodic or timing detection of the network connection state data and the analysis result between the terminals, and assists the user to analyze and solve the related abnormal problems when the user finds the network transmission related abnormal.
The present embodiment is different from the first embodiment corresponding to the technical solution claimed in independent claim 1, and the technical solutions claimed in the dependent claims 2 to 6 are added, and of course, according to different practical situations and requirements, the technical solutions claimed in the dependent claims can be flexibly combined on the basis of not affecting the completeness of the solutions, so as to better meet the requirements of different use scenarios.
Corresponding to the above method embodiment, the present invention further provides a device for detecting a network connection state between terminals, where the device for detecting a network connection state between terminals described below and the method for detecting a network connection state between terminals described above may be referred to in correspondence.
Referring to fig. 3, fig. 3 is a block diagram of a structure of an apparatus for detecting a network connection state between terminals according to an embodiment of the present invention, where the apparatus may include:
a task receiving module 31, configured to receive a network connection state detection task;
the task analysis module 32 is configured to analyze the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected;
the interface searching module 33 is configured to search a target network protocol interface corresponding to a target network protocol from the network protocol interface set obtained by pre-encapsulation;
and the network connection state detection module 34 is configured to invoke a target network protocol interface to detect a network connection state between the source end and the target end.
According to the technical scheme, the network protocol interface set comprising the plurality of network protocol interfaces is obtained by encapsulating each network protocol in advance. And adding a target network protocol in the initiated network connection state detection task, directly searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set after receiving the network connection state detection task, and calling the target network protocol interface to detect the network connection state between the source end and the target end. Compared with a network connection state detection method for manually setting a resource device access monitoring mode, the method and the device can automatically trigger the detection of the network connection state between the terminals, greatly simplify the detection process and save the labor cost. The network connection state detection analysis of the network protocol layer can be realized according to the detection requirement, and the readability of the detection result is improved.
In one embodiment of the present invention, the network connection status detection module 34 includes:
the time rule obtaining submodule is used for obtaining an execution time rule corresponding to the network connection state detection task;
and the network connection state detection submodule is used for calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
In a specific embodiment of the present invention, the network connection status detecting module 34 is specifically a module that sends a detection command to a preset network status detecting agent, so that the network status detecting agent invokes a target network protocol interface to detect a network connection status between a source end and a target end.
In one embodiment of the present invention, the apparatus may further include:
the detection result receiving module is used for receiving the detection result returned by the network state detection agent;
the repeated execution module is used for repeatedly executing the step of sending the detection command to the preset network state detection agent;
the judging module is used for judging whether the repetition times reach a preset value or not;
and the network connection state determining module is used for determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results when the repetition times reach a preset value. .
In one embodiment of the present invention, the apparatus may further include:
and the report generation module is used for generating a network connection state detection report after determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results, or after the repetition times reach a preset value.
In an embodiment of the present invention, the task receiving module 31 is specifically a module for, when detecting a network connection status detection request, calling an available thread from a preset shared thread pool to receive a network connection status detection task.
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a schematic diagram of a device for detecting a network connection state between terminals according to the present invention, where the device may include:
a memory 332 for storing a computer program;
the processor 322 is configured to implement the steps of the method for detecting a network connection state between terminals according to the foregoing method embodiment when executing the computer program.
Specifically, referring to fig. 5, fig. 5 is a schematic diagram illustrating a specific structure of a device for detecting a network connection status between terminals according to this embodiment, where the device for detecting a network connection status between terminals may generate a relatively large difference due to different configurations or performances, and may include a processor (CPU) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Further, the processor 322 may be configured to communicate with the memory 332, and execute a series of instruction operations in the memory 332 on the device 301 for detecting the status of the network connection between the terminals.
The apparatus 301 for detecting the status of a network connection between terminals may also include one or more power sources 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the above-described method for detecting a network connection state between terminals may be implemented by a structure of a device for detecting a network connection state between terminals.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
receiving a network connection state detection task; analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected; searching a target network protocol interface corresponding to a target network protocol from the network protocol interface set obtained by pre-packaging; and calling a target network protocol interface to detect the network connection state between the source end and the target end.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for detecting the network connection state between terminals is characterized by comprising the following steps:
receiving a network connection state detection task;
analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected;
searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging;
and calling the target network protocol interface to detect the network connection state between the source end and the target end.
2. The method according to claim 1, wherein invoking the target network protocol interface to detect the network connection status between the source end and the target end comprises:
acquiring an execution time rule corresponding to the network connection state detection task;
and calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
3. The method according to claim 1 or 2, wherein invoking the target network protocol interface to detect the network connection status between the source end and the target end includes:
and sending a detection command to a preset network state detection agent so that the network state detection agent calls the target network protocol interface to detect the network connection state between the source end and the target end.
4. The method according to claim 3, further comprising, after sending the detection command to the predetermined network status detection agent:
receiving a detection result returned by the network state detection agent;
repeatedly executing the step of sending the detection command to a preset network state detection agent;
judging whether the repetition times reach a preset value or not;
and if so, determining the network connection state information of the source end and the target end based on the target network protocol according to the returned detection results.
5. The method according to claim 4, further comprising, after determining the network connection status information of the source peer and the target peer based on the target network protocol according to the returned detection results, the method further comprising:
and generating a network connection state detection report.
6. The method according to claim 1, wherein receiving a network connection status detection task comprises:
and when a network connection state detection request is detected, calling an available thread from a preset shared thread pool to receive the network connection state detection task.
7. An apparatus for detecting a network connection status between terminals, comprising:
the task receiving module is used for receiving a network connection state detection task;
the task analysis module is used for analyzing the network connection state detection task to obtain a source end, a target end and a target network protocol to be detected;
the interface searching module is used for searching a target network protocol interface corresponding to the target network protocol from the network protocol interface set obtained by pre-packaging;
and the network connection state detection module is used for calling the target network protocol interface to detect the network connection state between the source end and the target end.
8. The apparatus according to claim 7, wherein the network connection status detecting module includes:
the time rule obtaining submodule is used for obtaining an execution time rule corresponding to the network connection state detection task;
and the network connection state detection submodule is used for calling the target network protocol interface according to the execution time rule to detect the network connection state between the source end and the target end.
9. An apparatus for detecting a network connection status between terminals, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for detecting the network connection status between terminals according to any one of claims 1 to any one of the claims when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the method for detecting a network connection status between terminals according to any one of claims 1 to 6.
CN202111300322.4A 2021-11-04 2021-11-04 Method, device, equipment and storage medium for detecting network connection state between terminals Active CN114024869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111300322.4A CN114024869B (en) 2021-11-04 2021-11-04 Method, device, equipment and storage medium for detecting network connection state between terminals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111300322.4A CN114024869B (en) 2021-11-04 2021-11-04 Method, device, equipment and storage medium for detecting network connection state between terminals

Publications (2)

Publication Number Publication Date
CN114024869A true CN114024869A (en) 2022-02-08
CN114024869B CN114024869B (en) 2023-06-02

Family

ID=80061208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111300322.4A Active CN114024869B (en) 2021-11-04 2021-11-04 Method, device, equipment and storage medium for detecting network connection state between terminals

Country Status (1)

Country Link
CN (1) CN114024869B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308111A1 (en) * 2017-04-25 2018-10-25 Comscore, Inc. Device identification systems and methods
CN112311679A (en) * 2020-10-28 2021-02-02 北京健康之家科技有限公司 State detection method and device, electronic equipment and readable storage medium
CN112583659A (en) * 2020-11-24 2021-03-30 视联动力信息技术股份有限公司 Method and device for detecting network state of video network, terminal equipment and storage medium
CN112702204A (en) * 2020-12-24 2021-04-23 武汉联影医疗科技有限公司 Equipment monitoring method, device, server and storage medium
CN113079367A (en) * 2021-03-11 2021-07-06 广州国交润万交通信息有限公司 State detection method and device for monitoring equipment
CN113438336A (en) * 2021-06-24 2021-09-24 平安科技(深圳)有限公司 Network request method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308111A1 (en) * 2017-04-25 2018-10-25 Comscore, Inc. Device identification systems and methods
CN112311679A (en) * 2020-10-28 2021-02-02 北京健康之家科技有限公司 State detection method and device, electronic equipment and readable storage medium
CN112583659A (en) * 2020-11-24 2021-03-30 视联动力信息技术股份有限公司 Method and device for detecting network state of video network, terminal equipment and storage medium
CN112702204A (en) * 2020-12-24 2021-04-23 武汉联影医疗科技有限公司 Equipment monitoring method, device, server and storage medium
CN113079367A (en) * 2021-03-11 2021-07-06 广州国交润万交通信息有限公司 State detection method and device for monitoring equipment
CN113438336A (en) * 2021-06-24 2021-09-24 平安科技(深圳)有限公司 Network request method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114024869B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN108399132B (en) Scheduling test method, device and storage medium
CN112214260A (en) Loading method and device of terminal application APP
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN108462598B (en) Log generation method, log analysis method and device
CN112383533A (en) Message format conversion method and device
CN107817401B (en) Pressure testing method and device for electricity consumption information acquisition system
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN113254174A (en) RPA robot process automation implementation system and method
CN111309609A (en) Software processing system
CN108089972B (en) Interface test method and device
CN110515893B (en) Data storage method, device, equipment and computer readable storage medium
CN114024869A (en) Method, device, equipment and storage medium for detecting network connection state between terminals
CN113301049B (en) Industrial control equipment auditing method, device, equipment and readable storage medium
CN115269331A (en) Service topology monitoring method facing micro service group and related equipment
CN115237399A (en) Method for collecting data, storage medium, processor and engineering vehicle
CN111301789A (en) Application software packaging method and device
CN110806967A (en) Unit testing method and device
CN113923204A (en) Request forwarding method, device, equipment and readable storage medium
CN114443343A (en) Method, device, equipment and storage medium for service interface to feed back abnormal information
CN113886122A (en) System operation exception handling method, device, equipment and storage medium
CN103019927A (en) Performance testing method and system
CN112596974A (en) Full link monitoring method, device, equipment and storage medium
CN113132143B (en) Service call tracing method and related product
CN113760372B (en) Binary data packet analysis method and system
CN116109112B (en) Service data processing method, device, medium and equipment based on aggregation interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant