[go: up one dir, main page]

CN115474040A - A testing method and device for network video recording equipment, electronic equipment and storage medium - Google Patents

A testing method and device for network video recording equipment, electronic equipment and storage medium Download PDF

Info

Publication number
CN115474040A
CN115474040A CN202211206621.6A CN202211206621A CN115474040A CN 115474040 A CN115474040 A CN 115474040A CN 202211206621 A CN202211206621 A CN 202211206621A CN 115474040 A CN115474040 A CN 115474040A
Authority
CN
China
Prior art keywords
information
test
picture
equipment
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211206621.6A
Other languages
Chinese (zh)
Inventor
韩賢达
梁选勤
余毅鹏
陈家劭
杨金河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN TIANSHITONG TECHNOLOGY CO LTD
Original Assignee
SHENZHEN TIANSHITONG TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN TIANSHITONG TECHNOLOGY CO LTD filed Critical SHENZHEN TIANSHITONG TECHNOLOGY CO LTD
Priority to CN202211206621.6A priority Critical patent/CN115474040A/en
Publication of CN115474040A publication Critical patent/CN115474040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/06Diagnosis, testing or measuring for television systems or their details for recorders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种网络录像设备的测试方法和装置、电子设备及存储介质,本申请涉及人工智能领域,其方法包括:获取待测设备当前的录像画面;对录像画面进行画面内容解析得到画面信息;根据预设的测试用例信息和画面信息进行命令生成得到操作命令;将操作命令发送至待测设备,以使待测设备根据操作命令执行对应操作,并接收待测设备反馈的返回数据;其中,返回数据包括:操作日志数据和设备配置数据;将操作日志数据、设备配置数据和预设的参考数据进行数据比对得到测试结果信息。本申请能够提高网络录像设备测试的准确性。

Figure 202211206621

The invention discloses a testing method and device, electronic equipment and a storage medium of a network video recording device. The application relates to the field of artificial intelligence, and the method includes: obtaining the current video recording screen of the device to be tested; analyzing the content of the video recording screen to obtain the screen Information; command generation according to the preset test case information and screen information to obtain the operation command; send the operation command to the device under test, so that the device under test performs the corresponding operation according to the operation command, and receive the return data fed back by the device under test; Among them, the returned data includes: operation log data and device configuration data; the test result information is obtained by comparing the operation log data, device configuration data and preset reference data. The application can improve the test accuracy of the network video recording equipment.

Figure 202211206621

Description

一种网络录像设备的测试方法和装置、电子设备及存储介质A testing method and device for network video recording equipment, electronic equipment and storage medium

技术领域technical field

本发明涉及设备测试技术领域,尤其涉及一种网络录像设备的测试方法和装置、电子设备及存储介质。The invention relates to the technical field of equipment testing, in particular to a testing method and device for network video recording equipment, electronic equipment and a storage medium.

背景技术Background technique

相关技术中,网络录像机通过shell脚本加上与Linux操作系统连接交互的工具进行简单的自动化测试,但是网络录像机自动化测试准确度低下、维护困难。因此,如何提高自动化测试的准确性,降低维护难度,成了亟待解决的技术问题。In related technologies, the network video recorder performs simple automated testing through shell scripts and tools for connecting and interacting with the Linux operating system, but the accuracy of the automated testing of the network video recorder is low and maintenance is difficult. Therefore, how to improve the accuracy of automated testing and reduce the difficulty of maintenance has become an urgent technical problem to be solved.

发明内容Contents of the invention

本申请实施例的主要目的在于提出一种网络录像设备的测试方法和装置、电子设备及存储介质,旨在提高网络录像机测试的准确性。The main purpose of the embodiment of the present application is to provide a test method and device for network video recorder, electronic equipment and storage medium, aiming at improving the test accuracy of network video recorder.

为实现上述目的,本申请实施例的第一方面提出了一种网络录像设备测试方法,所述方法包括:In order to achieve the above purpose, the first aspect of the embodiment of the present application proposes a method for testing a network video recording device, the method comprising:

获取待测设备当前的录像画面;Obtain the current recording screen of the device under test;

对所述录像画面进行画面内容解析,得到画面信息;Performing screen content analysis on the recorded video to obtain screen information;

根据预设的测试用例信息和所述画面信息进行命令生成,得到操作命令;generate a command according to the preset test case information and the screen information, and obtain an operation command;

将所述操作命令发送至所述待测设备,以使所述待测设备根据所述操作命令执行对应操作,并接收所述待测设备反馈的返回数据;其中,所述返回数据包括:操作日志数据和设备配置数据;Send the operation command to the device under test, so that the device under test performs a corresponding operation according to the operation command, and receive return data fed back by the device under test; wherein, the return data includes: operation log data and device configuration data;

将所述操作日志数据、所述设备配置数据和预设的参考数据进行数据比对,得到测试结果信息。Comparing the operation log data, the device configuration data and preset reference data to obtain test result information.

根据本发明的一些实施例,所述画面信息包括:页面文本、文本位置信息和颜色信息;所述对所述录像画面进行画面内容解析,得到画面信息,包括:According to some embodiments of the present invention, the picture information includes: page text, text position information, and color information; performing picture content analysis on the recorded picture to obtain picture information includes:

对所述录像画面进行内容解析得到所述页面文本;Performing content analysis on the video image to obtain the page text;

获取页面文本位于录像画面的位置信息,得到文本位置信息;Obtain the position information of the page text located in the recording screen, and obtain the text position information;

根据文本位置信息获取录像画面对应位置的颜色,得到颜色信息。The color of the corresponding position of the video image is obtained according to the text position information, and the color information is obtained.

根据本发明的一些实施例,所述根据预设的测试用例信息和所述画面信息进行命令生成,得到操作命令,包括:According to some embodiments of the present invention, the command generation according to the preset test case information and the screen information to obtain the operation command includes:

根据所述测试用例信息对所述画面信息进行关键词提取,得到关键词信息;performing keyword extraction on the screen information according to the test case information to obtain keyword information;

根据所述关键词信息生成所述操作命令。The operation command is generated according to the keyword information.

根据本发明的一些实施例,所述参考数据包括:操作流程参考数据和配置参考数据;所述将所述操作日志数据、所述设备配置数据和预设的参考数据进行数据比对,得到测试结果信息,包括:According to some embodiments of the present invention, the reference data includes: operation process reference data and configuration reference data; comparing the operation log data, the device configuration data and preset reference data to obtain a test Results information, including:

将操作日志数据和操作流程参考数据进行对比分析,得到操作流程测试信息;Compare and analyze the operation log data and the reference data of the operation process to obtain the test information of the operation process;

将设备配置数据和配置参考数据进行对比分析,得到配置测试信息;Compare and analyze device configuration data and configuration reference data to obtain configuration test information;

将操作流程测试信息和配置测试信息进行汇集处理,得到所述测试结果信息。The operation process test information and the configuration test information are collected and processed to obtain the test result information.

根据本发明的一些实施例,在所述将所述操作日志数据、设备配置数据和预设的参考数据进行数据比对,得到测试结果信息之后,所述方法还包括:According to some embodiments of the present invention, after comparing the operation log data, device configuration data and preset reference data to obtain test result information, the method further includes:

对测试前后画面对比,具体包括:Comparison of the images before and after the test, including:

获取所述待测设备测试前的画面,得到原始画面;Obtaining the picture of the device under test before testing to obtain the original picture;

获取所述待测设备测试后的画面,得到目标画面;Obtaining the screen of the device under test after testing to obtain the target screen;

将所述原始画面和所述目标画面进行对比分析,得到画面测试信息。Comparing and analyzing the original picture and the target picture to obtain picture test information.

根据本发明的一些实施例,在所述获取待测设备的录像画面之前,所述方法还包括:According to some embodiments of the present invention, before the acquisition of the video footage of the device under test, the method further includes:

与所述待测设备通讯连接,具体包括:The communication connection with the device under test specifically includes:

根据预设的设备标识信息从候选设备筛选出待测设备;Screen out the device to be tested from candidate devices according to preset device identification information;

根据预设的登录信息与待测设备建立通讯连接;其中,待测设备是网络录像机。A communication connection is established with the device under test according to preset login information; wherein, the device under test is a network video recorder.

根据本发明的一些实施例,在所述将所述操作日志数据、设备配置数据和预设的参考数据进行数据比对,得到测试结果信息之后,所述方法还包括:According to some embodiments of the present invention, after comparing the operation log data, device configuration data and preset reference data to obtain test result information, the method further includes:

生成测试报告,具体包括:Generate test reports, including:

获取报告生成请求;其中,所述报告生成请求包括测试需求信息;Obtain a report generation request; wherein, the report generation request includes test requirement information;

根据所述测试需求信息和所述测试用例信息将所述测试结果信息进行汇总处理,得到所述测试报告。and summarizing the test result information according to the test requirement information and the test case information to obtain the test report.

为实现上述目的,本申请实施例的第二方面提出了一种网络录像设备的测试装置,所述测试装置包括:In order to achieve the above purpose, the second aspect of the embodiment of the present application proposes a test device for network video recording equipment, the test device includes:

画面获取模块,获取待测设备当前的录像画面;The picture acquisition module acquires the current video picture of the device under test;

画面解析模块,对所述录像画面进行画面内容解析,得到画面信息;A picture analysis module, which analyzes the picture content of the video picture to obtain picture information;

命令生成模块,根据预设的测试用例信息和所述画面信息进行命令生成,得到操作命令;The command generation module generates a command according to the preset test case information and the picture information, and obtains the operation command;

命令发送模块,将所述操作命令发送至所述待测设备,以使所述待测设备根据所述操作命令执行对应操作,并接收所述待测设备反馈的返回数据;其中,所述返回数据包括:操作日志数据和设备配置数据;A command sending module, which sends the operation command to the device under test, so that the device under test performs a corresponding operation according to the operation command, and receives the return data fed back by the device under test; wherein, the return Data includes: operation log data and device configuration data;

数码比对模块,将所述操作日志数据、设备配置数据和预设的参考数据进行数据比对,得到测试结果信息。The digital comparison module compares the operation log data, equipment configuration data and preset reference data to obtain test result information.

为实现上述目的,本申请实施例的第三方面实施例的一种电子设备,所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如第一方面实施例所述的网络录像设备的测试方法。In order to achieve the above object, an electronic device according to the third aspect of the embodiment of the present application includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the computer program is implemented. The testing method of the network video recording device as described in the embodiment of the first aspect.

为实现上述目的,本申请实施例的第四方面实施例的一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的网络录像设备的测试方法。In order to achieve the above purpose, the fourth aspect of the embodiments of the present application is a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program described in the first aspect is implemented. The test method of the network video recording device.

本申请提出的一种网络录像设备的测试方法和装置、电子设备及存储介质,其通过获取待测设备的录像画面,对录像画面进行画面内容解析得到画面信息,根据预设的测试用例信息和画面信息进行命令生成得到操作命令,将操作命令发送至待测设备,以使待测设备根据操作命令执行对应操作,并接收待测设备反馈的返回数据,将操作日志数据、设备配置数据和预设的参考数据进行数据比对得到测试结果信息。因此,通过根据画面信息和测试用例信息生成操作命令,并将操作命令发送至待测设备执行对应的操作以实现远程对待测设备进行调试,同时接收待测设备返回的返回数据和预设的参考数据进行数据比对以得到测试结果信息,使得待测设备自动化测试简易且测试准确性提高。The present application proposes a testing method and device, electronic equipment and storage medium for a network video recording device, which acquires the video recording of the device to be tested, and analyzes the recording content of the recording to obtain the screen information, according to the preset test case information and The screen information is used to generate commands to obtain operation commands, and the operation commands are sent to the device under test, so that the device under test can perform corresponding operations according to the operation commands, and receive the return data fed back by the device under test, and store the operation log data, device configuration data and pre-test The set reference data is compared to obtain the test result information. Therefore, by generating operation commands according to the screen information and test case information, and sending the operation commands to the device under test to perform corresponding operations, remote debugging of the device under test is realized, and at the same time, the return data and preset reference returned by the device under test are received The data is compared to obtain the test result information, which makes the automatic test of the equipment under test easier and the test accuracy is improved.

附图说明Description of drawings

图1是本申请实施例提供的设备测试方法的流程图;Fig. 1 is a flow chart of the equipment testing method provided by the embodiment of the present application;

图2是本申请另一实施例提供的设备测试方法的流程图;FIG. 2 is a flowchart of a device testing method provided in another embodiment of the present application;

图3是图1中的步骤S102的流程图;Fig. 3 is the flowchart of step S102 in Fig. 1;

图4是图1中的步骤S104的流程图;Fig. 4 is the flowchart of step S104 in Fig. 1;

图5是图1中的步骤S105的流程图;Fig. 5 is the flowchart of step S105 in Fig. 1;

图6是本申请另一实施例提供的设备测试方法的流程图;FIG. 6 is a flowchart of a device testing method provided in another embodiment of the present application;

图7是本申请另一实施例提供的设备测试方法的流程图;FIG. 7 is a flowchart of a device testing method provided in another embodiment of the present application;

图8是本申请一实施例提供的设备测试装置的装置结构图;Fig. 8 is a device structure diagram of an equipment testing device provided by an embodiment of the present application;

图9是本申请一实施例提供的设备测试装置的系统架构图;FIG. 9 is a system architecture diagram of an equipment testing device provided by an embodiment of the present application;

图10是本申请一实施例提供的的电子设备的硬件结构。Fig. 10 is a hardware structure of an electronic device provided by an embodiment of the present application.

具体实施方式detailed description

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.

需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the schematic diagram of the device, and the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than the module division in the device or the flowchart in the flowchart. steps shown or described. The terms "first", "second" and the like in the specification and claims and the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

目前,当设备使用一段时间后,为了确保网络录像机具备良好的工作水平,通常需要对网络录像机进行测试。相关技术中,网络录像机测试操作主要有人工测试方式和自动化测试方式,但是人工测试会让测试人员很容易疲劳,疲劳就容易漏测,产品质量无法保障,因此人工测试方式存在耗时时间长、效率低下的问题。而现有的网络录像机通过shell脚本加上与Linux操作系统连接交互的工具进行简单的自动化测试,存在的不足是过于依赖开发人员和工具。一旦网络录像机进行迭代更新或者依赖的工具进行了更新与维护,测试人员在进行新的自动化测试用例扩展时,经常会发现测试用例的准确度根本难以保证。因此,自动化测试方式存在自动化测试准确度低下、依赖较多、维护困难。At present, after the equipment has been used for a period of time, in order to ensure that the network video recorder has a good working level, it is usually necessary to test the network video recorder. In related technologies, network video recorder testing operations mainly include manual testing and automated testing. However, manual testing will make testers easily fatigued, and fatigue will easily lead to missing tests. Product quality cannot be guaranteed. Therefore, manual testing is time-consuming, The problem of inefficiency. However, existing network video recorders perform simple automated testing through shell scripts and tools that connect and interact with the Linux operating system. The disadvantage of existing network video recorders is that they rely too much on developers and tools. Once the network video recorder is updated iteratively or the tools it relies on are updated and maintained, testers often find that the accuracy of the test cases is difficult to guarantee when expanding new automated test cases. Therefore, the automated testing method has low automated testing accuracy, more dependencies, and difficult maintenance.

基于此,本申请实施例提供了一种设备测试方法和装置、电子设备及存储介质,旨在提高网络录像设备测试的准确度。Based on this, the embodiment of the present application provides a device testing method and device, electronic device and storage medium, aiming at improving the accuracy of network video recording device testing.

本申请实施例提供的一种网络录像设备的测试方法和装置、电子设备及存储介质,具体通过如下实施例进行说明,首先描述本申请实施例中的网络录像设备的测试方法。A test method and device, electronic equipment, and storage medium for a network video recording device provided in the embodiments of the present application are specifically described through the following embodiments. First, the test method of the network recording device in the embodiment of the present application is described.

本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of the present application may acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .

人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.

本申请实施例提供的网络录像设备的测试方法,涉及人工智能技术领域。本申请实施例提供的网络录像设备的测试方法可应用于终端中,也可应用于服务器端中,还可以是运行于终端或服务器端中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机等;服务器端可以配置成独立的物理服务器,也可以配置成多个物理服务器构成的服务器集群或者分布式系统,还可以配置成提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN以及大数据和人工智能平台等基础云计算服务的云服务器;软件可以是实现设备测试方法的应用等,但并不局限于以上形式。The method for testing network video recording equipment provided in the embodiment of the present application relates to the technical field of artificial intelligence. The testing method of the network video recording device provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server, and can also be software running on the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or It can be configured as a cloud that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server; the software may be an application to realize the equipment testing method, etc., but is not limited to the above forms.

参照图1,根据本申请实施例第一方面实施例提供的网络录像设备的测试方法,图1中的方法可以包括但不限于包括步骤S101至步骤S105。Referring to FIG. 1 , according to the testing method of the network video recording device provided in the first aspect of the embodiment of the present application, the method in FIG. 1 may include but not limited to include steps S101 to S105.

步骤S101,获取待测设备的录像画面;Step S101, acquiring a video image of the device under test;

步骤S102,对录像画面进行画面内容解析,得到画面信息;Step S102, analyzing the content of the recorded picture to obtain picture information;

步骤S103,根据预设的测试用例信息和画面信息进行命令生成,得到操作命令;Step S103, generate a command according to the preset test case information and screen information, and obtain an operation command;

步骤S104,将操作命令发送至待测设备,以使待测设备根据操作命令执行对应操作,并接收待测设备反馈的返回数据,其中,返回数据包括:操作日志数据和设备配置数据;Step S104, sending an operation command to the device under test, so that the device under test performs a corresponding operation according to the operation command, and receives return data fed back by the device under test, wherein the return data includes: operation log data and device configuration data;

步骤S105,将操作日志数据、设备配置数据和预设的参考数据进行数据比对,得到测试结果信息。Step S105, comparing the operation log data, device configuration data and preset reference data to obtain test result information.

在本实施例所示意的步骤S101至步骤S105,通过获取待测设备当前的录像画面,对当前的录像画面进行画面内容解析,得到画面信息,根据预设的测试用例信息和画面信息进行命令生成,得到操作命令,将操作命令发送至待测设备,以使待测设备根据操作命令执行对应操作,并接收待测设备反馈的操作日志数据和设备配置数据,将操作日志数据、设备配置数据和预设的参考数据进行数据比对得到测试结果信息。因此,通过根据画面信息和测试用例信息生成操作命令,并将操作命令发送至待测设备执行对应的操作以实现远程对待测设备进行调试,同时接收待测设备返回的返回数据和预设的参考数据进行数据比对以得到测试结果信息,使得待测设备自动化测试简易且测试准确性提高。From step S101 to step S105 shown in this embodiment, by acquiring the current recording screen of the device under test, analyzing the screen content of the current recording screen, obtaining screen information, and generating commands according to the preset test case information and screen information , get the operation command, send the operation command to the device under test, so that the device under test performs the corresponding operation according to the operation command, and receive the operation log data and device configuration data fed back by the device under test, and send the operation log data, device configuration data and The preset reference data is compared to obtain the test result information. Therefore, by generating operation commands according to the screen information and test case information, and sending the operation commands to the device under test to perform corresponding operations, remote debugging of the device under test is realized, and at the same time, the return data and preset reference returned by the device under test are received The data is compared to obtain the test result information, which makes the automatic test of the equipment under test easier and the test accuracy is improved.

在一些实施例的步骤S101中,获取待测设备当前的录像画面,也即实时采集待测设备的录像画面,以获取当前时刻的录像画面。其中,本实施例预设画面采集的预设时间段,且预设时间段为2-5秒,则获取待测设备根据预设时间段采集录像视频数据,并对录像视频数据进行分帧处理得到录像视频帧图像,以获取清晰度最高的录像视频帧图像作为当前的录像画面。In step S101 of some embodiments, the current video image of the device under test is obtained, that is, the video image of the device under test is collected in real time, so as to obtain the video image at the current moment. Wherein, the present embodiment presets the preset time period for picture collection, and the preset time period is 2-5 seconds, then the device under test is obtained to collect video data according to the preset time period, and the video data is processed in frames Get the video frame image of the recorded video, so as to obtain the video frame image of the recorded video with the highest definition as the current video picture.

在一些实施例中,在步骤S101之前,网络录像设备的测试方法还包括:与待测设备通讯连接。由于网络录像设备的测试方法应用于测试装置上,则需要与待测设备进行通讯连接后才能够远程获取待测设备的录像画面,并对待测设备进行远程操控。In some embodiments, before step S101, the method for testing the network video recording device further includes: communicating with the device under test. Since the test method of the network video equipment is applied to the test device, it is necessary to communicate with the device under test before the video image of the device under test can be obtained remotely, and the device under test can be remotely controlled.

请参照图2,与待测设备通讯连接可以包括但不限于包括步骤S201至步骤S202:Please refer to FIG. 2 , the communication connection with the device under test may include but not limited to steps S201 to S202:

步骤S201,根据预设的设备标识信息从候选设备筛选出待测设备;Step S201, screening out the device under test from the candidate devices according to the preset device identification information;

步骤S202,根据预设的登录信息与待测设备建立通讯连接。Step S202, establishing a communication connection with the device under test according to preset login information.

在一些实施例的步骤S201中,预设的设备标识信息包括:设备ID信息和设备型号,则根据设备型号从候选设备中筛选出型号匹配的设备,再根据设备ID信息从型号匹配的候选设备筛选出待测设备,使得待测设备的筛选操作简易。In step S201 of some embodiments, the preset device identification information includes: device ID information and device model, then according to the device model, select the device that matches the model from the candidate devices, and then select the candidate device that matches the model according to the device ID information The equipment to be tested is screened out, making the screening operation of the equipment under test simple.

在一些实施例的步骤S202中,预设的登录信息包括:网络录像设备的IP地址和网络通信端口号,在局域网内搜索出待测设备的IP地址和网络通信端口号,并根据IP地址和网络通信端口号与NVR建立远程登录连接。In step S202 of some embodiments, the preset login information includes: the IP address and the network communication port number of the network video recording device, the IP address and the network communication port number of the device under test are searched in the local area network, and according to the IP address and the network communication port number The network communication port number establishes a remote login connection with the NVR.

在本实施例所示意的步骤S201至步骤S202,通过根据预设的设备标识信息从候选设备筛选出待测设备,再根据登录信息和待测设备建立通讯连接,以便于对待测设备进行录像画面采集和远程测试操控。From step S201 to step S202 shown in this embodiment, the device under test is screened out from the candidate devices according to the preset device identification information, and then a communication connection is established with the device under test according to the login information, so as to facilitate the video recording of the device under test Acquisition and remote test manipulation.

在一些实施例中,请参照图3,画面信息包括:页面文本、文本位置信息和颜色信息。步骤S102具体包括但不限于步骤S301至步骤S303。In some embodiments, please refer to FIG. 3 , the screen information includes: page text, text position information and color information. Step S102 specifically includes but not limited to step S301 to step S303.

步骤S301,对录像画面进行内容解析得到页面文本;Step S301, performing content analysis on the recorded image to obtain the page text;

步骤S302,获取页面文本位于录像画面的位置信息,得到文本位置信息;Step S302, obtaining the position information of the page text located in the recording screen, and obtaining the text position information;

步骤S303,根据文本位置信息获取录像画面对应位置的颜色,得到颜色信息。Step S303, according to the text position information, the color of the corresponding position of the recording screen is acquired, and the color information is obtained.

在一些实施例的步骤S301中,通过对录像画面进行内容解析,也即通过OCR内容识别技术识别出录像画面中的文本以得到页面文本,使得页面文本获取简易。In step S301 of some embodiments, the page text is obtained by performing content analysis on the video image, that is, identifying the text in the video image through the OCR content recognition technology, so that the page text can be obtained easily.

在一些实施例的步骤S302中,由于远程操控待测设备主要是模拟人工点击鼠标的操作,则识别出录像画面的页面文本后,则需要确定文本的坐标以得到文本位置信息,以便于根据文本位置信息移动模拟的鼠标到对应的页面文本,使得远程操控待测设备进行测试操作更加准确。In step S302 of some embodiments, since the remote control of the device under test is mainly to simulate the operation of manually clicking the mouse, after recognizing the page text of the video image, it is necessary to determine the coordinates of the text to obtain the text position information, so as to The position information moves the simulated mouse to the corresponding page text, which makes the test operation of the remote control device under test more accurate.

例如,若当前的录像画面为系统设备页面,识别出系统设备页面的页面文本为系统设备文本,则获取系统设备文本的坐标,以便于根据系统设备文本的坐标移动模拟的鼠标,以通过模拟的鼠标点击对应的系统设备按键。For example, if the current recording screen is a system device page, and it is recognized that the page text of the system device page is the system device text, then the coordinates of the system device text are obtained, so that the simulated mouse can be moved according to the coordinates of the system device text to pass through the simulated Click the corresponding system device button with the mouse.

在一些实施例的步骤S303中,获取文本位置信息位于录像画面对应位置的颜色得到颜色信息,以便于根据颜色信息进一步确定模拟的鼠标是否点击正确,以提高待测设备进行测试时操作的准确性,使得待测设备的测试更加准确。In step S303 of some embodiments, obtain the color information of the color corresponding to the position of the text position information in the video image, so as to further determine whether the simulated mouse is clicked correctly according to the color information, so as to improve the accuracy of the operation of the device under test when testing , making the test of the device under test more accurate.

需要说明的是,页面信息还包括识别准确度,除此之外页面信息还可以根据预先设置内容确定,使得页面信息设置更加灵活。在本实施例对于页面信息的具体内容不做限制。It should be noted that the page information also includes recognition accuracy, and besides, the page information can also be determined according to preset content, which makes page information setting more flexible. In this embodiment, no limitation is imposed on the specific content of the page information.

在本实施例所示意的步骤S301至步骤S303,通过对待测设备的录像画面进行内容解析得到页面文本,并获取页面文本位于录像画面的位置得到文本位置信息,同时获取文本位置信息在录像画面的颜色得到颜色信息。因此,通过获取录像画面的页面文本、文本位置信息和颜色信息,以便于根据页面文本、文本位置信息和颜色信息确定当前的录像画面所显示的内容,以做出更加准确的操作命令。From step S301 to step S303 illustrated in this embodiment, the page text is obtained by performing content analysis on the recording screen of the device under test, and the position of the page text located in the recording screen is obtained to obtain the text position information, and at the same time, the text position information is obtained at the position of the recording screen color to get the color information. Therefore, by acquiring the page text, text position information and color information of the recording screen, it is convenient to determine the displayed content of the current recording screen according to the page text, text position information and color information, so as to make more accurate operation commands.

在一些实施例中,参照图4,步骤S104具体包括但不限于步骤S401至步骤S402。In some embodiments, referring to FIG. 4 , step S104 specifically includes but not limited to steps S401 to S402.

步骤S401,根据测试用例信息对画面信息进行关键词提取,得到关键词信息;Step S401, extracting keywords from the screen information according to the test case information to obtain keyword information;

步骤S402,根据关键词信息生成操作命令。Step S402, generating an operation command according to the keyword information.

在一些实施例的步骤S401中,由于画面信息包括页面文本、文本位置信息和颜色信息,但是每次生成操作命令并不需要全部的页面信息,只需要获取与测试用例信息对应的内容即可。因此根据测试用例信息对画面信息进行关键词提取,以从画面信息提取与测试用例信息匹配的关键词得到关键词信息。例如,若对待测设备进行语言切换的测试,且画面信息为系统设备信息,则测试用例信息为“点击常规设备,找到语言,电极切换想要的语言”,则根据测试用例信息从画面信息提取关键词信息为“系统设置,常规,常规设置,语言,繁体中文”。In step S401 of some embodiments, since the screen information includes page text, text position information and color information, all page information is not required for each generation of an operation command, only the content corresponding to the test case information needs to be obtained. Therefore, keyword extraction is performed on the screen information according to the test case information, so as to obtain keyword information by extracting keywords matching the test case information from the screen information. For example, if the device under test is tested for language switching, and the screen information is system device information, then the test case information is "click on the conventional device, find the language, switch the desired language", then extract the information from the screen information according to the test case information The keyword information is "system settings, general, general settings, language, traditional Chinese".

在一些实施例的步骤S402中,根据关键词信息生成操作命令,也即生成模拟的鼠标移动的命令,且根据关键词信息对应的文本位置信息确定移动位置,以便于远程逐步对待测设备进行操控。In step S402 of some embodiments, an operation command is generated according to the keyword information, that is, a simulated mouse movement command is generated, and the movement position is determined according to the text position information corresponding to the keyword information, so as to facilitate remote and step-by-step manipulation of the device under test .

在本实施例所示意的步骤S401至步骤S402,通过根据测试用例信息对画面信息进行关键词提取得到关键词信息,再根据关键词信息生成操作命令,以便于远程对待测设备进行准确的操控,使得待测设备的测试更加准确。In steps S401 to S402 shown in this embodiment, keyword information is obtained by extracting keywords from the screen information according to the test case information, and then an operation command is generated according to the keyword information, so as to facilitate accurate remote control of the device under test, The test of the device under test is made more accurate.

在一些实施例的步骤S104中,将操作命令发送至待测设备后,待测设备根据操作命令执行对应操作,也即通过模拟人工移动鼠标以根据操作命令点击对应的按键,以实现自动化测试待测设备。在待测设备执行操作命令对应的操作时,会生成操作日志数据,且同时完成操作命令后设备配置参数发生改变以得到设备配置数据。In step S104 of some embodiments, after the operation command is sent to the device under test, the device under test performs the corresponding operation according to the operation command, that is, by simulating the manual movement of the mouse to click the corresponding button according to the operation command, so as to realize the automated test. testing equipment. When the device under test executes the operation corresponding to the operation command, the operation log data will be generated, and at the same time, the device configuration parameters will be changed after the operation command is completed to obtain the device configuration data.

在一些实施例中,参照图5,步骤S105包括但不限于步骤S501至步骤S503。In some embodiments, referring to FIG. 5 , step S105 includes but not limited to step S501 to step S503.

步骤S501,将操作日志数据和操作流程参考数据进行对比分析,得到操作流程测试信息;Step S501, comparing and analyzing the operation log data and the operation process reference data to obtain the operation process test information;

步骤S502,将设备配置数据和配置参考数据进行比对,得到配置测试信息;Step S502, comparing device configuration data with configuration reference data to obtain configuration test information;

步骤S503,将操作流程测试信息和配置测试信息进行汇集处理,得到测试结果信息。In step S503, the operation process test information and configuration test information are collected and processed to obtain test result information.

在一些实施例的步骤S501中,由于操作日志数据记录了待测设备根据操作命令的操作流程,为了判断待测设备执行的操作是否符合测试用例信息,则将操作日志数据和操作流程参考数据进行比对分析得到操作流程测试信息,以通过操作流程测试信息可以确定待测设备执行的操作流程是否符合,使得待测设备的测试操作简易。In step S501 of some embodiments, since the operation log data records the operation process of the device under test according to the operation command, in order to judge whether the operation performed by the device under test conforms to the test case information, the operation log data and the operation process reference data are compared. The operation process test information is obtained through comparison and analysis, so that it can be determined whether the operation process performed by the equipment under test conforms to the operation process test information, so that the test operation of the equipment under test is simple.

要说明的是,需操作日志数据包括:操作发生的时间核和操作内容,设备配置信息包括:设备型号和设备id。It should be noted that the operation log data includes: the time and operation content of the operation, and the device configuration information includes: the device model and device id.

在一些实施例的步骤S502中,将设备配置数据和配置参考数据进行数据比对得到配置测试信息,以实现待测设备的配置测试,以通过配置测试信息判断待测设备根据操作命令完成对应操作后的配置和参考配置是否匹配,使得待测设备的配置测试操作简易。In step S502 of some embodiments, the device configuration data is compared with the configuration reference data to obtain configuration test information, so as to realize the configuration test of the device under test, so as to judge that the device under test completes the corresponding operation according to the operation command through the configuration test information Whether the final configuration matches the reference configuration makes the configuration test operation of the device under test easy.

在一些实施例的步骤S503中,通过将操作流程测试信息和配置测试信息进行汇集得到测试结果信息,以根据测试结果信息确定待测设备测试流程是否合格,配置参数是否合格,使得待测设备的测试操作简易。In step S503 of some embodiments, the test result information is obtained by collecting the operation process test information and configuration test information, so as to determine whether the test process of the device under test is qualified and whether the configuration parameters are qualified according to the test result information, so that the device under test The test is easy to operate.

在本实施例所示意的步骤S501至步骤S503,将操作日志数据和操作流程参考数据进行对比分析得到操作流程测试信息,将设备配置数据和配置参考数据进行比对得到配置测试信息,最后操作流程测试信息和配置测试信息进行汇集处理得到测试结果信息,以完成待测设备的操作流程和配置参数测试,使得待测设备的测试操作简易。In steps S501 to S503 shown in this embodiment, the operation log data and the operation process reference data are compared and analyzed to obtain the operation process test information, the device configuration data is compared with the configuration reference data to obtain the configuration test information, and finally the operation process The test information and configuration test information are collected and processed to obtain test result information, so as to complete the operation process and configuration parameter test of the equipment under test, making the test operation of the equipment under test simple.

在一些实施例中,网络录像设备的测试方法还包括:对测试前后画面对比。通过对测试前后的画面进行比对,以判断待测设备的功能是否正常,使得待测设备功能正常测试简易。In some embodiments, the testing method of the network video recording device further includes: comparing the pictures before and after the test. By comparing the pictures before and after the test, it is judged whether the function of the device under test is normal, which makes it easy to test the function of the device under test.

参照图6,对测试前后画面对比包括但不限于步骤S601至步骤S603。Referring to FIG. 6 , comparing the images before and after the test includes but not limited to step S601 to step S603 .

步骤S601,获取待测设备测试前的原始画面;Step S601, obtaining the original picture of the device under test before testing;

步骤S602,获取待测设备测试后的目标画面;Step S602, acquiring the target screen of the device under test after testing;

步骤S603,将原始画面和目标画面进行对比分析,得到画面测试信息。Step S603, comparing and analyzing the original picture and the target picture to obtain picture test information.

在一些实施例的步骤S603中,对原始画面和目标画面进行比对分析,也即将原始画面的画面参数和目标画面的画面参数进行比对分析得到画面测试信息。其中,画面参数包括以下任意一种或多种:分辨率、亮度、饱和度。若对待测设备进行画面参数调节,直接将原始画面的画面参数和目标画面的画面参数进行比对分析即可确定测试结果信息。In step S603 of some embodiments, the original picture and the target picture are compared and analyzed, that is, the picture parameters of the original picture and the picture parameters of the target picture are compared and analyzed to obtain picture test information. Wherein, the image parameters include any one or more of the following: resolution, brightness, and saturation. If the screen parameters of the device under test are adjusted, the test result information can be determined by directly comparing and analyzing the screen parameters of the original screen and the screen parameters of the target screen.

例如,若待测设备的亮度、饱和度都改为200。首先搭建待测设备环境为某一固定白板画面。通过获取原始画面和目标画面,对比待测设备执行测试用例信息对应的操作前后的画面,以对测试用例进行进一步判断得到画面测试信息。其中,待测设备为NVR设备,且原始画面和目标画面通过IPC采集NVR设备的画面得到。For example, if the brightness and saturation of the device under test are both changed to 200. First, set up the environment of the device under test as a fixed whiteboard screen. By acquiring the original picture and the target picture, comparing the pictures before and after the device under test performs the operation corresponding to the test case information, to further judge the test case to obtain the picture test information. Wherein, the device to be tested is an NVR device, and the original picture and the target picture are obtained by collecting the pictures of the NVR device through IPC.

在本实施例所示意的步骤S601至步骤S602,通过采集卡获取待测设备测试前的原始画面,再获取待测设备测试后的目标画面,最后将原始画面和目标画面进行对比分析,观察前后画面变化,得到画面测试信息。因此,通过将原始画面和目标画面进行比对,以判断待测设备执行测试用例信息对应的测试后功能是否正常,使得待测设备的功能测试简易。From step S601 to step S602 shown in this embodiment, the original picture before the test of the device under test is obtained through the acquisition card, and then the target picture after the test of the device under test is obtained, and finally the original picture and the target picture are compared and analyzed, and the observation before and after The screen changes, and the screen test information is obtained. Therefore, by comparing the original image with the target image, it is judged whether the function of the device under test is normal after executing the test corresponding to the test case information, so that the function test of the device under test is simple.

在一些实施例中,参照图7,在步骤S105之后,本申请实施例的设备测试方法包括但不限于包括步骤S701至步骤S702。In some embodiments, referring to FIG. 7 , after step S105 , the device testing method in the embodiment of the present application includes but is not limited to steps S701 to S702 .

步骤S701,获取报告生成请求;Step S701, obtaining a report generation request;

步骤S702,根据测试需求信息和测试用例信息将测试结果信息进行汇总处理,然后通过可视化处理得到简洁的可视化测试报告。In step S702, the test result information is summarized and processed according to the test requirement information and the test case information, and then a concise visual test report is obtained through visual processing.

在本实施例的步骤S701至步骤S702,根据测试需求信息和测试用例信息将测试结果信息进行汇总处理得到设备测试信息,并将设备测试信息进行可视化处理得到设备测试视图,将设备测试视图进行汇总处理得到简洁的可视化测试报告。因此,通过汇总测试信息后进行可视化,再将可视化的设备测试始图汇总得到可视化的测试报告,使得测试报告生成简易,且测试人员可以通过测试报告直接确定待测设备的测试结果。In steps S701 to S702 of this embodiment, the test result information is summarized and processed according to the test requirement information and the test case information to obtain the device test information, and the device test information is visualized to obtain the device test view, and the device test view is summarized Process to get a concise visual test report. Therefore, by summarizing the test information and then visualizing it, and then summarizing the visualized device test initial diagram to obtain a visualized test report, the test report is easy to generate, and testers can directly determine the test results of the device under test through the test report.

请参阅图8,本申请实施例还提供一种网络录像设备的测试装置,可以实现上述网络录像设备的测试方法,该装置包括:Please refer to FIG. 8, the embodiment of the present application also provides a test device for a network video recording device, which can implement the above-mentioned test method for a network video recording device. The device includes:

画面获取模块801,获取待测设备当前的录像画面;A picture acquisition module 801, which acquires the current video picture of the device under test;

画面解析模块802,对录像画面进行画面内容解析,得到画面信息;The picture analysis module 802 is used to analyze the picture content of the recorded picture to obtain picture information;

命令生成模块803,根据预设的测试用例信息和画面信息进行命令生成,得到操作命令;The command generation module 803 generates the command according to the preset test case information and screen information, and obtains the operation command;

命令发送模块,将操作命令发送至待测设备,以使待测设备根据操作命令执行对应操作,并接收待测设备反馈的返回数据;其中,返回数据包括:操作日志数据和设备配置数据;The command sending module sends the operation command to the device under test, so that the device under test performs corresponding operations according to the operation command, and receives the return data fed back by the device under test; wherein, the return data includes: operation log data and device configuration data;

数码比对模块,将操作日志数据、设备配置数据和预设的参考数据进行数据比对,得到测试结果信息。The digital comparison module compares the operation log data, equipment configuration data and preset reference data to obtain test result information.

该网络录像设备的测试装置的具体实施方式与上述网络录像设备的测试方法的具体实施例基本相同,在此不再赘述。The specific implementation manner of the testing device of the network video recording device is basically the same as the specific embodiment of the testing method of the network recording device above, and will not be repeated here.

需要说明的是,请参照图9,待测设备为NCR设备,且通过画面采集模块为采集卡,NVR设备还连接IPC设备,IPC设备是指网络摄像机,是视频采集的主要来源,也是作为一个辅助测试对象,用于辅助完成NVR相关配置测试。IPC设备和测试装置、NVR设备之间通过交换机连接,交换机的作用是将以上的设备全部串联在同一网络下,并且方便测试装置对NVR设备,IPC设备等设备进行交互操作。测试装置可以为电脑,用于连接NVR设备,给NVR设备发送鼠标移动的操作命令,接收分析NVR设备传送过来的返回数据并且解析,实时抓取测试信号和网络数据,以及分析采集卡的录像画面,对比录像画面得到画面测试信息,最后将所有的测试结果汇总然后生成测试报告。It should be noted that, please refer to Figure 9, the device to be tested is an NCR device, and the screen capture module is a capture card, and the NVR device is also connected to an IPC device. The IPC device refers to a network camera, which is the main source of video capture and also serves as a Auxiliary test object, used to assist in completing NVR-related configuration tests. IPC equipment, test equipment, and NVR equipment are connected through a switch. The function of the switch is to connect all the above equipment in series under the same network, and to facilitate the interactive operation of the test equipment on NVR equipment, IPC equipment and other equipment. The test device can be a computer, which is used to connect to the NVR device, send the mouse movement operation command to the NVR device, receive and analyze the returned data sent by the NVR device and analyze it, capture the test signal and network data in real time, and analyze the video image of the acquisition card , compare the video images to get the image test information, and finally summarize all the test results and generate a test report.

请参阅图10,图10示意了另一实施例的电子设备的硬件结构,电子设备包括:Please refer to FIG. 10. FIG. 10 illustrates a hardware structure of an electronic device in another embodiment. The electronic device includes:

处理器1001,可以采用通用的CPU(Central Process ingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案;The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs, To realize the technical solutions provided by the embodiments of the present application;

存储器1002,可以采用只读存储器(ReadOnlyMemory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(RandomAccessMemory,RAM)等形式实现。存储器1002可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1002中,并由处理器1001来调用执行本申请实施例的网络录像设备的测试方法;The memory 1002 may be implemented in the form of a read-only memory (ReadOnlyMemory, ROM), a static storage device, a dynamic storage device, or a random access memory (RandomAccessMemory, RAM). The memory 1002 can store operating systems and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1002 and called by the processor 1001 to execute the implementation of the present application. The test method of the network recording equipment of example;

输入/输出接口1003,用于实现信息输入及输出;Input/output interface 1003, used to realize information input and output;

通信接口1004,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;The communication interface 1004 is used to realize the communication and interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);

总线1005,在设备的各个组件(例如处理器1001、存储器1002、输入/输出接口1003和通信接口1004)之间传输信息;A bus 1005, which transmits information between various components of the device (such as a processor 1001, a memory 1002, an input/output interface 1003, and a communication interface 1004);

其中处理器1001、存储器1002、输入/输出接口1003和通信接口1004通过总线1005实现彼此之间在设备内部的通信连接。The processor 1001 , the memory 1002 , the input/output interface 1003 and the communication interface 1004 are connected to each other within the device through the bus 1005 .

本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述网络录像设备的测试方法。The embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the above method for testing a network video recording device is implemented.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

本申请实施例提供的一种网络录像设备的测试方法和装置、电子设备及存储介质。其通过实时获取测试设备的录像画面并解析提取画面内容,自动生成指令发送给控制端以此控制测试设备自动模拟人工点击鼠标,再通过数据对比分析,总结出测试结果,提高了测试的效率和准确度。Embodiments of the present application provide a testing method and device for network video recording equipment, electronic equipment, and a storage medium. It obtains the video images of the test equipment in real time and analyzes and extracts the content of the images, automatically generates instructions and sends them to the control terminal to control the test equipment to automatically simulate manual mouse clicks, and then compares and analyzes the data to summarize the test results, which improves the efficiency and efficiency of the test. Accuracy.

本申请实施例描述的实施例是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着技术的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments described in the embodiments of the present application are to illustrate the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of technology and new For the emergence of application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

本领域技术人员可以理解的是,图中示出的技术方案并不构成对本申请实施例的限定,可以包括比图示更多或更少的步骤,或者组合某些步骤,或者不同的步骤。Those skilled in the art can understand that the technical solution shown in the figure does not constitute a limitation to the embodiment of the present application, and may include more or less steps than those shown in the figure, or combine some steps, or different steps.

以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.

本申请的说明书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description of the present application and the above drawings are used to distinguish similar objects and not necessarily to describe specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed Those steps or elements may instead include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in this application, "at least one (item)" means one or more, and "multiple" means two or more. "And/or" is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time , where A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c ", where a, b, c can be single or multiple.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括多指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例的方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including multiple instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk or optical disk, etc., which can store programs. medium.

以上参照附图说明了本申请实施例的优选实施例,并非因此局限本申请实施例的权利范围。本领域技术人员不脱离本申请实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本申请实施例的权利范围之内。The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings, which does not limit the scope of rights of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of rights of the embodiments of the present application.

Claims (10)

1. A method for testing network video equipment is characterized by comprising the following steps:
acquiring a current video picture of equipment to be tested;
analyzing the picture content of the video picture to obtain picture information;
performing command generation according to preset test case information and the picture information to obtain an operation command;
sending the operation command to the equipment to be tested so that the equipment to be tested executes corresponding operation according to the operation command and receives return data fed back by the equipment to be tested; wherein the return data comprises: operation log data and device configuration data;
and comparing the operation log data, the equipment configuration data and preset reference data to obtain test result information.
2. The method of claim 1, wherein the picture information comprises: page text, text position information and color information; analyzing the picture content of the video picture to obtain picture information, wherein the picture information comprises:
analyzing the content of the video picture to obtain the page text;
acquiring the position information of the page text in the video picture to obtain the text position information;
and acquiring the color of the corresponding position of the video picture according to the text position information to obtain the color information.
3. The method according to claim 2, wherein the performing command generation according to preset test case information and the screen information to obtain an operation command comprises:
extracting keywords from the picture information according to the test case information to obtain keyword information;
and generating the operation command according to the keyword information.
4. The method according to claim 3, wherein before the comparing the operation log data, the device configuration data and the preset reference data to obtain the test result information, the method further comprises:
the reference data includes: operating process reference data and configuration reference data; the data comparison of the operation log data, the equipment configuration data and preset reference data is performed to obtain test result information, and the method comprises the following steps:
comparing and analyzing the operation log data and the operation process reference data to obtain operation process test information;
comparing the equipment configuration data with the configuration reference data to obtain the configuration test information;
and collecting the operation flow test information and the configuration test information to obtain the test result information.
5. The method of claim 4, wherein after the comparing the operation log data, the device configuration data, and the preset reference data to obtain the test result information, the method further comprises:
comparing the pictures before and after the test specifically comprises:
obtaining a picture of the equipment to be tested before testing to obtain an original picture;
obtaining a picture after the device to be tested is tested to obtain a target picture;
and comparing and analyzing the original picture and the target picture to obtain picture test information.
6. The method of claim 1, wherein prior to said obtaining a video footage of a device under test, the method further comprises:
with the equipment communication connection that awaits measuring specifically includes:
screening the equipment to be tested from the candidate equipment according to preset equipment identification information;
establishing communication connection with the equipment to be tested according to preset login information; wherein, the equipment to be tested is a network video recorder.
7. The method of claim 1, wherein after comparing the operation log data, the device configuration data, and preset reference data to obtain test result information, the method further comprises:
generating a test report, specifically comprising:
acquiring a report generation request; wherein the report generation request includes test requirement information;
and summarizing the test result information according to the test demand information and the test case information to obtain the test report.
8. A network video equipment testing device, characterized in that, the device includes:
the picture acquisition module is used for acquiring the current video picture of the equipment to be tested;
the picture analysis module is used for carrying out picture content analysis on the video picture to obtain picture information;
the command generation module is used for generating a command according to preset test case information and the picture information to obtain an operation command;
the command sending module is used for sending the operation command to the equipment to be tested so that the equipment to be tested executes corresponding operation according to the operation command and receives return data fed back by the equipment to be tested; wherein the return data comprises: operation log data and device configuration data;
and the digital comparison module is used for performing data comparison on the operation log data, the equipment configuration data and preset reference data to obtain test result information.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method for testing the network video recording device according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method for testing the network video recording device according to any one of claims 1 to 7.
CN202211206621.6A 2022-09-30 2022-09-30 A testing method and device for network video recording equipment, electronic equipment and storage medium Pending CN115474040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211206621.6A CN115474040A (en) 2022-09-30 2022-09-30 A testing method and device for network video recording equipment, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211206621.6A CN115474040A (en) 2022-09-30 2022-09-30 A testing method and device for network video recording equipment, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115474040A true CN115474040A (en) 2022-12-13

Family

ID=84334922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211206621.6A Pending CN115474040A (en) 2022-09-30 2022-09-30 A testing method and device for network video recording equipment, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115474040A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400669A (en) * 2023-03-29 2023-07-07 国核示范电站有限责任公司 Automatic test method, device, test equipment and medium for security level instrument control system
CN119071477A (en) * 2024-08-13 2024-12-03 深圳市芯睿视科技有限公司 Automated testing method, testing device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908922A (en) * 2019-12-31 2020-03-24 京东数字科技控股有限公司 Application program testing method and device
WO2020233331A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 User interface automated testing method and apparatus, and computer-readable storage medium
CN113609028A (en) * 2021-10-09 2021-11-05 统信软件技术有限公司 Page testing method, computing device and readable storage medium
CN113923443A (en) * 2021-09-27 2022-01-11 深圳市天视通视觉有限公司 Network video recorder testing method and device and computer readable storage medium
CN114398283A (en) * 2022-01-18 2022-04-26 平安健康保险股份有限公司 Automatic testing method and device for user interface, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020233331A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 User interface automated testing method and apparatus, and computer-readable storage medium
CN110908922A (en) * 2019-12-31 2020-03-24 京东数字科技控股有限公司 Application program testing method and device
CN113923443A (en) * 2021-09-27 2022-01-11 深圳市天视通视觉有限公司 Network video recorder testing method and device and computer readable storage medium
CN113609028A (en) * 2021-10-09 2021-11-05 统信软件技术有限公司 Page testing method, computing device and readable storage medium
CN114398283A (en) * 2022-01-18 2022-04-26 平安健康保险股份有限公司 Automatic testing method and device for user interface, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400669A (en) * 2023-03-29 2023-07-07 国核示范电站有限责任公司 Automatic test method, device, test equipment and medium for security level instrument control system
CN119071477A (en) * 2024-08-13 2024-12-03 深圳市芯睿视科技有限公司 Automated testing method, testing device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107223246B (en) Image labeling method and device and electronic equipment
CN108307021B (en) Parallel following test equipment, cloud real machine and method for mobile terminal
CN110554831B (en) Operation synchronization method, device, equipment and storage medium
CN105988924B (en) A kind of non-intrusion type embedded software graphic user interface automated testing method
US20230119593A1 (en) Method and apparatus for training facial feature extraction model, method and apparatus for extracting facial features, device, and storage medium
CN108920380A (en) Test method, device, server, equipment and the storage medium of the software compatibility
JP2021103555A (en) Image detection method, device, electronic apparatus, storage medium, and program
US10169853B2 (en) Score weights for user interface (UI) elements
CN110221979A (en) Performance test methods, device, equipment and the storage medium of application program
CN115474040A (en) A testing method and device for network video recording equipment, electronic equipment and storage medium
US8559728B2 (en) Image processing apparatus and image processing method for evaluating a plurality of image recognition processing units
CN107370823B (en) Data acquisition and remote control method, device and computer readable storage medium
CN113468066A (en) User interface testing method and device
TW202001558A (en) Test system
CN112783756A (en) Automatic test method, terminal, system and storage medium
CN110248235B (en) Software teaching method, device, terminal equipment and medium
CN113923443A (en) Network video recorder testing method and device and computer readable storage medium
CN118295927A (en) Browser testing method, device, equipment and computer readable storage medium
CN117349181A (en) Software testing method and device, readable storage medium and electronic equipment
CN106775701B (en) Client automatic evidence obtaining method and system
US11393507B1 (en) Automatic log creation of video recording of a device under test
CN116340179A (en) Compatibility testing method, electronic equipment and computer readable storage medium
CN115905016A (en) BIOS Setup search function test method and device, electronic equipment and storage medium
CN109800362B (en) Identification code processing method and device, storage medium and computer equipment
CN115273215A (en) Job recognition system and job recognition method

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