WO2018086619A1 - Method and device for controlling media file - Google Patents

Method and device for controlling media file Download PDF

Info

Publication number
WO2018086619A1
WO2018086619A1 PCT/CN2017/110807 CN2017110807W WO2018086619A1 WO 2018086619 A1 WO2018086619 A1 WO 2018086619A1 CN 2017110807 W CN2017110807 W CN 2017110807W WO 2018086619 A1 WO2018086619 A1 WO 2018086619A1
Authority
WO
WIPO (PCT)
Prior art keywords
media file
right earphones
worn
human body
detecting
Prior art date
Application number
PCT/CN2017/110807
Other languages
French (fr)
Chinese (zh)
Inventor
何文科
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018086619A1 publication Critical patent/WO2018086619A1/en

Links

Images

Classifications

    • 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/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/03Constructional features of telephone transmitters or receivers, e.g. telephone hand-sets
    • 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
    • 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/725Cordless telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/12Circuits for transducers, loudspeakers or microphones for distributing signals to two or more loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present disclosure relates to the field of communications, for example, to a method and apparatus for controlling media files.
  • Intelligent terminals for example, smart phones
  • listening to music using headphones is one of the most used functions of smart terminal users, so it has become an important reason for the power consumption of smart terminals.
  • the present disclosure provides a method and apparatus for controlling a media file to at least solve the problem in the related art that when a user plays a media file, the user forgets to close the media file because other things need to be processed, resulting in unnecessary power consumption of the terminal.
  • the present disclosure provides a method for controlling a media file, including: detecting whether both the left and right earphones are not worn; and if the detection result is YES, suspending playing the media file.
  • the method further includes: when detecting that at least one of the left and right earphones is worn, continuing to play the media file.
  • detecting whether the left and right earphones are not worn includes: detecting a distance between the left and right earphones and the human body; and determining whether the distance between the left and right earphones and the human body are less than a predetermined time in the predetermined time period. In the manner of distance, it is detected whether both the left and right earphones are not worn.
  • detecting whether the left and right earphones are not worn includes: detecting whether the left and right earphones are not received by detecting whether the left and right earphones are not in contact with the human body in the predetermined time period. Wear it.
  • the method further includes: not detecting within a predetermined time period The media file is closed in a case where at least one of the left and right earphones is worn.
  • the present disclosure provides an apparatus for controlling a media file, comprising: a detecting module configured to detect whether both the left and right earphones are not worn; the pause module is configured to pause playing the media file if the detection result is yes.
  • the method further includes: a playing module, configured to continue playing the media file if it is detected that at least one of the left and right earphones is worn.
  • a playing module configured to continue playing the media file if it is detected that at least one of the left and right earphones is worn.
  • the detecting module is configured to detect a distance between the left and right earphones and the human body; and determine whether the distance between the left and right earphones and the human body are less than a predetermined distance within a predetermined time period, and the detecting device Whether the left and right earphones are not worn.
  • the detecting module is configured to detect whether the left and right earphones are not worn by detecting whether the left and right earphones are not in contact with the human body in the predetermined time period.
  • the method further includes: closing the module, configured to close the media file if the at least one of the left and right earphones is not detected to be worn within a predetermined period of time.
  • the present disclosure also provides a storage medium.
  • the storage medium is configured to store program code for performing the step of continuing to play the media file if at least one of the left and right earphones is detected to be worn.
  • the storage medium is further configured to store program code for performing the following steps: detecting whether the left and right earphones are not worn comprises: detecting a distance between the left and right earphones and the human body; by determining a predetermined time period Whether the distance between the left and right earphones and the human body is less than a predetermined distance is detected, and whether the left and right earphones are not worn are detected.
  • the storage medium is further configured to store program code for performing the following steps: the storage medium is further configured to store program code for performing the steps of: detecting whether the left and right earphones are not worn, including: detecting Whether the left and right earphones are not worn in the predetermined period of time, whether the left and right earphones are not in contact with the human body.
  • the storage medium is further configured to store program code for performing the following steps: after pausing the playing of the media file, further comprising: detecting that at least one of the left and right earphones is not detected within a predetermined time period In the case of wearing, the media file is closed.
  • the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, Having the computer perform any of the methods described above.
  • the present disclosure provides a method and apparatus for controlling a media file by detecting whether two headphones are left and right None of them are worn; if the detection result is YES, the media file is paused. Since it is determined whether the user is still using the media file by detecting whether the earphone is worn by the user, thereby controlling the playing and tentative setting of the media file, thereby saving the user from taking off the earphone (forgot to manually pause the media file playing) and the media file continues to play. It is unnecessary to consume power, and to improve the standby time of the terminal to a certain extent, which can solve the problem that the user forgets to close the media file because other things need to be processed when the media file is played in the related art, which causes the terminal to perform unnecessary power consumption.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal for controlling a media file according to an embodiment.
  • FIG. 2 is a flow chart of a method of controlling a media file in an embodiment.
  • FIG 3 is a schematic view of an earphone with a human body sensing module according to an embodiment.
  • FIG. 4 is a schematic diagram of an earphone with a capacitive touch module according to an embodiment.
  • Figure 5 is a flow diagram of controlling media files during music playback in an embodiment.
  • Figure 6 is a block diagram showing the structure of an apparatus for controlling a media file in an embodiment.
  • Figure 7 is a block diagram of a preferred block diagram of an apparatus for controlling a media file in accordance with an embodiment.
  • FIG. 8 is a block diagram 2 showing a preferred structure of an apparatus for controlling a media file according to an embodiment.
  • the mobile phone In the process of playing music on the mobile phone, in the scene where the user wears headphones to listen to music, if the user removes the earplug from the ear and does not pause or close the music to do other things, the mobile phone is always playing the music state. So that the phone is always in a power state.
  • FIG. 1 is a A hardware block diagram of a mobile terminal that controls a method of a media file.
  • mobile terminal 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a Microcontroller Unit (MCU) or a programmable logic device ( A processing device such as a Field-Programmable Gate Array (FPGA), a memory 104 for storing data, and a transmission device 106 for a communication function.
  • MCU Microcontroller Unit
  • FPGA Field-Programmable Gate Array
  • FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method for controlling media files in the embodiment of the present application, and the processor 102 executes by executing software programs and modules stored in the memory 104.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may further include memory remotely located relative to processor 102, which may be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the network described above may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a Network Adapter (NlC) that can be connected to other network devices through the base station to communicate with the Internet.
  • the transmission device 106 can be a radio frequency (RF) module, and the radio frequency module is used to communicate with the Internet wirelessly.
  • NlC Network Adapter
  • RF radio frequency
  • FIG. 2 is a flowchart of a method for controlling a media file according to an embodiment. As shown in FIG. 2, the process includes the following steps:
  • Step 202 Detect whether both the left and right earphones are not worn
  • Step 204 If the detection result is yes, pause playing the media file.
  • the method further includes: when detecting that at least one of the left and right earphones is worn, continuing to play the media file.
  • the user can conveniently use the media file to prevent the user from performing the playback operation when the media file needs to be played.
  • the detection module can be separately added to the two earplugs of the earphone, and each earplug detection module has a variable: Tr (right earplug) and T1 (left earplug).
  • Tr right earplug
  • T1 left earplug
  • variable T may be the distance between the left and right earphones and the human body.
  • detecting whether the left and right earphones are not worn includes: detecting the distance between the left and right earphones and the human body; Whether the distance between the two earphones and the human body is less than a predetermined distance, whether the left and right earphones are not worn. Through the above steps, it is convenient to detect whether the earphone is worn.
  • the detection module added to the earphone may be a human body sensing module.
  • variable T may be whether the left and right earphones are in contact with the human body.
  • detecting whether the left and right earphones are not worn includes: detecting whether the two earphones are not in contact with the human body within a predetermined period of time. In the way, it is detected whether both the left and right earphones are not worn. Through the above steps, it is possible to detect whether the earphone is worn more quickly.
  • the detecting module added to the earphone may be a capacitive touch module.
  • the method further includes: closing the media file if at least one of the left and right earphones is not detected to be worn within the predetermined time period.
  • the above media file may be a music file, and the following description is made in the scene where the user listens to music with headphones.
  • FIG. 5 is a flow chart of controlling a media file during music playback according to an embodiment, as shown in FIG.
  • Step 502 the user wears the earphone, and the earphone may be a wired earphone or a wireless earphone;
  • Step 504 the mobile phone plays music
  • Step 506 when the mobile phone detects that the values of the variables Tr, Tl of the two earphones of the earphone are all "0", and the time exceeds 30 seconds, that is, the user is determined to be in the state of not wearing the headset, and the process proceeds to step 508; the user is in the state of wearing the earphone, the music Continue to play;
  • Step 508 After determining that the user is in a state where the headset is not equipped, the mobile phone music is automatically paused and enters a power saving mode;
  • Step 510 when the mobile phone detects the variables Tr, Tl of the two earphones of the earphone, and the value of any one of the variables is "1", that is, it is determined that the user is in the state of wearing the headset, and the process proceeds to step 504, the user is in the state of not wearing the headset, and the process proceeds to the step. 512;
  • Step 512 the music continues to be in a tentative state
  • the mobile phone in the case that the user wears the earphone, based on the earphone detecting whether the user removes the earphone from the ear during the process of listening to music, if the user detects that the user removes the earphone from the ear without manually suspending the playing, the mobile phone will automatically pause the playing. When the user reinserts the headset into the ear, the phone automatically resumes playing. Through the self-energy detection and control, the automatic control of the mobile phone music is achieved, thereby reducing the power consumption of the mobile phone.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the embodiment of the present application may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) performs various embodiments of the present application Said method.
  • a device for controlling a media file is provided.
  • the device is used to implement the foregoing embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the devices described in the following embodiments are implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • FIG. 6 is a structural block diagram of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 6, the apparatus includes:
  • the detecting module 62 is configured to detect whether both the left and right earphones are not worn;
  • the suspending module 64 is connected to the above detecting module 62, and is set to pause playing the media file if the detection result is YES.
  • FIG. 7 is a block diagram of a preferred structure of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 7, the apparatus includes, in addition to all the modules shown in FIG. 6, the following:
  • the playing module 72 is configured to continue playing the media file if it is detected that at least one of the left and right earphones is worn.
  • the detecting module is configured to detect the distance between the left and right earphones and the human body; and whether the left and right earphones are both less than the predetermined distance by determining whether the distance between the two earphones and the human body in the predetermined time period is less than a predetermined distance Being worn.
  • the detecting module is configured to detect whether the left and right earphones are not worn by detecting whether the left and right earphones are not in contact with the human body within a predetermined period of time.
  • FIG. 8 is a block diagram of a preferred structure of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 8, the apparatus includes: in addition to all the modules shown in FIG. 6 and FIG.
  • the closing module 82 is configured to close the media file if it is not detected that at least one of the left and right earphones is worn within a predetermined period of time.
  • Each of the above modules may be implemented by software or hardware. For the latter, it may be implemented by, but not limited to, the above modules are all located in the same processor; or each of the above modules is in any combination Located in different processors.
  • the embodiment of the present application also provides a storage medium.
  • the storage medium may be configured to store program code set to perform the following steps:
  • the media file is paused.
  • the storage medium is further configured to store program code set to perform the following steps: after the media file is paused, the method further includes:
  • the media file continues to be played.
  • the storage medium is further configured to store program code configured to perform the following steps: detecting whether both the left and right earphones are not worn comprises:
  • the storage medium is further configured to store program code configured to perform the following steps: detecting whether both the left and right earphones are not worn comprises:
  • the storage medium is further configured to store program code set to perform the following steps: after the media file is paused, the method further includes:
  • the media file is closed in a case where at least one of the left and right earphones is not detected to be worn within a predetermined period of time.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs, according to the stored program code in the storage medium, whether the left and right earphones are not worn; and if the detection result is yes, the media file is paused.
  • the processor is executed according to the stored program code in the storage medium: after the media file is paused, the method further includes: detecting that at least one of the left and right earphones is worn In the case of wearing, continue to play the media file.
  • the processor performs, according to the stored program code in the storage medium, detecting whether the left and right earphones are not worn, including: detecting a distance between the left and right earphones and the human body; and determining the predetermined time period Whether the distance between the two left and right earphones and the human body is less than a predetermined distance, whether the left and right earphones are not worn.
  • the processor performs, according to the stored program code in the storage medium, detecting whether both the left and right earphones are not worn, including: detecting whether the two headphones are not in contact with the human body within a predetermined period of time. In the way of contact, it is detected whether both the left and right earphones are not worn.
  • the processor performs, according to the stored program code in the storage medium, after the media file is paused, the method further includes: detecting that at least one of the left and right earphones is not detected within the predetermined time period. In case of wearing, close the media file.
  • Each module or each step of the foregoing embodiments of the present application may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices, optionally They may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by a computing device, and in some instances, illustrated or described in a different order than those illustrated herein.
  • the steps are either made into individual integrated circuit modules, or a plurality of modules or steps are made into a single integrated circuit module.
  • the present disclosure provides a method and an apparatus for controlling a media file, which can solve the problem that the user forgets to close the media file when the user plays the media file because the other things need to be processed, causing the terminal to perform unnecessary power consumption.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Telephone Function (AREA)

Abstract

The present disclosure provides a method and device for controlling a media file. The method comprises: detecting whether neither a left earpiece nor a right earpiece is worn; if none of the left and right earpieces is worn, pausing the playing of the media file.

Description

控制媒体文件的方法及装置Method and device for controlling media files 技术领域Technical field
本公开涉及通信领域,例如涉及一种控制媒体文件的方法及装置。The present disclosure relates to the field of communications, for example, to a method and apparatus for controlling media files.
背景技术Background technique
智能终端(例如,智能手机)非常普及,而使用耳机听音乐也是智能终端用户使用最多的功能之一,所以也成为了智能终端耗电的重要原因。Intelligent terminals (for example, smart phones) are very popular, and listening to music using headphones is one of the most used functions of smart terminal users, so it has become an important reason for the power consumption of smart terminals.
但是,在用户播放媒体文件时,常常因为其他事情需要处理而忘记关闭媒体文件,导致终端不必要的耗电。例如:很多时候用户在听音乐的过程中突然有朋友/同事等过来聊天,或者其他紧急的事情需要处理,用户会拔掉耳中的耳塞后去聊天或者处理紧急的事情,殊不知手机里面的音乐还一直在播放着,导致用户并没有享受音乐而增加了手机的不必要耗电。However, when a user plays a media file, it is often forgotten to close the media file because other things need to be processed, resulting in unnecessary power consumption of the terminal. For example, many times when a user is listening to music, a friend/colleague suddenly comes to chat, or other urgent things need to be dealt with. The user will unplug the earplugs in the ear and go to chat or deal with urgent matters. I don’t know the music inside the phone. It has been playing all the time, causing the user not to enjoy the music and increase the unnecessary power consumption of the mobile phone.
因此,相关技术中用户播放媒体文件时因为其他事情需要处理而忘记关闭媒体文件,导致终端进行不必要的耗电。Therefore, in the related art, when the user plays the media file, the user forgets to close the media file because other things need to be processed, causing the terminal to perform unnecessary power consumption.
发明内容Summary of the invention
本公开提供了一种控制媒体文件的方法及装置,以至少解决相关技术中用户播放媒体文件时因为其他事情需要处理而忘记关闭媒体文件,导致终端进行不必要的耗电的问题。本公开提供了一种控制媒体文件方法,包括:检测左右两只耳机是否均未被佩戴;在检测结果为是的情况下,暂停播放媒体文件。The present disclosure provides a method and apparatus for controlling a media file to at least solve the problem in the related art that when a user plays a media file, the user forgets to close the media file because other things need to be processed, resulting in unnecessary power consumption of the terminal. The present disclosure provides a method for controlling a media file, including: detecting whether both the left and right earphones are not worn; and if the detection result is YES, suspending playing the media file.
可选地,在暂停播放所述媒体文件之后,还包括:检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,继续播放所述媒体文件。Optionally, after the media file is paused, the method further includes: when detecting that at least one of the left and right earphones is worn, continuing to play the media file.
可选地,检测所述左右两只耳机是否均未被佩戴包括:检测所述左右两只耳机与人体的距离;通过判断预定时间段内所述左右两只耳机与人体的距离是否均小于预定距离的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, detecting whether the left and right earphones are not worn includes: detecting a distance between the left and right earphones and the human body; and determining whether the distance between the left and right earphones and the human body are less than a predetermined time in the predetermined time period. In the manner of distance, it is detected whether both the left and right earphones are not worn.
可选地,检测所述左右两只耳机是否均未被佩戴包括:通过检测预定时间段内所述左右两只耳机是否与人体均未接触的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, detecting whether the left and right earphones are not worn includes: detecting whether the left and right earphones are not received by detecting whether the left and right earphones are not in contact with the human body in the predetermined time period. Wear it.
可选地,在暂停播放所述媒体文件之后,还包括:在预定时间段内未检测 到所述左右两只耳机中至少一个耳机被佩戴的情况下,关闭所述媒体文件。Optionally, after the media file is paused, the method further includes: not detecting within a predetermined time period The media file is closed in a case where at least one of the left and right earphones is worn.
本公开提供了一种控制媒体文件的装置,包括:检测模块,设置为检测左右两只耳机是否均未被佩戴;暂停模块,设置为在检测结果为是的情况下,暂停播放媒体文件。The present disclosure provides an apparatus for controlling a media file, comprising: a detecting module configured to detect whether both the left and right earphones are not worn; the pause module is configured to pause playing the media file if the detection result is yes.
可选地,还包括:播放模块,设置为检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,继续播放所述媒体文件。Optionally, the method further includes: a playing module, configured to continue playing the media file if it is detected that at least one of the left and right earphones is worn.
可选地,所述检测模块,是设置为检测所述左右两只耳机与人体的距离;通过判断预定时间段内所述左右两只耳机与人体的距离是否均小于预定距离的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, the detecting module is configured to detect a distance between the left and right earphones and the human body; and determine whether the distance between the left and right earphones and the human body are less than a predetermined distance within a predetermined time period, and the detecting device Whether the left and right earphones are not worn.
可选地,所述检测模块,是设置为通过检测预定时间段内所述左右两只耳机是否与人体均未接触的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, the detecting module is configured to detect whether the left and right earphones are not worn by detecting whether the left and right earphones are not in contact with the human body in the predetermined time period.
可选地,还包括:关闭模块,设置为在预定时间段内未检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,关闭所述媒体文件。Optionally, the method further includes: closing the module, configured to close the media file if the at least one of the left and right earphones is not detected to be worn within a predetermined period of time.
本公开还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,继续播放所述媒体文件。The present disclosure also provides a storage medium. The storage medium is configured to store program code for performing the step of continuing to play the media file if at least one of the left and right earphones is detected to be worn.
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:检测所述左右两只耳机是否均未被佩戴包括:检测所述左右两只耳机与人体的距离;通过判断预定时间段内所述左右两只耳机与人体的距离是否均小于预定距离的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, the storage medium is further configured to store program code for performing the following steps: detecting whether the left and right earphones are not worn comprises: detecting a distance between the left and right earphones and the human body; by determining a predetermined time period Whether the distance between the left and right earphones and the human body is less than a predetermined distance is detected, and whether the left and right earphones are not worn are detected.
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:存储介质还设置为存储用于执行以下步骤的程序代码:检测所述左右两只耳机是否均未被佩戴包括:通过检测预定时间段内所述左右两只耳机是否与人体均未接触的方式,检测所述左右两只耳机是否均未被佩戴。Optionally, the storage medium is further configured to store program code for performing the following steps: the storage medium is further configured to store program code for performing the steps of: detecting whether the left and right earphones are not worn, including: detecting Whether the left and right earphones are not worn in the predetermined period of time, whether the left and right earphones are not in contact with the human body.
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:在暂停播放所述媒体文件之后,还包括:在预定时间段内未检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,关闭所述媒体文件。Optionally, the storage medium is further configured to store program code for performing the following steps: after pausing the playing of the media file, further comprising: detecting that at least one of the left and right earphones is not detected within a predetermined time period In the case of wearing, the media file is closed.
本公开还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种方法。The present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, Having the computer perform any of the methods described above.
本公开提供一种控制媒体文件的方法和装置,通过检测左右两只耳机是否 均未被佩戴;在检测结果为是的情况下,暂停播放媒体文件。由于通过检测耳机是否被用户佩戴来判定用户是否还在使用媒体文件,进而来控制媒体文件的播放和暂定,从而节省用户摘掉耳机(忘记手动暂停媒体文件播放)而媒体文件继续播放导致的不必要耗电,在一定程度上提升终端的待机时间,可以解决相关技术中用户播放媒体文件时因为其他事情需要处理而忘记关闭媒体文件,导致终端进行不必要的耗电的问题。The present disclosure provides a method and apparatus for controlling a media file by detecting whether two headphones are left and right None of them are worn; if the detection result is YES, the media file is paused. Since it is determined whether the user is still using the media file by detecting whether the earphone is worn by the user, thereby controlling the playing and tentative setting of the media file, thereby saving the user from taking off the earphone (forgot to manually pause the media file playing) and the media file continues to play. It is unnecessary to consume power, and to improve the standby time of the terminal to a certain extent, which can solve the problem that the user forgets to close the media file because other things need to be processed when the media file is played in the related art, which causes the terminal to perform unnecessary power consumption.
附图说明DRAWINGS
图1是一实施例的一种控制媒体文件的方法的移动终端的硬件结构框图。FIG. 1 is a block diagram showing the hardware structure of a mobile terminal for controlling a media file according to an embodiment.
图2是一实施例的控制媒体文件的方法的流程图。2 is a flow chart of a method of controlling a media file in an embodiment.
图3是一实施例的装有人体感应模块的耳机示意图。3 is a schematic view of an earphone with a human body sensing module according to an embodiment.
图4是一实施例的装有电容触控模块的耳机示意图。4 is a schematic diagram of an earphone with a capacitive touch module according to an embodiment.
图5是一实施例的音乐播放过程中控制媒体文件的流程图。Figure 5 is a flow diagram of controlling media files during music playback in an embodiment.
图6是一实施例的控制媒体文件的装置的结构框图。Figure 6 is a block diagram showing the structure of an apparatus for controlling a media file in an embodiment.
图7是一实施例的控制媒体文件的装置的优选结构框图一。Figure 7 is a block diagram of a preferred block diagram of an apparatus for controlling a media file in accordance with an embodiment.
图8是一实施例的控制媒体文件的装置的优选结构框图二。FIG. 8 is a block diagram 2 showing a preferred structure of an apparatus for controlling a media file according to an embodiment.
具体实施方式detailed description
本实施例的说明书和权利要求书及附图中的术语“第一”、“第二”等是用于区别类似的对象,而不是用于描述特定的顺序或先后次序。The terms "first", "second" and the like in the description and claims of the present embodiments and the drawings are used to distinguish similar objects, and are not intended to describe a particular order or order.
手机播放音乐的过程中,在用户戴着耳机听音乐的场景下,如果用户因为其他事情影响从耳朵取下耳塞并没有暂停或者关闭音乐而去做他事情,会导致手机一直处于播放音乐的状态,从而使手机一直处于耗电状态。In the process of playing music on the mobile phone, in the scene where the user wears headphones to listen to music, if the user removes the earplug from the ear and does not pause or close the music to do other things, the mobile phone is always playing the music state. So that the phone is always in a power state.
基于此问题,通过在耳机的耳塞中增加检测模块,检测在用户戴耳机听音乐的过程中下取下耳机而忘记暂停音乐或者关闭音乐的状态,自动暂停音乐,从而减少用户没有处于听音乐状态下手机还播放音乐带来的手机持续耗电,进而提升手机的待机时长。Based on this problem, by adding a detection module to the earphone of the earphone, detecting that the user removes the earphone while playing the earphone while listening to music, forgetting to pause the music or turning off the music state, automatically suspending the music, thereby reducing the user not listening to music. The mobile phone that is played by the mobile phone also continues to consume power, thereby increasing the standby time of the mobile phone.
实施例1Example 1
本申请实施例1所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本申请实施例的一种 控制媒体文件的方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器(Microcontroller Unit,MCU)或可编程逻辑器件(Field-Programmable Gate Array,FPGA)等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided by Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or the like. Taking a mobile terminal as an example, FIG. 1 is a A hardware block diagram of a mobile terminal that controls a method of a media file. As shown in FIG. 1, mobile terminal 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a Microcontroller Unit (MCU) or a programmable logic device ( A processing device such as a Field-Programmable Gate Array (FPGA), a memory 104 for storing data, and a transmission device 106 for a communication function. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device. For example, the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
存储器104可用于存储应用软件的软件程序以及模块,如本申请实施例中的控制媒体文件的方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行多种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method for controlling media files in the embodiment of the present application, and the processor 102 executes by executing software programs and modules stored in the memory 104. A variety of functional applications and data processing, that is, to achieve the above method. Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 104 may further include memory remotely located relative to processor 102, which may be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network lnterface Controller,NlC),网络适配器可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,射频模块用于通过无线方式与互联网进行通讯。 Transmission device 106 is for receiving or transmitting data via a network. The network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network Adapter (NlC) that can be connected to other network devices through the base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, and the radio frequency module is used to communicate with the Internet wirelessly.
在本实施例中提供了一种运行于上述移动终端的控制媒体文件的方法,图2是一实施例的控制媒体文件的方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a method for controlling a media file running on the mobile terminal is provided. FIG. 2 is a flowchart of a method for controlling a media file according to an embodiment. As shown in FIG. 2, the process includes the following steps:
步骤202,检测左右两只耳机是否均未被佩戴;Step 202: Detect whether both the left and right earphones are not worn;
步骤204,在检测结果为是的情况下,暂停播放媒体文件。Step 204: If the detection result is yes, pause playing the media file.
通过上述步骤,由于通过检测耳机是否被用户佩戴来判定用户是否还在使用媒体文件,进而来控制媒体文件的播放和暂定,从而节省用户摘掉耳机(忘 记手动暂停媒体文件播放)而媒体文件继续播放导致的不必要耗电,在一定程度上提升终端的待机时间,可以解决相关技术中用户播放媒体文件时因为其他事情需要处理而忘记关闭媒体文件,导致终端进行不必要的耗电的问题。Through the above steps, since it is determined whether the user is still using the media file by detecting whether the earphone is worn by the user, thereby controlling the playing and tentative setting of the media file, thereby saving the user to remove the earphone (forgot Remember to manually pause the media file playback) and the unnecessary power consumption caused by the media file continues to play, to improve the standby time of the terminal to a certain extent, can solve the problem that the user forgets to close the media file because other things need to be processed when playing the media file in the related art. The problem that causes the terminal to perform unnecessary power consumption.
可选地,在暂停播放媒体文件之后,还包括:检测到左右两只耳机中至少一个耳机被佩戴的情况下,继续播放媒体文件。通过上述步骤,可以方便用户使用媒体文件,避免用户在需要播放媒体文件时重行执行播放操作。Optionally, after the media file is paused, the method further includes: when detecting that at least one of the left and right earphones is worn, continuing to play the media file. Through the above steps, the user can conveniently use the media file to prevent the user from performing the playback operation when the media file needs to be played.
可选地,可以针对耳机制定一个状态值:T,T=“0”表示耳机离耳;T=“1”表示耳机入耳。Alternatively, a status value can be set for the headset: T, T = "0" means the headset is off the ear; T = "1" means the headset is in the ear.
例如,可以在耳机的两个耳塞分别增加检测模块,并且每个耳塞检测模块分别有一个变量:Tr(右耳塞),Tl(左耳塞)。根据检测模块反馈Tr和Tl值,当且经当Tr=0同时Tl=0,并且超过30秒(时间可以设定),表示用户处于没有佩戴耳机状态。只要Tr或者Tl中任何一个值不为“0”,都表示用户正处于佩戴耳机状态。For example, the detection module can be separately added to the two earplugs of the earphone, and each earplug detection module has a variable: Tr (right earplug) and T1 (left earplug). According to the detection module feedback Tr and Tl values, if and when Tr = 0 and Tl = 0, and more than 30 seconds (time can be set), indicating that the user is in a state of not wearing headphones. As long as any value of Tr or Tl is not "0", it means that the user is wearing the headset.
可选地,上述变量T可以是左右两只耳机与人体的距离,此时,检测左右两只耳机是否均未被佩戴包括:检测左右两只耳机与人体的距离;通过判断预定时间段内左右两只耳机与人体的距离是否均小于预定距离的方式,检测左右两只耳机是否均未被佩戴。通过上述步骤,可以方便的检测耳机是否被佩戴。Optionally, the variable T may be the distance between the left and right earphones and the human body. At this time, detecting whether the left and right earphones are not worn includes: detecting the distance between the left and right earphones and the human body; Whether the distance between the two earphones and the human body is less than a predetermined distance, whether the left and right earphones are not worn. Through the above steps, it is convenient to detect whether the earphone is worn.
例如,如图3所示,在耳机中增加检测模块可以是人体感应模块,此时,设定人体感应模块对人体感应的距离dis=5cm(该值可以根据需求改变),如果dis小于5cm判定耳机已经入耳,即T=1;如果dis大于5cm判定耳机离耳,即T=0。For example, as shown in FIG. 3, the detection module added to the earphone may be a human body sensing module. At this time, the distance of the human body sensing module to the human body sensing is set to be=5 cm (the value may be changed according to requirements), if the dis is less than 5 cm. The earphone has been in the ear, that is, T=1; if dis is greater than 5cm, the earphone is determined to be away from the ear, that is, T=0.
可选地,上述变量T可以是左右两只耳机是否与人体接触,此时,检测左右两只耳机是否均未被佩戴包括:通过检测预定时间段内左右两只耳机是否与人体均未接触的方式,检测左右两只耳机是否均未被佩戴。通过上述步骤,可以更快速的检测耳机是否被佩戴。Optionally, the variable T may be whether the left and right earphones are in contact with the human body. At this time, detecting whether the left and right earphones are not worn includes: detecting whether the two earphones are not in contact with the human body within a predetermined period of time. In the way, it is detected whether both the left and right earphones are not worn. Through the above steps, it is possible to detect whether the earphone is worn more quickly.
例如,如图4所示,在耳机中增加检测模块可以是电容触控模块,当电容触控模块接触到耳朵皮肤,判定耳机入耳,即T=1;当电容触控模块脱离耳朵皮肤,判定耳机离耳,即T=0。 For example, as shown in FIG. 4, the detecting module added to the earphone may be a capacitive touch module. When the capacitive touch module contacts the ear skin, the earphone is determined to be in the ear, that is, T=1; when the capacitive touch module is separated from the ear skin, the determination is performed. The earphone is off the ear, ie T=0.
可选地,在暂停播放媒体文件之后,还包括:在预定时间段内未检测到左右两只耳机中至少一个耳机被佩戴的情况下,关闭媒体文件。通过上述步骤,可以关闭用户不使用的媒体文件,更大程度的较低必要电量的消耗。Optionally, after the media file is paused, the method further includes: closing the media file if at least one of the left and right earphones is not detected to be worn within the predetermined time period. Through the above steps, it is possible to turn off the media files that the user does not use, and to consume a greater amount of lower necessary power.
上述媒体文件可以是音乐文件,下面以用户戴着耳机听音乐的场景下进行说明。The above media file may be a music file, and the following description is made in the scene where the user listens to music with headphones.
图5是一实施例的音乐播放过程中控制媒体文件的流程图,如图5所示,5 is a flow chart of controlling a media file during music playback according to an embodiment, as shown in FIG.
步骤502,用户佩戴上耳机,耳机可以是有线耳机或者无线耳机; Step 502, the user wears the earphone, and the earphone may be a wired earphone or a wireless earphone;
步骤504,手机播放音乐; Step 504, the mobile phone plays music;
步骤506,当手机检测到耳机两个耳塞的变量Tr、Tl的值均为“0”,并且时间超过30秒,即判定用户处于没有佩戴耳机状态,转达步骤508;用户处于佩戴耳机状态,音乐继续播放; Step 506, when the mobile phone detects that the values of the variables Tr, Tl of the two earphones of the earphone are all "0", and the time exceeds 30 seconds, that is, the user is determined to be in the state of not wearing the headset, and the process proceeds to step 508; the user is in the state of wearing the earphone, the music Continue to play;
步骤508,判定用户处于没有配搭耳机状态后,手机音乐自动暂停,进入省电模式;Step 508: After determining that the user is in a state where the headset is not equipped, the mobile phone music is automatically paused and enters a power saving mode;
步骤510,当手机检测到耳机两个耳塞的变量Tr、Tl,其中任何一个变量的值为“1”,即判定用户处于佩戴耳机状态,转到步骤504,用户处于没有佩戴耳机状态转到步骤512; Step 510, when the mobile phone detects the variables Tr, Tl of the two earphones of the earphone, and the value of any one of the variables is "1", that is, it is determined that the user is in the state of wearing the headset, and the process proceeds to step 504, the user is in the state of not wearing the headset, and the process proceeds to the step. 512;
步骤512;音乐继续处于暂定状态; Step 512; the music continues to be in a tentative state;
从上述实施例可知,在用户佩戴耳机的情况下,基于耳机检测用户是否在听音乐的过程中从耳朵中摘除耳机,如果检测用户从耳朵中摘除耳机时没有手动暂停播放,手机将自动暂停播放,当用户重新将耳机插入耳朵时手机自动继续播放。通过该自能检测和控制达到对手机音乐的自动控制,从而降低手机的耗电。It can be seen from the above embodiment that, in the case that the user wears the earphone, based on the earphone detecting whether the user removes the earphone from the ear during the process of listening to music, if the user detects that the user removes the earphone from the ear without manually suspending the playing, the mobile phone will automatically pause the playing. When the user reinserts the headset into the ear, the phone automatically resumes playing. Through the self-energy detection and control, the automatic control of the mobile phone music is achieved, thereby reducing the power consumption of the mobile phone.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请多个实施例 所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on the understanding, the technical solution of the embodiment of the present application may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) performs various embodiments of the present application Said method.
实施例2Example 2
在本实施例中还提供了一种控制媒体文件的装置,该装置用于实现上述实施例,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a device for controlling a media file is provided. The device is used to implement the foregoing embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments are implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
图6是一实施例的控制媒体文件的装置的结构框图,如图6所示,该装置包括:FIG. 6 is a structural block diagram of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 6, the apparatus includes:
检测模块62,设置为检测左右两只耳机是否均未被佩戴;The detecting module 62 is configured to detect whether both the left and right earphones are not worn;
暂停模块64,连接至上述检测模块62,设置为在检测结果为是的情况下,暂停播放媒体文件。The suspending module 64 is connected to the above detecting module 62, and is set to pause playing the media file if the detection result is YES.
图7是一实施例的控制媒体文件的装置的优选结构框图一,如图7所示,该装置除包括图6所示的所有模块外,还包括:FIG. 7 is a block diagram of a preferred structure of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 7, the apparatus includes, in addition to all the modules shown in FIG. 6, the following:
播放模块72,设置为检测到左右两只耳机中至少一个耳机被佩戴的情况下,继续播放媒体文件。The playing module 72 is configured to continue playing the media file if it is detected that at least one of the left and right earphones is worn.
可选地,检测模块,是设置为检测左右两只耳机与人体的距离;通过判断预定时间段内左右两只耳机与人体的距离是否均小于预定距离的方式,检测左右两只耳机是否均未被佩戴。Optionally, the detecting module is configured to detect the distance between the left and right earphones and the human body; and whether the left and right earphones are both less than the predetermined distance by determining whether the distance between the two earphones and the human body in the predetermined time period is less than a predetermined distance Being worn.
可选地,检测模块,是设置为通过检测预定时间段内左右两只耳机是否与人体均未接触的方式,检测左右两只耳机是否均未被佩戴。Optionally, the detecting module is configured to detect whether the left and right earphones are not worn by detecting whether the left and right earphones are not in contact with the human body within a predetermined period of time.
图8是一实施例的控制媒体文件的装置的优选结构框图二,如图8所示,该装置除包括图6和7所示的所有模块外,还包括:FIG. 8 is a block diagram of a preferred structure of an apparatus for controlling a media file according to an embodiment. As shown in FIG. 8, the apparatus includes: in addition to all the modules shown in FIG. 6 and FIG.
关闭模块82,设置为在预定时间段内未检测到左右两只耳机中至少一个耳机被佩戴的情况下,关闭媒体文件。The closing module 82 is configured to close the media file if it is not detected that at least one of the left and right earphones is worn within a predetermined period of time.
上述每个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述每个模块以任意组合的形式分别位于不同的处理器中。Each of the above modules may be implemented by software or hardware. For the latter, it may be implemented by, but not limited to, the above modules are all located in the same processor; or each of the above modules is in any combination Located in different processors.
实施例3 Example 3
本申请实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储设置为执行以下步骤的程序代码:The embodiment of the present application also provides a storage medium. Optionally, in the embodiment, the storage medium may be configured to store program code set to perform the following steps:
检测左右两只耳机是否均未被佩戴;Detect whether both left and right earphones are not worn;
在检测结果为是的情况下,暂停播放媒体文件。When the detection result is YES, the media file is paused.
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:在暂停播放媒体文件之后,还包括:Optionally, the storage medium is further configured to store program code set to perform the following steps: after the media file is paused, the method further includes:
检测到左右两只耳机中至少一个耳机被佩戴的情况下,继续播放媒体文件。When it is detected that at least one of the left and right earphones is worn, the media file continues to be played.
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:检测左右两只耳机是否均未被佩戴包括:Optionally, the storage medium is further configured to store program code configured to perform the following steps: detecting whether both the left and right earphones are not worn comprises:
检测左右两只耳机与人体的距离;Detecting the distance between the left and right earphones and the human body;
通过判断预定时间段内左右两只耳机与人体的距离是否均小于预定距离的方式,检测左右两只耳机是否均未被佩戴。It is detected whether the left and right earphones are not worn by judging whether the distance between the two earphones and the human body in the predetermined time period is less than a predetermined distance.
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:检测左右两只耳机是否均未被佩戴包括:Optionally, the storage medium is further configured to store program code configured to perform the following steps: detecting whether both the left and right earphones are not worn comprises:
通过检测预定时间段内左右两只耳机是否与人体均未接触的方式,检测左右两只耳机是否均未被佩戴。It is detected whether the left and right earphones are not worn by detecting whether the left and right earphones are not in contact with the human body within a predetermined period of time.
可选地,存储介质还被设置为存储设置为执行以下步骤的程序代码:在暂停播放媒体文件之后,还包括:Optionally, the storage medium is further configured to store program code set to perform the following steps: after the media file is paused, the method further includes:
在预定时间段内未检测到左右两只耳机中至少一个耳机被佩戴的情况下,关闭媒体文件。The media file is closed in a case where at least one of the left and right earphones is not detected to be worn within a predetermined period of time.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等多种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:检测左右两只耳机是否均未被佩戴;在检测结果为是的情况下,暂停播放媒体文件。Optionally, in this embodiment, the processor performs, according to the stored program code in the storage medium, whether the left and right earphones are not worn; and if the detection result is yes, the media file is paused.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:在暂停播放媒体文件之后,还包括:检测到左右两只耳机中至少一个耳机被佩 戴的情况下,继续播放媒体文件。Optionally, in this embodiment, the processor is executed according to the stored program code in the storage medium: after the media file is paused, the method further includes: detecting that at least one of the left and right earphones is worn In the case of wearing, continue to play the media file.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:检测左右两只耳机是否均未被佩戴包括:检测左右两只耳机与人体的距离;通过判断预定时间段内左右两只耳机与人体的距离是否均小于预定距离的方式,检测左右两只耳机是否均未被佩戴。Optionally, in this embodiment, the processor performs, according to the stored program code in the storage medium, detecting whether the left and right earphones are not worn, including: detecting a distance between the left and right earphones and the human body; and determining the predetermined time period Whether the distance between the two left and right earphones and the human body is less than a predetermined distance, whether the left and right earphones are not worn.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:检测左右两只耳机是否均未被佩戴包括:通过检测预定时间段内左右两只耳机是否与人体均未接触的方式,检测左右两只耳机是否均未被佩戴。Optionally, in this embodiment, the processor performs, according to the stored program code in the storage medium, detecting whether both the left and right earphones are not worn, including: detecting whether the two headphones are not in contact with the human body within a predetermined period of time. In the way of contact, it is detected whether both the left and right earphones are not worn.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:在暂停播放媒体文件之后,还包括:在预定时间段内未检测到左右两只耳机中至少一个耳机被佩戴的情况下,关闭媒体文件。Optionally, in this embodiment, the processor performs, according to the stored program code in the storage medium, after the media file is paused, the method further includes: detecting that at least one of the left and right earphones is not detected within the predetermined time period. In case of wearing, close the media file.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
上述的本申请实施例的每个模块或每个步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Each module or each step of the foregoing embodiments of the present application may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices, optionally They may be implemented in program code executable by a computing device, such that they may be stored in a storage device for execution by a computing device, and in some instances, illustrated or described in a different order than those illustrated herein. The steps are either made into individual integrated circuit modules, or a plurality of modules or steps are made into a single integrated circuit module.
工业实用性Industrial applicability
本公开提供一种控制媒体文件的方法及装置,可以解决相关技术中用户播放媒体文件时因为其他事情需要处理而忘记关闭媒体文件,导致终端进行不必要的耗电的问题。 The present disclosure provides a method and an apparatus for controlling a media file, which can solve the problem that the user forgets to close the media file when the user plays the media file because the other things need to be processed, causing the terminal to perform unnecessary power consumption.

Claims (11)

  1. 一种控制媒体文件的方法,包括:A method of controlling media files, including:
    检测左右两只耳机是否均未被佩戴;Detect whether both left and right earphones are not worn;
    在检测结果为是的情况下,暂停播放媒体文件。When the detection result is YES, the media file is paused.
  2. 根据权利要求1所述的方法,其中,在暂停播放媒体文件的步骤之后,还包括:The method of claim 1, wherein after the step of pausing the playing of the media file, the method further comprises:
    检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,继续播放所述媒体文件。When it is detected that at least one of the left and right earphones is worn, the media file is continuously played.
  3. 根据权利要求1或2所述的方法,其中,检测所述左右两只耳机是否均未被佩戴的步骤包括:The method according to claim 1 or 2, wherein the step of detecting whether the left and right earphones are not worn includes:
    检测所述左右两只耳机与人体的距离;Detecting the distance between the left and right earphones and the human body;
    通过判断预定时间段内所述左右两只耳机与人体的距离是否均小于预定距离的方式,检测所述左右两只耳机是否均未被佩戴。It is detected whether the left and right earphones are not worn by determining whether the distance between the left and right earphones and the human body are less than a predetermined distance within a predetermined time period.
  4. 根据权利要求1或2所述的方法,其中,检测所述左右两只耳机是否均未被佩戴的步骤包括:The method according to claim 1 or 2, wherein the step of detecting whether the left and right earphones are not worn includes:
    通过检测预定时间段内所述左右两只耳机是否与人体均未接触的方式,检测所述左右两只耳机是否均未被佩戴。Whether the left and right earphones are not worn is detected by detecting whether the left and right earphones are not in contact with the human body within a predetermined period of time.
  5. 根据权利要求1所述的方法,其中,在暂停播放媒体文件的步骤之后,还包括:The method of claim 1, wherein after the step of pausing the playing of the media file, the method further comprises:
    在预定时间段内未检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,关闭所述媒体文件。The media file is closed in a case where it is not detected that at least one of the left and right earphones is worn within a predetermined period of time.
  6. 一种控制媒体文件的装置,包括:A device for controlling media files, comprising:
    检测模块,设置为检测左右两只耳机是否均未被佩戴;The detecting module is configured to detect whether the left and right earphones are not worn;
    暂停模块,设置为在检测结果为是的情况下,暂停播放媒体文件。Pause the module, set to pause the playback of the media file if the test result is YES.
  7. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    播放模块,设置为检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,继续播放所述媒体文件。The playing module is configured to continue to play the media file if it is detected that at least one of the left and right earphones is worn.
  8. 根据权利要求6或7所述的装置,其中,所述检测模块,是设置为检测所述左右两只耳机与人体的距离;通过判断预定时间段内所述左右两只耳机与人体的距离是否均小于预定距离的方式,检测所述左右两只耳机是否均未被佩戴。The device according to claim 6 or 7, wherein the detecting module is configured to detect the distance between the left and right earphones and the human body; and determine whether the distance between the left and right earphones and the human body in the predetermined time period is Whether the two left and right earphones are not worn are detected in a manner that is less than a predetermined distance.
  9. 根据权利要求6或7所述的装置,其中,所述检测模块,是设置为通过 检测预定时间段内所述左右两只耳机是否与人体均未接触的方式,检测所述左右两只耳机是否均未被佩戴。The apparatus according to claim 6 or 7, wherein said detecting module is arranged to pass Detecting whether the left and right earphones are not in contact with the human body in the predetermined time period, and detecting whether the left and right earphones are not worn.
  10. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    关闭模块,设置为在预定时间段内未检测到所述左右两只耳机中至少一个耳机被佩戴的情况下,关闭所述媒体文件。The module is turned off, and the media file is closed in a case where at least one of the left and right earphones is not detected to be worn within a predetermined period of time.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5任一项的方法。 A computer readable storage medium storing computer executable instructions for performing the method of any of claims 1-5.
PCT/CN2017/110807 2016-11-14 2017-11-14 Method and device for controlling media file WO2018086619A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611024503.8 2016-11-14
CN201611024503.8A CN108076209A (en) 2016-11-14 2016-11-14 Control the method and device of media file

Publications (1)

Publication Number Publication Date
WO2018086619A1 true WO2018086619A1 (en) 2018-05-17

Family

ID=62110236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/110807 WO2018086619A1 (en) 2016-11-14 2017-11-14 Method and device for controlling media file

Country Status (2)

Country Link
CN (1) CN108076209A (en)
WO (1) WO2018086619A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495967A (en) * 2020-03-20 2021-10-12 华为技术有限公司 Multimedia data pushing method, equipment, server and storage medium
CN115278431A (en) * 2022-06-24 2022-11-01 维沃移动通信有限公司 State determination method and device, electronic equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413527B (en) * 2018-09-30 2020-05-19 Oppo广东移动通信有限公司 Audio device control method and device, earphone and electronic device
CN109743652B (en) * 2019-01-09 2020-03-24 屈云波 Headset control method, headset, and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202034054U (en) * 2010-12-07 2011-11-09 盛乐信息技术(上海)有限公司 Audio playing system and earphones
CN105451111A (en) * 2015-12-10 2016-03-30 小米科技有限责任公司 Earphone play control method and apparatus and terminal
CN105657612A (en) * 2015-12-30 2016-06-08 北京奇艺世纪科技有限公司 Audio and video play method and system, headset and mobile terminal
CN105759944A (en) * 2014-12-18 2016-07-13 富泰华工业(深圳)有限公司 System, method and earphones for intelligently controlling playing of music and videos
CN105916074A (en) * 2016-06-21 2016-08-31 维沃移动通信有限公司 Play control method for multimedia and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202034054U (en) * 2010-12-07 2011-11-09 盛乐信息技术(上海)有限公司 Audio playing system and earphones
CN105759944A (en) * 2014-12-18 2016-07-13 富泰华工业(深圳)有限公司 System, method and earphones for intelligently controlling playing of music and videos
CN105451111A (en) * 2015-12-10 2016-03-30 小米科技有限责任公司 Earphone play control method and apparatus and terminal
CN105657612A (en) * 2015-12-30 2016-06-08 北京奇艺世纪科技有限公司 Audio and video play method and system, headset and mobile terminal
CN105916074A (en) * 2016-06-21 2016-08-31 维沃移动通信有限公司 Play control method for multimedia and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495967A (en) * 2020-03-20 2021-10-12 华为技术有限公司 Multimedia data pushing method, equipment, server and storage medium
CN115278431A (en) * 2022-06-24 2022-11-01 维沃移动通信有限公司 State determination method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN108076209A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
WO2018086619A1 (en) Method and device for controlling media file
US10091572B2 (en) BT and BCC communication for wireless earbuds
CN109684249B (en) Host device for facilitating positioning of an accessory using connection attributes of an electronic accessory connection
US20140314247A1 (en) Method for controlling terminal device and the smart terminal device thereof
WO2017215203A1 (en) Signal output method and apparatus
US11234089B2 (en) Microphone hole blockage detection method, microphone hole blockage detection device, and wireless earphone
CN108810749B (en) Player control method, device, terminal equipment and storage medium
CN103974158B (en) Audio output device
WO2015131550A1 (en) Method and apparatus for controlling player to enter sleep mode and terminal device
WO2017181365A1 (en) Earphone channel control method, related apparatus, and system
CN107633853B (en) Control method for playing audio and video files and user terminal
CN104113794A (en) Information processing method, information processing system and headset
CN105430569A (en) Playing method, playing device and terminal
CN106601272A (en) Earphone and speech recognition method thereof
CN110505547B (en) Earphone wearing state detection method and earphone
CN103618514A (en) Volume adjustment method, device and electronic equipment
CN106339198B (en) Method and system for automatically adjusting volume of electronic equipment through environment volume
CN103929692B (en) Audio information processing method and electronic equipment
CN106791191A (en) Play control method and device
US20150288792A1 (en) Bi-level bi-class thermal mitigation technique for single/multi-sim devices
JP2020511055A (en) Application control method and application control device
WO2022233308A1 (en) Wearing detection method, wearable device and storage medium
CN107222629B (en) Incoming call processing method and related product
WO2021128405A1 (en) Tws earphone, method and apparatus for reducing earphone energy consumption, and medium
WO2016054903A1 (en) Terminal audio control method, device, terminal and computer storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17870268

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17870268

Country of ref document: EP

Kind code of ref document: A1