CN113411236B - Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium - Google Patents
Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium Download PDFInfo
- Publication number
- CN113411236B CN113411236B CN202110702747.1A CN202110702747A CN113411236B CN 113411236 B CN113411236 B CN 113411236B CN 202110702747 A CN202110702747 A CN 202110702747A CN 113411236 B CN113411236 B CN 113411236B
- Authority
- CN
- China
- Prior art keywords
- router
- information
- quality
- model
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 148
- 230000004927 fusion Effects 0.000 claims abstract description 40
- 238000003066 decision tree Methods 0.000 claims description 51
- 238000000034 method Methods 0.000 claims description 44
- 238000012549 training Methods 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 13
- 230000009467 reduction Effects 0.000 claims description 8
- 230000006855 networking Effects 0.000 claims description 7
- 238000011156 evaluation Methods 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 3
- 238000004891 communication Methods 0.000 abstract description 14
- 238000004422 calculation algorithm Methods 0.000 description 23
- 230000008569 process Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000007637 random forest analysis Methods 0.000 description 3
- 239000013589 supplement Substances 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 229920006395 saturated elastomer Polymers 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/24323—Tree-organised classifiers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/08—Testing, supervising or monitoring using real traffic
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明属于通信技术领域,公开了一种质差路由器检测方法、装置、设备及存储介质。本发明通过在接收到质差检测指令时,根据质差检测指令确定待检测路由器;采集待检测路由器的下挂设备信息、上联状态信息及收发报文信息;根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息;基于待检测特征信息,通过预设质差检测模型对待检测路由器进行质差检测,以获得质差检测结果。由于在检测质差路由器时并非经验化判断,避免了大量误判的现象,且预设质差检测模型为预先训练的融合模型,检测准确度高且不必实时构建,可快速准确的检测路由器是否为质差路由器并确定路由器质差原因,然后输出质差检测结果。
The invention belongs to the technical field of communication, and discloses a detection method, device, equipment and storage medium of a poor quality router. The invention determines the router to be detected according to the quality poor detection instruction when receiving the quality poor detection instruction; collects the information of the attached device, the uplink state information and the information of the sending and receiving messages of the router to be detected; The status information and the information of the sent and received messages construct the feature information to be detected; based on the feature information to be detected, the router to be detected is subjected to poor quality detection through a preset poor quality detection model to obtain a poor quality detection result. Since the detection of poor quality routers is not empirical judgment, a large number of misjudgments are avoided, and the preset poor quality detection model is a pre-trained fusion model, which has high detection accuracy and does not need to be constructed in real time. It can quickly and accurately detect whether a router is Identify the poor quality router and determine the reason for the poor quality of the router, and then output the poor quality detection result.
Description
技术领域technical field
本发明涉及通信技术领域,尤其涉及一种质差路由器检测方法、装置、设备及存储介质。The present invention relates to the field of communication technologies, and in particular, to a method, device, device and storage medium for detecting poor quality routers.
背景技术Background technique
通信运营商常因信号较差而被客户投诉,而其中很大一部分是因质差路由器导致的信号较差,例如:很多家庭的路由器多年未曾替换,路由器型号老旧,支持的无线速率较低,网速缓慢,从而导致用户投诉;部分路由器使用年限已经超过使用寿命标准,网速缓慢,从而导致用户投诉;部分路由器同时连接用户数量较多,单个用户的网速缓慢,从而导致用户投诉。Communication operators are often complained by customers because of poor signals, and a large part of them are poor signals caused by poor quality routers. For example, the routers in many homes have not been replaced for many years, the routers are old models, and the supported wireless rates are low. , the network speed is slow, resulting in user complaints; some routers have exceeded the service life standard, and the network speed is slow, resulting in user complaints; some routers have a large number of simultaneous users, and the network speed of a single user is slow, resulting in user complaints.
目前对于质差路由器的检测方式主要分为两种,一种是通过路由器上市时间和网络速率判定当前路由器是否为质差路由器,另一种是采用数据挖掘的方法对检测的数据进行分类,利用大量数据构建质差路由器特征库,利用特征库判别路由器是否为质差路由器。At present, there are two main detection methods for poor quality routers. One is to determine whether the current router is a poor quality router based on the router's time to market and network speed. The other is to use data mining to classify the detected data. A large amount of data is used to construct a feature library of poor-quality routers, and the feature library is used to determine whether a router is a poor-quality router.
第一种质差路由器的检测方式缺点十分明显:标准过于经验化,可能会将大量速率还符合签约速度且运行稳定的路由器误判为质差路由器;针对不同的型号,不同的场景,难以分析质差路由器网络速率情况;无法确定导致路由器质差的具体原因。The shortcomings of the first detection method of poor quality routers are very obvious: the standard is too empirical, and a large number of routers whose speed still meets the contract speed and are stable in operation may be misjudged as poor quality routers; for different models and different scenarios, it is difficult to analyze Poor quality router network speed; it is impossible to determine the specific cause of the poor router quality.
第二种质差路由器的检测方式需要提前构建特征库,需要采集大量的数据,耗费大量的服务器资源构建特征库,对通信运营商各省分公司的数据源完备性和服务器资源的充足性具有极高的要求,实现难度大、成本高,且由于需要消耗大量服务器资源构建特征库,整体流程耗时较长,难以满足实时判定的需求。The second detection method of poor-quality routers needs to build a signature database in advance, needs to collect a large amount of data, and consumes a lot of server resources to build a signature database, which is extremely important for the completeness of data sources and the sufficiency of server resources for the provincial branches of communication operators. High requirements are difficult and costly to implement, and since a large amount of server resources are required to build a feature library, the overall process takes a long time, and it is difficult to meet the needs of real-time judgment.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist the understanding of the technical solutions of the present invention, and does not mean that the above content is the prior art.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提供一种质差路由器检测方法、装置、设备及存储介质,旨在解决现有技术无法快速准确的检测质差路由器的技术问题。The main purpose of the present invention is to provide a detection method, device, equipment and storage medium for poor quality routers, aiming to solve the technical problem that the prior art cannot detect poor quality routers quickly and accurately.
为实现上述目的,本发明提供了一种质差路由器检测方法,所述方法包括以下步骤:To achieve the above object, the invention provides a kind of poor quality router detection method, described method comprises the following steps:
在接收到质差检测指令时,根据所述质差检测指令确定待检测路由器;When receiving the poor quality detection instruction, determine the router to be detected according to the poor quality detection instruction;
采集所述待检测路由器的下挂设备信息、上联状态信息及收发报文信息;Collect the information of the connected devices, the uplink status information and the information of the sent and received packets of the router to be detected;
根据所述下挂设备信息、所述上联状态信息及所述收发报文信息构建待检测特征信息;constructing feature information to be detected according to the downlink device information, the uplink status information, and the sent and received message information;
基于所述待检测特征信息,通过预设质差检测模型对所述待检测路由器进行质差检测,以获得质差检测结果。Based on the feature information to be detected, quality poor detection is performed on the router to be detected by using a preset quality poor detection model to obtain a poor quality detection result.
可选的,所述在接收到质差检测指令时,根据所述质差检测指令确定待检测路由器的步骤之前,还包括:Optionally, before the step of determining the router to be detected according to the quality difference detection instruction when the quality difference detection instruction is received, the method further includes:
获取预设样本库中存储的数据样本,并根据所述数据样本构建数据样本集;acquiring data samples stored in the preset sample library, and constructing a data sample set according to the data samples;
根据所述数据样本集对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型;Perform multiple training on the first type of initial model in the initial model set according to the data sample set to obtain multiple target decision tree models;
根据所述数据样本集对所述初始模型集中其他类型初始模型进行训练,以获得多个待融合模型;Perform training on other types of initial models in the initial model set according to the data sample set to obtain multiple models to be fused;
将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。Model fusion is performed on the multiple target decision tree models and the multiple models to be fused to obtain a preset quality poor detection model.
可选的,所述获取预设样本库中存储的数据样本,并根据所述数据样本构建数据样本集的步骤之前,还包括:Optionally, before the step of acquiring the data samples stored in the preset sample library and constructing a data sample set according to the data samples, the method further includes:
通过智能组网平台周期性采集各平台用户的路由器运行信息;Periodically collect the router operation information of users of each platform through the intelligent networking platform;
根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。A data sample is constructed according to the router operation information, and the data sample is stored in a preset sample library.
可选的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤之前,还包括:Optionally, before the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library, the method further includes:
检测所述路由器运行信息是否缺失数据;Detecting whether the router operation information is missing data;
在所述路由器运行信息缺失数据时,获取所述路由器运行信息对应的历史运行信息;When the router operation information is missing data, obtain historical operation information corresponding to the router operation information;
根据所述历史运行信息对所述路由器运行信息进行数据补全,以获得补全后的路由器运行信息;Perform data completion on the router operation information according to the historical operation information to obtain the completed router operation information;
相应的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤,包括:Correspondingly, the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library includes:
根据所述补全后的路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。A data sample is constructed according to the completed router operation information, and the data sample is stored in a preset sample library.
可选的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤之前,还包括:Optionally, before the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library, the method further includes:
对所述路由器运行信息进行数据缩减,以获得缩减路由器信息;performing data reduction on the router operation information to obtain reduced router information;
相应的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤,包括:Correspondingly, the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library includes:
根据所述缩减路由器信息构建数据样本,并将所述数据样本存储至预设样本库中。A data sample is constructed according to the reduced router information, and the data sample is stored in a preset sample library.
可选的,所述根据所述数据样本集对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型的步骤,包括:Optionally, the step of performing multiple training on the first type of initial model in the initial model set according to the data sample set to obtain multiple target decision tree models includes:
根据所述数据样本集构建多个数据样本子集;constructing a plurality of data sample subsets according to the data sample set;
基于第一预设数量的随机种子及第二预设数量的特征子集,根据各个数据样本子集分别对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型。Based on the first preset number of random seeds and the second preset number of feature subsets, the first type of initial model in the initial model set is trained multiple times according to each data sample subset to obtain multiple target decision tree models.
可选的,所述将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型的步骤之前,还包括:Optionally, before the step of performing model fusion of the multiple target decision tree models and the multiple models to be fused to obtain a preset quality difference detection model, the method further includes:
以最大化模型评价分值为依据,确定各目标决策树模型及各待融合模型对应的模型融合权重;Based on the maximum model evaluation score, determine the model fusion weights corresponding to each target decision tree model and each model to be fused;
相应的,所述将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型的步骤,包括:Correspondingly, the step of performing model fusion of the multiple target decision tree models and the multiple models to be fused to obtain a preset quality poor detection model includes:
基于所述模型融合权重,将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。Based on the model fusion weight, model fusion is performed on the multiple target decision tree models and the multiple models to be fused to obtain a preset quality difference detection model.
此外,为实现上述目的,本发明还提出一种质差路由器检测装置,所述质差路由器检测装置包括以下模块:In addition, in order to achieve the above purpose, the present invention also provides a poor quality router detection device, the poor quality router detection device includes the following modules:
指令响应模块,用于在接收到质差检测指令时,根据所述质差检测指令确定待检测路由器;an instruction response module, configured to determine the router to be detected according to the quality difference detection instruction when receiving the quality difference detection instruction;
信息获取模块,用于采集所述待检测路由器的下挂设备信息、上联状态信息及收发报文信息;an information acquisition module, which is used to collect the information of the attached device, the uplink status information and the information of the sent and received packets of the router to be detected;
信息构建模块,用于根据所述下挂设备信息、所述上联状态信息及所述收发报文信息构建待检测特征信息;an information construction module, configured to construct feature information to be detected according to the down-connected device information, the uplink status information and the sent and received message information;
质差检测模块,用于基于所述待检测特征信息,通过预设质差检测模型对所述待检测路由器进行质差检测,以获得质差检测结果。The quality difference detection module is configured to perform quality difference detection on the router to be detected by using a preset quality difference detection model based on the feature information to be detected, so as to obtain a quality difference detection result.
此外,为实现上述目的,本发明还提出一种质差路由器检测设备,所述质差路由器检测设备包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的质差路由器检测程序,所述质差路由器检测程序被处理器执行时实现如上所述的质差路由器检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides a poor-quality router detection device, the poor-quality router detection device includes: a processor, a memory, and a quality device stored in the memory and running on the processor. A poor router detection program, when the poor router detection program is executed by the processor, implements the steps of the above-described poor router detection method.
此外,为实现上述目的,本发明还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有质差路由器检测程序,所述质差路由器检测程序执行时实现如上所述的质差路由器检测方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, where a poor-quality router detection program is stored on the computer-readable storage medium, and when the poor-quality router detection program is executed, the above-mentioned quality The steps of the poor router detection method.
本发明通过在接收到质差检测指令时,根据质差检测指令确定待检测路由器;采集待检测路由器的下挂设备信息、上联状态信息及收发报文信息;根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息;基于待检测特征信息,通过预设质差检测模型对待检测路由器进行质差检测,以获得质差检测结果。由于在检测质差路由器时并非经验化判断,避免了大量误判的现象,且预设质差检测模型为预先训练的融合模型,检测准确度高且不必实时构建,可快速准确的检测路由器是否为质差路由器并确定路由器质差原因,然后输出质差检测结果,用户或通信运营商服务人员可根据质差检测结果明确待检测路由器是否为质差路由器,且在待检测路由器为质差路由器时明确质差原因,以便于进行后续处理。The invention determines the router to be detected according to the quality poor detection instruction when receiving the quality poor detection instruction; collects the information of the attached device, the uplink state information and the information of the sending and receiving messages of the router to be detected; The status information and the information of the sent and received messages construct the feature information to be detected; based on the feature information to be detected, the router to be detected is subjected to poor quality detection through a preset poor quality detection model to obtain a poor quality detection result. Since the detection of poor quality routers is not empirical judgment, a large number of misjudgments are avoided, and the preset poor quality detection model is a pre-trained fusion model, which has high detection accuracy and does not need to be constructed in real time. It can quickly and accurately detect whether a router is It is a poor router and determines the reason for the poor quality of the router, and then outputs the poor quality detection result. The user or the service personnel of the communication operator can determine whether the router to be tested is a poor quality router according to the poor quality detection result, and if the router to be detected is a poor quality router The reasons for the poor quality are clearly identified at the same time, so as to facilitate the follow-up processing.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的电子设备的结构示意图;1 is a schematic structural diagram of an electronic device of a hardware operating environment involved in an embodiment of the present invention;
图2为本发明质差路由器检测方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a poor quality router detection method according to the present invention;
图3为本发明质差路由器检测方法第二实施例的流程示意图;3 is a schematic flowchart of a second embodiment of a poor quality router detection method according to the present invention;
图4为本发明质差路由器检测方法一实施例的模型参数调优过程示意图;4 is a schematic diagram of a model parameter tuning process according to an embodiment of the poor quality router detection method of the present invention;
图5为本发明只差路由器检测方法一实施例的模型融合示意图;FIG. 5 is a schematic diagram of model fusion according to an embodiment of a method for detecting only poor routers according to the present invention;
图6为本发明质差路由器检测装置第一实施例的结构框图。FIG. 6 is a structural block diagram of a first embodiment of a poor quality router detection apparatus according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
参照图1,图1为本发明实施例方案涉及的硬件运行环境的质差路由器检测设备结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of a poor quality router detection device of a hardware operating environment involved in an embodiment of the present invention.
如图1所示,该电子设备可以包括:处理器1001,例如中央处理器(CentralProcessing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(Wireless-Fidelity,WI-FI)接口)。存储器1005可以是高速的随机存取存储器(RandomAccess Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the electronic device may include: a
本领域技术人员可以理解,图1中示出的结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or arrange different components.
如图1所示,作为一种存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及质差路由器检测程序。As shown in FIG. 1 , the
在图1所示的电子设备中,网络接口1004主要用于与网络服务器进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明电子设备中的处理器1001、存储器1005可以设置在质差路由器检测设备中,所述电子设备通过处理器1001调用存储器1005中存储的质差路由器检测程序,并执行本发明实施例提供的质差路由器检测方法。In the electronic device shown in FIG. 1, the
本发明实施例提供了一种质差路由器检测方法,参照图2,图2为本发明一种质差路由器检测方法第一实施例的流程示意图。An embodiment of the present invention provides a method for detecting poor quality routers. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a first embodiment of a method for detecting poor quality routers according to the present invention.
本实施例中,所述质差路由器检测方法包括以下步骤:In this embodiment, the method for detecting poor quality routers includes the following steps:
步骤S10:在接收到质差检测指令时,根据所述质差检测指令确定待检测路由器。Step S10: When receiving the quality difference detection instruction, determine the router to be detected according to the quality difference detection instruction.
需要说明的是,本实施例的执行主体可以是所述质差路由器检测设备,所述质差路由器检测设备可以是电脑、服务器等电子设备,还可以是其他功能相同或相似的设备,本实施例对此不加以限制,在本实施例及下述各实施例中,以质差路由器检测设备为例对本发明质差路由器检测方法进行说明。It should be noted that the execution subject of this embodiment may be the poor-quality router detection device, and the poor-quality router detection device may be an electronic device such as a computer or a server, or may be other devices with the same or similar functions. The example is not limited to this. In this embodiment and the following embodiments, a poor-quality router detection device is used as an example to describe the poor-quality router detection method of the present invention.
需要说明的是,质差检测指令可以是其他设备发送至所述质差路由器检测设备的指令,质差路由器检测指令中可以带有路由器标识,根据质差检测指令确定待检测路由器可以是提取质差检测指令中的路由器标识,根据路由器标识查找待检测路由器。It should be noted that the poor-quality detection instruction may be an instruction sent by other devices to the poor-quality router detection device, and the poor-quality router detection instruction may carry a router identifier. According to the poor-quality detection instruction, it is determined that the router to be detected may be an extracted quality router. The router identifier in the difference detection instruction is used to find the router to be detected according to the router identifier.
步骤S20:采集所述待检测路由器的下挂设备信息、上联状态信息及收发报文信息。Step S20: Collect the information of the attached device, the uplink state information and the information of the sent and received packets of the router to be detected.
需要说明的是,下挂设备可以是接入待检测路由器上的设备,例如:手机、电脑、平板电脑等电子设备。下挂设备信息可以包括:下挂设备的MAC地址、已连接时长、接入频段取值(2.4G或5G)、信号强度、当前的协商接收速率和发送速率、上行的实时接收速率和发送速率等信息,通过下挂设备信息可以反应待检测路由器的使用情况、频段偏好及下挂设备的WI-FI质量信息。上联状态信息可以包括:上联使用的管理MAC地址、WLAN上联时使用的频段(2.4G或5G)、上联时的上联信号强度、上行的协商接收速率和发送速率、上行的实时接收速率和发送速率等信息,通过上联状态信息可以反应路由器上联的网关设备的运行状态,可以用来辅助判定路由器质差的原因。收发报文信息可以包括:总发送字节数和接收字节数、总发送包数和接收包数、发送出错的包数和接收的错误包数、发送和接收时丢弃的包数等信息,通过收发报文信息可以综合反应路由器的历史运行情况,可以作为下挂设备信息此类实时性数据的补充,对于分析现有运行状况与历史运行状况进行对比有很大帮助。It should be noted that the hanging device may be a device connected to the router to be detected, such as an electronic device such as a mobile phone, a computer, and a tablet computer. The information of the attached device can include: the MAC address of the attached device, the connection duration, the value of the access frequency band (2.4G or 5G), the signal strength, the current negotiated reception rate and transmission rate, and the real-time uplink reception rate and transmission rate. and other information, the use of the router to be detected, the frequency band preference and the WI-FI quality information of the connected device can be reflected through the information of the connected device. The uplink status information can include: the management MAC address used in the uplink, the frequency band (2.4G or 5G) used for the WLAN uplink, the uplink signal strength during the uplink, the negotiated reception rate and transmission rate of the uplink, and the real-time uplink Information such as the receiving rate and the sending rate can reflect the running status of the gateway device connected to the router through the uplink status information, which can be used to assist in determining the reason for the poor quality of the router. The information of sending and receiving messages can include: the total number of bytes sent and received, the total number of packets sent and received, the number of error packets sent and the number of error packets received, the number of packets discarded during transmission and reception, and other information. By sending and receiving message information, it can comprehensively reflect the historical operation of the router, which can be used as a supplement to real-time data such as information on connected devices.
步骤S30:根据所述下挂设备信息、所述上联状态信息及所述收发报文信息构建待检测特征信息。Step S30: Constructing feature information to be detected according to the information of the connected device, the information of the uplink state, and the information of the sent and received packets.
可以理解的是,待检测特征信息是用于输入预设质差检测模型进行分析的数据,预设质差检测模型对于输入的数据可能会有格式要求,因此,可以根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息,以便于通过预设质差检测模型进行质差检测。It can be understood that the feature information to be detected is the data used to input the preset quality difference detection model for analysis, and the preset quality difference detection model may have format requirements for the input data. The feature information to be detected is constructed based on the connection status information and the message information sent and received, so that the quality difference detection can be carried out through the preset quality difference detection model.
在实际使用中,根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息可以是对下挂设备信息、上联状态信息及收发报文信息进行特征提取,根据提取的特征信息构建待检测特征信息。In actual use, constructing the feature information to be detected according to the information of the connected device, the information of the uplink state and the information of the sent and received messages may be to extract the features of the information of the connected device, the information of the connected state and the information of the sent and received messages, according to the extracted features. The information constructs the feature information to be detected.
步骤S40:基于所述待检测特征信息,通过预设质差检测模型对所述待检测路由器进行质差检测,以获得质差检测结果。Step S40: Based on the feature information to be detected, perform a quality difference detection on the router to be detected by using a preset quality difference detection model to obtain a quality difference detection result.
需要说明的是,预设质差检测模型可以是由多个基础模型融合得到的,其中,多个基础模型可以是对多个不同算法模型进行训练得到的,预设质差检测模型可以由管理人员预先进行设置。预设质差检测模型可以根据输入的待检测特征信息确定待检测路由器是否为质差路由器,并输出相应的的质差检测结果。质差检测结果可以包括质差路由器判定结果及路由器质差原因,其中质差路由器判定结果可以使用0或1表示,其中,0表示判定为非质差路由器,1表示判定为质差路由器,路由器质差原因可以包括WiFi覆盖问题(下挂设备WiFi信号弱)、WiFi干扰问题(2.4G/5G同频干扰过大)、WiFi配置问题(网关/路由器参数配置不合理)、WiFi使用问题(下挂设备数量过多、带宽使用饱和)等。It should be noted that the preset quality difference detection model may be obtained by fusing multiple basic models, wherein the multiple basic models may be obtained by training multiple different algorithm models, and the preset quality difference detection model may be managed by Personnel pre-set. The preset poor quality detection model may determine whether the router to be detected is a poor quality router according to the input feature information to be detected, and output a corresponding poor quality detection result. The poor quality detection result can include the judgment result of the poor quality router and the reason for the poor quality of the router, wherein the judgment result of the poor quality router can be represented by 0 or 1, where 0 indicates that the router is not of poor quality, 1 indicates that the router is judged to be of poor quality, and the router is of poor quality. The reasons for poor quality can include WiFi coverage problems (weak WiFi signal of the connected device), WiFi interference problems (excessive 2.4G/5G co-channel interference), WiFi configuration problems (unreasonable gateway/router parameter configuration), WiFi usage problems (below The number of hanging devices is too large, the bandwidth usage is saturated), etc.
可以理解的是,质差路由器检测设备在确定质差检测结果之后还可以将质差检测结果进行展示,以便于用户或通信运营商服务人员明确待检测路由器是否为质差路由器,且在待检测路由器为质差路由器时明确质差原因,以便于进行后续处理。It is understandable that the poor-quality router detection device can also display the poor-quality detection results after determining the poor-quality detection results, so that users or service personnel of communication operators can determine whether the routers to be detected are poor-quality routers, and the routers to be detected are of poor quality. When the router is a poor quality router, clarify the reason for the poor quality, so as to facilitate subsequent processing.
本实施例通过在接收到质差检测指令时,根据质差检测指令确定待检测路由器;采集待检测路由器的下挂设备信息、上联状态信息及收发报文信息;根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息;基于待检测特征信息,通过预设质差检测模型对待检测路由器进行质差检测,以获得质差检测结果。由于在检测质差路由器时并非经验化判断,避免了大量误判的现象,且预设质差检测模型为预先训练的融合模型,检测准确度高且不必实时构建,可快速准确的检测路由器是否为质差路由器并确定路由器质差原因,然后输出质差检测结果,用户或通信运营商服务人员可根据质差检测结果明确待检测路由器是否为质差路由器,且在待检测路由器为质差路由器时明确质差原因,以便于进行后续处理。In this embodiment, when a quality-bad detection instruction is received, the router to be detected is determined according to the quality-bad detection instruction; Based on the feature information to be detected, the router to be detected is subjected to poor quality detection through a preset poor quality detection model to obtain a poor quality detection result. Since the detection of poor quality routers is not empirical judgment, a large number of misjudgments are avoided, and the preset poor quality detection model is a pre-trained fusion model, which has high detection accuracy and does not need to be constructed in real time. It can quickly and accurately detect whether a router is It is a poor router and determines the reason for the poor quality of the router, and then outputs the poor quality detection result. The user or the service personnel of the communication operator can determine whether the router to be tested is a poor quality router according to the poor quality detection result, and if the router to be detected is a poor quality router The reasons for the poor quality are clearly identified at the same time, so as to facilitate the follow-up processing.
参考图3,图3为本发明一种质差路由器检测方法第二实施例的流程示意图。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a second embodiment of a poor quality router detection method according to the present invention.
基于上述第一实施例,本实施例质差路由器检测方法在所述步骤S10之前,还包括:Based on the above-mentioned first embodiment, before the step S10, the method for detecting a poor-quality router in this embodiment further includes:
步骤S01:获取预设样本库中存储的数据样本,并根据所述数据样本构建数据样本集。Step S01: Acquire data samples stored in a preset sample library, and construct a data sample set according to the data samples.
需要说明的是,预设样本库可以是预先设置的用于存储数据样本的数据库,其中可以存储有大量根据预先采集的路由器运行信息构建的数据样本。数据样本可以包括路由器运行信息及人工标记的信息标签,信息标签可以包括是否为质差路由器及路由器质差原因等。获取预设样本库中存储的数据样本,并根据数据样本构建数据样本集可以是在预设样本库中获取预设样本数量的数据样本,并根据获取的数据样本组合构建数据样本集。其中,预设样本数量可以由管理人员根据实际需要进行设置,例如:将预设样本数量设置为10000。It should be noted that the preset sample library may be a preset database for storing data samples, and a large number of data samples constructed according to pre-collected router operation information may be stored therein. The data samples may include router operation information and manually marked information labels, and the information labels may include whether the router is of poor quality and the reasons for the poor quality of the router. Acquiring data samples stored in a preset sample library and constructing a data sample set based on the data samples may be acquiring a preset number of data samples in the preset sample library, and constructing a data sample set according to a combination of the acquired data samples. The preset number of samples can be set by the administrator according to actual needs, for example, the preset number of samples is set to 10,000.
在实际使用中,考虑到数据的时效性,在从预设样本库中获取数据样本时可以尽可能采用新添加至预设样本库中的数据样本。In actual use, considering the timeliness of data, data samples newly added to the preset sample library may be used as much as possible when acquiring data samples from the preset sample library.
进一步地,为了减少人力成本,本实施例步骤S01之前,还可以包括:Further, in order to reduce labor costs, before step S01 in this embodiment, it may further include:
通过智能组网平台周期性采集各平台用户的路由器运行信息;根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。The router operation information of each platform user is periodically collected through the intelligent networking platform; data samples are constructed according to the router operation information, and the data samples are stored in a preset sample library.
需要说明的是,路由器运行信息可以包括路由器的下挂设备信息、上联状态信息和收发报文信息等信息,智能组网平台可以是通信运营商设置的网络管理平台,各平台用户的路由器均连接在智能组网平台上,智能组网平台可以通过约定的协议与路由器保持心跳连接,可以通过轮询任务和反向触发与平台用户的路由器建立连接,周期性采集各平台路由器的路由器运行信息,由于不需人工采集路由器运行信息,可以在一定程度上减少人力成本。It should be noted that the router operation information may include information such as the information of the devices attached to the router, the connection status information, and the information of sending and receiving messages. The intelligent networking platform may be the network management platform set by the communication operator. The routers of users of each platform are Connected to the intelligent networking platform, the intelligent networking platform can maintain a heartbeat connection with the router through the agreed protocol, and can establish a connection with the router of the platform user through polling tasks and reverse triggering, and periodically collect the router operation information of each platform router. , since there is no need to manually collect router operation information, labor costs can be reduced to a certain extent.
可以理解的是,在获取到路由器运行信息之后,可能管理人员并无时间对采集的路由器运行信息进行进一步处理,因此,还可以将路由器运行信息保存在预设的数据库中,后续可从数据库中读取路由器运行信息进行进一步处理。It can be understood that after obtaining the router operation information, the administrator may not have time to further process the collected router operation information. Therefore, the router operation information can also be saved in a preset database, and can be retrieved from the database later. Read router operation information for further processing.
需要说明的是,根据路由器运行信息构建数据样本可以是通过人工对路由器运行信息进行分析,确定是否为质差路由器,并确定质差原因,并确定信息标签,然后对路由器运行信息进行特征提取,获得特征信息,在根据特征信息及信息标签构建数据样本。It should be noted that, constructing data samples according to the router operation information can be performed by manually analyzing the router operation information to determine whether it is a poor quality router, determine the reason for the poor quality, and determine the information label, and then perform feature extraction on the router operation information. Obtain feature information, and construct data samples according to feature information and information labels.
进一步地,由于在采集数据过程中可能有各种因素影响,从而导致采集的路由器运行信息中可能会缺失部分数据,若不加以处理直接以此数据构建数据样本,则可能会降低根据此数据样本训练的模型的精度和泛化能力,而若是直接将缺失数据的路由器运行信息删除,则可能会导致数据不全,为了克服上述缺陷,本实施例所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤之前,还可以包括:Further, due to the influence of various factors in the process of data collection, some data may be missing in the collected router operation information. The accuracy and generalization ability of the trained model, but if the router operation information of the missing data is directly deleted, the data may be incomplete. Before the step of storing the data samples in the preset sample library, it may also include:
检测所述路由器运行信息是否缺失数据;在所述路由器运行信息缺失数据时,获取所述路由器运行信息对应的历史运行信息;根据所述历史运行信息对所述路由器运行信息进行数据补全,以获得补全后的路由器运行信息;Detecting whether the router operation information is missing data; when the router operation information is missing data, obtain historical operation information corresponding to the router operation information; perform data completion on the router operation information according to the historical operation information, to Obtain the completed router operation information;
相应的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤,可以包括:Correspondingly, the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library may include:
根据所述补全后的路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。A data sample is constructed according to the completed router operation information, and the data sample is stored in a preset sample library.
需要说明的是,检测路由器运行信息是否确实数据可以是将路由器运行信息中各数据字段与预设需采集的数据字段进行比对,确实是否存在字段缺失,若存在字段缺失则可以判定缺失数据,若不存在字段缺失,则还可以获取各字段对应的数值,判断各字段对应的数值是否存在,若有字段对应的数值不存在或有字段对应的数值为空(null),则也可以判定缺失数据。It should be noted that, to detect whether the router operation information is real data, the data fields in the router operation information can be compared with the preset data fields to be collected, and whether there is a field missing, if there is a missing field, the missing data can be determined. If there is no missing field, you can also obtain the value corresponding to each field, and determine whether the value corresponding to each field exists. data.
需要说明的是,在对数据进行补全时,一般有两种方式,第一种是使用算法预测数据中缺失部分的值,根据预测的值对缺失部分数据进行填充,例如:通过决策树算法或朴素贝叶斯等算法对数据进行预测,根据预测的值对缺失值进行补充;第二种则是采用平均值代替缺失值,例如:获取该次数据前几次采集的数据及后几次采集的数据,计算多次数据的平均值,根据平均值进行补充。It should be noted that when completing data, there are generally two ways. The first is to use an algorithm to predict the value of the missing part of the data, and fill in the missing part of the data according to the predicted value, for example: through the decision tree algorithm Or naive Bayes and other algorithms to predict the data, and supplement the missing values according to the predicted values; the second is to use the average value to replace the missing values, for example: obtain the data collected before and after the data. Collected data, calculate the average value of multiple data, and supplement according to the average value.
在实际使用中,可以获取路由器运行信息对应的历史运行信息,根据历史运行信息推测当前采集的路由器运行信息缺失部分的数据,并根据推测的数据对缺失数据进行补充。In actual use, the historical operation information corresponding to the router operation information can be obtained, the data of the missing part of the currently collected router operation information can be inferred according to the historical operation information, and the missing data can be supplemented according to the inferred data.
需要说明的是,由于本实施例涉及的数据主要为路由器运行信息,而路由器的速率等数据在短时间内一般不会有太多异常变化,即变化量较小,且下挂设备缺失数据一般占比不高,因此,也可以平均值代替缺失值,则此时可以获取缺失数据的路由器运行信息前几个周期采集的路由器运行信息及后几个周期采集的路由器运行信息,计算缺失数据部分的平均值,根据平均值对缺失数据进行补充。It should be noted that, because the data involved in this embodiment is mainly router operation information, and data such as the rate of the router generally does not change too much abnormally in a short period of time, that is, the amount of change is small, and the missing data of the attached device is generally The proportion is not high, therefore, the average value can also be used to replace the missing value, then the router operation information of the missing data can be obtained. The mean value of , and the missing data are supplemented according to the mean value.
进一步地,为了提高数据处理效率,本实施例所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤之前,还可以包括Further, in order to improve the data processing efficiency, before the steps of constructing data samples according to the router operation information and storing the data samples in the preset sample library described in this embodiment, the method may further include:
对所述路由器运行信息进行数据缩减,以获得缩减路由器信息;performing data reduction on the router operation information to obtain reduced router information;
相应的,所述根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中的步骤,包括:Correspondingly, the step of constructing a data sample according to the router operation information and storing the data sample in a preset sample library includes:
根据所述缩减路由器信息构建数据样本,并将所述数据样本存储至预设样本库中。A data sample is constructed according to the reduced router information, and the data sample is stored in a preset sample library.
需要说明的是,在数据量极大(百万级以上)的场景下,对数据分析和挖掘需要很长时间,十分消耗服务器性能和资源,因此,可以对采集的数据进行压缩,简化数据,数据缩减技术并不会对数据完整性造成影响,反而可以帮助提升数据质量,提高数据处理效率。It should be noted that in the scenario of a huge amount of data (above one million), it takes a long time to analyze and mine the data, which consumes a lot of server performance and resources. Therefore, the collected data can be compressed to simplify the data. Data reduction technology does not affect data integrity, but can help improve data quality and data processing efficiency.
在本实施例中数据缩减可以包括下述四种方式中的至少一种:In this embodiment, data reduction may include at least one of the following four ways:
(1)数据降维,删减路由器运行信息中一部分与路由器质差分析相关性很低或不相关的数据,例如:将下挂设备信息中下挂设备的MAC地址删除。(1) Data dimensionality reduction, delete part of the data in the router operation information that is very low or irrelevant to the router quality difference analysis, for example: delete the MAC address of the attached device in the attached device information.
(2)数据压缩,可以利用编码机制降低采集的路由器运行信息的数据大小。(2) Data compression, the data size of the collected router operation information can be reduced by using the coding mechanism.
(3)数据约减,使用较小的数据代替一些较大的数据。(3) Data reduction, using smaller data to replace some larger data.
(4)概念层次的生成,使用更高界别的属性或概念合并力度较小的数据,例如:将多个下挂设备的接收和发送速率整合为一个数据,而不是每个下挂设备对应一个接收和发送速率。(4) Generation of concept level, use higher-level attributes or concepts to combine less powerful data, for example: integrate the receiving and sending rates of multiple connected devices into one data, instead of the corresponding data of each connected device A receive and transmit rate.
步骤S02:根据所述数据样本集对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型。Step S02: Perform multiple training on the first type of initial model in the initial model set according to the data sample set to obtain multiple target decision tree models.
需要说明的是,初始模型集中可以存放有多个不同类型的初始模型,不同类型的初始模型可以是根据不同的算法构建的模型。其中,第一类型初始模型可以是根据梯度提升决策树(Gradient Boosting Decision Tree,GBDT)算法构建的模型,其中,梯度提升决策树算法是一种迭代决策树算法,其算法核心是通过多个弱学习器反复训练迭代,最后将多个弱学习器组合成一个强学习器,强学习器的性能相比单一弱学习器会有很大提升。It should be noted that the initial model set may store multiple initial models of different types, and the different types of initial models may be models constructed according to different algorithms. Among them, the first type of initial model may be a model constructed according to a gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) algorithm, wherein the gradient boosting decision tree algorithm is an iterative decision tree algorithm, and the core of the algorithm is to pass multiple weak The learner is repeatedly trained and iterated, and finally multiple weak learners are combined into a strong learner, and the performance of the strong learner will be greatly improved compared to a single weak learner.
进一步地,为了提升模型融合的效果,本实施例步骤S02,可以包括:Further, in order to improve the effect of model fusion, step S02 in this embodiment may include:
根据所述数据样本集构建多个数据样本子集;基于第一预设数量的随机种子及第二预设数量的特征子集,根据各个数据样本子集分别对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型。Build a plurality of data sample subsets according to the data sample set; based on the first preset number of random seeds and the second preset number of feature subsets, according to each data sample subset, the initial model set of the first type of initial model Do multiple trainings to obtain multiple target decision tree models.
需要说明的是,根据数据样本集构建多个数据样本子集可以是在数据样本集中选取预设子集样本数量的数据样本构建数据样本子集,可重复多次执行,其中,为了保证各个目标决策树模型的差异性,提升模型融合的效果,可以尽量保证各个数据样本子集中的数据样本的不同。It should be noted that, constructing multiple data sample subsets according to the data sample set may be to select data samples with a preset number of subset samples from the data sample set to construct a data sample subset, which can be executed repeatedly. The difference of the decision tree model can improve the effect of model fusion, and try to ensure that the data samples in each data sample subset are different.
需要说明的是,随机种子会影响决策树中单颗树考察的样本及分裂节点时选择的特征,在训练过程中固定随机种子,可以保证在随机种子不变的情况下得到的结果相同,特征子集可以是人工对特征分组设置的,用于表示采用数据样本中哪部分特征进行模型训练。第一预设数量和第二预设数量可以由管理人员根据实际需要进行设置,例如:将第一预设数量设置为30,第二预设数量设置为10。It should be noted that the random seed will affect the samples examined by a single tree in the decision tree and the features selected when splitting nodes. Fixing the random seed during the training process can ensure that the results are the same when the random seed remains unchanged. The subset can be set manually by grouping the features to indicate which part of the features in the data sample is used for model training. The first preset number and the second preset number can be set by the administrator according to actual needs, for example, the first preset number is set to 30, and the second preset number is set to 10.
在实际使用中,为了保证尽可能保证训练得到的各个目标决策树模型存在一定差异性,以便获取到最好的训练结果,各随机种子可以互不相同,各特征子集也互不相同。In actual use, in order to ensure that each target decision tree model obtained by training has a certain difference as much as possible, so as to obtain the best training results, each random seed can be different from each other, and each feature subset is also different from each other.
在实际使用中,第一类型初始模型可以为根据GBDT算法构建的模型,GBDT算法的各项参数如下表1中所示:In actual use, the first type of initial model can be a model constructed according to the GBDT algorithm. The parameters of the GBDT algorithm are shown in Table 1 below:
表1GBDT参数Table 1GBDT parameters
在实际训练过程中,对GBDT模型的参数调优过程可以如图4所示。In the actual training process, the parameter tuning process of the GBDT model can be shown in Figure 4.
在实际使用中,可以先在多个数据样本子集中选取一个数据样本子集,然后基于选取的数据样本子集根据第一预设数量的随机种子和第二预设数量的特征子集对第一类型初始模型进行训练,获得多个基学习器,然后将多个基学习器等比进行融合(由于采用的算法一致,准确性基本相似,因此可以根据投票法等比进行融合,而不用设置权重),从而获得一个目标决策树模型。重复上述步骤,即可根据多个数据样本子集获得多个目标决策树模型。In actual use, a data sample subset can be selected from multiple data sample subsets, and then based on the selected data sample subset, the first preset number of random seeds and the second preset number of feature subsets One type of initial model is trained, multiple base learners are obtained, and then multiple base learners are fused in equal proportions (because the algorithms used are consistent and the accuracy is basically similar, so they can be fused in proportion according to the voting method, without setting weights) to obtain a target decision tree model. By repeating the above steps, multiple target decision tree models can be obtained according to multiple data sample subsets.
例如:假设数据样本子集为A、B、C三个,随机种子有S1、S2、S3、S4共四个,特征子集有T1、T2、T3共3个,则可以先选取A数据样本子集,根据A及S1对第一类型初始模型进行训练,不断进行参数调整,获取基学习器A-S1,多次执行,即可获得A-S1、A-S2、A-S3、A-S4、A-T1、A-T2、A-T3共7个基学习器,然后将7个基学习器等比进行融合,即可获得数据样本子集对应的目标决策树模型MA,重复上述步骤,再获取MB及MC,即获得多个目标决策树模型。For example: Assuming that the data sample subsets are A, B, and C, the random seeds are S1, S2, S3, and S4, and the feature subsets are T1, T2, and T3, the A data sample can be selected first. Subset, the first type of initial model is trained according to A and S1, and the parameters are continuously adjusted to obtain the basic learner A-S1. After multiple executions, A-S1, A-S2, A-S3, A- S4, A-T1, A-T2, A-T3 have a total of 7 basic learners, and then fuse the 7 basic learners in equal proportions to obtain the target decision tree model MA corresponding to the subset of data samples, and repeat the above steps , and then obtain MB and MC to obtain multiple target decision tree models.
步骤S03:根据所述数据样本集对所述初始模型集中其他类型初始模型进行训练,以获得多个待融合模型。Step S03: Train other types of initial models in the initial model set according to the data sample set to obtain a plurality of models to be fused.
需要说明的是,其他类型初始模型可以有多个,均可以为采用不同的算法构建的初始模型,例如:其他类型初始模型可以有3个,分别是以AdaBoost算法、向量机算法或随机森林算法(Random Forest,RF)构建的初始模型。It should be noted that there can be multiple other types of initial models, all of which can be initial models constructed by different algorithms. For example, there can be 3 other types of initial models, which are AdaBoost algorithm, vector machine algorithm or random forest algorithm. (Random Forest, RF) to build the initial model.
步骤S04:将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。Step S04: Perform model fusion on the multiple target decision tree models and the multiple models to be fused to obtain a preset quality difference detection model.
需要说明的是,将多个目标决策树模型及多个待融合模型进行模型融合时可以采用投票法(Voting)进行融合,其中,投票法可以采用硬投票法(Hard Voting),也可以采用软投票法(Soft Voting),本实施例对此不加以限制。It should be noted that the voting method (Voting) can be used to fuse multiple target decision tree models and multiple models to be fused. The voting method (Soft Voting) is not limited in this embodiment.
可以理解的是,将多个目标决策树模型及多个待融合模型进行模型融合,得到的预设质差检测模型相对于单一的目标决策树模型或单一的待融合模型的综合性能更好。It can be understood that by performing model fusion of multiple target decision tree models and multiple models to be fused, the obtained preset poor quality detection model has better comprehensive performance than a single target decision tree model or a single model to be fused.
进一步地,由于各个待融合模型是基于不同算法构建的初始模型训练得到的,且其与目标决策树模型所使用的算法不同,准确率会有不同,若此时依旧使用等比进行融合,可能融合后的模型的效果并非最佳,为了保证融合后的模型的使用效果,所述将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型的步骤之前,还可以包括:Further, since each model to be fused is obtained from initial model training based on different algorithms, and it is different from the algorithm used by the target decision tree model, the accuracy rate will be different. The effect of the fused model is not optimal. In order to ensure the use effect of the fused model, the multiple target decision tree models and the multiple models to be fused are model-fused to obtain a preset quality difference detection. Before the steps of the model, you can also include:
以最大化模型评价分值为依据,确定各目标决策树模型及各待融合模型对应的模型融合权重;Based on the maximum model evaluation score, determine the model fusion weights corresponding to each target decision tree model and each model to be fused;
相应的,所述将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型的步骤,包括:Correspondingly, the step of performing model fusion of the multiple target decision tree models and the multiple models to be fused to obtain a preset quality poor detection model includes:
基于所述模型融合权重,将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。Based on the model fusion weight, model fusion is performed on the multiple target decision tree models and the multiple models to be fused to obtain a preset quality difference detection model.
需要说明的是,模型评价分值可以采用F1分值(F1 Score),F1分值可以同时兼顾模型的精确率和召回率。以最大化模型评价分值为依据,确定各目标决策树模型及各待融合模型对应的模型融合权重可以是先将各模型的权重均设置为1,然后进行融合,采用测试集进行测试并计算F1分值,然后根据预设步长调整各模型的权重,不断进行测试并计算F1分值,将其中F1分值最大时的各模型的权重值作为各模型的模型融合权重。It should be noted that the model evaluation score can use the F1 score (F1 Score), and the F1 score can take into account both the precision rate and the recall rate of the model. Based on the maximum model evaluation score, determine the model fusion weights corresponding to each target decision tree model and each model to be fused. First, set the weight of each model to 1, then perform fusion, and use the test set for testing and calculation. F1 score, and then adjust the weight of each model according to the preset step size, continuously test and calculate the F1 score, and use the weight value of each model when the F1 score is the largest as the model fusion weight of each model.
可以理解的是,基于模型融合权重,将多个目标决策树模型及多个待融合模型进行模型融合,获得的预设质差检测模型可以保证其F1分值最大,即模型的综合性能最佳,使用效果最好。It can be understood that, based on the model fusion weight, the model fusion of multiple target decision tree models and multiple models to be fused, the obtained preset quality difference detection model can ensure that its F1 score is the largest, that is, the comprehensive performance of the model is the best. , use the best effect.
为了便于理解,参考图5进行说明,但并不对本方案进行限定,图5为模型融合示意图,其中,先设置30个不同的随机种子及10个不同的特征子集,根据数据样本子集对根据GBDT算法构建的初始模型进行训练,得到第一个目标决策树模型,将其作为投票分类器(Voting Classifier)(GBDT1),然后采用不同的数据样本子集训练得到投票分类器(GBDT2)及投票分类器(GBDT3),接着根据数据样本集对根据AdaBoost算法构建的初始模型进行训练,获得待融合模型,将其作为投票分类器(Ada),再根据数据样本集对根据随机森林算法构建的初始模型进行训练,获得待融合模型,将其作为投票分类器(RF),然后确定模型融合权重,根据模型融合权重对各模型进行融合,获得融合后的投票分类器,将其作为最终结果(FINAL RESULT),以获得预设质差检测模型。For ease of understanding, reference is made to Fig. 5 for description, but this scheme is not limited. Fig. 5 is a schematic diagram of model fusion, in which 30 different random seeds and 10 different feature subsets are set first, and according to the data sample subsets According to the initial model constructed by the GBDT algorithm, the first target decision tree model is obtained, and it is used as the voting classifier (GBDT1), and then different subsets of data samples are used to train to obtain the voting classifier (GBDT2) and Voting classifier (GBDT3), and then train the initial model constructed according to the AdaBoost algorithm according to the data sample set, obtain the model to be fused, and use it as the voting classifier (Ada), and then use the data sample set to construct according to the random forest algorithm. The initial model is trained, the model to be fused is obtained, and it is used as a voting classifier (RF), and then the model fusion weight is determined, and each model is fused according to the model fusion weight, and the fused voting classifier is obtained, which is used as the final result ( FINAL RESULT) to obtain a preset quality poor detection model.
本实施例通过获取预设样本库中存储的数据样本,并根据所述数据样本构建数据样本集;根据所述数据样本集对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型;根据所述数据样本集对所述初始模型集中其他类型初始模型进行训练,以获得多个待融合模型;将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。由于采用的并非单一算法构建的模型,而是将对多种不同算法构建的模型在训练完毕之后进行融合,使得预设质差检测模型的综合性能更好。In this embodiment, the data samples stored in the preset sample library are acquired, and a data sample set is constructed according to the data samples; and the first type of initial model in the initial model set is trained multiple times according to the data sample set to obtain multiple target decision tree model; according to the data sample set, other types of initial models in the initial model set are trained to obtain multiple models to be fused; the multiple target decision tree models and the multiple models to be fused are performed Model fusion to obtain a preset poor quality detection model. Because it is not a model constructed by a single algorithm, but a fusion of models constructed by a variety of different algorithms after training, the comprehensive performance of the preset poor quality detection model is better.
此外,本发明实施例还提出一种存储介质,所述存储介质上存储有质差路由器检测程序,所述质差路由器检测程序被处理器执行时实现如上文所述的质差路由器检测方法的步骤。In addition, an embodiment of the present invention also provides a storage medium, where a poor-quality router detection program is stored on the storage medium, and when the poor-quality router detection program is executed by a processor, the method for detecting a poor-quality router as described above is implemented. step.
参照图6,图6为本发明质差路由器检测装置第一实施例的结构框图。Referring to FIG. 6 , FIG. 6 is a structural block diagram of a first embodiment of a poor quality router detection apparatus according to the present invention.
如图6所示,本发明实施例提出的质差路由器检测装置包括:As shown in FIG. 6 , the device for detecting poor quality routers provided by the embodiment of the present invention includes:
指令响应模块601,用于在接收到质差检测指令时,根据所述质差检测指令确定待检测路由器;The
信息获取模块602,用于采集所述待检测路由器的下挂设备信息、上联状态信息及收发报文信息;an
信息构建模块603,用于根据所述下挂设备信息、所述上联状态信息及所述收发报文信息构建待检测特征信息;an
质差检测模块604,用于基于所述待检测特征信息,通过预设质差检测模型对所述待检测路由器进行质差检测,以获得质差检测结果。The quality
本实施例通过在接收到质差检测指令时,根据质差检测指令确定待检测路由器;采集待检测路由器的下挂设备信息、上联状态信息及收发报文信息;根据下挂设备信息、上联状态信息及收发报文信息构建待检测特征信息;基于待检测特征信息,通过预设质差检测模型对待检测路由器进行质差检测,以获得质差检测结果。由于在检测质差路由器时并非经验化判断,避免了大量误判的现象,且预设质差检测模型为预先训练的融合模型,检测准确度高且不必实时构建,可快速准确的检测路由器是否为质差路由器并确定路由器质差原因,然后输出质差检测结果,用户或通信运营商服务人员可根据质差检测结果明确待检测路由器是否为质差路由器,且在待检测路由器为质差路由器时明确质差原因,以便于进行后续处理。In this embodiment, when a quality-bad detection instruction is received, the router to be detected is determined according to the quality-bad detection instruction; Based on the feature information to be detected, the router to be detected is subjected to poor quality detection through a preset poor quality detection model to obtain a poor quality detection result. Since the detection of poor quality routers is not empirical judgment, a large number of misjudgments are avoided, and the preset poor quality detection model is a pre-trained fusion model, which has high detection accuracy and does not need to be constructed in real time. It can quickly and accurately detect whether a router is It is a poor router and determines the reason for the poor quality of the router, and then outputs the poor quality detection result. The user or the service personnel of the communication operator can determine whether the router to be detected is a poor quality router according to the poor quality detection result, and the router to be detected is a poor quality router. The reasons for the poor quality are clearly identified at the same time, so as to facilitate the follow-up processing.
进一步地,所述指令响应模块601,还用于获取预设样本库中存储的数据样本,并根据所述数据样本构建数据样本集;根据所述数据样本集对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型;根据所述数据样本集对所述初始模型集中其他类型初始模型进行训练,以获得多个待融合模型;将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。Further, the
进一步地,所述指令响应模块601,还用于通过智能组网平台周期性采集各平台用户的路由器运行信息;根据所述路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。Further, the
进一步地,所述指令响应模块601,还用于检测所述路由器运行信息是否缺失数据;在所述路由器运行信息缺失数据时,获取所述路由器运行信息对应的历史运行信息;根据所述历史运行信息对所述路由器运行信息进行数据补全,以获得补全后的路由器运行信息;Further, the
所述指令响应模块601,还用于根据所述补全后的路由器运行信息构建数据样本,并将所述数据样本存储至预设样本库中。The
进一步地,所述指令响应模块601,还用于对所述路由器运行信息进行数据缩减,以获得缩减路由器信息;Further, the
所述指令响应模块601,还用于根据所述缩减路由器信息构建数据样本,并将所述数据样本存储至预设样本库中。The
进一步地,所述指令响应模块601,还用于根据所述数据样本集构建多个数据样本子集;基于第一预设数量的随机种子及第二预设数量的特征子集,根据各个数据样本子集分别对初始模型集中第一类型初始模型进行多次训练,以获得多个目标决策树模型。Further, the
进一步地,所述指令响应模块601,还用于以最大化模型评价分值为依据,确定各目标决策树模型及各待融合模型对应的模型融合权重;Further, the
所述指令响应模块601,还用于基于所述模型融合权重,将所述多个目标决策树模型及所述多个待融合模型进行模型融合,以获得预设质差检测模型。The
应当理解的是,以上仅为举例说明,对本发明的技术方案并不构成任何限定,在具体应用中,本领域的技术人员可以根据需要进行设置,本发明对此不做限制。It should be understood that the above are only examples, and do not constitute any limitation to the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as required, which is not limited by the present invention.
需要说明的是,以上所描述的工作流程仅仅是示意性的,并不对本发明的保护范围构成限定,在实际应用中,本领域的技术人员可以根据实际的需要选择其中的部分或者全部来实现本实施例方案的目的,此处不做限制。It should be noted that the above-described workflow is only illustrative, and does not limit the protection scope of the present invention. In practical applications, those skilled in the art can select some or all of them to implement according to actual needs. The purpose of the solution in this embodiment is not limited here.
另外,未在本实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的质差路由器检测方法,此处不再赘述。In addition, for technical details that are not described in detail in this embodiment, reference may be made to the detection method for a poor-quality router provided by any embodiment of the present invention, and details are not repeated here.
此外,需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。Furthermore, it should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, but also other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read Only Memory,ROM)/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as a read-only memory). , ROM)/RAM, magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110702747.1A CN113411236B (en) | 2021-06-23 | 2021-06-23 | Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110702747.1A CN113411236B (en) | 2021-06-23 | 2021-06-23 | Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113411236A CN113411236A (en) | 2021-09-17 |
CN113411236B true CN113411236B (en) | 2022-06-14 |
Family
ID=77682941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110702747.1A Active CN113411236B (en) | 2021-06-23 | 2021-06-23 | Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113411236B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115065606B (en) * | 2022-05-31 | 2023-10-27 | 中移(杭州)信息技术有限公司 | Home-wide mass spectrometry method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3223486A2 (en) * | 2016-03-25 | 2017-09-27 | Cisco Technology, Inc. | Distributed anomaly detection management |
WO2021020198A1 (en) * | 2019-07-26 | 2021-02-04 | 富士フイルム株式会社 | Information processing device, program, learned model, diagnostic assistance device, learning device, and method for generating prediction model |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE602004025390D1 (en) * | 2004-07-29 | 2010-03-18 | Telecom Italia Spa | METHOD AND SYSTEM FOR ERROR AND EFFICIENCY TREATMENT IN COMPUTER NETWORKS, THIS NETWORK AND COMPUTER PROGRAM PRODUCT THEREFOR |
CN101841475B (en) * | 2010-04-21 | 2011-12-28 | 北京星网锐捷网络技术有限公司 | System for testing performance of GRE (Ground Radar Equipment) router and method thereof |
CN104639389A (en) * | 2014-12-31 | 2015-05-20 | 北京奇虎科技有限公司 | Router evaluating device and method |
CN106604312B (en) * | 2016-11-10 | 2020-12-22 | 王蕴卓 | Router test data visualization method and system |
CN106452975B (en) * | 2016-11-18 | 2019-10-11 | 上海斐讯数据通信技术有限公司 | A kind of method and system of test router |
CN107094104B (en) * | 2017-04-07 | 2019-10-29 | 杭州东信北邮信息技术有限公司 | A kind of test method and system of WIFI router load-carrying properties |
CN111988201B (en) * | 2020-09-01 | 2021-10-22 | 杭州东方通信软件技术有限公司 | Automatic identification method and device for quality difference router |
-
2021
- 2021-06-23 CN CN202110702747.1A patent/CN113411236B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3223486A2 (en) * | 2016-03-25 | 2017-09-27 | Cisco Technology, Inc. | Distributed anomaly detection management |
WO2021020198A1 (en) * | 2019-07-26 | 2021-02-04 | 富士フイルム株式会社 | Information processing device, program, learned model, diagnostic assistance device, learning device, and method for generating prediction model |
Also Published As
Publication number | Publication date |
---|---|
CN113411236A (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107957940B (en) | Test log processing method, system and terminal | |
CN107341098A (en) | Software performance testing method, platform, equipment and storage medium | |
US11108676B2 (en) | Method and system for detecting network quality based on a network fluctuation model | |
CN110348526A (en) | A kind of device type recognition methods and device based on semi-supervised clustering algorithm | |
CN107809766B (en) | Method and device for generating machine learning sample for network optimization | |
CN113660687B (en) | Network difference cell processing method, device, equipment and storage medium | |
CN105302885B (en) | full-text data extraction method and device | |
CN109462517A (en) | A kind of method, system and the equipment of the data monitoring towards digital electric network business | |
CN112584422A (en) | 5G terminal performance obtaining method and device | |
CN115496120A (en) | Internet of things equipment anomaly detection method, device, equipment and storage medium | |
CN107943697A (en) | Problem distribution method, device, system, server and computer-readable storage medium | |
CN113656270B (en) | Method, device, medium and computer program product for testing application performance | |
WO2023207689A1 (en) | Change risk assessment method and apparatus, and storage medium | |
CN114244691B (en) | Video service fault location method, device and electronic equipment | |
CN113411236B (en) | Quality difference router detection method, quality difference router detection device, quality difference router detection equipment and storage medium | |
Guo et al. | FullSight: A feasible intelligent and collaborative framework for service function chains failure detection | |
CN106549827A (en) | The detection method and device of network state | |
CN101447995A (en) | Method for identifying P2P data stream, device and system thereof | |
Santi et al. | Automated and reproducible application traces generation for IoT applications | |
CN115102836A (en) | Network equipment failure analysis method, device and storage medium | |
CN113504996A (en) | Load balance detection method, device, equipment and storage medium | |
US20230379737A1 (en) | Devices and methods for predicting a mobile network experience | |
CN108093431A (en) | It is a kind of using do data processing network element TDPNE be handle node data reporting method and device | |
CN114490303B (en) | Fault root cause determination method and device and cloud equipment | |
CN110868732A (en) | Method, system and device for locating the problem of VoLTE connection failure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |