[go: up one dir, main page]

CN118714039A - Network quality detection method, device, electronic device and storage medium - Google Patents

Network quality detection method, device, electronic device and storage medium Download PDF

Info

Publication number
CN118714039A
CN118714039A CN202410984570.2A CN202410984570A CN118714039A CN 118714039 A CN118714039 A CN 118714039A CN 202410984570 A CN202410984570 A CN 202410984570A CN 118714039 A CN118714039 A CN 118714039A
Authority
CN
China
Prior art keywords
target
attribute information
message
reply message
round
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410984570.2A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202410984570.2A priority Critical patent/CN118714039A/en
Publication of CN118714039A publication Critical patent/CN118714039A/en
Pending legal-status Critical Current

Links

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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • 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/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps

Landscapes

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

Abstract

一种网络质量检测的方法、装置、电子设备和存储介质,在内核态接收目的端发送的原始回复报文,判断原始回复报文携带的第三属性信息是否符合预设过滤条件;在确定第三属性信息符合预设过滤条件时,确定原始回复报文为目标回复报文;将目标回复报文从内核态传输至用户态,判断目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;确定第一属性信息与第二属性信息相同,对目标测量报文发出的第一时间戳和接收目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;对往返时延计算结果进行存储;在确定存储的往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。

A method, device, electronic device and storage medium for network quality detection, receiving an original reply message sent by a destination end in kernel state, judging whether third attribute information carried by the original reply message meets a preset filtering condition; when it is determined that the third attribute information meets the preset filtering condition, determining that the original reply message is a target reply message; transmitting the target reply message from kernel state to user state, judging whether first attribute information carried by the target reply message is the same as second attribute information carried by a target measurement message; when it is determined that the first attribute information is the same as the second attribute information, performing round-trip delay calculation on a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round-trip delay calculation result; storing the round-trip delay calculation result; and when it is determined that the number of stored round-trip delay calculation results meets a preset number condition, calculating all stored round-trip delay calculation results to obtain a network quality score.

Description

网络质量检测的方法、装置、电子设备和存储介质Network quality detection method, device, electronic device and storage medium

技术领域Technical Field

本公开涉及数据处理技术领域,尤其涉及一种网络质量检测的方法、装置、电子设备和存储介质。The present disclosure relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for network quality detection.

背景技术Background Art

近年来,随着数字经济的蓬勃发展,数据中心规模越来越大,越来越多的数字化服务运行其上,在未来,人们会越来越依赖数字化服务,也可称为算力。数据中心内部的网络质量决定了数字化服务是否能够稳定供给,因此,如何快速、准确的检查网络质量,成了一个重要的问题。In recent years, with the vigorous development of the digital economy, data centers have become larger and larger, and more and more digital services are running on them. In the future, people will rely more and more on digital services, which can also be called computing power. The network quality inside the data center determines whether digital services can be stably supplied. Therefore, how to quickly and accurately check the network quality has become an important issue.

相关技术中,针对TCP端口扫描的场景,提出了高效的办法,一方面是采用发送线程和接收线程并发的方式,另一方面是基于TCP报文而非TCP三次握手的机制来提升效率。通过快速构建TCP握手请求探测报文,双通道收发分离的方式,进行报文的快速发送与处理分析,从而能够在极短的时间内,探测出主机的TCP端口开放情况并记录,从而保证端口识别准确率和端口识别速度。但由于发送和接收过程过滤条件不够精确,会导致所有的包括大量无效的、无需关注的TCP报文从内核态拷贝到用户态进行比对,也会造成资源的浪费。In the related technology, an efficient method is proposed for the TCP port scanning scenario. On the one hand, the sending thread and the receiving thread are used concurrently. On the other hand, the efficiency is improved based on the TCP message rather than the TCP three-way handshake mechanism. By quickly constructing the TCP handshake request detection message and separating the dual-channel sending and receiving, the message is quickly sent and processed and analyzed. In this way, the host's TCP port opening status can be detected and recorded in a very short time, thereby ensuring the port identification accuracy and port identification speed. However, due to the inaccurate filtering conditions of the sending and receiving process, all TCP messages, including a large number of invalid and unnecessary TCP messages, will be copied from the kernel state to the user state for comparison, which will also cause a waste of resources.

发明内容Summary of the invention

本公开提供了一种网络质量检测的方法、装置、电子设备和存储介质。其主要目的在于在内核层面进行精确筛选的机制,保障了大量探测目标时,对宿主机的资源占用情况,此外,将测量报文的发送、接收、计算、结果输出各个环节解耦,基于多线程、无锁阻塞队列等技术能力实现各环节的异步处理,实现了最大程度的并发探测,提升了整个测量系统的吞吐量。The present disclosure provides a method, device, electronic device and storage medium for network quality detection. Its main purpose is to provide a mechanism for accurate screening at the kernel level, ensuring the resource occupancy of the host machine when a large number of detection targets are detected. In addition, the sending, receiving, calculating and outputting of measurement messages are decoupled, and the asynchronous processing of each link is realized based on technical capabilities such as multithreading and lock-free blocking queues, so as to achieve the maximum degree of concurrent detection and improve the throughput of the entire measurement system.

根据本公开的第一方面,提供了一种网络质量检测的方法,其中,包括:According to a first aspect of the present disclosure, a method for network quality detection is provided, comprising:

在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;Receiving, in kernel mode, an original reply message sent by the destination end, and determining whether the third attribute information carried by the original reply message meets a preset filtering condition;

在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;When it is determined that the third attribute information meets the preset filtering condition, determining the original reply message as the target reply message;

将所述目标回复报文从所述内核态传输至用户态,并判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;Transmitting the target reply message from the kernel state to the user state, and determining whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message;

在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;When it is determined that the first attribute information is the same as the second attribute information, performing round-trip delay calculation on a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round-trip delay calculation result;

对所述往返时延计算结果进行存储;Storing the round-trip delay calculation result;

在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。When it is determined that the number of the stored round-trip delay calculation results meets the preset number condition, all the stored round-trip delay calculation results are calculated to obtain a network quality score.

可选的,在所述对所述往返时延计算结果进行存储之后,所述方法包括:Optionally, after storing the round-trip delay calculation result, the method includes:

顺序检查双向列表中是否存在满足预设超时时间条件的元素,所述元素为在所述目标测量报文发出之前,存储于所述双向列表中的目标测量报文;Sequentially checking whether there is an element in the bidirectional list that meets a preset timeout condition, the element being a target measurement message stored in the bidirectional list before the target measurement message is sent;

在确定所述双向列表中存在满足所述预设超时时间条件的目标元素时,检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除;When it is determined that there is a target element in the bidirectional list that meets the preset timeout condition, checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted;

在确定所述第四属性信息和所述第三时间戳均未被删除的情况下,确定所述目标元素对应的目标回复报文丢包,将丢包结果存储至所述第一目标存储队列;When it is determined that the fourth attribute information and the third timestamp are not deleted, determining that the target reply message corresponding to the target element is lost, and storing the packet loss result in the first target storage queue;

将所述目标元素从所述双向列表中删除以及将所述第四属性信息、所述第三时间戳删除。The target element is deleted from the bidirectional list and the fourth attribute information and the third timestamp are deleted.

可选的,所述检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除之后,所述方法包括:Optionally, after checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted, the method includes:

在确定所述第四属性信息和所述第三时间戳均被删除的情况下,将所述目标元素从所述双向列表中删除。When it is determined that both the fourth attribute information and the third timestamp are deleted, the target element is deleted from the bidirectional list.

可选的,在所述对存储的全部往返时延计算结果进行计算,得到网络质量分数之后,所述方法包括:Optionally, after calculating all stored round-trip delay calculation results to obtain a network quality score, the method includes:

在对所述目的端进行多次网络质量检测后,得到多个所述网络质量分数,对多个所述网络质量分数进行计算,得到聚合指标;After performing multiple network quality tests on the destination end, multiple network quality scores are obtained, and the multiple network quality scores are calculated to obtain an aggregate index;

将所述聚合指标存储至目标存储队列;Storing the aggregated indicator in a target storage queue;

在确定所述目标存储队列的大小满足预设大小条件或所述目标存储队列中存储的第一聚合指标的存储时间满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标进行压缩;When it is determined that the size of the target storage queue meets a preset size condition or the storage time of the first aggregation indicator stored in the target storage queue meets a preset time window condition, compressing all the aggregation indicators stored in the target storage queue;

将压缩后的全部所述聚合指标传输至分析模块。All the compressed aggregate indicators are transmitted to the analysis module.

可选的,所述将压缩后的全部所述聚合指标传输至分析模块包括:Optionally, transmitting all the compressed aggregate indicators to the analysis module includes:

判断所述聚合指标对应的网络链路是否为重要的网络链路;Determining whether the network link corresponding to the aggregation indicator is an important network link;

若确定所述聚合指标对应的网络链路为非重要的网络链路,则在所述网络链路异常时,将压缩后的全部所述聚合指标传输至所述分析模块;If it is determined that the network link corresponding to the aggregation index is a non-important network link, then when the network link is abnormal, all the compressed aggregation indexes are transmitted to the analysis module;

若确定所述聚合指标对应的网络链路为重要的网络链路,则在所述网络链路正常或异常时,均将压缩后的全部所述聚合指标传输至所述分析模块。If it is determined that the network link corresponding to the aggregation index is an important network link, all the compressed aggregation indexes are transmitted to the analysis module when the network link is normal or abnormal.

可选的,在所述对所述往返时延计算结果进行存储之后,所述方法包括:Optionally, after storing the round-trip delay calculation result, the method includes:

将所述第一时间戳及所述第二属性信息进行删除。Delete the first timestamp and the second attribute information.

可选的,所述在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算包括:Optionally, when it is determined that the number of the stored round-trip delay calculation results meets a preset number condition, calculating all stored round-trip delay calculation results includes:

在确定发送至所述目的端的目标测量报文的数量与存储的所述往返时延计算结果的数量相同时,对存储的全部往返时延计算结果进行计算,得到所述网络质量分数。When it is determined that the number of target measurement messages sent to the destination end is the same as the number of the stored round-trip delay calculation results, all stored round-trip delay calculation results are calculated to obtain the network quality score.

可选的,若所述目标测量报文为UDP协议报文,所述在内核态接收目的端发送的原始回复报文包括:Optionally, if the target measurement message is a UDP protocol message, the receiving in the kernel state an original reply message sent by the destination end includes:

若未接收到所述目的端的原端口发送的所述原始回复报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到所述原始回复报文。If the original reply message sent by the original port of the destination end is not received, the network quality detection is performed on other ports of the destination end by switching until the original reply message is received from the other ports of the switching.

可选的,若所述目标测量报文属于TCP协议报文,所述在内核态接收目的端发送的原始回复报文包括:Optionally, if the target measurement message is a TCP protocol message, the receiving in the kernel state an original reply message sent by the destination end includes:

若所述目的端的原端口发送的所述目标回复报文为TCP协议的同步确认报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到TCP协议的重置报文。If the target reply message sent by the original port of the destination end is a synchronization confirmation message of the TCP protocol, the network quality detection of other ports of the destination end is switched until a reset message of the TCP protocol is received from the other switched ports.

根据本公开的第二方面,提供了一种网络质量检测的装置,包括:According to a second aspect of the present disclosure, a network quality detection device is provided, including:

第一判断单元,用于在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;A first judgment unit is used to receive the original reply message sent by the destination end in the kernel state, and judge whether the third attribute information carried by the original reply message meets the preset filtering condition;

确定单元,用于在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;A determination unit, configured to determine that the original reply message is the target reply message when it is determined that the third attribute information meets the preset filtering condition;

第一传输单元,用于将所述目标回复报文从所述内核态传输至用户态;A first transmission unit, used for transmitting the target reply message from the kernel state to the user state;

第二判断单元,用于判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;A second judgment unit, configured to judge whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message;

第一计算单元,用于在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;A first calculation unit, configured to, when determining that the first attribute information is the same as the second attribute information, perform round-trip delay calculation on a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round-trip delay calculation result;

第一存储单元,用于对所述往返时延计算结果进行存储;A first storage unit, used to store the round-trip delay calculation result;

第二计算单元,用于在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。The second calculation unit is used to calculate all the stored round-trip delay calculation results to obtain a network quality score when it is determined that the number of the stored round-trip delay calculation results meets a preset number condition.

可选的,所述装置包括:Optionally, the device comprises:

第一检查单元,用于顺序检查双向列表中是否存在满足预设超时时间条件的元素,所述元素为在所述目标测量报文发出之前,存储于所述双向列表中的目标测量报文;A first checking unit, configured to sequentially check whether there is an element in the bidirectional list that meets a preset timeout condition, wherein the element is a target measurement message stored in the bidirectional list before the target measurement message is sent;

第二检查单元,用于在确定所述双向列表中存在满足所述预设超时时间条件的目标元素时,检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除;A second checking unit is used to check whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted when it is determined that there is a target element that meets the preset timeout condition in the bidirectional list;

确定单元,用于在确定所述第四属性信息和所述第三时间戳均未被删除的情况下,确定所述目标元素对应的目标回复报文丢包,将丢包结果存储至所述第一目标存储队列;a determining unit, configured to determine that a target reply message corresponding to the target element is lost if it is determined that the fourth attribute information and the third timestamp are not deleted, and store the packet loss result in the first target storage queue;

第一删除单元,用于将所述目标元素从所述双向列表中删除以及将所述第四属性信息、所述第三时间戳删除。The first deleting unit is used to delete the target element from the bidirectional list and delete the fourth attribute information and the third timestamp.

可选的,所述装置包括:Optionally, the device comprises:

第二删除单元,用于在确定所述第四属性信息和所述第三时间戳均被删除的情况下,将所述目标元素从所述双向列表中删除。The second deleting unit is configured to delete the target element from the bidirectional list when it is determined that both the fourth attribute information and the third timestamp are deleted.

可选的,所述装置包括:Optionally, the device comprises:

第三计算单元,用于在对所述目的端进行多次网络质量检测后,得到多个所述网络质量分数,对多个所述网络质量分数进行计算,得到聚合指标;A third calculation unit is used to obtain a plurality of network quality scores after performing multiple network quality detections on the destination end, and calculate the plurality of network quality scores to obtain an aggregation index;

第二存储单元,用于将所述聚合指标存储至目标存储队列;A second storage unit, used for storing the aggregation indicator in a target storage queue;

压缩单元,用于在确定所述目标存储队列的大小满足预设大小条件或所述目标存储队列中存储的第一聚合指标的存储时间满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标进行压缩;A compression unit, configured to compress all the aggregation indicators stored in the target storage queue when it is determined that the size of the target storage queue meets a preset size condition or the storage time of the first aggregation indicator stored in the target storage queue meets a preset time window condition;

传输单元,用于将压缩后的全部所述聚合指标传输至分析模块。The transmission unit is used to transmit all the compressed aggregation indicators to the analysis module.

可选的,所述传输单元包括:Optionally, the transmission unit includes:

判断模块,用于判断所述聚合指标对应的网络链路是否为重要的网络链路;A judgment module, used to judge whether the network link corresponding to the aggregation indicator is an important network link;

传输模块,用于当确定所述聚合指标对应的网络链路为非重要的网络链路时,且在所述网络链路异常的情况下,将压缩后的全部所述聚合指标传输至所述分析模块;A transmission module, configured to transmit all the compressed aggregation indicators to the analysis module when it is determined that the network link corresponding to the aggregation indicator is a non-important network link and when the network link is abnormal;

所述传输模块还用于,当确定所述聚合指标对应的网络链路为重要的网络链路时,且在所述网络链路正常或异常时,均将压缩后的全部所述聚合指标传输至所述分析模块。The transmission module is also used to transmit all the compressed aggregation indicators to the analysis module when it is determined that the network link corresponding to the aggregation indicator is an important network link and when the network link is normal or abnormal.

可选的,所述装置包括:Optionally, the device comprises:

第三删除单元,用于将所述第一时间戳及所述第二属性信息进行删除。The third deleting unit is used to delete the first timestamp and the second attribute information.

可选的,所述第二计算单元还用于:Optionally, the second computing unit is further used for:

在确定发送至所述目的端的目标测量报文的数量与存储的所述往返时延计算结果的数量相同时,对存储的全部往返时延计算结果进行计算,得到所述网络质量分数。When it is determined that the number of target measurement messages sent to the destination end is the same as the number of the stored round-trip delay calculation results, all stored round-trip delay calculation results are calculated to obtain the network quality score.

可选的,所述第一判断单元,还用于当未接收到所述目的端的原端口发送的所述目标回复报文时,切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到所述目标回复报文。Optionally, the first judgment unit is also used to switch to perform network quality detection on other ports of the destination end when the target reply message sent by the original port of the destination end is not received, until the target reply message is received from the other switched ports.

可选的,所述切换模块,还用于当所述目的端的原端口发送的所述目标回复报文为TCP协议的同步确认报文时,切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到TCP协议的重置报文。Optionally, the switching module is also used to switch to perform network quality detection on other ports of the destination end when the target reply message sent by the original port of the destination end is a synchronization confirmation message of the TCP protocol until a reset message of the TCP protocol is received from the other switched ports.

根据本公开的第三方面,提供了一种电子设备,包括:According to a third aspect of the present disclosure, there is provided an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

根据本公开的第四方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行前述第一方面所述的方法。According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如前述第一方面所述的方法。According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

综上所述,本实施例能达到以下效果:In summary, this embodiment can achieve the following effects:

1.针对ICMP/TCP/UDP探测分别提出了一种在内核层面进行精确筛选的机制,同时TCP探测避免了三次握手带来的半开连接问题,保障了大量探测目标时,对宿主机的资源占用情况。1. A precise screening mechanism at the kernel level is proposed for ICMP/TCP/UDP detection. At the same time, TCP detection avoids the half-open connection problem caused by the three-way handshake, ensuring the resource usage of the host machine when a large number of detection targets are detected.

2.针对ICMP/TCP/UDP探测都提出了细致的测量方案,将测量报文的发送、接收、计算、结果输出各个环节解耦,基于多线程、无锁阻塞队列等技术能力实现各环节的异步处理,实现了最大程度的并发探测,提升了整个测量系统的吞吐量。2. A detailed measurement plan is proposed for ICMP/TCP/UDP detection, which decouples the sending, receiving, calculation, and result output of measurement messages. Based on multi-threading, lock-free blocking queues and other technical capabilities, asynchronous processing of each link is realized, achieving maximum concurrent detection and improving the throughput of the entire measurement system.

3.通过基于所述第一时间戳和所述第二时间戳计算所述往返时延计算结果,再基于所述往返时延计算结果计算所述网络质量分数,从而实现对网络质量的检测。3. Calculate the round-trip delay calculation result based on the first timestamp and the second timestamp, and then calculate the network quality score based on the round-trip delay calculation result, thereby realizing the detection of network quality.

4.针对TCP/UDP探测提出了一种往返报文映射的机制,无需探测目标进行任何配置,不依赖回复报文的payload,降低了测量对象纳入测量的成本。4. A round-trip message mapping mechanism is proposed for TCP/UDP detection. It does not require any configuration of the detection target and does not rely on the payload of the reply message, thus reducing the cost of incorporating the measurement object into the measurement.

5.针对大批量探测结果如何高效输出,提出了一种多维度压缩方案,基于探测目的的指标压缩、基于时间或数量窗口的数量压缩,及基于监测等级分级的策略压缩,降低了结果输出的带宽占用。5. In order to efficiently output large quantities of detection results, a multi-dimensional compression scheme is proposed, which includes indicator compression based on detection purpose, quantity compression based on time or quantity windows, and strategy compression based on monitoring level classification, thereby reducing the bandwidth occupied by the result output.

应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

图1为本公开实施例所提供的一种网络质量检测的方法的流程示意图;FIG1 is a flow chart of a method for detecting network quality provided by an embodiment of the present disclosure;

图2为本公开实施例提供的一种网络质量检测的装置的结构示意图;FIG2 is a schematic diagram of the structure of a network quality detection device provided by an embodiment of the present disclosure;

图3为本公开实施例提供的另一种网络质量检测的装置的结构示意图;FIG3 is a schematic diagram of the structure of another network quality detection device provided by an embodiment of the present disclosure;

图4为本公开实施例提供的示例电子设备300的示意性框图。FIG. 4 is a schematic block diagram of an example electronic device 300 provided according to an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

下面参考附图描述本公开实施例的网络质量检测的方法、装置、电子设备和存储介质。The following describes the network quality detection method, device, electronic device and storage medium according to the embodiments of the present disclosure with reference to the accompanying drawings.

图1为本公开实施例所提供的一种网络质量检测的方法的流程示意图。FIG1 is a flow chart of a method for detecting network quality provided in an embodiment of the present disclosure.

如图1所示,该方法包含以下步骤:As shown in Figure 1, the method comprises the following steps:

步骤101,在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;Step 101, receiving an original reply message sent by a destination end in a kernel state, and determining whether the third attribute information carried by the original reply message meets a preset filtering condition;

步骤102,在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;Step 102: when it is determined that the third attribute information meets the preset filtering condition, determining the original reply message as the target reply message;

为了便于对上述细化说明进行理解,本实施例提供示例性说明,包括:计算机在进行报文收取动作时,会由CPU处理网卡上送的所有数据,首先会在内核的内存中高速处理,如果有应用程序需要用到特定的报文,会将这些报文拷贝到程序所申请的内存中,也就是所说的用户态,然后在程序中去判读报文是否是需要进一步处理。而为了尽量避免降低损耗,通过基于操作系统开放的接口能力,设置所述原始回复报文的预设过滤条件,以实现在内核态内过滤所述原始回复报文,只有满足所述预设过滤条件的所述原始回复报文才会拷贝到所述用户态做进一步分析。In order to facilitate the understanding of the above detailed description, this embodiment provides an exemplary description, including: when the computer is performing a message receiving action, the CPU will process all the data sent by the network card, and will first process it at high speed in the kernel's memory. If an application needs to use a specific message, these messages will be copied to the memory requested by the program, that is, the so-called user state, and then the program will judge whether the message needs further processing. In order to minimize the loss, the preset filtering conditions of the original reply message are set based on the interface capabilities opened by the operating system to filter the original reply message in the kernel state. Only the original reply message that meets the preset filtering conditions will be copied to the user state for further analysis.

在一些实施例中,若基于ICMP协议进行网络质量检测,则所述预设过滤条件可以设置为标识符为进程号,即在确定所述原始回复报文携带的所述第三属性信息中的标识符等于所述进程号,则表示所述原始回复报文满足所述预设过滤条件,则将所述原始回复报文从所述内核态传输至所述用户态,所述进程号为进行网络质量检测的程序进程号。In some embodiments, if network quality detection is performed based on the ICMP protocol, the preset filtering condition can be set as the identifier being the process number, that is, when it is determined that the identifier in the third attribute information carried by the original reply message is equal to the process number, it means that the original reply message meets the preset filtering condition, and the original reply message is then transmitted from the kernel state to the user state, and the process number is the process number of the program for performing network quality detection.

针对ICMP/TCP/UDP探测分别提出了一种在内核层面进行精确筛选的机制,同时TCP探测避免了三次握手带来的半开连接问题,保障了大量探测目标时,对宿主机的资源占用情况。A precise screening mechanism at the kernel level is proposed for ICMP/TCP/UDP detection respectively. At the same time, TCP detection avoids the half-open connection problem caused by the three-way handshake and ensures the resource usage of the host machine when a large number of detection targets are detected.

步骤103,将所述目标回复报文从所述内核态传输至用户态并判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;Step 103: transmitting the target reply message from the kernel state to the user state and determining whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message;

作为上述步骤103的细化,为了确定所述目标回复报文和所述目标测量报文之间是否对应,执行端在将所述目标测量报文发送至所述目的端之后,所述目的端响应于所述目标测量报文,从而向所述执行端发送响应报文即所述目标回复报文,由执行端接收所述目的端发送的所述目标回复报文,并判断所述目标回复报文携带的第一属性信息和所述目标测量报文携带的第二属性信息是否相同,以判断所述目标回复报文和所述目标测量报文之间是否对应。As a refinement of the above step 103, in order to determine whether the target reply message and the target measurement message correspond to each other, after the execution end sends the target measurement message to the destination end, the destination end responds to the target measurement message, thereby sending a response message, i.e., the target reply message, to the execution end, and the execution end receives the target reply message sent by the destination end, and determines whether the first attribute information carried by the target reply message and the second attribute information carried by the target measurement message are the same, so as to determine whether the target reply message and the target measurement message correspond to each other.

步骤104,在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;Step 104: when it is determined that the first attribute information is the same as the second attribute information, a round trip delay calculation is performed on a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round trip delay calculation result;

作为上述步骤104的细化,为了得到可以描述网络质量的指标,将所述目标测量报文发出对应的第一时间戳和接收所述目标回复报文的所述第二时间戳进行往返时延的计算,从而得到所述往返时延计算结果,所述往返时延计算结果可以秒速本时刻下的网络质量。As a refinement of the above step 104, in order to obtain an indicator that can describe the network quality, the round-trip delay corresponding to the first timestamp of sending the target measurement message and the second timestamp of receiving the target reply message is calculated to obtain the round-trip delay calculation result, and the round-trip delay calculation result can be used to describe the network quality at the current moment.

通过基于所述第一时间戳和所述第二时间戳计算所述往返时延计算结果,再基于所述往返时延计算结果计算所述网络质量分数,从而实现对网络质量的检测。The network quality is detected by calculating the round-trip delay calculation result based on the first timestamp and the second timestamp, and then calculating the network quality score based on the round-trip delay calculation result.

步骤105,对所述往返时延计算结果进行存储;Step 105, storing the round trip delay calculation result;

作为上述步骤105的细化,将计算得到的所述往返时延计算结果进行存储,其中存储的方式包括但不限于为队列存储,栈存储,堆存储,树存储。通过将所述往返时延计算结果进行存储从而提高存储结构中所述往返时延计算结果作为样本的丰富度。As a refinement of the above step 105, the calculated round-trip delay calculation result is stored, wherein the storage method includes but is not limited to queue storage, stack storage, heap storage, and tree storage. By storing the round-trip delay calculation result, the richness of the round-trip delay calculation result as a sample in the storage structure is increased.

步骤106,在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。Step 106: When it is determined that the number of the stored round-trip delay calculation results meets a preset number condition, all stored round-trip delay calculation results are calculated to obtain a network quality score.

作为上述步骤106的细化,当确定存储的所述往返时延计算结果的数量满足预设数量条件时,即确定存储的所述往返时延计算结果作为样本的丰富度达到了预设标准,在以上情况下,对存储的全部所述往返时延计算结果进行计算,得到更加可以描述网络质量的所述网络质量分数,其中,在所述往返时延计算结果存储在任一种存储结构中,该种存储结构中存储的所述往返时延计算结果的数量会增加,而在该种存储结构中存储的所述往返时延计算结果的数量大于或等于所述预设数量条件时,则确定存储的所述往返时延计算结果的数量满足预设数量条件,应当明白,前述说明仅为示例性的,并不构成对本公开所述满足预设数量条件判断的限定。As a refinement of the above step 106, when it is determined that the number of the stored round-trip delay calculation results meets the preset number condition, that is, it is determined that the richness of the stored round-trip delay calculation results as samples reaches the preset standard. In the above case, all the stored round-trip delay calculation results are calculated to obtain the network quality score that can better describe the network quality, wherein, when the round-trip delay calculation results are stored in any storage structure, the number of the round-trip delay calculation results stored in the storage structure will increase, and when the number of the round-trip delay calculation results stored in the storage structure is greater than or equal to the preset number condition, it is determined that the number of the stored round-trip delay calculation results meets the preset number condition. It should be understood that the foregoing description is only exemplary and does not constitute a limitation on the judgment of meeting the preset number condition described in the present disclosure.

针对ICMP/TCP/UDP探测分别提出了一种在内核层面进行精确筛选的机制,同时TCP探测避免了三次握手带来的半开连接问题,保障了大量探测目标时,对宿主机的资源占用情况。A precise screening mechanism at the kernel level is proposed for ICMP/TCP/UDP detection respectively. At the same time, TCP detection avoids the half-open connection problem caused by the three-way handshake and ensures the resource usage of the host machine when a large number of detection targets are detected.

作为上述实施例的细化,在所述对所述往返时延计算结果进行存储之后,所述方法还可以采用但不限于以下实现方式,例如:顺序检查双向列表中是否存在满足预设超时时间条件的元素,所述元素为在所述目标测量报文发出之前,存储于所述双向列表中的目标测量报文;在确定所述双向列表中存在满足所述预设超时时间条件的目标元素时,检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除;在确定所述第四属性信息和所述第三时间戳均未被删除的情况下,确定所述目标元素对应的目标回复报文丢包,将丢包结果存储至所述第一目标存储队列;将所述目标元素从所述双向列表中删除以及将所述第四属性信息、所述第三时间戳删除。As a refinement of the above embodiment, after the round-trip delay calculation result is stored, the method may also adopt but is not limited to the following implementation methods, for example: sequentially checking whether there are elements in the bidirectional list that meet the preset timeout condition, and the element is the target measurement message stored in the bidirectional list before the target measurement message is sent; when it is determined that there is a target element in the bidirectional list that meets the preset timeout condition, checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted; when it is determined that neither the fourth attribute information nor the third timestamp has been deleted, determining that the target reply message corresponding to the target element is lost, and storing the packet loss result in the first target storage queue; deleting the target element from the bidirectional list and deleting the fourth attribute information and the third timestamp.

为了便于对上述细化说明进行理解,本实施例提供示例性说明,例如:当基于ICMP协议进行网络质量检测时,包括:在往返时延(Round-Trip Time,RTT)测量时,通过使用到ICMP询问报文中的Echo和Reply。其中,所述ICMP询问报文即指所述目标测量报文,在所述ICMP询问报文内容中,类型和代码是固定的,由协议标准所约束。在其标识符字段,填入测量程序的PID(进程号),保证服务器范围内的全局唯一性;序号从1开始累计,确保每个ICMP测量报文的唯一性和一一对应,Payload部分按探测报文的大小填充固定字节数。ICMP下层的IP层和数据链路层的信息就正常填写,主要是写入正确的源目的IP和源目的MAC。在所述ICMP询问报文发送至所述目的端前,需要在内存中用两个数据结构存储相关信息,一是用哈希表,哈希表的key由ICMP询问报文的标识符和序号组成,value是所述ICMP询问报文发送时的时间戳,哈希表存储的数据即为所述ICMP询问报文的属性信息即所述目标测量报文携带的所述第二属性信息;二是用双向列表有序存储所述ICMP询问报文,方便后续计算和分析。完成后,所述ICMP询问报文紧接着就发出至所述目的端。所述目的端响应于所述ICMP询问报文回复所述目标回复报文,而在执行端接收所述目标回复报文至内核态的过程中,还会存在其他种类的报文掺杂其中,因此通过上述预设过滤条件对接收的所述原始回复报文进行过滤得到所述目标回复报文,而在接收到所述目标回复报文后,则保存接收所述目标回复报文的第二时间戳,并将所述目标回复报文的所述第一属性信息提取后,存储至属性信息存储队列,本实施例并不限定存储所述属性信息的存储结构为队列。通过基于一个后台目标线程不断消费存储至所述属性信息存储队列中的所述第一属性信息,每取出一个所述属性信息,就会将其和内存中存储的所述第二属性信息进行比较和计算,如果所述ICMP询问报文和所述目标回复报文的标识符(填充为PID)以及序列号一致,则认为是一对往返的报文,此时,会进行往返时延计算,并将计算结果放入到计算结果存储队列中,然后,会将哈希表中对应的信息进行删除。前述对往返时延进行计算的过程在步骤102中有所说明,本处所指通过ICMP协议进行网络质量测量的过程中,往返时延的计算为其示例性说明,另外,所述目标线程除了消费所述属性信息存储队列,还会不断检查发送所述ICMP询问报文阶段创建、持续填充的双向列表,顺序查看是否有满足超时时间的元素,当有超时目标元素时,就查看哈希表中是否仍然存在该目标测量报文即所述ICMP询问报文,如果存在,则认为没有及时收取到该目标测量报文即所述ICMP询问报文的所述目标回复报文,判断为丢包,将丢包结果写入到所述计算结果存储队列,并将所述ICMP询问报文从哈希表和双向列表中移除,如果不存在,则认为已经收到过该目标测量报文即ICMP询问报文的目标回复报文,正常移除双向列表中的ICMP询问报文信息。特别地,因为队列的有序性,当扫描到第一个还没到超时时间的元素时即可停止,防止后续无意义的扫描操作。In order to facilitate the understanding of the above detailed description, this embodiment provides an exemplary description, for example: when performing network quality detection based on the ICMP protocol, including: when measuring the round-trip time (RTT), by using the Echo and Reply in the ICMP query message. Among them, the ICMP query message refers to the target measurement message. In the content of the ICMP query message, the type and code are fixed and constrained by the protocol standard. In its identifier field, fill in the PID (process number) of the measurement program to ensure global uniqueness within the server range; the sequence number starts from 1 to ensure the uniqueness and one-to-one correspondence of each ICMP measurement message, and the Payload part is filled with a fixed number of bytes according to the size of the detection message. The information of the IP layer and data link layer under the ICMP is filled in normally, mainly writing the correct source and destination IP and source and destination MAC. Before the ICMP inquiry message is sent to the destination, two data structures need to be used to store relevant information in the memory. One is to use a hash table. The key of the hash table is composed of the identifier and sequence number of the ICMP inquiry message, and the value is the timestamp when the ICMP inquiry message is sent. The data stored in the hash table is the attribute information of the ICMP inquiry message, that is, the second attribute information carried by the target measurement message; the second is to use a two-way list to store the ICMP inquiry message in order to facilitate subsequent calculation and analysis. After completion, the ICMP inquiry message is immediately sent to the destination. The destination responds to the ICMP inquiry message to reply the target reply message, and in the process of receiving the target reply message to the kernel state at the execution end, there will be other types of messages mixed in it. Therefore, the received original reply message is filtered by the above preset filtering conditions to obtain the target reply message. After receiving the target reply message, the second timestamp of receiving the target reply message is saved, and the first attribute information of the target reply message is extracted and stored in the attribute information storage queue. This embodiment does not limit the storage structure for storing the attribute information to a queue. By continuously consuming the first attribute information stored in the attribute information storage queue based on a background target thread, each time the attribute information is taken out, it will be compared and calculated with the second attribute information stored in the memory. If the identifier (filled with PID) and sequence number of the ICMP inquiry message and the target reply message are consistent, they are considered to be a pair of round-trip messages. At this time, the round-trip delay will be calculated, and the calculation result will be placed in the calculation result storage queue, and then the corresponding information in the hash table will be deleted. The aforementioned process of calculating the round trip delay is described in step 102. In the process of measuring network quality through the ICMP protocol, the calculation of the round trip delay is used as an exemplary description. In addition, in addition to consuming the attribute information storage queue, the target thread will continuously check the bidirectional list created and continuously filled in the ICMP query message sending stage, and check in sequence whether there are elements that meet the timeout period. When there is a timeout target element, it is checked whether the target measurement message, i.e., the ICMP query message, still exists in the hash table. If it exists, it is considered that the target reply message of the target measurement message, i.e., the ICMP query message, has not been received in time, and it is judged as packet loss. The packet loss result is written into the calculation result storage queue, and the ICMP query message is removed from the hash table and the bidirectional list. If it does not exist, it is considered that the target reply message of the target measurement message, i.e., the ICMP query message, has been received, and the ICMP query message information in the bidirectional list is normally removed. In particular, due to the orderliness of the queue, the scanning can be stopped when the first element that has not reached the timeout period is scanned to prevent subsequent meaningless scanning operations.

作为上述实施例的细化,所述检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除之后,所述方法还可以采用但不限于以下实现方式,例如:在确定所述第四属性信息和所述第三时间戳均被删除的情况下,将所述目标元素从所述双向列表中删除。前述细化说明涉及的内容已在上述示例性说明中涉及,本实施例对此不在进行赘述。As a refinement of the above embodiment, after checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted, the method may also adopt but is not limited to the following implementation, for example: when it is determined that both the fourth attribute information and the third timestamp have been deleted, the target element is deleted from the bidirectional list. The contents involved in the above detailed description have been involved in the above exemplary description, and this embodiment will not be repeated here.

在所述对存储的全部往返时延计算结果进行计算,得到网络质量分数之后,所述方法还可以采用但不限于以下实现方式,例如:在对所述目的端进行多次网络质量检测后,得到多个所述网络质量分数,对多个所述网络质量分数进行计算,得到聚合指标;将所述聚合指标存储至目标存储队列;在确定所述目标存储队列的大小满足预设大小条件或所述目标存储队列中存储的第一聚合指标的存储时间满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标进行压缩;将压缩后的全部所述聚合指标传输至分析模块。After calculating all the stored round-trip delay calculation results to obtain the network quality score, the method can also adopt but is not limited to the following implementation methods, for example: after performing multiple network quality detections on the destination end, multiple network quality scores are obtained, and the multiple network quality scores are calculated to obtain an aggregation index; the aggregation index is stored in a target storage queue; when it is determined that the size of the target storage queue meets a preset size condition or the storage time of the first aggregation index stored in the target storage queue meets a preset time window condition, all the aggregation indicators stored in the target storage queue are compressed; and all the compressed aggregation indicators are transmitted to the analysis module.

为了便于对上述细化说明的内容进行理解,本实施例提供示例性说明,例如:得到每一个目的端的网络质量检测结果即所述网络质量分数后,如果直接将所述网络质量分数发往分析模块,则会占用较高的网络带宽,为了尽量降低非业务系统对资源的占用,可以采取压缩发送的机制。首先是基于目的端的压缩,将多次对同一目的端的检测得到的所述网络质量分数进行计算,计算出平均值、最大值、最小值等聚合指标;其次是基于数量的压缩,将所述聚合指标写入到目标存储队列中,当所述目标存储队列的大小满足预设大小条件或者满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标基于压缩算法打包,传输给分析模块。In order to facilitate the understanding of the above detailed description, this embodiment provides an exemplary description, for example: after obtaining the network quality detection result of each destination, that is, the network quality score, if the network quality score is directly sent to the analysis module, it will occupy a higher network bandwidth. In order to minimize the occupation of resources by non-business systems, a compressed sending mechanism can be adopted. First, based on the compression of the destination, the network quality score obtained by multiple detections of the same destination is calculated to calculate the average, maximum, minimum and other aggregation indicators; secondly, based on the number of compression, the aggregation indicators are written into the target storage queue. When the size of the target storage queue meets the preset size condition or meets the preset time window condition, all the aggregation indicators stored in the target storage queue are packaged based on the compression algorithm and transmitted to the analysis module.

作为上述实施例的细化,在执行将压缩后的全部所述聚合指标传输至分析模块时,还可以采用但不限于以下实现方式,例如:判断所述聚合指标对应的网络链路是否为重要的网络链路;若确定所述聚合指标对应的网络链路为非重要的网络链路,则在所述网络链路异常时,将压缩后的全部所述聚合指标传输至所述分析模块;若确定所述聚合指标对应的网络链路为重要的网络链路,则在所述网络链路正常或异常时,均将压缩后的全部所述聚合指标传输至所述分析模块。即可以针对监测的链路进行分级策略,非重要的链路在正常状态时并不需要传输至上层,只有当异常时才将具体的指标上送,而对于重要的链路,无论异常已否,都将指标上送,所述正常和异常的区分即基于链路丢包和时延是否符合一定条件。As a refinement of the above embodiment, when executing the transmission of all the compressed aggregate indicators to the analysis module, the following implementation methods may also be adopted but are not limited to, for example: determine whether the network link corresponding to the aggregate indicator is an important network link; if it is determined that the network link corresponding to the aggregate indicator is an unimportant network link, then when the network link is abnormal, all the compressed aggregate indicators are transmitted to the analysis module; if it is determined that the network link corresponding to the aggregate indicator is an important network link, then when the network link is normal or abnormal, all the compressed aggregate indicators are transmitted to the analysis module. That is, a grading strategy can be implemented for the monitored links, and unimportant links do not need to be transmitted to the upper layer when they are in a normal state. Only when they are abnormal will specific indicators be sent up, and for important links, indicators will be sent up regardless of whether they are abnormal or not, and the distinction between normal and abnormal is based on whether the link packet loss and delay meet certain conditions.

作为上述实施例的细化,在所述对所述往返时延计算结果进行存储之后,所述方法还可以采用但不限于以下实现方式,例如:将所述第一时间戳及所述第二属性信息进行删除。本实施例涉及的过程已在上述以ICMP协议为例的示例性说明中进行说明,即在对所述往返时延计算结果进行存储之后,将所述第一时间戳和所述第二属性信息进行删除,在以ICMP为例的示例性说明中,即哈希表中存储的信息进行删除。作为上述实施例的细化,在执行步骤101所述在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算时,还可以采用但不限于以下实现方式,例如:在确定发送至所述目的端的目标测量报文的数量与存储的所述往返时延计算结果的数量相同时,对存储的全部往返时延计算结果进行计算,得到所述网络质量分数。As a refinement of the above embodiment, after the round-trip delay calculation result is stored, the method may also adopt but is not limited to the following implementation methods, for example: deleting the first timestamp and the second attribute information. The process involved in this embodiment has been described in the above exemplary description taking the ICMP protocol as an example, that is, after the round-trip delay calculation result is stored, the first timestamp and the second attribute information are deleted. In the exemplary description taking ICMP as an example, the information stored in the hash table is deleted. As a refinement of the above embodiment, when executing step 101, when determining that the number of the stored round-trip delay calculation results meets the preset number condition, when calculating all the stored round-trip delay calculation results, it may also be adopted but is not limited to the following implementation methods, for example: when determining that the number of target measurement messages sent to the destination end is the same as the number of the stored round-trip delay calculation results, all the stored round-trip delay calculation results are calculated to obtain the network quality score.

在一些实施例中,为了实现对所述网络质量的分数的计算,还可以采用但不限于以下实现方式,例如:通过所述目标线程不断消费塞入到所述属性信息存储队列中的所述第一属性信息,每取出一个所述第一属性信息,就对目的端的收包数加1,当跟目的端的每周期发包数相等时,说明本周期所有的回复包都收到了,因为超时也会内部产生一个丢包结果,所以最终在所述计算结果存储队列总会有一个结果,每周期的发包数会与所述计算结果存储队列中的往返时延结算结果的数量相等即所述目标测量报文的发送数量与存储的所述往返时延计算结果的数量相同时,就可以计算平均时延、丢包率等网络质量分数了。In some embodiments, in order to calculate the score of the network quality, the following implementation method may be used but is not limited to, for example: the target thread continuously consumes the first attribute information inserted into the attribute information storage queue, and each time the first attribute information is taken out, the number of packets received by the destination end is increased by 1. When it is equal to the number of packets sent per cycle by the destination end, it means that all reply packets in this cycle have been received. Because a packet loss result will also be generated internally due to timeout, there will always be a result in the calculation result storage queue in the end. The number of packets sent per cycle will be equal to the number of round-trip delay settlement results in the calculation result storage queue, that is, when the number of target measurement messages sent is the same as the number of stored round-trip delay calculation results, network quality scores such as average delay and packet loss rate can be calculated.

本公开涉及的所述网络质量检测的方法除了基于所述ICMP协议实现外还可以基于UDP协议或TCP协议实现,而由于ICMP协议、UDP协议、TCP协议三者之间的标准并不相同,在本方法基于UDP协议或TCP协议实现时,分别做了对应修饰,具体方案请参阅下文内容。In addition to being implemented based on the ICMP protocol, the network quality detection method involved in the present disclosure can also be implemented based on the UDP protocol or the TCP protocol. Since the standards among the ICMP protocol, the UDP protocol, and the TCP protocol are not the same, when the method is implemented based on the UDP protocol or the TCP protocol, corresponding modifications are made respectively. For specific solutions, please refer to the following content.

作为上述实施例的细化,若所述目标测试报文目标测量报文为UDP协议报文即基于UDP协议实现网络质量的测量时,所述在内核态接收目的端发送的原始回复报文,还可以采用但不限于以下实现方式,例如:若未接收到所述目的端的原端口发送的所述原始回复报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到所述原始回复报文。As a refinement of the above embodiment, if the target test message and the target measurement message are UDP protocol messages, that is, the network quality measurement is implemented based on the UDP protocol, the original reply message sent by the destination end is received in the kernel state, and can also be implemented but not limited to the following methods. For example: if the original reply message sent by the original port of the destination end is not received, then switch to other ports of the destination end for network quality detection until the original reply message is received from the other switched ports.

为了便于对上述内容进行理解,本实施例提供示例性说明,其中本示例性说明以UDP协议为例,包括:UDP协议作为一个无连接、不可靠的传输层协议,服务端即目的端是不一定要对客户端即执行端有目标回复报文的,很多情况下UDP只是一个单向的报文传输。因此,在用UDP报文进行RTT测量时,需要依靠ICMP的一个特性,就是ICMP的差错报文:端口不可达。在进行网络质量检测时,探测一个目的端并没有开放的端口,目的端的该端口会回复一个ICMP的差错报文。回复的ICMP的差错报文中的payload部分会填充发送的UDP协议报文头部信息即所述第二属性信息,比如执行端在发送时将UDP协议报文的标识符字段填充为1024,回复的ICMP的差错报文中的payload部分中的IP报文的标识符字段也是1024字段。因此,结合IP报文的标识符字段以及UDP协议报文的源目的端口来对发送的UDP协议报文和回复的ICMP差错报文进行一一对应,从而计算出RTT时延。在特殊情况下,如果目的端恰巧有服务监听了UDP的端口,那么目的端就不会回复ICMP的差错报文,此时,若执行端没有收取到ICMP的差错报文即所述目标回复报文,此时存在两种情况,一是目的端有服务在监听指定UDP端口,发送的报文被正常接收了,目的端的服务是不会回复ICMP消息的;二是网络不通,或者中间过程丢包。处理的策略是,将本轮的网络质量检测的结果标记为“疑似丢包”,将目的端的端口切换成一个其他的、不常用的端口进行探测,如果仍然不通,循环上一系列动作,并将上一轮的探测结果标记为丢包,如果收到了ICMP的差错报文,则停止切换目的端的端口。In order to facilitate the understanding of the above content, this embodiment provides an exemplary description, wherein this exemplary description takes the UDP protocol as an example, including: the UDP protocol is a connectionless, unreliable transport layer protocol, and the server, i.e., the destination, does not necessarily have a target reply message to the client, i.e., the execution end. In many cases, UDP is only a one-way message transmission. Therefore, when using UDP messages for RTT measurement, it is necessary to rely on a feature of ICMP, that is, the ICMP error message: port unreachable. When performing network quality detection, it is detected that a destination does not have an open port, and the port of the destination will reply with an ICMP error message. The payload part of the reply ICMP error message will be filled with the sent UDP protocol message header information, i.e., the second attribute information. For example, when the execution end fills the identifier field of the UDP protocol message with 1024 when sending, the identifier field of the IP message in the payload part of the reply ICMP error message is also a 1024 field. Therefore, the identifier field of the IP message and the source and destination ports of the UDP protocol message are combined to make a one-to-one correspondence between the sent UDP protocol message and the replied ICMP error message, so as to calculate the RTT delay. In special cases, if the destination happens to have a service listening to the UDP port, the destination will not reply to the ICMP error message. At this time, if the execution end does not receive the ICMP error message, that is, the target reply message, there are two situations at this time. One is that the destination has a service listening to the specified UDP port, and the sent message is received normally, and the service at the destination will not reply to the ICMP message; the other is that the network is not connected, or the packet is lost in the middle process. The processing strategy is to mark the result of this round of network quality detection as "suspected packet loss", switch the port of the destination to another, uncommon port for detection, if it is still not connected, cycle a series of actions, and mark the detection result of the previous round as packet loss. If the ICMP error message is received, stop switching the port of the destination.

作为上述实施例的细化,若所述目标测试报文目标测量报文属于TCP协议报文即基于TCP协议实现网络质量的测量时,所述在内核态接收目的端发送的原始回复报文,还可以采用但不限于以下实现方式,例如:若所述目的端的原端口发送的所述目标回复报文为TCP协议的同步确认报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到TCP协议的重置报文。As a refinement of the above embodiment, if the target test message and target measurement message belong to TCP protocol messages, that is, the network quality measurement is implemented based on the TCP protocol, the original reply message sent by the destination end is received in the kernel state, and can also be implemented but not limited to the following methods. For example: if the target reply message sent by the original port of the destination end is a synchronization confirmation message of the TCP protocol, then switch to perform network quality detection on other ports of the destination end until a reset message of the TCP protocol is received from the other switched ports.

为了便于对上述内容进行理解,本实施例提供示例性说明,其中本示例性说明以TCP协议为例,包括:在测量目的端的端口连通性时,交互流程为客户端即执行端发送SYN报文即所述木啊比测量报文,服务端即目的端回复SYN+ACK报文即所述同步确认报文,因为并不需要真正的建立TCP连接,客户端会回复RST报文即所述重置报文,断开这个连接,但在服务器上,这个半开的连接会存在一定的时间,如果对服务端测量次数比较大的话,会造成不必要的资源浪费。To facilitate understanding of the above content, this embodiment provides an exemplary description, wherein this exemplary description takes the TCP protocol as an example, including: when measuring the port connectivity of the destination end, the interaction process is that the client, i.e., the execution end, sends a SYN message, i.e., the measurement message, and the server, i.e., the destination end, replies with a SYN+ACK message, i.e., the synchronization confirmation message. Because there is no need to actually establish a TCP connection, the client will reply with a RST message, i.e., the reset message, to disconnect the connection. However, on the server, this half-open connection will exist for a certain period of time. If the number of measurements on the server is relatively large, it will cause unnecessary waste of resources.

因此,在并不需要测量端口连通性的情况下,可以优化这个流程来避免掉这个情况。优化后的过程如下,包括:客户端首先发送SYN报文,但目的端的端口是一个不常见的端口或是服务端没有服务监听的端口,如果服务端没有监听该端口,会直接回复一个RST报文,并不会有半开连接,并且此时基于所述重置报文也得到了两台服务器的RTT指标。此外通过源端口、目的端口、标志位(SYN/ACK)来识别一对往返的报文。进一步地,目的端的端口被服务监听了,那么此时目的端会正常回复SYN+ACK报文,如果收取到SYN+ACK报文,虽然,此时已经可以得到RTT指标,但因为通过正常的三次握手流程会导致半开连接问题,则需要先将这一轮的网络质量检测结果标记为不丢包且附上计算得到的RTT值,然后发送RST报文后将所述目的端的端口切换成一个其他的、不常用的端口进行下一轮网络质量检测,如果仍然接收目的端回复的SYN+ACK报文,循环前述一系列过程,如果收到了RST报文,则停止切换目的端的端口。Therefore, when it is not necessary to measure port connectivity, this process can be optimized to avoid this situation. The optimized process is as follows: the client first sends a SYN message, but the destination port is an uncommon port or a port that the server does not listen to. If the server does not listen to the port, it will directly reply with a RST message, and there will be no half-open connection. At this time, the RTT indicators of the two servers are also obtained based on the reset message. In addition, a pair of round-trip messages are identified by the source port, destination port, and flag bit (SYN/ACK). Furthermore, if the port of the destination is monitored by the service, the destination will normally reply with a SYN+ACK message. If the SYN+ACK message is received, although the RTT indicator can be obtained at this time, because the normal three-way handshake process will cause a half-open connection problem, it is necessary to first mark the result of this round of network quality detection as no packet loss and attach the calculated RTT value, and then send an RST message and switch the port of the destination to another, less commonly used port for the next round of network quality detection. If the SYN+ACK message replied by the destination is still received, the aforementioned series of processes are repeated. If a RST message is received, the switching of the port of the destination is stopped.

在一些实施例中,将所述原始回复报文从所述内核态中过滤,所涉及的预设过滤条件在基于不同的传输协议实现的网络质量检测方案中存在不同的设计,其中,具体区分如下:In some embodiments, the original reply message is filtered from the kernel state, and the preset filtering conditions involved have different designs in network quality detection schemes implemented based on different transmission protocols, wherein the specific distinction is as follows:

在ICMP测量场景下,利用在ICMP头部的标识符填充检测程序进程的PID号,来保证精确筛选出所述目的回复报文。In the ICMP measurement scenario, the PID number of the detection program process is filled in with the identifier in the ICMP header to ensure accurate screening of the destination reply message.

在UDP测量场景下,目的回复报文是ICMP的差错报文,在ICMP的差错报文的payload中会填充发送的UDP协议报文即目标测试报文的头部信息,因此通过固定的偏移量,获取ICMP的差错报文中UDP协议报文的头部信息,且通过比较源端口和目的端口,从而实现精确筛选。在TCP场景下,TCP的RST回复报文会将源目的端口进行颠倒后返回,因此可以直接通过源目的端口信息来进行条件设置从而实现精确筛选。在TCP和UDP场景下,如上述内容所示,特殊情况时会发生目的端的端口切换,为了解决端口切换过程中原始回复报文的过滤问题,则基于一个端口范围去进行目的测量报文的构造,就是无论怎么切换,源目的端口都只会在所述端口范围包括的数个端口内进行变化,因此,可以将筛选条件指定为端口集合。In the UDP measurement scenario, the destination reply message is an ICMP error message. The payload of the ICMP error message will be filled with the header information of the sent UDP protocol message, i.e., the target test message. Therefore, the header information of the UDP protocol message in the ICMP error message is obtained through a fixed offset, and accurate screening is achieved by comparing the source port and the destination port. In the TCP scenario, the TCP RST reply message will reverse the source and destination ports and return them. Therefore, the conditions can be set directly through the source and destination port information to achieve accurate screening. In the TCP and UDP scenarios, as shown in the above content, port switching of the destination will occur in special circumstances. In order to solve the problem of filtering the original reply message during the port switching process, the destination measurement message is constructed based on a port range. That is, no matter how the switch is made, the source and destination ports will only change within the several ports included in the port range. Therefore, the screening condition can be specified as a port set.

在一些实施例中,本申请涉及的网络质量检测进一步支持检测业务接口的质量,支持HTTP,HTTPS等应用层协议。In some embodiments, the network quality detection involved in the present application further supports detecting the quality of service interfaces and supports application layer protocols such as HTTP and HTTPS.

与上述的网络质量检测的方法相对应,本发明还提出一种网络质量检测的装置。由于本发明的装置实施例与上述的方法实施例相对应,对于装置实施例中未披露的细节可参照上述的方法实施例,本发明中不再进行赘述。Corresponding to the above-mentioned network quality detection method, the present invention also provides a network quality detection device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

图2为本公开实施例提供的一种网络质量检测的装置的结构示意图,如图2所示,包括:FIG. 2 is a schematic diagram of the structure of a network quality detection device provided by an embodiment of the present disclosure, as shown in FIG. 2 , comprising:

第一判断单元21,用于在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;The first judgment unit 21 is used to receive the original reply message sent by the destination end in the kernel state, and judge whether the third attribute information carried by the original reply message meets the preset filtering condition;

确定单元22,用于在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;A determination unit 22, configured to determine that the original reply message is the target reply message when it is determined that the third attribute information meets the preset filtering condition;

第一传输单元23,用于将所述目标回复报文从所述内核态传输至用户态;A first transmission unit 23, used for transmitting the target reply message from the kernel state to the user state;

第二判断单元24,用于判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;A second judgment unit 24 is used to judge whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message;

第一计算单元25,用于在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;A first calculation unit 25 is configured to, when it is determined that the first attribute information is the same as the second attribute information, calculate a round trip delay for a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round trip delay calculation result;

第一存储单元26,用于对所述往返时延计算结果进行存储;A first storage unit 26, used to store the round-trip delay calculation result;

第二计算单元27,用于在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。The second calculation unit 27 is used to calculate all the stored round-trip delay calculation results to obtain a network quality score when it is determined that the number of the stored round-trip delay calculation results meets a preset number condition.

针对ICMP/TCP/UDP探测分别提出了一种在内核层面进行精确筛选的机制,同时TCP探测避免了三次握手带来的半开连接问题,保障了大量探测目标时,对宿主机的资源占用情况。A precise screening mechanism at the kernel level is proposed for ICMP/TCP/UDP detection respectively. At the same time, TCP detection avoids the half-open connection problem caused by the three-way handshake and ensures the resource usage of the host machine when a large number of detection targets are detected.

针对ICMP/TCP/UDP探测都提出了细致的测量方案,将测量报文的发送、接收、计算、结果输出各个环节解耦,基于多线程、无锁阻塞队列等技术能力实现各环节的异步处理,实现了最大程度的并发探测,提升了整个测量系统的吞吐量。A detailed measurement plan is proposed for ICMP/TCP/UDP detection, which decouples the sending, receiving, calculation and result output of measurement messages. Based on multi-threading, lock-free blocking queue and other technical capabilities, asynchronous processing of each link is realized, achieving maximum concurrent detection and improving the throughput of the entire measurement system.

通过基于所述第一时间戳和所述第二时间戳计算所述往返时延计算结果,再基于所述往返时延计算结果计算所述网络质量分数,从而实现对网络质量的检测。The network quality is detected by calculating the round-trip delay calculation result based on the first timestamp and the second timestamp, and then calculating the network quality score based on the round-trip delay calculation result.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述装置包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the device includes:

第一检查单元28,用于顺序检查双向列表中是否存在满足预设超时时间条件的元素,所述元素为在所述目标测量报文发出之前,存储于所述双向列表中的目标测量报文;A first checking unit 28 is used to sequentially check whether there is an element in the bidirectional list that meets a preset timeout condition, wherein the element is a target measurement message stored in the bidirectional list before the target measurement message is sent;

第二检查单元29,用于在确定所述双向列表中存在满足所述预设超时时间条件的目标元素时,检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除;A second checking unit 29 is configured to check whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted when it is determined that the target element that meets the preset timeout condition exists in the bidirectional list;

确定单元210,用于在确定所述第四属性信息和所述第三时间戳均未被删除的情况下,确定所述目标元素对应的目标回复报文丢包,将丢包结果存储至所述第一目标存储队列;A determining unit 210 is configured to determine that a target reply message corresponding to the target element is lost when it is determined that the fourth attribute information and the third timestamp are not deleted, and store the packet loss result in the first target storage queue;

第一删除单元211,用于将所述目标元素从所述双向列表中删除以及将所述第四属性信息、所述第三时间戳删除。The first deleting unit 211 is used to delete the target element from the bidirectional list and delete the fourth attribute information and the third timestamp.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述装置包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the device includes:

第二删除单元212,用于在确定所述第四属性信息和所述第三时间戳均被删除的情况下,将所述目标元素从所述双向列表中删除。The second deleting unit 212 is configured to delete the target element from the bidirectional list when it is determined that both the fourth attribute information and the third timestamp are deleted.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述装置包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the device includes:

第三计算单元213,用于在对所述目的端进行多次网络质量检测后,得到多个所述网络质量分数,对多个所述网络质量分数进行计算,得到聚合指标;A third calculation unit 213 is used to obtain a plurality of network quality scores after performing multiple network quality detections on the destination end, and calculate the plurality of network quality scores to obtain an aggregation index;

第二存储单元214,用于将所述聚合指标存储至目标存储队列;A second storage unit 214, configured to store the aggregation indicator in a target storage queue;

压缩单元215,用于在确定所述目标存储队列的大小满足预设大小条件或所述目标存储队列中存储的第一聚合指标的存储时间满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标进行压缩;A compression unit 215, configured to compress all the aggregate indicators stored in the target storage queue when it is determined that the size of the target storage queue meets a preset size condition or the storage time of the first aggregate indicator stored in the target storage queue meets a preset time window condition;

第二传输单元216,用于将压缩后的全部所述聚合指标传输至分析模块。The second transmission unit 216 is used to transmit all the compressed aggregation indicators to the analysis module.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述传输单元216包括:Further, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the transmission unit 216 includes:

判断模块2161,用于判断所述聚合指标对应的网络链路是否为重要的网络链路;A judging module 2161 is used to judge whether the network link corresponding to the aggregation indicator is an important network link;

传输模块2162,用于当确定所述聚合指标对应的网络链路为非重要的网络链路时,且在所述网络链路异常的情况下,将压缩后的全部所述聚合指标传输至所述分析模块;The transmission module 2162 is used to transmit all the compressed aggregation indicators to the analysis module when it is determined that the network link corresponding to the aggregation indicator is a non-important network link and when the network link is abnormal;

所述传输模块2162还用于,当确定所述聚合指标对应的网络链路为重要的网络链路时,且在所述网络链路正常或异常时,均将压缩后的全部所述聚合指标传输至所述分析模块。The transmission module 2162 is also used to transmit all the compressed aggregation indicators to the analysis module when it is determined that the network link corresponding to the aggregation indicator is an important network link and when the network link is normal or abnormal.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述装置包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the device includes:

第三删除单元217,用于将所述第一时间戳及所述第二属性信息进行删除。The third deleting unit 217 is used to delete the first timestamp and the second attribute information.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述第二计算单元27还用于:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG3 , the second calculation unit 27 is further configured to:

在确定发送至所述目的端的目标测量报文的数量与存储的所述往返时延计算结果的数量相同时,对存储的全部往返时延计算结果进行计算,得到所述网络质量分数。When it is determined that the number of target measurement messages sent to the destination end is the same as the number of the stored round-trip delay calculation results, all stored round-trip delay calculation results are calculated to obtain the network quality score.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述第一判断单元21,还用于当未接收到所述目的端的原端口发送的所述原始回复报文时,切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到所述原始回复报文。Furthermore, in a possible implementation method of the embodiment of the present disclosure, as shown in Figure 3, the first judgment unit 21 is also used to switch to other ports of the destination end for network quality detection when the original reply message sent by the original port of the destination end is not received, until the original reply message is received from the other switched ports.

进一步地,在本公开实施例一种可能的实现方式中,如图3所示,所述第一判断单元21,还用于当所述目的端的原端口发送的所述目标回复报文为TCP协议的同步确认报文时,切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到TCP协议的重置报文。Furthermore, in a possible implementation method of the embodiment of the present disclosure, as shown in Figure 3, the first judgment unit 21 is also used to switch to perform network quality detection on other ports of the destination end when the target reply message sent by the original port of the destination end is a synchronization confirmation message of the TCP protocol until a reset message of the TCP protocol is received from the other switched ports.

需要说明的是,前述对方法实施例的解释说明,也适用于本公开实施例的装置,原理相同,本公开实施例中不再限定。It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.

根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

图4示出了可以用来实施本公开的实施例的示例电子设备300的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG. 4 shows a schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.

如图4所示,设备300包括计算单元301,其可以根据存储在ROM(Read-OnlyMemory,只读存储器)302中的计算机程序或者从存储单元308加载到RAM(Random AccessMemory,随机访问/存取存储器)303中的计算机程序,来执行各种适当的动作和处理。在RAM303中,还可存储设备300操作所需的各种程序和数据。计算单元301、ROM 302以及RAM 303通过总线304彼此相连。I/O(Input/Output,输入/输出)接口305也连接至总线304。As shown in FIG4 , the device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 to a RAM (Random Access Memory) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An I/O (Input/Output) interface 305 is also connected to the bus 304.

设备300中的多个部件连接至I/O接口305,包括:输入单元306,例如键盘、鼠标等;输出单元307,例如各种类型的显示器、扬声器等;存储单元308,例如磁盘、光盘等;以及通信单元309,例如网卡、调制解调器、无线通信收发机等。通信单元309允许设备300通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the device 300 are connected to the I/O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元301可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元301的一些示例包括但不限于CPU(Central Processing Unit,中央处理单元)、GPU(Graphic Processing Units,图形处理单元)、各种专用的AI(Artificial Intelligence,人工智能)计算芯片、各种运行机器学习模型算法的计算单元、DSP(DigitalSignal Processor,数字信号处理器)、以及任何适当的处理器、控制器、微控制器等。计算单元301执行上文所描述的各个方法和处理,例如网络质量检测的方法。例如,在一些实施例中,网络质量检测的方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元308。在一些实施例中,计算机程序的部分或者全部可以经由ROM 302和/或通信单元309而被载入和/或安装到设备300上。当计算机程序加载到RAM 303并由计算单元301执行时,可以执行上文描述的方法的一个或多个步骤。备选地,在其他实施例中,计算单元301可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行前述网络质量检测的方法。The computing unit 301 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as a method for network quality detection. For example, in some embodiments, the method for network quality detection may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed on the device 300 via the ROM 302 and/or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to execute the aforementioned network quality detection method in any other appropriate manner (for example, by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、FPGA(Field Programmable Gate Array,现场可编程门阵列)、ASIC(Application-Specific Integrated Circuit,专用集成电路)、ASSP(Appl ication SpecificStandard Product,专用标准产品)、SOC(System On Chip,芯片上系统的系统)、CPLD(Complex Programmable Logic Device,复杂可编程逻辑设备)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and/or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM(Electrically Programmable Read-Only-Memory,可擦除可编程只读存储器)或快闪存储器、光纤、CD-ROM(Compact Di sc Read-Only Memory,便捷式紧凑盘只读存储器)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(Cathode-Ray Tube,阴极射线管)或者LCD(Liquid Crystal Display,液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:LAN(LocalArea Network,局域网)、WAN(Wide Area Network,广域网)、互联网和区块链网络。The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务("Virtual Private Server",或简称"VPS")中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

其中,需要说明的是,人工智能是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的技术。人工智能硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术;人工智能软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理技术以及机器学习/深度学习、大数据处理技术、知识图谱技术等几大方向。It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning/deep learning, big data processing technology, knowledge graph technology, and other major directions.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (13)

1.一种网络质量检测的方法,其特征在于,包括:1. A method for network quality detection, characterized by comprising: 在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;Receiving, in kernel mode, an original reply message sent by the destination end, and determining whether the third attribute information carried by the original reply message meets a preset filtering condition; 在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;When it is determined that the third attribute information meets the preset filtering condition, determining the original reply message as the target reply message; 将所述目标回复报文从所述内核态传输至用户态,并判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;Transmitting the target reply message from the kernel state to the user state, and determining whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message; 在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;When it is determined that the first attribute information is the same as the second attribute information, performing round-trip delay calculation on a first timestamp sent by the target measurement message and a second timestamp received by the target reply message to obtain a round-trip delay calculation result; 对所述往返时延计算结果进行存储;Storing the round-trip delay calculation result; 在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。When it is determined that the number of the stored round-trip delay calculation results meets the preset number condition, all the stored round-trip delay calculation results are calculated to obtain a network quality score. 2.根据权利要求1所述的方法,其特征在于,在所述对所述往返时延计算结果进行存储之后,所述方法包括:2. The method according to claim 1, characterized in that after storing the round-trip delay calculation result, the method comprises: 顺序检查双向列表中是否存在满足预设超时时间条件的元素,所述元素为在所述目标测量报文发出之前,存储于所述双向列表中的目标测量报文;Sequentially checking whether there is an element in the bidirectional list that meets a preset timeout condition, the element being a target measurement message stored in the bidirectional list before the target measurement message is sent; 在确定所述双向列表中存在满足所述预设超时时间条件的目标元素时,检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除;When it is determined that there is a target element in the bidirectional list that meets the preset timeout condition, checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted; 在确定所述第四属性信息和所述第三时间戳均未被删除的情况下,确定所述目标元素对应的目标回复报文丢包,将丢包结果存储至所述第一目标存储队列;When it is determined that the fourth attribute information and the third timestamp are not deleted, determining that the target reply message corresponding to the target element is lost, and storing the packet loss result in the first target storage queue; 将所述目标元素从所述双向列表中删除以及将所述第四属性信息、所述第三时间戳删除。The target element is deleted from the bidirectional list and the fourth attribute information and the third timestamp are deleted. 3.根据权利要求2所述的方法,其特征在于,所述检查所述目标元素对应的第四属性信息和第三时间戳是否已被删除之后,所述方法包括:3. The method according to claim 2, characterized in that after checking whether the fourth attribute information and the third timestamp corresponding to the target element have been deleted, the method comprises: 在确定所述第四属性信息和所述第三时间戳均被删除的情况下,将所述目标元素从所述双向列表中删除。When it is determined that both the fourth attribute information and the third timestamp are deleted, the target element is deleted from the bidirectional list. 4.根据权利要求1所述的方法,其特征在于,在所述对存储的全部往返时延计算结果进行计算,得到网络质量分数之后,所述方法包括:4. The method according to claim 1, characterized in that after calculating all stored round-trip delay calculation results to obtain a network quality score, the method comprises: 在对所述目的端进行多次网络质量检测后,得到多个所述网络质量分数,对多个所述网络质量分数进行计算,得到聚合指标;After performing multiple network quality tests on the destination end, multiple network quality scores are obtained, and the multiple network quality scores are calculated to obtain an aggregate index; 将所述聚合指标存储至目标存储队列;Storing the aggregated indicator in a target storage queue; 在确定所述目标存储队列的大小满足预设大小条件或所述目标存储队列中存储的第一聚合指标的存储时间满足预设时间窗口条件时,将所述目标存储队列中存储的全部聚合指标进行压缩;When it is determined that the size of the target storage queue meets a preset size condition or the storage time of the first aggregation indicator stored in the target storage queue meets a preset time window condition, compressing all the aggregation indicators stored in the target storage queue; 将压缩后的全部所述聚合指标传输至分析模块。All the compressed aggregate indicators are transmitted to the analysis module. 5.根据权利要求4所述的方法,其特征在于,所述将压缩后的全部所述聚合指标传输至分析模块包括:5. The method according to claim 4, characterized in that the step of transmitting all the compressed aggregate indicators to the analysis module comprises: 判断所述聚合指标对应的网络链路是否为重要的网络链路;Determining whether the network link corresponding to the aggregation indicator is an important network link; 若确定所述聚合指标对应的网络链路为非重要的网络链路,则在所述网络链路异常时,将压缩后的全部所述聚合指标传输至所述分析模块;If it is determined that the network link corresponding to the aggregation index is a non-important network link, then when the network link is abnormal, all the compressed aggregation indexes are transmitted to the analysis module; 若确定所述聚合指标对应的网络链路为重要的网络链路,则在所述网络链路正常或异常时,均将压缩后的全部所述聚合指标传输至所述分析模块。If it is determined that the network link corresponding to the aggregation index is an important network link, all the compressed aggregation indexes are transmitted to the analysis module when the network link is normal or abnormal. 6.根据权利要求1所述的方法,其特征在于,在所述对所述往返时延计算结果进行存储之后,所述方法包括:6. The method according to claim 1, characterized in that after storing the round-trip delay calculation result, the method comprises: 将所述第一时间戳及所述第二属性信息进行删除。Delete the first timestamp and the second attribute information. 7.根据权利要求1所述的方法,其特征在于,所述在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算包括:7. The method according to claim 1, characterized in that when it is determined that the number of the stored round-trip delay calculation results meets a preset number condition, calculating all the stored round-trip delay calculation results comprises: 在确定发送至所述目的端的目标测量报文的数量与存储的所述往返时延计算结果的数量相同时,对存储的全部往返时延计算结果进行计算,得到所述网络质量分数。When it is determined that the number of target measurement messages sent to the destination end is the same as the number of the stored round-trip delay calculation results, all stored round-trip delay calculation results are calculated to obtain the network quality score. 8.根据权利要求1所述的方法,其特征在于,若所述目标测量报文为UDP协议报文,所述在内核态接收目的端发送的原始回复报文包括:8. The method according to claim 1, wherein if the target measurement message is a UDP protocol message, the receiving in kernel mode the original reply message sent by the destination end comprises: 若未接收到所述目的端的原端口发送的所述原始回复报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到所述原始回复报文。If the original reply message sent by the original port of the destination end is not received, the network quality detection is performed on other ports of the destination end by switching until the original reply message is received from the other ports of the switching. 9.根据权利要求1所述的方法,其特征在于,若所述目标测量报文属于TCP协议报文,所述在内核态接收目的端发送的原始回复报文包括:9. The method according to claim 1, wherein if the target measurement message is a TCP protocol message, the receiving in kernel mode the original reply message sent by the destination end comprises: 若所述目的端的原端口发送的所述原始回复报文为TCP协议的同步确认报文,则切换对所述目的端的其他端口进行网络质量检测,直至从切换的所述其他端口接收到TCP协议的重置报文。If the original reply message sent by the original port of the destination end is a synchronization confirmation message of the TCP protocol, the network quality detection of other ports of the destination end is switched until a reset message of the TCP protocol is received from the other switched ports. 10.一种网络质量检测的装置,其特征在于,包括:10. A network quality detection device, comprising: 第一判断单元,用于在内核态接收目的端发送的原始回复报文,判断所述原始回复报文携带的第三属性信息是否符合预设过滤条件;A first judgment unit is used to receive the original reply message sent by the destination end in the kernel state, and judge whether the third attribute information carried by the original reply message meets the preset filtering condition; 确定单元,用于在确定所述第三属性信息符合所述预设过滤条件时,确定所述原始回复报文为所述目标回复报文;A determination unit, configured to determine that the original reply message is the target reply message when it is determined that the third attribute information meets the preset filtering condition; 第一传输单元,用于将所述目标回复报文从所述内核态传输至用户态;A first transmission unit, used for transmitting the target reply message from the kernel state to the user state; 第二判断单元,用于判断所述目标回复报文携带的第一属性信息与目标测量报文携带的第二属性信息是否相同;A second judgment unit, configured to judge whether the first attribute information carried by the target reply message is the same as the second attribute information carried by the target measurement message; 第一计算单元,用于在确定所述第一属性信息与所述第二属性信息相同时,对所述目标测量报文发出的第一时间戳和接收所述目标回复报文的第二时间戳进行往返时延计算,得到往返时延计算结果;A first calculation unit is used to calculate the round-trip delay of a first timestamp sent by the target measurement message and a second timestamp received by the target reply message when it is determined that the first attribute information is the same as the second attribute information, so as to obtain a round-trip delay calculation result; 第一存储单元,用于对所述往返时延计算结果进行存储;A first storage unit, used to store the round-trip delay calculation result; 第二计算单元,用于在确定存储的所述往返时延计算结果的数量满足预设数量条件时,对存储的全部往返时延计算结果进行计算,得到网络质量分数。The second calculation unit is used to calculate all the stored round-trip delay calculation results to obtain a network quality score when it is determined that the number of the stored round-trip delay calculation results meets a preset number condition. 11.一种电子设备,其特征在于,包括:11. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-9中任一项所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9. 12.一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行根据权利要求1-9中任一项所述的方法。12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9. 13.一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-9中任一项所述的方法。13. A computer program product, characterized in that it comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 9.
CN202410984570.2A 2024-07-22 2024-07-22 Network quality detection method, device, electronic device and storage medium Pending CN118714039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410984570.2A CN118714039A (en) 2024-07-22 2024-07-22 Network quality detection method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410984570.2A CN118714039A (en) 2024-07-22 2024-07-22 Network quality detection method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN118714039A true CN118714039A (en) 2024-09-27

Family

ID=92807807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410984570.2A Pending CN118714039A (en) 2024-07-22 2024-07-22 Network quality detection method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118714039A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110219112A1 (en) * 2010-03-08 2011-09-08 Microsoft Corporation Detection of end-to-end transport quality
US20130067018A1 (en) * 2011-09-13 2013-03-14 Patrick A. Reynolds Methods and computer program products for monitoring the contents of network traffic in a network device
CN110138590A (en) * 2019-04-09 2019-08-16 上海交通大学 A kind of general TCP performance diagnogtics method and device
CN116192694A (en) * 2023-03-03 2023-05-30 中国互联网络信息中心 Time delay measurement method and related device
CN118316567A (en) * 2023-01-06 2024-07-09 华为技术有限公司 Message transmission method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110219112A1 (en) * 2010-03-08 2011-09-08 Microsoft Corporation Detection of end-to-end transport quality
US20130067018A1 (en) * 2011-09-13 2013-03-14 Patrick A. Reynolds Methods and computer program products for monitoring the contents of network traffic in a network device
CN110138590A (en) * 2019-04-09 2019-08-16 上海交通大学 A kind of general TCP performance diagnogtics method and device
CN118316567A (en) * 2023-01-06 2024-07-09 华为技术有限公司 Message transmission method and device
CN116192694A (en) * 2023-03-03 2023-05-30 中国互联网络信息中心 Time delay measurement method and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
时翠霞 等: "网络数据报文捕获技术分析和研究", 微计算机信息, no. 21, 25 July 2009 (2009-07-25) *

Similar Documents

Publication Publication Date Title
WO2020143180A1 (en) Network congestion detection-based intelligent speed limiting method and apparatus, and storage medium
CN113726607B (en) Network detection method and device, electronic equipment and storage medium
CN111327471A (en) Network quality analysis method and device, computer equipment and storage medium
WO2015182629A1 (en) Monitoring system, monitoring device, and monitoring program
CN116303173B (en) Method, device, system and chip for reducing RDMA engine on-chip cache
CN109842511B (en) A method and system for determining TCP performance parameters
US12309068B2 (en) Method for network transmission for detecting unnecessary reduction of bandwidth, device, and storage medium
CN118590932A (en) A network congestion control method, device, equipment, medium and product
CN120110922A (en) Network data flow relationship diagram generation method, device, electronic device and readable medium
CN118714039A (en) Network quality detection method, device, electronic device and storage medium
CN113360382A (en) Test method, device, equipment and storage medium
CN115865734B (en) Fault detection method, data generation method, device, equipment and medium
CN115484210B (en) Congestion window determining method, device and system
CN116489110A (en) A routing data packet verification method, device, chip and storage medium
CN115914037B (en) Network delay detection method, device and computer-readable storage medium
CN116319397A (en) Method, device and storage medium for acquiring user network behavior portraits
CN112436982B (en) A network traffic automatic mixed running test method, system, terminal and storage medium
CN114567687A (en) Message forwarding method, device, equipment, medium and program product
CN118337341A (en) Device communication method, device, electronic device and storage medium
CN117156398B (en) Message processing method, device, electronic equipment and storage medium
CN119967480A (en) A 5G signaling traffic deduplication method, device, equipment and medium
CN115733810B (en) Data forwarding method, device, equipment and storage medium
CN118075359A (en) Data packet method and device based on CAN communication, electronic equipment and medium
CN119629251A (en) Service access method, device, system, equipment, storage medium and program product
CN120128503A (en) Data detection method, device, equipment, medium and product

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