CN110784364B - Data monitoring method and device, storage medium and terminal - Google Patents

Data monitoring method and device, storage medium and terminal Download PDF

Info

Publication number
CN110784364B
CN110784364B CN201911082085.1A CN201911082085A CN110784364B CN 110784364 B CN110784364 B CN 110784364B CN 201911082085 A CN201911082085 A CN 201911082085A CN 110784364 B CN110784364 B CN 110784364B
Authority
CN
China
Prior art keywords
layer protocol
upper layer
monitoring
data
network message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911082085.1A
Other languages
Chinese (zh)
Other versions
CN110784364A (en
Inventor
程捷
刘涛
赵栋
王雨奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Bo Hongyuan Data Polytron Technologies Inc
Original Assignee
Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Bo Hongyuan Data Polytron Technologies Inc filed Critical Beijing Bo Hongyuan Data Polytron Technologies Inc
Priority to CN201911082085.1A priority Critical patent/CN110784364B/en
Publication of CN110784364A publication Critical patent/CN110784364A/en
Application granted granted Critical
Publication of CN110784364B publication Critical patent/CN110784364B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/326Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the transport layer [OSI layer 4]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Abstract

The embodiment of the invention discloses a data monitoring method. The method comprises the following steps: when a monitoring task of an upper layer protocol is received, judging whether the monitoring task of the upper layer protocol contains packet capturing configuration information; if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process; and sending the network message and the upper layer protocol monitoring data to a server. By adopting the technical scheme, the upper layer protocols such as the application layer, the transmission layer and the like and the network layer data can be synchronously monitored, when the upper layer protocol is abnormally monitored, the abnormal position and reason of the upper layer protocol can be quickly positioned and found out according to the abnormal message data of the upper layer protocol, and the timeliness and the accuracy of problem positioning are improved.

Description

Data monitoring method and device, storage medium and terminal
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a data monitoring method, a data monitoring device, a storage medium and a terminal.
Background
When data monitoring is performed, in the related art, monitoring services related to upper layer protocols such as an application layer and a transmission layer are independently separated from data monitoring of a network layer, and when the upper layer protocol monitoring is abnormal (monitoring data of the upper layer protocol does not meet preset indexes or monitoring data is not returned when the upper layer protocol monitoring is performed), the commonly used positioning means for the abnormal upper layer protocol monitoring mainly include the following two types: 1) and performing recurrence verification of upper-layer protocol monitoring abnormity in an internal test environment, and then assisting problem positioning through independent network layer monitoring service. 2) When the reproduction verification of upper layer protocol monitoring abnormity is carried out in the internal test environment, messages on the local network card are captured by using a packet capturing tool such as wireshark and the like for analysis, so that problem positioning is carried out.
However, the client environment and data are complex and various, and are limited by hardware and data amount, the internal test environment is difficult to construct the completely same field environment, the difficulty of performing upper-layer protocol monitoring abnormity reproduction through the internal test environment is high, even if a network layer monitoring service exists, the network layer monitoring service is separated from the upper-layer protocol monitoring, network data of a problem field cannot be synchronously acquired, abnormal problem positioning of the upper-layer protocol monitoring cannot be effectively supported, and timeliness and accuracy of problem positioning are seriously influenced.
Disclosure of Invention
The embodiment of the invention provides a data monitoring method, a data monitoring device, a storage medium and a terminal, which are used for improving data monitoring efficiency and reducing webpage development cost.
In a first aspect, an embodiment of the present invention provides a data monitoring method, where the method includes:
when a monitoring task of an upper layer protocol is received, judging whether the monitoring task of the upper layer protocol contains packet capturing configuration information; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
and sending the network message and the upper layer protocol monitoring data to a server.
In a second aspect, an embodiment of the present invention further provides a data monitoring apparatus, where the apparatus includes:
the device comprises a configuration information judging module, a packet capturing configuration module and a packet capturing configuration module, wherein the configuration information judging module is used for judging whether a monitoring task of an upper layer protocol contains packet capturing configuration information or not when the monitoring task of the upper layer protocol is received; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
the data generation module is used for starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message if the monitoring task comprises packet capturing configuration information, and monitoring an upper layer protocol according to the monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
and the data sending module is used for sending the network message and the upper-layer protocol monitoring data to a server.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the data monitoring method provided in the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the data monitoring method according to the embodiment of the present invention.
According to the data monitoring scheme provided by the embodiment of the invention, when a monitoring task of an upper layer protocol is received, whether the monitoring task of the upper layer protocol contains packet capturing configuration information is judged; wherein, the upper layer protocol comprises an application layer protocol and/or a transmission layer protocol; if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process; and sending the network message and the upper layer protocol monitoring data to a server. By adopting the technical means, the existing data monitoring scheme is optimized, when upper protocols such as an application layer and a transmission layer are monitored, network layer data are synchronously monitored by grabbing packets in real time, when the upper protocol is monitored abnormally, the abnormal position and reason of the upper protocol can be quickly located and searched according to the abnormal message data monitored by the upper protocol, and the timeliness and accuracy of problem location are improved.
Drawings
Fig. 1 is a schematic flow chart of a data monitoring method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another data monitoring method according to an embodiment of the present invention;
fig. 3 is a block diagram of a data monitoring apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a schematic flowchart of a data monitoring method according to an embodiment of the present invention, where the method may be executed by a data monitoring apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a terminal device. As shown in fig. 1, the method includes:
step 101, when receiving a monitoring task of an upper layer protocol, judging whether the monitoring task of the upper layer protocol contains packet capturing configuration information; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol.
Illustratively, the terminal may include, but is not limited to, a terminal device such as a smart phone, a tablet computer, a notebook computer, a palm computer, etc. The operating system of the terminal may include, but is not limited to, an Android operating system, an IOS operating system, a Windows Phone8 operating system, and the like.
In the embodiment of the present invention, the application layer protocol may include an HTTP protocol, an FTP protocol, a DHCP protocol, and a TFTP protocol, and the transport layer protocol may include a TCP protocol, a UDP protocol, and an SPX protocol. When a monitoring task of an application layer protocol or a transmission layer protocol is received, whether the monitoring task contains packet capturing configuration information is judged. For example, it is determined whether the monitoring task of the upper layer protocol includes a packet capture function, that is, whether the monitoring task of the upper layer protocol includes a call instruction of a third party packet capture tool. Immediately, when the monitoring task of the upper layer protocol contains packet capturing configuration information, the monitoring task of the upper layer protocol supports packet capturing, and a third party packet capturing tool can be automatically called to capture packets according to the packet capturing configuration information; and when the monitoring task of the uploading protocol does not contain the packet capturing configuration information, the monitoring task of the upper layer protocol does not support the packet capturing, that is, when the monitoring task of the upper layer protocol is executed, the upper layer protocol can only be monitored according to the monitoring task of the upper layer protocol, and the network layer data cannot be captured.
102, if yes, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; and when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process.
In the embodiment of the invention, if the monitoring task of the upper layer protocol contains the packet capturing configuration information, a packet capturing process is started according to the packet capturing configuration information to start capturing the packet so as to capture the data of the network layer and generate the network message. Illustratively, if the monitoring task of the upper layer protocol includes packet capturing configuration information, a corresponding application program with a packet capturing function is called according to the packet capturing configuration information, and a network layer data is acquired through the packet capturing program to generate a network message. For example, if the packet capturing configuration information includes a call instruction for the third-party packet capturing tool TCPdump or wincap, the TCPdump or wincap is called to capture the network layer data. Optionally, all data packets passing through the terminal network card may be obtained by calling a packet capturing program, and then network layer data is screened from all data packets passing through the terminal network card to generate a network message. Optionally, the network layer data is directly captured by a packet capture program to generate a network message. And when the packet capturing process is started to capture the packet, monitoring the upper layer protocol according to the monitoring task of the upper layer protocol to generate upper layer protocol monitoring data. And when detecting that the execution of the detection task of the upper layer protocol is completed, ending the packet capturing process and stopping the packet capturing. For example, the upper layer protocol monitoring data may include DNS resolution time, TCP connection time, time to load a basic frame of a web page when a web page is accessed, number of bytes to download a base document of the web page, and total number of bytes to download the web page.
In the embodiment of the invention, the synchronous monitoring of the network layer data and the upper layer (application layer and transmission layer) protocol can be effectively realized by controlling the time starting point and the time ending point of the packet capturing of the network layer data, and the method has the advantages that when the upper layer protocol monitoring is abnormal, the reason of the abnormal occurrence can be accurately searched according to the captured network message and the monitoring data of the upper layer protocol, and the timeliness and the accuracy of the abnormal positioning are ensured.
Optionally, when the monitoring task of the upper layer protocol does not include the packet capturing configuration information, the upper layer protocol monitoring task is executed to monitor the upper layer protocol.
And 103, sending the network message and the upper layer protocol monitoring data to a server.
In the embodiment of the invention, the network message and the upper layer protocol monitoring data are sent to the server, and when data analysis is needed, the network message and the upper layer protocol monitoring data can be directly obtained from the server. Illustratively, when judging whether the upper layer protocol monitoring is abnormal or not, the upper layer protocol monitoring data can be directly called from the server side, and whether the upper layer protocol monitoring is abnormal or not is judged by comparing the upper layer protocol monitoring data with the standard index data. Optionally, when it is determined that the upper layer protocol monitoring is abnormal, the network packet synchronously acquired with the upper layer protocol monitoring data is called from the server, the network packet is analyzed, and the reason for determining the upper layer protocol monitoring abnormality is searched.
According to the data monitoring scheme provided by the embodiment of the invention, when a monitoring task of an upper layer protocol is received, whether the monitoring task of the upper layer protocol contains packet capturing configuration information is judged; wherein, the upper layer protocol comprises an application layer protocol and/or a transmission layer protocol; if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process; and sending the network message and the upper layer protocol monitoring data to a server. By adopting the technical means, the existing data monitoring scheme is optimized, when upper protocols such as an application layer and a transmission layer are monitored, network layer data are synchronously monitored by grabbing packets in real time, when the upper protocol is monitored abnormally, the abnormal position and reason of the upper protocol can be quickly located and searched according to the abnormal message data monitored by the upper protocol, and the timeliness and accuracy of problem location are improved.
In some embodiments, before sending the network packet and the upper layer protocol monitoring data to a server, the method further includes: and judging whether to store the network message to the local end according to a preset packet capturing storage strategy, and if so, storing the network message to the local end. Optionally, when it is determined that the network packet is not stored to the local end according to a preset packet capturing storage policy, the upper layer protocol monitoring data may be sent to the server. Illustratively, the packet capture storage policy may include: when the upper protocol monitoring data is abnormal, storing the network message synchronously acquired with the upper protocol monitoring data to a local end; when the monitoring data of the uploading protocol is normal, the network message synchronously acquired with the monitoring data of the upper layer protocol is not stored to the local end, but is directly stored in the running memory, and when the monitoring task of the next upper layer protocol is executed, the current network message can be directly released. The method has the advantages that the storage mode of the network message can be reasonably determined according to the packet capturing storage strategy, and the local memory is effectively saved.
In some embodiments, before saving the network packet to the local end, the method further includes: screening the network message according to a preset screening condition to generate a target network message; storing the network message to a local end, including: storing the target network message to a local end; correspondingly, the sending the network packet and the upper layer protocol monitoring data to a server includes: and sending the target network message and the upper layer protocol monitoring data to a server. For example, the preset filtering condition may include whether the domain name in the network message is the same as the preset domain name, and/or whether the IP information in the network message is the same as the preset IP information. It can be understood that the network packet including the preset domain name may be screened from the network packet as the target network packet, the network packet including the preset IP information may be screened from the network packet as the target network packet, and the network packet including the preset domain name and the preset IP information may be screened from the network packet as the target network packet. The method has the advantages that the network messages are screened and stored through the preset screening conditions, only the network messages related to the upper-layer protocol monitoring task can be stored, not only can the network bandwidth be reduced, the occupation of resources such as disk storage and the like can be reduced, but also the problem positioning efficiency can be effectively improved when the problem analysis of the upper-layer protocol monitoring abnormity is carried out according to the network messages.
In some embodiments, before sending the target network packet and the upper layer protocol monitoring data to a server, the method further includes: judging whether the target network message is correct or not according to a preset judgment condition; sending the target network message and the upper layer protocol monitoring data to a server, including: and when the target network message is determined to be correct, sending the target network message and the upper layer protocol monitoring data to a server. Optionally, when it is determined that the target network packet is in error, the target network packet and the upper layer protocol monitoring data are deleted. For example, the preset determination condition may include determining whether the format of the target network packet meets a preset data format, and if so, determining that the network packet is correct. The method has the advantages that the network bandwidth can be further reduced, the occupation of resources such as disk storage and the like is reduced, when the network message is wrong, the target network message and the monitoring data of the upper layer protocol are directly deleted, and invalid data acquired by the monitoring task of the upper layer protocol can be discarded.
Fig. 2 is a schematic flow chart of another data monitoring method according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step 201, receiving a monitoring task of an upper layer protocol, where the upper layer protocol includes an application layer protocol and/or a transport layer protocol.
Step 202, determining whether the monitoring task of the upper layer protocol includes the packet capturing configuration information, if yes, executing step 203, otherwise, executing step 210.
Step 203, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; and when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process.
And 204, judging whether to store the network message to a local end according to a preset packet capturing storage strategy, if so, executing the step 205, and otherwise, executing the step 211.
Step 205, performing a screening operation on the network packet according to a preset screening condition to generate a target network packet.
And step 206, storing the target network message to a local end.
Step 207, determining whether the target network message is correct according to a preset determination condition, if so, executing step 208, otherwise, executing step 209.
And step 208, sending the target network message and the upper layer protocol monitoring data to a server.
And 209, deleting the target network message and the upper layer protocol monitoring data.
And step 210, monitoring an upper layer protocol according to the upper layer protocol monitoring task to generate monitoring data, and sending the monitoring data to a server.
And step 211, sending the upper layer protocol monitoring data to a server.
According to the data monitoring scheme provided by the embodiment of the invention, when a monitoring task of an upper layer protocol contains packet capturing configuration information, a packet capturing process is started according to the packet capturing configuration information to capture network layer data to generate a network message, and the upper layer protocol is monitored according to the monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when the monitoring task of the upper layer protocol is detected to be completed, the packet capturing process is finished, synchronous monitoring of the upper layer protocol such as an application layer and a transmission layer and network layer data can be achieved, when the upper layer protocol is monitored abnormally, the abnormal position and reason of the upper layer protocol can be rapidly located and found according to the message data when the upper layer protocol is monitored abnormally, and the timeliness and accuracy of problem location are improved. In addition, when the network message is determined to be stored to the local end according to a preset packet capturing storage strategy, the network message is further subjected to screening operation according to preset screening conditions to generate a target network message, and the target network message is stored to the local end, so that not only can the network bandwidth be reduced, the occupation of resources such as disk storage and the like be reduced, but also the efficiency of problem location can be effectively improved when the problem analysis of upper-layer protocol monitoring abnormity is carried out according to the network message.
Fig. 3 is a block diagram of a data monitoring apparatus according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and is generally integrated in a terminal, and may perform data monitoring by performing a data monitoring method. As shown in fig. 3, the apparatus includes:
the configuration information determining module 301 is configured to determine whether a monitoring task of an upper layer protocol includes packet capturing configuration information when the monitoring task of the upper layer protocol is received; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
a data generating module 302, configured to start a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network packet if the monitoring task includes packet capturing configuration information, and monitor an upper layer protocol according to the monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
a data sending module 303, configured to send the network packet and the upper layer protocol monitoring data to a server.
The data monitoring device provided by the embodiment of the invention judges whether the monitoring task of the upper layer protocol contains packet capturing configuration information or not when receiving the monitoring task of the upper layer protocol; wherein, the upper layer protocol comprises an application layer protocol and/or a transmission layer protocol; if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process; and sending the network message and the upper layer protocol monitoring data to a server. By adopting the technical means, the existing data monitoring scheme is optimized, when upper protocols such as an application layer and a transmission layer are monitored, network layer data are synchronously monitored by grabbing packets in real time, when the upper protocol is monitored abnormally, the abnormal position and reason of the upper protocol can be quickly located and searched according to the abnormal message data monitored by the upper protocol, and the timeliness and accuracy of problem location are improved.
Optionally, the apparatus further comprises:
and the network message storage module is used for judging whether the network message is stored to the local end or not according to a preset packet capturing storage strategy before sending the network message and the upper layer protocol monitoring data to the server end, and if so, storing the network message to the local end.
Optionally, the apparatus further comprises:
the network message screening module is used for carrying out screening operation on the network message according to preset screening conditions before the network message is stored to a local end to generate a target network message;
the network message storage module is configured to:
storing the target network message to a local end;
correspondingly, the data sending module is configured to:
and sending the target network message and the upper layer protocol monitoring data to a server.
Optionally, the apparatus further comprises:
the target network message judging module is used for judging whether the target network message is correct or not according to a preset judging condition before sending the target network message and the upper layer protocol monitoring data to a server side;
the data module is configured to:
and when the target network message is determined to be correct, sending the target network message and the upper layer protocol monitoring data to a server.
Optionally, the apparatus further comprises:
and the data deleting module is used for deleting the target network message and the upper layer protocol monitoring data when the target network message is determined to be wrong.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a data monitoring method, the method comprising:
when a monitoring task of an upper layer protocol is received, judging whether the monitoring task of the upper layer protocol contains packet capturing configuration information; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
and sending the network message and the upper layer protocol monitoring data to a server.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the data monitoring operation described above, and may also perform related operations in the data monitoring method provided by any embodiment of the present invention.
The embodiment of the invention provides a terminal, wherein the data monitoring device provided by the embodiment of the invention can be integrated in the terminal. Fig. 4 is a block diagram of a terminal according to an embodiment of the present invention. The terminal 400 may include: a memory 401, a processor 402 and a computer program stored on the memory 401 and executable on the processor, wherein the processor 402 implements the data monitoring method according to the embodiment of the present invention when executing the computer program.
When receiving a monitoring task of an upper layer protocol, the terminal provided in the embodiment of the invention judges whether the monitoring task of the upper layer protocol contains packet capturing configuration information; wherein, the upper layer protocol comprises an application layer protocol and/or a transmission layer protocol; if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process; and sending the network message and the upper layer protocol monitoring data to a server. By adopting the technical means, the existing data monitoring scheme is optimized, when upper protocols such as an application layer and a transmission layer are monitored, network layer data are synchronously monitored by grabbing packets in real time, when the upper protocol is monitored abnormally, the abnormal position and reason of the upper protocol can be quickly located and searched according to the abnormal message data monitored by the upper protocol, and the timeliness and accuracy of problem location are improved.
The data monitoring device, the storage medium and the terminal provided in the above embodiments can execute the data monitoring method provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a data monitoring method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of data monitoring, comprising:
when a monitoring task of an upper layer protocol is received, judging whether the monitoring task of the upper layer protocol contains packet capturing configuration information; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
if so, starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message, and monitoring an upper layer protocol according to a monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
and sending the network message and the upper layer protocol monitoring data to a server.
2. The method according to claim 1, wherein before sending the network packet and the upper layer protocol monitoring data to a server, further comprising:
and judging whether to store the network message to the local end according to a preset packet capturing storage strategy, and if so, storing the network message to the local end.
3. The method of claim 2, further comprising, before saving the network packet to the local end:
screening the network message according to a preset screening condition to generate a target network message;
storing the network message to a local end, including:
storing the target network message to a local end;
correspondingly, the sending the network packet and the upper layer protocol monitoring data to a server includes:
and sending the target network message and the upper layer protocol monitoring data to a server.
4. The method of claim 3, wherein before sending the target network packet and the upper layer protocol monitoring data to a server, further comprising:
judging whether the target network message is correct or not according to a preset judgment condition;
sending the target network message and the upper layer protocol monitoring data to a server, including:
and when the target network message is determined to be correct, sending the target network message and the upper layer protocol monitoring data to a server.
5. The method of claim 4, further comprising:
and deleting the target network message and the upper layer protocol monitoring data when the target network message is determined to be wrong.
6. A data monitoring device, comprising:
the device comprises a configuration information judging module, a packet capturing configuration module and a packet capturing configuration module, wherein the configuration information judging module is used for judging whether a monitoring task of an upper layer protocol contains packet capturing configuration information or not when the monitoring task of the upper layer protocol is received; wherein the upper layer protocol comprises an application layer protocol and/or a transport layer protocol;
the data generation module is used for starting a packet capturing process according to the packet capturing configuration information to capture network layer data to generate a network message if the monitoring task comprises packet capturing configuration information, and monitoring an upper layer protocol according to the monitoring task of the upper layer protocol to generate upper layer protocol monitoring data; when detecting that the monitoring task of the upper layer protocol is executed completely, ending the packet capturing process;
and the data sending module is used for sending the network message and the upper-layer protocol monitoring data to a server.
7. The apparatus of claim 6, further comprising:
and the network message storage module is used for judging whether the network message is stored to the local end or not according to a preset packet capturing storage strategy before sending the network message and the upper layer protocol monitoring data to the server end, and if so, storing the network message to the local end.
8. The apparatus of claim 7, further comprising:
the network message screening module is used for carrying out screening operation on the network message according to preset screening conditions before the network message is stored to a local end to generate a target network message;
the network message storage module is configured to:
storing the target network message to a local end;
correspondingly, the data sending module is configured to:
and sending the target network message and the upper layer protocol monitoring data to a server.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the data monitoring method according to any one of claims 1 to 5.
10. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data monitoring method according to any one of claims 1 to 5 when executing the computer program.
CN201911082085.1A 2019-11-07 2019-11-07 Data monitoring method and device, storage medium and terminal Active CN110784364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911082085.1A CN110784364B (en) 2019-11-07 2019-11-07 Data monitoring method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911082085.1A CN110784364B (en) 2019-11-07 2019-11-07 Data monitoring method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN110784364A CN110784364A (en) 2020-02-11
CN110784364B true CN110784364B (en) 2022-08-05

Family

ID=69389531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911082085.1A Active CN110784364B (en) 2019-11-07 2019-11-07 Data monitoring method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110784364B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800296B (en) * 2020-06-30 2023-03-24 西安微电子技术研究所 Method, system, equipment and storage medium for capturing and analyzing network data of real-time system
CN113055225B (en) * 2021-02-08 2023-12-05 网宿科技股份有限公司 Network fault analysis data acquisition method, terminal and server

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2493139A1 (en) * 2011-02-22 2012-08-29 Voipfuture GmbH VoIP quality measurement enhancements using the internet control message protocol
CN103986788B (en) * 2014-06-04 2017-05-17 中国联合网络通信集团有限公司 Data fetching method and device of OTT (over the top) application
US10079779B2 (en) * 2015-01-30 2018-09-18 Nicira, Inc. Implementing logical router uplinks
CN106161398A (en) * 2015-04-21 2016-11-23 北京信威通信技术股份有限公司 Packet snapping method and device
CN106027549A (en) * 2016-06-30 2016-10-12 大连楼兰科技股份有限公司 Early warning method and device for address resolution protocol (ARP) flooding attacks in local area network
CN107231552A (en) * 2017-05-09 2017-10-03 复旦大学 A kind of mass monitoring system towards ultra high-definition video request program
CN107395597A (en) * 2017-07-25 2017-11-24 合肥红铭网络科技有限公司 A kind of fictitious host computer defends optimization method

Also Published As

Publication number Publication date
CN110784364A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN109688202B (en) Interface data processing method and device, computing equipment and storage medium
CN108881211B (en) Illegal external connection detection method and device
CN105808399B (en) Remote debugging method and device
CN110719199B (en) Network automatic testing and fault positioning method and device
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN108924005B (en) Network detection method, network detection apparatus, medium, and device
CN109831351B (en) Link tracking method, device, terminal and storage medium
CN110784364B (en) Data monitoring method and device, storage medium and terminal
CN109739711B (en) Interface test method, device, equipment and storage medium
WO2019128299A1 (en) Test system and test method
CN111030873A (en) Fault diagnosis method and device
CN112738095A (en) Method, device, system, storage medium and equipment for detecting illegal external connection
CN111147310A (en) Log tracking processing method, device, server and medium
CN111818073B (en) Method, device, equipment and medium for detecting defect host
CN109802842B (en) Application topology generation method and related equipment
CN112671574B (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN113114794A (en) Method and device for processing domain name based on secondary proxy
CN113098727A (en) Data packet detection processing method and device
CN107547502B (en) Information monitoring system, method and device, electronic equipment and storage medium
CN111131370B (en) Method, device and system for detecting whether service call is correct
CN113412603B (en) Privacy compliance detection method and related product
CN112491612A (en) Method for reporting network abnormal data, terminal and computer storage medium
CN110825603A (en) Page first loading time determining method and device, electronic equipment and storage medium
CN114143088B (en) Network fault diagnosis method, device, equipment and computer readable storage medium

Legal Events

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