[go: up one dir, main page]

CN115460117A - Equipment testing method and device, storage medium and electronic device - Google Patents

Equipment testing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115460117A
CN115460117A CN202210916789.XA CN202210916789A CN115460117A CN 115460117 A CN115460117 A CN 115460117A CN 202210916789 A CN202210916789 A CN 202210916789A CN 115460117 A CN115460117 A CN 115460117A
Authority
CN
China
Prior art keywords
target
test
result
target virtual
semantic analysis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210916789.XA
Other languages
Chinese (zh)
Other versions
CN115460117B (en
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210916789.XA priority Critical patent/CN115460117B/en
Publication of CN115460117A publication Critical patent/CN115460117A/en
Application granted granted Critical
Publication of CN115460117B publication Critical patent/CN115460117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an equipment testing method and device, a storage medium and an electronic device, and relates to the technical field of intelligent home, wherein the equipment testing method comprises the following steps: under the condition of acquiring target information of the to-be-tested equipment, generating target virtual equipment based on the target information; receiving a target test text for interactively testing the target virtual equipment, and performing semantic analysis on the target test text to obtain a semantic analysis result; and performing interactive test on the target virtual equipment based on the semantic analysis result to generate a test result, wherein the test result comprises the running state and the execution result of the target virtual equipment. The problem that the efficiency of the equipment testing method in the related technology is low can be solved, and the effect of improving the equipment testing efficiency is achieved.

Description

设备测试方法和装置、存储介质及电子装置Equipment testing method and device, storage medium and electronic device

技术领域technical field

本申请涉及智能家居技术领域,具体而言,涉及一种设备测试方法和装置、存储介质及电子装置。The present application relates to the technical field of smart home, and in particular, to an equipment testing method and device, a storage medium, and an electronic device.

背景技术Background technique

设备控制领域由于支持的设备繁多,对设备的测试工作也越来越繁重,在目前的测试环节中,测试人员需要面对一个个真实的设备,才能对设备进行交互,从而进行功能的测试。同理,开发人员也需要面对一个个真实的设备,对其进行交互后才能对功能进行自测。可见,相关技术中测试时是对真实的机器进行语音交互,这种测试方式会出现很多弊端,例如,需要依赖实体家电设备无法覆盖全部的品类,在测试时无法拿到所有的设备进行真机测试,因此导致无法对全部的设备进行全面的测试,从而对项目的安全性产生影响;对人力资源的浪费,因为要不停的切换真实的机器,工作量相对是比较大的;以及对测试地方的限制,测试人员必须需要在设备所在的地方,才能面对面的测试,无法随时随地进行测试。即,相关技术中的设备测试方法存在着效率较低的问题。In the field of equipment control, due to the large number of supported equipment, the testing of equipment is becoming more and more arduous. In the current testing process, testers need to face each real equipment in order to interact with the equipment and perform functional testing. In the same way, developers also need to face each real device and interact with it before they can self-test the function. It can be seen that the test in the related technology is to perform voice interaction on the real machine. This test method will have many disadvantages. For example, it needs to rely on physical home appliances and cannot cover all categories, and it is impossible to get all the devices for real machine testing during the test. Therefore, it is impossible to conduct a comprehensive test on all the equipment, which will affect the security of the project; the waste of human resources, because the real machine needs to be switched constantly, the workload is relatively large; and the test Due to local restrictions, testers must be in the place where the equipment is located to conduct face-to-face testing, and testing cannot be performed anytime and anywhere. That is, the device testing method in the related art has a problem of low efficiency.

针对相关技术中存在的设备测试方法的效率较低的问题,目前尚未提出有效的解决方案。Aiming at the problem of low efficiency of the device testing method in the related art, no effective solution has been proposed yet.

发明内容Contents of the invention

本申请实施例提供了一种设备测试方法和装置、存储介质及电子装置,以至少解决相关技术中存在的设备测试方法的效率较低的问题。Embodiments of the present application provide a device testing method and device, a storage medium, and an electronic device, so as to at least solve the problem of low efficiency of the device testing method in the related art.

根据本申请实施例的一个实施例,提供了一种设备测试方法,包括:在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备;接收对所述目标虚拟设备进行交互测试的目标测试文本,并对所述目标测试文本进行语义解析,得到语义解析结果;基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,所述测试结果包括所述目标虚拟设备的运行状态和执行结果。According to an embodiment of the embodiment of the present application, a device testing method is provided, including: when the target information of the device to be tested is obtained, generating a target virtual device based on the target information; receiving the target virtual device Performing an interactive test target test text, and performing semantic analysis on the target test text to obtain a semantic analysis result; performing an interactive test on the target virtual device based on the semantic analysis result to generate a test result, the test result including all Describe the running status and execution results of the target virtual device.

在一个示例性实施例中,对所述目标测试文本进行语义解析,得到语义解析结果,包括:通过自然语言处理NLP对所述目标测试文本进行语义解析,以获得所述语义解析结果,其中,所述语义解析结果中包括所述目标测试文本中包含的语料所指示的测试类型;基于所述语义解析结果对所述目标虚拟设备进行交互测试,包括:基于所述测试类型对所述目标虚拟设备进行交互测试。In an exemplary embodiment, performing semantic analysis on the target test text to obtain a semantic analysis result includes: performing semantic analysis on the target test text through natural language processing (NLP) to obtain the semantic analysis result, wherein, The semantic analysis result includes the test type indicated by the corpus contained in the target test text; performing an interactive test on the target virtual device based on the semantic analysis result includes: testing the target virtual device based on the test type The device is tested interactively.

在一个示例性实施例中,基于所述测试类型对所述目标虚拟设备进行交互测试,包括:在确定所述测试类型为设备控制类型的情况下,通过基于所述语义解析结果所指示的控制操作对所述目标虚拟设备进行控制的方式来对所述目标虚拟设备进行所述交互测试;在确定所述测试类型为第三方类型的情况下,通过执行如下操作来对所述目标虚拟设备进行所述交互测试:调用第三方服务执行所述语义解析结果所指示的操作,获取所述第三方服务所反馈的执行结果,展示所述执行结果。In an exemplary embodiment, performing an interactive test on the target virtual device based on the test type includes: in a case where the test type is determined to be a device control type, using the control indicated based on the semantic analysis result Performing the interaction test on the target virtual device in a manner of controlling the target virtual device; in the case that the test type is determined to be a third-party type, performing the following operations on the target virtual device The interaction test: calling a third-party service to execute the operation indicated by the semantic analysis result, obtaining the execution result fed back by the third-party service, and displaying the execution result.

在一个示例性实施例中,基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,包括:基于所述语义解析结果中所包括的目标属性字段对所述目标虚拟设备进行交互测试,以获得所述运行状态,其中,所述目标属性字段用于指示对所述目标虚拟设备的与所述目标属性字段对应的目标属性进行操作;将所述运行状态与所述语义解析结果中包括的目标结果字段进行对比,以获得所述执行结果,其中,所述执行结果用于指示所述交互测试是否成功,所述目标结果字段用于指示对所述目标虚拟设备的所述目标属性进行操作的结果。In an exemplary embodiment, performing an interactive test on the target virtual device based on the semantic analysis result, and generating a test result includes: performing an interactive test on the target virtual device based on the target attribute field included in the semantic analysis result interactive testing, to obtain the running state, wherein the target attribute field is used to indicate that the target attribute corresponding to the target attribute field of the target virtual device is operated; the running state and the semantic analysis The target result field included in the result is compared to obtain the execution result, wherein the execution result is used to indicate whether the interaction test is successful, and the target result field is used to indicate the target virtual device. The result of the operation on the target property.

在一个示例性实施例中,将所述运行状态与所述语义解析结果中包括的目标结果字段进行对比,以获得所述执行结果,包括:将所述运行状态与所述目标结果字段进行对比,以获得对比结果;在所述对比结果指示所述运行状态与所述目标结果字段一致的情况下,确定所述交互测试成功;所述方法还包括:展示所述测试结果,其中,所述测试结果中包括目标状态码,所述目标状态码用于指示所述交互测试的所述执行结果。In an exemplary embodiment, comparing the running state with a target result field included in the semantic analysis result to obtain the execution result includes: comparing the running state with the target result field , to obtain a comparison result; when the comparison result indicates that the operation state is consistent with the target result field, it is determined that the interaction test is successful; the method further includes: displaying the test result, wherein the The test result includes a target status code, and the target status code is used to indicate the execution result of the interaction test.

在一个示例性实施例中,在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备,包括:在接收到请求添加测试设备的请求指令的情况下,弹出目标窗口,其中,所述请求指令是在对目标页面上的指定控件执行第一预定操作后所触发的;在检测到在所述目标窗口中输入了所述目标信息的情况下,且在确定目标信息资源库中存在所述目标信息的情况下,生成所述目标虚拟设备,并将所述目标虚拟设备添加至目标设备列表中,其中,所述目标信息资源库是预先建立的并存储有包含所述目标信息在内的多个设备的信息。In an exemplary embodiment, when the target information of the device to be tested is obtained, generating a target virtual device based on the target information includes: popping up a target window when a request instruction for adding a test device is received , wherein the request instruction is triggered after the first predetermined operation is performed on the specified control on the target page; when it is detected that the target information is input in the target window, and the target information is determined If the target information exists in the resource library, generate the target virtual device, and add the target virtual device to the target device list, wherein the target information resource library is pre-established and stores information including all Information about multiple devices including the target information described above.

在一个示例性实施例中,基于所述语义解析结果对所述目标虚拟设备进行交互测试,包括:在确定所述目标测试文本为包含多条语料的文本的情况下,基于对所述多条语料进行语义解析所获得的多个所述语义解析结果,对所述目标虚拟设备依次进行交互测试;或者,在所述目标虚拟设备包括多个虚拟设备的情况下,基于对所述目标测试文本中包含的一条或多条语料进行语义解析所获得的一个或多个所述语义解析结果,对所述多个虚拟设备依次进行交互测试。In an exemplary embodiment, performing an interactive test on the target virtual device based on the semantic analysis result includes: when it is determined that the target test text is a text containing multiple pieces of corpus, based on the analysis of the multiple pieces of A plurality of semantic analysis results obtained by performing semantic analysis on the corpus, sequentially perform interactive tests on the target virtual device; or, when the target virtual device includes a plurality of virtual devices, based on the target test text One or more of the semantic analysis results obtained by performing semantic analysis on one or more pieces of corpus included in the corpus, and sequentially perform interactive tests on the plurality of virtual devices.

根据本申请实施例的另一个实施例,还提供了一种设备测试装置,包括:生成模块,用于在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备;处理模块,用于接收对所述目标虚拟设备进行交互测试的目标测试文本,并对所述目标测试文本进行语义解析,得到语义解析结果;测试模块,用于基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,所述测试结果包括所述目标虚拟设备的运行状态和执行结果。According to another embodiment of the embodiment of the present application, there is also provided a device testing device, including: a generating module, configured to generate a target virtual device based on the target information when the target information of the device to be tested is obtained; A processing module, configured to receive a target test text for an interactive test on the target virtual device, and perform semantic analysis on the target test text to obtain a semantic analysis result; a test module, configured to perform a semantic analysis on the target virtual device based on the semantic analysis result The target virtual device performs an interactive test to generate a test result, and the test result includes the running state and execution result of the target virtual device.

根据本申请实施例的又一个实施例,还提供了一种计算机可读的存储介质,所述计算机可读的存储介质包括存储的程序,其中,所述程序运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the embodiment of the present application, a computer-readable storage medium is also provided, and the computer-readable storage medium includes a stored program, wherein, when the program is running, any one of the above-mentioned methods is implemented. steps in the example.

根据本申请实施例的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行上述任一项方法实施例中的步骤。According to still another embodiment of the embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute any of the above-mentioned The steps in the method embodiment.

通过本发明,在获取到待测试设备的目标信息的情况下,基于目标信息生成目标虚拟设备,再接收对目标虚拟设备进行交互测试的目标测试文本,并对目标测试文本进行语义解析,以得到语义解析结果,然后,基于语义解析结果对目标虚拟设备进行交互测试,生成测试结果,测试结果中包括目标虚拟设备的运行状态和执行结果。实现了基于待测试设备的目标信息生成目标虚拟设备的目的,以及通过对接收的目标测试文本进行解析所得到的语义解析结果对目标虚拟设备进行交互测试的目的,避免了相关技术中需要对真实的设备进行测试从而导致工作量较大及人力资源浪费的问题。通过本发明,解决了相关技术中存在的设备测试方法的效率较低的问题,达到了提高设备测试效率的效果。Through the present invention, when the target information of the device to be tested is obtained, the target virtual device is generated based on the target information, and then the target test text for interactive testing of the target virtual device is received, and the target test text is semantically analyzed to obtain Semantic analysis results, and then, based on the semantic analysis results, an interactive test is performed on the target virtual device to generate test results, which include the running status and execution results of the target virtual device. Realize the purpose of generating the target virtual device based on the target information of the device to be tested, and the purpose of interactive testing the target virtual device through the semantic analysis result obtained by parsing the received target test text, avoiding the need for real The equipment is tested, which leads to a large workload and a waste of human resources. Through the present invention, the problem of low efficiency of the equipment testing method in the related art is solved, and the effect of improving equipment testing efficiency is achieved.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.

图1是本申请实施例的一种智能家居设备的交互方法的硬件环境示意图;FIG. 1 is a schematic diagram of a hardware environment of an interaction method for a smart home device according to an embodiment of the present application;

图2是根据本申请实施例的一种设备测试方法的流程图;Fig. 2 is a flow chart of a device testing method according to an embodiment of the present application;

图3是根据本申请具体实施例的一种设备交互测试流程图;Fig. 3 is a flow chart of a device interaction test according to a specific embodiment of the present application;

图4是根据本申请实施例的一种设备测试装置的结构框图;FIG. 4 is a structural block diagram of an equipment testing device according to an embodiment of the present application;

图5是根据本申请实施例的一种设备测试装置的优选的结构框图。Fig. 5 is a preferred structural block diagram of an equipment testing device according to an embodiment of the present application.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a 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 instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

根据本申请实施例的一个方面,提供了一种智能家居设备的交互方法。该智能家居设备的交互方法广泛应用于智慧家庭(Smart Home)、智能家居、智能家用设备生态、智慧住宅(Intelligence House)生态等全屋智能数字化控制应用场景。可选地,在本实施例中,上述智能家居设备的交互方法可以应用于如图1所示的由终端设备102和服务器104所构成的硬件环境中。如图1所示,服务器104通过网络与终端设备102进行连接,可用于为终端或终端上安装的客户端提供服务(如应用服务等),可在服务器上或独立于服务器设置数据库,用于为服务器104提供数据存储服务,可在服务器上或独立于服务器配置云计算和/或边缘计算服务,用于为服务器104提供数据运算服务。According to an aspect of the embodiments of the present application, a method for interacting with smart home devices is provided. The interaction method of the smart home device is widely used in smart home (Smart Home), smart home, smart home device ecology, smart house (Intelligence House) ecology and other intelligent digital control application scenarios in the whole house. Optionally, in this embodiment, the above-mentioned interaction method for smart home devices may be applied in a hardware environment composed of a terminal device 102 and a server 104 as shown in FIG. 1 . As shown in Figure 1, the server 104 is connected to the terminal device 102 through the network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. To provide data storage services for the server 104, cloud computing and/or edge computing services may be configured on the server or independently of the server to provide data computing services for the server 104.

上述网络可以包括但不限于以下至少之一:有线网络,无线网络。上述有线网络可以包括但不限于以下至少之一:广域网,城域网,局域网,上述无线网络可以包括但不限于以下至少之一:WIFI(Wireless Fidelity,无线保真),蓝牙。终端设备102可以并不限定于为PC、手机、平板电脑、智能空调、智能烟机、智能冰箱、智能烤箱、智能炉灶、智能洗衣机、智能热水器、智能洗涤设备、智能洗碗机、智能投影设备、智能电视、智能晾衣架、智能窗帘、智能影音、智能插座、智能音响、智能音箱、智能新风设备、智能厨卫设备、智能卫浴设备、智能扫地机器人、智能擦窗机器人、智能拖地机器人、智能空气净化设备、智能蒸箱、智能微波炉、智能厨宝、智能净化器、智能饮水机、智能门锁等。The foregoing network may include but not limited to at least one of the following: a wired network and a wireless network. The above-mentioned wired network may include but not limited to at least one of the following: wide area network, metropolitan area network, and local area network, and the above-mentioned wireless network may include but not limited to at least one of the following: WIFI (Wireless Fidelity, Wireless Fidelity), Bluetooth. The terminal device 102 is not limited to PC, mobile phone, tablet computer, smart air conditioner, smart hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device , smart TV, smart drying rack, smart curtain, smart video, smart socket, smart audio, smart speaker, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, Smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.

在本实施例中提供了一种设备测试方法,图2是根据本申请实施例的一种设备测试方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a device testing method is provided. FIG. 2 is a flowchart of a device testing method according to an embodiment of the present application. As shown in FIG. 2, the process includes the following steps:

步骤S202,在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备;Step S202, when the target information of the device under test is acquired, generate a target virtual device based on the target information;

步骤S204,接收对所述目标虚拟设备进行交互测试的目标测试文本,并对所述目标测试文本进行语义解析,得到语义解析结果;Step S204, receiving a target test text for interactive testing of the target virtual device, and performing semantic analysis on the target test text to obtain a semantic analysis result;

步骤S206,基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,所述测试结果包括所述目标虚拟设备的运行状态和执行结果。In step S206, an interactive test is performed on the target virtual device based on the semantic analysis result, and a test result is generated, and the test result includes an operation state and an execution result of the target virtual device.

通过上述步骤,在获取到待测试设备的目标信息的情况下,基于目标信息生成目标虚拟设备,再接收对目标虚拟设备进行交互测试的目标测试文本,并对目标测试文本进行语义解析,以得到语义解析结果,然后,基于语义解析结果对目标虚拟设备进行交互测试,生成测试结果,测试结果中包括目标虚拟设备的运行状态和执行结果。实现了基于待测试设备的目标信息生成目标虚拟设备的目的,以及通过对接收的目标测试文本进行解析所得到的语义解析结果对目标虚拟设备进行交互测试的目的,避免了相关技术中需要对真实的设备进行测试从而导致工作量较大及人力资源浪费的问题。通过本发明,解决了相关技术中存在的设备测试方法的效率较低的问题,达到了提高设备测试效率的效果。Through the above steps, when the target information of the device to be tested is obtained, the target virtual device is generated based on the target information, and then the target test text for interactive testing of the target virtual device is received, and the target test text is semantically analyzed to obtain Semantic analysis results, and then, based on the semantic analysis results, an interactive test is performed on the target virtual device to generate test results, which include the running status and execution results of the target virtual device. Realize the purpose of generating the target virtual device based on the target information of the device to be tested, and the purpose of interactive testing the target virtual device through the semantic analysis result obtained by parsing the received target test text, avoiding the need for real The equipment is tested, which leads to a large workload and a waste of human resources. Through the present invention, the problem of low efficiency of the equipment testing method in the related art is solved, and the effect of improving equipment testing efficiency is achieved.

其中,上述步骤的执行主体可以为平台,例如测试平台,或测试工具,或测试软件,或终端,或者为配置在存储设备上的具备人机交互能力的处理器,或者为具备类似处理能力的处理设备或处理单元等,但不限于此。下面以测试平台执行上述操作为例(仅是一种示例性说明,在实际操作中还可以是其他的设备或模块来执行上述操作)进行说明:Wherein, the execution subject of the above steps can be a platform, such as a test platform, or a test tool, or a test software, or a terminal, or a processor with human-computer interaction capabilities configured on a storage device, or a processor with similar processing capabilities. processing device or processing unit, etc., but not limited thereto. The following uses the test platform to perform the above operations as an example (it is only an exemplary description, and other devices or modules can also be used to perform the above operations in actual operation):

在上述实施例中,测试平台在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备,例如,待测试设备为智能空调,或智能冰箱,或洗衣机等,上述目标信息可包括待测试设备的设备品类、设备型号及设备ID,当然,还可以包括设备的其他信息;在实际应用中,可根据需要在测试平台中添加待测试设备,例如,可通过点击测试平台中的添加设备控件,然后输入待测试设备的目标信息,在实际应用中,可以每次只添加一台待测试设备,也可一次添加多台待测试设备,然后,分别生成各自对应的虚拟设备;在生成目标虚拟设备后,再接收对目标虚拟设备进行交互测试的目标测试文本,并对目标测试文本进行语义解析,以得到语义解析结果,例如,在测试平台中已生成了多台虚拟设备时,可选择其中一台虚拟设备(如目标虚拟设备)进行测试,其中,目标测试文本中包括对目标虚拟设备进行交互测试的语料,例如,目标测试文本中的语料为“空调当前温度”,在实际应用中,目标测试文本中可包括一条语料,也可包括多条语料,当目标测试文本中包括多条语料时,可将包括多条语料的目标测试文本以excel文件形式导入,可对目标测试文本中包括的一条或多条语料进行语义解析,以得到一个或多个语义解析结果;然后基于语义解析结果对目标虚拟设备进行交互测试,生成测试结果,测试结果中包括目标虚拟设备的运行状态和执行结果。在实际应用中,进行交互测试后会生成测试结果,测试结果中可包括目标虚拟设备的运行状态,例如,目标虚拟设备的属性信息的变化情况,例如,上述语义解析结果为空调温度调成28℃,那么目标虚拟设备的温度属性会相应地进行修改,以指示测试正常,如果温度属性未按照语义进行修改,则说明该测试失败;测试结果中还可包括目标状态码,可基于目标状态码确定交互测试成功或失败的结果,即可确定目标虚拟设备执行交互测试的执行结果。通过本实施例,实现了基于待测试设备的目标信息生成目标虚拟设备以及基于目标测试文本中包括的语料对目标虚拟设备进行交互测试的目的,避免了相关技术中需要对真实的设备进行测试从而导致工作量较大及人力资源浪费的问题。通过本发明,解决了相关技术中存在的设备测试方法的效率较低的问题,达到了提高设备测试效率的效果。In the above embodiments, the test platform generates target virtual devices based on the target information after obtaining the target information of the device to be tested. For example, the device to be tested is a smart air conditioner, or a smart refrigerator, or a washing machine, etc. The information can include the device category, device model, and device ID of the device to be tested, and of course, other information about the device; in practical applications, the device to be tested can be added to the test platform as needed, for example, by clicking the test platform Add device control in , and then enter the target information of the device to be tested. In practical applications, only one device to be tested can be added at a time, or multiple devices to be tested can be added at a time, and then the corresponding virtual devices are generated respectively. ; After generating the target virtual device, receive the target test text for interactive testing of the target virtual device, and perform semantic analysis on the target test text to obtain the semantic analysis result, for example, multiple virtual devices have been generated in the test platform , one of the virtual devices (such as the target virtual device) can be selected for testing, wherein the target test text includes the corpus for interactive testing of the target virtual device, for example, the corpus in the target test text is "the current temperature of the air conditioner", In practical applications, one corpus or multiple corpora can be included in the target test text, and when multiple corpora are included in the target test text, the target test text that includes multiple corpora can be imported in the form of an excel file, which can be used for One or more pieces of corpus included in the target test text are semantically analyzed to obtain one or more semantic analysis results; then, based on the semantic analysis results, the target virtual device is interactively tested to generate test results, which include the target virtual device. Running status and execution results. In practical applications, test results will be generated after interactive testing. The test results may include the operating status of the target virtual device, for example, the change of the attribute information of the target virtual device. ℃, then the temperature attribute of the target virtual device will be modified accordingly to indicate that the test is normal. If the temperature attribute is not modified according to the semantics, it means that the test failed; the test result can also include the target status code, which can be based on the target status code By determining the success or failure of the interaction test, the execution result of the interaction test performed by the target virtual device can be determined. Through this embodiment, the purpose of generating a target virtual device based on the target information of the device to be tested and interactively testing the target virtual device based on the corpus included in the target test text is achieved, which avoids the need to test real devices in the related art. This leads to a large workload and a waste of human resources. Through the present invention, the problem of low efficiency of the equipment testing method in the related art is solved, and the effect of improving equipment testing efficiency is achieved.

在一个可选的实施例中,对所述目标测试文本进行语义解析,得到语义解析结果,包括:通过自然语言处理NLP对所述目标测试文本进行语义解析,以获得所述语义解析结果,其中,所述语义解析结果中包括所述目标测试文本中包含的语料所指示的测试类型;基于所述语义解析结果对所述目标虚拟设备进行交互测试,包括:基于所述测试类型对所述目标虚拟设备进行交互测试。在本实施例中,测试平台在接收到目标测试文本后,可通过NLP对目标测试文本进行语义解析,以获得语义解析结果,目标测试文本中包括对目标虚拟设备进行交互测试的语料,其中,可能包括一条语料,也可能包括多条语料,例如,对目标测试文本进行语义识别,以获得语义解析结果,根据语义解析结果确定语料所指示的测试类型,在实际应用中,语料的测试类型可以是设备控制类型,以空调的测试为例,语料为“空调当前温度”,然后,基于对该语料的语义解析结果对目标虚拟设备进行交互测试,例如,由程序执行该交互测试并对与该语料对应的设备属性(如空调温度属性)进行修改,以完成交互测试;或者,语料所指示的测试类型还可以是第三方类型,第三方类型为需要通过第三方服务对语料所指示的语义进行查询以获得反馈结果,例如,语料为“今天天气怎么样”,或“宫保鸡丁怎么做”,该类语料需要调用第三方服务进行查询以获得反馈结果,以完成交互测试。通过本实施例,实现了确定目标测试文本中所包括的语料所指示的测试类型,并基于语料的测试类型对目标虚拟设备进行交互测试的目的。In an optional embodiment, performing semantic analysis on the target test text to obtain a semantic analysis result includes: performing semantic analysis on the target test text through natural language processing (NLP) to obtain the semantic analysis result, wherein , the semantic analysis result includes the test type indicated by the corpus contained in the target test text; performing an interactive test on the target virtual device based on the semantic analysis result includes: testing the target based on the test type Virtual devices for interactive testing. In this embodiment, after the test platform receives the target test text, it can perform semantic analysis on the target test text through NLP to obtain the semantic analysis result. The target test text includes the corpus for interactive testing of the target virtual device, wherein, It may include one piece of corpus, or may include multiple pieces of corpus. For example, carry out semantic recognition on the target test text to obtain semantic analysis results, and determine the test type indicated by the corpus according to the semantic analysis results. In practical applications, the test type of the corpus can be It is the type of device control. Taking the air conditioner test as an example, the corpus is "the current temperature of the air conditioner". Then, based on the semantic analysis results of the corpus, an interactive test is performed on the target virtual device. Modify the device attributes (such as air-conditioning temperature attributes) corresponding to the corpus to complete the interactive test; or, the test type indicated by the corpus can also be a third-party type, and the third-party type needs to perform the semantics indicated by the corpus through third-party services. Query to obtain feedback results. For example, the corpus is "how is the weather today" or "how to make Kung Pao Chicken". This type of corpus needs to call a third-party service to query and obtain feedback results to complete the interaction test. Through this embodiment, the purpose of determining the test type indicated by the corpus included in the target test text and performing an interactive test on the target virtual device based on the test type of the corpus is achieved.

在一个可选的实施例中,基于所述测试类型对所述目标虚拟设备进行交互测试,包括:在确定所述测试类型为设备控制类型的情况下,通过基于所述语义解析结果所指示的控制操作对所述目标虚拟设备进行控制的方式来对所述目标虚拟设备进行所述交互测试;在确定所述测试类型为第三方类型的情况下,通过执行如下操作来对所述目标虚拟设备进行所述交互测试:调用第三方服务执行所述语义解析结果所指示的操作,获取所述第三方服务所反馈的执行结果,展示所述执行结果。在本实施例中,当确定目标测试文本中所包括的语料所指示的测试类型为设备控制类型时,通过基于对该语料的语义解析结果对目标虚拟设备进行交互测试,例如,语料为“打开空调”,由程序执行该交互测试并对与该语料对应的设备属性(如开关机属性)进行修改,以完成交互测试;当确定语料所指示的测试类型为第三方类型时,即需要通过第三方服务对语料所指示的语义进行查询后返回查询结果(即第三方服务执行操作的执行结果),将查询结果作为交互测试的测试结果,并展示查询结果。通过本实施例,实现了根据不同的测试类型对目标虚拟设备执行不同的交互测试策略的目的。In an optional embodiment, performing an interactive test on the target virtual device based on the test type includes: when the test type is determined to be a device control type, by Performing the interaction test on the target virtual device in a manner of controlling the target virtual device by the control operation; in the case that the test type is determined to be a third-party type, performing the following operations on the target virtual device Performing the interaction test: calling a third-party service to execute the operation indicated by the semantic analysis result, obtaining the execution result fed back by the third-party service, and displaying the execution result. In this embodiment, when it is determined that the test type indicated by the corpus included in the target test text is the device control type, an interactive test is performed on the target virtual device based on the semantic analysis result of the corpus, for example, the corpus is "open Air conditioner", the program executes the interaction test and modifies the device attributes (such as switch attributes) corresponding to the corpus to complete the interaction test; when it is determined that the test type indicated by the corpus is a third-party type, it needs to pass the first The third-party service queries the semantics indicated by the corpus and returns the query result (that is, the execution result of the operation performed by the third-party service), takes the query result as the test result of the interactive test, and displays the query result. Through this embodiment, the purpose of executing different interactive test strategies on the target virtual device according to different test types is achieved.

在一个可选的实施例中,基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,包括:基于所述语义解析结果中所包括的目标属性字段对所述目标虚拟设备进行交互测试,以获得所述运行状态,其中,所述目标属性字段用于指示对所述目标虚拟设备的与所述目标属性字段对应的目标属性进行操作;将所述运行状态与所述语义解析结果中包括的目标结果字段进行对比,以获得所述执行结果,其中,所述执行结果用于指示所述交互测试是否成功,所述目标结果字段用于指示对所述目标虚拟设备的所述目标属性进行操作的结果。在本实施例中,通过确定语义解析结果中所包括的目标属性字段,例如,目标属性字段为开关属性,或温度属性,或其它属性,基于目标属性字段对目标虚拟设备进行交互测试,以获得运行状态,即获得目标虚拟设备的属性信息,例如,开关属性变化信息,或温度变化信息;然后,将运行状态与语义解析结果中包括的目标结果字段进行对比,以获得执行结果,例如,语义解析结果为将温度调成28℃,该语义解析结果中的目标结果字段为28℃,此时,可将运行状态中的温度属性变化信息与目标结果字段进行对比,从而可获得执行结果,即可获知该上述交互测试是否成功。In an optional embodiment, performing an interactive test on the target virtual device based on the semantic analysis result, and generating a test result includes: performing an interactive test on the target virtual device based on the target attribute field included in the semantic analysis result performing an interaction test to obtain the running state, wherein the target attribute field is used to indicate that the target attribute corresponding to the target attribute field of the target virtual device is operated; the running state and the semantic The target result field included in the parsing result is compared to obtain the execution result, wherein the execution result is used to indicate whether the interaction test is successful, and the target result field is used to indicate all The result of the operation on the target property described above. In this embodiment, by determining the target attribute field included in the semantic analysis result, for example, the target attribute field is a switch attribute, or a temperature attribute, or other attributes, an interactive test is performed on the target virtual device based on the target attribute field to obtain Running state, that is, to obtain the attribute information of the target virtual device, for example, switch attribute change information, or temperature change information; then, compare the running state with the target result field included in the semantic analysis result to obtain the execution result, for example, semantic The analysis result is to adjust the temperature to 28°C. The target result field in the semantic analysis result is 28°C. At this time, the temperature attribute change information in the running state can be compared with the target result field to obtain the execution result, namely It can be known whether the above-mentioned interaction test is successful.

在一个可选的实施例中,将所述运行状态与所述语义解析结果中包括的目标结果字段进行对比,以获得所述执行结果,包括:将所述运行状态与所述目标结果字段进行对比,以获得对比结果;在所述对比结果指示所述运行状态与所述目标结果字段一致的情况下,确定所述交互测试成功;所述方法还包括:展示所述测试结果,其中,所述测试结果中包括目标状态码,所述目标状态码用于指示所述交互测试的所述执行结果。在本实施例中,将运行状态与目标结果字段进行对比,以获得对比结果,当对比结果指示运行状态与目标结果字段一致时,可确定交互测试成功,相反,当对比结果指示运行状态与目标结果字段不一致时,可确定交互测试失败;在进行交互测试之后,生成测试结果,测试结果中可包括目标状态码,目标状态码用于指示目标虚拟设备交互测试成功或失败的状态,即本次交互测试的结果,在实际应用中,还可将测试结果在测试平台的预定区域中进行展示,以方便用户或测试人员得知本次交互测试是否成功,或者失败的原因,即可根据状态码判断失败的原因。在实际应用中,针对每次交互测试,会生成相应的日志,开发人员或测试人员可根据基于日志判断交互失败的原因。In an optional embodiment, comparing the running state with the target result field included in the semantic analysis result to obtain the execution result includes: comparing the running state with the target result field comparison to obtain a comparison result; when the comparison result indicates that the operation state is consistent with the target result field, it is determined that the interaction test is successful; the method also includes: displaying the test result, wherein the The test result includes a target status code, and the target status code is used to indicate the execution result of the interaction test. In this embodiment, the running state is compared with the target result field to obtain the comparison result. When the comparison result indicates that the running state is consistent with the target result field, it can be determined that the interactive test is successful. On the contrary, when the comparison result indicates that the running state is consistent with the target result field When the result fields are inconsistent, it can be determined that the interaction test has failed; after the interaction test is performed, the test result can be generated, and the test result can include the target status code, which is used to indicate the status of the target virtual device interaction test success or failure, that is, this time The results of the interactive test, in practical applications, the test results can also be displayed in the predetermined area of the test platform, so that the user or tester can know whether the interactive test is successful or the reason for the failure, and then the user can check the status code according to the status code Determine the reason for the failure. In practical applications, for each interaction test, a corresponding log will be generated, and the developer or tester can judge the cause of the interaction failure based on the log.

在一个可选的实施例中,在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备,包括:在接收到请求添加测试设备的请求指令的情况下,弹出目标窗口,其中,所述请求指令是在对目标页面上的指定控件执行第一预定操作后所触发的;在检测到在所述目标窗口中输入了所述目标信息的情况下,且在确定目标信息资源库中存在所述目标信息的情况下,生成所述目标虚拟设备,并将所述目标虚拟设备添加至目标设备列表中,其中,所述目标信息资源库是预先建立的并存储有包含所述目标信息在内的多个设备的信息。在本实施例中,当用户或测试人员对测试平台的目标页面上的指定控件执行第一预定操作时将触发请求指令,以请求添加待测试设备,此时目标页面将弹出目标窗口,以供用户或测试人员输入测试设备的目标信息,例如,上述指定控件为目标页面中右上角或左上角区域或中间偏上区域或其它区域中的控件,该指定控件的名称可为添加设备,或新增设备等,上述第一预定操作可以是单击,或双击,或触摸等操作,当用户或测试人员输入了待测试设备的目标信息后,测试平台效验目标信息资源库中存在与该目标信息对应的设备的情况下,生成目标虚拟设备,并将目标虚拟设备添加到目标设备列表中,目标设备列表中可包括上述目标虚拟设备的基本信息,如设备品类、设备型号及设备ID,还可包括目标虚拟设备的其他信息,例如,目标虚拟设备的属性信息,上述目标信息资源库中保存有各类设备的详细信息,其中包括各设备的属性信息,当然,目标设备列表中可包括多台虚拟设备。通过本实施例,实现了添加待测试设备的目标信息以生成目标虚拟设备的目的。In an optional embodiment, when the target information of the device to be tested is acquired, generating the target virtual device based on the target information includes: popping up the target window, wherein the request instruction is triggered after the first predetermined operation is performed on the specified control on the target page; when it is detected that the target information is input in the target window, and the target is determined If the target information exists in the information resource library, generate the target virtual device, and add the target virtual device to the target device list, wherein the target information resource library is pre-established and stores information including Information about multiple devices including the target information. In this embodiment, when the user or tester performs the first predetermined operation on the specified control on the target page of the test platform, the request instruction will be triggered to request to add the device to be tested. At this time, the target page will pop up a target window for The user or tester inputs the target information of the test equipment. For example, the above specified control is the control in the upper right corner or upper left corner area or the upper middle area or other areas of the target page. The name of the specified control can be Add Device, or New Adding equipment, etc., the above-mentioned first predetermined operation can be operations such as single-click, or double-click, or touch. When the user or tester enters the target information of the device to be tested, the test platform will verify that the target information exists in the target information resource library. In the case of the corresponding device, generate the target virtual device, and add the target virtual device to the target device list. The target device list can include the basic information of the above-mentioned target virtual device, such as the device category, device model and device ID, and can also Including other information of the target virtual device, for example, the attribute information of the target virtual device. The above-mentioned target information resource library stores detailed information of various devices, including the attribute information of each device. Of course, the target device list can include multiple virtual device. Through this embodiment, the purpose of adding target information of the device to be tested to generate a target virtual device is achieved.

在一个可选的实施例中,接收对所述目标虚拟设备进行交互测试的目标测试文本,包括:在确定已从所述目标设备列表中选择所述目标虚拟设备的情况下,接收所述目标测试文本。在本实施例中,当用户或测试人员从目标设备列表中选择目标虚拟设备时,测试平台可接收输入的目标测试文本,目标设备列表中可包括多台设备,在实际应用中,在测试平台的指定区域可展示目标设备列表,而该目标设备列表可展示成下拉框的形式供用户选择,即用户可通过在页面中的目标设备列表下拉框来选择相应的虚拟设备,例如,当用户需要对某款空调设备进行交互测试时,可选择目标设备列表中的该款空调设备即可。通过本实施例,实现了从目标设备列表中选择目标虚拟设备以进行交互测试的目的。In an optional embodiment, receiving the target test text for performing an interactive test on the target virtual device includes: receiving the target virtual device when it is determined that the target virtual device has been selected from the target device list. test text. In this embodiment, when the user or tester selects the target virtual device from the target device list, the test platform can receive the input target test text, and the target device list can include multiple devices. In practical applications, the test platform The designated area of the page can display the target device list, and the target device list can be displayed in the form of a drop-down box for the user to choose, that is, the user can select the corresponding virtual device through the target device list drop-down box on the page, for example, when the user needs When performing an interactive test on a certain air conditioner, you can select the air conditioner in the target device list. Through this embodiment, the purpose of selecting a target virtual device from the target device list for interactive testing is achieved.

在一个可选的实施例中,接收对所述目标虚拟设备进行交互测试的目标测试文本包括:在所述目标页面的指定区域展示所述目标设备列表,其中,所述目标设备列表中包括所述目标信息及所述目标虚拟设备的目标属性信息;在确定对所述目标属性信息执行第二预定操作的情况下,更新所述目标设备列表;在确定已从更新后的所述目标设备列表中选择所述目标虚拟设备的情况下,接收所述目标测试文本。在本实施例中,在目标页面的指定区域展示目标设备列表,例如,在目标页面的中间偏左区域,或中间偏右区域,或其它区域展示目标设备列表,目标设备列表中包括前述待测试设备的目标信息,也可称为目标虚拟设备的目标信息,还包括目标虚拟设备的目标属性信息,以空调为例,还可包括空调的开关机属性信息,或温度属性信息,或风速属性信息等,在实际应用中,在前述生成目标虚拟设备并将目标虚拟设备添加至目标设备列表中时,可将目标信息资源库中所包括的与待测试设备的目标信息相对应的待测试设备的属性信息,及目标信息一起添加至目标设备列表中;当对目标属性信息执行第二预定操作时,更新目标设备列表,在实际应用中,在测试平台中给用户提供了编辑待测试设备(或虚拟设备)属性的入口,这样可以让用户对设备的属性信息进行查看或编辑,例如,增加或删除目标虚拟设备的属性信息,或修改目标虚拟设备的属性信息等,即实现了对目标虚拟设备的属性信息进行编辑的目的,然后,当用户从更新后的目标设备列表中选择目标虚拟设备时,可接收目标测试文本,进而对目标虚拟设备进行交互测试。In an optional embodiment, receiving the target test text for performing an interactive test on the target virtual device includes: displaying the target device list in a designated area of the target page, wherein the target device list includes the The target information and the target attribute information of the target virtual device; when it is determined to perform a second predetermined operation on the target attribute information, update the target device list; when it is determined that the target device list has been updated When the target virtual device is selected, the target test text is received. In this embodiment, the target device list is displayed in a designated area of the target page, for example, the target device list is displayed in the center-left area of the target page, or the center-right area, or other areas, and the target device list includes the aforementioned The target information of the device can also be called the target information of the target virtual device, and also includes the target attribute information of the target virtual device. Taking the air conditioner as an example, it can also include the on/off attribute information of the air conditioner, or the temperature attribute information, or the wind speed attribute information etc., in actual application, when generating the target virtual device and adding the target virtual device to the target device list, the target information of the device under test corresponding to the target information of the device under test included in the target information resource library Attribute information, and target information are added in the target device list together; When carrying out the second predetermined operation to target attribute information, update the target device list, in actual application, provide editing equipment to be tested (or virtual device) attribute entry, so that users can view or edit the attribute information of the device, for example, add or delete the attribute information of the target virtual device, or modify the attribute information of the target virtual device, etc., that is, realize the target virtual device Then, when the user selects the target virtual device from the updated target device list, the target test text can be received, and then the target virtual device can be interactively tested.

在一个可选的实施例中,基于所述语义解析结果对所述目标虚拟设备进行交互测试,包括:在确定所述目标测试文本为包含多条语料的文本的情况下,基于对所述多条语料进行语义解析所获得的多个所述语义解析结果,对所述目标虚拟设备依次进行交互测试;或者,在所述目标虚拟设备包括多个虚拟设备的情况下,基于对所述目标测试文本中包含的一条或多条语料进行语义解析所获得的一个或多个所述语义解析结果,对所述多个虚拟设备依次进行交互测试。在本实施例中,当目标测试文本为包含多条语料的文本时,同样可通过NLP对多条语料进行分析,进而基于多条语料所分别指示的语义对目标虚拟设备依次进行交互测试,即通过一次输入包含多条语料的目标测试文本,可进行多次交互测试的目的,在实际应用中,可基于多个语义解析结果对目标虚拟设备依次进行交互测试,即对目标虚拟设备进行批量交互测试;可选地,还可根据同一条语料或多条语料依次对多个虚拟设备进行交互测试。通过本实施例,实现了基于目标测试文本对目标虚拟设备进行批量的交互测试的目的,达到了提高测试效率的效果,提升了用户的体验度。In an optional embodiment, performing an interactive test on the target virtual device based on the semantic analysis result includes: when it is determined that the target test text is a text containing multiple pieces of corpus, based on the analysis of the multiple A plurality of semantic analysis results obtained by performing semantic analysis on a piece of corpus, and sequentially perform interactive tests on the target virtual device; or, when the target virtual device includes a plurality of virtual devices, based on the target test One or more semantic analysis results obtained by performing semantic analysis on one or more pieces of corpus included in the text, and sequentially perform interactive tests on the plurality of virtual devices. In this embodiment, when the target test text is a text containing multiple corpora, the multiple corpora can also be analyzed through NLP, and then the target virtual device is sequentially interactively tested based on the semantics indicated by the multiple corpus, that is By inputting the target test text containing multiple pieces of corpus at one time, the purpose of multiple interactive tests can be carried out. In practical applications, the target virtual device can be interactively tested sequentially based on multiple semantic analysis results, that is, the target virtual device can be interacted in batches Test; optionally, multiple virtual devices can be interactively tested sequentially according to the same corpus or multiple corpora. Through this embodiment, the purpose of performing batch interactive testing on target virtual devices based on the target test text is achieved, the effect of improving test efficiency is achieved, and user experience is improved.

为了更好的理解上述设备测试方法的过程,以下再结合可选实施例对上述设备测试方法的流程进行说明,但不用于限定本申请实施例的技术方案。In order to better understand the process of the above-mentioned device testing method, the flow of the above-mentioned device testing method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application.

在本实施例中提供了一种设备交互测试的方法,图3是根据本申请具体实施例的一种设备交互测试流程图,如图3所示,具体包括如下步骤:In this embodiment, a method for device interaction testing is provided. FIG. 3 is a flowchart of a device interaction test according to a specific embodiment of the present application. As shown in FIG. 3 , it specifically includes the following steps:

步骤1,手动添加虚拟设备(对应于前述待测试设备)。在页面中输入设备品类、设备型号、设备id(对应于前述目标信息),如果满足步骤2则把本次输入的数据保存到数据库中。Step 1, manually add a virtual device (corresponding to the aforementioned device to be tested). Enter the device category, device model, and device id (corresponding to the aforementioned target information) on the page, and if step 2 is met, save the data entered this time to the database.

步骤2,设备数据。设备数据是指当前现有大量的设备数据信息池,相当于设备信息资源库(对应于前述目标信息资源库),即确定设备信息资源库,或查找设备信息资源库。其中包含了设备的详细信息,包括设备的属性信息,可用于效验步骤1中所添加的数据是否合格。Step 2, device data. Equipment data refers to a large number of existing equipment data information pools, which is equivalent to the equipment information resource database (corresponding to the aforementioned target information resource database), that is, to determine the equipment information resource database, or to search for the equipment information resource database. It contains the detailed information of the device, including the attribute information of the device, which can be used to verify whether the data added in step 1 is qualified.

步骤3,效验。效验步骤1中所添加的虚拟设备是否存在于步骤2中的设备信息资源库中,效验步骤1是否符合标准的设备数据。Step 3, validation. Verify whether the virtual device added in step 1 exists in the device information resource library in step 2, and verify whether step 1 conforms to the standard device data.

步骤4,成功添加虚拟设备。如果步骤3中效验成功,那么就可以添加虚拟设备,把步骤1和步骤2中和本次所添加的虚拟设备相关联的所有设备数据都保存起来,其中包括设备信息资源库中所包含的设备的属性信息。Step 4, the virtual device is successfully added. If the verification in step 3 is successful, then you can add the virtual device, and save all the device data associated with the virtual device added this time in step 1 and step 2, including the devices contained in the device information resource library attribute information.

步骤5,生成虚拟设备。此时,已经生成了虚拟设备,同时包含设备的基本信息,如设备品类、设备型号、设备id等和设备的详细信息,以及设备的属性信息。Step 5, generate a virtual device. At this point, the virtual device has been generated, which includes basic information of the device, such as device category, device model, device id, etc., detailed information of the device, and attribute information of the device.

步骤6,选择设备。由于在步骤4中已经成功添加虚拟设备,我们可以得到自己所添加的所有虚拟设备的列表(对应于前述目标设备列表)。我们把设备列表展示成下拉框的形式供用户选择。Step 6, select the device. Since the virtual device has been successfully added in step 4, we can obtain a list of all virtual devices added by ourselves (corresponding to the aforementioned target device list). We display the device list in the form of a drop-down box for users to choose.

我们通过在页面中的设备列表下拉框,可以选择相应的设备,比如我们需要控制空调设备,那么就选择空调即可。We can select the corresponding device through the drop-down box of the device list on the page. For example, if we need to control the air conditioner, then just select the air conditioner.

步骤7,输入语料。我们想查询空调相关的状况时,可以输入语料,比如输入“空调当前温度”。或者需要对设备批量进行控制时,可以导入excel文件进行批量的对设备进行交互。该步骤7对应于前述接收目标测试文本,其中,目标测试文本可以是单条语料,也可以是包含多条语料的excel文件。Step 7, input corpus. When we want to inquire about the status of the air conditioner, we can input corpus, such as "the current temperature of the air conditioner". Or when you need to control devices in batches, you can import excel files to interact with devices in batches. This step 7 corresponds to receiving the target test text, wherein the target test text can be a single corpus or an excel file containing multiple corpora.

步骤8,判断是否为设备控制类型。通过步骤6和步骤7后,我们可获取到设备名称和语料,通过NLP分析可以得知是属于设备控制类型还是第三方类型,如果是设备控制类型,我们需把所控制的字段属性进行修改,即相当于基于语料对设备进行交互测试,同时把最新的信息同步更新到步骤6中的虚拟设备列表中。Step 8, judging whether it is a device control type. After step 6 and step 7, we can obtain the device name and corpus. Through NLP analysis, we can know whether it belongs to the device control type or a third-party type. If it is a device control type, we need to modify the controlled field attributes. That is, it is equivalent to conducting an interactive test on the device based on the corpus, and synchronously updating the latest information to the virtual device list in step 6.

上述NLP是指利用计算机技术来分析、理解和处理自然语言的一门学科,即把计算机作为语言研究的强大工具,在计算机的支持下对语言信息进行定量化的研究,并提供可供人与计算机之间能共同使用的语言描写。The above-mentioned NLP refers to a discipline that uses computer technology to analyze, understand and process natural language, that is, to use computers as a powerful tool for language research, to carry out quantitative research on language information with the support of computers, and to provide information that can be used by people and people. A language description that can be shared between computers.

步骤9,其他服务。当上述步骤8中的条件如果不满足,即语料对应的交互测试类型不属于设备控制类型,则属于第三方类型,比如是问“今天天气怎么样?”,“宫保鸡丁怎么做?”等可以通过第三方技能来实现相应的回复。Step 9, other services. If the conditions in the above step 8 are not met, that is, the interactive test type corresponding to the corpus does not belong to the device control type, it belongs to the third-party type, such as asking "how is the weather today?", "how to make Kung Pao Chicken?" The corresponding reply can be realized through third-party skills.

步骤10,生成日志。如果本次对设备成功交互了,我们会产生结果(对应于前述测试结果),把设备当前的所有信息展示给用户,包括成功或失败的状态码,以及设备运行的状态,本次执行的结果等。方便用户得知本次交互是否成功,或者失败的原因,可根据状态码进行判断失败的原因。Step 10, generate logs. If the interaction with the device is successful this time, we will generate results (corresponding to the aforementioned test results), and display all the current information of the device to the user, including the status code of success or failure, and the status of the device, and the result of this execution Wait. It is convenient for the user to know whether the interaction is successful or the reason for the failure, and the reason for the failure can be judged according to the status code.

需要说明的是,上述步骤6中已经可以获取到虚拟设备列表,我们可以展示给用户。并且提供给用户编辑设备运行状态(或称为设备属性信息)的入口,可以让用户对设备的基本状态进行查看和编辑。当用户进行编辑后(对应于前述对目标属性信息执行第二预定操作),我们把用户所编辑的最新数据同步到步骤6中,这样就实现了编辑设备运行状态的功能。It should be noted that the virtual device list can already be obtained in the above step 6, and we can display it to the user. In addition, an entry for users to edit the operating state of the device (or device attribute information) is provided, allowing the user to view and edit the basic state of the device. After the user edits (corresponding to the aforementioned second predetermined operation on the target attribute information), we synchronize the latest data edited by the user to step 6, thus realizing the function of editing the operating status of the device.

在上述实施例中,实现了通过添加虚拟设备,来模拟设备交互的最终结果的目的;还实现了通过输入文本来模拟对设备的语音控制,以及通过导入Excel文件,从而批量模拟设备的交互的目的;此外,通过模拟后产生的响应结果,设备详情,状态码等信息,可实现方便问题排查和得知本次交互的执行情况的目的,以及通过编辑设备运行状态(或设备属性),来修改当前虚拟设备的运行状态的目的。In the above embodiment, the purpose of simulating the final result of device interaction by adding virtual devices is achieved; it is also realized by inputting text to simulate the voice control of the device, and by importing Excel files to simulate the interaction of devices in batches Purpose; In addition, through the response results generated after the simulation, device details, status codes and other information, the purpose of facilitating troubleshooting and knowing the execution status of this interaction can be achieved, and by editing the device operating status (or device properties), to The purpose of modifying the running state of the current virtual device.

相对于相关技术中,需要对真实的设备进行语音交互测试,这种测试方式会出现很多弊端,例如,缺点一,依赖实体家电设备无法覆盖全部的品类,因此导致无法对全部的设备进行全面的测试。缺点二,对真实的机器进行测试,造成设备资源的损耗,导致无法二次销售,从而影响公司的收益。缺点三,对人力资源的浪费,对真实的机器进行交互时,工作量相对比较大的。缺点四,测试地方的限制,测试人员无法随时随地进行测试。Compared with related technologies, it is necessary to conduct voice interaction tests on real devices. This test method will have many disadvantages. For example, the first disadvantage is that relying on physical home appliances cannot cover all categories, so it is impossible to comprehensively test all devices. test. Disadvantage 2: Testing the real machine will cause the loss of equipment resources, resulting in the inability to re-sell, thus affecting the company's revenue. The third disadvantage is the waste of human resources. When interacting with real machines, the workload is relatively large. Disadvantage 4: Due to the limitation of testing places, testers cannot conduct tests anytime and anywhere.

通过本发明实施例,通过设备模拟器来对虚拟设备进行模拟交互测试,一方面,通过添加虚拟设备功能,来解决缺乏设备的功能和设备地方限制的问题以及对真实设备资源的损耗,从而可以节省测试资源,提升测试效率、测试的完整性以及项目的安全性。设备模拟器还可以批量的导入大量的交互语料,从而实现一次操作,即可对设备进行批量交互,很大程度上可以提升测试人员的工作效率,也会让开发人员问题排查变的更加方便。Through the embodiment of the present invention, the virtual device is simulated and interactively tested through the device simulator. On the one hand, by adding virtual device functions, the problems of lack of device functions and device local restrictions and the loss of real device resources can be solved. Save test resources, improve test efficiency, test integrity and project security. The device simulator can also import a large amount of interactive corpus in batches, so that a batch of devices can be interacted with in one operation, which can greatly improve the work efficiency of testers and make troubleshooting for developers more convenient.

通过本发明实施例所提供的方法,一方面,通过添加虚拟设备可以实现设备的多样化和全面性。同时可以避免设备损耗,以及减少测试人员和开发人员的测试时间,从而为公司增加相应的盈利。另一方便,可以批量导入多条语料,从而实现一次操作多次交互的功能,很大程度上提升了工作效率。工作人员无需面对面设备进行测试,在家访问网页即可进行模拟测试,避免了测试地点方面的限制,使得设备交互测试变得更加灵活。同时可以显示返回结果,可以帮助了解设备的详情和本次交互是否正常或异常,也可根据状态码定位问题的类型,从而方便定位问题。可以对设备状态进行编辑,可以一次修改某个设备的多个状态,可以更快捷的修改设备的运行状态。Through the method provided by the embodiment of the present invention, on the one hand, the diversification and comprehensiveness of devices can be realized by adding virtual devices. At the same time, equipment loss can be avoided, and the testing time of testers and developers can be reduced, thereby increasing corresponding profits for the company. Another convenience is that multiple pieces of corpus can be imported in batches, so as to realize the function of one operation and multiple interactions, which greatly improves work efficiency. The staff does not need to face-to-face the device to test, and can conduct a simulation test by visiting the webpage at home, avoiding the limitation of the test location, and making the device interaction test more flexible. At the same time, the returned results can be displayed, which can help to understand the details of the device and whether the interaction is normal or abnormal. It can also locate the type of the problem according to the status code, so as to facilitate the location of the problem. The device status can be edited, multiple states of a certain device can be modified at one time, and the operating status of the device can be modified more quickly.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is Better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the method of each embodiment of the present application.

在本实施例中还提供了一种设备测试装置,图4是根据本申请实施例的一种设备测试装置的结构框图,如图4所示,包括:In this embodiment, an equipment testing device is also provided. FIG. 4 is a structural block diagram of an equipment testing device according to an embodiment of the present application. As shown in FIG. 4 , it includes:

生成模块402,用于在获取到待测试设备的目标信息的情况下,基于所述目标信息生成目标虚拟设备;A generating module 402, configured to generate a target virtual device based on the target information when the target information of the device to be tested is acquired;

处理模块404,用于接收对所述目标虚拟设备进行交互测试的目标测试文本,并对所述目标测试文本进行语义解析,得到语义解析结果;A processing module 404, configured to receive a target test text for interactive testing of the target virtual device, and perform semantic analysis on the target test text to obtain a semantic analysis result;

测试模块406,用于基于所述语义解析结果对所述目标虚拟设备进行交互测试,生成测试结果,所述测试结果包括所述目标虚拟设备的运行状态和执行结果。The testing module 406 is configured to conduct an interactive test on the target virtual device based on the semantic analysis result, and generate a test result, the test result including the running state and execution result of the target virtual device.

在一个可选的实施例中,上述处理模块404包括:分析单元,用于通过自然语言处理NLP对所述目标测试文本进行语义解析,以获得所述语义解析结果,其中,所述语义解析结果中包括所述目标测试文本中包含的语料所指示的测试类型;上述测试模块406包括:第一测试单元,用于基于所述测试类型对所述目标虚拟设备进行交互测试。In an optional embodiment, the above-mentioned processing module 404 includes: an analysis unit, configured to perform semantic analysis on the target test text through natural language processing (NLP) to obtain the semantic analysis result, wherein the semantic analysis result includes the test type indicated by the corpus contained in the target test text; the test module 406 includes: a first test unit, configured to conduct an interactive test on the target virtual device based on the test type.

在一个可选的实施例中,上述第一测试单元包括:第一测试子单元,用于在确定所述测试类型为设备控制类型的情况下,通过基于所述语义解析结果所指示的控制操作对所述目标虚拟设备进行控制的方式来对所述目标虚拟设备进行所述交互测试;第二测试子单元,用于在确定所述测试类型为第三方类型的情况下,通过执行如下操作来对所述目标虚拟设备进行所述交互测试:调用第三方服务执行所述语义解析结果所指示的操作,获取所述第三方服务所反馈的执行结果,展示所述执行结果。In an optional embodiment, the above-mentioned first test unit includes: a first test subunit, configured to, in the case that the test type is determined to be a device control type, perform a control operation based on the semantic analysis result The interaction test is performed on the target virtual device by controlling the target virtual device; the second test subunit is configured to perform the following operations when determining that the test type is a third-party type Performing the interaction test on the target virtual device: calling a third-party service to execute the operation indicated by the semantic analysis result, obtaining the execution result fed back by the third-party service, and displaying the execution result.

在一个可选的实施例中,上述测试模块406包括:第二测试单元,用于基于所述语义解析结果中所包括的目标属性字段对所述目标虚拟设备进行交互测试,以获得所述运行状态,其中,所述目标属性字段用于指示对所述目标虚拟设备的与所述目标属性字段对应的目标属性进行操作;对比单元,用于将所述运行状态与所述语义解析结果中包括的目标结果字段进行对比,以获得所述执行结果,其中,所述执行结果用于指示所述交互测试是否成功,所述目标结果字段用于指示对所述目标虚拟设备的所述目标属性进行操作的结果。In an optional embodiment, the above-mentioned testing module 406 includes: a second testing unit, configured to perform an interactive test on the target virtual device based on the target attribute field included in the semantic analysis result, so as to obtain the running state, wherein the target attribute field is used to indicate that the target attribute corresponding to the target attribute field of the target virtual device is operated; a comparison unit is used to compare the operation status with the semantic analysis result included The target result field is compared to obtain the execution result, wherein the execution result is used to indicate whether the interaction test is successful, and the target result field is used to indicate that the target attribute of the target virtual device is performed the result of the operation.

在一个可选的实施例中,上述对比单元包括:对比子单元,用于将所述运行状态与所述目标结果字段进行对比,以获得对比结果;确定子单元,用于在所述对比结果指示所述运行状态与所述目标结果字段一致的情况下,确定所述交互测试成功;上述装置还包括:展示模块408,如图5所示,图5是根据本申请实施例的一种设备测试装置的优选的结构框图,展示模块408用于在基于所述目标测试文本对所述目标虚拟设备进行交互测试之后,展示所述测试结果,其中,所述测试结果中包括目标状态码,所述目标状态码用于指示所述交互测试的所述执行结果。In an optional embodiment, the comparison unit includes: a comparison subunit, configured to compare the operating status with the target result field to obtain a comparison result; a determination subunit, configured to When indicating that the running state is consistent with the target result field, it is determined that the interaction test is successful; the above-mentioned device also includes: a display module 408, as shown in FIG. 5 , which is a device according to an embodiment of the present application A preferred structural block diagram of the test device, the display module 408 is configured to display the test result after the target virtual device is interactively tested based on the target test text, wherein the test result includes a target status code, and The target status code is used to indicate the execution result of the interaction test.

在一个可选的实施例中,上述生成模块402包括:弹出单元,用于在接收到请求添加测试设备的请求指令的情况下,弹出目标窗口,其中,所述请求指令是在对目标页面上的指定控件执行第一预定操作后所触发的;处理单元,用于在检测到在所述目标窗口中输入了所述目标信息的情况下,且在确定目标信息资源库中存在所述目标信息的情况下,生成所述目标虚拟设备,并将所述目标虚拟设备添加至目标设备列表中,其中,所述目标信息资源库是预先建立的并存储有包含所述目标信息在内的多个设备的信息。In an optional embodiment, the generating module 402 includes: a pop-up unit, configured to pop up a target window when a request instruction for adding a test device is received, wherein the request instruction is on the target page Triggered after the designated control of the specified control executes the first predetermined operation; the processing unit is configured to detect that the target information is input in the target window, and determine that the target information exists in the target information resource library In the case of , generate the target virtual device and add the target virtual device to the target device list, wherein the target information resource library is pre-established and stores multiple Device information.

在一个可选的实施例中,上述测试模块406包括:第三测试单元,用于在确定所述目标测试文本为包含多条语料的文本的情况下,基于对所述多条语料进行语义解析所获得的多个所述语义解析结果,对所述目标虚拟设备依次进行交互测试;或者,第四测试单元,用于在所述目标虚拟设备包括多个虚拟设备的情况下,基于对所述目标测试文本中包含的一条或多条语料进行语义解析所获得的一个或多个所述语义解析结果,对所述多个虚拟设备依次进行交互测试。In an optional embodiment, the above-mentioned testing module 406 includes: a third testing unit, configured to perform semantic analysis based on the multiple pieces of corpus when it is determined that the target test text is a text containing multiple pieces of corpus The plurality of semantic analysis results obtained, sequentially perform interactive tests on the target virtual device; or, the fourth testing unit is configured to, when the target virtual device includes a plurality of virtual devices, based on the One or more semantic analysis results obtained by performing semantic analysis on one or more pieces of corpus contained in the target test text are used to conduct interactive tests on the plurality of virtual devices in sequence.

需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.

本申请的实施例还提供了一种计算机可读的存储介质,该计算机可读的存储介质包括存储的程序,其中,该程序运行时执行上述任一项的方法实施例中的步骤。Embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium includes a stored program, wherein, when the program is run, the steps in any one of the above method embodiments are executed.

在一个示例性实施例中,上述计算机可读的存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short). ), mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.

本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.

本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementation manners, and details will not be repeated here in this embodiment.

显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned application can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present application is not limited to any specific combination of hardware and software.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the preferred embodiment of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, some improvements and modifications can also be made. These improvements and modifications are also It should be regarded as the protection scope of this application.

Claims (10)

1. A method for testing a device, comprising:
under the condition of acquiring target information of a device to be tested, generating target virtual equipment based on the target information;
receiving a target test text for interactively testing the target virtual equipment, and performing semantic analysis on the target test text to obtain a semantic analysis result;
and performing interactive test on the target virtual equipment based on the semantic parsing result to generate a test result, wherein the test result comprises the running state and the execution result of the target virtual equipment.
2. The method of claim 1,
performing semantic analysis on the target test text to obtain a semantic analysis result, wherein the semantic analysis result comprises the following steps: performing semantic parsing on the target test text through Natural Language Processing (NLP) to obtain a semantic parsing result, wherein the semantic parsing result comprises a test type indicated by a corpus contained in the target test text;
performing interactive testing on the target virtual device based on the semantic parsing result, including: and performing interactive test on the target virtual equipment based on the test type.
3. The method of claim 2, wherein interactively testing the target virtual device based on the test type comprises:
under the condition that the test type is determined to be a device control type, performing the interactive test on the target virtual device in a mode of controlling the target virtual device based on the control operation indicated by the semantic parsing result;
performing the interactive test on the target virtual device by performing the following operations under the condition that the test type is determined to be a third party type: and calling a third-party service to execute the operation indicated by the semantic analysis result, acquiring an execution result fed back by the third-party service, and displaying the execution result.
4. The method according to any one of claims 1-3, wherein interactively testing the target virtual device based on the semantic parsing result to generate a test result comprises:
performing interactive test on the target virtual equipment based on a target attribute field included in the semantic analysis result to obtain the running state, wherein the target attribute field is used for indicating that a target attribute corresponding to the target attribute field of the target virtual equipment is operated;
and comparing the running state with a target result field included in the semantic parsing result to obtain the execution result, wherein the execution result is used for indicating whether the interaction test is successful, and the target result field is used for indicating a result of operating the target attribute of the target virtual device.
5. The method of claim 4, wherein comparing the running state with a target result field included in the semantic parsing result to obtain the execution result comprises:
comparing the running state with the target result field to obtain a comparison result;
determining that the interaction test is successful under the condition that the comparison result indicates that the running state is consistent with the target result field; the method further comprises the following steps:
and displaying the test result, wherein the test result comprises a target state code, and the target state code is used for indicating the execution result of the interactive test.
6. The method according to any one of claims 1 to 5, wherein in a case where target information of a device to be tested is obtained, generating a target virtual device based on the target information includes:
the method comprises the steps that under the condition that a request instruction for requesting to add test equipment is received, a target window pops up, wherein the request instruction is triggered after a first preset operation is executed on a specified control on a target page;
and under the condition that the target information is detected to be input in the target window and the target information exists in a target information resource library, generating the target virtual equipment and adding the target virtual equipment into a target equipment list, wherein the target information resource library is pre-established and stores information of a plurality of equipment including the target information.
7. The method according to any one of claims 1-5, wherein interactively testing the target virtual device based on the semantic parsing result comprises:
under the condition that the target test text is determined to be a text containing a plurality of corpora, sequentially carrying out interactive test on the target virtual equipment on the basis of a plurality of semantic analysis results obtained by carrying out semantic analysis on the plurality of corpora;
or,
and under the condition that the target virtual equipment comprises a plurality of pieces of virtual equipment, sequentially carrying out interactive test on the plurality of pieces of virtual equipment based on one or more semantic analysis results obtained by carrying out semantic analysis on one or more linguistic data contained in the target test text.
8. An apparatus testing device, comprising:
the generating module is used for generating target virtual equipment based on target information under the condition of acquiring the target information of the equipment to be tested;
the processing module is used for receiving a target test text for interactively testing the target virtual equipment and performing semantic analysis on the target test text to obtain a semantic analysis result;
and the test module is used for carrying out interactive test on the target virtual equipment based on the semantic analysis result to generate a test result, and the test result comprises the running state and the execution result of the target virtual equipment.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210916789.XA 2022-08-01 2022-08-01 Equipment testing method and device, storage medium and electronic device Active CN115460117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210916789.XA CN115460117B (en) 2022-08-01 2022-08-01 Equipment testing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210916789.XA CN115460117B (en) 2022-08-01 2022-08-01 Equipment testing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115460117A true CN115460117A (en) 2022-12-09
CN115460117B CN115460117B (en) 2024-07-19

Family

ID=84296332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210916789.XA Active CN115460117B (en) 2022-08-01 2022-08-01 Equipment testing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115460117B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118692447A (en) * 2024-06-11 2024-09-24 青岛海尔科技有限公司 A voice response testing method and device for intelligent household appliances

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210073108A1 (en) * 2019-09-09 2021-03-11 Inventec (Pudong) Technology Corporation Virtualized device-based test system and method thereof
US20210209309A1 (en) * 2020-04-30 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Semantics processing method, electronic device, and medium
CN113434421A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Virtual equipment testing method and device
CN113919360A (en) * 2020-07-09 2022-01-11 阿里巴巴集团控股有限公司 Semantic understanding method, voice interaction method, device, equipment and storage medium
CN114185782A (en) * 2021-12-08 2022-03-15 北京百度网讯科技有限公司 Interactive testing method and device for virtual object and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210073108A1 (en) * 2019-09-09 2021-03-11 Inventec (Pudong) Technology Corporation Virtualized device-based test system and method thereof
US20210209309A1 (en) * 2020-04-30 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Semantics processing method, electronic device, and medium
CN113919360A (en) * 2020-07-09 2022-01-11 阿里巴巴集团控股有限公司 Semantic understanding method, voice interaction method, device, equipment and storage medium
CN113434421A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Virtual equipment testing method and device
CN114185782A (en) * 2021-12-08 2022-03-15 北京百度网讯科技有限公司 Interactive testing method and device for virtual object and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118692447A (en) * 2024-06-11 2024-09-24 青岛海尔科技有限公司 A voice response testing method and device for intelligent household appliances

Also Published As

Publication number Publication date
CN115460117B (en) 2024-07-19

Similar Documents

Publication Publication Date Title
CN110147317B (en) Code testing method and device, electronic device and storage medium
CN112100079B (en) Test method and system based on simulation data calling and electronic equipment
CN106201846B (en) Method for monitoring performance and device in automatic test
CN109446075B (en) Interface testing method and device
CN110826071A (en) Software vulnerability risk prediction method, device, equipment and storage medium
CN108830383B (en) Method and system for demonstrating machine learning modeling process
CN115687349A (en) Database table generation method and device, storage medium and electronic device
CN110647314B (en) Skill generation method and device and electronic equipment
CN110321278A (en) System detection method and device, computer equipment, storage medium
CN106815143A (en) Test information processing method, device and electronic equipment
CN115460117A (en) Equipment testing method and device, storage medium and electronic device
CN115951947A (en) An information interaction method, device and storage medium
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
WO2023115831A1 (en) Application testing method and apparatus, electronic device and storage medium
CN114721626A (en) Scene publishing method, storage medium and electronic device
CN120104501A (en) Automated operation method, device, equipment and storage medium
CN113179183B (en) Service switch state control device and method
CN116257432A (en) Service system testing method and device
CN115292178A (en) Test data searching method, device, storage medium and terminal
CN111176982B (en) Test interface generation method and device
CN112286787B (en) Automatic testing method, system and electronic equipment for intelligent answering system
CN113973060A (en) An Internet of Things simulation method, device, system and storage medium
CN118395149B (en) Time series processing method, computer terminal, storage medium, and program product
CN115242688B (en) Network fault detection method, device and medium
CN115357446A (en) Device testing method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant