[go: up one dir, main page]

CN114900383B - Interface processing method, device, electronic device and computer readable storage medium - Google Patents

Interface processing method, device, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN114900383B
CN114900383B CN202210313530.6A CN202210313530A CN114900383B CN 114900383 B CN114900383 B CN 114900383B CN 202210313530 A CN202210313530 A CN 202210313530A CN 114900383 B CN114900383 B CN 114900383B
Authority
CN
China
Prior art keywords
interface
service
interface mode
equipment
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210313530.6A
Other languages
Chinese (zh)
Other versions
CN114900383A (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 CN202210313530.6A priority Critical patent/CN114900383B/en
Publication of CN114900383A publication Critical patent/CN114900383A/en
Application granted granted Critical
Publication of CN114900383B publication Critical patent/CN114900383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling
    • G10L15/1822Parsing for meaning understanding
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • H04L12/282Controlling appliance services of a home automation network by calling their functionalities based on user interaction within the home
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Acoustics & Sound (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种接口处理方法、装置、电子设备及计算机可读存储介质。其中,该方法包括:确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式;将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,通过音箱设备对关联设备进行控制。本发明解决了相关技术中在音箱设备和/或关联设备更新的情况下对服务进行更新时,出现的更新步骤繁琐的技术问题。

The present invention discloses an interface processing method, device, electronic device and computer-readable storage medium. The method includes: determining a first interface mode for a speaker device to provide a first service, a second interface mode for a speaker device to provide a second service, and a third interface mode for a speaker device to provide a third service; modifying the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to a fourth interface mode corresponding to the distributed service framework dubbo; setting the first interface in the fourth interface mode corresponding to dubbo to be a service interface corresponding to a predetermined service, which is used to control the associated device through the speaker device when the speaker device and/or associated device are updated. The present invention solves the technical problem of cumbersome update steps when updating services when the speaker device and/or associated devices are updated in the related art.

Description

接口处理方法、装置、电子设备及计算机可读存储介质Interface processing method, device, electronic device and computer-readable storage medium

技术领域Technical Field

本发明涉及计算机领域,具体而言,涉及一种接口处理方法、装置、电子设备及计算机可读存储介质。The present invention relates to the field of computers, and in particular to an interface processing method, device, electronic equipment and computer-readable storage medium.

背景技术Background technique

目前,随着智能家居的发展,用音箱控制智能设备已经较为常见。但是,智能设备和音箱时常会出现更新的现象,特别是控制的智能设备较多时,更新起来极不方便,消耗了大量的时间和资源,需要改进。例如在相关技术中,在音箱和/或智能设备要升级时,需要在当前设置的服务基础上,可能需要在音箱中将每个服务都重新更新,重新部署,不仅增加了维护的复杂度,而且增加了更新的难度。At present, with the development of smart homes, it is common to control smart devices with speakers. However, smart devices and speakers often need to be updated, especially when there are many smart devices to control. It is extremely inconvenient to update, which consumes a lot of time and resources and needs to be improved. For example, in the relevant technology, when the speaker and/or smart device needs to be upgraded, it is necessary to re-update and redeploy each service in the speaker based on the currently set services, which not only increases the complexity of maintenance, but also increases the difficulty of updating.

针对上述的问题,目前尚未提出有效的解决方案。To address the above-mentioned problems, no effective solution has been proposed yet.

发明内容Summary of the invention

本发明实施例提供了一种接口处理方法、装置、电子设备及计算机可读存储介质,以至少解决相关技术中在音箱设备和/或关联设备更新的情况下对服务进行更新时,出现的更新步骤繁琐的技术问题。The embodiments of the present invention provide an interface processing method, device, electronic device and computer-readable storage medium to at least solve the technical problem in the related art that the update steps are complicated when the service is updated when the speaker device and/or associated devices are updated.

根据本发明实施例的一个方面,提供了一种接口处理方法,包括:确定音箱设备提供第一服务的第一接口方式,所述音箱设备提供第二服务的第二接口方式,所述音箱设备提供第三服务的第三接口方式,其中,所述第一服务为提供关联设备列表的服务,所述第二服务为提供自然语言解析功能的服务,所述第三服务为向所述关联设备提供执行功能的服务,所述关联设备为所述音箱设备控制的设备;将所述音箱设备对应的所述第一接口方式,所述第二接口方式,以及所述第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置所述dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在所述音箱设备和/或关联设备更新的情况下,通过所述音箱设备对所述关联设备进行控制。According to one aspect of an embodiment of the present invention, an interface processing method is provided, including: determining a first interface mode for a speaker device to provide a first service, a second interface mode for the speaker device to provide a second service, and a third interface mode for the speaker device to provide a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, the third service is a service that provides an execution function to the associated device, and the associated device is a device controlled by the speaker device; modifying the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to a fourth interface mode corresponding to a distributed service framework dubbo; setting a first interface in the fourth interface mode corresponding to dubbo to a service interface corresponding to a predetermined service, for controlling the associated device through the speaker device when the speaker device and/or the associated device is updated.

可选地,所述设置所述dubbo对应的第四接口方式中第一接口为预定服务对应的服务接口之后,还包括:向注册中心zookeeper提供所述第一接口对应的第一接口地址,以使所述注册中心提供第一接口地址至所述关联设备,所述关联设备依据所述第一接口地址调用所述预定服务。Optionally, after setting the first interface in the fourth interface mode corresponding to the dubbo as the service interface corresponding to the scheduled service, it also includes: providing the first interface address corresponding to the first interface to the registration center zookeeper, so that the registration center provides the first interface address to the associated device, and the associated device calls the scheduled service based on the first interface address.

可选地,所述向注册中心zookeeper提供所述第一接口对应的第一接口地址,包括:在所述第一接口对应的第一接口地址变更的情况下,所述第一接口向所述注册中心提供第二接口地址,以使所述注册中心提供第二接口地址至所述关联设备,所述关联设备依据所述第二接口地址调用所述预定服务,其中,所述第二接口地址为所述第一接口地址变更后的地址。Optionally, providing the first interface address corresponding to the first interface to the registration center zookeeper includes: when the first interface address corresponding to the first interface changes, the first interface provides the second interface address to the registration center, so that the registration center provides the second interface address to the associated device, and the associated device calls the predetermined service based on the second interface address, wherein the second interface address is the address after the first interface address is changed.

可选地,确定音箱设备提供第一服务的第一接口方式,所述音箱设备提供第二服务的第二接口方式,所述音箱设备提供第三服务的第三接口方式之前,还包括:检测所述音箱设备和/或所述关联设备的更新状态;在所述音箱设备和/或所述关联设备的更新状态为存在更新的情况下,确定音箱设备提供第一服务的第一接口方式,所述音箱设备提供第二服务的第二接口方式,所述音箱设备提供第三服务的第三接口方式。Optionally, before determining the first interface mode in which the speaker device provides a first service, the second interface mode in which the speaker device provides a second service, and the third interface mode in which the speaker device provides a third service, it also includes: detecting an update status of the speaker device and/or the associated device; when the update status of the speaker device and/or the associated device indicates that an update has occurred, determining the first interface mode in which the speaker device provides the first service, the second interface mode in which the speaker device provides the second service, and the third interface mode in which the speaker device provides the third service.

可选地,该方法还包括:接收目标控制指令,其中,所述目标控制指令依据目标对象的命令语句得到;响应于所述目标控制指令,测试所述音箱设备对所述关联设备的控制状况;在所述控制状况出现控制异常的情况下,确定异常与产生所述异常的原因。Optionally, the method also includes: receiving a target control instruction, wherein the target control instruction is obtained based on a command statement of a target object; in response to the target control instruction, testing the control status of the speaker device over the associated device; and in the event of a control abnormality in the control status, determining the abnormality and the cause of the abnormality.

可选地,所述异常包括以下至少之一:所述关联设备不响应,所述关联设备响应不正确。Optionally, the anomaly includes at least one of the following: the associated device does not respond, and the associated device responds incorrectly.

根据本发明实施例的一个方面,提供了一种接口处理装置,包括:确定模块,用于确定音箱设备提供第一服务的第一接口方式,所述音箱设备提供第二服务的第二接口方式,所述音箱设备提供第三服务的第三接口方式,其中,所述第一服务为提供关联设备列表的服务,所述第二服务为提供自然语言解析功能的服务,所述第三服务为向所述关联设备提供执行功能的服务,所述关联设备为所述音箱设备控制的设备;修改模块,用于将所述音箱设备对应的所述第一接口方式,所述第二接口方式,以及所述第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置模块,用于设置所述dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在所述音箱设备和/或关联设备更新的情况下,通过所述音箱设备对所述关联设备进行控制。According to one aspect of an embodiment of the present invention, an interface processing device is provided, including: a determination module, used to determine a first interface mode for a speaker device to provide a first service, a second interface mode for the speaker device to provide a second service, and a third interface mode for the speaker device to provide a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, and the third service is a service that provides an execution function to the associated device, and the associated device is a device controlled by the speaker device; a modification module, used to modify the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to a fourth interface mode corresponding to a distributed service framework dubbo; a setting module, used to set the first interface in the fourth interface mode corresponding to dubbo to a service interface corresponding to a predetermined service, for controlling the associated device through the speaker device when the speaker device and/or the associated device is updated.

根据本发明实施例的一个方面,提供了一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现上述任一项所述的接口处理方法。According to one aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the above-mentioned interface processing methods.

根据本发明实施例的一个方面,提供了一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一项所述的接口处理方法。According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned interface processing methods.

根据本发明实施例的一个方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的接口处理方法。According to one aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned interface processing methods.

在本发明实施例中,通过确定出音箱设备提供关联设备列表服务的第一接口方式,音箱设备提供自然语言解析功能服务的第二接口方式,以及音箱设备向提供关联设备提供执行功能的第三接口方式,将上述三种接口方式均修改成分布式服务框架dubbo对应的第四接口方式,再设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,使得在音箱设备和/或关联设备更新的情况下,不需要进行手工的更新设置,会自动更新以实现通过音箱设备对关联设备的控制,进而解决了相关技术中在音箱设备和/或关联设备更新的情况下对服务进行更新时,出现的更新步骤繁琐的技术问题。In an embodiment of the present invention, by determining a first interface mode for a speaker device to provide an associated device list service, a second interface mode for a speaker device to provide a natural language parsing function service, and a third interface mode for a speaker device to provide an execution function to an associated device, the above three interface modes are all modified into a fourth interface mode corresponding to the distributed service framework dubbo, and then the first interface in the fourth interface mode corresponding to dubbo is set as a service interface corresponding to a predetermined service, so that when the speaker device and/or associated devices are updated, there is no need to perform manual update settings, and it will be automatically updated to achieve control of the associated devices through the speaker device, thereby solving the technical problem of cumbersome update steps when updating services when the speaker device and/or associated devices are updated in the related technology.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

图1是根据本发明实施例的接口处理方法的流程图;FIG1 is a flow chart of an interface processing method according to an embodiment of the present invention;

图2是根据本发明实施例的接口处理装置的结构框图;2 is a structural block diagram of an interface processing device according to an embodiment of the present invention;

图3是根据一示例性实施例示出的一种终端的结构框图。Fig. 3 is a structural block diagram of a terminal according to an exemplary embodiment.

具体实施方式Detailed ways

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

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

首先,在对本申请实施例进行描述的过程中出现的部分名词或术语适用于如下解释:First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

Dubbo:是一个分布式服务框架,一款高性能、轻量级的开源Java RPC框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案。使得应用可通过高性能的RPC实现服务的输出和输入功能,可以和Spring框架无缝集成。它提供了三大核心能力:面向接口的远程方法调用,智能容错和负载均衡,以及服务自动注册和发现。Dubbo: is a distributed service framework, a high-performance, lightweight open source Java RPC framework, dedicated to providing high-performance and transparent RPC remote service call solutions, as well as SOA service governance solutions. It enables applications to implement service output and input functions through high-performance RPC, and can be seamlessly integrated with the Spring framework. It provides three core capabilities: interface-oriented remote method calls, intelligent fault tolerance and load balancing, and automatic service registration and discovery.

ZooKeeper:是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。ZooKeeper: is a distributed, open source distributed application coordination service, an open source implementation of Google's Chubby, and an important component of Hadoop and Hbase. It is a software that provides consistency services for distributed applications, providing functions including: configuration maintenance, domain name services, distributed synchronization, group services, etc.

实施例1Example 1

根据本发明实施例,提供了一种接口处理方法的实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, an embodiment of an interface processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

图1是根据本发明实施例的接口处理方法的流程图,如图1所示,该方法包括如下步骤:FIG. 1 is a flow chart of an interface processing method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:

步骤S102,确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式,其中,第一服务为提供关联设备列表的服务,第二服务为提供自然语言解析功能的服务,第三服务为向关联设备提供执行功能的服务,关联设备为音箱设备控制的设备;Step S102, determining a first interface mode for the speaker device to provide a first service, a second interface mode for the speaker device to provide a second service, and a third interface mode for the speaker device to provide a third service, wherein the first service is a service for providing a list of associated devices, the second service is a service for providing a natural language parsing function, and the third service is a service for providing an execution function to an associated device, and the associated device is a device controlled by the speaker device;

步骤S104,将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;Step S104, modifying the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to the fourth interface mode corresponding to the distributed service framework dubbo;

步骤S106,设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,通过音箱设备对关联设备进行控制。Step S106, setting the first interface in the fourth interface mode corresponding to dubbo as the service interface corresponding to the predetermined service, which is used to control the associated device through the speaker device when the speaker device and/or the associated device is updated.

通过上述步骤,通过确定出音箱设备提供关联设备列表服务的第一接口方式,音箱设备提供自然语言解析功能服务的第二接口方式,以及音箱设备向提供关联设备提供执行功能的第三接口方式,将上述三种接口方式均修改成分布式服务框架dubbo对应的第四接口方式,再设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,使得在音箱设备和/或关联设备更新的情况下,不需要进行手工的更新设置,会自动更新以实现通过音箱设备对关联设备的控制,进而解决了相关技术中在音箱设备和/或关联设备更新的情况下对服务进行更新时,出现的更新步骤繁琐的技术问题。Through the above steps, by determining the first interface mode for the speaker device to provide an associated device list service, the second interface mode for the speaker device to provide a natural language parsing function service, and the third interface mode for the speaker device to provide an execution function to the associated device, the above three interface modes are all modified into the fourth interface mode corresponding to the distributed service framework dubbo, and then the first interface in the fourth interface mode corresponding to dubbo is set as the service interface corresponding to the predetermined service, so that when the speaker device and/or the associated device is updated, there is no need for manual update settings, and it will be automatically updated to realize the control of the associated device through the speaker device, thereby solving the technical problem of cumbersome update steps when updating the service when the speaker device and/or the associated device is updated in the related technology.

作为一种可选的实施例,确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式,其中,第一服务为提供关联设备列表的服务,第二服务为提供自然语言解析功能的服务,第三服务为向关联设备提供执行功能的服务,关联设备为音箱设备控制的设备。即确定出音箱设备提供关联设备列表服务的第一接口方式,音箱设备提供自然语言解析功能服务的第二接口方式,以及音箱设备向提供关联设备提供执行功能服务的第三接口方式。其中,音箱设备提供关联设备列表服务,能够获悉音箱设备能够控制的关联设备。提供自然语言解析功能服务可以为nlp服务,用于分析语言从而确定出控制指令。向关联设备提供执行功能服务,可以使关联设备执行分析出的控制指令。因此,通过确认出上述服务的接口方式,从而对接口方式进行修改,能够在音箱设备和/或关联设备更新的情况下,保持音箱设备对关联设备的控制正常。As an optional embodiment, determine the first interface mode in which the speaker device provides a first service, the second interface mode in which the speaker device provides a second service, and the third interface mode in which the speaker device provides a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, and the third service is a service that provides an execution function to an associated device, and the associated device is a device controlled by the speaker device. That is, determine the first interface mode in which the speaker device provides a list of associated devices, the second interface mode in which the speaker device provides a natural language parsing function service, and the third interface mode in which the speaker device provides an execution function service to an associated device. Among them, the speaker device provides a list of associated devices service, and can learn the associated devices that the speaker device can control. Providing a natural language parsing function service can be an nlp service, which is used to analyze language to determine a control instruction. Providing an execution function service to an associated device can enable the associated device to execute the analyzed control instruction. Therefore, by confirming the interface mode of the above services and modifying the interface mode, the speaker device can maintain normal control of the associated device when the speaker device and/or the associated device is updated.

作为一种可选的实施例,将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式。其中,通过将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为应用分布式服务框架dubbo对应的第四接口方式,能够达到就像调用本地方法一样调用远程方法的效果,只需简单配置。而且,dubbo对应的第四接口方式具有服务自动注册与发现功能,不再需要写死服务提供方地址,注册中心基于接口名查询服务提供者的地址,并且能够平滑添加或删除服务提供者。即在提供者的地址更新时,可以有效的获取地址。保证音箱设备对关联设备的控制正常。再者,当音箱设备关联的关联设备数量增多时,即当服务集群规模进一步扩大时,能够带动IT治理结构进一步升级,需要实现动态部署,进行流动计算,不会带来运行压力。As an optional embodiment, the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device are modified to the fourth interface mode corresponding to the distributed service framework dubbo. Among them, by modifying the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to the fourth interface mode corresponding to the application distributed service framework dubbo, the effect of calling a remote method just like calling a local method can be achieved, and only simple configuration is required. Moreover, the fourth interface mode corresponding to dubbo has the function of automatic service registration and discovery, and it is no longer necessary to write the service provider address. The registration center queries the address of the service provider based on the interface name, and can smoothly add or delete the service provider. That is, when the provider's address is updated, the address can be effectively obtained. Ensure that the speaker device controls the associated device normally. Furthermore, when the number of associated devices associated with the speaker device increases, that is, when the scale of the service cluster is further expanded, it can drive the IT governance structure to be further upgraded, and dynamic deployment needs to be implemented, and flow computing is performed, which will not bring operational pressure.

作为一种可选的实施例,将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式之后,还需要设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,实现通过音箱设备对关联设备的正常控制。需要说明的是,第一接口即为服务的提供者,通过第一接口中所包括的方法来实现预定功能。在使用ZooKeeper分布式应用程序协调服务时,在设置服务的提供者之后,服务的提供者向注册中心zookeeper注册的预定服务,关联设备向注册中心zookeeper订阅预定服务,注册中心zookeeper返回的服务的提供者,即第一接口对应的第一接口地址,关联设备获取第一接口地址,并依据第一接口地址调用预定服务。实现整个更新调用的过程。在关联设备获取第一接口地址时,如果第一接口的地址发生了变更,在该情况下,第一接口向注册中心提供第二接口地址,以使注册中心提供第二接口地址至关联设备,关联设备获取第二接口地址,即为第一接口地址变更后的地址,依据第二接口地址调用预定服务。因此,能够自动地更新,保证通过音箱设备对关联设备进行控制,且控制正常。其中,注册中心ZooKeeper是一个经典的分布式数据一致性解决方案,通过使用注册中心ZooKeeper进行协调,能够提供一个高性能、高可用,且具有严格顺序访问控制能力的分布式协调服务。分布式应用程序可以基于ZooKeeper实现数据发布与订阅、负载均衡、命名服务、分布式协调与通知、集群管理、Leader选举、分布式锁、分布式队列等功能。因此,基于ZooKeeper能够使得音箱设备控制关联设备的过程更加可靠,更好的参与实现音箱设备控制关联设备。As an optional embodiment, after the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device are modified to the fourth interface mode corresponding to the distributed service framework dubbo, it is also necessary to set the first interface in the fourth interface mode corresponding to dubbo as the service interface corresponding to the predetermined service, which is used to realize the normal control of the associated device through the speaker device when the speaker device and/or the associated device is updated. It should be noted that the first interface is the provider of the service, and the predetermined function is realized by the method included in the first interface. When using ZooKeeper distributed application coordination service, after setting the service provider, the service provider registers the predetermined service with the registration center zookeeper, the associated device subscribes to the predetermined service with the registration center zookeeper, the registration center zookeeper returns the service provider, that is, the first interface address corresponding to the first interface, the associated device obtains the first interface address, and calls the predetermined service according to the first interface address. The entire update call process is realized. When the associated device obtains the address of the first interface, if the address of the first interface changes, in this case, the first interface provides the second interface address to the registration center, so that the registration center provides the second interface address to the associated device, and the associated device obtains the second interface address, which is the address after the first interface address is changed, and calls the predetermined service according to the second interface address. Therefore, it can be automatically updated to ensure that the associated device is controlled by the speaker device, and the control is normal. Among them, the registration center ZooKeeper is a classic distributed data consistency solution. By using the registration center ZooKeeper for coordination, it can provide a high-performance, high-availability, and distributed coordination service with strict sequential access control capabilities. Distributed applications can implement data publishing and subscription, load balancing, naming services, distributed coordination and notification, cluster management, Leader election, distributed locks, distributed queues and other functions based on ZooKeeper. Therefore, based on ZooKeeper, the process of speaker devices controlling associated devices can be made more reliable, and better participate in the realization of speaker devices controlling associated devices.

作为一种可选的实施例,确定接口方式的时机可以为多种,例如,可以是音箱设备和/或关联设备更新时,此时,可以先检测音箱设备和/或关联设备的更新状态,在音箱设备和/或关联设备的更新状态为存在更新的情况下,确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式。也可以随时确定出上述服务的接口方式,修改接口方式并进行后续的设置。在此,时机不做限定。因为在设定一次后,均能够实现自动更新。在音箱设备和/或关联设备更新时确定接口方式能够及时的确定出需要修改接口方式的时机,及时地进行处理。As an optional embodiment, the timing for determining the interface mode can be multiple, for example, it can be when the speaker device and/or associated device is updated. At this time, the update status of the speaker device and/or associated device can be detected first. When the update status of the speaker device and/or associated device indicates that there is an update, the first interface mode for the speaker device to provide a first service, the second interface mode for the speaker device to provide a second service, and the third interface mode for the speaker device to provide a third service can be determined. The interface modes of the above services can also be determined at any time, the interface modes can be modified and subsequent settings can be made. Here, the timing is not limited. Because after setting once, automatic updates can be achieved. Determining the interface mode when the speaker device and/or associated device is updated can timely determine the time when the interface mode needs to be modified and process it in a timely manner.

作为一种可选的实施例,在处理完成后,还可以接收依据目标对象的命令语句得到的目标控制指令,进而响应于目标控制指令,测试音箱设备对关联设备的控制状况,在控制状况出现控制异常的情况下,确定异常与产生异常的原因,其中,异常可能为多种,例如,关联设备不响应,关联设备响应不正确。产生异常的原因有很多,可能是音箱设备的问题,也可能是关联设备的问题,还有可能是网络的问题。因此,及时确定出异常与产生异常的原因,从而依据原因,对音箱设备和/或关联设备针对异常进行处理。保障目标对象通过音箱设备对关联设备的正常控制。As an optional embodiment, after the processing is completed, a target control instruction obtained according to the command statement of the target object can also be received, and then the control status of the speaker device to the associated device can be tested in response to the target control instruction. When a control abnormality occurs in the control status, the abnormality and the cause of the abnormality are determined, where the abnormality may be of various types, for example, the associated device does not respond, and the associated device responds incorrectly. There are many reasons for the abnormality, which may be a problem with the speaker device, a problem with the associated device, or a problem with the network. Therefore, the abnormality and the cause of the abnormality are determined in a timely manner, so that the speaker device and/or the associated device are processed according to the cause. Ensure the normal control of the target object over the associated device through the speaker device.

由上述内容可知,上述可选的实施例中提供接口调用方法,其能够解决音箱设备单独维护的复杂度和更新的难度,通过将音箱设备包括的服务下的提供关联设备列表的服务、提供自然语言解析功能的服务,即nlp服务、向关联设备提供执行功能的服务等的接口方式改为dubbo远程调用接口的方式,再将dubbo远程调用接口方式的提供者改为预定服务的相应服务接口。这样在服务更新时,第三方服务调用会随着音箱设备和/或关联设备的更新而更新,也不用担心维护的问题。将调用方式修改后,可以在预定时间段切换新版本服务,例如在凌晨切换新版本服务,测试所有第三方设备控制是否正常,排查有问题的请求并处理。处理设备控制的异常请求后,修复问题,并上线。It can be seen from the above content that the above optional embodiment provides an interface calling method, which can solve the complexity of maintaining the speaker device separately and the difficulty of updating, by changing the interface mode of the service that provides a list of associated devices, the service that provides natural language parsing function, i.e., nlp service, and the service that provides execution function to associated devices under the services included in the speaker device to the dubbo remote calling interface mode, and then changing the provider of the dubbo remote calling interface mode to the corresponding service interface of the scheduled service. In this way, when the service is updated, the third-party service call will be updated with the update of the speaker device and/or associated devices, and there is no need to worry about maintenance issues. After modifying the calling method, you can switch to the new version of the service in a predetermined time period, such as switching to the new version of the service in the early morning, test whether all third-party device controls are normal, and check and process problematic requests. After processing abnormal requests for device control, fix the problem and go online.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

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

实施例2Example 2

根据本发明实施例,还提供了一种用于实施上述接口处理方法的装置,图2是根据本发明实施例的接口处理装置的结构框图,如图2所示,该装置包括:确定模块202,修改模块204和设置模块206,下面对该装置进行详细说明。According to an embodiment of the present invention, a device for implementing the above-mentioned interface processing method is also provided. Figure 2 is a structural block diagram of the interface processing device according to an embodiment of the present invention. As shown in Figure 2, the device includes: a determination module 202, a modification module 204 and a setting module 206. The device is described in detail below.

确定模块202,用于确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式,其中,第一服务为提供关联设备列表的服务,第二服务为提供自然语言解析功能的服务,第三服务为向关联设备提供执行功能的服务,关联设备为音箱设备控制的设备;修改模块204,用于将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置模块206,用于设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,通过音箱设备对关联设备进行控制。A determination module 202 is used to determine a first interface mode for a speaker device to provide a first service, a second interface mode for a speaker device to provide a second service, and a third interface mode for a speaker device to provide a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, the third service is a service that provides an execution function to associated devices, and the associated devices are devices controlled by the speaker device; a modification module 204 is used to modify the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to a fourth interface mode corresponding to the distributed service framework dubbo; a setting module 206 is used to set the first interface in the fourth interface mode corresponding to dubbo to a service interface corresponding to a predetermined service, so as to control the associated devices through the speaker device when the speaker device and/or the associated devices are updated.

此处需要说明的是,上述确定模块202,修改模块204和设置模块206对应于实施接口处理方法中的步骤S102至步骤S106,多个模块与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例1所公开的内容。It should be noted here that the above-mentioned determination module 202, modification module 204 and setting module 206 correspond to steps S102 to S106 in implementing the interface processing method, and the instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

实施例3Example 3

本发明实施例可以提供一种电子设备,该电子设备可以是一种终端,也可以是一种服务器。在本实施例中,该电子设备作为一种终端可以是计算机终端群中的任意一个计算机终端设备。可选地,在本实施例中,上述终端也可以为移动终端等终端设备。An embodiment of the present invention may provide an electronic device, which may be a terminal or a server. In this embodiment, the electronic device as a terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the terminal may also be a terminal device such as a mobile terminal.

可选地,在本实施例中,上述终端可以位于计算机网络的多个网络设备中的至少一个网络设备。Optionally, in this embodiment, the terminal may be located in at least one network device among a plurality of network devices of the computer network.

可选地,图3是根据一示例性实施例示出的一种终端的结构框图。如图3所示,该终端可以包括:一个或多个(图中仅示出一个)处理器31、用于存储处理器可执行指令的存储器32;其中,处理器被配置为执行指令,以实现上述任一项的接口处理方法。Optionally, Figure 3 is a structural block diagram of a terminal according to an exemplary embodiment. As shown in Figure 3, the terminal may include: one or more (only one is shown in the figure) processors 31, and a memory 32 for storing processor executable instructions; wherein the processor is configured to execute instructions to implement any of the above interface processing methods.

其中,存储器可用于存储软件程序以及模块,如本发明实施例中的接口处理方法和装置对应的程序指令/模块,处理器通过运行存储在存储器内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的接口处理方法。存储器可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器可进一步包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。Among them, the memory can be used to store software programs and modules, such as the program instructions/modules corresponding to the interface processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned interface processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

处理器可以通过传输装置调用存储器存储的信息及应用程序,以执行下述步骤:确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式,其中,第一服务为提供关联设备列表的服务,第二服务为提供自然语言解析功能的服务,第三服务为向关联设备提供执行功能的服务,关联设备为音箱设备控制的设备;将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,通过音箱设备对关联设备进行控制。The processor can call the information and application stored in the memory through the transmission device to perform the following steps: determine the first interface mode for the speaker device to provide a first service, the second interface mode for the speaker device to provide a second service, and the third interface mode for the speaker device to provide a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, and the third service is a service that provides an execution function to associated devices, and the associated devices are devices controlled by the speaker device; modify the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to the fourth interface mode corresponding to the distributed service framework dubbo; set the first interface in the fourth interface mode corresponding to dubbo to the service interface corresponding to the predetermined service, which is used to control the associated devices through the speaker device when the speaker device and/or the associated devices are updated.

可选的,上述处理器还可以执行如下步骤的程序代码:设置dubbo对应的第四接口方式中第一接口为预定服务对应的服务接口之后,还包括:向注册中心zookeeper提供第一接口对应的第一接口地址,以使注册中心提供第一接口地址至关联设备,关联设备依据第一接口地址调用预定服务。Optionally, the processor may also execute the program code of the following steps: after setting the first interface in the fourth interface mode corresponding to dubbo as the service interface corresponding to the scheduled service, it also includes: providing the first interface address corresponding to the first interface to the registration center zookeeper, so that the registration center provides the first interface address to the associated device, and the associated device calls the scheduled service based on the first interface address.

可选的,上述处理器还可以执行如下步骤的程序代码:向注册中心zookeeper提供第一接口对应的第一接口地址,包括:在第一接口对应的第一接口地址变更的情况下,第一接口向注册中心提供第二接口地址,以使注册中心提供第二接口地址至关联设备,关联设备依据第二接口地址调用预定服务,其中,第二接口地址为第一接口地址变更后的地址。Optionally, the processor may also execute the program code of the following steps: providing the first interface address corresponding to the first interface to the registration center zookeeper, including: when the first interface address corresponding to the first interface changes, the first interface provides the second interface address to the registration center, so that the registration center provides the second interface address to the associated device, and the associated device calls the predetermined service based on the second interface address, wherein the second interface address is the address after the first interface address is changed.

可选的,上述处理器还可以执行如下步骤的程序代码:确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式之前,还包括:检测音箱设备和/或关联设备的更新状态;在音箱设备和/或关联设备的更新状态为存在更新的情况下,确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式。Optionally, the processor may also execute the program code of the following steps: before determining the first interface mode for the speaker device to provide the first service, the second interface mode for the speaker device to provide the second service, and the third interface mode for the speaker device to provide the third service, it also includes: detecting the update status of the speaker device and/or associated devices; when the update status of the speaker device and/or associated devices indicates that there is an update, determining the first interface mode for the speaker device to provide the first service, the second interface mode for the speaker device to provide the second service, and the third interface mode for the speaker device to provide the third service.

可选的,上述处理器还可以执行如下步骤的程序代码:该方法还包括:接收目标控制指令,其中,目标控制指令依据目标对象的命令语句得到;响应于目标控制指令,测试音箱设备对关联设备的控制状况;在控制状况出现控制异常的情况下,确定异常与产生异常的原因。Optionally, the processor may also execute program code of the following steps: the method also includes: receiving a target control instruction, wherein the target control instruction is obtained based on a command statement of the target object; in response to the target control instruction, testing the control status of the speaker device on the associated device; in the event of a control abnormality in the control status, determining the abnormality and the cause of the abnormality.

可选的,上述处理器还可以执行如下步骤的程序代码:异常包括以下至少之一:关联设备不响应,关联设备响应不正确。Optionally, the processor may also execute program code of the following steps: the exception includes at least one of the following: the associated device does not respond, the associated device responds incorrectly.

本领域普通技术人员可以理解,图3所示的结构仅为示意,计算机终端也可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌声电脑以及移动互联网设备(MobileInternet Devices,MID)、PAD等终端设备。图3其并不对上述电子装置的结构造成限定。例如,计算机终端3还可包括比图3中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图3所示不同的配置。Those skilled in the art will appreciate that the structure shown in FIG. 3 is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. FIG. 3 does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 3 may also include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG. 3, or have a configuration different from that shown in FIG. 3.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(RandomAccess Memory,RAM)、磁盘或光盘等。A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

实施例4Example 4

本发明的实施例还提供了一种计算机可读存储介质。可选地,在本实施例中,上述计算机可读存储介质可以用于保存上述实施例一所提供的接口处理方法所执行的程序代码。The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the interface processing method provided in the first embodiment.

可选地,在本实施例中,上述计算机可读存储介质可以位于计算机网络中计算机终端群中的任意一个计算机终端中,或者位于移动终端群中的任意一个移动终端中。Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式,其中,第一服务为提供关联设备列表的服务,第二服务为提供自然语言解析功能的服务,第三服务为向关联设备提供执行功能的服务,关联设备为音箱设备控制的设备;将音箱设备对应的第一接口方式,第二接口方式,以及第三接口方式修改为分布式服务框架dubbo对应的第四接口方式;设置dubbo对应的第四接口方式中的第一接口为预定服务对应的服务接口,用于在音箱设备和/或关联设备更新的情况下,通过音箱设备对关联设备进行控制。Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: determining a first interface mode for a speaker device to provide a first service, a second interface mode for a speaker device to provide a second service, and a third interface mode for a speaker device to provide a third service, wherein the first service is a service that provides a list of associated devices, the second service is a service that provides a natural language parsing function, the third service is a service that provides an execution function to associated devices, and the associated devices are devices controlled by the speaker device; modifying the first interface mode, the second interface mode, and the third interface mode corresponding to the speaker device to a fourth interface mode corresponding to the distributed service framework dubbo; setting the first interface in the fourth interface mode corresponding to dubbo to a service interface corresponding to a predetermined service, for controlling the associated devices through the speaker device when the speaker device and/or the associated devices are updated.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:上述处理器还可以执行如下步骤的程序代码:设置dubbo对应的第四接口方式中第一接口为预定服务对应的服务接口之后,还包括:向注册中心zookeeper提供第一接口对应的第一接口地址,以使注册中心提供第一接口地址至关联设备,关联设备依据第一接口地址调用预定服务。Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: The above-mentioned processor can also execute program code for the following steps: After setting the first interface in the fourth interface mode corresponding to dubbo as the service interface corresponding to the predetermined service, it also includes: providing the first interface address corresponding to the first interface to the registration center zookeeper, so that the registration center provides the first interface address to the associated device, and the associated device calls the predetermined service based on the first interface address.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:上述处理器还可以执行如下步骤的程序代码:向注册中心zookeeper提供第一接口对应的第一接口地址,包括:在第一接口对应的第一接口地址变更的情况下,第一接口向注册中心提供第二接口地址,以使注册中心提供第二接口地址至关联设备,关联设备依据第二接口地址调用预定服务,其中,第二接口地址为第一接口地址变更后的地址。Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: the above-mentioned processor can also execute program code for the following steps: providing the first interface address corresponding to the first interface to the registration center zookeeper, including: when the first interface address corresponding to the first interface changes, the first interface provides the second interface address to the registration center, so that the registration center provides the second interface address to the associated device, and the associated device calls the predetermined service based on the second interface address, wherein the second interface address is the address after the first interface address is changed.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:上述处理器还可以执行如下步骤的程序代码:确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式之前,还包括:检测音箱设备和/或关联设备的更新状态;在音箱设备和/或关联设备的更新状态为存在更新的情况下,确定音箱设备提供第一服务的第一接口方式,音箱设备提供第二服务的第二接口方式,音箱设备提供第三服务的第三接口方式。Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: the above-mentioned processor can also execute the program codes of the following steps: before determining the first interface mode for the speaker device to provide a first service, the second interface mode for the speaker device to provide a second service, and the third interface mode for the speaker device to provide a third service, it also includes: detecting the update status of the speaker device and/or associated devices; when the update status of the speaker device and/or the associated devices indicates that there is an update, determining the first interface mode for the speaker device to provide the first service, the second interface mode for the speaker device to provide the second service, and the third interface mode for the speaker device to provide the third service.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:上述处理器还可以执行如下步骤的程序代码:该方法还包括:接收目标控制指令,其中,目标控制指令依据目标对象的命令语句得到;响应于目标控制指令,测试音箱设备对关联设备的控制状况;在控制状况出现控制异常的情况下,确定异常与产生异常的原因。Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: The above-mentioned processor can also execute program code for the following steps: The method also includes: receiving a target control instruction, wherein the target control instruction is obtained based on a command statement of the target object; in response to the target control instruction, testing the control status of the speaker device on the associated device; in the event of a control abnormality in the control status, determining the abnormality and the cause of the abnormality.

可选地,在本实施例中,计算机可读存储介质被设置为存储用于执行以下步骤的程序代码:上述处理器还可以执行如下步骤的程序代码:异常包括以下至少之一:关联设备不响应,关联设备响应不正确。Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: The above processor may also execute program code for the following steps: The exception includes at least one of the following: the associated device does not respond, the associated device responds incorrectly.

实施例5Example 5

根据本发明实施例的另外一个方面,还提供了一种计算机程序产品,包括计算机程序,其特征在于,计算机程序被处理器执行时实现上述任一项的接口处理方法。According to another aspect of an embodiment of the present invention, there is further provided a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, any of the above-mentioned interface processing methods is implemented.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

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

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional 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 invention, in essence, or the part that contributes 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 a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

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

Claims (8)

1. An interface processing method, comprising:
Determining a first interface mode of providing a first service by sound box equipment, wherein the sound box equipment provides a second interface mode of providing a second service, and the sound box equipment provides a third interface mode of providing a third service, the first service is a service for providing a list of associated equipment, the second service is a service for providing a natural language analysis function, the third service is a service for providing an execution function for the associated equipment, and the associated equipment is equipment controlled by the sound box equipment;
Modifying the first interface mode, the second interface mode and the third interface mode corresponding to the sound box equipment into a fourth interface mode corresponding to a distributed service framework dubbo;
setting a first interface in a fourth interface mode corresponding to the dubbo as a service interface corresponding to a preset service, wherein the service interface is used for controlling the associated equipment through the sound box equipment under the condition that the sound box equipment and/or the associated equipment are updated;
after the setting of the first interface in the fourth interface mode corresponding to the dubbo as the service interface corresponding to the predetermined service, the method further includes:
Providing a first interface address corresponding to the first interface for a registry, so that the registry provides the first interface address to the associated equipment, and the associated equipment calls the preset service according to the first interface address;
The providing, to the registry zookeeper, a first interface address corresponding to the first interface includes:
Under the condition that a first interface address corresponding to the first interface is changed, the first interface provides a second interface address for the registry so that the registry provides the second interface address to the associated equipment, and the associated equipment calls the preset service according to the second interface address, wherein the second interface address is the address after the first interface address is changed.
2. The method of claim 1, wherein determining a first interface mode in which the speaker device provides a first service, a second interface mode in which the speaker device provides a second service, and before providing a third interface mode in which the speaker device provides a third service, further comprises:
detecting the update state of the sound box equipment and/or the associated equipment;
And under the condition that the updating state of the sound box equipment and/or the associated equipment is updated, determining a first interface mode of the sound box equipment for providing the first service, a second interface mode of the sound box equipment for providing the second service and a third interface mode of the sound box equipment for providing the third service.
3. The method as recited in claim 1, further comprising:
receiving a target control instruction, wherein the target control instruction is obtained according to a command statement of a target object;
responding to the target control instruction, and testing the control condition of the sound box equipment on the associated equipment;
in the case where a control abnormality occurs in the control condition, an abnormality and a cause of the abnormality are determined.
4. A method according to claim 3, wherein the anomaly comprises at least one of: the associated device does not respond and the associated device responds incorrectly.
5. An interface processing apparatus, comprising:
The sound box equipment is used for providing a first interface mode of a first service, a second interface mode of a second service and a third interface mode of a third service, wherein the first service is a service for providing a list of associated equipment, the second service is a service for providing a natural language analysis function, the third service is a service for providing an execution function for the associated equipment, and the associated equipment is equipment controlled by the sound box equipment;
the modification module is used for modifying the first interface mode, the second interface mode and the third interface mode corresponding to the sound box equipment into a fourth interface mode corresponding to the distributed service framework dubbo;
The setting module is used for setting a first interface in a fourth interface mode corresponding to the dubbo as a service interface corresponding to a preset service, and controlling the associated equipment through the sound box equipment under the condition that the sound box equipment and/or the associated equipment are updated;
The setting module is further configured to provide a first interface address corresponding to the first interface to a registry, so that the registry provides the first interface address to the associated device, and the associated device invokes the predetermined service according to the first interface address;
The setting module is further configured to, when a first interface address corresponding to the first interface is changed, provide a second interface address for the registry by the first interface, so that the registry provides the second interface address to the associated device, and the associated device invokes the predetermined service according to the second interface address, where the second interface address is an address after the first interface address is changed.
6. An electronic device, comprising:
A processor;
A memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the interface processing method of any one of claims 1 to 4.
7. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the interface processing method of any one of claims 1 to 4.
8. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the interface processing method of any of claims 1 to 4.
CN202210313530.6A 2022-03-28 2022-03-28 Interface processing method, device, electronic device and computer readable storage medium Active CN114900383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210313530.6A CN114900383B (en) 2022-03-28 2022-03-28 Interface processing method, device, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210313530.6A CN114900383B (en) 2022-03-28 2022-03-28 Interface processing method, device, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114900383A CN114900383A (en) 2022-08-12
CN114900383B true CN114900383B (en) 2024-04-19

Family

ID=82716045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210313530.6A Active CN114900383B (en) 2022-03-28 2022-03-28 Interface processing method, device, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114900383B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529500B1 (en) * 1999-08-26 2003-03-04 Verizon Laboratories Inc. Unified messaging notification
KR20050034323A (en) * 2003-10-09 2005-04-14 이노에이스(주) Multimedia announcement service apparatus and the method thereof in a information provider
CN108055248A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Remote invocation method, server and storage medium based on dubbo frames
CN108255615A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Across language call method, server and storage medium
CN110018962A (en) * 2019-04-11 2019-07-16 重庆猪八戒知识产权服务有限公司 Service adjustment method and system based on distributed service framework and registration center
CN110570859A (en) * 2019-09-20 2019-12-13 Oppo广东移动通信有限公司 intelligent sound box control method, device and system and storage medium
CN110768878A (en) * 2019-10-31 2020-02-07 广州华凌制冷设备有限公司 Voice function configuration method, configuration device and readable storage medium
CN110933188A (en) * 2019-12-31 2020-03-27 深圳市优必选科技股份有限公司 Remote service calling method, system, server and storage medium
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device
CN111722883A (en) * 2020-06-12 2020-09-29 浪潮电子信息产业股份有限公司 A method, device and computer-readable storage medium for updating interface address
CN112953982A (en) * 2019-11-26 2021-06-11 腾讯科技(深圳)有限公司 Service processing method, service configuration method and related device
WO2021137753A1 (en) * 2019-12-31 2021-07-08 Amc Future Technology Pte. Ltd. Electronic authentication system and process using the same
CN113296968A (en) * 2020-02-21 2021-08-24 腾讯科技(深圳)有限公司 Address list updating method, device, medium and electronic equipment
CN113407643A (en) * 2020-11-26 2021-09-17 腾讯科技(深圳)有限公司 Data routing method, device, equipment and computer readable storage medium
CN113742105A (en) * 2021-09-01 2021-12-03 欧电云信息科技(江苏)有限公司 Adaptation method, apparatus and medium for microservice framework
CN113810253A (en) * 2020-06-17 2021-12-17 阿里巴巴集团控股有限公司 Service providing method, system, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073771A1 (en) * 2005-09-28 2007-03-29 Baikov Chavdar S Method and system for directly mapping web services interfaces and java interfaces
US8106761B2 (en) * 2007-07-24 2012-01-31 Nokia Corporation Apparatus, method and computer program product for providing a perceivable physical indication of service availability
US20170149864A1 (en) * 2015-11-24 2017-05-25 International Business Machines Corporation Distributed applications management with dependent resilient distributed services

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6529500B1 (en) * 1999-08-26 2003-03-04 Verizon Laboratories Inc. Unified messaging notification
KR20050034323A (en) * 2003-10-09 2005-04-14 이노에이스(주) Multimedia announcement service apparatus and the method thereof in a information provider
CN108055248A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Remote invocation method, server and storage medium based on dubbo frames
CN108255615A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Across language call method, server and storage medium
WO2019104973A1 (en) * 2017-11-30 2019-06-06 平安科技(深圳)有限公司 Cross-language invoking method, server, and storage medium
CN110018962A (en) * 2019-04-11 2019-07-16 重庆猪八戒知识产权服务有限公司 Service adjustment method and system based on distributed service framework and registration center
CN110570859A (en) * 2019-09-20 2019-12-13 Oppo广东移动通信有限公司 intelligent sound box control method, device and system and storage medium
CN110768878A (en) * 2019-10-31 2020-02-07 广州华凌制冷设备有限公司 Voice function configuration method, configuration device and readable storage medium
CN112953982A (en) * 2019-11-26 2021-06-11 腾讯科技(深圳)有限公司 Service processing method, service configuration method and related device
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device
CN110933188A (en) * 2019-12-31 2020-03-27 深圳市优必选科技股份有限公司 Remote service calling method, system, server and storage medium
WO2021137753A1 (en) * 2019-12-31 2021-07-08 Amc Future Technology Pte. Ltd. Electronic authentication system and process using the same
CN113296968A (en) * 2020-02-21 2021-08-24 腾讯科技(深圳)有限公司 Address list updating method, device, medium and electronic equipment
CN111722883A (en) * 2020-06-12 2020-09-29 浪潮电子信息产业股份有限公司 A method, device and computer-readable storage medium for updating interface address
CN113810253A (en) * 2020-06-17 2021-12-17 阿里巴巴集团控股有限公司 Service providing method, system, device, equipment and storage medium
CN113407643A (en) * 2020-11-26 2021-09-17 腾讯科技(深圳)有限公司 Data routing method, device, equipment and computer readable storage medium
CN113742105A (en) * 2021-09-01 2021-12-03 欧电云信息科技(江苏)有限公司 Adaptation method, apparatus and medium for microservice framework

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘军 ; 杨俊杰 ; .ROS在智能家居控制系统中的应用.电子制作.2020,(第Z1期),参见全文. *
宋万洋 ; .基于Dubbo框架的分布式视频网站架构设计.软件导刊.2018,(第08期),参见全文. *
牛嵩峰 ; 王承永 ; 谢少华 ; 唐炜 ; 何良璋 ; 曾红斌 ; .新型5G智慧广播技术体系设计与应用.广播与电视技术.2020,(第07期),参见全文. *

Also Published As

Publication number Publication date
CN114900383A (en) 2022-08-12

Similar Documents

Publication Publication Date Title
CN109284217A (en) Application exception processing method, device, electronic equipment and storage medium
US9760591B2 (en) Dynamic code loading
US9904585B1 (en) Error handling in executing workflow state machines
CN108563579B (en) White box testing method, device and system and storage medium
US8438418B2 (en) Simplifying automated software maintenance of data centers
US11894983B2 (en) Simulation and testing of infrastructure as a service scale using a container orchestration engine
JP7453426B2 (en) Network management systems, methods, devices and electronic equipment
US10866884B2 (en) Stateless injected script debugging
CN109639818B (en) Service discovery method and device under cloud environment, server and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111324378B (en) Configuration method, device and equipment for video monitoring application software
CN111314212B (en) API gateway based on Netty and plug-in mechanism and control method
CN114443294A (en) Big data service component deployment method, system, terminal and storage medium
US11425203B2 (en) Commissioning a virtualized network function
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN108710534A (en) The tune of multi-process plays method, apparatus, terminal device and computer storage media
CN109857963A (en) Local resource access method, device and electronic equipment
CN114900383B (en) Interface processing method, device, electronic device and computer readable storage medium
CN107734050A (en) A kind of load machine distribution method, computing device and load machine distribution system
CN110851166A (en) User-unaware application program updating method and device and computer equipment
CN117931664A (en) Mock processing method and device, storage medium and computer equipment
CN111045616A (en) Time-consuming printing method, device, device and storage medium
CN117539564A (en) Page hot updating method and device, electronic equipment and readable storage medium
CN117056198A (en) Mock test method, mock test device, medium and computer equipment
CN110599112A (en) Method and device for developing and maintaining network page

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