WO2024078215A1 - Device control method and apparatus, and electronic device, computer-readable medium and product - Google Patents

Device control method and apparatus, and electronic device, computer-readable medium and product Download PDF

Info

Publication number
WO2024078215A1
WO2024078215A1 PCT/CN2023/117520 CN2023117520W WO2024078215A1 WO 2024078215 A1 WO2024078215 A1 WO 2024078215A1 CN 2023117520 W CN2023117520 W CN 2023117520W WO 2024078215 A1 WO2024078215 A1 WO 2024078215A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
mode
user
multimedia file
playing
Prior art date
Application number
PCT/CN2023/117520
Other languages
French (fr)
Chinese (zh)
Inventor
王巍
高欣怡
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2024078215A1 publication Critical patent/WO2024078215A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files

Abstract

A device control method and apparatus (1500), and an electronic device (1600), a computer-readable medium (1700) and a computer program product (1800). When a multimedia file is played, different working states can be determined, and on the basis of different conditions, a volume value for playing the multimedia file can be adjusted or the multimedia file can be controlled to play or pause, without requiring intervention from a user, such that the operation burden for the user is reduced, and the usage convenience is improved.

Description

设备控制方法、装置、电子设备及计算机可读介质及产品Device control method, device, electronic device, computer readable medium and product
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年10月10日提交的申请号为202211236268.6的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims priority to Chinese application No. 202211236268.6, filed on October 10, 2022, the entire contents of which are hereby incorporated by reference for all purposes.
技术领域Technical Field
本申请涉及控制技术领域,更具体地,涉及一种设备控制方法、装置、电子设备及计算机可读介质及产品。The present application relates to the field of control technology, and more specifically, to a device control method, apparatus, electronic device, computer-readable medium and product.
背景技术Background technique
目前,随着电子信息技术的发展,电子设备能够播放音频内容和画面内容等多媒体文件。在电子设备播放多媒体文件内容时,对电子设备进行操作,可以调整播放多媒体文件内容的相关参数。然而,目前调整电子设备播放多媒体文件内容的相关参数的方式便捷性较差。At present, with the development of electronic information technology, electronic devices can play multimedia files such as audio content and picture content. When the electronic device plays the multimedia file content, the electronic device can be operated to adjust the relevant parameters of the multimedia file content. However, the current method of adjusting the relevant parameters of the multimedia file content played by the electronic device is less convenient.
发明内容Summary of the invention
本申请提出了一种设备控制方法、装置、电子设备及计算机可读介质及产品,以提高设备使用时的便捷性。The present application proposes a device control method, apparatus, electronic device, computer-readable medium and product to improve the convenience of device use.
第一方面,本申请实施例提供了一种设备控制方法,应用于电子设备,所述方法包括:播放多媒体文件;若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。In a first aspect, an embodiment of the present application provides a device control method, which is applied to an electronic device, and the method includes: playing a multimedia file; if the working mode of the electronic device is a first mode, adjusting the volume value of the electronic device playing the multimedia file based on a first condition; if the working mode of the electronic device is a second mode, controlling the playback or pause of the multimedia file based on a second condition.
第二方面,本申请实施例还提供了一种设备控制装置,应用于电子设备,所述装置包括:播放单元、第一控制单元以及第二控制单元。其中,播放单元,用于播放多媒体文件;第一控制单元,用于若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;第二控制单元,用于若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。In a second aspect, the embodiment of the present application further provides a device control apparatus, which is applied to an electronic device, and the apparatus comprises: a playback unit, a first control unit, and a second control unit. The playback unit is used to play a multimedia file; the first control unit is used to adjust the volume value of the multimedia file played by the electronic device based on a first condition if the working mode of the electronic device is the first mode; the second control unit is used to control the playback or pause of the multimedia file based on a second condition if the working mode of the electronic device is the second mode.
第三方面,本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行以使得所述电子设备执行上述第一方面所述的方法。In a third aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors so that the electronic device executes the method described in the first aspect above.
第四方面,本申请实施例还提供了一种计算机可读介质,所述可读存储介质存储有处理器可执行的程序代码,所述程序代码被所述处理器执行时使所述处理器执行第一方面所述的方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable medium, wherein the readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the method described in the first aspect.
第五方面,本申请实施例还提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现第一方面所述的方法。In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program/instruction, which implements the method described in the first aspect when executed by a processor.
本申请实施例的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请实施例而了解。本申请实施例的目的和其他优点可通过在所写的说明书、 权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the embodiments of the present application will be described in the following description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The invention can be realized and obtained by the structures particularly pointed out in the claims and the drawings.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请实施例提供的设备控制方法的应用场景图;FIG1 shows an application scenario diagram of a device control method provided in an embodiment of the present application;
图2示出了本申请实施例提供的电子设备的结构示意图;FIG2 is a schematic diagram showing the structure of an electronic device provided in an embodiment of the present application;
图3示出了本申请实施例提供的设备控制方法的方法流程图;FIG3 shows a method flow chart of a device control method provided by an embodiment of the present application;
图4示出了本申请实施例提供的选择控件的示意图;FIG4 shows a schematic diagram of a selection control provided in an embodiment of the present application;
图5示出了本申请又一实施例提供的设备控制方法的方法流程图;FIG5 shows a method flow chart of a device control method provided by another embodiment of the present application;
图6示出了步骤S220的一种实施方式图;FIG6 shows an implementation diagram of step S220;
图7示出了本申请再一实施例提供的设备控制方法的方法流程图;FIG7 shows a method flow chart of a device control method provided by yet another embodiment of the present application;
图8示出了本申请还一实施例提供的设备控制方法的方法流程图;FIG8 shows a method flow chart of a device control method provided by another embodiment of the present application;
图9示出了本申请实施例提供的指定界面的示意图;FIG9 is a schematic diagram showing a designated interface provided by an embodiment of the present application;
图10示出了本申请另一实施例提供的设备控制方法的方法流程图;FIG10 shows a method flow chart of a device control method provided by another embodiment of the present application;
图11示出了本申请又一实施例提供的指定界面的示意图;FIG11 is a schematic diagram showing a designated interface provided by another embodiment of the present application;
图12示出了本申请另一实施例提供的设备控制方法的方法流程图;FIG12 is a flowchart of a device control method provided by another embodiment of the present application;
图13示出的步骤S620的一种实施方式图;FIG13 shows an implementation diagram of step S620;
图14示出了本申请实施例提供的一种图形的示意图;FIG14 is a schematic diagram showing a graph provided in an embodiment of the present application;
图15示出了本申请实施例提供的设备控制装置的结构框图;FIG15 shows a structural block diagram of a device control device provided in an embodiment of the present application;
图16示出了本申请实施例提供的电子设备的结构框图;FIG16 shows a structural block diagram of an electronic device provided in an embodiment of the present application;
图17示出了本申请实施例提供的计算机可读存储介质的结构框图;FIG17 shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application;
图18示出了本申请实施例提供的计算机程序产品的结构框图。FIG18 shows a structural block diagram of a computer program product provided in an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
目前,随着电子信息技术的发展,电子设备能够播放音频内容和画面内容。在电子设备播放多媒体文件内容时,对电子设备进行操作,可以调整播放多媒体文件内容的相关参数。然而,目前调整电子设备播放多媒体文件内容的相关参数的方式便捷性较差。如何合理调整电子设备播放音频内容和画面内容的相关参数,并提高便捷性,是一个亟待解决的问题。At present, with the development of electronic information technology, electronic devices can play audio content and picture content. When an electronic device plays multimedia file content, the electronic device can be operated to adjust the relevant parameters of playing the multimedia file content. However, the current method of adjusting the relevant parameters of the electronic device playing the multimedia file content is less convenient. How to reasonably adjust the relevant parameters of the electronic device playing the audio content and the picture content and improve the convenience is a problem to be solved urgently.
目前,当用户在使用电子设备时,例如在使用电子设备播放视频,则电子设备的屏幕可以播放画面内容,若此时用户需要完成其他事情,可以手动控制电子设备暂停播放画面。又例如,用户在使用电子设备播放音频内容,希望调整电子设备播放音频内容的音量值,可以手动控制电子设备从而调整播放音频内容的音量值。Currently, when a user is using an electronic device, for example, playing a video on the electronic device, the screen of the electronic device can play the picture content. If the user needs to complete other things at this time, the electronic device can be manually controlled to pause the picture. For another example, when a user is using an electronic device to play audio content and wants to adjust the volume of the audio content played by the electronic device, the electronic device can be manually controlled to adjust the volume of the audio content.
然而,发明人在研究中发现,上述对电子设备控制的方法,需要用户介入,用户需要进行繁琐的操作,便捷性较差。因此,为了克服上述缺陷,本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品。However, the inventors found in their research that the above method of controlling electronic devices requires user intervention, and the user needs to perform cumbersome operations, which is less convenient. Therefore, in order to overcome the above defects, the present application provides a device control method, apparatus, electronic device, computer-readable medium and product.
本申请的实施方式提供了一种设备控制方法,应用于电子设备,所述方法包括: An embodiment of the present application provides a device control method, which is applied to an electronic device, and the method includes:
播放多媒体文件;若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。Play a multimedia file; if the working mode of the electronic device is the first mode, then based on the first condition, adjust the volume value of the electronic device playing the multimedia file; if the working mode of the electronic device is the second mode, then based on the second condition, control the playing or pausing of the multimedia file.
根据本申请的实施方式,所述若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值,包括:若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值。According to an implementation of the present application, if the working mode of the electronic device is the first mode, then based on the first condition, adjusting the volume value of the electronic device playing the multimedia file includes: if the working mode of the electronic device is the first mode, adjusting the volume value according to the distance between the electronic device and the user.
根据本申请的实施方式,所述若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值,包括:若所述电子设备的工作模式为第一模式,且所述距离小于距离阈值,则根据所述距离调整所述音量值,所述距离与所述音量值正相关;若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件。According to an implementation manner of the present application, if the working mode of the electronic device is the first mode, the volume value is adjusted according to the distance between the electronic device and the user, including: if the working mode of the electronic device is the first mode and the distance is less than a distance threshold, the volume value is adjusted according to the distance, and the distance is positively correlated with the volume value; if the distance is greater than or equal to the distance threshold, the playback of the multimedia file is paused.
根据本申请的实施方式,所述若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件,包括:若所述距离大于或等于所述距离阈值,输出第一语音提示信息,并暂停播放所。According to an implementation manner of the present application, if the distance is greater than or equal to the distance threshold, pausing the playing of the multimedia file includes: if the distance is greater than or equal to the distance threshold, outputting a first voice prompt message and pausing the playing of the multimedia file.
根据本申请的实施方式,若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值:若所述工作模式为第一模式且所述电子设备与用户之间的距离发生变化,则调整所述音量值,其中,所述电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关。According to an implementation of the present application, if the working mode of the electronic device is the first mode, the volume value of the electronic device playing the multimedia file is adjusted based on the first condition: if the working mode is the first mode and the distance between the electronic device and the user changes, the volume value is adjusted, wherein the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value.
根据本申请的实施方式,所述方法还包括:若获取到用户的指定操作,则撤销对所述音量值的调整。According to an implementation of the present application, the method further includes: if a specified operation of the user is obtained, canceling the adjustment of the volume value.
根据本申请的实施方式,所述若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值,包括:若所述工作模式为第一模式,则根据所述电子设备周围环境音的音量调整所述音量值。According to an implementation of the present application, if the working mode of the electronic device is the first mode, the volume value of the electronic device playing the multimedia file is adjusted based on a first condition, including: if the working mode is the first mode, the volume value is adjusted according to the volume of the ambient sound around the electronic device.
根据本申请的实施方式,周围环境音的音量变化幅度与所述电子设备播放多媒体文件的音量值的变化幅度正相关。According to an implementation manner of the present application, the amplitude of the volume change of the ambient sound is positively correlated with the amplitude of the volume value of the multimedia file played by the electronic device.
根据本申请的实施方式,所述若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停,包括:若所述工作模式为第二模式且检测到用户的人像,则保持所述多媒体文件处于播放状态;若所述工作模式为第二模式且未检测到用户的人像,则暂停所述多媒体文件的播放。According to an implementation manner of the present application, if the working mode of the electronic device is the second mode, the playback or pause of the multimedia file is controlled based on the second condition, including: if the working mode is the second mode and a user's portrait is detected, keeping the multimedia file in a playback state; if the working mode is the second mode and no user's portrait is detected, pausing the playback of the multimedia file.
根据本申请的实施方式,还包括:若所述工作模式为第二模式且检测到用户的人像,则基于对所述电子设备在所述多媒体文件处于播放状态下的控制操作,生成对应的第一文本信息,并显示所述第一文本信息。According to an implementation manner of the present application, it also includes: if the working mode is the second mode and a user's portrait is detected, based on a control operation of the electronic device when the multimedia file is in a playing state, generating corresponding first text information and displaying the first text information.
根据本申请的实施方式,若所述工作模式为第二模式且未检测到用户的人像,暂停所述多媒体文件的播放,包括:若所述工作模式为第二模式且未检测到用户的人像,则输出第二语音提示信息,其中,所述第二语音提示信息用于提示所述多媒体文件将被暂停播放;若未检测到指定语音信息,则暂停所述多媒体文件的播放,其中,所述指定语音信息用于指示取消暂停所述多媒体文件的播放。According to an implementation manner of the present application, if the working mode is the second mode and no user portrait is detected, pausing the playback of the multimedia file, including: if the working mode is the second mode and no user portrait is detected, outputting a second voice prompt message, wherein the second voice prompt message is used to prompt that the multimedia file will be paused; if no specified voice information is detected, pausing the playback of the multimedia file, wherein the specified voice information is used to indicate to cancel the pause of the playback of the multimedia file.
根据本申请的实施方式,所述若所述工作模式为第二模式且未检测到用户的人像,暂停所述多媒体文件的播放之后,还包括:获取所述电子设备的屏幕前方区域的待检测图像;若所述待检测图像包括人像,控制所述多媒体文件继续播放。According to an implementation manner of the present application, if the working mode is the second mode and no user's portrait is detected, after pausing the playback of the multimedia file, it also includes: acquiring an image to be detected in the front area of the screen of the electronic device; if the image to be detected includes a portrait, controlling the multimedia file to continue playing.
根据本申请的实施方式,所述电子设备包括屏幕以及摄像头,所述摄像头与屏幕设置于同一侧,所述播放多媒体文件,包括:播放多媒体文件;若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。According to an implementation manner of the present application, the electronic device includes a screen and a camera, and the camera and the screen are arranged on the same side. The playing of multimedia files includes: playing multimedia files; if the angle feature information corresponding to the screen of the electronic device meets the target conditions, waking up the voice assistant and displaying the selection control; obtaining the first mode or the second mode selected by the user based on the selection control as the working mode of the electronic device.
根据本申请的实施方式,所述若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件,包括:若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;显示第二文本信息,并播放第三语音提示信息,其中,所述第二文本信息用于表征所述语音助手被唤醒,所述第三语音提示信息用于提示所述语音助手被唤醒。According to an implementation manner of the present application, if the angle feature information corresponding to the screen of the electronic device meets the target condition, waking up the voice assistant and displaying the selection control includes: if the angle feature information corresponding to the screen of the electronic device meets the target condition, waking up the voice assistant and displaying the selection control; displaying a second text message and playing a third voice prompt message, wherein the second text message is used to indicate that the voice assistant is awakened, and the third voice prompt message is used to prompt that the voice assistant is awakened.
根据本申请的实施方式,所述方法还包括:若所述电子设备的屏幕对应的角度特征信息不再满足目标条件,则关闭语音助手。According to an implementation of the present application, the method further includes: if the angle feature information corresponding to the screen of the electronic device no longer meets the target condition, turning off the voice assistant.
根据本申请的实施方式,所述方法还包括:若所述摄像头被开启,在指定位置以指定方式显示图形,所述指定方式显示的图形用于表征所述摄像头被开启,所述指定位置基于所述摄像头的位置确定。According to an embodiment of the present application, the method further includes: if the camera is turned on, displaying a graphic in a specified manner at a specified position, the graphic displayed in the specified manner is used to represent that the camera is turned on, and the specified position is determined based on the position of the camera.
下面将针对可用于本申请实施例提供的设备控制方法的应用环境进行说明。 The following describes an application environment in which the device control method provided in the embodiments of the present application can be used.
请参阅图1,图1示出了本申请实施例提供的一种设备控制方法的应用场景图,即设备控制场景100。图1中用户101正在通过电子设备102播放多媒体文件,具体的为通过电子设备102上运行的视频播放应用程序观看视频,通过电子设备102的屏幕观看视频对应的画面,以及收听该视频对应的音频内容,此时用户101若需要暂时离开,电子设备102可以控制多媒体文件暂停。可选的,在用户101重新返回电子设备102前准备继续观看画面时,电子设备102还可以重新播放多媒体文件。Please refer to FIG. 1 , which shows an application scenario diagram of a device control method provided by an embodiment of the present application, namely, a device control scenario 100. In FIG. 1 , a user 101 is playing a multimedia file through an electronic device 102, specifically, watching a video through a video playback application running on the electronic device 102, watching the picture corresponding to the video through the screen of the electronic device 102, and listening to the audio content corresponding to the video. At this time, if the user 101 needs to leave temporarily, the electronic device 102 can control the multimedia file to pause. Optionally, when the user 101 returns to the electronic device 102 and prepares to continue watching the picture, the electronic device 102 can also replay the multimedia file.
请参阅图2,图2示出的电子设200备为一种智能手机,该电子设备200可以包括一转动轴线201,以及包括可沿转动轴线201相对折叠或展开的第一部分202和第二部分203。对于一些实施方式,该电子设备200还可以包括有图像采集模块,例如摄像头204,该摄像头204可以设置于第一部分202。其中,第一部分可以包括第一屏幕2021,第二部分可以包括第二屏幕2031,第一屏幕2021以及第二屏幕2031可以用于显示图像以及文本信息等。Please refer to FIG. 2 , the electronic device 200 shown in FIG. 2 is a smart phone, and the electronic device 200 may include a rotation axis 201, and a first part 202 and a second part 203 that can be relatively folded or unfolded along the rotation axis 201. For some embodiments, the electronic device 200 may also include an image acquisition module, such as a camera 204, and the camera 204 may be disposed on the first part 202. The first part may include a first screen 2021, and the second part may include a second screen 2031. The first screen 2021 and the second screen 2031 may be used to display images and text information.
请参阅图3,图3示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S110至步骤S130。Please refer to Figure 3, which shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the above embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S110 to S130.
步骤S110:播放多媒体文件。Step S110: Play the multimedia file.
电子设备可以用于运行不同的应用程序,以实现不同的功能,满足用户不同的需求。在一些实施方式中,电子设备可以播放多媒体文件,例如可以运行一些视频播放相关的应用程序,如电子设备通过视频播放应用程序播放视频。又由于播放视频一般会同时在屏幕显示画面内容,以及播放视频对应的音频内容,因此电子设备还可以播放音频且通过屏幕播放画面。因此,多媒体文件,可以包括音频内容,也可以包括画面内容,还可以同时包括音频内容以及画面内容。Electronic devices can be used to run different applications to achieve different functions and meet different needs of users. In some embodiments, the electronic device can play multimedia files, for example, it can run some video playback related applications, such as the electronic device plays a video through a video playback application. Since playing a video generally displays the picture content on the screen at the same time, and plays the audio content corresponding to the video, the electronic device can also play audio and play the picture through the screen. Therefore, a multimedia file can include audio content, can also include picture content, and can also include audio content and picture content at the same time.
而对于一些用户,此时的关注度可以重点处于电子设备播放多媒体文件时屏幕所显示的画面内容;另一些用户的关注度也可以重点处于该电子设备在播放多媒体文件时播放的音频内容。因此,对于用户不同的关注度,电子设备可以进入不同的工作模式,从而对多媒体文件相关参数进行调整。例如,可以暂停或播放多媒体文件,如暂停或播放屏幕中的画面,也可以调整播放多媒体文件的音量值,从而可以在不需要用户主动介入的情况下,提高用户的使用体验,并且具有便捷性。For some users, the focus at this time may be on the screen content displayed when the electronic device plays multimedia files; other users may also focus on the audio content played by the electronic device when playing multimedia files. Therefore, for different user attention levels, the electronic device can enter different working modes to adjust the parameters related to the multimedia files. For example, you can pause or play the multimedia file, such as pausing or playing the picture on the screen, or adjust the volume value of the multimedia file, so that the user experience can be improved without the user's active intervention, and it is convenient.
因此,在所述电子设备播放多媒体文件的情况下,可以首先获取电子设备的工作模式,其中工作模式可以包括第一模式以及第二模式,因此可以首先确定电子设备以第一模式工作或第二模式工作。其中,在所述第一模式下用户对所述屏幕的显示内容的关注度低于在所述第二模式下用户对所述屏幕的显示内容的关注度。例如,第一模式可以对应于用户的关注度重点处于多媒体文件中的音频内容,而第二模式可以对应于用户的注意力重点处于电子设备多媒体文件中屏幕显示的画面内容。Therefore, when the electronic device plays a multimedia file, the working mode of the electronic device can be first obtained, wherein the working mode can include a first mode and a second mode, so it can be first determined whether the electronic device works in the first mode or the second mode. In the first mode, the user's attention to the displayed content of the screen is lower than the user's attention to the displayed content of the screen in the second mode. For example, the first mode can correspond to the user's attention focus on the audio content in the multimedia file, and the second mode can correspond to the user's attention focus on the screen content displayed on the electronic device multimedia file.
具体的,可以在所述电子设备播放多媒体文件时,在电子设备的屏幕上显示选择控件;用户可以基于该选择控件选择电子设备的工作模式。电子设备可以获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。一种示例性的,请参阅图4,图4示出了电子设备200显示的一种选择控件的示意图。其中,电子设备200可以通过第一部分202设置的第一屏幕2021来显示播放的视频对应的画面,而在第二部分203设置的第二屏幕2031显示选择控件2032,以提示用户选择工作模式。其中,该选择控件2032可以包括有文本提示信息,以及文本提示信息对应的点选框,用户可以通过触摸对应的点选框来选择对应的工作模式。请继续参阅图4,图4中示出的选择控件包括有“第一模式”以及“第二模式”的文本提示信息,以及“第一模式”对应的点选框和“第二模式”对应的点选框。示例性的,用户可以触摸第一模式对应的点选框,从而选择第一模式。Specifically, when the electronic device plays a multimedia file, a selection control can be displayed on the screen of the electronic device; the user can select the working mode of the electronic device based on the selection control. The electronic device can obtain the first mode or the second mode selected by the user based on the selection control as the working mode of the electronic device. For an exemplary example, please refer to Figure 4, which shows a schematic diagram of a selection control displayed by the electronic device 200. Among them, the electronic device 200 can display the screen corresponding to the played video through the first screen 2021 set in the first part 202, and display the selection control 2032 on the second screen 2031 set in the second part 203 to prompt the user to select the working mode. Among them, the selection control 2032 can include text prompt information, and a check box corresponding to the text prompt information, and the user can select the corresponding working mode by touching the corresponding check box. Please continue to refer to Figure 4. The selection control shown in Figure 4 includes text prompt information of "first mode" and "second mode", as well as a check box corresponding to the "first mode" and a check box corresponding to the "second mode". Exemplarily, the user can touch the check box corresponding to the first mode to select the first mode.
可选的,用户还可以通过语音选择第一模式或第二模式。电子设备在显示选择控件后,还可以持续获取用户的语音指令,此时用户可以发出“第一模式”或“第二模式”的语音指令,从而控制电子设备以对应的工作模式工作。Optionally, the user can also select the first mode or the second mode by voice. After displaying the selection control, the electronic device can also continue to obtain the user's voice command. At this time, the user can issue a voice command of "first mode" or "second mode" to control the electronic device to work in the corresponding working mode.
可选的,电子设备在播放多媒体文件时,还可以对屏幕播放的画面进行监控,并判断屏幕播放的画面与音频内容是否具有关联关系。若屏幕播放的画面与音频内容不具有关联关系,此时可以认为用户关注度重点处于电子设备播放的音频内容,则可以直接确定工作模式为第一模式。一种示例性的,若电子设备通过音乐应用程序播放音频内容,同时通过屏幕显示系统桌面的画面,此时显示的画面不会随音频内容的播放而改变,因此可以确定屏幕播放的画面与音频内容不具有关联关系,则可以直接确定工作模式为第一模式。Optionally, when playing multimedia files, the electronic device can also monitor the screen playing picture and determine whether the screen playing picture has an association with the audio content. If the screen playing picture has no association with the audio content, it can be considered that the user's attention is focused on the audio content played by the electronic device, and the working mode can be directly determined to be the first mode. In an exemplary manner, if the electronic device plays audio content through a music application and displays the system desktop picture through the screen, the displayed picture will not change with the playback of the audio content, so it can be determined that the screen playing picture has no association with the audio content, and the working mode can be directly determined to be the first mode.
步骤S120:若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值。 Step S120: If the working mode of the electronic device is the first mode, then based on a first condition, adjusting the volume value of the electronic device playing the multimedia file.
进一步的,若电子设备的工作模式为第一模式,则表征当用户关注度重点处于电子设备播放多媒体文件时播放的音频内容。例如,用户可以一边做饭一边收听电子设备播放视频时播放的音频内容,因此可知,此时用户不太关注电子设备所显示的画面内容。进而,电子设备可以在工作模式为第一模式时,基于第一条件,调整所述电子设备播放所述多媒体文件的音量值,从而为用户提供较好的音频内容体验,减少了用户的操作负担,具有一定便捷性。Furthermore, if the working mode of the electronic device is the first mode, it indicates that the user's focus is on the audio content played when the electronic device plays a multimedia file. For example, the user can listen to the audio content played when the electronic device plays a video while cooking, so it can be seen that the user is not very concerned about the screen content displayed by the electronic device at this time. Furthermore, when the working mode of the electronic device is the first mode, based on the first condition, the volume value of the multimedia file played by the electronic device can be adjusted, thereby providing the user with a better audio content experience, reducing the user's operating burden, and having a certain convenience.
其中,对于一些实施方式,第一条件可以通过电子设备与用户之间的距离来设定,进而基于第一条件调整所述音量值。对于另一些实施方式,第一条件还可以基于电子设备周围环境音的音量来设定,进而通过第一条件调整所述音量值。具体的介绍可以参阅后续实施例。Among them, for some implementations, the first condition can be set by the distance between the electronic device and the user, and then the volume value is adjusted based on the first condition. For other implementations, the first condition can also be set based on the volume of the ambient sound around the electronic device, and then the volume value is adjusted based on the first condition. For a specific description, please refer to the subsequent embodiments.
步骤S130:若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。Step S130: If the working mode of the electronic device is the second mode, the multimedia file is controlled to be played or paused based on a second condition.
进一步的,若电子设备的工作模式为第二模式,则表征用户关注度重点处于电子设备播放多媒体文件时屏幕显示的画面内容。例如,用户可以一边吃饭一边观看电子设备播放的视频中屏幕显示的画面内容。此时电子设备可以基于第二条件,控制所述画面的播放或暂停。从而为用户提供较好的画面内容体验,减少了用户的操作负担,具有一定便捷性。Furthermore, if the working mode of the electronic device is the second mode, it indicates that the user's focus is on the screen content displayed when the electronic device plays a multimedia file. For example, the user can watch the screen content of the video played by the electronic device while eating. At this time, the electronic device can control the playback or pause of the picture based on the second condition. This provides the user with a better picture content experience, reduces the user's operation burden, and has a certain convenience.
其中,在一些实施方式中,第二条件可以通过判断待检测图像中是否包括人像来设定,进而基于第二条件控制所述画面的播放或暂停。具体的介绍可以参阅后续实施例。In some implementations, the second condition can be set by determining whether the image to be detected includes a human portrait, and then the playing or pausing of the image is controlled based on the second condition.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法播放多媒体文件,若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。因此本申请实施例在播放多媒体文件时,可以确定不同的工作状态,并可以基于不同条件调整播放多媒体文件的音量值或控制多媒体文件播放以及暂停,而不需要用户介入,降低了用户的操作负担,增加了使用便捷性。The device control method, apparatus, electronic device, computer-readable medium and product provided by the present application play a multimedia file. If the working mode of the electronic device is the first mode, the volume value of the multimedia file played by the electronic device is adjusted based on the first condition; if the working mode of the electronic device is the second mode, the multimedia file is controlled to be played or paused based on the second condition. Therefore, when playing a multimedia file, the embodiment of the present application can determine different working states, and can adjust the volume value of the multimedia file played or control the multimedia file to be played and paused based on different conditions without user intervention, thereby reducing the user's operating burden and increasing the convenience of use.
请参阅图5,图5示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S210至步骤S240。Please refer to Figure 5, which shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the above embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S210 to S240.
步骤S210:播放多媒体文件。Step S210: Play the multimedia file.
其中,步骤S210在前述实施例中已经详细介绍,此处就不再赘述。Among them, step S210 has been introduced in detail in the above embodiment and will not be repeated here.
步骤S220:若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值。Step S220: If the working mode of the electronic device is the first mode, adjusting the volume value according to the distance between the electronic device and the user.
对于一些实施方式,在电子设备以第一模式工作时,通过前述分析可知此时用户的关注度重点处于电子设备播放多媒体文件时播放的音频内容,而电子设备与用户之间的距离,会影响用户听到的音频内容的质量,进而影响用户的使用体验。因此,可以通过电子设备与用户之间的距离,构建第一条件,从而可以基于电子设备与用户之间的距离,调整电子设备播放音频时的音量值。可以在不需要用户介入的情况下,基于电子设备与用户之间的距离,实现对电子设备播放音量值的调整,提高用户的使用体验。For some embodiments, when the electronic device is working in the first mode, it can be known from the above analysis that the user's focus is on the audio content played when the electronic device plays multimedia files, and the distance between the electronic device and the user will affect the quality of the audio content heard by the user, thereby affecting the user's experience. Therefore, the first condition can be constructed by the distance between the electronic device and the user, so that the volume value of the electronic device playing audio can be adjusted based on the distance between the electronic device and the user. The volume value of the electronic device can be adjusted based on the distance between the electronic device and the user without the need for user intervention, thereby improving the user's experience.
因此,可以首先获取电子设备与用户之间的距离。一种示例性的,可以获取用户所处的第一位置,以及电子设备所处的第二位置,并基于第一位置和第二位置,确定电子设备与用户之间的距离。另一种示例性的,还可以直接确定用户与电子设备之间的距离。Therefore, the distance between the electronic device and the user can be obtained first. In an exemplary embodiment, the first position of the user and the second position of the electronic device can be obtained, and the distance between the electronic device and the user can be determined based on the first position and the second position. In another exemplary embodiment, the distance between the user and the electronic device can also be directly determined.
具体的,可以通过用户穿戴的可穿戴设备,获取用户所处的第一位置。该可穿戴设备可以预先和电子设备建立了通信连接,例如可以通过蓝牙Bluetooth或无线通信技术Wi-Fi建立连接。例如,可穿戴设备可以设置有全球定位系统(Global Positioning System,GPS),可以通过全球定位系统GPS获取到用户所处的第一位置。进一步的,电子设备同样可以设置有全球定位系统GPS,从而可以获取到电子设备的第二位置。进一步的,在获取到第一位置以及第二位置后,可以基于第一位移以及第二位置,确定出电子设备与用户之间的距离。Specifically, the first position of the user can be obtained through a wearable device worn by the user. The wearable device can establish a communication connection with the electronic device in advance, for example, a connection can be established through Bluetooth or wireless communication technology Wi-Fi. For example, the wearable device can be provided with a global positioning system (Global Positioning System, GPS), and the first position of the user can be obtained through the global positioning system GPS. Furthermore, the electronic device can also be provided with a global positioning system GPS, so that the second position of the electronic device can be obtained. Furthermore, after obtaining the first position and the second position, the distance between the electronic device and the user can be determined based on the first displacement and the second position.
需要说明的是,此处通过用户穿戴的可穿戴设备获取到第一位置后,可以将该第一位置通过预先建立的通信连接发送给电子设备,电子设备获取第二位置,以及接收到来自可穿戴设备发送的第一位置后,可以对第一位置以及第二位置进行计算,从而确定用户与电子设备的位置。It should be noted that after the first position is obtained by the wearable device worn by the user, the first position can be sent to the electronic device through a pre-established communication connection, and the electronic device obtains the second position. After receiving the first position sent from the wearable device, the first position and the second position can be calculated to determine the position of the user and the electronic device.
对于另一些实施方式,还可以直接确定电子设备与用户之间的距离,不通过分别获取用户的第一位置以及电子设备的第二位置来确定电子设备与用户之间的距离。一种示例性的,电子设备或用户穿戴的可穿戴设备还可以设置有超声波收发模块,可以通过该超声波收发模块发射超声波信号,并接反射回的超声波信号,基于发射和接收的时间差值,确定出电子设备与用户之间的距离。例如, 该超声波收发模块可以设置在可穿戴设备,可穿戴设备若在t1时刻发射超声波信号,该超声波信号传输至电子设备,经过反射后被可穿戴设备重新接收到的时刻为t2,则可以通过速度时间公式计算得到电子设备与用户之间的距离d近似为v*(t2―t1)/2,其中v为超声波信号的传播速度。又例如,该超声波收发模块可以设置在电子设备,电子设备若在t1时刻发射超声波信号,该超声波信号传输至用户,经过用户反射后被电子设备重新接收到的时刻为t2,则可以通过速度时间公式计算得到电子设备与用户之间的距离。一种示例性的,可穿戴设备可以为智能手表、智能手环、智能眼镜等。For some other embodiments, the distance between the electronic device and the user can also be determined directly, without separately obtaining the first position of the user and the second position of the electronic device to determine the distance between the electronic device and the user. In an exemplary embodiment, the electronic device or the wearable device worn by the user can also be provided with an ultrasonic transceiver module, which can transmit ultrasonic signals and receive reflected ultrasonic signals, and determine the distance between the electronic device and the user based on the time difference between transmission and reception. For example, The ultrasonic transceiver module can be set in a wearable device. If the wearable device transmits an ultrasonic signal at time t1, the ultrasonic signal is transmitted to the electronic device, and the time when it is re-received by the wearable device after reflection is t2, then the distance d between the electronic device and the user can be calculated by the speed-time formula as approximately v*(t2-t1)/2, where v is the propagation speed of the ultrasonic signal. For another example, the ultrasonic transceiver module can be set in an electronic device. If the electronic device transmits an ultrasonic signal at time t1, the ultrasonic signal is transmitted to the user, and the time when it is re-received by the electronic device after reflection by the user is t2, then the distance between the electronic device and the user can be calculated by the speed-time formula. An exemplary wearable device can be a smart watch, a smart bracelet, smart glasses, etc.
进一步的,在获取到电子设备与用户之间的距离后,可以基于所述距离调整所述音量值,具体的,请参阅图6,图6示出了步骤S220的一种实施方式图,包括步骤S221以及步骤S222。Further, after obtaining the distance between the electronic device and the user, the volume value may be adjusted based on the distance. Specifically, please refer to FIG. 6 , which shows an implementation diagram of step S220 , including step S221 and step S222 .
步骤S221:若所述电子设备的工作模式为第一模式,且所述距离小于距离阈值,则根据所述距离调整所述音量值,所述距离与所述音量值正相关。Step S221: If the working mode of the electronic device is the first mode and the distance is less than a distance threshold, adjusting the volume value according to the distance, and the distance is positively correlated with the volume value.
步骤S222:若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件。Step S222: If the distance is greater than or equal to the distance threshold, pausing the playing of the multimedia file.
对于一些实施方式,电子设备与用户之间的距离应处于距离阈值内,若超过距离阈值,则有较大概率用户此时暂不需要使用电子设备,从而电子设备也不需要继续播放多媒体文件的音频。因此可以预先设定距离阈值,将获取到的电子设备与用户之间的距离,与该距离阈值进行比较。因此第一条件可以基于距离以及距离阈值的大小关系确定。若所述距离小于距离阈值,基于所述距离调整所述音量值;若该距离大于距离阈值,则可以控制电子设备暂停播放视频,从而不需要用户主动介入而实现对电子设备的控制。For some implementations, the distance between the electronic device and the user should be within a distance threshold. If the distance threshold is exceeded, there is a high probability that the user does not need to use the electronic device at this time, and the electronic device does not need to continue playing the audio of the multimedia file. Therefore, a distance threshold can be set in advance, and the acquired distance between the electronic device and the user is compared with the distance threshold. Therefore, the first condition can be determined based on the relationship between the distance and the distance threshold. If the distance is less than the distance threshold, the volume value is adjusted based on the distance; if the distance is greater than the distance threshold, the electronic device can be controlled to pause playing the video, thereby achieving control of the electronic device without the user's active intervention.
对于一些实施方式,电子设备与用户之间的距离越远,用户需要获得近似的音频的音量值,就需要电子设备播放音频的音量值越大,因此所述距离与所述音量值正相关。例如,当所述距离小于距离阈值时,该距离越大,就可以将音量值设定的越大,从而尽量保证用户听到的音频的音量值近似。For some implementations, the farther the distance between the electronic device and the user is, the greater the volume value of the audio that the user needs to obtain, and the greater the volume value of the audio played by the electronic device, so the distance is positively correlated with the volume value. For example, when the distance is less than the distance threshold, the greater the distance, the greater the volume value can be set, so as to ensure that the volume value of the audio heard by the user is as similar as possible.
进一步的,若所述距离大于或等于所述距离阈值,可以暂停播放多媒体文件。可选的,还可以在暂停播放多媒体文件之前,输出第一语音提示信息,以提示用户所述多媒体文件被暂停播放。一种示例性的,该第一语音提示信息可以为“距离过大,已暂停播放”。Further, if the distance is greater than or equal to the distance threshold, the multimedia file can be paused. Optionally, before pausing the multimedia file, a first voice prompt message can be output to prompt the user that the multimedia file is paused. In an exemplary embodiment, the first voice prompt message can be "the distance is too large, the playback has been paused".
可选的,在输出第一语音提示信息之前,还可以发出询问信息,并获取用户基于该询问信息的反馈信息。示例性的,由于检测到该距离大于距离阈值,用户所处的位置一般不能直接通过触屏或按键来输入指令,因此此时电子设备可以发出音频询问信息,例如询问用户“检测到距离过大,是否暂停?”。此时用户可以基于电子设备的音频询问信息发出反馈信息,类似的,该反馈信息也可以为语音信号,例如用户可以发出“暂停”的语音信号,电子设备在接收到用户发出的“暂停”语音信号后,暂停播放多媒体文件。又例如,用户还可以发出“不暂停”的语音信号,电子设备在接收到用户发出的“不暂停”的语音信号后,可以继续播放多媒体文件。Optionally, before outputting the first voice prompt information, an inquiry message may be issued, and feedback information from the user based on the inquiry message may be obtained. Exemplarily, since it is detected that the distance is greater than the distance threshold, the user is generally not able to directly input instructions through the touch screen or buttons at this time, so the electronic device may issue an audio inquiry message, such as asking the user "The distance is detected to be too large, do you want to pause?" At this time, the user may issue feedback information based on the audio inquiry information of the electronic device. Similarly, the feedback information may also be a voice signal. For example, the user may issue a "pause" voice signal, and the electronic device may pause the playback of the multimedia file after receiving the "pause" voice signal issued by the user. For another example, the user may also issue a "no pause" voice signal, and the electronic device may continue to play the multimedia file after receiving the "no pause" voice signal issued by the user.
进一步的,在电子设备发出音频询问信息后,用户若此时已经远离电子设备,则无法及时响应电子设备发出的音频询问信息而发出反馈信息。因此,电子设备还可以设定第一时间阈值,当电子设备发出音频询问信息经过时第一时间阈值后,若还未获取到用户发出的反馈信息,可以直接暂停播放多媒体文件。Furthermore, after the electronic device sends the audio query information, if the user is away from the electronic device at this time, it is impossible to respond to the audio query information sent by the electronic device in time and send feedback information. Therefore, the electronic device can also set a first time threshold, and when the electronic device sends the audio query information and passes the first time threshold, if the feedback information sent by the user is not obtained, the multimedia file can be directly paused.
步骤S30:若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件画面的播放或暂停。Step S30: If the working mode of the electronic device is the second mode, then based on the second condition, the multimedia file screen is controlled to be played or paused.
其中,步骤S230在前述实施例中已经详细描述,此处就不再赘述。Among them, step S230 has been described in detail in the above embodiment and will not be repeated here.
步骤S240:若获取到用户的指定操作,则撤销对所述音量值的调整。Step S240: If a specified operation of the user is obtained, the adjustment of the volume value is canceled.
在一些实施方式中,在对电子设备的播放多媒体文件时的音频的音量值调整后,若获取到了用户的指定操作,则可以撤销对所述音量值的调整。其中,该指定操作可以为预先设定的,通过电子设备的触摸屏幕进行输入的操作。例如,该指定操作可以是在电子设备的触摸屏幕向右滑动,此时则可以撤销对所述音量值的调整。另一种示例性的,该指定操作还可以是在电子设备的触摸屏幕向左滑动,或向下滑动等。In some embodiments, after adjusting the volume value of the audio when playing a multimedia file on an electronic device, if a user's specified operation is obtained, the adjustment of the volume value can be canceled. The specified operation can be a pre-set operation input through the touch screen of the electronic device. For example, the specified operation can be sliding the touch screen of the electronic device to the right, and the adjustment of the volume value can be canceled. In another exemplary embodiment, the specified operation can also be sliding the touch screen of the electronic device to the left, or sliding downward, etc.
可选的,该指定操作也可以是在电子设备的屏幕中的某一预设位置从左向右滑动,或从右向左滑动等,本申请实施例不做限定。Optionally, the designated operation may be sliding from left to right, or from right to left, etc. at a preset position on the screen of the electronic device, which is not limited in the embodiments of the present application.
又如,在对音量值进行调整后,可以在屏幕上显示一文本框,该文本框中的文本用于提示已对音量值进行调整(增大或减小)。如果用户想要撤销电子设备对音量值做出的调整,那么用户可以对该文本框进行滑动,例如将该文本框向右或向左滑动,从而指示电子设备撤销之前作出的音量值调整操作。For another example, after the volume value is adjusted, a text box may be displayed on the screen, and the text in the text box is used to prompt that the volume value has been adjusted (increased or decreased). If the user wants to cancel the adjustment made by the electronic device to the volume value, the user can slide the text box, for example, slide the text box to the right or left, thereby instructing the electronic device to cancel the previously made volume value adjustment operation.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法播放多媒体文 件,进一步的,本申请实施例获取所述电子设备与用户之间的距离,若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值;以及基于第二条件,控制所述多媒体文件的播放与暂停,从而可以在用户改变和电子设备的距离时,灵活调整电子设备播放的音量值,提高了用户的使用体验,从而给用户比较恒定的媒体伴随感。The device control method, apparatus, electronic device, computer-readable medium and product provided in the present application play multimedia files. Furthermore, in an embodiment of the present application, the distance between the electronic device and the user is obtained, and if the working mode of the electronic device is the first mode, the volume value is adjusted according to the distance between the electronic device and the user; and based on the second condition, the playing and pausing of the multimedia file are controlled, so that when the user changes the distance from the electronic device, the volume value played by the electronic device can be flexibly adjusted, thereby improving the user's usage experience and giving the user a more constant sense of media accompaniment.
请参阅图7,图7示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S310至步骤S340。Please refer to Figure 7, which shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the above embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S310 to S340.
步骤S310:播放多媒体文件。Step S310: Play the multimedia file.
步骤S320:若所述工作模式为第一模式且所述电子设备与用户之间的距离发生变化,则调整所述音量值,其中,所述电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关。Step S320: If the working mode is the first mode and the distance between the electronic device and the user changes, the volume value is adjusted, wherein the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value.
步骤S330:若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。Step S330: If the working mode of the electronic device is the second mode, the multimedia file is controlled to be played or paused based on a second condition.
其中,步骤S310和步骤S330在前述实施例中已经介绍,此处就不再赘述。Among them, step S310 and step S330 have been introduced in the above-mentioned embodiment and will not be repeated here.
对于一些实施方式,在电子设备以第一模式工作时,通过前述分析可知此时用户的关注度重点处于电子设备播放多媒体文件时播放的音频内容,而电子设备与用户之间的距离,会影响用户听到的音频内容的质量,进而影响用户的使用体验。因此,可以通过电子设备与用户之间的距离,构建第一条件,从而可以基于电子设备与用户之间的距离,调整电子设备播放音频时的音量值。可以在不需要用户介入的情况下,基于电子设备与用户之间的距离,实现对电子设备播放音量值的调整,提高用户的使用体验。For some embodiments, when the electronic device is working in the first mode, it can be known from the above analysis that the user's focus is on the audio content played when the electronic device plays multimedia files, and the distance between the electronic device and the user will affect the quality of the audio content heard by the user, thereby affecting the user's experience. Therefore, the first condition can be constructed by the distance between the electronic device and the user, so that the volume value of the electronic device playing audio can be adjusted based on the distance between the electronic device and the user. The volume value of the electronic device can be adjusted based on the distance between the electronic device and the user without the need for user intervention, thereby improving the user's experience.
一种示例性的,电子设备在播放多媒体文件的音频时,可以是以一个音量值进行播放的。此时若检测到电子设备与用户之间的距离发生了变换,则可以调整该音量值。其中,若距离变小,则对音量值的调整可以为减小,若距离变大,则对音量值的调整可以为增大。不难理解的是,电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关。例如,若距离变小了,距离的变化幅度为1米,可以对音量值减小10个单位,若距离变大,距离的变化幅度为3米,则可以对音量值增大30个单位。In an exemplary embodiment, when an electronic device plays the audio of a multimedia file, it may be played at a volume value. At this time, if it is detected that the distance between the electronic device and the user has changed, the volume value may be adjusted. Among them, if the distance becomes smaller, the adjustment of the volume value may be reduced, and if the distance becomes larger, the adjustment of the volume value may be increased. It is not difficult to understand that the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value. For example, if the distance becomes smaller, the change amplitude of the distance is 1 meter, the volume value may be reduced by 10 units, and if the distance becomes larger, the change amplitude of the distance is 3 meters, the volume value may be increased by 30 units.
步骤S340:若获取到用户的指定操作,则撤销对所述音量值的调整。Step S340: If a specified operation of the user is obtained, the adjustment of the volume value is canceled.
其中,步骤S340在前述实施例中已经详细介绍,此处就不再赘述。Among them, step S340 has been introduced in detail in the above embodiment and will not be repeated here.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法播放多媒体文件,进一步的,若所述工作模式为第一模式且所述电子设备与用户之间的距离发生变化,则调整所述音量值,其中,所述电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关;以及基于第二条件,控制多媒体文件的播放与暂停,从而可以在用户改变和电子设备的距离时,基于距离的变化幅度调整所述音量值,提高了用户的使用体验,从而给用户比较恒定的媒体伴随感。The device control method, apparatus, electronic device, computer-readable medium and product provided by the present application play multimedia files. Further, if the working mode is the first mode and the distance between the electronic device and the user changes, the volume value is adjusted, wherein the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value; and based on the second condition, the playback and pause of the multimedia file are controlled, so that when the user changes the distance from the electronic device, the volume value can be adjusted based on the change amplitude of the distance, thereby improving the user's usage experience and giving the user a relatively constant sense of media accompaniment.
请参阅图8,图8示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S410至步骤S430。Please refer to Figure 8, which shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the above embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S410 to S430.
步骤S410:播放多媒体文件。Step S410: Play the multimedia file.
其中,步骤S410在前述实施例中已经详细描述,此处就不再赘述。Among them, step S410 has been described in detail in the above embodiment and will not be repeated here.
步骤S420:若所述工作模式为第一模式,则根据所述电子设备周围环境音的音量调整所述音量值。Step S420: If the working mode is the first mode, adjusting the volume value according to the volume of the ambient sound around the electronic device.
对于一些实施方式,电子设备在播放多媒体文件时,例如播放音频且通过屏幕播放画面的情况下,电子设备所在的环境中一般会存在其他声音,例如大型工程设备工作时的噪声,或其他电子设备发出的声音等。而在电子设备所处的环境中,能够检测到的声音的总和,可以作为电子设备周围环境音。不难理解的是,当电子设备的工作模式为第一模式时,用户的关注度重点处于电子设备播放的音频内容,若环境音较大,会影响用户正常收听电子设备播放的音频内容,因此用户为了能够获得更好的电子设备播放的音频内容,可以手动调整电子设备播放多媒体文件的音量值。然而,通过用户手动控制电子设备播放多媒体文件的音量值,需要用户主动介入,并且增加了用户的操作负担,不具有便捷性。For some embodiments, when an electronic device plays a multimedia file, such as playing audio and playing pictures through the screen, there are generally other sounds in the environment where the electronic device is located, such as the noise when large engineering equipment is working, or the sound emitted by other electronic devices. In the environment where the electronic device is located, the sum of the sounds that can be detected can be used as the ambient sound around the electronic device. It is not difficult to understand that when the working mode of the electronic device is the first mode, the user's attention is focused on the audio content played by the electronic device. If the ambient sound is large, it will affect the user's normal listening to the audio content played by the electronic device. Therefore, in order to obtain better audio content played by the electronic device, the user can manually adjust the volume value of the electronic device playing the multimedia file. However, manually controlling the volume value of the electronic device playing the multimedia file requires the user to actively intervene, and increases the user's operating burden, which is not convenient.
因此,电子设备还可以获取周围环境音的音量,然后基于周围环境音的音量,对电子设备播放多媒体文件的音量值进行调整,从而在不需要用户主动介入的情况下,提高用户的使用体验,减小了用户的操作负担,具有一定的便捷性。Therefore, the electronic device can also obtain the volume of the surrounding ambient sound, and then adjust the volume value of the multimedia file played by the electronic device based on the volume of the surrounding ambient sound, thereby improving the user's experience and reducing the user's operating burden without the need for active user intervention, which has a certain degree of convenience.
需要说明的是,由于用户使用电子设备播放多媒体文件,例如通过电子设备中运行的视频播放 应用程序播放视频中对应的音频内容,从而用户一般与电子设备处于同一环境中,例如处于同一房间中。从而用户听到的周围环境音,与电子设备能够采集到的周围环境音,可以近似相等。It should be noted that, since the user uses an electronic device to play multimedia files, for example, through a video player running in the electronic device The application plays the corresponding audio content in the video, so that the user is generally in the same environment as the electronic device, such as in the same room. Therefore, the ambient sound heard by the user and the ambient sound that can be collected by the electronic device can be approximately equal.
具体的,可以通过电子设备上设置的麦克风或麦克风阵列等,采集电子设备周围环境音,并通过电子设备中的处理器分析得到周围环境音的音量。Specifically, the ambient sound around the electronic device may be collected by a microphone or a microphone array provided on the electronic device, and the volume of the ambient sound may be obtained by analyzing the processor in the electronic device.
可选的,和前述实施例中类似,用户还可以佩戴有可穿戴设备,该可穿戴设备上可以设置有麦克风或麦克风阵列等,因此还可以通过用户佩戴的可穿戴设备采集周围环境音。进一步的,采集到的周围环境音,可以通过可穿戴设备中的处理器进行分析,得到周围环境音的音量,再通过预先建立的通信连接将周围环境音的音量发送给电子设备。另一种示例性的,采集到周围环境音,还可以直接通过预先建立的通信连接发送给电子设备,再通过电子设备中的处理器对周围环境音进行分析,从而确定周围环境音的音量。Optionally, similar to the aforementioned embodiment, the user may also wear a wearable device, which may be provided with a microphone or a microphone array, etc., so that the ambient sound may also be collected through the wearable device worn by the user. Furthermore, the collected ambient sound may be analyzed by the processor in the wearable device to obtain the volume of the ambient sound, and then the volume of the ambient sound may be sent to the electronic device through a pre-established communication connection. In another exemplary embodiment, the collected ambient sound may also be directly sent to the electronic device through a pre-established communication connection, and then the processor in the electronic device may analyze the ambient sound to determine the volume of the ambient sound.
容易理解的是,用户听到的声音信号实质为周围环境音和电子设备输出的音频内容的叠加。因此,当周围环境音的音量较小时,电子设备输出的音频内容的音量值只需要较小,用户就能获得较好的使用体验;当周围环境音的音量较大时,电子设备输出的音频内容的音量值需要相应增大,用户才能获得较好的使用体验。It is easy to understand that the sound signal heard by the user is actually the superposition of the surrounding sound and the audio content output by the electronic device. Therefore, when the volume of the surrounding sound is low, the volume value of the audio content output by the electronic device only needs to be low, and the user can get a better user experience; when the volume of the surrounding sound is high, the volume value of the audio content output by the electronic device needs to be increased accordingly, and the user can get a better user experience.
因此可以预先设定强度阈值,在电子设备获取到周围环境音的音量后,将该周围环境音的音量与预先设定的强度阈值进行比较,若周围环境音的音量小于该强度阈值,说明此时周围环境音的音量较小,此时可以控制电子设备以较小的音量值输出音频信号。因此第一条件可以基于周围环境音的音量值以及强度阈值的大小关系确定。若周围环境音的音量大于该强度阈值,说明此时周围环境音的音量较大,此时可以控制电子设备以较大的音量值输出音频信号。Therefore, an intensity threshold can be set in advance. After the electronic device obtains the volume of the ambient sound, the volume of the ambient sound is compared with the pre-set intensity threshold. If the volume of the ambient sound is less than the intensity threshold, it means that the volume of the ambient sound is relatively small at this time. At this time, the electronic device can be controlled to output the audio signal with a smaller volume value. Therefore, the first condition can be determined based on the size relationship between the volume value of the ambient sound and the intensity threshold. If the volume of the ambient sound is greater than the intensity threshold, it means that the volume of the ambient sound is relatively large at this time. At this time, the electronic device can be controlled to output the audio signal with a larger volume value.
可选的,预先设定的强度阈值还可以为多个,其中每个强度阈值对应一种电子设备的播放多媒体文件的音量值,其中强度阈值与音量值成正相关。一种示例性的,若强度阈值包括第一强度阈值、第二强度阈值以及第三强度阈值,第一强度阈值对应第一音量值,第二强度阈值对应第二音量值,第三强度阈值对应第三音量值,其中第一强度阈值、第二强度阈值以及第三强度阈值依次增大。若周围环境音的音量小于或等于第一强度阈值,控制电子设备以第一音量值播放音频信号;若周围环境音的音量值小于或等于第二强度阈值,且大于第一强度阈值,控制电子设备以第二音量值播放音频信号;若周围环境音的音量值小于或等于第三强度阈值,且大于第二强度阈值,控制电子设备以第三音量值输出音频信号。Optionally, there may be multiple pre-set intensity thresholds, each of which corresponds to a volume value of a multimedia file played by an electronic device, wherein the intensity threshold is positively correlated with the volume value. In an exemplary embodiment, if the intensity threshold includes a first intensity threshold, a second intensity threshold and a third intensity threshold, the first intensity threshold corresponds to a first volume value, the second intensity threshold corresponds to a second volume value, and the third intensity threshold corresponds to a third volume value, wherein the first intensity threshold, the second intensity threshold and the third intensity threshold increase in sequence. If the volume of the ambient sound is less than or equal to the first intensity threshold, the electronic device is controlled to play the audio signal at the first volume value; if the volume value of the ambient sound is less than or equal to the second intensity threshold and greater than the first intensity threshold, the electronic device is controlled to play the audio signal at the second volume value; if the volume value of the ambient sound is less than or equal to the third intensity threshold and greater than the second intensity threshold, the electronic device is controlled to output the audio signal at the third volume value.
容易理解的是,为了使用户听闻的多媒体文件的声音不受到环境音的干扰,可以使周围环境音的音量变化幅度与所述电子设备播放多媒体文件的音量值的变化幅度正相关。即环境音的音量变化越大,电子设备播放多媒体文件的音量值的变化幅度也就越大。一种示例性的,若检测到环境音的音量从40dB变为60dB,变化幅度为20dB,此时可以控制多媒体文件的音量值增大10音量单位,若环境音的音量从40dB变为70dB,变换幅度为30dB,此处可以控制多媒体文件的音量值增大20音量单位。It is easy to understand that in order to prevent the sound of the multimedia file heard by the user from being disturbed by the ambient sound, the volume change amplitude of the surrounding ambient sound can be positively correlated with the volume value change amplitude of the multimedia file played by the electronic device. That is, the greater the volume change of the ambient sound, the greater the volume value change amplitude of the multimedia file played by the electronic device. As an exemplary example, if it is detected that the volume of the ambient sound changes from 40dB to 60dB, the change amplitude is 20dB, then the volume value of the multimedia file can be controlled to increase by 10 volume units. If the volume of the ambient sound changes from 40dB to 70dB, the change amplitude is 30dB, then the volume value of the multimedia file can be controlled to increase by 20 volume units.
可选的,电子设备基于周围环境音的音量对电子设备的音量值进行调整后,还可以在指定界面以文本显示的形式,对用户进行提示。例如,请参阅图9,图9示出了电子设备200的一种指定界面示意图,其中,电子设备200可以通过第一部分202设置的第一屏幕2021来显示播放的视频对应的画面,而在第二部分203设置的第二屏幕2031显示指定界面2033,以通过指定界面2033显示的文本信息提示用户已基于周围环境音的音量对电子设备的音量值进行了调整。例如,图9中指定界面2033可以显示有“已基于周围环境音对音量值进行调整”。Optionally, after the electronic device adjusts the volume value of the electronic device based on the volume of the surrounding ambient sound, it can also prompt the user in the form of text display on the designated interface. For example, please refer to Figure 9, which shows a schematic diagram of a designated interface of the electronic device 200, wherein the electronic device 200 can display the screen corresponding to the played video through the first screen 2021 set in the first part 202, and display the designated interface 2033 on the second screen 2031 set in the second part 203, so as to prompt the user that the volume value of the electronic device has been adjusted based on the volume of the surrounding ambient sound through the text information displayed on the designated interface 2033. For example, the designated interface 2033 in Figure 9 may display "the volume value has been adjusted based on the surrounding ambient sound".
进一步的,在通过指定界面显示文本信息对用户进行提示已经调整音量值后,用户还可以主动介入撤销电子设备对音量值的调整。例如,用户可以通过语音指令,控制电子设备撤销对音量值的调整;又例如,用户还可以在电子设备上输入撤销指令,从而控制电子设备撤销对音量值的调整。示例性的,该撤销指令可以为在指定区域滑动,例如请继续参阅图9,图9中还包括有指定区域2034,用户可以在该指定区域2034滑动从而撤销对音量值的调整,例如从该指定区域2034的一侧滑动至另一侧。Furthermore, after the text message is displayed through the designated interface to prompt the user that the volume value has been adjusted, the user can also actively intervene to cancel the electronic device's adjustment of the volume value. For example, the user can control the electronic device to cancel the adjustment of the volume value through voice commands; for another example, the user can also input a cancellation command on the electronic device to control the electronic device to cancel the adjustment of the volume value. Exemplarily, the cancellation command can be sliding in a designated area. For example, please continue to refer to Figure 9, which also includes a designated area 2034. The user can slide in the designated area 2034 to cancel the adjustment of the volume value, such as sliding from one side of the designated area 2034 to the other side.
步骤S430:若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。Step S430: If the working mode of the electronic device is the second mode, the multimedia file is controlled to be played or paused based on a second condition.
其中,步骤S430在前述实施例中已经详细描述,此处就不再赘述。Among them, step S430 has been described in detail in the above embodiment and will not be repeated here.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法在所述电子设备播放音频且通过屏幕播放画面的情况下,获取所述电子设备的工作模式,其中工作模式包括第一模式和第二模式,在所述第一模式下用户对所述屏幕的显示内容的关注度低于在所述第二模式下用 户对所述屏幕的显示内容的关注度。因此本申请实施例提供了一种可以通过用户对屏幕的显示内容关注度来确定不同工作模式的方法。进一步的,本申请实施例还可以获取所述电子设备周围环境音的音量;基于所述环境音的音量调整所述音量值;以及基于第二条件,控制所述画面的播放与暂停,从而实现结合周围环境音调整电子设备播放的音量值,提高了用户的使用体验。The device control method, apparatus, electronic device, computer-readable medium and product provided in the present application, the method obtains the working mode of the electronic device when the electronic device plays audio and plays pictures through the screen, wherein the working mode includes a first mode and a second mode, and in the first mode, the user's attention to the displayed content of the screen is lower than that in the second mode. The user's attention to the displayed content on the screen. Therefore, the embodiment of the present application provides a method for determining different working modes by the user's attention to the displayed content on the screen. Furthermore, the embodiment of the present application can also obtain the volume of the ambient sound around the electronic device; adjust the volume value based on the volume of the ambient sound; and control the play and pause of the picture based on the second condition, thereby adjusting the volume value of the electronic device playback in combination with the ambient sound, thereby improving the user experience.
参阅图10,图10示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S510至步骤S560。Referring to Fig. 10, Fig. 10 shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the aforementioned embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S510 to S560.
步骤S510:播放多媒体文件。Step S510: Play the multimedia file.
步骤S520:若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值。Step S520: If the working mode of the electronic device is the first mode, then based on the first condition, adjusting the volume value of the electronic device playing the multimedia file.
其中,步骤S510和步骤S520在前述实施例中已经详细描述,此处就不再赘述。Among them, step S510 and step S520 have been described in detail in the above embodiments and will not be repeated here.
可选的,电子设备的工作模式若为第一模式,说明此时用户的关注度重点并非处于电子设备的屏幕显示的画面,因而对于一些实施方式,还可以直接将电子设备的屏幕关闭,并继续运行播放音频内容,从而在不影响用户体验的前提下,可以大幅降低电子设备的功耗。Optionally, if the working mode of the electronic device is the first mode, it means that the user's attention is not focused on the picture displayed on the screen of the electronic device. Therefore, for some implementations, the screen of the electronic device can be directly turned off and the audio content can continue to be played, thereby greatly reducing the power consumption of the electronic device without affecting the user experience.
步骤S530:若所述工作模式为第二模式且未检测到用户的人像,则暂停所述多媒体文件的播放。Step S530: If the working mode is the second mode and the user's portrait is not detected, pausing the playing of the multimedia file.
对于一些实施方式,若电子设备的工作模式为第二模式,可知此时用户关注度重点处于电子设备播放多媒体文件时,屏幕所显示的画面内容。由于用户需要通过设置于电子设备的屏幕,来观看电子设备播放的画面内容,因此第二条件可以基于电子设备的屏幕前方区域是否包括人像来设定。可以检测处于电子设备的屏幕前方区域中是否包括有人像,若所述待检测图像不包括用户的人像,则控制所述多媒体文件暂停播放。For some embodiments, if the working mode of the electronic device is the second mode, it can be known that the user's focus is on the screen content displayed when the electronic device plays a multimedia file. Since the user needs to watch the screen content played by the electronic device through the screen set on the electronic device, the second condition can be set based on whether the front area of the screen of the electronic device includes a portrait. It can be detected whether the front area of the screen of the electronic device includes a portrait. If the image to be detected does not include the user's portrait, the multimedia file is controlled to pause playing.
一种示例性的,电子设备上可以设置有图像获取模块,例如,请继续参阅图2,图2中示出的电子设备200中可以包括摄像头204,其中,摄像头204可以设置于用于显示画面内容的部分,即第一部分202。从而,电子设备200可以通过摄像头204获取屏幕前方区域的待检测图像。In an exemplary embodiment, an electronic device may be provided with an image acquisition module. For example, please continue to refer to FIG. 2 , the electronic device 200 shown in FIG. 2 may include a camera 204, wherein the camera 204 may be provided in a portion for displaying screen content, i.e., the first portion 202. Thus, the electronic device 200 may acquire the image to be detected in the area in front of the screen through the camera 204.
进一步的,在获取到待检测图像后,可以分析并判断待检测图像中是否包括用户的人像,若所述待检测图像不包括用户的人像,说明此时用户并不处于电子设备用于显示画面内容的屏幕的前方区域,从而此时用户有较大概率不需要观看画面内容,因此可以控制电子设备暂停所述多媒体文件的播放。若所述待检测图像包括用户的人像,说明此时用户有较大概率处于电子设备用于显示画面内容的屏幕的前方区域,从而此时用户需要观看画面内容,因此可以控制电子设备保持所述多媒体文件处于播放状态。Furthermore, after acquiring the image to be detected, it is possible to analyze and determine whether the image to be detected includes the user's portrait. If the image to be detected does not include the user's portrait, it means that the user is not in the front area of the screen used by the electronic device to display the screen content at this time, so the user has a high probability of not needing to watch the screen content at this time, so the electronic device can be controlled to pause the playback of the multimedia file. If the image to be detected includes the user's portrait, it means that the user has a high probability of being in the front area of the screen used by the electronic device to display the screen content at this time, so the user needs to watch the screen content at this time, so the electronic device can be controlled to keep the multimedia file in the playback state.
可选的,若所述工作模式为第二模式且未检测到用户的人像,还可以在控制电子设备暂停所述多媒体文件的播放之前,输出第二语音提示信息,以询问用户是否需要暂停播放,其中,所述第二语音提示信息用于提示所述多媒体文件将被暂停播放。例如,第二语音提示信息可以为“是否需要控制画面暂停播放”。Optionally, if the working mode is the second mode and the user's portrait is not detected, before controlling the electronic device to pause the playing of the multimedia file, a second voice prompt message may be output to ask the user whether the playing needs to be paused, wherein the second voice prompt message is used to prompt that the playing of the multimedia file will be paused. For example, the second voice prompt message may be "Do you need to control the screen to pause the playing?"
进一步的,在输出第二语音提示信息后,还可以检测是否获取到指定语音信息。其中,该指定语音信息可以为用户基于第二语音提示信息回复的语音信息,例如可以为“暂停”或“不暂停”。当检测到指定语音信息后,可以基于用户的指定语音信息控制电子设备,例如若指定语音信息为“暂停”,此时可以控制所述画面暂停播放;若指定语音信息为“不暂停”,此时可以控制多媒体文件不被暂停,继续播放。Furthermore, after the second voice prompt information is output, it is also possible to detect whether the specified voice information is obtained. The specified voice information may be a voice information to which the user replies based on the second voice prompt information, such as "pause" or "no pause". When the specified voice information is detected, the electronic device may be controlled based on the user's specified voice information. For example, if the specified voice information is "pause", the screen may be controlled to pause playback; if the specified voice information is "no pause", the multimedia file may be controlled not to be paused and continue to play.
进一步的,若未检测到与所述第二语音提示信息匹配的指定语音信息,可以控制所述画面暂停播放。对于一些实施方式,可以设定第二时间阈值,在输出第二语音提示信息后,若经过第二时间阈值还未检测到与所述第二语音提示信息匹配的指定语音信息,可以控制多媒体文件暂停播放。Further, if the designated voice information matching the second voice prompt information is not detected, the picture can be controlled to pause playing. For some implementations, a second time threshold can be set, and after the second voice prompt information is output, if the designated voice information matching the second voice prompt information is not detected after the second time threshold, the multimedia file can be controlled to pause playing.
步骤S540:若所述工作模式为第二模式且检测到用户的人像,则基于对所述电子设备在所述多媒体文件处于播放状态下的控制操作,生成对应的第一文本信息,并显示所述第一文本信息。Step S540: If the working mode is the second mode and a user's portrait is detected, based on a control operation on the electronic device when the multimedia file is in a playing state, corresponding first text information is generated and displayed.
对于一些实施方式,用户在观看电子设备中屏幕显示的画面内容时,还可以通过语音助手,来对电子设备进行控制。其中,用户可以首先通过唤醒操作,将语音助手唤醒。一种示例性的,用户可以通过在电子设备的屏幕上连续敲击指定次数,从而唤醒语音助手,例如连续敲击三次。用户还可以通过预设的语音指令,从而唤醒语音助手,例如,语音指令可以包括“你好手机”,则用户只需要说出“你好手机”,电子设备检测到该语音指令后,即可以唤醒语音助手。For some embodiments, when the user is watching the screen content displayed on the electronic device, the user can also control the electronic device through a voice assistant. Among them, the user can first wake up the voice assistant through a wake-up operation. In an exemplary embodiment, the user can wake up the voice assistant by tapping the screen of the electronic device for a specified number of times, such as tapping three times in a row. The user can also wake up the voice assistant through a preset voice command. For example, the voice command may include "Hello mobile phone", then the user only needs to say "Hello mobile phone", and the electronic device can wake up the voice assistant after detecting the voice command.
进一步的,若所述工作模式为第二模式且检测到用户的人像,此时用户可以发出语音控制指令,以实现对电子设备的控制操作。例如,此时用户可以发出“减小音量值”的控制指令,从而减小电子设备的音量值;此时用户还可以发出“快进30秒”的控制指令,从而使电子设备播放的画面内容 快进30秒。Furthermore, if the working mode is the second mode and the user's portrait is detected, the user can issue a voice control command to control the electronic device. For example, the user can issue a "reduce volume" control command to reduce the volume of the electronic device; the user can also issue a "fast forward 30 seconds" control command to make the screen content played by the electronic device Fast forward 30 seconds.
容易理解的是,用户此时关注度重点处于电子设备播放多媒体文件时屏幕显示的画面内容,若语音助手在响应用户的控制指令后,发出语音提示信息,会暂时中断屏幕显示的画面内容,对用户的使用体验造成负面影响。因此,此时可以基于对所述多媒体文件处于播放状态下的控制操作生成该控制操作对应的第一文本信息,并显示所述第一文本信息,例如在电子设备的屏幕上显示。请参阅图11,图11示出了电子设备200的一种指定界面的示意图,其中,电子设备200可以通过第一部分202设置的第一屏幕2021来显示播放的视频对应的画面,而在第二部分203设置的第二屏幕2031显示指定界面2033,以通过指定界面2033显示的第一文本信息提示用户。其中,显示在指定界面2033中的第一文本信息可以包括所述语音助手产生的语音信息转换为第一文本信息。例如,用户发出“快进30秒”的控制操作后,电子设备响应于该控制操作使播放的画面内容快进30秒,此时语音助手可以产生该控制操作对应的第一文本信息,以提示用户已经完成将播放的画面内容快进30秒,并进行显示。例如可以通过第二屏幕2031的指定界面2033显示“已将画面内容快进30秒”。It is easy to understand that the user's focus at this time is on the screen content displayed when the electronic device plays a multimedia file. If the voice assistant issues a voice prompt message after responding to the user's control command, the screen content displayed on the screen will be temporarily interrupted, which will have a negative impact on the user's experience. Therefore, at this time, the first text information corresponding to the control operation can be generated based on the control operation of the multimedia file in the playback state, and the first text information can be displayed, for example, on the screen of the electronic device. Please refer to Figure 11, which shows a schematic diagram of a designated interface of an electronic device 200, wherein the electronic device 200 can display the screen corresponding to the played video through the first screen 2021 set in the first part 202, and the second screen 2031 set in the second part 203 displays the designated interface 2033, so as to prompt the user through the first text information displayed on the designated interface 2033. Among them, the first text information displayed in the designated interface 2033 may include the voice information generated by the voice assistant converted into the first text information. For example, after the user issues a control operation of "fast forward 30 seconds", the electronic device responds to the control operation to fast forward the played screen content by 30 seconds. At this time, the voice assistant can generate a first text message corresponding to the control operation to prompt the user that the played screen content has been fast forwarded by 30 seconds and display it. For example, the designated interface 2033 of the second screen 2031 can display "the screen content has been fast forwarded by 30 seconds".
步骤S550:获取所述电子设备的屏幕前方区域的待检测图像。Step S550: Acquire the image to be detected in the area in front of the screen of the electronic device.
步骤S560:若所述待检测图像包括人像,控制所述多媒体文件继续播放。Step S560: If the image to be detected includes a portrait, control the multimedia file to continue playing.
对于一些实施方式,若所述工作模式为第二模式且未检测到用户的人像所述待检测图像不包括人像,则控制暂停所述画面多媒体文件暂停的播放之后,用户可能经过一段时间后,重新回到电子设备屏幕前方区域,此时可以控制电子设备重新播放画面。因此,还可以通过所述电子设备的摄像头获取所述屏幕前方区域的待检测图像,若所述待检测图像包括人像,控制所述多媒体文件重新播放。For some implementations, if the working mode is the second mode and the user's portrait is not detected and the image to be detected does not include a portrait, then the multimedia file of the screen is paused. After the user returns to the area in front of the electronic device screen after a period of time, the electronic device can be controlled to replay the screen. Therefore, the image to be detected in the area in front of the screen can also be obtained through the camera of the electronic device. If the image to be detected includes a portrait, the multimedia file is controlled to be replayed.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法播放多媒体文件,进一步的,本申请实施例获取所述电子设备与用户之间的距离,若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值;以及若所述工作模式为第二模式且检测到用户的人像,则保持所述多媒体文件处于播放状态;若所述工作模式为第二模式且未检测到用户的人像,则暂停所述多媒体文件的播放。从而实现不需要用户主动介入,就可以对电子设备播放的多媒体文件实现调整,降低了用户的操作负担,提高了便捷性。还可以在控制多媒体文件暂停播放之后,重新通过所述电子设备的摄像头获取所述屏幕前方区域的待检测图像,若所述待检测图像包括人像,控制所述多媒体文件重新播放,从而可以进一步的提高用户的使用体验。The device control method, apparatus, electronic device, computer-readable medium and product provided by the present application, the method plays multimedia files, and further, the embodiment of the present application obtains the distance between the electronic device and the user, if the working mode of the electronic device is the first mode, the volume value is adjusted according to the distance between the electronic device and the user; and if the working mode is the second mode and the user's portrait is detected, the multimedia file is kept in the playing state; if the working mode is the second mode and the user's portrait is not detected, the playing of the multimedia file is paused. Thus, the multimedia file played by the electronic device can be adjusted without the user's active intervention, which reduces the user's operating burden and improves convenience. It is also possible to obtain the image to be detected in the area in front of the screen through the camera of the electronic device again after controlling the multimedia file to pause playing. If the image to be detected includes a portrait, the multimedia file is controlled to be played again, so as to further improve the user's experience.
请参阅图12,图12示出了本申请实施例提供的一种设备控制方法,该方法可以应用于前述实施例中的电子设备200,具体的可以是该电子设备中的处理器作为执行主体。具体的,该方法包括步骤S610至步骤S670。Please refer to Figure 12, which shows a device control method provided by an embodiment of the present application, which can be applied to the electronic device 200 in the above embodiment, and specifically, the processor in the electronic device can be used as the execution subject. Specifically, the method includes steps S610 to S670.
步骤S610:播放多媒体文件。Step S610: Play the multimedia file.
步骤S620:若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件。Step S620: If the angle feature information corresponding to the screen of the electronic device meets the target condition, the voice assistant is woken up and the selection control is displayed.
对于一些实施方式,电子设备可以包括屏幕以及摄像头,所述摄像头与屏幕设置于同一侧。一种示例性的,请继续参与图2,图2示出的电子设备200中,包括有第一屏幕2021以及摄像头204,该摄像头204和第一屏幕2021设置于同一侧。For some embodiments, the electronic device may include a screen and a camera, and the camera and the screen are arranged on the same side. For an exemplary embodiment, please continue to refer to FIG. 2 , in which the electronic device 200 shown in FIG. 2 includes a first screen 2021 and a camera 204, and the camera 204 and the first screen 2021 are arranged on the same side.
又通过前述实施例中的介绍可知,在一些情况下,语音助手可以通过摄像头获取电子设备的屏幕前方区域的待检测图像,进而根据待检测图像中是否包括人像,实现对多媒体文件的播放或暂停。因此,可以通过判断与摄像头设置于同一侧的屏幕的角度特征信息是否满足目标条件,来判断是否唤醒语音助手。其中,该语音助手可以用于输出前述实施例中所述的第一语音信息、第二语音信息或第一文本信息等。It can be seen from the introduction in the aforementioned embodiments that in some cases, the voice assistant can obtain the image to be detected in the front area of the screen of the electronic device through the camera, and then play or pause the multimedia file according to whether the image to be detected includes a portrait. Therefore, it is possible to determine whether to wake up the voice assistant by judging whether the angle feature information of the screen on the same side as the camera meets the target conditions. Among them, the voice assistant can be used to output the first voice information, the second voice information or the first text information described in the aforementioned embodiments.
在一些实施例中,屏幕对应的角度特征信息,可以为该屏幕朝向的方向与地平线方向的夹角,不难理解的是,该夹角的范围一般为0度至90度范围。一种示例性的,目标条件可以为0度至60度,例如,若所述电子设备的屏幕对应的角度特征信息为45度,则满足目标条件,此时可以唤醒语音助手并显示选择控件。其中,选择控件可以显示在电子设备的屏幕,用户可以基于该选择控件选择电子设备的工作模式,具体的,可以参阅前述实施例中图4的相关介绍,此处就不再赘述。In some embodiments, the angle characteristic information corresponding to the screen may be the angle between the direction in which the screen is facing and the direction of the horizon. It is not difficult to understand that the angle generally ranges from 0 to 90 degrees. In an exemplary embodiment, the target condition may be 0 to 60 degrees. For example, if the angle characteristic information corresponding to the screen of the electronic device is 45 degrees, the target condition is met, and the voice assistant may be awakened and the selection control may be displayed. Among them, the selection control may be displayed on the screen of the electronic device, and the user may select the working mode of the electronic device based on the selection control. For details, please refer to the relevant description of FIG. 4 in the aforementioned embodiment, which will not be repeated here.
对于另一些实施方式,屏幕对应的角度特征信息,也可以与屏幕朝向方向垂直的方向,从而可以基于该角度特征信息设置目标条件,和前述目标条件类似,此处不再赘述。For some other implementations, the angle characteristic information corresponding to the screen may also be in a direction perpendicular to the screen orientation direction, so that target conditions may be set based on the angle characteristic information, which is similar to the aforementioned target conditions and will not be described in detail here.
对于一些实施方式,请参阅图13,图13示出了步骤S620的一种实施方式图,具体包括步骤S621和步骤S622。 For some implementations, please refer to FIG. 13 , which shows an implementation diagram of step S620 , specifically including step S621 and step S622 .
步骤S621:若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件。Step S621: If the angle feature information corresponding to the screen of the electronic device meets the target condition, the voice assistant is woken up and the selection control is displayed.
步骤S622:显示第二文本信息,并播放第三语音提示信息,其中,所述第二文本信息用于表征所述语音助手被唤醒,所述第三语音提示信息用于提示所述语音助手被唤醒。Step S622: Display a second text message and play a third voice prompt message, wherein the second text message is used to indicate that the voice assistant is awakened, and the third voice prompt message is used to prompt that the voice assistant is awakened.
进一步的,在电子设备唤醒语音助手后,电子设备还可以显示第二文本信息,例如,可以通过电子设备的屏幕显示第二文本信息。其中,该第二文本信息可以用于表征所述语音助手被唤醒,一种示例性的,该第二文本信息可以为“语音助手已唤醒”。Furthermore, after the electronic device wakes up the voice assistant, the electronic device may also display a second text message, for example, the second text message may be displayed on the screen of the electronic device. The second text message may be used to indicate that the voice assistant is awakened. For example, the second text message may be "the voice assistant has been awakened".
可选的,在电子设备唤醒语音助手后,还可以播放第三语音提示信息,其中,第三语音提示信息用于提示所述语音助手被唤醒。Optionally, after the electronic device wakes up the voice assistant, a third voice prompt message may also be played, wherein the third voice prompt message is used to prompt that the voice assistant is woken up.
容易理解的是,可以在电子设备唤醒语音助手后,既显示第二文本信息,同时也播放第三语音提示信息。还可以仅显示第二文本信息,又可以仅播放第三语音提示信息。It is easy to understand that after the electronic device wakes up the voice assistant, the second text message can be displayed and the third voice prompt message can be played at the same time. It is also possible to only display the second text message and only play the third voice prompt message.
步骤S630:获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。Step S630: Acquire the first mode or the second mode selected by the user based on the selection control as the working mode of the electronic device.
进一步的,用户可以基于选择控件选择第一工作模式或第二工作模式,从而可以将用户选择的工作模式,作为电子设备的工作模式。Furthermore, the user can select the first working mode or the second working mode based on the selection control, so that the working mode selected by the user can be used as the working mode of the electronic device.
步骤S640:若所述电子设备的屏幕对应的角度特征信息不再满足目标条件,则关闭语音助手。Step S640: If the angle feature information corresponding to the screen of the electronic device no longer meets the target condition, the voice assistant is turned off.
对于一些实施方式,若所述电子设备的屏幕对应的角度特征信息不再满足目标条件,此时可以关闭语音助手。For some implementations, if the angle feature information corresponding to the screen of the electronic device no longer meets the target condition, the voice assistant can be turned off.
一种示例性的,目标条件若为0度至60度,若电子设备的屏幕对应的角度特征信息从45度变为90度,则此时所述电子设备的屏幕对应的角度特征信息不再满足目标条件,此时可以关闭语音助手。For example, if the target condition is 0 degrees to 60 degrees, if the angle characteristic information corresponding to the screen of the electronic device changes from 45 degrees to 90 degrees, then the angle characteristic information corresponding to the screen of the electronic device no longer meets the target condition, and the voice assistant can be turned off at this time.
步骤S650:若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值。Step S650: If the working mode of the electronic device is the first mode, then based on the first condition, adjusting the volume value of the electronic device playing the multimedia file.
步骤S660:若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。Step S660: If the working mode of the electronic device is the second mode, the playing or pausing of the multimedia file is controlled based on the second condition.
其中,步骤S650和步骤S660在前述实施例中已经详细介绍,此处就不再赘述。Among them, step S650 and step S660 have been introduced in detail in the above embodiments and will not be repeated here.
步骤S670:若所述摄像头被开启,在指定位置以指定方式显示图形,所述指定方式显示的图形用于表征所述摄像头被开启,所述指定位置基于所述摄像头的位置确定。Step S670: If the camera is turned on, a graphic is displayed at a specified position in a specified manner, and the graphic displayed in the specified manner is used to represent that the camera is turned on. The specified position is determined based on the position of the camera.
在一些实施方式中,电子设备的摄像头若被开启,还可以通过电子设备的屏幕以指定方式显示图形,从而对用户进行提示。可选的,电子设备的摄像头可以在语音助手被唤醒时开启,也可以在用于获取待检测图像时开启,还可以在其他任何需要的时候开启,本申请实施例不做限定。In some embodiments, if the camera of the electronic device is turned on, a graphic can be displayed in a specified manner on the screen of the electronic device to prompt the user. Optionally, the camera of the electronic device can be turned on when the voice assistant is awakened, when it is used to obtain an image to be detected, or at any other time as needed, which is not limited in the embodiments of the present application.
其中,以指定方式显示的图形用于表征所述摄像头被开启。具体的,图形可以在电子设备的屏幕中的指定位置进行显示。可选的,该指定位置可以基于摄像头的位置确定。例如,指定位置可以为屏幕中与摄像头相近的位置;指定位置也可以为屏幕中与摄像头相距一定距离的位置。The graphic displayed in a specified manner is used to indicate that the camera is turned on. Specifically, the graphic can be displayed at a specified position on the screen of the electronic device. Optionally, the specified position can be determined based on the position of the camera. For example, the specified position can be a position on the screen close to the camera; the specified position can also be a position on the screen at a certain distance from the camera.
进一步的,该图形可以为和摄像头的形状类似的圆环形,也可以为矩形等。Furthermore, the graphic may be a circular ring similar to the shape of the camera, or a rectangular shape, etc.
一种示例性的,请参阅图14,图14示出了一种图形205,该图形205位于电子设备200的第一屏幕2021,该电子设备200还包括有摄像头204,该摄像头204设置于第一屏幕2021。其中,该图形205为一圆环。则当摄像头204被开启时,第一屏幕2021可以显示图形205,从而可以提示用户摄像头204被开启。For example, please refer to FIG. 14, which shows a graphic 205, which is located on the first screen 2021 of the electronic device 200. The electronic device 200 also includes a camera 204, which is disposed on the first screen 2021. The graphic 205 is a ring. When the camera 204 is turned on, the first screen 2021 can display the graphic 205, thereby prompting the user that the camera 204 is turned on.
进一步的,还可以以指定方式显示图形,该指定方式可以包括以不同的颜色显示图形。例如,图形可以为粉色、红色、紫色、黄色等颜色。指定方式还可以包括以一定间隔闪烁显示,例如,可以以1s的间隔,闪烁显示图形。该指定方式还可以包括以动态的方式显示图形,例如,可以在显示图形的同时,对图形进行旋转。Furthermore, the graphics may be displayed in a specified manner, and the specified manner may include displaying the graphics in different colors. For example, the graphics may be pink, red, purple, yellow, etc. The specified manner may also include flashing the graphics at a certain interval, for example, the graphics may be flashed at intervals of 1 second. The specified manner may also include displaying the graphics in a dynamic manner, for example, the graphics may be rotated while being displayed.
可选的,对于还一些实施方式,指定方式还可以包括进度条形式。此时,可以以进度条的形式显示图形,则可以通过该进度条形式的图形,表征摄像头的状态。例如,当电子设备控制摄像头开启时,则通过屏幕显示该进度条式的图形,此时该进度条可以处于起始状态;当摄像头已经开启后,该进度条可以处于终止状态。其中,进度条处于启示状态,可以表征摄像头准备开启,进度条处于终止状态表征摄像头已经开启。Optionally, for some embodiments, the specified method may also include a progress bar. In this case, a graphic may be displayed in the form of a progress bar, and the state of the camera may be represented by the graphic in the form of a progress bar. For example, when the electronic device controls the camera to turn on, the progress bar graphic is displayed on the screen, and the progress bar may be in a starting state; when the camera is already turned on, the progress bar may be in a terminated state. Among them, the progress bar in the revelation state may represent that the camera is ready to turn on, and the progress bar in the terminated state may represent that the camera is already turned on.
本申请提供的设备控制方法、装置、电子设备及计算机可读介质及产品,该方法播放多媒体文件,在所述电子设备的屏幕对应的角度特征信息满足目标条件时,则唤醒语音助手并显示选择控件,进而获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式;在所 述电子设备的屏幕对应的角度特征信息不再满足目标条件时,则关闭语音助手;若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停;若所述摄像头被开启,在指定位置以指定方式显示图形。因此本申请实施例在播放多媒体文件时,可以通过电子设备的屏幕对应的角度特征信息来判断是否唤醒语音助手,在语音助手被唤醒时,可以基于不同条件调整播放多媒体文件的音量值或控制多媒体文件播放以及暂停,而不需要用户介入,降低了用户的操作负担,增加了使用便捷性。再者,本申请实施例还可以在摄像头被开启时,通过屏幕以指定方式显示图形的方式,提示用户摄像头被开启。The device control method, apparatus, electronic device, computer-readable medium and product provided by the present application play a multimedia file, and when the angle feature information corresponding to the screen of the electronic device meets the target condition, the voice assistant is awakened and the selection control is displayed, so as to obtain the first mode or the second mode selected by the user based on the selection control as the working mode of the electronic device; When the angle characteristic information corresponding to the screen of the electronic device no longer meets the target condition, the voice assistant is turned off; if the working mode of the electronic device is the first mode, based on the first condition, the volume value of the multimedia file played by the electronic device is adjusted; if the working mode of the electronic device is the second mode, based on the second condition, the playback or pause of the multimedia file is controlled; if the camera is turned on, a graphic is displayed in a specified manner at a specified position. Therefore, when playing multimedia files, the embodiment of the present application can determine whether to wake up the voice assistant by the angle characteristic information corresponding to the screen of the electronic device. When the voice assistant is awakened, the volume value of the multimedia file played can be adjusted or the multimedia file playback and pause can be controlled based on different conditions without user intervention, which reduces the user's operating burden and increases the convenience of use. Furthermore, the embodiment of the present application can also prompt the user that the camera is turned on by displaying a graphic on the screen in a specified manner when the camera is turned on.
请参阅图15,其示出了本申请实施例提供的一种设备控制装置1500的结构框图,包括:播放单元1510、第一控制单元1520以及第二控制单元1530。Please refer to FIG. 15 , which shows a structural block diagram of a device control apparatus 1500 provided in an embodiment of the present application, including: a playback unit 1510 , a first control unit 1520 , and a second control unit 1530 .
播放单元1510,用于播放多媒体文件。The playing unit 1510 is used to play multimedia files.
进一步的,播放单元1510还可以用于播放多媒体文件;若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。Furthermore, the playback unit 1510 can also be used to play multimedia files; if the angle feature information corresponding to the screen of the electronic device meets the target conditions, the voice assistant is woken up and the selection control is displayed; and the first mode or the second mode selected by the user based on the selection control is obtained as the working mode of the electronic device.
进一步的,播放单元1510还可以用于若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;显示第二文本信息,并播放第三语音提示信息,其中,所述第二文本信息用于表征所述语音助手被唤醒,所述第三语音提示信息用于提示所述语音助手被唤醒。Furthermore, the playback unit 1510 can also be used to wake up the voice assistant and display the selection control if the angle feature information corresponding to the screen of the electronic device meets the target conditions; display the second text information and play the third voice prompt information, wherein the second text information is used to indicate that the voice assistant is awakened, and the third voice prompt information is used to prompt that the voice assistant is awakened.
进一步的,播放单元1510还可以用于若所述电子设备的屏幕对应的角度特征信息不再满足目标条件,则关闭语音助手。Furthermore, the playback unit 1510 can also be used to turn off the voice assistant if the angle feature information corresponding to the screen of the electronic device no longer meets the target condition.
进一步的,播放单元1510还可以用于若所述摄像头被唤醒,显示第三文本信息,所述第三文本信息用于表征所述摄像头被唤醒。Furthermore, the playback unit 1510 may also be configured to display a third text message if the camera is awakened, wherein the third text message is used to indicate that the camera is awakened.
第一控制单元1520,用于若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值。The first control unit 1520 is configured to adjust the volume value of the electronic device playing the multimedia file based on a first condition if the working mode of the electronic device is the first mode.
进一步的,第一控制单元1520还可以用于若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值。。Furthermore, the first control unit 1520 may also be configured to adjust the volume value according to the distance between the electronic device and the user if the working mode of the electronic device is the first mode.
进一步的,第一控制单元1520还可以用于若所述电子设备的工作模式为第一模式,且所述距离小于距离阈值,则根据所述距离调整所述音量值,所述距离与所述音量值正相关;若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件。Furthermore, the first control unit 1520 can also be used to adjust the volume value according to the distance if the working mode of the electronic device is the first mode and the distance is less than a distance threshold, and the distance is positively correlated with the volume value; if the distance is greater than or equal to the distance threshold, pause playing the multimedia file.
进一步的,第一控制单元1520还可以用于若所述距离大于或等于所述距离阈值,输出第一语音提示信息,并暂停播放所述多媒体文件,其中,所述第一语音提示信息用于提示所述多媒体文件被暂停播放。Furthermore, the first control unit 1520 can also be used to output a first voice prompt message and pause playing the multimedia file if the distance is greater than or equal to the distance threshold, wherein the first voice prompt message is used to prompt that the multimedia file is paused.
进一步的,第一控制单元1520还可以用于若所述工作模式为第一模式且所述电子设备与用户之间的距离发生变化,则调整所述音量值,其中,所述电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关。Furthermore, the first control unit 1520 can also be used to adjust the volume value if the working mode is the first mode and the distance between the electronic device and the user changes, wherein the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value.
进一步的,第一控制单元1520还可以用于若获取到用户的指定操作,则撤销对所述音量值的调整。Furthermore, the first control unit 1520 may also be configured to cancel the adjustment of the volume value if a specified operation of the user is obtained.
进一步的,第一控制单元1520还可以用于若所述工作模式为第一模式,则根据所述电子设备周围环境音的音量调整所述音量值。其中,周围环境音的音量变化幅度与所述电子设备播放多媒体文件的音量值的变化幅度正相关。Furthermore, the first control unit 1520 can also be used to adjust the volume value according to the volume of the ambient sound of the electronic device if the working mode is the first mode, wherein the volume change amplitude of the ambient sound is positively correlated with the volume value change amplitude of the multimedia file played by the electronic device.
第二控制单元1530,用于若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。The second control unit 1530 is configured to control the playing or pausing of the multimedia file based on a second condition if the working mode of the electronic device is the second mode.
进一步的,第二控制单元1530还可以用于若所述工作模式为第二模式且检测到用户的人像,则保持所述多媒体文件处于播放状态;若所述工作模式为第二模式且未检测到用户的人像,则暂停所述多媒体文件的播放。进一步的,第二控制单元1530还可以用于若所述工作模式为第二模式且检测到用户的人像,则基于对所述电子设备在所述多媒体文件处于播放状态下的控制操作,生成对应的第一文本信息,并显示所述第一文本信息。Further, the second control unit 1530 may also be used to keep the multimedia file in the playing state if the working mode is the second mode and the user's portrait is detected; if the working mode is the second mode and the user's portrait is not detected, pause the playing of the multimedia file. Further, the second control unit 1530 may also be used to generate corresponding first text information based on the control operation of the electronic device when the multimedia file is in the playing state, and display the first text information if the working mode is the second mode and the user's portrait is detected.
进一步的,第二控制单元1530还可以用于若所述工作模式为第二模式且未检测到用户的人像,则输出第二语音提示信息,其中,所述第二语音提示信息用于提示所述多媒体文件将被暂停播放;若未检测到指定语音信息,则暂停所述多媒体文件的播放,其中,所述指定语音信息用于指示取消暂停所述多媒体文件的播放。Furthermore, the second control unit 1530 can also be used to output a second voice prompt message if the working mode is the second mode and the user's portrait is not detected, wherein the second voice prompt message is used to prompt that the multimedia file will be paused; if the specified voice information is not detected, the playback of the multimedia file is paused, wherein the specified voice information is used to indicate the cancellation of the pause of the playback of the multimedia file.
进一步的,第二控制单元1530还可以用于获取所述电子设备的屏幕前方区域的待检测图像;若 所述待检测图像包括人像,控制所述多媒体文件继续播放。Furthermore, the second control unit 1530 can also be used to obtain the image to be detected in the area in front of the screen of the electronic device; The image to be detected includes a portrait, and the multimedia file is controlled to continue playing.
进一步的,第二控制单元1530还可以用于在所述电子设备播放音频且通过屏幕播放画面的情况下,在所述屏幕上显示选择控件;获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。Furthermore, the second control unit 1530 can also be used to display a selection control on the screen when the electronic device plays audio and plays pictures through the screen; and obtain the first mode or the second mode selected by the user based on the selection control as the working mode of the electronic device.
属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
在本申请所提供的几个实施例中,单元相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in the present application, the coupling between the units may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application 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.
请参阅图16,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备1600可以是智能手机、平板电脑等能够运行计算机程序的电子设备。本申请中的电子设备1600可以包括一个或多个如下部件:处理器1610以及存储器1620,以及一个或多个应用程序,其中处理器1610电连接于存储器1610,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to Figure 16, which shows a block diagram of an electronic device provided in an embodiment of the present application. The electronic device 1600 can be an electronic device such as a smart phone, a tablet computer, etc. that can run a computer program. The electronic device 1600 in the present application may include one or more of the following components: a processor 1610 and a memory 1620, and one or more application programs, wherein the processor 1610 is electrically connected to the memory 1620, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.
处理器1610可以包括一个或者多个处理核。处理器1610利用各种接口和线路连接整个电子设备1600内的各个部分,通过运行或执行存储在存储器1620内的指令、程序、代码集或指令集,以及调用存储在存储器1620内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器1610可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器160可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和计算机程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1610中,单独通过一块通信芯片进行实现。具体可以通过一个或多个处理器1610执行如前述实施例所描述的方法。The processor 1610 may include one or more processing cores. The processor 1610 uses various interfaces and lines to connect various parts of the entire electronic device 1600, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1620, and calling data stored in the memory 1620. Optionally, the processor 1610 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 160 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1610, but may be implemented separately through a communication chip. Specifically, the method described in the above embodiments may be executed by one or more processors 1610 .
对于一些实施方式,存储器1620可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器1620可用于存储指令、程序、代码、代码集或指令集。存储器1620可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备1600在使用中所创建的数据等。For some embodiments, the memory 1620 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1620 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 1600 during use, etc.
请参考图17,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1700中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to Figure 17, which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1700 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
计算机可读存储介质1700可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1700包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1700具有执行上述方法中的任何方法步骤的程序代码1710的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1710可以例如以适当形式进行压缩。The computer-readable storage medium 1700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 1700 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1700 has storage space for program code 1710 for executing any method steps in the above method. These program codes may be read from or written to one or more computer program products. The program code 1710 may be compressed, for example, in a suitable form.
请参考图18,其示出了本申请实施例提供的一种计算机程序产品的结构框图1800。该计算机程序产品1800中包括计算机程序/指令1810,该计算机程序/指令1810被处理器执行时实现上述方法的步骤。Please refer to Fig. 18, which shows a structural block diagram 1800 of a computer program product provided by an embodiment of the present application. The computer program product 1800 includes a computer program/instruction 1810, and the computer program/instruction 1810 implements the steps of the above method when executed by a processor.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种设备控制方法,其中,应用于电子设备,所述方法包括:A device control method, wherein the method is applied to an electronic device, the method comprising:
    播放多媒体文件;Play multimedia files;
    若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;If the working mode of the electronic device is the first mode, adjusting the volume value of the electronic device playing the multimedia file based on the first condition;
    若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。If the working mode of the electronic device is the second mode, the playing or pausing of the multimedia file is controlled based on the second condition.
  2. 根据权利要求1所述的方法,其中,所述若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值,包括:The method according to claim 1, wherein if the working mode of the electronic device is the first mode, adjusting the volume value of the electronic device playing the multimedia file based on the first condition comprises:
    若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值。If the working mode of the electronic device is the first mode, the volume value is adjusted according to the distance between the electronic device and the user.
  3. 根据权利要求2所述的方法,其中,所述若所述电子设备的工作模式为第一模式,则根据所述电子设备与用户之间的距离调整所述音量值,包括:The method according to claim 2, wherein if the working mode of the electronic device is the first mode, adjusting the volume value according to the distance between the electronic device and the user comprises:
    若所述电子设备的工作模式为第一模式,且所述距离小于距离阈值,则根据所述距离调整所述音量值,所述距离与所述音量值正相关;If the working mode of the electronic device is the first mode and the distance is less than a distance threshold, adjusting the volume value according to the distance, and the distance is positively correlated with the volume value;
    若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件。If the distance is greater than or equal to the distance threshold, the playing of the multimedia file is paused.
  4. 根据权利要求3所述的方法,其中,所述若所述距离大于或等于所述距离阈值,则暂停播放所述多媒体文件,包括:The method according to claim 3, wherein if the distance is greater than or equal to the distance threshold, pausing the playing of the multimedia file comprises:
    若所述距离大于或等于所述距离阈值,输出第一语音提示信息,并暂停播放所述多媒体文件,其中,所述第一语音提示信息用于提示所述多媒体文件被暂停播放。If the distance is greater than or equal to the distance threshold, a first voice prompt message is output and the playing of the multimedia file is paused, wherein the first voice prompt message is used to prompt that the playing of the multimedia file is paused.
  5. 根据权利要求1所述的方法,其中,若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值:The method according to claim 1, wherein if the working mode of the electronic device is the first mode, adjusting the volume value of the electronic device playing the multimedia file based on the first condition:
    若所述工作模式为第一模式且所述电子设备与用户之间的距离发生变化,则调整所述音量值,其中,所述电子设备与所述用户之间的距离的变化幅度与所述音量值的调整幅度正相关。If the working mode is the first mode and the distance between the electronic device and the user changes, the volume value is adjusted, wherein the change amplitude of the distance between the electronic device and the user is positively correlated with the adjustment amplitude of the volume value.
  6. 根据权利要求2或3或5所述的方法,其中,所述方法还包括:The method according to claim 2, 3 or 5, wherein the method further comprises:
    若获取到用户的指定操作,则撤销对所述音量值的调整。If the user's designated operation is obtained, the adjustment of the volume value is canceled.
  7. 根据权利要求1所述的方法,其中,所述若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值,包括:The method according to claim 1, wherein if the working mode of the electronic device is the first mode, adjusting the volume value of the electronic device playing the multimedia file based on the first condition comprises:
    若所述工作模式为第一模式,则根据所述电子设备周围环境音的音量调整所述音量值。If the working mode is the first mode, the volume value is adjusted according to the volume of the ambient sound around the electronic device.
  8. 根据权利要求7所述的方法,其中,周围环境音的音量变化幅度与所述电子设备播放多媒体文件的音量值的变化幅度正相关。The method according to claim 7, wherein the amplitude of the volume change of the ambient sound is positively correlated with the amplitude of the volume value of the multimedia file played by the electronic device.
  9. 根据权利要求1所述的方法,其中,所述若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停,包括:The method according to claim 1, wherein if the working mode of the electronic device is the second mode, controlling the playing or pausing of the multimedia file based on the second condition comprises:
    若所述工作模式为第二模式且检测到用户的人像,则保持所述多媒体文件处于播放状态;If the working mode is the second mode and a user's portrait is detected, keeping the multimedia file in a playing state;
    若所述工作模式为第二模式且未检测到用户的人像,则暂停所述多媒体文件的播放。If the working mode is the second mode and the user's portrait is not detected, the playing of the multimedia file is paused.
  10. 根据权利要求9所述的方法,其中,还包括:The method according to claim 9, further comprising:
    若所述工作模式为第二模式且检测到用户的人像,则基于对所述电子设备在所述多媒体文件处于播放状态下的控制操作,生成对应的第一文本信息,并显示所述第一文本信息。If the working mode is the second mode and a user's portrait is detected, corresponding first text information is generated based on a control operation on the electronic device when the multimedia file is in a playing state, and the first text information is displayed.
  11. 根据权利要求9所述的方法,其中,若所述工作模式为第二模式且未检测到用户的人像,暂停所述多媒体文件的播放,包括:The method according to claim 9, wherein if the working mode is the second mode and the user's portrait is not detected, pausing the playing of the multimedia file comprises:
    若所述工作模式为第二模式且未检测到用户的人像,则输出第二语音提示信息,其中,所述第二语音提示信息用于提示所述多媒体文件将被暂停播放;If the working mode is the second mode and the user's portrait is not detected, outputting a second voice prompt message, wherein the second voice prompt message is used to prompt that the multimedia file will be paused;
    若未检测到指定语音信息,则暂停所述多媒体文件的播放,其中,所述指定语音信息用于指示取消暂停所述多媒体文件的播放。If the designated voice information is not detected, the playing of the multimedia file is paused, wherein the designated voice information is used to instruct to cancel the pause of the playing of the multimedia file.
  12. 根据权利要求9所述的方法,其中,所述若所述工作模式为第二模式且未检测到用户的人像,暂停所述多媒体文件的播放之后,还包括:The method according to claim 9, wherein if the working mode is the second mode and the user's portrait is not detected, after pausing the playing of the multimedia file, the method further comprises:
    获取所述电子设备的屏幕前方区域的待检测图像;Acquire an image to be detected in the area in front of the screen of the electronic device;
    若所述待检测图像包括人像,控制所述多媒体文件继续播放。If the image to be detected includes a portrait, the multimedia file is controlled to continue playing.
  13. 根据权利要求1-12任一项所述的方法,其中,所述电子设备包括屏幕以及摄像头,所述摄像头与屏幕设置于同一侧,所述播放多媒体文件,包括:The method according to any one of claims 1 to 12, wherein the electronic device comprises a screen and a camera, the camera and the screen are arranged on the same side, and the playing of the multimedia file comprises:
    播放多媒体文件; Play multimedia files;
    若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;If the angle feature information corresponding to the screen of the electronic device meets the target condition, waking up the voice assistant and displaying the selection control;
    获取用户基于所述选择控件选中的第一模式或第二模式,作为所述电子设备的工作模式。The first mode or the second mode selected by the user based on the selection control is obtained as the working mode of the electronic device.
  14. 根据权利要求13所述的方法,其中,所述若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件,包括:The method according to claim 13, wherein if the angle feature information corresponding to the screen of the electronic device meets the target condition, waking up the voice assistant and displaying the selection control comprises:
    若所述电子设备的屏幕对应的角度特征信息满足目标条件,则唤醒语音助手并显示选择控件;If the angle feature information corresponding to the screen of the electronic device meets the target condition, waking up the voice assistant and displaying the selection control;
    显示第二文本信息,并播放第三语音提示信息,其中,所述第二文本信息用于表征所述语音助手被唤醒,所述第三语音提示信息用于提示所述语音助手被唤醒。A second text message is displayed, and a third voice prompt message is played, wherein the second text message is used to indicate that the voice assistant is awakened, and the third voice prompt message is used to prompt that the voice assistant is awakened.
  15. 根据权利要求13所述的方法,其中,所述方法还包括:The method according to claim 13, wherein the method further comprises:
    若所述电子设备的屏幕对应的角度特征信息不再满足目标条件,则关闭语音助手。If the angle feature information corresponding to the screen of the electronic device no longer meets the target condition, the voice assistant is turned off.
  16. 根据权利要求13所述的方法,其中,所述方法还包括:The method according to claim 13, wherein the method further comprises:
    若所述摄像头被开启,在指定位置以指定方式显示图形,所述指定方式显示的图形用于表征所述摄像头被开启,所述指定位置基于所述摄像头的位置确定。If the camera is turned on, a graphic is displayed at a specified position in a specified manner, and the graphic displayed in the specified manner is used to indicate that the camera is turned on. The specified position is determined based on the position of the camera.
  17. 一种设备控制装置,其中,应用于电子设备,所述装置包括:A device control device, wherein the device is applied to an electronic device, and the device comprises:
    播放单元,用于播放多媒体文件;A playback unit, used for playing multimedia files;
    第一控制单元,用于若所述电子设备的工作模式为第一模式,则基于第一条件,调整所述电子设备播放所述多媒体文件的音量值;A first control unit, configured to adjust a volume value of the electronic device playing the multimedia file based on a first condition if the working mode of the electronic device is the first mode;
    第二控制单元,用于若所述电子设备的工作模式为第二模式,则基于第二条件,控制所述多媒体文件的播放或暂停。The second control unit is used to control the playing or pausing of the multimedia file based on a second condition if the working mode of the electronic device is the second mode.
  18. 一种电子设备,其中,包括:一个或多个处理器;An electronic device, comprising: one or more processors;
    存储器;Memory;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-16任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-16.
  19. 一种计算机可读存储介质,其中,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-16任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a program code, and the program code can be called by a processor to execute the method according to any one of claims 1 to 16.
  20. 一种计算机程序产品,包括计算机程序/指令,其中,该计算机程序/指令被处理器执行时实现权利要求1-16任一项所述的方法。 A computer program product, comprising a computer program/instruction, wherein the computer program/instruction, when executed by a processor, implements the method according to any one of claims 1 to 16.
PCT/CN2023/117520 2022-10-10 2023-09-07 Device control method and apparatus, and electronic device, computer-readable medium and product WO2024078215A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211236268.6 2022-10-10
CN202211236268.6A CN117873416A (en) 2022-10-10 2022-10-10 Equipment control method, device, electronic equipment, computer readable medium and product

Publications (1)

Publication Number Publication Date
WO2024078215A1 true WO2024078215A1 (en) 2024-04-18

Family

ID=90579821

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117520 WO2024078215A1 (en) 2022-10-10 2023-09-07 Device control method and apparatus, and electronic device, computer-readable medium and product

Country Status (2)

Country Link
CN (1) CN117873416A (en)
WO (1) WO2024078215A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026647A1 (en) * 2013-07-22 2015-01-22 Lg Electronics Inc. Mobile terminal and control method thereof
CN104934048A (en) * 2015-06-24 2015-09-23 小米科技有限责任公司 Sound effect regulation method and device
CN105224234A (en) * 2015-10-28 2016-01-06 努比亚技术有限公司 Content of text system of selection and mobile terminal
US20160112698A1 (en) * 2014-10-17 2016-04-21 Samsung Electronics Co., Ltd. Method and apparatus for playing video
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
CN107211208A (en) * 2014-12-22 2017-09-26 诺基亚技术有限公司 The audio frequency process selected based on camera
CN108966067A (en) * 2018-06-07 2018-12-07 Oppo广东移动通信有限公司 Control method for playing back and Related product
CN110377213A (en) * 2019-07-12 2019-10-25 Oppo广东移动通信有限公司 Control method, electronic equipment and the computer readable storage medium of electronic equipment
US20210191491A1 (en) * 2016-10-24 2021-06-24 Hewlett-Packard Development Company, L.P. Awakening electronic devices in selected modes of operation
CN115065914A (en) * 2022-06-06 2022-09-16 杭州海康威视数字技术股份有限公司 Volume adjusting method of audio playing device, electronic device and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026647A1 (en) * 2013-07-22 2015-01-22 Lg Electronics Inc. Mobile terminal and control method thereof
US20160112698A1 (en) * 2014-10-17 2016-04-21 Samsung Electronics Co., Ltd. Method and apparatus for playing video
CN107211208A (en) * 2014-12-22 2017-09-26 诺基亚技术有限公司 The audio frequency process selected based on camera
CN104934048A (en) * 2015-06-24 2015-09-23 小米科技有限责任公司 Sound effect regulation method and device
CN105224234A (en) * 2015-10-28 2016-01-06 努比亚技术有限公司 Content of text system of selection and mobile terminal
CN106331371A (en) * 2016-09-14 2017-01-11 维沃移动通信有限公司 Volume adjustment method and mobile terminal
US20210191491A1 (en) * 2016-10-24 2021-06-24 Hewlett-Packard Development Company, L.P. Awakening electronic devices in selected modes of operation
CN108966067A (en) * 2018-06-07 2018-12-07 Oppo广东移动通信有限公司 Control method for playing back and Related product
CN110377213A (en) * 2019-07-12 2019-10-25 Oppo广东移动通信有限公司 Control method, electronic equipment and the computer readable storage medium of electronic equipment
CN115065914A (en) * 2022-06-06 2022-09-16 杭州海康威视数字技术股份有限公司 Volume adjusting method of audio playing device, electronic device and storage medium

Also Published As

Publication number Publication date
CN117873416A (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN111913628B (en) Sharing method and device and electronic equipment
WO2021088514A1 (en) Method for pre-loading content data, and electronic device and storage medium
WO2019149049A1 (en) Service processing method, terminal, server, and related product
CN107509153B (en) Detection method and device of sound playing device, storage medium and terminal
CN109218535B (en) Method and device for intelligently adjusting volume, storage medium and terminal
WO2018045536A1 (en) Sound signal processing method, terminal, and headphones
US20140176665A1 (en) Systems and methods for facilitating multi-user events
TW201532422A (en) Method and device for rendering image and electronic apparatus thereof
CN109062535B (en) Sound production control method and device, electronic device and computer readable medium
WO2020048220A1 (en) Sound effect adjusting method and apparatus, electronic device, and storage medium
CN109460364B (en) Application program detection method and device, storage medium and mobile terminal
CN107743178B (en) Message playing method and mobile terminal
US20170142536A1 (en) Sound apparatus, television receiver, speaker device, audio signal adjustment method, and recording medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
CN112995551A (en) Sound control method and display device
EP3147895A1 (en) Display apparatus and method for controlling display apparatus thereof
CN110597478A (en) Audio output method and electronic equipment
CN110175015B (en) Method and device for controlling volume of terminal equipment and terminal equipment
CN107622234B (en) Method and device for displaying budding face gift
CN107483734B (en) Volume adjusting method and device, terminal equipment and storage medium
WO2024078215A1 (en) Device control method and apparatus, and electronic device, computer-readable medium and product
CN112188362B (en) Playing method, device and computer readable storage medium
EP3886457A1 (en) Information processing device and information processing method
WO2023030292A1 (en) Multimedia file playback method and apparatus
CN113660599B (en) Speaker control method and device, mobile terminal and storage medium