CN113039518B - Playing control method and device, computer readable storage medium and electronic equipment - Google Patents

Playing control method and device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN113039518B
CN113039518B CN201880098660.4A CN201880098660A CN113039518B CN 113039518 B CN113039518 B CN 113039518B CN 201880098660 A CN201880098660 A CN 201880098660A CN 113039518 B CN113039518 B CN 113039518B
Authority
CN
China
Prior art keywords
audio data
pause
playing
data
judging result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880098660.4A
Other languages
Chinese (zh)
Other versions
CN113039518A (en
Inventor
李亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN113039518A publication Critical patent/CN113039518A/en
Application granted granted Critical
Publication of CN113039518B publication Critical patent/CN113039518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/16Sound input; Sound output
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Headphones And Earphones (AREA)
  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

A play control method and device, a computer readable storage medium, and an electronic device, wherein the play control method is applied to the electronic device, and comprises the following steps: monitoring whether audio data is being played in the electronic device (S10); if the electronic equipment has the audio data being played, the connection state of the earphone and the electronic equipment is monitored, and whether the earphone has a pulling-out or breaking-off action is judged (S20); if the earphone has a pull-out or turn-off behavior, acquiring a first processing strategy for the audio data (S30); and controlling the playing of the audio data according to the first processing strategy (S40).

Description

Playing control method and device, computer readable storage medium and electronic equipment
Technical Field
The present application relates to the field of electronic devices, and in particular, to a play control method and apparatus, a computer readable storage medium, and an electronic device.
Background
In modern life, electronic devices have become an integral part of people's daily lives. People often wear headphones when watching video or enjoying music with electronic devices.
When the headphones connected to the electronic device are suddenly pulled out or disconnected, the audio output channel of the electronic device is typically switched to a speaker or earpiece, while the video being watched or the music being enjoyed is still playing, which can have an impact on surrounding people.
Disclosure of Invention
The embodiment of the application provides a play control method and device, a computer readable storage medium and electronic equipment, which can carry out different processing on audio data being played according to different conditions, and have high intelligence and improve user experience.
A play control method applied to an electronic device, the method comprising:
monitoring whether audio data which is being played exist in the electronic equipment;
if the electronic equipment has the audio data which are being played, the connection state of the earphone and the electronic equipment is monitored, and whether the earphone has a pulling-out or breaking-off action is judged;
if the earphone has a pulling-out or breaking-off action, a first processing strategy for the audio data is obtained; a kind of electronic device with high-pressure air-conditioning system
And controlling the playing of the audio data according to the first processing strategy.
A playback control apparatus applied to an electronic device, the apparatus comprising:
the play monitoring module is used for monitoring whether the electronic equipment has audio data which are being played or not;
The first earphone monitoring module is used for monitoring the connection state of the earphone and the electronic equipment when the electronic equipment has the audio data which are being played, and judging whether the earphone has a pulling-out or breaking-off action or not;
the first strategy acquisition module is used for acquiring a first processing strategy for the audio data when the earphone has a pulling-out or breaking-off action; a kind of electronic device with high-pressure air-conditioning system
And the first play control module is used for controlling the play of the audio data according to the first processing strategy.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described play control method.
An electronic device includes a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the above-described playback control method.
According to the playing control method and device, the computer readable storage medium and the electronic equipment, the first processing strategy for the audio data is obtained, and the playing of the audio data is controlled according to the first processing strategy, so that the electronic equipment has the audio data which are being played, and when the earphone has the action of pulling out or breaking, the audio data which are being played can be processed in time according to different scenes and conditions, and the influence of the surrounding environment is prevented. The play control method provided by the application improves the intelligence of the electronic equipment, thereby improving the user experience.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other embodiments of the drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a play control method according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for determining whether to pause playing of the audio data to obtain the first processing policy according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for determining whether to pause playing of the audio data according to first user setting data to obtain a first pause determination result according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for determining whether to pause playing of the audio data according to the first user habit data to obtain a second pause determination result according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for determining whether to pause playing of the audio data according to the first surrounding environment data to obtain a third pause determination result according to an embodiment of the present application;
FIG. 7 is a flowchart of a method for determining whether to pause playing of the audio data to obtain the first processing policy according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a playback control method according to an embodiment of the present application;
FIG. 9 is a flowchart of a method for determining whether to resume playing the audio data to obtain the second processing policy according to an embodiment of the present application;
FIG. 10 is a flowchart of a method for determining whether to resume playing of the audio data according to second user setting data to obtain a first resume determination result according to an embodiment of the present application;
FIG. 11 is a flowchart of a method for determining whether to resume playing of the audio data according to second user habit data according to an embodiment of the present application to obtain a second resume determination result;
fig. 12 is a flowchart of a method for determining whether to resume playing the audio data according to the headphone separation time according to an embodiment of the present application, to obtain a third resume determination result;
FIG. 13 is a flowchart of a method for determining whether to resume playing of the audio data to obtain the second processing policy according to the embodiment of the present application;
fig. 14 is a schematic diagram of a frame of a play control device according to an embodiment of the present application;
fig. 15 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present application.
Detailed Description
In order that the application may be readily understood, a more complete description of the application will be rendered by reference to the appended drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
In one embodiment, as shown in FIG. 1, a schematic diagram of the internal structure of an electronic device is provided. The electronic device includes a processor, a memory, and a display screen connected by a system bus. Wherein the processor is configured to provide computing and control capabilities to support operation of the entire electronic device. The memory is used for storing data, programs, instruction codes and the like, and at least one computer program is stored in the memory and can be executed by the processor, so that the play control method suitable for the electronic equipment provided by the embodiment of the application is realized. The Memory may include a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random-Access Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system, a database, and a computer program. The database stores data related to implementing a play control method provided in the above embodiments, for example, information such as a name of each process or application may be stored. The computer program is executable by a processor for implementing a play control method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system, databases, and computer programs in the non-volatile storage medium. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, and is used for displaying interface information of an application corresponding to a foreground process, and may also be used for detecting a touch operation acting on the display screen, and generating a corresponding instruction, such as a switching instruction of a foreground application and a background application.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. The electronic device may further comprise a network interface connected via a system bus, which may be an ethernet card or a wireless network card, etc., for communicating with an external electronic device, such as a server.
Referring to fig. 2, an embodiment of the present application provides a play control method applied to an electronic device having an earphone channel. The earphone can be a wired earphone or a wireless earphone, such as a Bluetooth earphone or an infrared earphone. The play control method provided by the embodiment of the application is mainly used for controlling the play and pause of the audio data of the electronic equipment according to the state change of the earphone channel. In one embodiment, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (Mobile Internet Device, MID), a wearable device (e.g., a smart watch, a smart bracelet, a pedometer, etc.), or other electronic devices that have an audio data playing function and may be connected to a headset.
As shown in FIG. 2, in one embodiment, the play control method includes S10-S40.
S10, monitoring whether audio data which are being played exist in the electronic equipment.
The audio data may be audio data in audio playing, audio data in video playing, audio data in instant communication, etc. The electronic equipment can monitor the running condition of the current audio data output program in real time and judge whether audio data are playing according to the running condition of the audio data output program. For example, the electronic device monitors the running conditions of the music playing software and the video playing software in real time, and judges whether audio data is output or not. The electronic equipment can also monitor the audio data output condition of the earphone channel in real time, and judge whether audio data is being played or not according to whether the audio data is output by the earphone channel or not. For example, whether audio data is being played is determined according to whether the wired or wireless earphone output channel has audio data transmission.
And S20, if the electronic equipment has the audio data which are being played, monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has the action of pulling out or breaking.
And according to the judgment result of the S20, if the electronic equipment has the audio data which are being played, the electronic equipment further monitors the connection state of the earphone. If the earphone is a wired earphone, whether the earphone has a pulling-out behavior or not can be judged through interface data of the wired earphone. If the earphone is a wireless earphone, whether the earphone has disconnection behavior can be judged by monitoring connection data of the wireless earphone and the electronic equipment.
S30, if the earphone has a pulling-out or breaking-off action, a first processing strategy for the audio data is obtained.
If the electronic equipment has the audio data which are being played and the earphone has the action of pulling out or breaking off, the electronic equipment acquires the processing strategy of the audio data which are being played according to a preset algorithm. The first processing strategy may include a plurality of specific processing schemes, and the electronic device selects one or more of the processing schemes according to a preset selection algorithm. For example, the first processing policy may be to pause or play the audio data by the audio data output program, the first processing policy may be to switch an output channel of the audio data, the first processing policy may also be to adjust an output volume of the audio data, or the like.
S40, controlling the playing of the audio data according to the first processing strategy.
When the earphone is pulled out or disconnected, the electronic device generally switches the audio output channel to other audio channels such as a speaker or a receiver according to a preset switching rule. And the electronic equipment controls the playing of the audio data according to different conditions by executing the first processing strategy, so that the influence on the surrounding environment caused by playing the audio data by using a loudspeaker or a receiver after the earphone is pulled out or disconnected is prevented.
For example, when listening to songs at night, if the earphone is pulled out or disconnected, the electronic device obtains a first processing strategy for playing music through a preset algorithm, and executes the first processing strategy to control the playing of the music, so that the music is prevented from being suddenly played through a loudspeaker after the earphone is pulled out or disconnected, and rest of surrounding people is affected.
In this embodiment, the play control method obtains a first processing policy for the audio data, and controls play of the audio data according to the first processing policy, so that when the electronic device plays the audio data and the earphone has a pull-out or disconnection behavior, the playing audio data can be processed in time according to different scenes and conditions, and surrounding environments are prevented from being affected. The play control method provided by the embodiment improves the intelligence of the electronic equipment, thereby improving the user experience.
In one embodiment, in S30, the acquiring a first processing policy for the audio data includes:
s310, judging whether to pause playing of the audio data, and obtaining the first processing strategy.
The first processing strategy includes pausing or continuing playing the audio data. When the electronic equipment has the audio data which are being played and the earphone has the action of pulling out or cutting off, the electronic equipment judges whether to pause playing or continue playing the audio data according to a preset judging rule. The judgment rule can be set according to actual requirements, and the application is not limited. For example, the judgment rule may be set according to the surrounding environment, according to the user setting condition, or according to the user habit, so as to satisfy different use environments and use requirements.
If the first processing strategy is to pause playing of the audio data, the electronic equipment executes the first processing strategy to pause playing of the audio data being played, and influence on surrounding environment is prevented. If the first processing strategy is to continue playing the audio data, the electronic device does not process the audio data, and the audio data continues playing.
In this embodiment, the method determines whether to pause playing of the audio data according to different situations, so that the playing of the audio data being played is paused or continued, the intelligence of audio playing processing is improved, and the experience of a user is improved.
Referring to fig. 3, in one embodiment, S310 specifically includes S311, S312, S313, and S314:
s311, judging whether to pause playing the audio data according to the first user setting data, and obtaining a first pause judging result.
The first user setting data refers to data preset by a user. The first user setting data is used for representing a processing mode of the audio data, which is preferentially considered by a user when the earphone is pulled out or disconnected. The electronic equipment can display selection items to a user through a system setting interface or a setting interface of the audio data program so as to collect and acquire the first user setting data.
For example, the first user setting data may include, but is not limited to: 1) When the earphone is pulled out or disconnected, the playing of the audio data is paused; 2) When the earphone is pulled out or disconnected, the audio data continues to be played.
Referring to fig. 4, in one embodiment, S311 specifically includes:
S3111, acquiring the first user setting data;
s3112, if the first user setting data includes preset pause data, the first pause judging result is to pause playing of the audio data;
otherwise, the first pause judging result is that the audio data is continuously played.
The preset pause data refers to that the data preset by the user is "pause playing audio data when the earphone is pulled out or disconnected". If the first user setting data acquired by the electronic device includes the preset pause data, it is indicated that when the earphone is pulled out or disconnected, the user preferentially selects to pause playing. The first pause judging result is that the audio data is paused; otherwise, the first pause judging result is that the audio data is continuously played. In this embodiment, whether to pause playing of the audio data being played is determined by the first user setting data, setting and requirements of users are fully considered, and user experience is improved.
S312, judging whether to pause playing the audio data according to the first user habit data, and obtaining a second pause judging result.
The first user habit data refers to data used for representing user habits. The first user habit data may include habit action data of the user when the earphone is pulled out or disconnected, play frequency data of the audio data, play use channel data and the like of the user. The first user habit data can be obtained by collecting and counting data information corresponding to the daily operation habits of the user. The first user habit data may be stored in a memory in advance, or may be obtained by a server.
And the electronic equipment analyzes the first user habit data so as to judge whether to pause playing of the audio data when the earphone is pulled out or disconnected, and obtain the second pause judging result. For example, according to the analysis of the first user habit data, when the earphone is pulled out or disconnected, the user habit clicks to pause playing or turns off the volume, and the second pause judging result is that the playing of the audio data is paused. Or according to the first user habit data analysis, when the playing of the currently played song is mostly speaker playing in the audio playing program of the user, the second pause judging result is to pause the playing of the audio data. Or, according to the first user habit data, if the playing frequency of the current playing song by the user is lower, the second pause judging result is that the playing of the audio data is paused.
Referring to fig. 5, in one embodiment, S312 specifically includes:
s3121, acquiring prestored habit data of the first user;
s3122, if the number of pause data in the first user habit data is greater than a first preset threshold, the second pause judging result is to pause playing of the audio data;
Otherwise, the second pause judging result is that the audio data is continuously played.
And the pause data is data representing that the user habit pauses playing when the earphone is pulled out or disconnected in the first user habit data. The first preset threshold value can be set according to actual requirements. For example, the first user habit data is obtained, and according to analysis, when the data of the user clicking to pause playing is larger than the first preset threshold value when the earphone is pulled out or disconnected, the user habit is represented to pause playing when the earphone is pulled out or disconnected. Therefore, the second pause judging result is to pause playing of the audio data. And otherwise, the second pause judging result is that the audio data is continuously played. In this embodiment, whether to pause playing of the audio data is determined according to the first user habit data, and different processing is performed on the audio data in combination with the habits of the user, so that the intelligence of playing of the audio data is further improved, and the experience of the user is greatly improved.
S313, judging whether to pause playing the audio data according to the first surrounding environment data, and obtaining a third pause judging result.
The first ambient environment data refers to data characterizing an ambient environment condition in which the electronic device is located. In one embodiment, the first ambient environment data may include ambient noise volume data, time data, and the like. The ambient noise volume data is used to characterize the size of noise in the environment in which the electronic device is currently located. The environmental noise volume data may be collected by a sensor such as a microphone provided to the electronic device. The environmental noise volume data may also be obtained by a server or the like. The time data refers to the current time being several minutes. The time data can be obtained through a network or a time module of the electronic equipment. It will be appreciated that, according to different requirements, the first ambient environment data may also include other data characterizing the ambient environment, and the present application is not limited in particular.
And the electronic equipment judges whether to pause playing of the audio data according to the first peripheral environment data and by combining a preset judgment criterion, so as to obtain a third pause judgment result.
Referring to fig. 6, in one embodiment, S313 specifically includes:
S3131, acquiring first surrounding environment data;
s3132, if the first surrounding environment data meets a first preset condition, the third pause judging result is that the audio data is paused;
otherwise, the third pause judging result is that the audio data is continuously played.
The first preset condition can be set according to actual requirements. When the first surrounding environment data meets a first preset condition, the surrounding environment is stated to meet the condition of playing the audio data in a pause mode, and the third pause is judged to be playing the audio data in a pause mode. And otherwise, the third pause judging result is that the audio data continues to be played.
In one embodiment, the first surrounding environment data includes the environmental noise volume data, in S3132, if the first surrounding environment data meets a first preset condition, the third pause judging result is that playing of the audio data is paused, specifically:
and if the environmental noise volume data is smaller than a second preset threshold value, the third pause judging result is that the audio data is paused.
The second preset threshold value can be set according to actual requirements. And when the environmental noise volume data is smaller than the second preset threshold value, the surrounding environment is quite, and when the earphone is pulled out or disconnected, the audio data is paused. For example, in an office environment or a conference environment, if the environmental noise volume data is smaller than the second preset threshold, the third pause judging result is that playing of the audio data is paused. Otherwise, the third pause judging result is that the audio data is continuously played. In this embodiment, the ambient noise volume data is used to determine the current ambient environment of the electronic device, and different processing is performed on the audio data according to different ambient environments, so as to prevent audio data from being played in environments where the ambient environment is relatively quiet and the like and is not suitable for using a speaker or a receiver. The method provided by the embodiment further improves the intelligence of audio play control and improves the user experience.
In one embodiment, the first surrounding environment data includes time data, and in S3132, if the first surrounding environment data meets a first preset condition, the third pause judging result is that playing of the audio data is paused, specifically:
and if the time data is in the preset range, the third pause judging result is that the playing of the audio data is paused.
The preset range can be set according to actual requirements, and can also be set and selected by a user. The time data of the preset range characterizes a time period suitable for suspending playing of the audio data when the earphone is pulled out or disconnected. For example, the preset range may be: 20:00-7: sleep period of 00, or 12:00-14: a noon break period of 00. And if the current time is in the preset time period, the third pause judging result is that the audio data is paused. And otherwise, the third pause judging result is that the audio data is continuously played. In this embodiment, the time data is used to determine the current surrounding environment of the electronic device, and different processing is performed on the audio data according to different surrounding environments, so as to prevent the audio data from being played in environments unsuitable for using a speaker or a receiver, such as at night or at rest. The method provided by the embodiment further improves the intelligence of audio play control and improves the user experience.
And S314, judging whether to pause playing of the audio data or not according to the first pause judging result, the second pause judging result and the third pause judging result, and obtaining the first processing strategy.
The electronic device obtains the first processing strategy according to a preset algorithm and the judgment results of S311, S312 and S313. The algorithm for obtaining the first processing policy by the electronic device according to the determination results of S311, S312, and S313 may be various, and the present application is not limited specifically.
In one embodiment, S314 includes:
if at least one of the first pause judging result, the second pause judging result and the third pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused; otherwise, the first processing strategy is to continue playing the audio data.
According to the method provided by the embodiment, the user setting, the user habit and the surrounding environment condition are fully considered to judge whether to pause playing of the audio data being played when the earphone is pulled out or disconnected, so that the intelligence is improved, and the user experience is further improved.
Referring to fig. 7, in one embodiment, S310, the determining whether to pause playing of the audio data may further include determining whether to pause playing of the audio data according to the first user setting data, the first user habit data, and the first surrounding environment data in order. S310 specifically comprises:
s311, judging whether to pause playing the audio data according to the first user setting data, and obtaining a first pause judging result.
The specific process of this step is the same as the above-mentioned S311 process, and will not be described here again.
If the first pause judging result is that the playing of the audio data is paused, S312', the first processing strategy is to pause the playing of the audio data.
That is, if the first pause determination result is that the audio data is paused, step S40 may be performed, and the electronic device pauses the audio data.
In one embodiment, after S311, the method further comprises:
and S313', if the first pause judging result is that the audio data is continuously played, judging whether to pause the playing of the audio data according to the first user habit data, and obtaining a second pause judging result.
The specific process of judging whether to pause playing the audio data according to the first user habit data, and obtaining the second pause judging result is the same as the above-mentioned S312 process, and will not be described again here.
And S314', if the second pause judging result is that the playing of the audio data is paused, the first processing strategy is that the playing of the audio data is paused.
That is, if the second pause determination result is that the audio data is paused, step S40 may be performed, and the electronic device pauses the audio data.
In one embodiment, after S313', the method further comprises:
and S315', if the second pause judging result is that the audio data is continuously played, judging whether to pause the audio data according to the first peripheral environment data, and obtaining a third pause judging result.
The specific process of determining whether to pause playing of the audio data according to the first surrounding environment data, and obtaining the third pause determination result is the same as the above-mentioned S313 process, and will not be described again here.
S316', if the third pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused;
And S317', if the third pause judging result is that the audio data is continuously played, the first processing strategy is that the audio data is continuously played.
And obtaining the first processing strategy according to the third pause judging result. And the electronic equipment processes the audio data being played according to the first processing strategy.
The method provided by the embodiment judges whether to pause playing of the audio data according to the first user setting data, the first user habit data and the first surrounding environment data in sequence, has high judging efficiency and can effectively save memory.
The above embodiments are control methods for the audio data being played when the headphones are unplugged or disconnected. The following describes a control method of the audio data that has been paused when the headphones are reinserted or connected with the embodiment.
Referring to fig. 8, in one embodiment, after S40, the method further includes S50, S60, and S70:
s50, if the first processing strategy is to pause playing of the audio data,
and monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has an inserting or connecting action.
And after the earphone is pulled out or disconnected, the playing of the audio data which is being played is paused according to the first processing strategy, and then the electronic equipment further monitors the connection state of the earphone and the electronic equipment. The method for monitoring the connection state of the earphone and the electronic device by the electronic device is similar to the above embodiment, and will not be described herein.
S60, if the earphone has an inserting or connecting action, acquiring a second processing strategy for the audio data.
The second processing strategy may include a plurality of specific processing schemes, and the electronic device selects one or more of the processing schemes according to a preset selection algorithm. For example, the second processing policy may be to resume playing or continue to pause playing of the audio data by the audio data output program, the second processing policy may be to switch an output channel of the audio data, the second processing policy may also be to adjust an output volume of the audio data, and so on.
And S70, controlling the playing of the audio data according to the second processing strategy.
After the earphone is inserted or connected, the electronic device switches the audio output channel to an earphone channel according to a preset switching rule. And the electronic equipment controls the playing of the audio data according to different conditions by executing the second processing strategy, so that the intelligence is improved.
According to the method provided by the embodiment, the user does not need to manually operate the playing of the audio data when the earphone is plugged back or connected, so that the intelligence of the playing control of the audio data is further improved, and the user experience is improved.
In one embodiment, in S60, the obtaining a second processing policy for the audio data includes:
s610, judging whether to resume playing the audio data, and obtaining the second processing strategy.
The second processing policy includes resuming playing of the paused audio data or resuming pausing. And the electronic equipment judges whether the noble paused audio data resumes playing or continues pausing according to a preset judging rule. The judgment rule can be set according to actual requirements, and the application is not limited. For example, the judgment rule can be set according to the surrounding environment, the setting condition of the user or the habit of the user, so that different use environments and use requirements can be met.
If the second processing strategy is to resume playing the audio data, the electronic equipment executes the second processing strategy to resume playing the paused audio data without manual operation of a user. If the second processing strategy is to continue to pause the audio data, the electronic device does not process the audio data, and the audio data continues to maintain the pause state.
In this embodiment, the method determines whether to resume playing the audio data according to different situations, so as to resume playing or continue suspending the audio data in a suspended state, thereby improving the intelligence of audio playing processing and improving the experience of users.
Referring to fig. 9, in one embodiment, S610 includes S611, S612, S613, and S614:
s611, judging whether to resume playing the audio data according to the second user setting data, and obtaining a first resume judging result.
The second user setting data refers to data preset by a user. The second user setting data is used for representing the processing mode of the audio data which is preferentially considered by a user when the earphone is inserted or connected. The electronic equipment can display the selection items to the user through a system setting interface or a setting interface of the audio data program so as to collect and acquire the second user setting data.
For example, the second user setting data may be: 1) When the earphone is inserted or connected, the audio data is restored to play; 2) When the earphone is plugged in or connected, the audio data continues to be paused.
Referring to fig. 10, in one embodiment, S611 includes:
S6111, acquiring the second user setting data;
s6112, if the second user setting data comprises preset recovery data, the first recovery judging result is that the audio data is recovered to be played;
otherwise, the first recovery judging result is that the audio data is continuously paused.
The preset resume data refers to that the data preset by the user is "resume playing audio data when the earphone is inserted or connected". And if the second user setting data acquired by the electronic equipment comprises the preset resume data, the user preferably selects resume play when the earphone is inserted or connected. The first recovery judging result is that the audio data is recovered to be played; otherwise, the first recovery judging result is that the audio data is continuously paused. In this embodiment, through the second user setting data, it is determined whether to reply and play the audio data in the pause state, and setting and requirements of the user are fully considered, so that user experience is improved.
And S612, judging whether to resume playing the audio data according to the second user habit data, and obtaining a second resume judging result.
The second user habit data refers to data for characterizing user habits. The second user habit data may include habit action data of the user when the earphone is inserted or connected, play frequency data of the audio data, play use channel data, and the like of the user. The second user habit data can be obtained by collecting and counting data information corresponding to the daily operation habits of the user. The second user habit data may be stored in the memory in advance, or may be obtained by the server.
And the electronic equipment analyzes the second user habit data so as to judge whether the audio data is restored to play or not when the earphone is inserted or connected, and the second restoration judging result is obtained. For example, according to the second user habit data analysis, when the earphone is inserted or connected, the user is used to click a play button or turn on the volume, and the second recovery judgment result is that the audio data is recovered to play. Or according to the second user habit data analysis, when the playing of the currently played song is mostly earphone playing in the audio playing program of the user, the second recovery judging result is that the playing of the audio data is recovered. Or, according to the second user habit data, if the playing frequency of the current playing song is higher, the second recovery judgment result is that the playing of the audio data is recovered.
Referring to fig. 11, in one embodiment, S612 includes:
s6121, acquiring prestored habit data of the second user;
s6122, if the number of the recovered data in the second user habit data is larger than a third preset threshold value, recovering and playing the audio data by the second recovery judging result;
Otherwise, the second pause judging result is that the audio data is continuously paused.
And the recovery data is data representing that the user habit is recovered to play when the earphone is inserted or connected in the second user habit data. The third preset threshold value can be set according to actual requirements. For example, the second user habit data is obtained, and according to analysis, when the data of the user clicking to resume playing is larger than the third preset threshold value when the earphone is inserted or connected, the habit of the user is indicated to resume playing when the earphone is inserted or connected. Therefore, the second recovery judgment result is that the audio data is recovered to play. And otherwise, the second recovery judging result is that the audio data is continuously paused. In this embodiment, whether to resume playing the audio data is determined according to the second user habit data, and different treatments are performed on the audio data in combination with the habits of the user, so that the intelligence of playing the audio data is further improved, and the experience of the user is greatly improved.
And S613, judging whether to resume playing the audio data according to the earphone separation time, and obtaining a third resume judging result.
The earphone disconnection time refers to a time difference from the last earphone pulling-out or disconnection time to the current earphone inserting or connection time. For example, when the user pulls out or disconnects the earphone at the last time, the earphone is inserted or connected at the current time, and the earphone disconnection time is 10 minutes, namely, the time for the user to pull out or disconnect the earphone is 14 hours and 45 minutes. The earphone disconnection time can be obtained through a network or a time module of the electronic equipment.
And the electronic equipment judges whether to resume playing the audio data according to the earphone detachment time and a preset judgment criterion to obtain a third resume judgment result.
Referring to fig. 12, in one embodiment, S613 includes:
s6131, acquiring the separation time of the earphone;
s6132, if the earphone separation time is smaller than a preset time threshold, the second recovery judgment result is that the audio data is recovered to be played;
otherwise, the second recovery judging result is that the audio data is continuously paused.
The preset time threshold can be set according to actual requirements, and can also be set and selected by a user. For example, if the preset time threshold is 15 minutes, when the earphone separation time is less than 15 minutes, the second recovery judgment result is that the audio data is recovered to play. Otherwise, when the earphone separation time is greater than 15 minutes, the second restoration judgment result is that the audio data is continuously paused. The method provided by the embodiment further improves the intelligence of audio play control and improves the user experience.
And S614, judging whether to resume playing the audio data or not according to the first resume judging result, the second resume judging result and the third resume judging result, and obtaining the second processing strategy.
The electronic device obtains the second processing strategy according to a preset algorithm and the judgment results of S611, S612 and S613. The algorithm for obtaining the second processing policy by the electronic device according to the judgment results of S611, S612 and S613 may be various, and the present application is not limited specifically.
In one embodiment, S614 includes:
if at least one of the first recovery judgment result, the second recovery judgment result and the third recovery judgment result is to recover playing of the audio data, the second processing strategy is to recover playing of the audio data;
otherwise, the second processing strategy is to continue pausing the audio data.
According to the method provided by the embodiment, the situations of user setting, user habit, earphone detachment time and the like are fully considered to judge whether to resume playing of the audio data in the pause state when the earphone is inserted or connected, so that the intelligence is improved, and further the user experience is improved.
Referring to fig. 13, in one embodiment, S610, the determining whether to resume playing the audio data may further include determining whether to pause playing the audio data according to the second user setting data, the second user habit data, and the headphone off time in order. S610 specifically includes:
s611, judging whether to resume playing the audio data according to the second user setting data, and obtaining a first resume judging result.
The specific process of this step is the same as the above-mentioned S611 process, and will not be described here again.
S612', if the first recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play.
That is, if the first resume determination result is that the audio data is resumed, step S70 may be performed, and the electronic device resumes playing of the audio data.
In one embodiment, after S611, the method further comprises:
and S613', if the first recovery judging result is that the audio data is continuously paused, judging whether to resume playing the audio data according to second user habit data, and obtaining a second recovery judging result.
Whether to resume playing the audio data is determined according to the second user habit data, and the specific process of obtaining the second resume determination result is the same as the above-mentioned S612 process, and will not be described again here.
S614', if the second recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play.
That is, if the second resume determination result is that the audio data is resumed, step S70 may be performed, and the electronic device resumes playing of the audio data.
In one embodiment, after S613', the method further comprises:
s615', if the second resume judging result is that the audio data is continuously paused, judging whether to resume playing the audio data according to the earphone disengaging time, and obtaining a third resume judging result.
Whether to resume playing the audio data is determined according to the earphone detachment time, and the specific process of obtaining the third resume determination result is the same as the above-mentioned process S613, and will not be repeated here.
S616', if the third recovery judgment result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play;
S617', if the third resume determination result is that the audio data is to be paused, the second processing policy is to pause the audio data.
And obtaining the second processing strategy according to the third recovery judging result. And the electronic equipment processes the audio data in the pause state according to the second processing strategy.
The method provided by the embodiment judges whether to resume playing the audio data according to the second user setting data, the second user habit data and the earphone detachment time in sequence, has high judging efficiency and can effectively save the memory.
Referring to fig. 14, an embodiment of the present application provides a play control apparatus 10, which is applied to an electronic device, and includes a play monitoring module 100, a first earphone monitoring module 200, a first policy obtaining module 300, and a first play control module 400. Wherein,
the play monitoring module 100 is configured to monitor whether audio data being played exists in the electronic device;
the first earphone monitoring module 200 is configured to monitor a connection state of an earphone and the electronic device when audio data being played is in the electronic device, and determine whether the earphone has a pull-out or disconnection behavior;
The first policy obtaining module 300 is configured to obtain a first processing policy for the audio data when the earphone has a pull-out or disconnection behavior;
the first play control module 400 is configured to control play of the audio data according to the first processing policy.
In one embodiment, the first policy obtaining module 300 is specifically configured to determine whether to pause playing of the audio data, so as to obtain the first processing policy.
In one embodiment, the first policy acquisition module 300 includes:
the first pause judging unit is used for judging whether to pause playing of the audio data according to the first user setting data to obtain a first pause judging result;
the second pause judging unit is used for judging whether to pause playing of the audio data according to the first user habit data to obtain a second pause judging result;
the third pause judging unit is used for judging whether to pause playing of the audio data according to the first surrounding environment data to obtain a third pause judging result;
and the first comprehensive judging unit is used for judging whether to pause playing of the audio data according to the first pause judging result, the second pause judging result and the third pause judging result to obtain the first processing strategy.
In one embodiment, the first comprehensive judging unit is specifically configured to:
when at least one of the first pause judging result, the second pause judging result and the third pause judging result is to pause playing of the audio data, judging that the first processing strategy is to pause playing of the audio data; otherwise, judging that the first processing strategy is to continue playing the audio data.
In one embodiment, the first suspension determination unit includes a first user setting data acquisition subunit and a first user setting data determination subunit. The first user setting data acquisition subunit is used for acquiring the first user setting data; the first user setting data judging subunit is configured to judge that the first pause judging result is to pause playing of the audio data when the first user setting data includes preset pause data; otherwise, judging that the first pause judging result is that the audio data is continuously played.
In one embodiment, the second suspension determination unit includes a first user habit data acquisition subunit and a first user habit determination subunit. The first user habit data acquisition subunit is used for acquiring prestored first user habit data; the first user habit judging subunit is configured to judge that the second pause judging result is to pause playing of the audio data when the number of pause data in the first user habit data is greater than a first preset threshold; otherwise, judging that the second pause judging result is that the audio data is continuously played.
In one embodiment, the third suspension determination unit includes an ambient data acquisition subunit and an ambient data determination subunit. The surrounding environment data acquisition subunit is used for acquiring first surrounding environment data; the surrounding environment data judging subunit is configured to judge that the third pause judging result is to pause playing of the audio data when the first surrounding environment data meets a first preset condition; otherwise, judging that the third pause judging result is that the audio data is continuously played.
In one embodiment, the first surrounding environment data includes surrounding noise volume data, and the surrounding environment data obtaining subunit is configured to determine that the third pause determination result is to pause playing of the audio data when the surrounding noise volume data is smaller than a second preset threshold.
In one embodiment, the first surrounding environment data includes time data, and the surrounding environment data obtaining subunit is configured to determine that the third pause determination result is to pause playing of the audio data when the time data is in a preset range.
In one embodiment, the first pause judging unit is configured to judge whether to pause playing of the audio data according to first user setting data, so as to obtain a first pause judging result; and when the first pause judging result is that the audio data is paused, judging that the first processing strategy is that the audio data is paused.
In one embodiment, the second pause judging unit is configured to judge whether to pause playing of the audio data according to the first user habit data when the first pause judging result is that the audio data continues playing, so as to obtain a second pause judging result; and if the second pause judging result is that the audio data is paused, judging that the first processing strategy is paused for the audio data.
In one embodiment, the third pause judging unit is configured to judge whether to pause playing of the audio data according to the first surrounding environment data when the second pause judging result is that the audio data continues playing, so as to obtain a third pause judging result; when the third pause judging result is that the audio data is paused, judging that the first processing strategy is paused for the audio data; and when the third pause judging result is that the audio data is continuously played, judging that the first processing strategy is that the audio data is continuously played.
In one embodiment, the apparatus further includes a second headphone monitoring module, a second policy obtaining module, and a second play control module. Wherein,
The second earphone monitoring module is used for monitoring the connection state of the earphone and the electronic equipment when the first processing strategy is to pause playing of the audio data, and judging whether the earphone has an inserting or connecting behavior or not;
the second strategy acquisition module is used for acquiring a second processing strategy for the audio data when the earphone has an inserting or connecting action;
and the second play control module is used for controlling the play of the audio data according to the second processing strategy.
In one embodiment, the second policy obtaining module is configured to determine whether to resume playing the audio data, so as to obtain the second processing policy.
In one embodiment, the second policy acquisition module includes:
the first recovery judging unit is used for judging whether to recover playing of the audio data according to the second user setting data to obtain a first recovery judging result;
the second recovery judging unit is used for judging whether to recover playing of the audio data according to second user habit data to obtain a second recovery judging result;
the third recovery judging unit is used for judging whether to recover playing of the audio data according to the earphone separation time to obtain a third recovery judging result;
And the second comprehensive judging unit is used for judging whether to resume playing the audio data or not according to the first resume judging result, the second resume judging result and the third resume judging result to obtain the second processing strategy.
In one embodiment, the second comprehensive judging unit is specifically configured to:
when at least one of the first recovery judging result, the second recovery judging result and the third recovery judging result is to recover playing of the audio data, judging that the second processing strategy is to recover playing of the audio data; otherwise, judging that the second processing strategy is to continue to pause the audio data.
In one embodiment, the first recovery judging unit includes a second user setting data acquisition subunit and a second user setting data judging subunit. The second user setting data acquisition subunit is configured to acquire the second user setting data; the second user setting data judging subunit is configured to judge that the first recovery judgment result is to resume playing of the audio data when the second user setting data includes preset recovery data; otherwise, the first recovery judgment result is judged to be that the audio data is continuously paused.
In one embodiment, the second recovery determination unit includes a second user habit data acquisition subunit and a second user habit data determination subunit. The second user habit data acquisition subunit is used for acquiring prestored second user habit data; the second user habit data judging subunit is configured to judge that the second recovery judging result is to resume playing of the audio data when the number of recovery data in the second user habit data is greater than a third preset threshold; otherwise, judging that the second recovery judgment result is that the audio data is continuously paused.
In one embodiment, the third recovery judging unit includes a headphone off-time acquiring subunit and a headphone off-time judging subunit. The earphone detachment time acquisition subunit is used for acquiring the earphone detachment time; the earphone separation time judging subunit is configured to judge that the second recovery judgment result is to resume playing of the audio data when the earphone separation time is less than a preset time threshold; otherwise, judging that the second recovery judgment result is that the audio data is continuously paused.
In one embodiment, the first recovery determining unit is configured to determine whether to resume playing the audio data according to the second user setting data, to obtain a first recovery determining result; and when the first recovery judging result is that the audio data is recovered to play, judging that the second processing strategy is that the audio data is recovered to play.
In one embodiment, the second resume judging unit is configured to, when the first resume judging result is that the audio data continues to be paused, judge whether to resume playing the audio data according to second user habit data, and obtain a second resume judging result; and if the second recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play.
In one embodiment, the third resume judging unit is configured to, when the second resume judging result is that the audio data continues to be paused, judge whether to resume playing the audio data according to the headphone off time, and obtain a third resume judging result; if the third recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play; and if the third recovery judging result is that the audio data is continuously paused, the second processing strategy is that the audio data is continuously paused.
The playing control device provided in the above embodiment has similar implementation principles and technical effects to those of the above method embodiment, and will not be described herein.
The above-mentioned division of each module in the play control device is only used for illustration, and in other embodiments, the play control device may be divided into different modules as needed to complete all or part of the functions of the play control device.
The above-mentioned various modules in the play control device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory in the electronic device, so that the processor may call and execute operations corresponding to the above modules.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform steps S10-S40 of the above-described playback control method.
It should be noted that one or more non-transitory computer-readable storage media containing computer-executable instructions, when executed by one or more processors, may also cause the processors to perform the play control method in any of the above embodiments.
The computer readable storage medium provided in the above embodiment has similar principle and technical effects to those of the above method embodiment, and will not be described herein.
The embodiment of the application also provides electronic equipment. As shown in fig. 15, for convenience of explanation, only the portions related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method portions of the embodiments of the present application. The electronic device may be any terminal device having a voice call function and having a speaker, including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant ), a POS (Point of Sales), a car-mounted computer, a wearable device, etc., taking the electronic device as an example of the mobile phone:
fig. 15 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present application. Referring to fig. 15, a mobile phone 1000 includes: radio Frequency (RF) circuitry 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuitry 1060, wireless fidelity (wireless fidelity, wiFi) module 1070, processor 1080, and power source 1090. It will be appreciated by those skilled in the art that the handset construction shown in fig. 15 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The RF circuit 1010 may be used to receive and transmit information or receive and transmit signals during a call, and may receive downlink information of a base station and process the downlink information for the processor 1080; the uplink data may be transmitted to the base station. Typically, RF circuitry includes, but is not limited to, antennas, at least one amplifier, transceivers, couplers, low noise amplifiers (Low Noise Amplifier, LNAs), diplexers, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE)), email, short message service (Short Messaging Service, SMS), and the like.
The memory 1020 may be used to store software programs and modules that the processor 1080 performs various functional applications and data processing of the handset by executing the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for at least one function (such as an application program of a sound playing function, an application program of an image playing function, etc.), and the like; the data storage area may store data (such as audio data, address book, etc.) created according to the use of the cellular phone, etc. In addition, memory 1020 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state memory device.
The input unit 1030 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the handset 1000. In particular, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, which may also be referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1031 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. In one embodiment, touch panel 1031 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1080 and can receive commands from the processor 1080 and execute them. Further, the touch panel 1031 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1030 may include other input devices 1032 in addition to the touch panel 1031. In particular, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 1040 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. In one embodiment, the display panel 1041 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, touch panel 1031 may overlay display panel 1041, and when touch panel 1031 detects a touch operation thereon or thereabout, it is communicated to processor 1080 to determine the type of touch event, and processor 1080 then provides a corresponding visual output on display panel 1041 based on the type of touch event. Although in fig. 15, the touch panel 1031 and the display panel 1041 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to implement the input and output functions of the mobile phone.
The handset 1000 may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1041 and/or the backlight when the mobile phone moves to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the acceleration in all directions, the gravity and the direction can be detected when the motion sensor is static, and the motion sensor can be used for identifying the application of the gesture of a mobile phone (such as switching of a transverse screen and a vertical screen), vibration identification related functions (such as a pedometer and knocking) and the like; in addition, the mobile phone can be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor and the like.
Audio circuitry 1060, speaker 1061, and microphone 1062 may provide an audio interface between a user and a cell phone. Audio circuit 1060 may transmit the received electrical signal after audio data conversion to speaker 1061 for conversion by speaker 1061 into an audio signal output; on the other hand, microphone 1062 converts the collected sound signals into electrical signals, which are received by audio circuit 1060 and converted into audio data, which are processed by audio data output processor 1080 and transmitted to another cell phone via RF circuit 1010 or output to memory 1020 for subsequent processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1070, so that wireless broadband Internet access is provided for the user. Although fig. 15 shows a WiFi module 1070, it is understood that it is not a necessary component of the handset 1000 and may be omitted as desired.
Processor 1080 is the control center of the handset, connects the various parts of the entire handset using various interfaces and lines, and performs various functions and processes of the handset by running or executing software programs and/or modules stored in memory 1020, and invoking data stored in memory 1020, thereby performing overall monitoring of the handset. In one embodiment, processor 1080 may include one or more processing units. In one embodiment, processor 1080 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, and the like; the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1080.
The handset 1000 further includes a power source 1090 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 1080 by a power management system for performing functions such as managing charge, discharge, and power consumption by the power management system.
In one embodiment, the handset 1000 may also include a camera, bluetooth module, etc.
In an embodiment of the present application, the steps of S10-S40 described above are implemented when the processor 1080 included in the electronic device executes a computer program stored on a memory.
It should be noted that an electronic device includes a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the audio processing method in any of the above embodiments.
The electronic device provided in the foregoing embodiment has similar implementation principles and technical effects to those of the foregoing method embodiment, and will not be described herein in detail.
Any reference to memory, storage, database, or other medium used in the present application may include non-volatile and/or volatile memory. Suitable nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (23)

1. A play control method, applied to an electronic device, comprising:
monitoring whether audio data which is being played exist in the electronic equipment;
if the electronic equipment has the audio data which are being played, the connection state of the earphone and the electronic equipment is monitored, and whether the earphone has a pulling-out or breaking-off action is judged;
If the earphone has a pulling-out or breaking-off action, judging whether to pause playing of the audio data or not to obtain a first processing strategy; a kind of electronic device with high-pressure air-conditioning system
Controlling the playing of the audio data according to the first processing strategy;
wherein the determining whether to pause playing the audio data to obtain the first processing policy includes:
judging whether to pause playing of the audio data according to the first user setting data to obtain a first pause judging result;
judging whether to pause playing of the audio data according to the first user habit data to obtain a second pause judging result;
judging whether to pause playing of the audio data according to the first surrounding environment data, and obtaining a third pause judging result;
judging whether to pause playing of the audio data or not according to the first pause judging result, the second pause judging result and the third pause judging result, and obtaining the first processing strategy.
2. The method according to claim 1, wherein the determining whether to pause the playback of the audio data according to the first pause determination result, the second pause determination result, and the third pause determination result, to obtain the first processing policy, includes:
If at least one of the first pause judging result, the second pause judging result and the third pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused;
otherwise, the first processing strategy is to continue playing the audio data.
3. The method of claim 1, wherein determining whether to pause playing of the audio data according to the first user setting data, to obtain a first pause determination result, comprises:
acquiring the first user setting data;
if the first user setting data comprises preset pause data, the first pause judging result is that the audio data is paused;
otherwise, the first pause judging result is that the audio data is continuously played.
4. The method of claim 1, wherein the determining whether to pause playing of the audio data according to the first user habit data, to obtain the second pause determination result, comprises:
acquiring prestored habit data of the first user;
if the number of pause data in the first user habit data is larger than a first preset threshold value, the second pause judging result is that the audio data is paused;
Otherwise, the second pause judging result is that the audio data is continuously played.
5. The method of claim 1, wherein the determining whether to pause playing of the audio data according to the first surrounding environment data, to obtain a third pause determination result, comprises:
acquiring first surrounding environment data;
if the first surrounding environment data meets a first preset condition, the third pause judging result is that the audio data is paused;
otherwise, the third pause judging result is that the audio data is continuously played.
6. The method of claim 5, wherein the first surrounding environment data includes surrounding noise volume data, and the third pause determination result is to pause playing of the audio data if the first surrounding environment data meets a first preset condition, comprising:
and if the environmental noise volume data is smaller than a second preset threshold value, the third pause judging result is that the audio data is paused.
7. The method according to claim 5, wherein the first surrounding environment data includes time data, and the third pause judging result is to pause playing of the audio data if the first surrounding environment data satisfies a first preset condition, comprising:
And if the time data is in the preset range, the third pause judging result is that the playing of the audio data is paused.
8. The method of claim 1, wherein the determining whether to pause playing of the audio data, resulting in the first processing policy, comprises:
judging whether to pause playing of the audio data according to the first user setting data to obtain a first pause judging result;
if the first pause judging result is that the audio data is continuously played, judging whether to pause playing the audio data according to the first user habit data, and obtaining a second pause judging result;
if the second pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused.
9. The method of claim 8, wherein the determining whether to pause playing the audio data according to the first user setting data, after obtaining the first pause determination result, further comprises:
if the first pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused.
10. The method of claim 8, wherein the determining whether to pause playing the audio data according to the first user habit data, after obtaining the second pause determination result, further comprises:
if the second pause judging result is that the audio data is continuously played, judging whether to pause playing the audio data according to the first surrounding environment data, and obtaining a third pause judging result;
if the third pause judging result is that the audio data is paused, the first processing strategy is that the audio data is paused;
and if the third pause judging result is that the audio data is continuously played, the first processing strategy is that the audio data is continuously played.
11. The method of claim 1, wherein after said controlling the playing of the audio data according to the first processing policy, the method further comprises:
if the first processing strategy is to pause playing of the audio data, then,
monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has an inserting or connecting action or not;
if the earphone has an inserting or connecting action, a second processing strategy for the audio data is obtained;
And controlling the playing of the audio data according to the second processing strategy.
12. The method of claim 11, wherein the obtaining a second processing policy for the audio data comprises:
and judging whether to resume playing the audio data or not to obtain the second processing strategy.
13. The method of claim 12, wherein the determining whether to resume playing the audio data, resulting in the second processing policy, comprises:
judging whether to resume playing the audio data according to the second user setting data to obtain a first resume judging result;
judging whether to resume playing the audio data according to the second user habit data to obtain a second resume judging result;
judging whether to resume playing the audio data according to the earphone detachment time, and obtaining a third resume judging result;
and judging whether to resume playing the audio data or not according to the first resume judging result, the second resume judging result and the third resume judging result to obtain the second processing strategy.
14. The method of claim 13, wherein the determining whether to resume playing the audio data according to the first resume determination result, the second resume determination result, and the third resume determination result, to obtain the second processing policy, comprises:
If at least one of the first recovery judgment result, the second recovery judgment result and the third recovery judgment result is to recover playing of the audio data, the second processing strategy is to recover playing of the audio data;
otherwise, the second processing strategy is to continue pausing the audio data.
15. The method of claim 13, wherein determining whether to resume playing the audio data according to the second user setting data, to obtain the first resume determination result, comprises:
acquiring the second user setting data;
if the second user setting data comprises preset recovery data, the first recovery judging result is that the audio data is recovered to be played;
otherwise, the first recovery judging result is that the audio data is continuously paused.
16. The method of claim 13, wherein the determining whether to resume playing the audio data according to the second user habit data, to obtain a second resume determination result, comprises:
acquiring prestored habit data of the second user;
if the number of the recovered data in the second user habit data is larger than a third preset threshold value, the second recovery judgment result is that the audio data is recovered to be played;
Otherwise, the second recovery judging result is that the audio data is continuously paused.
17. The method of claim 13, wherein the determining whether to resume playing the audio data according to the headphone off time, to obtain a third resume determination result, comprises:
acquiring the separation time of the earphone;
if the earphone separation time is smaller than a preset time threshold, the second recovery judgment result is that the audio data is recovered to be played;
otherwise, the second recovery judging result is that the audio data is continuously paused.
18. The method of claim 12, wherein the determining whether to resume playing the audio data, resulting in the second processing policy, comprises:
judging whether to resume playing the audio data according to the second user setting data to obtain a first resume judging result;
and if the first recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play.
19. The method of claim 18, wherein the determining whether to resume playing the audio data according to the second user setting data, after obtaining the first resume determination result, further comprises:
If the first recovery judging result is that the audio data is continuously paused, judging whether to resume playing the audio data according to second user habit data, and obtaining a second recovery judging result;
and if the second recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play.
20. The method of claim 19, wherein the determining whether to resume playing the audio data according to the second user habit data, after obtaining the second resume determination result, further comprises:
if the second resume judging result is that the audio data is continuously paused, judging whether to resume playing the audio data according to the earphone detachment time, and obtaining a third resume judging result;
if the third recovery judging result is that the audio data is recovered to play, the second processing strategy is that the audio data is recovered to play;
and if the third recovery judging result is that the audio data is continuously paused, the second processing strategy is that the audio data is continuously paused.
21. A play control apparatus, characterized by being applied to an electronic device, comprising:
The play monitoring module is used for monitoring whether the electronic equipment has audio data which are being played or not;
the first earphone monitoring module is used for monitoring the connection state of the earphone and the electronic equipment when the electronic equipment has the audio data which are being played, and judging whether the earphone has a pulling-out or breaking-off action or not;
the first strategy acquisition module is used for judging whether the audio data is paused to play when the earphone has a pulling-out or breaking-off action, so as to obtain a first processing strategy; a kind of electronic device with high-pressure air-conditioning system
The first playing control module is used for controlling the playing of the audio data according to the first processing strategy;
the determining, by the first policy obtaining module, whether to pause playing of the audio data, to obtain the first processing policy includes: judging whether to pause playing of the audio data according to the first user setting data to obtain a first pause judging result; judging whether to pause playing of the audio data according to the first user habit data to obtain a second pause judging result; judging whether to pause playing of the audio data according to the first surrounding environment data, and obtaining a third pause judging result; judging whether to pause playing of the audio data or not according to the first pause judging result, the second pause judging result and the third pause judging result, and obtaining the first processing strategy.
22. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the playback control method of any one of claims 1 to 20.
23. An electronic device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the play control method of any of claims 1 to 20.
CN201880098660.4A 2018-12-06 2018-12-06 Playing control method and device, computer readable storage medium and electronic equipment Active CN113039518B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/119608 WO2020113525A1 (en) 2018-12-06 2018-12-06 Playing control method and apparatus, and computer-readable storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113039518A CN113039518A (en) 2021-06-25
CN113039518B true CN113039518B (en) 2023-12-05

Family

ID=70974088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098660.4A Active CN113039518B (en) 2018-12-06 2018-12-06 Playing control method and device, computer readable storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN113039518B (en)
WO (1) WO2020113525A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113496707A (en) * 2021-06-29 2021-10-12 Tcl通力电子(惠州)有限公司 Noise suppression method, noise suppression device, noise suppression apparatus, and storage medium
CN114115793A (en) * 2021-12-01 2022-03-01 维沃移动通信有限公司 Audio adjusting method and audio adjusting device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008082939A1 (en) * 2006-12-28 2008-07-10 Motorola Inc. Method of operating a wireless headset
CN106293602A (en) * 2016-08-09 2017-01-04 广州三星通信技术研究有限公司 Voice data control method for playing back in earphone and equipment
CN108307271A (en) * 2018-01-25 2018-07-20 潍坊歌尔电子有限公司 A kind of volume adjusting method of smart machine, device and smart machine
CN108509176A (en) * 2018-04-10 2018-09-07 Oppo广东移动通信有限公司 A kind of method, apparatus of playing audio-fequency data, storage medium and intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008082939A1 (en) * 2006-12-28 2008-07-10 Motorola Inc. Method of operating a wireless headset
CN106293602A (en) * 2016-08-09 2017-01-04 广州三星通信技术研究有限公司 Voice data control method for playing back in earphone and equipment
CN108307271A (en) * 2018-01-25 2018-07-20 潍坊歌尔电子有限公司 A kind of volume adjusting method of smart machine, device and smart machine
CN108509176A (en) * 2018-04-10 2018-09-07 Oppo广东移动通信有限公司 A kind of method, apparatus of playing audio-fequency data, storage medium and intelligent terminal

Also Published As

Publication number Publication date
CN113039518A (en) 2021-06-25
WO2020113525A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
KR20200027554A (en) Speech recognition method and apparatus, and storage medium
CN107231473B (en) Audio output regulation and control method, equipment and computer readable storage medium
US10805708B2 (en) Headset sound channel control method and system, and related device
CN109918039B (en) Volume adjusting method and mobile terminal
CN112997470B (en) Audio output control method and device, computer readable storage medium and electronic equipment
CN108322599B (en) Network access method and mobile terminal
CN106847307B (en) Signal detection method and device
CN109215683B (en) Prompting method and terminal
CN106506437B (en) Audio data processing method and device
CN113039518B (en) Playing control method and device, computer readable storage medium and electronic equipment
CN114077414A (en) Audio playing control method and device, electronic equipment and storage medium
CN112805988B (en) Call control method and device, computer readable storage medium and electronic equipment
KR20190117753A (en) Message notification method and terminal
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN106126170B (en) Sound effect setting method of terminal and terminal
WO2020124541A1 (en) Audio processing method and apparatus, computer readable storage medium, and electronic device
CN108391208B (en) Signal switching method, device, terminal, earphone and computer readable storage medium
CN109923848B (en) Method and device for controlling volume of device and server
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
CN110392878B (en) Sound control method and mobile terminal
CN105635379B (en) Noise suppression method and device
CN109218504B (en) Sound output method and terminal equipment
CN110083205B (en) Page switching method, wearable device and computer-readable storage medium
CN115037831A (en) Mode control method and device, electronic equipment and earphone
CN109040425B (en) Information processing method and related product

Legal Events

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