CN114465926A - Recursive server monitoring method, device, device and storage medium - Google Patents
Recursive server monitoring method, device, device and storage medium Download PDFInfo
- Publication number
 - CN114465926A CN114465926A CN202210376607.4A CN202210376607A CN114465926A CN 114465926 A CN114465926 A CN 114465926A CN 202210376607 A CN202210376607 A CN 202210376607A CN 114465926 A CN114465926 A CN 114465926A
 - Authority
 - CN
 - China
 - Prior art keywords
 - domain name
 - log
 - preset
 - recursive server
 - accessed
 - Prior art date
 - Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
 - Granted
 
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
 - 238000012544 monitoring process Methods 0.000 title claims abstract description 36
 - 238000001514 detection method Methods 0.000 claims description 20
 - 238000012806 monitoring device Methods 0.000 claims description 19
 - 238000012795 verification Methods 0.000 claims description 19
 - 238000004891 communication Methods 0.000 description 5
 - 238000010586 diagram Methods 0.000 description 4
 - 230000008569 process Effects 0.000 description 4
 - 230000008520 organization Effects 0.000 description 3
 - 238000012545 processing Methods 0.000 description 3
 - 238000005516 engineering process Methods 0.000 description 1
 - 230000006870 function Effects 0.000 description 1
 - 230000003993 interaction Effects 0.000 description 1
 - 230000003287 optical effect Effects 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
 
 - 
        
- H—ELECTRICITY
 - H04—ELECTRIC COMMUNICATION TECHNIQUE
 - H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
 - H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
 - H04L41/06—Management of faults, events, alarms or notifications
 - H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
 
 
Landscapes
- Engineering & Computer Science (AREA)
 - Computer Networks & Wireless Communication (AREA)
 - Signal Processing (AREA)
 - Environmental & Geological Engineering (AREA)
 - Debugging And Monitoring (AREA)
 
Abstract
本发明属于计算机技术领域,公开了一种递归服务器监测方法、装置、设备及存储介质。本发明通过从预设域名集中获取待访问域名,待访问域名为不存在的顶级域名;根据待访问域名访问目标递归服务器,并接收目标递归服务器反馈的域名解析结果;根据域名解析结果生成域名解析日志,并将域名解析日志写入预设日志文件中;基于预设日志文件确定目标递归服务器的不可用时段。由于是采用不存在的顶级域名访问目标递归服务器,根据反馈的域名解析结果即可确定目标递归服务器当前的可用状态,然后将根据域名解析结果生成的域名解析日志写入预设日志文件,统计预设日志文件中各域名解析日志对应的域名解析结果即可确定目标递归服务器的不可用时段。
The invention belongs to the technical field of computers, and discloses a recursive server monitoring method, device, equipment and storage medium. In the present invention, the domain name to be accessed is obtained from a preset domain name set, and the domain name to be accessed is a non-existing top-level domain name; the target recursive server is accessed according to the domain name to be accessed, and the domain name resolution result fed back by the target recursive server is received; the domain name resolution is generated according to the domain name resolution result log, and write the domain name resolution log into the preset log file; determine the unavailable period of the target recursive server based on the preset log file. Since the non-existent top-level domain name is used to access the target recursive server, the current available status of the target recursive server can be determined according to the feedback domain name resolution result, and then the domain name resolution log generated according to the domain name resolution result is written into the preset log file, and the statistical prediction The unavailable period of the target recursive server can be determined by setting the domain name resolution results corresponding to each domain name resolution log in the log file.
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种递归服务器监测方法、装置、设备及存储介质。The present invention relates to the field of computer technology, and in particular, to a recursive server monitoring method, apparatus, device and storage medium.
背景技术Background technique
传统的判断递归服务器服务不可用的方式只能通过浏览器请求某个具体的网站,然后发现该网站无法正常解析出IP,这时候才发现服务不可用了,但是无法准确的知道服务不可用开始时间点,以及服务不可用结束的时间点,所以也比较难去定位服务不可用的时段及时长,和服务不可用带来的影响,以及服务不可用可能发生的原因等。The traditional way of judging that the recursive server service is unavailable can only be through the browser to request a specific website, and then it is found that the website cannot resolve the IP normally, and then the service is found to be unavailable, but it is impossible to accurately know that the service is unavailable. It is also difficult to locate the time period and length of service unavailability, the impact of service unavailability, and the possible reasons for service unavailability.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。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 recursive server monitoring method, device, equipment and storage medium, aiming to solve the technical problem that the recursive server unavailable period cannot be determined in the prior art.
为实现上述目的,本发明提供了一种递归服务器监测方法,所述方法包括以下步骤:To achieve the above object, the invention provides a kind of recursive server monitoring method, described method comprises the following steps:
从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名;Obtain a domain name to be accessed from a preset domain name set, where the domain name to be accessed is a non-existent top-level domain name;
根据所述待访问域名访问目标递归服务器,并接收所述目标递归服务器反馈的域名解析结果;Access the target recursive server according to the domain name to be accessed, and receive the domain name resolution result fed back by the target recursive server;
根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中;Generate a domain name resolution log according to the domain name resolution result, and write the domain name resolution log into a preset log file;
基于所述预设日志文件确定所述目标递归服务器的不可用时段。The unavailable period of the target recursive server is determined based on the preset log file.
可选的,所述根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中的步骤,包括:Optionally, the step of generating a domain name resolution log according to the domain name resolution result and writing the domain name resolution log into a preset log file includes:
从预设日志文件中读取前次解析日志;Read the previous parsing log from the preset log file;
若所述域名解析结果与所述前次解析日志中的域名解析结果不一致,则根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中。If the domain name resolution result is inconsistent with the domain name resolution result in the previous resolution log, a domain name resolution log is generated according to the domain name resolution result, and the domain name resolution log is written into a preset log file.
可选的,所述基于所述预设日志文件确定所述目标递归服务器的不可用时段的步骤,包括:Optionally, the step of determining the unavailable period of the target recursive server based on the preset log file includes:
读取所述预设日志文件中对应的域名解析结果为第一类型结果的域名解析日志,获得第一类型日志;Reading the domain name resolution log whose corresponding domain name resolution result is the first type result in the preset log file, to obtain the first type log;
在所述预设日志文件中从所述第一类型日志处向前查找对应的域名解析结果为第二类型结果的域名解析日志,获得所述第一类型日志对应的第二类型日志;searching forward from the first type of log in the preset log file for a domain name resolution log whose corresponding domain name resolution result is the second type of result, to obtain a second type of log corresponding to the first type of log;
根据所述第一类型日志及所述第二类型日志确定所述目标递归服务器的不可用时段。The unavailable period of the target recursive server is determined according to the first type of log and the second type of log.
可选的,所述根据所述待访问域名访问目标递归服务器的步骤,包括:Optionally, the step of accessing the target recursive server according to the domain name to be accessed includes:
获取预设指令模板,并获取目标递归服务器的访问地址;Obtain the preset instruction template, and obtain the access address of the target recursive server;
根据所述访问地址及所述待访问域名对所述预设指令模板进行填充,获得域名访问指令;Filling the preset instruction template according to the access address and the domain name to be accessed to obtain a domain name access instruction;
通过所述域名访问指令访问所述目标递归服务器。Access the target recursive server through the domain name access instruction.
可选的,所述根据所述待访问域名访问目标递归服务器,并接收所述目标递归服务器反馈的域名解析结果的步骤之后,还包括:Optionally, after the step of accessing the target recursive server according to the domain name to be accessed, and receiving the domain name resolution result fed back by the target recursive server, the method further includes:
若所述域名解析结果为第三类型结果,则对所述预设域名集中的域名进行存在性校验;If the domain name resolution result is the third type result, perform existence check on the domain names in the preset domain name set;
将通过存在性校验的域名从所述预设域名集中移除,并返回所述从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名的步骤。Remove the domain name that has passed the existence check from the preset domain name set, and return to the step of obtaining the domain name to be accessed from the preset domain name set, where the domain name to be accessed is a non-existent top-level domain name.
可选的,所述对所述预设域名集中的域名进行存在性校验的步骤,包括:Optionally, the step of performing existence verification on the domain names in the preset domain name set includes:
遍历所述预设域名集,并将遍历到的域名作为待校验域名;Traverse the preset domain name set, and use the traversed domain name as the domain name to be verified;
根据所述待校验域名访问根域名服务器,并接收所述根域名服务器反馈的域名校验结果;Access the root domain name server according to the domain name to be verified, and receive the domain name verification result fed back by the root domain name server;
根据所述域名校验结果确定所述待校验域名是否存在;Determine whether the domain name to be verified exists according to the domain name verification result;
若所述待校验域名存在,则判定所述待校验域名通过存在性校验;If the domain name to be verified exists, it is determined that the domain name to be verified has passed the existence check;
检测所述预设域名集中是否存在未被遍历到的域名,若不存在未被遍历到的域名,则结束对所述预设域名集的遍历。It is detected whether there are untraversed domain names in the preset domain name set, and if there is no untraversed domain name, the traversal of the preset domain name set is ended.
可选的,所述从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名的步骤,包括:Optionally, the step of obtaining the domain name to be accessed from the preset domain name set, where the domain name to be accessed is a non-existing top-level domain name, includes:
获取预设检测周期,根据所述预设检测周期生成域名检测条件;obtaining a preset detection period, and generating a domain name detection condition according to the preset detection period;
实时监测系统运行时刻,在所述系统运行时刻满足所述域名检测条件时,从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名。The real-time monitoring system running time, when the system running time meets the domain name detection condition, obtains the domain name to be accessed from the preset domain name set, and the domain name to be accessed is a non-existing top-level domain name.
此外,为实现上述目的,本发明还提出一种递归服务器监测装置,所述递归服务器监测装置包括以下模块:In addition, in order to achieve the above object, the present invention also proposes a recursive server monitoring device, the recursive server monitoring device includes the following modules:
域名获取模块,用于从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名;a domain name obtaining module, configured to obtain a domain name to be accessed from a preset domain name set, where the domain name to be accessed is a non-existent top-level domain name;
服务访问模块,用于根据所述待访问域名访问目标递归服务器,并接收所述目标递归服务器反馈的域名解析结果;a service access module, configured to access a target recursive server according to the domain name to be accessed, and receive a domain name resolution result fed back by the target recursive server;
日志生成模块,用于根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中;a log generation module, configured to generate a domain name resolution log according to the domain name resolution result, and write the domain name resolution log into a preset log file;
时段确定模块,用于基于所述预设日志文件确定所述目标递归服务器的不可用时段。A period determination module, configured to determine the unavailable period of the target recursive server based on the preset log file.
此外,为实现上述目的,本发明还提出一种递归服务器监测设备,所述递归服务器监测设备包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的递归服务器监测程序,所述递归服务器监测程序被处理器执行时实现如上所述的递归服务器监测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a recursive server monitoring device, the recursive server monitoring device includes: a processor, a memory, and a recursive server monitoring device stored on the memory and running on the processor A program, when the recursive server monitoring program is executed by the processor, implements the steps of the recursive server monitoring method as described above.
此外,为实现上述目的,本发明还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有递归服务器监测程序,所述递归服务器监测程序执行时实现如上所述的递归服务器监测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium, where a recursive server monitoring program is stored on the computer-readable storage medium, and when the recursive server monitoring program is executed, the above-mentioned recursive server monitoring is implemented steps of the method.
本发明通过从预设域名集中获取待访问域名,待访问域名为不存在的顶级域名;根据待访问域名访问目标递归服务器,并接收目标递归服务器反馈的域名解析结果;根据域名解析结果生成域名解析日志,并将域名解析日志写入预设日志文件中;基于预设日志文件确定目标递归服务器的不可用时段。由于是采用不存在的顶级域名访问目标递归服务器,根据反馈的域名解析结果即可确定目标递归服务器当前的可用状态,然后将根据域名解析结果生成的域名解析日志写入预设日志文件,统计预设日志文件中各域名解析日志对应的域名解析结果即可确定目标递归服务器的不可用时段。The present invention obtains the domain name to be accessed from the preset domain name set, and the domain name to be accessed is a non-existent top-level domain name; accesses the target recursive server according to the domain name to be accessed, and receives the domain name resolution result fed back by the target recursive server; generates domain name resolution according to the domain name resolution result log, and write the domain name resolution log into the preset log file; determine the unavailable period of the target recursive server based on the preset log file. Since the non-existent top-level domain name is used to access the target recursive server, the current available status of the target recursive server can be determined according to the feedback domain name resolution result, and then the domain name resolution log generated according to the domain name resolution result is written into the preset log file, and the statistical prediction The unavailable period of the target recursive server can be determined by setting the domain name resolution results corresponding to each domain name resolution log in the log file.
附图说明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 recursive server monitoring method according to the present invention;
图3为本发明递归服务器监测方法第二实施例的流程示意图;3 is a schematic flowchart of a second embodiment of a recursive server monitoring method according to the present invention;
图4为本发明递归服务器监测装置第一实施例的结构框图。FIG. 4 is a structural block diagram of the first embodiment of the recursive server monitoring 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 recursive server monitoring 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 recursive server monitoring method. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a first embodiment of a recursive server monitoring method according to the present invention.
本实施例中,所述递归服务器监测方法包括以下步骤:In this embodiment, the recursive server monitoring method includes the following steps:
步骤S10:从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名。Step S10: Obtain a domain name to be accessed from a preset domain name set, where the domain name to be accessed is a top-level domain name that does not exist.
需要说明的是,本实施例的执行主体可以是所述递归服务器监测设备,所述递归服务器监测设备可以是个人电脑、服务器等电子设备,还可以是其他可实现相同或相似功能的设备,本实施例对此不加以限制,在本实施例及下述各实施例中,以递归服务器监测设备为例对本发明递归服务器监测方法进行说明。It should be noted that the execution body of this embodiment may be the recursive server monitoring device, and the recursive server monitoring device may be an electronic device such as a personal computer, a server, or other devices that can implement the same or similar functions. The embodiment does not limit this. In this embodiment and the following embodiments, the recursive server monitoring method of the present invention is described by taking a recursive server monitoring device as an example.
需要说明的是,预设域名集可以是由大量不存在的顶级域名聚合而成的集合,预设域名集可以由递归服务器监测设备的管理人员预先进行设置。其中,不存在的顶级域名可以是没有任何个人或机构使用的顶级域名。It should be noted that the preset domain name set may be a set aggregated by a large number of non-existing top-level domain names, and the preset domain name set may be preset by the administrator of the recursive server monitoring device. Among them, the non-existing top-level domain name can be a top-level domain name that is not used by any individual or institution.
在具体实现中,对递归服务器的监测是持续性的,因此,需要周期性的对目标递归服务器进行访问,其中,周期可以由递归服务器监测设备的管理人员预先进行设置,因此,本实施例所述步骤S10,可以包括:In the specific implementation, the monitoring of the recursive server is continuous. Therefore, the target recursive server needs to be accessed periodically. The period can be set in advance by the administrator of the recursive server monitoring device. Therefore, in this embodiment, the The step S10 may include:
获取预设检测周期,根据所述预设检测周期生成域名检测条件;obtaining a preset detection period, and generating a domain name detection condition according to the preset detection period;
实时监测系统运行时刻,在所述系统运行时刻满足所述域名检测条件时,从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名。The real-time monitoring system running time, when the system running time meets the domain name detection condition, obtains the domain name to be accessed from the preset domain name set, and the domain name to be accessed is a non-existing top-level domain name.
需要说明的是,预设检测周期可以由递归服务器监测设备的管理人员根据实际需要预先进行设置,例如:将预设检测周期设置为1秒,则此时生成的域名检测条件为:从系统开始运行时每隔一秒触发一次。It should be noted that the preset detection period can be set in advance by the administrator of the recursive server monitoring device according to actual needs. For example, if the preset detection period is set to 1 second, the generated domain name detection conditions are: starting from the system Fired every second when running.
可以理解的是,若系统运行时刻满足域名检测条件,则表示此时需要检测一次目标递归服务器是否可用,因此,需要从预设域名服务器中获取待访问域名,并执行后续步骤。It can be understood that if the system running time meets the domain name detection conditions, it means that it is necessary to detect whether the target recursive server is available at this time. Therefore, the domain name to be accessed needs to be obtained from the preset domain name server, and the subsequent steps are performed.
步骤S20:根据所述待访问域名访问目标递归服务器,并接收所述目标递归服务器反馈的域名解析结果。Step S20: Access the target recursive server according to the domain name to be accessed, and receive the domain name resolution result fed back by the target recursive server.
需要说明的是,目标递归服务器可以是需要进行监测的递归服务器,目标递归服务器可以由递归服务器监测设备的管理人员指定。目标递归服务器在接收到待访问域名时,会对待访问域名进行域名解析,尝试获取待访问域名对应的服务器IP地址等信息,然后返回具体的域名解析结果。It should be noted that the target recursive server may be a recursive server that needs to be monitored, and the target recursive server may be designated by the administrator of the recursive server monitoring device. When the target recursive server receives the domain name to be accessed, it will perform domain name resolution on the domain name to be accessed, try to obtain information such as the server IP address corresponding to the domain name to be accessed, and then return the specific domain name resolution result.
域名解析结果可以分为第一类型结果、第二类型结果及第三类型结果。其中,目标递归服务器可正常解析域名,且未找到对应的服务器IP地址,则会返回第一类型结果,例如:返回NXDOMAIN;目标递归服务器无法正常解析或访问超时,则会返回第二类型结果,例如:返回SERVFAIL或TIMEOUT;目标递归服务器可正常解析域名,且可找到对应的服务器IP地址,则会返回第三类型结果,例如:返回域名及域名对应的服务器IP地址。Domain name resolution results can be divided into first type results, second type results and third type results. Among them, if the target recursive server can resolve the domain name normally, and the corresponding server IP address is not found, the first type of result will be returned, for example: NXDOMAIN; if the target recursive server cannot be resolved normally or the access timed out, the second type of result will be returned. For example: return SERVFAIL or TIMEOUT; if the target recursive server can resolve the domain name normally, and can find the corresponding server IP address, it will return the third type of result, for example: return the domain name and the server IP address corresponding to the domain name.
可以理解的是,待访问域名为不存在的顶级域名,则目标递归服务器中会访问根域名服务器,从根域名服务器中获取待访问域名对应的域名解析结果,而根域名服务器由权威机构维护,基本不可能无法访问,因此,根据域名解析结果即可判断目标域名服务器是否可正常访问。It is understandable that if the domain name to be accessed is a non-existent top-level domain name, the target recursive server will access the root domain name server, and obtain the domain name resolution result corresponding to the domain name to be accessed from the root domain name server, and the root domain name server is maintained by an authority. It is basically impossible to be inaccessible. Therefore, it can be determined whether the target domain name server can be accessed normally according to the domain name resolution result.
在具体实现中,为了提高对目标递归服务器的监测效率,可采用较为高效的指令访问目标递归服务器,则此时本实施例所述根据所述待访问域名访问目标递归服务器的步骤,可以包括:In a specific implementation, in order to improve the monitoring efficiency of the target recursive server, a relatively efficient instruction can be used to access the target recursive server. At this time, the steps of accessing the target recursive server according to the domain name to be accessed in this embodiment may include:
获取预设指令模板,并获取目标递归服务器的访问地址;Obtain the preset instruction template, and obtain the access address of the target recursive server;
根据所述访问地址及所述待访问域名对所述预设指令模板进行填充,获得域名访问指令;Filling the preset instruction template according to the access address and the domain name to be accessed to obtain a domain name access instruction;
通过所述域名访问指令访问所述目标递归服务器。Access the target recursive server through the domain name access instruction.
需要说明的是,目标递归服务器的访问地址可以是目标递归服务器的IP地址。预设指令模板可以是根据高效的递归服务器的访问指令的生成规则构建的指令模板,例如:dig指令访问递归服务器效率高,则此时可以根据dig指令的生成规则构建指令模板,则此时预设指令模板为:“dig @${recursive_ip} @${tdl_name}”,其中,@${recursive_ip}为需要访问的域名服务器的访问地址对应的占位符,@${tdl_name}为待访问域名对应的占位符。It should be noted that the access address of the target recursive server may be the IP address of the target recursive server. The preset instruction template can be an instruction template constructed according to the generation rule of the access instruction of the efficient recursive server. For example, if the dig instruction has high access to the recursive server, the instruction template can be constructed according to the generation rule of the dig instruction. Set the instruction template as: "dig @${recursive_ip} @${tdl_name}", where @${recursive_ip} is the placeholder corresponding to the access address of the domain name server to be accessed, and @${tdl_name} is the domain name to be accessed the corresponding placeholder.
在实际使用中,根据访问地址及待访问域名对预设指令模板进行填充,获得域名访问指令可以是根据访问地址及待访问域名对预设指令模板中的占位符进行替换,从而获得域名访问指令。通过域名访问指令访问目标递归服务器可以是运行域名访问指令,从而访问目标递归服务器。In actual use, the preset command template is filled according to the access address and the domain name to be accessed, and the domain name access command can be obtained by replacing the placeholders in the preset command template according to the access address and the domain name to be accessed, so as to obtain domain name access instruction. To access the target recursive server through the domain name access instruction may be to run the domain name access instruction to access the target recursive server.
步骤S30:根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中。Step S30: Generate a domain name resolution log according to the domain name resolution result, and write the domain name resolution log into a preset log file.
需要说明的是,预设日志文件可以是用于存储域名解析日志的文件。根据域名解析结果生成域名解析日志可以是获取域名解析结果对应的生成时刻,然后根据域名解析结果及对应的生成时刻对预设日志模板进行填充,从而获得域名解析日志。It should be noted that the preset log file may be a file for storing domain name resolution logs. Generating the domain name resolution log according to the domain name resolution result may be obtaining the generation time corresponding to the domain name resolution result, and then filling the preset log template according to the domain name resolution result and the corresponding generation time, thereby obtaining the domain name resolution log.
例如:假设域名解析结果为NXDOMAIN,对应的生成时刻为2021年11月27日00时05分36秒,则此时可以对预设日志模板进行填充,从而获得一条域名解析日志“[2021-11-2700:05:36 status:NXDOMAIN]”。For example: Assuming that the domain name resolution result is NXDOMAIN, and the corresponding generation time is 00:05:36 on November 27, 2021, the preset log template can be filled at this time to obtain a domain name resolution log "[2021-11 -2700:05:36 status: NXDOMAIN]".
在实际使用中,将域名解析日志写入预设日志文件中可以是将域名解析日志写入预设日志文件的文件末尾。当然,具体写入规则可以根据实际需要进行调整,本实施例对此不加以限制。In actual use, writing the domain name resolution log to the preset log file may be writing the domain name resolution log to the end of the file of the preset log file. Of course, the specific writing rule can be adjusted according to actual needs, which is not limited in this embodiment.
步骤S40:基于所述预设日志文件确定所述目标递归服务器的不可用时段。Step S40: Determine the unavailable period of the target recursive server based on the preset log file.
需要说明的是,由于待访问域名为不存在的顶级域名,则目标递归服务器中会访问根域名服务器,从根域名服务器中获取待访问域名对应的域名解析结果,而根域名服务器由权威机构维护,基本不可能无法访问,根据域名解析结果即可判断目标域名服务器是否可正常访问。因此,根据预设日志文件中存储的各条域名解析日志对应的域名解析结果即可确定生成该域名解析日志时目标递归服务器是否可用,将状态进行统计,即可确定目标递归服务器的不可用时段。It should be noted that since the domain name to be accessed is a non-existent top-level domain name, the target recursive server will access the root domain name server, and obtain the domain name resolution result corresponding to the domain name to be accessed from the root domain name server, and the root domain name server is maintained by the authority. , it is basically impossible to be inaccessible, and it can be judged whether the target domain name server can be accessed normally according to the results of domain name resolution. Therefore, according to the domain name resolution results corresponding to each domain name resolution log stored in the preset log file, it can be determined whether the target recursive server is available when the domain name resolution log is generated, and the status can be counted to determine the unavailable period of the target recursive server. .
例如:假设预设日志文件中存在40条域名解析日志,其中,第1-3条域名解析日志对应的域名解析结果为第一类型结果,第4-10条域名解析日志对应的域名解析结果为第二类型结果,第11-40条域名解析日志对应的域名解析结果为第一类型结果,则表示在生成第1-3条域名解析日志时目标递归服务器可用,在生成第4-10条域名解析日志时目标递归服务器不可用,在生成第11-40条域名解析日志时目标递归服务器可用,则此时第4条域名解析日志对应的生成时刻为目标递归服务器的不可用时段的开始时刻,第11条域名解析日志对应的生成时刻为目标递归服务器的不可用时段的结束时刻。For example: Assuming that there are 40 domain name resolution logs in the preset log file, the domain name resolution results corresponding to the 1st to 3rd domain name resolution logs are the first type results, and the 4th to 10th domain name resolution logs corresponding to the domain name resolution results are The second type of result, the domain name resolution result corresponding to the 11-40th domain name resolution log is the first type result, which means that the target recursive server is available when the 1-3 domain name resolution log is generated, and the 4-10th domain name is generated when the target recursive server is available. The target recursive server is unavailable when parsing the log, and the target recursive server is available when the 11th to 40th domain name resolution logs are generated, then the generation time corresponding to the fourth domain name resolution log is the start of the unavailable period of the target recursive server. Article 11 The corresponding generation time of the domain name resolution log is the end time of the unavailable period of the target recursive server.
进一步的,以上述举例可以明确,连续多条域名解析日志对应的域名解析结果为同一类型结果时,真正起到时段确定的日志其实只有可用于判定目标递归服务器的状态发生变化的那一条,即连续多条域名解析日志中的第一条,因此,并非所有的域名解析日志均需要存储,则此时本实施例所述步骤S30,可以包括:Further, it is clear from the above example that when the domain name resolution results corresponding to multiple consecutive domain name resolution logs are of the same type, the only log that actually determines the time period is the one that can be used to determine the state of the target recursive server has changed, that is, The first one of multiple consecutive domain name resolution logs. Therefore, not all domain name resolution logs need to be stored. At this time, step S30 in this embodiment may include:
从预设日志文件中读取前次解析日志;Read the previous parsing log from the preset log file;
若所述域名解析结果与所述前次解析日志中的域名解析结果不一致,则根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中。If the domain name resolution result is inconsistent with the domain name resolution result in the previous resolution log, a domain name resolution log is generated according to the domain name resolution result, and the domain name resolution log is written into a preset log file.
需要说明的是,前次解析日志可以是预设日志文件中当前位于文件末尾的域名解析日志。It should be noted that the previous resolution log may be the domain name resolution log currently located at the end of the file in the preset log file.
在实际使用中,若域名解析结果与前日解析日志中的域名解析结果不一致,则表示此时目标递归服务器的状态发生了变化,例如:由可用变化为不可用或由不可用变化为可用。因此,此时可以根据域名解析结果生成域名解析日志,然后将域名解析日志写入到预设日志文件中。In actual use, if the domain name resolution result is inconsistent with the domain name resolution result in the resolution log of the previous day, it means that the status of the target recursive server has changed at this time, for example: from available to unavailable or from unavailable to available. Therefore, at this time, a domain name resolution log can be generated according to the domain name resolution result, and then the domain name resolution log can be written into a preset log file.
可以理解的是,仅保留可用于判定目标递归服务器的状态发生变化的域名解析日志并不会影响对目标递归服务器的不可用时段的判定,而且可以减少预设日志文件中的日志数量,节省设备的存储空间。It is understandable that only keeping the domain name resolution logs that can be used to determine that the status of the target recursive server has changed will not affect the determination of the unavailability period of the target recursive server, and can reduce the number of logs in the preset log file and save equipment. of storage space.
在具体实现中,由于日志存储的规律发生了变化,相应的,根据预设日志文件确定目标递归服务器的不可用时段的方式也可以做出相应的变化,则此时本实施例所述步骤S40,可以包括:In specific implementation, since the law of log storage has changed, correspondingly, the method of determining the unavailable period of the target recursive server according to the preset log file can also be changed accordingly, then step S40 described in this embodiment is at this time. , which can include:
读取所述预设日志文件中对应的域名解析结果为第一类型结果的域名解析日志,获得第一类型日志;Reading the domain name resolution log whose corresponding domain name resolution result is the first type result in the preset log file, to obtain the first type log;
在所述预设日志文件中从所述第一类型日志处向前查找对应的域名解析结果为第二类型结果的域名解析日志,获得所述第一类型日志对应的第二类型日志;searching forward from the first type of log in the preset log file for a domain name resolution log whose corresponding domain name resolution result is the second type of result, to obtain a second type of log corresponding to the first type of log;
根据所述第一类型日志及所述第二类型日志确定所述目标递归服务器的不可用时段。The unavailable period of the target recursive server is determined according to the first type of log and the second type of log.
需要说明的是,若域名解析日志对应的域名解析结果为第一类型结果,则表示生成该域名解析日志时目标递归服务器处于可用状态;若是域名解析日志对应的域名解析结果为第二类型结果,则表示生成该域名解析日志时目标递归服务器处于不可用状态;而在向预设日志文件中写入域名解析日志时是采用写入文件末尾的方式进行写入,因此,在预设日志文件中从第一类型日志处向前查找第二类型日志,即可确定目标递归服务器的状态为不可用的具体时段。It should be noted that if the domain name resolution result corresponding to the domain name resolution log is the first type result, it means that the target recursive server is available when the domain name resolution log is generated; if the domain name resolution result corresponding to the domain name resolution log is the second type result, It means that the target recursive server is unavailable when the domain name resolution log is generated; and when writing the domain name resolution log to the preset log file, it is written by writing to the end of the file. Therefore, in the preset log file The second type of log is searched forward from the first type of log, so as to determine the specific time period during which the status of the target recursive server is unavailable.
在预设日志文件中从第一类型日志处向前查找对应的域名解析结果为第二类型结果的域名解析日志,获得第一类型日志对应的第二类型日志可以是在预设日志文件中从第一类型日志处向前,将与前一条第一类型日志之间的对应的域名解析结果为第二类型结果的域名解析日志作为第一类型日志对应的第二类型日志。Search forward from the first type of log in the preset log file for the domain name resolution log whose corresponding domain name resolution result is the second type of result, and obtain the second type of log corresponding to the first type of log. The first type of log is forwarded, and the domain name resolution log whose domain name resolution result corresponding to the previous first type of log is the second type of result is regarded as the second type of log corresponding to the first type of log.
其中,由于第二类型结果存在多种,如:SERVFAIL与TIMEOUT,因此,可能会查找到多条对应的域名解析结果为第二类型结果的域名解析日志,此时,若查找到的对应的域名解析结果为第二类型结果的域名解析日志有多条,则将其中生成时刻为最早的一条作为第二类型日志。Among them, since there are many types of second-type results, such as SERVFAIL and TIMEOUT, multiple domain name resolution logs whose corresponding domain name resolution results are the second-type results may be found. If there are multiple domain name resolution logs whose resolution result is the second type result, the one with the earliest generation time is used as the second type log.
例如:假设从第一类型日志B处向前查找,在与前一条第一类型日志A之间存在对应的域名解析结果为第二类型结果的域名解析日志C和D,其中C的生成时刻早于D,在此时将C作为B对应的第二类型日志。For example: Assuming that the first type of log B is searched forward, there are domain name resolution logs C and D whose domain name resolution result is the second type result between the previous first type log A and the domain name resolution log C and D, where C is generated earlier For D, at this time, C is used as the second type of log corresponding to B.
在实际使用中,根据第一类型日志及第二类型日志确定目标递归服务器的不可用时段可以是将第二类型日志对应的生成时刻作为不可用开始时刻,将第一类型日志对应的生成时刻作为不可用结束时刻,然后将不可用开始时刻及不可用结束时刻之间的时段作为不可用时段。In actual use, determining the unavailability period of the target recursive server according to the first type log and the second type log may be the generation time corresponding to the second type log as the unavailability start time, and the generation time corresponding to the first type log as the unavailability start time. The unavailable end time, and then the period between the unavailable start time and the unavailable end time is taken as the unavailable time period.
例如:假设某一条第一类型日志的生成时刻为2021年11月27日00时08分49秒,从该条第一类型日志处向前查找到的第一条第二类型日志的生成时刻为2021年11月27日00时05分36秒,则此时目标递归服务器的不可用时段为[2021-11-27 00:05:36]-[2021-11-27 00:08:49],不可用时长为3分13秒。For example: Assuming that the generation time of a first-type log is 00:08:49 on November 27, 2021, the generation time of the first second-type log found forward from the first-type log is: At 00:05:36 on November 27, 2021, the unavailable period of the target recursive server at this time is [2021-11-27 00:05:36]-[2021-11-27 00:08:49], Unavailable time is 3 minutes and 13 seconds.
本实施例通过从预设域名集中获取待访问域名,待访问域名为不存在的顶级域名;根据待访问域名访问目标递归服务器,并接收目标递归服务器反馈的域名解析结果;根据域名解析结果生成域名解析日志,并将域名解析日志写入预设日志文件中;基于预设日志文件确定目标递归服务器的不可用时段。由于是采用不存在的顶级域名访问目标递归服务器,根据反馈的域名解析结果即可确定目标递归服务器当前的可用状态,然后将根据域名解析结果生成的域名解析日志写入预设日志文件,统计预设日志文件中各域名解析日志对应的域名解析结果即可确定目标递归服务器的不可用时段。In this embodiment, the domain name to be accessed is obtained from the preset domain name set, and the domain name to be accessed is a non-existing top-level domain name; the target recursive server is accessed according to the domain name to be accessed, and the domain name resolution result fed back by the target recursive server is received; the domain name is generated according to the domain name resolution result Parse the log, and write the domain name resolution log into the preset log file; determine the unavailable period of the target recursive server based on the preset log file. Since the non-existent top-level domain name is used to access the target recursive server, the current available status of the target recursive server can be determined according to the feedback domain name resolution result, and then the domain name resolution log generated according to the domain name resolution result is written into the preset log file, and the statistical prediction The unavailable period of the target recursive server can be determined by setting the domain name resolution results corresponding to each domain name resolution log in the log file.
参考图3,图3为本发明一种递归服务器监测方法第二实施例的流程示意图。Referring to FIG. 3 , FIG. 3 is a schematic flowchart of a second embodiment of a recursive server monitoring method according to the present invention.
基于上述第一实施例,本实施例递归服务器监测方法在所述步骤S20之后,还包括:Based on the above-mentioned first embodiment, the recursive server monitoring method of this embodiment, after the step S20, further includes:
步骤S30':若所述域名解析结果为第三类型结果,则对所述预设域名集中的域名进行存在性校验。Step S30': if the domain name resolution result is the third type result, perform existence check on the domain names in the preset domain name set.
需要说明的是,随着时间推进,部分原本不存在的顶级域名可能会被某些个人或机构所使用,此时此类顶级域名可能会被目标递归服务器所缓存,该目标递归服务器可能不再需要访问根域名服务器,此时无法根据域名解析结果判定目标递归服务器是否可用,因此,需要进行相应的处理,将此类顶级域名从预设域名集中移除。It should be noted that, over time, some TLDs that did not exist may be used by some individuals or organizations. At this time, such TLDs may be cached by the target recursive server, and the target recursive server may no longer be available. It is necessary to access the root domain name server. At this time, it is impossible to determine whether the target recursive server is available according to the domain name resolution result. Therefore, corresponding processing is required to remove such top-level domain names from the preset domain name set.
可用理解的是,若域名解析结果为第三类型结果,则表示此时使用的待访问域名已经有个人或机构使用,此时使用该待访问域名获取的域名解析结果已经难以用于判定目标递归服务器是否可用,而此时也不确定预设域名集中是否还存在有其他已被个人或机构使用的顶级域名,因此,需要对预设域名集中的域名进行存在性校验。It can be understood that if the domain name resolution result is the third type result, it means that the domain name to be accessed at this time has already been used by an individual or organization, and the domain name resolution result obtained by using the domain name to be accessed at this time is difficult to be used to determine the target recursion. Whether the server is available, and it is uncertain whether there are other top-level domain names in the preset domain name set that have been used by individuals or institutions, therefore, it is necessary to perform an existence check on the domain names in the preset domain name set.
在具体实现中,为了保证对域名进行存在性校验的可靠性,本实施例所述对所述预设域名集中的域名进行存在性校验的步骤,可以包括:In a specific implementation, in order to ensure the reliability of performing existence verification on domain names, the step of performing existence verification on domain names in the preset domain name set described in this embodiment may include:
遍历所述预设域名集,并将遍历到的域名作为待校验域名;Traverse the preset domain name set, and use the traversed domain name as the domain name to be verified;
根据所述待校验域名访问根域名服务器,并接收所述根域名服务器反馈的域名校验结果;Access the root domain name server according to the domain name to be verified, and receive the domain name verification result fed back by the root domain name server;
根据所述域名校验结果确定所述待校验域名是否存在;Determine whether the domain name to be verified exists according to the domain name verification result;
若所述待校验域名存在,则判定所述待校验域名通过存在性校验;If the domain name to be verified exists, it is determined that the domain name to be verified has passed the existence check;
检测所述预设域名集中是否存在未被遍历到的域名,若不存在未被遍历到的域名,则结束对所述预设域名集的遍历。Detecting whether there is an untraversed domain name in the preset domain name set, and if there is no untraversed domain name, ending the traversal of the preset domain name set.
可以理解的是,由于根域名服务器是由权威机构所维护的,根域名服务器基本不可能出现无法访问的现象,因此,可以通过将待校验域名发送至根域名服务器进行解析校验,然后通过根域名服务器反馈的域名校验结果确定待校验域名是否存在,而若是待校验域名存在,则表示此时该待校验域名已经被某些个人或机构所使用,即该待校验域名已经存在,因此,此时可以判定待校验域名通过存在性校验。It is understandable that since the root domain name server is maintained by an authoritative organization, it is basically impossible for the root domain name server to be inaccessible. Therefore, the domain name to be verified can be sent to the root domain name server for parsing and verification, and then passed The domain name verification result fed back by the root domain name server determines whether the domain name to be verified exists. If the domain name to be verified exists, it means that the domain name to be verified has been used by some individuals or institutions at this time, that is, the domain name to be verified exists. It already exists. Therefore, it can be determined that the domain name to be verified has passed the existence verification.
可以理解的是,若预设域名集中不存在未被遍历到的域名,则表示对预设域名集中的所有域名均已经进行过存在性校验,则此时可以停止对预设域名集的遍历。若预设域名集中存在未被遍历到的域名,则表示预设域名集中还有域名未进行过存在性校验,则此时可以继续对预设域名集进行遍历。It can be understood that if there is no untraversed domain name in the preset domain name set, it means that all domain names in the preset domain name set have been checked for existence, and the traversal of the preset domain name set can be stopped at this time. . If there are domain names that have not been traversed in the preset domain name set, it means that there are domain names in the preset domain name set that have not been checked for existence, and the preset domain name set can be traversed at this time.
步骤S40':将通过存在性校验的域名从所述预设域名集中移除,并返回所述从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名的步骤。Step S40': remove the domain name that has passed the existence check from the preset domain name set, and return to the step of obtaining the domain name to be accessed from the preset domain name set, and the domain name to be accessed is a non-existing top-level domain name.
需要说明的是,若一域名通过存在性校验,则表示此域名已经有个人或机构在使用,即该域名已存在,则根据该域名访问目标递归服务器所获得的域名解析结果无法用于判定目标递归服务器是否可用,因此,需要将通过存在性校验的域名从所述预设域名集中移除,然后重新从预设域名集中获取待访问域名,重新对目标递归服务器进行访问。It should be noted that if a domain name passes the existence check, it means that this domain name is already in use by an individual or organization, that is, the domain name already exists, and the domain name resolution result obtained by accessing the target recursive server based on this domain name cannot be used for judgment. Whether the target recursive server is available, therefore, it is necessary to remove the domain name that has passed the existence check from the preset domain name set, and then obtain the domain name to be accessed from the preset domain name set again, and re-access the target recursive server.
本实施例通过在所述域名解析结果为第三类型结果时,对所述预设域名集中的域名进行存在性校验;将通过存在性校验的域名从所述预设域名集中移除,并返回所述从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名的步骤。由于域名解析结果为第三类型结果,则表示此时访问目标递归服务器所使用的域名已经被个人或机构所使用,此时会对预设域名集中的域名进行存在性校验,并将通过存在性校验的域名从预设域名集中移除,确保预设域名集中的域名均为不存在的顶级域名,从而保证了本发明递归服务器监测方法的正常运行。In this embodiment, when the domain name resolution result is a result of the third type, existence verification is performed on the domain names in the preset domain name set; the domain names that have passed the existence verification are removed from the preset domain name set, and returning to the step of obtaining the domain name to be accessed from the preset domain name set, where the domain name to be accessed is a non-existing top-level domain name. Since the domain name resolution result is the third type result, it means that the domain name used to access the target recursive server has already been used by an individual or institution. The domain name of the property check is removed from the preset domain name set to ensure that the domain names in the preset domain name set are all non-existent top-level domain names, thereby ensuring the normal operation of the recursive server monitoring method of the present invention.
此外,本发明实施例还提出一种存储介质,所述存储介质上存储有递归服务器监测程序,所述递归服务器监测程序被处理器执行时实现如上文所述的递归服务器监测方法的步骤。In addition, an embodiment of the present invention further provides a storage medium, on which a recursive server monitoring program is stored, and when the recursive server monitoring program is executed by a processor, implements the steps of the recursive server monitoring method described above.
参照图4,图4为本发明递归服务器监测装置第一实施例的结构框图。Referring to FIG. 4, FIG. 4 is a structural block diagram of the first embodiment of the recursive server monitoring apparatus of the present invention.
如图4所示,本发明实施例提出的递归服务器监测装置包括:As shown in FIG. 4 , the recursive server monitoring device proposed by the embodiment of the present invention includes:
         域名获取模块10,用于从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名;a domain 
         服务访问模块20,用于根据所述待访问域名访问目标递归服务器,并接收所述目标递归服务器反馈的域名解析结果;A 
         日志生成模块30,用于根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中;A 
         时段确定模块40,用于基于所述预设日志文件确定所述目标递归服务器的不可用时段。The 
本实施例通过从预设域名集中获取待访问域名,待访问域名为不存在的顶级域名;根据待访问域名访问目标递归服务器,并接收目标递归服务器反馈的域名解析结果;根据域名解析结果生成域名解析日志,并将域名解析日志写入预设日志文件中;基于预设日志文件确定目标递归服务器的不可用时段。由于是采用不存在的顶级域名访问目标递归服务器,根据反馈的域名解析结果即可确定目标递归服务器当前的可用状态,然后将根据域名解析结果生成的域名解析日志写入预设日志文件,统计预设日志文件中各域名解析日志对应的域名解析结果即可确定目标递归服务器的不可用时段。In this embodiment, the domain name to be accessed is obtained from the preset domain name set, and the domain name to be accessed is a non-existing top-level domain name; the target recursive server is accessed according to the domain name to be accessed, and the domain name resolution result fed back by the target recursive server is received; the domain name is generated according to the domain name resolution result Parse the log, and write the domain name resolution log into the preset log file; determine the unavailable period of the target recursive server based on the preset log file. Since the non-existent top-level domain name is used to access the target recursive server, the current available status of the target recursive server can be determined according to the feedback domain name resolution result, and then the domain name resolution log generated according to the domain name resolution result is written into the preset log file, and the statistical prediction The unavailable period of the target recursive server can be determined by setting the domain name resolution results corresponding to each domain name resolution log in the log file.
         进一步的,所述日志生成模块30,还用于从预设日志文件中读取前次解析日志;若所述域名解析结果与所述前次解析日志中的域名解析结果不一致,则根据域名解析结果生成域名解析日志,并将所述域名解析日志写入预设日志文件中。Further, the 
         进一步的,所述时段确定模块40,还用于读取所述预设日志文件中对应的域名解析结果为第一类型结果的域名解析日志,获得第一类型日志;在所述预设日志文件中从所述第一类型日志处向前查找对应的域名解析结果为第二类型结果的域名解析日志,获得所述第一类型日志对应的第二类型日志;根据所述第一类型日志及所述第二类型日志确定所述目标递归服务器的不可用时段。Further, the time 
         进一步的,所述服务访问模块20,还用于获取预设指令模板,并获取目标递归服务器的访问地址;根据所述访问地址及所述待访问域名对所述预设指令模板进行填充,获得域名访问指令;通过所述域名访问指令访问所述目标递归服务器。Further, the 
         进一步的,所述服务访问模块20,还用于若所述域名解析结果为第三类型结果,则对所述预设域名集中的域名进行存在性校验;将通过存在性校验的域名从所述预设域名集中移除,并返回所述从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名的步骤。Further, the 
         进一步的,所述服务访问模块20,还用于遍历所述预设域名集,并将遍历到的域名作为待校验域名;根据所述待校验域名访问根域名服务器,并接收所述根域名服务器反馈的域名校验结果;根据所述域名校验结果确定所述待校验域名是否存在;若所述待校验域名存在,则判定所述待校验域名通过存在性校验;检测所述预设域名集中是否存在未被遍历到的域名,若不存在未被遍历到的域名,则结束对所述预设域名集的遍历。Further, the 
         进一步的,所述域名获取模块10,还用于获取预设检测周期,根据所述预设检测周期生成域名检测条件;实时监测系统运行时刻,在所述系统运行时刻满足所述域名检测条件时,从预设域名集中获取待访问域名,所述待访问域名为不存在的顶级域名。Further, the domain 
应当理解的是,以上仅为举例说明,对本发明的技术方案并不构成任何限定,在具体应用中,本领域的技术人员可以根据需要进行设置,本发明对此不做限制。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 not described in detail in this embodiment, reference may be made to the recursive server monitoring method provided by any embodiment of the present invention, and details are not described herein again.
此外,需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。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. , 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 (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN202210376607.4A CN114465926B (en) | 2022-04-12 | 2022-04-12 | Recursive server monitoring method, device, equipment and storage medium | 
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN202210376607.4A CN114465926B (en) | 2022-04-12 | 2022-04-12 | Recursive server monitoring method, device, equipment and storage medium | 
Publications (2)
| Publication Number | Publication Date | 
|---|---|
| CN114465926A true CN114465926A (en) | 2022-05-10 | 
| CN114465926B CN114465926B (en) | 2022-07-01 | 
Family
ID=81417727
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| CN202210376607.4A Active CN114465926B (en) | 2022-04-12 | 2022-04-12 | Recursive server monitoring method, device, equipment and storage medium | 
Country Status (1)
| Country | Link | 
|---|---|
| CN (1) | CN114465926B (en) | 
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN115665009A (en) * | 2022-12-29 | 2023-01-31 | 鹏城实验室 | DNS root server state monitoring method and device, electronic equipment and medium | 
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20100037314A1 (en) * | 2008-08-11 | 2010-02-11 | Perdisci Roberto | Method and system for detecting malicious and/or botnet-related domain names | 
| US20100106854A1 (en) * | 2008-10-29 | 2010-04-29 | Hostway Corporation | System and method for controlling non-existing domain traffic | 
| US20100274970A1 (en) * | 2009-04-23 | 2010-10-28 | Opendns, Inc. | Robust Domain Name Resolution | 
| CN105391818A (en) * | 2015-11-26 | 2016-03-09 | 中国互联网络信息中心 | Authoritative name emergency resolution system and method based on recursive server | 
| CN106888280A (en) * | 2017-03-29 | 2017-06-23 | 北京奇虎科技有限公司 | DNS update methods, apparatus and system | 
| CN107819895A (en) * | 2017-11-16 | 2018-03-20 | 哈尔滨工业大学(威海) | The analysis method of TLD configuration and safety based on domain resource record | 
| CN108449444A (en) * | 2018-03-29 | 2018-08-24 | 江苏省未来网络创新研究院 | Local data transport method, self-loopa domain name analysis system and method | 
- 
        2022
        
- 2022-04-12 CN CN202210376607.4A patent/CN114465926B/en active Active
 
 
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20100037314A1 (en) * | 2008-08-11 | 2010-02-11 | Perdisci Roberto | Method and system for detecting malicious and/or botnet-related domain names | 
| US20100106854A1 (en) * | 2008-10-29 | 2010-04-29 | Hostway Corporation | System and method for controlling non-existing domain traffic | 
| US20100274970A1 (en) * | 2009-04-23 | 2010-10-28 | Opendns, Inc. | Robust Domain Name Resolution | 
| CN105391818A (en) * | 2015-11-26 | 2016-03-09 | 中国互联网络信息中心 | Authoritative name emergency resolution system and method based on recursive server | 
| CN106888280A (en) * | 2017-03-29 | 2017-06-23 | 北京奇虎科技有限公司 | DNS update methods, apparatus and system | 
| CN107819895A (en) * | 2017-11-16 | 2018-03-20 | 哈尔滨工业大学(威海) | The analysis method of TLD configuration and safety based on domain resource record | 
| CN108449444A (en) * | 2018-03-29 | 2018-08-24 | 江苏省未来网络创新研究院 | Local data transport method, self-loopa domain name analysis system and method | 
Non-Patent Citations (2)
| Title | 
|---|
| PATRICIA CALLEJO等: "Measuring the Global Recursive DNS Infrastructure: A View From the Edge", 《IEEE ACCESS ( VOLUME: 7)》 * | 
| 袁福祥等: "基于历史数据的异常域名检测算法", 《通信学报》 * | 
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN115665009A (en) * | 2022-12-29 | 2023-01-31 | 鹏城实验室 | DNS root server state monitoring method and device, electronic equipment and medium | 
Also Published As
| Publication number | Publication date | 
|---|---|
| CN114465926B (en) | 2022-07-01 | 
Similar Documents
| Publication | Publication Date | Title | 
|---|---|---|
| US20110161825A1 (en) | Systems and methods for testing multiple page versions across multiple applications | |
| CN111046310B (en) | Page processing method, device, server and computer readable storage medium | |
| CN107239701B (en) | Method and device for identifying malicious website | |
| CN110413476B (en) | Webpage crash monitoring method and device, computer equipment and storage medium | |
| WO2020015199A1 (en) | Dark web security evaluation method, server and computer readable storage medium | |
| US20080133739A1 (en) | Response time benchmarking | |
| CN106603296A (en) | Log processing method and device | |
| CN110990168B (en) | Three-layer associated information generation method, system, electronic equipment and storage medium | |
| CN111522714A (en) | Log query method and device, electronic equipment and storage medium | |
| CN110059278A (en) | Web page configuration method, server and computer readable storage medium | |
| CN114143047A (en) | Vulnerability detection method and device, terminal equipment, Web server and storage medium | |
| CN114465926B (en) | Recursive server monitoring method, device, equipment and storage medium | |
| CN113961928A (en) | Storage type cross-site scripting attack vulnerability detection method, device, equipment and storage medium | |
| CN109981533A (en) | A kind of ddos attack detection method, device, electronic equipment and storage medium | |
| CN113626483B (en) | Front-end caching method, system, equipment and storage medium for filling forms | |
| CN112671574B (en) | Front-end and back-end joint debugging method and device, proxy equipment and storage medium | |
| CN104980311B (en) | Predict the method, apparatus and system of network access | |
| CN119743462A (en) | Network request processing method, device, computer equipment and storage medium | |
| CN114090310B (en) | Abnormality detection method and device | |
| CN110753136B (en) | Domain name resolution method, device, equipment and storage medium | |
| CN114827085B (en) | Root server correctness monitoring method, device, device and storage medium | |
| CN104869182A (en) | Domain name resolution method and device | |
| CN110601926A (en) | Statistical method and device for throughput of Web service end system | |
| CN117251384B (en) | Interface automation test case generation method and system | |
| CN114143230B (en) | Method and device for calculating DNS resolution duration of dual-stack users | 
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 |