CN103780900B - A kind of ONVIF simulating test device and method - Google Patents
A kind of ONVIF simulating test device and method Download PDFInfo
- Publication number
- CN103780900B CN103780900B CN201410019202.0A CN201410019202A CN103780900B CN 103780900 B CN103780900 B CN 103780900B CN 201410019202 A CN201410019202 A CN 201410019202A CN 103780900 B CN103780900 B CN 103780900B
- Authority
- CN
- China
- Prior art keywords
- test
- message
- onvif
- camera
- unit
- 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
- 238000012360 testing method Methods 0.000 title claims abstract description 379
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000004088 simulation Methods 0.000 claims abstract description 39
- 238000001514 detection method Methods 0.000 claims abstract description 34
- 238000010998 test method Methods 0.000 claims abstract description 9
- 239000000523 sample Substances 0.000 claims description 32
- 239000000284 extract Substances 0.000 claims description 15
- 239000000344 soap Substances 0.000 claims description 14
- 238000005516 engineering process Methods 0.000 claims description 9
- 238000005538 encapsulation Methods 0.000 claims description 7
- 230000002452 interceptive effect Effects 0.000 claims description 7
- 108010076504 Protein Sorting Signals Proteins 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 10
- 238000012544 monitoring process Methods 0.000 description 22
- 230000004044 response Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000035945 sensitivity Effects 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种ONVIF模拟测试装置及方法,所述装置包括:设备搜索模块,所述设备搜索模块用于搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息;模拟检测模块,所述模拟检测模块基于所述相关信息,进行ONVIF模拟测试,其中,所述ONVIF模拟测试包括:协议分析测试、摄像机功能测试、扩展功能测试、自动测试和反向测试,解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。
The invention discloses an ONVIF simulation test device and method. The device includes: a device search module, the device search module is used to search for online camera devices in the same network segment, and obtain relevant information of the camera devices; Detection module, the simulation detection module carries out ONVIF simulation test based on the relevant information, wherein, the ONVIF simulation test includes: protocol analysis test, camera function test, extended function test, automatic test and reverse test, solves the current problem Some ONVIF tests have technical problems such as single test method, complex test, high test cost, and low test efficiency. They have realized simple, efficient, low-cost, and diversified technical effects of completing ONVIF tests.
Description
技术领域 technical field
本发明涉及视频监控测试领域,尤其涉及一种ONVIF模拟测试装置及方法。 The invention relates to the field of video surveillance testing, in particular to an ONVIF simulation testing device and method.
背景技术 Background technique
视频监控一直是人们关注的应用技术热点之一,它以其直观方便、信息内容丰富而被广泛应用于许多场合。变电站视频监控系统能实时、形象、真实地反映被监控对象,长时间获取变电站内的实时信息,极大地提高电网公司管理效率和自动化水平。随着用电量需求的增加,变电站的数量逐年递增;同时国家电网“三集五大”体系的建立,对变电站的无人值守和集中监控提出新的要求,对前端视频监控设备提出了新的需求。因此前端摄像机与网络硬盘录像机间通信协议标准化测试的重要性和必要性日益凸显。 Video surveillance has always been one of the hot spots of application technology that people pay attention to. It is widely used in many occasions because of its intuitive convenience and rich information content. The substation video monitoring system can reflect the monitored objects in real time, visually and truly, and obtain real-time information in the substation for a long time, which greatly improves the management efficiency and automation level of the power grid company. With the increase of demand for electricity, the number of substations is increasing year by year; at the same time, the establishment of the "three sets and five major" system of the State Grid puts forward new requirements for unattended and centralized monitoring of substations, and puts forward new requirements for front-end video surveillance equipment. Therefore, the importance and necessity of standardized testing of communication protocols between front-end cameras and network hard disk video recorders has become increasingly prominent.
目前,主要依靠ONVIF官方测试工具实现对摄像机的测试,没有一套系统的对网络硬盘录像机的测试系统。现场验收采用实体的摄像机和网络硬盘录像机进行ONVIF协议测试,实体的摄像机种类繁多,系统结构复杂,成本较高,并且操作复杂,导致测试的效率较低。 At present, mainly rely on ONVIF official test tools to test the camera, there is no systematic test system for network hard disk video recorders. On-site acceptance uses physical cameras and network hard disk video recorders for ONVIF protocol testing. There are many types of physical cameras, complex system structures, high costs, and complicated operations, resulting in low test efficiency.
本申请发明人在实现本申请实施例中发明技术方案的过程中,发现上述技术至少存在如下技术问题: In the process of realizing the technical solution of the invention in the embodiment of the present application, the inventor of the present application found that the above-mentioned technology has at least the following technical problems:
在现有技术中,由于现有的ONVIF测试采用实体的摄像机和网络硬盘录像机进行ONVIF协议测试,而实体的摄像机种类繁多,系统结构复杂,成本较高,并且操作复杂,并且现有的ONVIF测试只有对摄像机的测试平台,并且缺少“OSD字幕”、“遮挡告警”、“三维定焦”相关测试项的测试,没有从服务端平台对网络硬盘录像机的测试平台,所以现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题。 In the prior art, since the existing ONVIF test uses physical cameras and network hard disk video recorders for ONVIF protocol testing, and there are many types of physical cameras, the system structure is complex, the cost is high, and the operation is complicated, and the existing ONVIF test There is only a test platform for cameras, and there is a lack of tests related to "OSD subtitles", "occlusion alarm", and "3D fixed focus", and there is no test platform for network hard disk video recorders from the server platform, so the existing ONVIF test exists Technical problems such as single test method, complex test, high test cost and low test efficiency.
发明内容 Contents of the invention
本发明提供了一种ONVIF模拟测试装置及方法,解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 The invention provides an ONVIF simulation test device and method, which solves the technical problems of single test method, complex test, high test cost and low test efficiency in the existing ONVIF test, and realizes simplicity, high efficiency, low cost, Various technical effects of completing ONVIF tests.
为解决上述技术问题,本申请实施例提供了一种ONVIF模拟测试装置,所述装置包括: In order to solve the above technical problems, the embodiment of the present application provides an ONVIF simulation test device, the device includes:
设备搜索模块,所述设备搜索模块用于搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息; A device search module, the device search module is used to search for online camera devices in the same network segment, and obtain relevant information about the camera devices;
模拟检测模块,所述模拟检测模块基于所述相关信息,进行ONVIF模拟测试,其中,所述ONVIF模拟测试包括:协议分析测试、摄像机功能测试、扩展功能测试、自动测试和反向测试。 An analog detection module, which performs an ONVIF simulation test based on the relevant information, wherein the ONVIF simulation test includes: protocol analysis test, camera function test, extended function test, automatic test and reverse test.
其中,所述模拟检测模块具体包括: Wherein, the analog detection module specifically includes:
ONVIF协议分析测试单元,所述ONVIF协议分析测试单元用于对每一个ONVIF协议分析测试项的交互信息进行校验; ONVIF protocol analysis test unit, the ONVIF protocol analysis test unit is used to verify the interactive information of each ONVIF protocol analysis test item;
摄像机功能测试单元,所述摄像机功能测试单元用于摄像机功能测试; A camera function test unit, the camera function test unit is used for camera function test;
扩展功能测试单元,所述扩展功能测试单元用于实现对ONVIF协议扩展项功能测试; Extended function test unit, described extended function test unit is used for realizing the function test to ONVIF protocol extension item;
自动测试单元,所述自动测试单元用于在所述ONVIF协议测试单元的基础上,实现对被测设备进行协议的自动分布测试; An automatic test unit, the automatic test unit is used to realize the automatic distribution test of the protocol to the device under test on the basis of the ONVIF protocol test unit;
反向测试单元,所述反向测试单元实现从反面对被测设备进行协议测试,实现对测试的完整性。 A reverse test unit, the reverse test unit realizes the protocol test of the device under test from the reverse side, and realizes the integrity of the test.
其中,所述设备搜索模块具体为利用多播发单播回的方式搜索同一网段内在线的摄像机设备的模块,所述相关信息具体为所述摄像机设备的IP地址和标识所述摄像机设备的识别码以及描述所述摄像机设备详细信息的Scopes参数。 Wherein, the device search module is specifically a module for searching online camera devices in the same network segment by means of multicast and unicast, and the relevant information is specifically the IP address of the camera device and the identification of the camera device code and the Scopes parameter describing the detailed information of the camera device.
其中,所述设备搜索模块具体包括: Wherein, the device search module specifically includes:
消息生成单元,生成符合soap消息格式的Probe消息报文; A message generation unit generates a Probe message message conforming to the soap message format;
组播UDP消息发送单元,将生成Probe消息经组播UDP发送单元组播端口的组播段上发送组播UDP报文Probe消息,组播段接收到消息后向加入组播段的全网段内IPC设备发送Probe消息; The multicast UDP message sending unit will generate the Probe message and send the multicast UDP message Probe message on the multicast segment of the multicast port of the multicast UDP sending unit, and the multicast segment will send the message to the entire network segment that joined the multicast segment after receiving the message The internal IPC device sends a Probe message;
单播UDP消息接收单元,所述单播UDP消息接收单元用于将ONVIF服务端模拟器收到Probe后向NVR以单播UDP形式发送带有设备基本服务入口、UUID信息的ProbeMatch消息; The unicast UDP message receiving unit, the unicast UDP message receiving unit is used to send the ProbeMatch message with the device basic service entry, UUID information to the NVR in the form of unicast UDP after the ONVIF server emulator receives the Probe;
XML报文解析单元,所述XML报文解析单元用于将ONVIF测试仪收到ProbeMatch消息进行提取ProbeMatch中的关键元素并校验; XML message parsing unit, described XML message parsing unit is used for ONVIF tester receives ProbeMatch message and extracts the key element in ProbeMatch and checks;
信息显示单元,所述信息显示单元用于将提取到的关键信息显示在软件界面上。 An information display unit, configured to display the extracted key information on a software interface.
其中,所述ONVIF协议分析测试单元具体为基于ONVIF标准规定,完成对协议接口的SOAP封装格式的规范性测试、媒体流接口的RTP/RTSP协议规范性测试的单元。 Wherein, the ONVIF protocol analysis and testing unit is specifically a unit that completes the standardization test of the SOAP encapsulation format of the protocol interface and the RTP/RTSP protocol standardization test of the media stream interface based on the ONVIF standard.
其中,所述摄像机功能测试单元具体包括: Wherein, the camera function test unit specifically includes:
设备管理子单元,所述设备管理子单元测试摄像机的基本设置功能,如:设备校时、重启、获取设备信息、获取能力集; A device management subunit, the device management subunit tests the basic setting functions of the camera, such as: device time calibration, restart, obtaining device information, and obtaining capability sets;
云台操作子单元,所述云台操作子单元测试网络球机云台相关功能,如:云台转动、预置点配置、三维定焦; The pan-tilt operation subunit, the pan-tilt operation sub-unit tests the functions related to the pan-tilt of the network dome machine, such as: pan-tilt rotation, preset point configuration, and three-dimensional fixed focus;
媒体管理子单元,所述媒体管理子单元测试摄像机播放实时视频的能力以及视频相关参数的配置功能; A media management subunit, the media management subunit tests the ability of the camera to play real-time video and the configuration function of video related parameters;
视频分析子单元,所述视频分析子单元测试配置移动侦测和遮挡侦测的区域、灵敏度等相关参数; A video analysis subunit, the video analysis subunit tests and configures related parameters such as the area and sensitivity of motion detection and occlusion detection;
告警信息子单元,所述告警信息子单元测试摄像机的告警功能,如:测试移动侦测和遮挡侦测的告警配置、告警订阅、告警轮训上报。 Alarm information sub-unit, the alarm information sub-unit tests the alarm function of the camera, such as: testing the alarm configuration of motion detection and occlusion detection, alarm subscription, alarm rotation training and reporting.
其中,所述扩展功能测试单元具体包括: Wherein, the extended function test unit specifically includes:
三维定焦扩展子单元,所述三维定焦扩展子单元用于对监控画面中的特定区域进行迅速定位; A three-dimensional fixed-focus expansion subunit, the three-dimensional fixed-focus expansion subunit is used to quickly locate a specific area in the monitoring screen;
OSD配置扩展子单元,所述OSD配置扩展子单元用于在监控屏幕上设置监控时间、地点以及其他注释,便于查询监控信息,定位事故报警地点; OSD configuration extension subunit, the OSD configuration extension subunit is used to set monitoring time, place and other notes on the monitoring screen, so as to facilitate the query of monitoring information and locate the accident alarm location;
遮挡告警扩展子单元,所述遮挡告警扩展子单元用于检测摄像机镜头是否被异物遮挡,防止由于天气原因将异物吹盖到摄像机镜头上导致监控出现盲区。 The occlusion alarm extension subunit is used to detect whether the camera lens is blocked by foreign objects, so as to prevent blind spots in monitoring caused by foreign objects being blown onto the camera lens due to weather.
另一方面,本申请实施例还提供了一种ONVIF模拟测试方法,所述方法包括: On the other hand, the embodiment of the present application also provides an ONVIF simulation test method, the method comprising:
利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息; Use the device search module to search for online camera devices in the same network segment, and obtain relevant information about the camera devices;
基于所述相关信息,进行ONVIF模拟测试,其中,所述ONVIF模拟测试包括:协议分析测试、摄像机功能测试、扩展功能测试、自动测试和反向测试。 Based on the relevant information, an ONVIF simulation test is performed, wherein the ONVIF simulation test includes: protocol analysis test, camera function test, extended function test, automatic test and reverse test.
进一步的,所述协议分析测试具体为对每一个ONVIF协议分析测试项的交互信息进行校验; Further, the protocol analysis test is specifically to verify the interaction information of each ONVIF protocol analysis test item;
所述摄像机功能测试具体为通过对摄像机功能划分,实现对摄像机功能和协议的完整测试; The camera function test is specifically to realize a complete test of camera functions and protocols by dividing camera functions;
所述扩展功能测试具体为基于ONVIF标准协议形式和WebServices技术,实现三维定焦、OSD配置、遮挡侦测扩展项的协议、功能测试; The extended function test is specifically based on the ONVIF standard protocol form and WebServices technology to realize the protocol and function test of three-dimensional fixed focus, OSD configuration, and occlusion detection extension items;
所述自动测试具体为利用信号时序控制方法实现对被测设备进行协议的自动分步测试; The automatic test specifically uses the signal sequence control method to realize the automatic step-by-step test of the protocol of the device under test;
所述反向测试具体为总结前端摄像机和网络硬盘录像机常见典型错误案列,从消息头和消息体进行反向修改,重新生成测试请求报文,对测试设备进行测试。 The reverse test specifically summarizes common typical error cases of front-end cameras and network hard disk video recorders, reversely modifies the message header and message body, regenerates the test request message, and tests the test equipment.
进一步的,所述利用设备搜索模块搜索同一网段内在线的摄像机设备具体为:利用多播发单播回的方式搜索同一网段内在线的摄像机设备;所述相关信息具体为所述摄像机设备的IP地址和标识所述摄像机设备的识别码以及描述所述摄像机设备详细信息的Scopes参数。 Further, using the device search module to search for online camera devices in the same network segment specifically includes: searching for online camera devices in the same network segment by using multicast to send unicast back; the relevant information is specifically the camera device's An IP address, an identification code identifying the camera device, and a Scopes parameter describing detailed information of the camera device.
进一步的,所述利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息具体包括: Further, using the device search module to search for online camera devices in the same network segment, and obtaining relevant information about the camera devices specifically includes:
生成符合soap消息格式的Probe消息报文; Generate a Probe message message conforming to the soap message format;
将生成Probe消息经组播UDP发送单元向组播端口的组播段上发送组播UDP报文Probe消息,组播段接收到消息后向加入组播段的全网段内IPC设备发送Probe消息; The generated Probe message will be sent to the multicast segment of the multicast port via the multicast UDP sending unit to send the multicast UDP packet Probe message. After receiving the message, the multicast segment will send the Probe message to the IPC devices in the entire network segment that have joined the multicast segment. ;
ONVIF服务端模拟器收到Probe后向NVR以单播UDP形式发送带有设备基本服务入口、UUID信息的ProbeMatch消息; After receiving the Probe, the ONVIF server simulator sends a ProbeMatch message with the basic service entry and UUID information of the device to the NVR in the form of unicast UDP;
ONVIF测试仪收到ProbeMatch消息后,通过XML报文解析单元提取ProbeMatch中的关键元素并校验; After the ONVIF tester receives the ProbeMatch message, it extracts and verifies the key elements in the ProbeMatch through the XML message parsing unit;
通过信息显示单元将提取到的关键信息显示在软件界面上。 The extracted key information is displayed on the software interface through the information display unit.
进一步的,所述ONVIF协议分析测试具体为:对协议接口的SOAP封装格式的规范性测试、媒体流接口的RTP/RTSP协议规范性测试; Further, the ONVIF protocol analysis test is specifically: the normative test of the SOAP encapsulation format of the protocol interface, the RTP/RTSP protocol normative test of the media stream interface;
进一步的,所述通过对摄像机功能划分,实现对摄像机功能和协议的完整测试具体包括: Further, the complete testing of camera functions and protocols by dividing camera functions specifically includes:
利用设备管理子单元测试摄像机的基本设置功能,如:设备校时、重启、获取设备信息、获取能力集; Use the device management subunit to test the basic setting functions of the camera, such as: device time calibration, restart, obtain device information, obtain capability set;
利用云台操作子单元测试网络球机云台相关功能,如:云台转动、预置点配置、三维定焦; Use the pan/tilt operation subunit to test the related functions of the network dome pan/tilt, such as: pan/tilt rotation, preset point configuration, and three-dimensional fixed focus;
利用媒体管理子单元测试摄像机播放实时视频的能力以及视频相关参数的配置功能; Use the media management subunit to test the ability of the camera to play real-time video and the configuration function of video-related parameters;
利用视频分析子单元测试配置移动侦测和遮挡侦测的区域、灵敏度等相关参数; Use the video analysis subunit to test and configure related parameters such as the area and sensitivity of motion detection and occlusion detection;
利用告警信息子单元测试摄像机的告警功能,如:测试移动侦测和遮挡侦测的告警配置、告警订阅、告警轮训上报。 Use the alarm information subunit to test the alarm function of the camera, such as: test the alarm configuration of motion detection and occlusion detection, alarm subscription, alarm rotation training and reporting.
进一步的,所述基于ONVIF标准协议形式和WebServices技术,实现三维定焦、OSD配置、遮挡侦测扩展项的协议、功能测试具体包括: Further, based on the ONVIF standard protocol form and WebServices technology, the protocol and function test for realizing three-dimensional fixed focus, OSD configuration, and occlusion detection extension items specifically include:
利用三维定焦扩展子单元完成对监控画面中的特定区域进行迅速定位; Use the three-dimensional fixed-focus expansion sub-unit to complete the rapid positioning of a specific area in the monitoring screen;
利用OSD配置扩展子单元完成在监控屏幕上设置监控时间、地点以及其他注释,便于查询监控信息,定位事故报警地点; Use the OSD configuration extension subunit to complete the setting of monitoring time, location and other notes on the monitoring screen, which is convenient for querying monitoring information and locating the location of the accident alarm;
利用遮挡告警扩展子单元完成检测摄像机镜头是否被异物遮挡,防止由于天气原因将异物吹盖到摄像机镜头上导致监控出现盲区。 Use the blocking alarm extension subunit to complete the detection of whether the camera lens is blocked by foreign objects, and prevent blind spots in monitoring caused by foreign objects blown onto the camera lens due to weather.
本申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点: One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
由于采用了首先利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息;然后基于所述相关信息,进行ONVIF模拟测试的技术手段,即首先利用客户端和服务端实现设备搜索和设备上线,获取设备IP地址和通讯端口,然后向被测设备发送获取能力集请求消息,并且获取被测项所属的服务入口地址,然后先向被测摄像机发送获取测试项必选参数的请求消息,然后通过XML报文解析单元提取消息中关键信息,利用所述关键信息进行测试,最后记录测试结果、保存测试相关文件、生成测试报告,即利用模拟系统替代了原有的实体网络硬盘录像机和前端摄像机来进行ONVIF协议和功能测试,所以,有效解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,进而实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 Due to adopting the technical means of first using the device search module to search online camera devices in the same network segment, and obtaining the relevant information of the camera devices; The end implements device search and device online, obtains the device IP address and communication port, then sends a request message for obtaining a capability set to the device under test, and obtains the service entry address to which the item under test belongs, and then first sends a request message for obtaining the test item to the camera under test. Select the parameter request message, then extract the key information in the message through the XML message parsing unit, use the key information for testing, and finally record the test results, save test related files, and generate test reports, that is, use the simulation system to replace the original The physical network hard disk video recorder and front-end camera are used for ONVIF protocol and functional testing, so it effectively solves the technical problems of existing ONVIF testing such as single testing method, complex testing, high testing cost, and low testing efficiency, and realizes a simple , Efficient, low-cost, and diverse technical effects of completing ONVIF testing.
附图说明 Description of drawings
图1是本申请实施例一中ONVIF模拟测试装置的结构示意图; Fig. 1 is the structural representation of ONVIF analog test device in the embodiment one of the present application;
图2是本申请实施例一中模拟测试模块的结构示意图; Fig. 2 is a schematic structural diagram of a simulation test module in Embodiment 1 of the present application;
图3是本申请实施例一中设备搜索模块的结构示意图; FIG. 3 is a schematic structural diagram of a device search module in Embodiment 1 of the present application;
图4是本申请实施例一中摄像机功能测试单元的结构示意图; 4 is a schematic structural diagram of a camera function test unit in Embodiment 1 of the present application;
图5是本申请实施例一中扩展功能测试单元的结构示意图; FIG. 5 is a schematic structural diagram of an extended function test unit in Embodiment 1 of the present application;
图6是本申请实施例一中ONVIF模拟测试方法的流程图; Fig. 6 is the flow chart of ONVIF simulation test method in the embodiment one of the present application;
图7是本申请实施例一中预置点操作测试流程图。 Fig. 7 is a flow chart of preset point operation test in Embodiment 1 of the present application.
具体实施方式 detailed description
本发明提供了一种ONVIF模拟测试装置及方法,解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 The invention provides an ONVIF simulation test device and method, which solves the technical problems of single test method, complex test, high test cost and low test efficiency in the existing ONVIF test, and realizes simplicity, high efficiency, low cost, Various technical effects of completing ONVIF tests.
本申请实施中的技术方案为解决上述技术问题。总体思路如下: The technical solution in the implementation of this application is to solve the above technical problems. The general idea is as follows:
首先利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息;然后基于所述相关信息,进行ONVIF模拟测试的技术手段,即首先利用客户端和服务端实现设备搜索和设备上线,获取设备IP地址和通讯端口,然后向被测设备发送获取能力集请求消息,并且获取被测项所属的服务入口地址,然后先向被测摄像机发送获取测试项必选参数的请求消息,然后通过XML报文解析单元提取消息中关键信息,利用所述关键信息进行测试,最后记录测试结果、保存测试相关文件、生成测试报告,即利用模拟系统替代了原有的实体网络硬盘录像机和前端摄像机来进行ONVIF协议和功能测试,所以,有效解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,进而实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 First, use the device search module to search for online camera devices in the same network segment, and obtain relevant information about the camera device; then, based on the relevant information, carry out the technical means of ONVIF simulation testing, that is, first use the client and server to implement the device Search and go online with the device, obtain the IP address and communication port of the device, then send a capability set request message to the device under test, and obtain the address of the service entry to which the item under test belongs, and then first send the required parameters of the test item to the camera under test Request the message, then extract the key information in the message through the XML message parsing unit, use the key information to test, and finally record the test results, save test-related files, and generate a test report, that is, use the simulation system to replace the original physical network hard disk Video recorders and front-end cameras are used to perform ONVIF protocol and function tests, so it effectively solves the technical problems of single test method, complex test, high test cost and low test efficiency in the existing ONVIF test, and realizes simple, efficient, Low-cost, diversified technical effects of completing ONVIF testing.
为了更好的理解上述技术方案,下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的说明。 In order to better understand the above-mentioned technical solution, the above-mentioned technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
实施例一: Embodiment one:
在实施例一中,提供了一种ONVIF模拟测试装置,请参考图1-图5,所述装置包括: In Embodiment 1, a kind of ONVIF simulation test device is provided, please refer to Fig. 1-Fig. 5, described device comprises:
设备搜索模块101,所述设备搜索模块101用于搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息; A device search module 101, the device search module 101 is used to search for online camera devices in the same network segment, and obtain relevant information of the camera devices;
模拟检测模块102,所述模拟检测模块102基于所述相关信息,进行ONVIF模拟测试,其中,所述ONVIF模拟测试包括:协议分析测试、摄像机功能测试、扩展功能测试、自动测试和反向测试。 The simulation detection module 102, the simulation detection module 102 performs ONVIF simulation test based on the relevant information, wherein, the ONVIF simulation test includes: protocol analysis test, camera function test, extended function test, automatic test and reverse test.
其中,在本申请实施例中,所述模拟检测模块102具体包括: Wherein, in the embodiment of the present application, the analog detection module 102 specifically includes:
ONVIF协议分析测试单元1021,所述ONVIF协议分析测试单元1021用于对每一个ONVIF协议分析测试项的交互信息进行校验; ONVIF protocol analysis and testing unit 1021, the ONVIF protocol analysis and testing unit 1021 is used to check the interactive information of each ONVIF protocol analysis test item;
摄像机功能测试单元1022,所述摄像机功能测试单元1022用于摄像机功能测试; Camera function test unit 1022, the camera function test unit 1022 is used for camera function test;
扩展功能测试单元1023,所述扩展功能测试单元1023用于实现对ONVIF协议扩展项功能测试; Extended function test unit 1023, described extended function test unit 1023 is used to realize to ONVIF protocol extension item function test;
自动测试单元1024,所述自动测试单元1024用于在所述ONVIF协议测试单元1021的基础上,实现对被测设备进行协议的自动分布测试; Automatic test unit 1024, described automatic test unit 1024 is used for on the basis of described ONVIF protocol test unit 1021, realizes the automatic distribution test of agreement to the equipment under test;
反向测试单元1025,所述反向测试单元1025实现从反面对被测设备进行协议测试,实现对测试的完整性。 A reverse test unit 1025, the reverse test unit 1025 implements a protocol test on the device under test from the reverse side, and realizes the integrity of the test.
其中,在本申请实施例中,所述协议分析测试单元1021对每一个ONVIF协议测试项的交互信息内容完整性和每个测试项的消息头、消息体进行校验。通过一问一答的双向交互机制,即ONVIF测试仪(客户端)先向前端IPC(服务端)发送基本的服务入口请求消息,当IPC收到请求消息后,向ONVIF测试仪发送带有自身设备能力信息的响应消息,一旦ONVIF测试仪收到响应消息后,通过消息处理子模块对响应报文的消息体进行校验,提取消息体中有关进一步测试所必须的元素,所述协议分析测试单元1021具备ONVIF服务端能力,通过模拟服务端设备,实现对ONVIF客户端设备的协议一致性和互通性测试。 Wherein, in the embodiment of the present application, the protocol analysis and testing unit 1021 checks the integrity of the interactive information content of each ONVIF protocol test item and the message header and message body of each test item. Through the two-way interactive mechanism of one question and one answer, that is, the ONVIF tester (client) first sends a basic service entry request message to the front-end IPC (server), and when the IPC receives the request message, it sends the ONVIF tester with its own The response message of the device capability information, once the ONVIF tester receives the response message, checks the message body of the response message through the message processing submodule, extracts the necessary elements for further testing in the message body, and the protocol analysis test Unit 1021 has ONVIF server capability, and implements protocol consistency and interoperability testing of ONVIF client devices by simulating server devices.
其中,在本申请实施例中,所述设备搜索模块101具体为利用多播发单播回的方式搜索同一网段内在线的摄像机设备的模块,所述相关信息具体为所述摄像机设备的IP地址和标识所述摄像机设备的识别码以及描述所述摄像机设备详细信息的Scopes参数。 Wherein, in the embodiment of the present application, the device search module 101 is specifically a module for searching online camera devices in the same network segment by means of multicast and unicast back, and the relevant information is specifically the IP address of the camera device and the identification code identifying the camera device and the Scopes parameter describing the detailed information of the camera device.
其中,在实际应用中,所述设备搜索模块101具体用于搜索同一网段内在线摄像机设备,是对设备进行测试的入口模块。所述设备搜索模块是NVR和前端IPC之间的一种信息交互。 Wherein, in practical applications, the device search module 101 is specifically used to search for online camera devices in the same network segment, and is an entry module for testing devices. The device search module is an information interaction between the NVR and the front-end IPC.
其中,在本申请实施例中,所述设备搜索模块101具体包括: Wherein, in the embodiment of the present application, the device search module 101 specifically includes:
消息生成单元1011,生成符合soap消息格式的Probe消息报文; The message generating unit 1011 generates a Probe message message conforming to the soap message format;
组播UDP消息发送单元1012,将生成Probe消息经组播UDP发送单元1012组播端口的组播段上发送组播UDP报文Probe消息,组播段接收到消息后向加入组播段的全网段内IPC设备发送Probe消息; The multicast UDP message sending unit 1012 will generate the Probe message and send the multicast UDP packet Probe message on the multicast section of the multicast UDP sending unit 1012 multicast port, and the multicast section will send the message to all the members who joined the multicast section after receiving the message. IPC devices in the network segment send Probe messages;
单播UDP消息接收单元1013,所述单播UDP消息接收单元1013用于将ONVIF服务端模拟器收到Probe后向NVR以单播UDP形式发送带有设备基本服务入口、UUID信息的ProbeMatch消息; The unicast UDP message receiving unit 1013, the unicast UDP message receiving unit 1013 is used to send the ProbeMatch message with the device basic service entry, UUID information to the NVR with the unicast UDP form after the ONVIF server emulator receives the Probe;
XML报文解析单元1014,所述XML报文解析单元1014用于将ONVIF测试仪收到ProbeMatch消息进行提取ProbeMatch中的关键元素并校验; XML message parsing unit 1014, described XML message parsing unit 1014 is used for ONVIF tester receives ProbeMatch message and extracts the key element in ProbeMatch and checks;
信息显示单元1015,所述信息显示单元1015用于将提取到的关键信息显示在软件界面上。 An information display unit 1015, the information display unit 1015 is configured to display the extracted key information on a software interface.
其中,在本申请实施例中,所述ONVIF协议分析测试单元1021具体为基于ONVIF标准规定,完成对协议接口的SOAP封装格式的规范性测试、媒体流接口的RTP/RTSP协议规范性测试的单元。 Wherein, in the embodiment of the present application, the ONVIF protocol analysis and testing unit 1021 is specifically based on the ONVIF standard, and completes the normative test of the SOAP encapsulation format of the protocol interface, and the unit of the RTP/RTSP protocol normative test of the media stream interface. .
在实际应用中,所述ONVIF协议分析测试单元1021包括ONVIF服务端模拟测试子单元和客户端模拟测试子单元。ONVIF测试仪服务端完成的协议测试内容包括对协议接口的SOAP封装格式的规范性测试、媒体流接口的RTP/RTSP协议规范性测试。协议规范性测试主要对每一个ONVIF协议测试项的交互信息内容完整性和每个测试项的消息头、消息体进行校验。 In practical applications, the ONVIF protocol analysis and testing unit 1021 includes an ONVIF server simulation test subunit and a client simulation test subunit. The protocol test completed by the ONVIF tester server includes the standardization test of the SOAP encapsulation format of the protocol interface and the RTP/RTSP protocol standardization test of the media stream interface. The protocol normative test mainly verifies the integrity of the interactive information content of each ONVIF protocol test item and the message header and message body of each test item.
其中,在本申请实施例中,所述摄像机功能测试单元1022具体包括: Wherein, in the embodiment of the present application, the camera function testing unit 1022 specifically includes:
设备管理子单元10221,所述设备管理子单元10221测试摄像机的基本设置功能,如:设备校时、重启、获取设备信息、获取能力集; Device management subunit 10221, the device management subunit 10221 tests the basic setting functions of the camera, such as: device time calibration, restart, obtain device information, obtain capability set;
云台操作子单元10222,所述云台操作子单元10222测试网络球机云台相关功能,如:云台转动、预置点配置、三维定焦; The pan-tilt operation subunit 10222, the pan-tilt operation sub-unit 10222 tests the functions related to the pan-tilt of the network ball machine, such as: pan-tilt rotation, preset point configuration, and three-dimensional fixed focus;
媒体管理子单元10223,所述媒体管理子单元10223测试摄像机播放实时视频的能力以及视频相关参数的配置功能; Media management subunit 10223, the media management subunit 10223 tests the ability of the camera to play real-time video and the configuration function of video related parameters;
视频分析子单元10224,所述视频分析子单元10224测试配置移动侦测和遮挡侦测的区域、灵敏度等相关参数; Video analysis subunit 10224, the video analysis subunit 10224 tests and configures related parameters such as the area and sensitivity of motion detection and occlusion detection;
告警信息子单元10225,所述告警信息子单元10225测试摄像机的告警功能,如:测试移动侦测和遮挡侦测的告警配置、告警订阅、告警轮训上报。 Alarm information subunit 10225, the alarm information subunit 10225 tests the alarm function of the camera, such as: testing the alarm configuration of motion detection and occlusion detection, alarm subscription, and alarm rotation training report.
其中,在本申请实施例中,所述自动测试单元测试项分为设备管理、云台、媒体、视频分析、告警五大测试项。所述自动测试单元测试通过信号时序控制步骤具有连贯性。所述视自动测试单元1022利用信号时序控制方法实现对被测设备进行协议的自动分步测试,测试过程中,按照测试大项进行分类,每一类测试相对独立,但是该类中的测试项之间具有连贯性。获取配置参数的测试项必须在配置参数的测试项之前进行。 Wherein, in the embodiment of the present application, the test items of the automatic test unit are divided into five major test items: device management, pan/tilt, media, video analysis, and alarm. The automatic test unit tests the continuity through the signal sequence control step. The visual automatic test unit 1022 uses the signal timing control method to realize the automatic step-by-step test of the protocol of the device under test. During the test, it is classified according to the major test items. Each type of test is relatively independent, but the test items in this class There is continuity between them. The test item for obtaining the configuration parameter must be performed before the test item for the configuration parameter.
其中,在本申请实施例中,所述反向测试单元1025从反面对被测设备进行协议测试,实现对摄像机协议测试的完整性和严格性。所述反向测试单元1025总结前端摄像机和网络硬盘录像机常见典型错误案列,从消息头和消息体进行反向修改,重新生成测试请求报文,对测试设备进行测试。 Wherein, in the embodiment of the present application, the reverse testing unit 1025 performs a protocol test on the device under test from the reverse side, so as to realize the integrity and strictness of the camera protocol test. The reverse test unit 1025 summarizes common typical error cases of the front-end camera and network hard disk video recorder, reversely modifies the message header and message body, regenerates the test request message, and tests the test equipment.
其中,在实际应用中,首先搜索并添加一台被测IPC设备,并且确定测试项类型。然后,在测试界面上配置测试项类型的服务入口地址,当配置完服务入口后,添加测试报文模板,对需要测试的消息关键元素或者消息体格式进行修改,生成消息反向测试样例报文(由变电站运行常见错误总结而成)。然后,向IPC发送请求消息,当接收到消息后,对消息体进行校验,并且查看消息错误类型,判断消息错误类型是否符合消息修改的实际情况。反向测试从消息头和消息体进行反向修改(如消息头关键信息缺失,消息体XML格式错误),并且重新生成测试请求报文,对被测设备进行测试,并且通过测试记录显示测试结果,如果测试项通过,则表明设备对协议的处理不严格,如果测试不通过,则判断错误消息中的错误原因是否符合修改消息的实际情况,如果符合,则表明设备对协议校验严格,测试通过。 Wherein, in practical applications, firstly, a tested IPC device is searched and added, and the type of the test item is determined. Then, configure the service entry address of the test item type on the test interface. After configuring the service entry, add a test message template, modify the key elements of the message to be tested or the format of the message body, and generate a message reverse test sample report. Text (summarized from common errors in substation operation). Then, send a request message to the IPC. After receiving the message, check the message body, and check the message error type to determine whether the message error type matches the actual situation of the message modification. The reverse test reversely modifies the message header and message body (such as the key information of the message header is missing, the XML format of the message body is wrong), and regenerates the test request message, tests the device under test, and displays the test result through the test record , if the test item passes, it indicates that the device does not strictly handle the protocol. If the test fails, it is judged whether the error reason in the error message conforms to the actual situation of the modified message. If yes, it indicates that the device is strict with the protocol verification. pass.
其中,在本申请实施例中,所述扩展功能测试单元1023具体包括: Wherein, in the embodiment of the present application, the extended function testing unit 1023 specifically includes:
三维定焦扩展子单元10231,所述三维定焦扩展子单元10231用于对监控画面中的特定区域进行迅速定位; A three-dimensional fixed-focus expansion subunit 10231, the three-dimensional fixed-focus expansion subunit 10231 is used to quickly locate a specific area in the monitoring screen;
OSD配置扩展子单元10232,所述OSD配置扩展子单元10232用于在监控屏幕上设置监控时间、地点以及其他注释,便于查询监控信息,定位事故报警地点; OSD configuration extension subunit 10232, the OSD configuration extension subunit 10232 is used to set monitoring time, location and other notes on the monitoring screen, so as to facilitate query monitoring information and locate the accident alarm location;
遮挡告警扩展子单元10233,所述遮挡告警扩展子单元10233用于检测摄像机镜头是否被异物遮挡,防止由于天气原因将异物吹盖到摄像机镜头上导致监控出现盲区。 The occlusion alarm extension subunit 10233, the occlusion alarm extension subunit 10233 is used to detect whether the camera lens is blocked by foreign objects, so as to prevent blind spots in monitoring caused by foreign objects blown onto the camera lens due to weather.
其中,在本申请实施例中,本申请中的装置10首先利用客户端和服务端实现设备搜索和设备上线,获取设备IP地址和通讯端口。然后,装置10向被测设备发送获取能力集请求消息,并且获取被测项所属的服务入口地址。然后,装置10先向被测IPC发送获取测试项必选参数的请求消息,然后通过XML报文解析单元提取消息中关键信息,判断响应消息是否正确,如果消息错误,则提示消息错误类型,否则从响应消息中获取关键元素,生成下一步测试报文并且向被测设备发送请求消息,当接收到响应消息时,判断消息正误,如果消息错误,则提示消息错误类型,否则,解析消息,判断是否继续进行自动测试的其他测试项。然后,则记录测试结果、保存测试相关文件、生成测试报告。 Among them, in the embodiment of the present application, the device 10 in the present application first uses the client and server to realize device search and device online, and obtain the device IP address and communication port. Then, the apparatus 10 sends an acquisition capability set request message to the device under test, and acquires the service entry address to which the item under test belongs. Then, the device 10 first sends a request message to obtain the required parameters of the test item to the tested IPC, then extracts the key information in the message through the XML message parsing unit, and judges whether the response message is correct. If the message is wrong, it will prompt the message error type, otherwise Get the key elements from the response message, generate the next test message and send a request message to the device under test. When the response message is received, judge whether the message is correct or not. If the message is wrong, prompt the message error type. Otherwise, parse the message and judge Whether to continue other test items of the automatic test. Then, record test results, save test-related files, and generate test reports.
其中,在实际应用中,利用本申请实施例中的装置进行测试时,ONVIF模拟测试装置首先搜索并添加一台被测摄像机设备,并且确定测试项类型。然后,在测试界面上配置测试项类型的服务入口地址,当配置完服务入口后,ONVIF模拟测试装置添加测试报文模板,对需要测试的消息关键元素或者消息体格式进行修改,生成消息反向测试样例报文。然后,ONVIF模拟测试装置向摄像机发送请求消息,当接收到消息后,对消息体进行校验,并且查看消息错误类型,判断消息错误类型是否符合消息修改的实际情况。 Wherein, in practical application, when using the device in the embodiment of the present application for testing, the ONVIF simulation test device first searches and adds a camera device under test, and determines the type of test item. Then, configure the service entry address of the test item type on the test interface. After configuring the service entry, the ONVIF simulation test device adds a test message template, modifies the key elements of the message to be tested or the format of the message body, and generates a message reverse Test sample packets. Then, the ONVIF simulation test device sends a request message to the camera. After receiving the message, it checks the message body and checks the message error type to determine whether the message error type conforms to the actual situation of the message modification.
请参考图7,下面以预置点操作测试为例,利用本申请实施例中的装置的信号时序控制测试过程如下: Please refer to FIG. 7. Taking the preset point operation test as an example, the signal sequence control test process using the device in the embodiment of the present application is as follows:
A0.通过设备搜索模块101获取同一网段内被测设备,返回A01获取设备IP地址和通讯端口。 A0. Obtain the device under test in the same network segment through the device search module 101, and return to A01 to obtain the device IP address and communication port.
A1.向被测设备发送获取能力集请求消息,返回A11获取被测设备所属服务入口地址,如获取到预制位操作能力消息。 A1. Send a capability set request message to the device under test, and return to A11 to obtain the service entry address of the device under test, such as obtaining the prefabricated bit operation capability message.
A2.获取必选参数请求。 A2. Obtain the required parameter request.
A3.提取媒体概述,A31通过获取媒体概述,提取码流编号,验证接收消息响应。 A3. Extracting the media overview, A31 extracts the code stream number by acquiring the media overview, and verifies the received message response.
A4.设置预置位请求,首先需要生成预置点操作项的请求报文,生成报文时,需采用用户名和密码(WS-UserName)的认证方式将密码明文、20位随机字符串和20位时间序列三个参数通过Base64算法和SHA-1算法联合加密后得到密码的暗文形式,作为用户认证参数。生成请求报文后,向被测IPC发送请求消息,等待接收响应报文。A41校验响应消息时,如果消息是标准的SOAP消息,则记录消息名称,同时对消息类型进行定位,接着对消息头进行拆分、提取,检验消息头字段是否完备,然后对提取消息体,消息体中应该包含描述PTZ信息和其他服务信息的名称空间,如果是获取预置点测试,则消息体中应该包含GetPresetsResponse节点、Preset子节点(携带token值)和预置点相关参数。 A4. To set the preset position request, you first need to generate a request message for the preset point operation item. When generating the message, you need to use the authentication method of user name and password (WS-UserName) to pass the password plain text, 20-digit random string and 20 The three parameters of the bit time series are jointly encrypted by the Base64 algorithm and the SHA-1 algorithm to obtain the ciphertext form of the password, which is used as the user authentication parameter. After generating the request message, send the request message to the tested IPC, and wait for the response message to be received. When A41 checks the response message, if the message is a standard SOAP message, record the message name, locate the message type at the same time, then split and extract the message header, check whether the message header field is complete, and then extract the message body, The message body should contain a namespace describing PTZ information and other service information. If it is a preset point test, the message body should contain the GetPresetsResponse node, the Preset child node (carrying the token value) and preset point related parameters.
A5.调阅预制位请求,向被测IPC发送请求消息,等待接收响应报文,A51返回验证消息体中包含GotoPresetResponse空节点。 A5. Call the prefabricated bit request, send a request message to the tested IPC, and wait for the response message to be received. A51 returns a verification message body containing a GotoPresetResponse empty node.
A6.通过A41和A51消息校验消息生成测试报告,测试结束。 A6. Generate a test report through the A41 and A51 message verification messages, and the test ends.
上述本申请实施例中的技术方案,至少具有如下的技术效果或优点: The above-mentioned technical solutions in the embodiments of the present application have at least the following technical effects or advantages:
由于采用了首先利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息;然后基于所述相关信息,进行ONVIF模拟测试的技术手段,即首先利用客户端和服务端实现设备搜索和设备上线,获取设备IP地址和通讯端口,然后向被测设备发送获取能力集请求消息,并且获取被测项所属的服务入口地址,然后先向被测摄像机发送获取测试项必选参数的请求消息,然后通过XML报文解析单元提取消息中关键信息,利用所述关键信息进行测试,最后记录测试结果、保存测试相关文件、生成测试报告,即利用模拟系统替代了原有的实体网络硬盘录像机和前端摄像机来进行ONVIF协议和功能测试,所以,有效解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,进而实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 Due to adopting the technical means of first using the device search module to search online camera devices in the same network segment, and obtaining the relevant information of the camera devices; The end implements device search and device online, obtains the device IP address and communication port, then sends a request message for obtaining a capability set to the device under test, and obtains the service entry address to which the item under test belongs, and then first sends a request message for obtaining the test item to the camera under test. Select the parameter request message, then extract the key information in the message through the XML message parsing unit, use the key information for testing, and finally record the test results, save test related files, and generate test reports, that is, use the simulation system to replace the original The physical network hard disk video recorder and front-end camera are used for ONVIF protocol and functional testing, so it effectively solves the technical problems of existing ONVIF testing such as single testing method, complex testing, high testing cost, and low testing efficiency, and realizes a simple , Efficient, low-cost, and diverse technical effects of completing ONVIF testing.
另一方面,本申请实施例还提供了一种ONVIF模拟测试方法,请参考图6,所述方法包括: On the other hand, the embodiment of the present application also provides an ONVIF simulation test method, please refer to FIG. 6, the method includes:
S10,利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息; S10, using the device search module to search for online camera devices in the same network segment, and obtain relevant information about the camera devices;
S20,基于所述相关信息,进行ONVIF模拟测试,其中,所述ONVIF模拟测试包括:协议分析测试、摄像机功能测试、扩展功能测试、自动测试和反向测试。 S20. Based on the relevant information, perform an ONVIF simulation test, wherein the ONVIF simulation test includes: a protocol analysis test, a camera function test, an extended function test, an automatic test, and a reverse test.
其中,在本申请实施例中,所述协议分析测试具体为对每一个ONVIF协议分析测试项的交互信息进行校验; Wherein, in the embodiment of the present application, the protocol analysis test is specifically to verify the interaction information of each ONVIF protocol analysis test item;
所述摄像机功能测试具体为通过对摄像机功能划分,实现对摄像机功能和协议的完整测试; The camera function test is specifically to realize a complete test of camera functions and protocols by dividing camera functions;
所述扩展功能测试具体为基于ONVIF标准协议形式和WebServices技术,实现三维定焦、OSD配置、遮挡侦测扩展项的协议、功能测试; The extended function test is specifically based on the ONVIF standard protocol form and WebServices technology to realize the protocol and function test of three-dimensional fixed focus, OSD configuration, and occlusion detection extension items;
所述自动测试具体为利用信号时序控制方法实现对被测设备进行协议的自动分步测试; The automatic test specifically uses the signal sequence control method to realize the automatic step-by-step test of the protocol of the device under test;
所述反向测试具体为总结前端摄像机和网络硬盘录像机常见典型错误案列,从消息头和消息体进行反向修改,重新生成测试请求报文,对测试设备进行测试。 The reverse test specifically summarizes common typical error cases of front-end cameras and network hard disk video recorders, reversely modifies the message header and message body, regenerates the test request message, and tests the test equipment.
其中,在本申请实施例中,所述利用设备搜索模块搜索同一网段内在线的摄像机设备具体为:利用多播发单播回的方式搜索同一网段内在线的摄像机设备;所述相关信息具体为所述摄像机设备的IP地址和标识所述摄像机设备的识别码以及描述所述摄像机设备详细信息的Scopes参数。 Wherein, in the embodiment of the present application, the use of the device search module to search for online camera devices in the same network segment specifically includes: searching for online camera devices in the same network segment by means of multicast and unicast; the relevant information specifically IP address of the camera device, an identification code identifying the camera device, and a Scopes parameter describing detailed information of the camera device.
其中,在本申请实施例中,所述利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息具体包括: Wherein, in the embodiment of the present application, using the device search module to search for online camera devices in the same network segment, and obtaining relevant information about the camera devices specifically includes:
生成符合soap消息格式的Probe消息报文; Generate a Probe message message conforming to the soap message format;
将生成Probe消息经组播UDP发送单元向组播端口的组播段上发送组播UDP报文Probe消息,组播段接收到消息后向加入组播段的全网段内IPC设备发送Probe消息; The generated Probe message will be sent to the multicast segment of the multicast port via the multicast UDP sending unit to send the multicast UDP packet Probe message. After receiving the message, the multicast segment will send the Probe message to the IPC devices in the entire network segment that have joined the multicast segment. ;
ONVIF服务端模拟器收到Probe后向NVR以单播UDP形式发送带有设备基本服务入口、UUID信息的ProbeMatch消息; After receiving the Probe, the ONVIF server simulator sends a ProbeMatch message with the basic service entry and UUID information of the device to the NVR in the form of unicast UDP;
ONVIF测试仪收到ProbeMatch消息后,通过XML报文解析单元提取ProbeMatch中的关键元素并校验。 After the ONVIF tester receives the ProbeMatch message, it extracts and verifies the key elements in the ProbeMatch through the XML message parsing unit.
通过信息显示单元将提取到的关键信息显示在软件界面上。 The extracted key information is displayed on the software interface through the information display unit.
其中,在本申请实施例中,所述ONVIF协议分析测试具体为:对协议接口的SOAP封装格式的规范性测试、媒体流接口的RTP/RTSP协议规范性测试。 Wherein, in the embodiment of the present application, the ONVIF protocol analysis test specifically includes: the standardization test of the SOAP encapsulation format of the protocol interface, and the RTP/RTSP protocol standardization test of the media stream interface.
其中,在本申请实施例中,所述通过对摄像机功能划分,实现对摄像机功能和协议的完整测试具体包括: Wherein, in the embodiment of the present application, the complete testing of the camera functions and protocols by dividing the camera functions specifically includes:
利用设备管理子单元测试摄像机的基本设置功能,如:设备校时、重启、获取设备信息、获取能力集; Use the device management subunit to test the basic setting functions of the camera, such as: device time calibration, restart, obtain device information, obtain capability set;
利用云台操作子单元测试网络球机云台相关功能,如:云台转动、预置点配置、三维定焦; Use the pan/tilt operation subunit to test the related functions of the network dome pan/tilt, such as: pan/tilt rotation, preset point configuration, and three-dimensional fixed focus;
利用媒体管理子单元测试摄像机播放实时视频的能力以及视频相关参数的配置功能; Use the media management subunit to test the ability of the camera to play real-time video and the configuration function of video-related parameters;
利用视频分析子单元测试配置移动侦测和遮挡侦测的区域、灵敏度等相关参数; Use the video analysis subunit to test and configure related parameters such as the area and sensitivity of motion detection and occlusion detection;
利用告警信息子单元测试摄像机的告警功能,如:测试移动侦测和遮挡侦测的告警配置、告警订阅、告警轮训上报。 Use the alarm information subunit to test the alarm function of the camera, such as: test the alarm configuration of motion detection and occlusion detection, alarm subscription, alarm rotation training and reporting.
其中,在本申请实施例中,所述基于ONVIF标准协议形式和WebServices技术,实现三维定焦、OSD配置、遮挡侦测扩展项的协议、功能测试具体包括: Among them, in the embodiment of the present application, the protocol and function tests for implementing three-dimensional fixed focus, OSD configuration, and occlusion detection extension items based on the ONVIF standard protocol form and WebServices technology specifically include:
利用三维定焦扩展子单元完成对监控画面中的特定区域进行迅速定位; Use the three-dimensional fixed-focus expansion sub-unit to complete the rapid positioning of a specific area in the monitoring screen;
利用OSD配置扩展子单元完成在监控屏幕上设置监控时间、地点以及其他注释,便于查询监控信息,定位事故报警地点; Use the OSD configuration extension subunit to complete the setting of monitoring time, location and other notes on the monitoring screen, which is convenient for querying monitoring information and locating the location of the accident alarm;
利用遮挡告警扩展子单元完成检测摄像机镜头是否被异物遮挡,防止由于天气原因将异物吹盖到摄像机镜头上导致监控出现盲区。 Use the blocking alarm extension subunit to complete the detection of whether the camera lens is blocked by foreign objects, and prevent blind spots in monitoring caused by foreign objects blown onto the camera lens due to weather.
上述本申请实施例中的技术方案,至少具有如下的技术效果或优点: The above-mentioned technical solutions in the embodiments of the present application have at least the following technical effects or advantages:
由于采用了首先利用设备搜索模块搜索同一网段内在线的摄像机设备,并获取所述摄像机设备的相关信息;然后基于所述相关信息,进行ONVIF模拟测试的技术手段,即首先利用客户端和服务端实现设备搜索和设备上线,获取设备IP地址和通讯端口,然后向被测设备发送获取能力集请求消息,并且获取被测项所属的服务入口地址,然后先向被测摄像机发送获取测试项必选参数的请求消息,然后通过XML报文解析单元提取消息中关键信息,利用所述关键信息进行测试,最后记录测试结果、保存测试相关文件、生成测试报告,即利用模拟系统替代了原有的实体网络硬盘录像机和前端摄像机来进行ONVIF协议和功能测试,所以,有效解决了现有的ONVIF测试存在测试方法单一、测试复杂、测试成本较高、测试效率较低的技术问题,进而实现了简单、高效、低成本、多样化的完成ONVIF测试的技术效果。 Due to adopting the technical means of first using the device search module to search online camera devices in the same network segment, and obtaining the relevant information of the camera devices; The end implements device search and device online, obtains the device IP address and communication port, then sends a request message for obtaining a capability set to the device under test, and obtains the service entry address to which the item under test belongs, and then first sends a request message for obtaining the test item to the camera under test. Select the parameter request message, then extract the key information in the message through the XML message parsing unit, use the key information for testing, and finally record the test results, save test related files, and generate test reports, that is, use the simulation system to replace the original The physical network hard disk video recorder and front-end camera are used for ONVIF protocol and functional testing, so it effectively solves the technical problems of existing ONVIF testing such as single testing method, complex testing, high testing cost, and low testing efficiency, and realizes a simple , Efficient, low-cost, and diverse technical effects of completing ONVIF testing.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410019202.0A CN103780900B (en) | 2014-01-16 | 2014-01-16 | A kind of ONVIF simulating test device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410019202.0A CN103780900B (en) | 2014-01-16 | 2014-01-16 | A kind of ONVIF simulating test device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103780900A CN103780900A (en) | 2014-05-07 |
CN103780900B true CN103780900B (en) | 2016-02-17 |
Family
ID=50572672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410019202.0A Active CN103780900B (en) | 2014-01-16 | 2014-01-16 | A kind of ONVIF simulating test device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103780900B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109361871A (en) * | 2018-11-30 | 2019-02-19 | 四川九州电子科技股份有限公司 | A method of IP Camera is modeled as USB camera |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2682926C2 (en) * | 2014-11-13 | 2019-03-22 | Кэнон Кабусики Кайся | Device for processing information, management method and program |
CN104581138B (en) * | 2014-12-17 | 2017-06-16 | 广州动钛电子有限公司 | A kind of web camera investigating method and device |
CN105448058A (en) * | 2015-12-14 | 2016-03-30 | 讯美电子科技有限公司 | Method for simulating alarming of hard disk video recorder |
CN105657368A (en) * | 2016-01-06 | 2016-06-08 | 福建星网智慧科技股份有限公司 | Method for rapidly switching IPC (Inter Process Communication) camera into IP (Internet Protocol) multimedia system IMS |
CN106559271B (en) * | 2016-12-02 | 2019-10-18 | 浙江宇视科技有限公司 | A kind of resource access method and system |
CN106657905A (en) * | 2016-12-12 | 2017-05-10 | 深圳市中博睿存科技有限公司 | Video capture method and device based on onvif standard |
CN108965272A (en) * | 2018-07-02 | 2018-12-07 | 山东华软金盾软件股份有限公司 | A kind of method of detection network camera weak password |
CN109218104B (en) * | 2018-09-30 | 2021-12-07 | 天地伟业技术有限公司 | Method and device for realizing QoS network optimization based on Onvif protocol |
CN110113598A (en) * | 2019-04-17 | 2019-08-09 | 深圳市天视通电子科技有限公司 | A kind of Network Personal Video Recorder test method and system |
CN110536132B (en) * | 2019-08-30 | 2020-10-23 | 重庆紫光华山智安科技有限公司 | IPC simulation method, IPC simulation software system and server |
CN111031279A (en) * | 2019-11-29 | 2020-04-17 | 武汉烽火众智数字技术有限责任公司 | Monitoring platform-based simulation front-end equipment point location construction method and system |
CN113115032A (en) * | 2021-04-19 | 2021-07-13 | 广州欢网科技有限责任公司 | Batch testing method and device for smart television equipment and electronic equipment |
CN114022278B (en) * | 2021-11-05 | 2024-04-02 | 光大科技有限公司 | Analog transaction processing method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101060446A (en) * | 2007-05-25 | 2007-10-24 | 华为技术有限公司 | Network protocol test system and method |
CN101969233A (en) * | 2010-10-29 | 2011-02-09 | 广东电网公司电力科学研究院 | Testing method and device of power grid video and environment monitoring system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101348617B1 (en) * | 2010-11-22 | 2014-01-08 | 한국전자통신연구원 | Surveillance systemme using wireless network, master sensor node and server apparatus |
-
2014
- 2014-01-16 CN CN201410019202.0A patent/CN103780900B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101060446A (en) * | 2007-05-25 | 2007-10-24 | 华为技术有限公司 | Network protocol test system and method |
CN101969233A (en) * | 2010-10-29 | 2011-02-09 | 广东电网公司电力科学研究院 | Testing method and device of power grid video and environment monitoring system |
Non-Patent Citations (1)
Title |
---|
网络摄像机应用接口的研究与实现;马永昌;《中国优秀硕士学位论文全文数据库 信息科技辑,2013年第6期》;20130615;I136-1001 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109361871A (en) * | 2018-11-30 | 2019-02-19 | 四川九州电子科技股份有限公司 | A method of IP Camera is modeled as USB camera |
CN109361871B (en) * | 2018-11-30 | 2020-07-24 | 四川九州电子科技股份有限公司 | Method for simulating network camera as USB camera |
Also Published As
Publication number | Publication date |
---|---|
CN103780900A (en) | 2014-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103780900B (en) | A kind of ONVIF simulating test device and method | |
CN1893641B (en) | A digital media player exposing operational state data | |
CN105099811B (en) | Interface testing method and device | |
CN102594914B (en) | Remote debugging method based on cloud platform | |
CN109714221B (en) | Method, device and system for determining network data packet | |
CN104683736A (en) | Method and system for acquiring network video | |
CN103686072A (en) | Video internet video monitoring method and system, protocol conversion server, and video internet server | |
CN104185018B (en) | For web camera simulator and the testing method of video monitoring system test | |
CN102984028A (en) | Remote centralized test method for mobile terminals | |
CN107111594A (en) | Dynamic data management | |
CN104935883A (en) | Remote monitoring method and server | |
CN104735473A (en) | Video stream playing detection method and device | |
CN105959180A (en) | Data detection method and device | |
WO2017050106A1 (en) | Set-top box fault information processing method and apparatus, and set-top box | |
CN102331487A (en) | Device and method for automatically processing water quality monitoring data | |
CN108256811A (en) | Job information processing method, device, computer equipment and storage medium | |
CN105530137B (en) | Data on flows analysis method and data on flows analysis system | |
WO2016197690A1 (en) | Iptv service check method and device utilizing same | |
CN104935436B (en) | A kind of user authentication method and system | |
CN114727069A (en) | A charging station maintenance method, apparatus, device and computer readable medium | |
CN109979051A (en) | For veritifying the method, apparatus and computer readable storage medium of user identity | |
KR101784131B1 (en) | Method for providing video using messaging service, api server, and streaming server for providing video | |
CN104320309A (en) | Automatic testing system and method for automatic redial function | |
CN107579873A (en) | A kind of method of monitoring site availability | |
CN110647458A (en) | Testing method and device based on distributed testing platform and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |