CN113039518A - Play control method and device, computer readable storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN113039518A
CN113039518A CN201880098660.4A CN201880098660A CN113039518A CN 113039518 A CN113039518 A CN 113039518A CN 201880098660 A CN201880098660 A CN 201880098660A CN 113039518 A CN113039518 A CN 113039518A
Authority
CN
China
Prior art keywords
audio data
data
pause
judgment result
played
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201880098660.4A
Other languages
Chinese (zh)
Other versions
CN113039518B (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

Images

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)
  • Headphones And Earphones (AREA)
  • Circuit For Audible Band Transducer (AREA)
  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

A playing control method and device, a computer readable storage medium and an electronic device are provided, the playing control method is applied to the electronic device, and the playing control method comprises the following steps: monitoring whether audio data is being played in the electronic device (S10); if audio data which is being played exists in the electronic equipment, monitoring the connection state of an earphone and the electronic equipment, and judging whether the earphone has a pulling-out or disconnection behavior (S20); if the earphone is pulled out or disconnected, acquiring a first processing strategy for the audio data (S30); and controlling playback of the audio data according to the first processing policy (S40).

Description

Play control method and device, computer readable storage medium and electronic equipment Technical Field
The present application relates to the field of electronic device technologies, and in particular, to a play control method and apparatus, a computer-readable storage medium, and an electronic device.
Background
In modern life, electronic equipment has become an indispensable part of people's daily life. When watching video or enjoying music using electronic equipment, people often wear earphones.
When the earphone connected to the electronic device is suddenly pulled out or disconnected, the audio output channel of the electronic device is generally switched to a speaker or an earphone, and the video being watched or the music being enjoyed is still played, which may affect the surrounding people.
Disclosure of Invention
The embodiment of the application provides a playing control method and device, a computer readable storage medium and an electronic device, which can perform different processing on audio data being played according to different conditions, have high intelligence and improve user experience.
A play control method is applied to electronic equipment, and the method comprises the following steps:
monitoring whether audio data which are being played exist in the electronic equipment;
if audio data which are being played exist in the electronic equipment, monitoring the connection state of an earphone and the electronic equipment, and judging whether the earphone has a pulling-out or disconnection behavior;
if the earphone is pulled out or disconnected, a first processing strategy for the audio data is obtained; and
and controlling the playing of the audio data according to the first processing strategy.
A play control apparatus applied to an electronic device, the apparatus comprising:
the playing monitoring module is used for monitoring whether audio data which are being played exist in the electronic equipment;
the first earphone monitoring module is used for monitoring the connection state of an earphone and the electronic equipment when audio data which is being played exists in the electronic equipment, and judging whether the earphone is pulled out or disconnected;
the first strategy acquisition module is used for acquiring a first processing strategy of the audio data when the earphone is pulled out or disconnected; and
and the first playing control module is used for controlling the playing of the audio data according to the first processing strategy.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned playback control method.
An electronic device includes a memory and a processor, wherein the memory stores computer readable instructions, and the instructions, when executed by the processor, cause the processor to execute the above-mentioned play control method.
According to the playing control method and device, the computer-readable storage medium and the electronic device, the first processing strategy of the audio data is obtained, and the playing of the audio data is controlled according to the first processing strategy, so that the electronic device has the audio data being played, and when the earphone is pulled out or disconnected, the audio data being played can be processed in time according to different scenes and conditions, and the surrounding environment is prevented from being influenced. The playing control method improves the intelligence of the electronic equipment, and therefore the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings of the embodiments can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic internal structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a playing control method according to an embodiment of the present application;
fig. 3 is a schematic 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 illustrating 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 illustrating a method for determining whether to pause playing of the audio data according to first user habit data to obtain a second pause determination result according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a method for determining whether to pause playing of the audio data according to the first ambient environment data to obtain a third pause determination result according to an embodiment of the present application;
fig. 7 is a schematic 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 schematic flowchart of a playing control method according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a method for determining whether to resume playing of the audio data to obtain the second processing policy according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a method for determining whether to resume playing of the audio data according to second user setting data to obtain a first resumption determination result according to an embodiment of the present application;
fig. 11 is a flowchart illustrating a method for determining whether to resume playing of the audio data according to second user habit data to obtain a second pause determination result according to an embodiment of the present application;
fig. 12 is a flowchart illustrating a method for determining whether to resume playing of the audio data according to the earphone detachment time to obtain a third resumption determination result according to an embodiment of the present application;
fig. 13 is a schematic flowchart of a method for determining whether to resume playing of the audio data to obtain the second processing policy according to an embodiment of the present application;
fig. 14 is a schematic diagram of a framework of a play control apparatus according to an embodiment of the present application;
fig. 15 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention 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 an 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 used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory is used for storing data, programs, and/or instruction codes, and the like, and the memory stores at least one computer program which can be executed by the processor to realize the play control method suitable for the electronic device provided in the embodiment of the present application. The Memory may include a non-volatile 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 non-volatile 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 can be executed by a processor to implement 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 configured to display interface information of an application corresponding to a foreground process, and also may be configured to detect a touch operation applied to the display screen, and generate a corresponding instruction, such as a switching instruction for performing foreground and background applications.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the electronic devices to which the subject application may be applied, and that a particular electronic device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. For example, the electronic device further includes a network interface connected via the system bus, where the network interface may be an ethernet card or a wireless network card, and the like, and is used 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, which is 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 playing control method provided by the embodiment of the application is mainly used for controlling the playing and pausing 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 (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 an earphone.
As shown in FIG. 2, in one embodiment, the play control method includes S10-S40.
And S10, monitoring whether the electronic equipment has audio data being played.
The audio data may be audio data in audio playing, audio data in video playing, audio data in instant call, and the like. The electronic equipment can judge whether audio data which is being played exists according to the running condition of the audio data output program by monitoring the running condition of the current audio data output program in real time. For example, the electronic device monitors the running conditions of music playing software and video playing software in real time, and determines whether audio data is output. The electronic equipment can also judge whether the audio data which is being played exists according to whether the audio data is output from the earphone channel or not by monitoring the audio data output condition of the earphone channel in real time. For example, whether audio data is transmitted or not is determined according to whether audio data is transmitted through the wired earphone output channel or the wireless earphone output channel, and whether audio data is being played or not is determined.
And S20, if audio data which are being played exist in the electronic equipment, monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has a pulling-out or disconnecting behavior.
According to the judgment result of S20, if there is audio data being played in the electronic device, the electronic device 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 the interface data of the wired earphone. If the earphone is a wireless earphone, whether the earphone has a disconnection behavior or not can be judged by monitoring connection data of the wireless earphone and the electronic equipment.
And S30, if the earphone is pulled out or disconnected, acquiring a first processing strategy of the audio data.
If the electronic equipment has audio data being played and the earphone is pulled out or disconnected, the electronic equipment acquires a processing strategy for the audio data being played according to a preset algorithm. The first processing strategy can comprise a plurality of specific processing schemes, and the electronic equipment selects one or more processing schemes according to a preset selection algorithm. For example, the first processing policy may be to pause or play the audio data through the audio data output program, the first processing policy may be to switch an output channel of the audio data, and the first processing policy may also be to adjust an output volume of the audio data, and 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. The electronic equipment controls the playing of the audio data according to different conditions by executing the first processing strategy, and prevents the influence on the surrounding environment caused by playing the audio data by a loudspeaker or a receiver after the earphone is pulled out or disconnected.
For example, when listening to a song 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, executes the first processing strategy, controls the playing of the music, and prevents the music from being suddenly played through a loudspeaker after the earphone is pulled out or disconnected, thereby influencing people around to have a rest.
In this embodiment, the playing control method obtains the first processing policy for the audio data, and controls the playing of the audio data according to the first processing policy, so that the audio data being played by the electronic device can be processed in time according to different scenes and situations when the earphone is pulled out or disconnected, thereby preventing the surrounding environment from being affected. The playing control method provided by the embodiment improves the intelligence of the electronic equipment, thereby improving the user experience.
In one embodiment, in S30, the obtaining the first processing policy for the audio data includes:
s310, judging whether the audio data is paused to play or not, and obtaining the first processing strategy.
The first processing strategy comprises pausing or resuming play of the audio data. When the electronic equipment has audio data which is being played and the earphone is pulled out or disconnected, the electronic equipment judges whether the audio data is paused or continuously played according to a preset judgment rule. The judgment rule can be set according to actual requirements, and the method is not limited in the application. For example, the determination rule may be set according to the surrounding environment, according to the setting condition of the user, or according to the habit of the user, so as to meet different use environments and use requirements.
And 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, so that influence on the surrounding environment is prevented. And if the first processing strategy is to continue playing the audio data, the electronic equipment 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 conditions, so as to pause playing or continue playing of the audio data being played, thereby improving intelligence of audio playing processing and improving user experience.
Referring to fig. 3, in an embodiment, S310 specifically includes S311, S312, S313 and S314:
s311, whether the audio data is paused is judged according to the first user setting data, and a first pause judgment result is obtained.
The first user setting data refers to data preset by a user. The first user setting data is used for representing the processing mode of the audio data which is preferentially considered by the user when the earphone is pulled out or disconnected. The electronic equipment can show a selection item 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 audio data is paused to be played; 2) when the earphone is pulled out or disconnected, the audio data is continuously played.
Referring to fig. 4, in an embodiment, S311 specifically includes:
s3111, acquiring the first user setting data;
s3112, if the first user setting data includes preset pause data, pausing the playing of the audio data according to the first pause determination result;
otherwise, the first pause judgment result is that the audio data is continuously played.
The preset pause data refers to data preset by a user, namely that when the earphone is pulled out or disconnected, the audio data is paused. If the first user setting data acquired by the electronic equipment comprises the preset pause data, the user preferably selects to pause playing when the earphone is pulled out or disconnected. If so, the first pause judgment result is that the audio data is paused to be played; otherwise, the first pause judgment result is that the audio data is continuously played. In this embodiment, whether the audio data being played is paused is determined by the first user setting data, and the user experience is improved by fully considering the setting and the requirement of the user.
S312, whether the audio data is paused is judged according to the first user habit data, and a second pause judgment result is obtained.
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, playing frequency data and playing use channel data of the audio data of the user, and the like. 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 can be stored in a memory in advance, and can also be acquired by a server.
And the electronic equipment analyzes the first user habit data so as to judge whether the audio data is paused when the earphone is pulled out or disconnected, and a second pause judgment result is obtained. For example, according to the first user habit data analysis, when the earphone is pulled out or disconnected, the user habit clicks to pause playing or turn off the volume, and then the second pause judgment result is that the audio data is paused. Or, according to the first user habit data analysis, when the currently played song is mostly played by a loudspeaker in an audio playing program of the user, the second pause judgment result is that the audio data is paused. Or, according to the first user habit data, if the playing frequency of the currently played song by the user is low, the second pause judgment result is that the playing of the audio data is paused.
Referring to fig. 5, in an embodiment, S312 specifically includes:
s3121, obtaining pre-stored first user habit data;
s3122, if the number of pause data in the first user habit data is greater than a first preset threshold, the second pause judgment result is that the audio data is paused;
otherwise, the second pause judgment result is that the audio data is continuously played.
The pause data is data representing that the user habits are paused when the earphone is pulled out or disconnected from 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 earphone is pulled out or disconnected and the data of the user clicking the playing pause is larger than the first preset threshold, the playing pause is represented when the earphone is pulled out or disconnected. Therefore, the second pause determination result is that the playing of the audio data is paused. Otherwise, the second pause judgment result is that the audio data is continuously played. In this embodiment, whether the audio data is paused or not is determined according to the first user habit data, and different processing is performed on the audio data according to 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.
S313, whether the audio data is paused is judged according to the first ambient environment data, and a third pause judgment result is obtained.
The first ambient data refers to data representing ambient conditions in which the electronic device is located. In one embodiment, the first ambient data may include ambient noise volume data, time data, and the like. The ambient noise volume data is used to characterize the magnitude of noise in the environment in which the electronic device is currently located. The ambient noise volume data may be collected by a sensor such as a microphone provided in the electronic device. The environmental noise volume data can also be obtained by being issued by a server and the like. The time data refers to the fact that the current moment is a few minutes. The time data can be acquired through a network or a time module of the electronic equipment. It is to be understood that the first ambient data may also include other data representing the ambient environment according to different requirements, and the present application is not limited specifically.
And the electronic equipment judges whether the audio data is paused according to the first ambient environment data by combining a preset judgment criterion, and obtains a third pause judgment result.
Referring to fig. 6, in an embodiment, S313 specifically includes:
s3131, acquiring first ambient environment data;
s3132, if the first ambient data meets a first predetermined condition, pausing the playing of the audio data according to the third pause determination result;
otherwise, the third pause judgment result is that the audio data is continuously played.
The first preset condition can be set according to actual requirements. When the first ambient environment data meets a first preset condition, it indicates that the ambient environment meets a condition for pausing the playing of the audio data, and the third paused result is that the playing of the audio data is paused. Otherwise, the third pause judgment result is that the audio data continues to be played.
In an embodiment, the first ambient environment data includes the ambient noise volume data, and in S3132, if the first ambient environment data satisfies a first predetermined condition, the third pause determination result is to pause the playing of the audio data, specifically:
and if the environmental noise volume data is smaller than a second preset threshold, the third pause judgment result is that the audio data is paused to be played.
The second preset threshold value can be set according to actual requirements. And when the ambient noise volume data is smaller than the second preset threshold, the ambient environment is quiet, 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 ambient noise volume data is smaller than the second preset threshold, the third pause determination result is that the audio data is paused. Otherwise, the third pause judgment result is that the audio data is continuously played. In this embodiment, the ambient environment where the electronic device is currently located is determined according to the ambient noise volume data, and the audio data is processed differently according to different ambient environments, so that the audio data is prevented from being played in environments where the ambient environment is relatively quiet and unsuitable for using a speaker or a receiver. The method provided by the embodiment further improves the intelligence of audio playing control and improves the user experience.
In an embodiment, the first ambient environment data includes time data, and in S3132, if the first ambient environment data satisfies a first preset condition, the third pause determination result is to pause playing of the audio data, specifically:
and if the time data is in a preset range, the third pause judgment result is that the audio data is paused to be played.
The preset range can be set according to actual requirements, and can also be set and selected by a user. The time data within the preset range represents a time period suitable for pausing the 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: noon break period of 00. And if the current time is within the preset time period, the third pause judgment result is that the audio data is paused to be played. Otherwise, the third pause judgment result is that the audio data is continuously played. In this embodiment, the current surrounding environment of the electronic device is determined according to the time data, and the audio data is processed differently according to different surrounding environments, so that the audio data is prevented from being played in an environment unsuitable for using a speaker or a receiver, such as at night or during a rest time. The method provided by the embodiment further improves the intelligence of audio playing control and improves the user experience.
And S314, judging whether the audio data is paused according to the first pause judgment result, the second pause judgment result and the third pause judgment result to obtain the first processing strategy.
And the electronic equipment obtains the first processing strategy according to a preset algorithm and the judgment results of S311, S312 and S313. The electronic device may obtain various algorithms of the first processing policy according to the determination results of S311, S312, and S313, and the application is not particularly limited.
In one embodiment, S314 includes:
if at least one of the first pause determination result, the second pause determination result and the third pause determination 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.
The method provided by the embodiment fully considers user settings, user habits and surrounding environment conditions to judge whether the audio data being played is paused when the earphone is pulled out or disconnected, thereby improving intelligence and further improving user experience.
Referring to fig. 7, in an embodiment, in step S310, the determining whether to pause the playing of the audio data to obtain the first processing policy may further be performed to determine whether to pause the playing of the audio data according to the first user setting data, the first user habit data, and the first environmental environment data in sequence. S310 specifically includes:
s311, whether the audio data is paused is judged according to the first user setting data, and a first pause judgment result is obtained.
The specific process of this step is the same as the process of S311 described above, and is not described herein again.
S312', if the first pause determination result indicates that the playing of the audio data is paused, the first processing policy indicates that the playing of the audio data is paused.
That is, if the first pause determination result is that the playing of the audio data is paused, the process may proceed to step S40, where the electronic device pauses the playing of the audio data.
In one embodiment, after S311, the method further comprises:
s313', if the first pause determination result is that the audio data is to be continuously played, determining whether to pause the playing of the audio data according to the first user habit data, and obtaining a second pause determination result.
Whether the audio data is paused according to the first user habit data is judged, and the specific process of obtaining the second pause judgment result is the same as the process of the step S312, which is not described herein again.
S314', if the second pause determination result indicates that the playing of the audio data is paused, the first processing policy indicates that the playing of the audio data is paused.
That is, if the second pause determination result is that the playing of the audio data is paused, the process may proceed to step S40, where the electronic device pauses the playing of the audio data.
In one embodiment, after S313', the method further comprises:
s315', if the second pause determination result indicates that the audio data is to be played continuously, determining whether to pause the playing of the audio data according to the first ambient environment data, and obtaining a third pause determination result.
Whether the audio data is paused according to the first ambient environment data is judged, and a specific process of obtaining a third pause judgment result is the same as the process of S313, which is not described herein again.
S316', if the third pause determination result indicates that the playing of the audio data is paused, the first processing policy indicates that the playing of the audio data is paused;
s317', if the third pause determination result indicates that the audio data is to be played continuously, the first processing policy indicates that the audio data is to be played continuously.
And obtaining the first processing strategy according to the third pause judgment result. And the electronic equipment processes the audio data which is played according to the first processing strategy.
The method provided by the embodiment judges whether the audio data is paused according to the first user setting data, the first user habit data and the first ambient environment data in sequence, the judgment efficiency is high, and the memory can be effectively saved.
The above embodiment is a control method for the audio data being played when the earphone is unplugged or disconnected. A method for controlling the audio data that has been paused when the headphone is inserted or connected again will be described below with reference to an 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, then,
and monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has insertion or connection behaviors.
And when the earphone is pulled out or disconnected, pausing the playing of the audio data which is being played according to the first processing strategy, and further monitoring the connection state of the earphone and the electronic equipment by 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 is not repeated here.
And S60, if the earphone has the insertion or connection behavior, 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 through the audio data output program, the second processing policy may be to switch an output channel of the audio data, and the second processing policy may also be to adjust an output volume of the audio data, and the like.
S70, controlling the playing of the audio data according to the second processing strategy.
And when the earphone is inserted or connected, the electronic equipment switches the audio output channel into the earphone channel according to a preset switching rule. 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, the intelligence of the playing control of the audio data is further improved, and therefore the user experience is improved.
In one embodiment, in S60, the obtaining the second processing policy for the audio data includes:
s610, judging whether the audio data is restored to be played or not, and obtaining the second processing strategy.
The second processing strategy comprises resuming playing or resuming pausing of the paused audio data. And the electronic equipment judges whether the audio data which is subjected to the precious pause resumes to be played or continues to pause according to a preset judgment rule. The judgment rule can be set according to actual requirements, and the method is not limited in the application. For example, the determination rule may be set according to the surrounding environment, according to the setting condition of the user, or according to the habit of the user, so as to meet different use environments and use requirements.
And 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. And if the second processing strategy is to continue pausing the audio data, the electronic equipment does not process the audio data, and the audio data continues to maintain a paused state.
In this embodiment, the method determines whether to resume playing the audio data according to different conditions, so as to resume playing or continue pausing the audio data in a paused state, thereby improving the intelligence of audio playing processing and improving the experience of a user.
Referring to fig. 9, in one embodiment, S610 includes S611, S612, S613, and S614:
s611, judging whether the audio data is recovered to be played according to the second user setting data to obtain a first recovery judgment 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 the user when the earphone is inserted or connected. The electronic device may display a selection item to a user through a system setting interface or a setting interface of the audio data program to collect and acquire the second user setting data.
For example, the second user setting data may be: 1) when the earphone is plugged or connected, the audio data is restored to be played; 2) the audio data continues to be paused while the headset is plugged in or connected.
Referring to fig. 10, in one embodiment, S611 includes:
s6111, acquiring the second user setting data;
s6112, if the second user setting data includes preset recovery data, the first recovery determination result is to recover playing of the audio data;
otherwise, the first recovery judgment result is that the audio data is continuously suspended.
The preset recovery data refers to data preset by a user, namely 'when the earphone is inserted or connected, the audio data is recovered to be played'. If the second user setting data acquired by the electronic device includes the preset recovery data, it indicates that the user preferentially selects to recover the playing when the earphone is plugged or connected. Then, the first recovery judgment result is to recover the playing of the audio data; otherwise, the first resuming judgment result is that the audio data is continuously paused. In this embodiment, whether to perform replay playing on the audio data in the paused state is determined by setting data by the second user, and the user experience is improved by fully considering the setting and the requirement of the user.
And S612, judging whether the audio data is resumed to be played according to the second user habit data to obtain a second pause judgment 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 plugged or connected, playing frequency data and playing use channel data of the user for the audio data, and the like. 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 can be stored in the memory in advance, or can be acquired by the server.
And the electronic equipment analyzes the second user habit data so as to judge whether to restore the playing of the audio data when the earphone is plugged or connected, and obtain a second restoration judgment result. For example, according to the second user habit data analysis, when the earphone is plugged in or connected, the user habit clicks a play button or starts the volume, and then the second recovery judgment result is that the audio data is recovered to be played. Or, according to the second user habit data analysis, when most of the currently played songs in the audio playing program of the user are played by earphones, the second recovery judgment result is that the audio data is recovered to be played. Or, according to the second user habit data, if the playing frequency of the currently played song by the user is high, the second recovery judgment result is that the audio data is recovered to be played.
Referring to fig. 11, in one embodiment, S612 includes:
s6121, acquiring the pre-stored second user habit data;
s6122, if the amount of the recovered data in the second user habit data is greater than a third preset threshold, the second recovery determination result is to recover the playing of the audio data;
otherwise, the second pause judgment result is that the audio data is paused continuously.
The recovery data refers to data representing user habits and recovering playing 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 earphone is inserted or connected and the data that the user clicks to resume playing is larger than the third preset threshold, it indicates that the user habit resumes playing when the earphone is inserted or connected. Therefore, the second recovery determination result is to recover the playing of the audio data. Otherwise, the second resuming judgment result is that the audio data is continuously paused. In this embodiment, whether the audio data is resumed to be played is determined according to the second user habit data, and different processing is performed on the audio data according to 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.
S613, judging whether to resume playing of the audio data according to the earphone disengagement time to obtain a third resumption judgment result.
The earphone disengagement time is the time difference from the time when the earphone is pulled out or disconnected last time to the time when the earphone is inserted or connected this time. For example, if the user has pulled out or disconnected the earphone for 35 minutes at 14 hours last and the user has plugged in or connected the earphone for 45 minutes at 14 hours this time, the earphone detachment time is 10 minutes. The earphone detachment time can be acquired through a network or a time module of the electronic equipment.
And the electronic equipment judges whether the audio data is restored to be played or not according to the earphone disengagement time and a preset judgment criterion, so as to obtain a third restoration judgment result.
Referring to fig. 12, in one embodiment, S613 includes:
s6131, acquiring earphone detachment time;
s6132, if the earphone detachment time is less than a preset time threshold, the second recovery determination result is to recover playing of the audio data;
otherwise, the second recovery judgment result is that the audio data is continuously suspended.
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 detachment time is less than 15 minutes, the second recovery determination result is to recover playing of the audio data. On the contrary, when the earphone detachment time is greater than 15 minutes, the second recovery judgment result is that the audio data is suspended continuously. The method provided by the embodiment further improves the intelligence of audio playing control and improves the user experience.
And S614, judging whether the audio data is restored to be played according to the first restoration judgment result, the second restoration judgment result and the third restoration judgment result to obtain the second processing strategy.
And the electronic equipment obtains the second processing strategy according to a preset algorithm and the judgment results of S611, S612 and S613. The electronic device may obtain various algorithms of the second processing policy according to the determination results of S611, S612, and S613, which is not specifically limited in this application.
In one embodiment, S614 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 the playing of the audio data, the second processing strategy is to recover the playing of the audio data;
otherwise, the second processing policy is to continue pausing the audio data.
The method provided by the embodiment sufficiently considers the conditions of user setting, user habits, earphone disengagement time and the like 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 an embodiment, in step S610, the determining whether to resume playing the audio data to obtain the second processing policy may further be performed to determine whether to pause playing the audio data according to the second user setting data, the second user habit data, and the earphone drop time in sequence. S610 specifically includes:
s611, judging whether the audio data is recovered to be played according to the second user setting data to obtain a first recovery judgment result.
The specific process of this step is the same as the process of S611, and is not described herein again.
S612', if the first recovery determination result indicates that the audio data is to be recovered for playing, the second processing strategy indicates that the audio data is to be recovered for playing.
That is, if the first recovery determination result is that the audio data is recovered to be played, the process may proceed to step S70, where the electronic device recovers to play the audio data.
In one embodiment, after S611, the method further comprises:
s613', if the first resume judgment result indicates that the audio data is suspended, determining whether to resume playing of the audio data according to second user habit data, to obtain a second resume judgment result.
And judging whether to resume playing of the audio data according to the second user habit data, wherein a specific process of obtaining a second resumption judgment result is the same as the process of the step S612, and is not described herein again.
S614', if the second recovery determination result indicates that the audio data is to be recovered for playing, the second processing strategy indicates that the audio data is to be recovered for playing.
That is, if the second recovery determination result is that the audio data is recovered to be played, the process may proceed to step S70, where the electronic device recovers to play the audio data.
In one embodiment, after S613', the method further comprises:
and S615', if the second recovery judgment result is that the audio data is suspended continuously, judging whether the audio data is recovered to be played according to the earphone separation time, and obtaining a third recovery judgment result.
Whether the audio data is resumed to be played or not is determined according to the earphone disengagement time, and a specific process of obtaining a third resumption determination result is the same as the process of S613, which is not described herein again.
S616', if the third recovery determination result indicates that the audio data is to be recovered for playing, the second processing strategy indicates that the audio data is to be recovered for playing;
s617', if the third resumption determination result indicates that the audio data is to be paused continuously, the second processing policy indicates that the audio data is to be paused continuously.
And obtaining the second processing strategy according to the third recovery judgment result. And the electronic equipment processes the audio data in the suspended state according to the second processing strategy.
The method provided by the embodiment judges whether to resume playing of the audio data according to the second user setting data, the second user habit data and the earphone disengagement time in sequence, the judgment efficiency is high, and the memory can be effectively saved.
Referring to fig. 14, an embodiment of the present application provides a playback control apparatus 10 applied to an electronic device, where the apparatus includes a playback monitoring module 100, a first headphone monitoring module 200, a first policy obtaining module 300, and a first playback control module 400. Wherein the content of the first and second substances,
the playing monitoring module 100 is configured to monitor whether there is audio data being played in the electronic device;
the first earphone monitoring module 200 is configured to monitor a connection state between an earphone and the electronic device when audio data being played exists in the electronic device, and determine whether the earphone has a pulling-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 is unplugged or disconnected;
the first playing control module 400 is configured to control the playing of the audio data according to the first processing policy.
In an 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 obtaining module 300 includes:
the first pause judging unit is used for judging whether the audio data is paused according to the first user setting data to obtain a first pause judging result;
the second pause judging unit is used for judging whether the audio data is paused according to the first user habit data to obtain a second pause judging result;
the third pause judging unit is used for judging whether the audio data is paused according to the first ambient environment data to obtain a third pause judging result;
and the first comprehensive judgment unit is used for judging whether the audio data is paused according to the first pause judgment result, the second pause judgment result and the third pause judgment result to obtain the first processing strategy.
In one embodiment, the first comprehensive judgment unit is specifically configured to:
when at least one of the first pause judgment result, the second pause judgment result and the third pause judgment result is that the audio data is paused, judging that the first processing strategy is that the audio data is paused; otherwise, judging that the first processing strategy is to continue playing the audio data.
In one embodiment, the first suspension judgment unit includes a first user setting data acquisition subunit and a first user setting data judgment subunit. The first user setting data acquisition subunit is used for acquiring the first user setting data; the first user setting data judgment subunit is configured to judge that the first pause judgment result is that the playing of the audio data is paused when the first user setting data includes preset pause data; otherwise, the first pause judgment result is judged to be that the audio data is continuously played.
In one embodiment, the second pause judging unit includes a first user habit data acquiring sub-unit and a first user habit judging sub-unit. The first user habit data acquiring subunit is used for acquiring pre-stored first user habit data; the first user habit judging subunit is configured to, when the number of pause data in the first user habit data is greater than a first preset threshold, judge that the second pause judgment result is that the audio data is paused; otherwise, the second pause judgment result is judged to be 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 ambient environment data acquisition subunit is configured to acquire first ambient environment data; the ambient environment data judgment subunit is configured to judge that the third pause judgment result is that the audio data is paused when the first ambient environment data meets a first preset condition; otherwise, the third pause judgment result is judged to be that the audio data is continuously played.
In an embodiment, the first ambient data includes ambient noise volume data, and the ambient data obtaining subunit is configured to determine that the third pause determination result is that the audio data is paused when the ambient noise volume data is smaller than a second preset threshold.
In an embodiment, the first ambient data includes time data, and the ambient data obtaining subunit is configured to determine that the third pause determination result is that the playing of the audio data is paused when the time data is within a preset range.
In one embodiment, the first pause judging unit is configured to judge whether to pause the 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 judgment result is that the audio data is paused, judging that the first processing strategy is that the audio data is paused.
In an embodiment, the second pause determining unit is configured to determine whether to pause the playing of the audio data according to the first user habit data to obtain a second pause determining result when the first pause determining result indicates that the playing of the audio data is to be continued; and if the second pause judgment result indicates that the audio data is paused, judging that the first processing strategy is the pause of the audio data.
In an embodiment, the third pause determining unit is configured to determine whether to pause the playing of the audio data according to the first ambient environment data to obtain a third pause determining result when the second pause determining result indicates that the playing of the audio data is to be continued; when the third pause judgment result indicates that the audio data is paused, judging that the first processing strategy is to pause the audio data; and when the third pause judgment result indicates that the audio data is continuously played, judging that the first processing strategy is to continuously play the audio data.
In one embodiment, the apparatus further comprises a second headphone monitoring module, a second policy acquisition module, and a second play control module. Wherein the content of the first and second substances,
the second earphone monitoring module is used for monitoring the connection state of the earphone and the electronic equipment and judging whether the earphone has an insertion or connection behavior when the first processing strategy is that the audio data is paused to be played;
the second strategy acquisition module is used for acquiring a second processing strategy for the audio data when the earphone has an insertion or connection behavior;
and the second playing control module is used for controlling the playing of the audio data according to the second processing strategy.
In an embodiment, the second policy obtaining module is configured to determine whether to resume playing of the audio data, so as to obtain the second processing policy.
In one embodiment, the second policy obtaining module includes:
the first recovery judging unit is used for judging whether the audio data is recovered to be played according to the second user setting data to obtain a first recovery judging result;
the second recovery judging unit is used for judging whether the audio data is recovered to be played according to second user habit data to obtain a second pause judging result;
the third recovery judging unit is used for judging whether the audio data is recovered to be played according to the earphone disengagement time to obtain a third recovery judging result;
and the second comprehensive judgment unit is used for judging whether the audio data is restored to be played according to the first restoration judgment result, the second restoration judgment result and the third restoration judgment result to obtain the second processing strategy.
In one embodiment, the second comprehensive judgment unit is specifically configured to:
when at least one of the first recovery judgment result, the second recovery judgment result and the third recovery judgment result is to recover the playing of the audio data, judging that the second processing strategy is to recover the playing of the audio data; otherwise, the second processing strategy is judged to be that the audio data is continuously paused.
In one embodiment, the first restoration judgment unit includes a second user setting data acquisition sub-unit and a second user setting data judgment sub-unit. 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, when the second user setting data includes preset restoration data, judge that the first restoration judgment result is restoration playing of the audio data; otherwise, the first recovery judgment result is judged to be that the audio data is continuously suspended.
In one embodiment, the second recovery determining unit includes a second user habit data obtaining sub-unit and a second user habit data determining sub-unit. The second user habit data acquiring subunit is configured to acquire pre-stored second user habit data; the second user habit data judging subunit is configured to, when the quantity of the recovered data in the second user habit data is greater than a third preset threshold, judge that the second recovery judgment result is to recover the playing of the audio data; otherwise, the second recovery judgment result is judged to be that the audio data is continuously suspended.
In one embodiment, the third recovery judging unit includes an earphone detachment time acquiring subunit and an earphone detachment time judging subunit. The earphone disengagement time acquisition subunit is used for acquiring earphone disengagement time; the earphone disengagement time judging subunit is configured to judge that the second recovery judgment result is to recover playing of the audio data when the earphone disengagement time is smaller than a preset time threshold; otherwise, the second recovery judgment result is judged to be that the audio data is continuously suspended.
In one embodiment, the first recovery judging unit is configured to judge whether to recover the playing of the audio data according to second user setting data, so as to obtain a first recovery judging result; and when the first recovery judgment result is that the audio data is recovered to be played, judging that the second processing strategy is that the audio data is recovered to be played.
In an embodiment, the second resuming determining unit is configured to determine whether to resume playing of the audio data according to second user habit data to obtain a second resuming determining result when the first resuming determining result indicates that the audio data is paused continuously; and if the second recovery judgment result is that the audio data is recovered to be played, the second processing strategy is that the audio data is recovered to be played.
In an embodiment, the third resuming determining unit is configured to determine whether to resume playing of the audio data according to earphone disengagement time when the second resuming determination result indicates that the audio data is continuously paused, so as to obtain a third resuming determination result; if the third recovery judgment result is that the audio data is recovered to be played, the second processing strategy is that the audio data is recovered to be played; and if the third recovery judgment result indicates that the audio data is continuously suspended, the second processing strategy indicates that the audio data is continuously suspended.
The implementation principle and technical effect of the play control device provided in the above embodiment are similar to those of the above embodiment, and are not described herein again.
The division of each module in the playback control apparatus is only for illustration, and in other embodiments, the playback control apparatus may be divided into different modules as needed to complete all or part of the functions of the playback control apparatus.
All or part of the modules in the playback control apparatus can be implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the electronic device, or can be stored in a memory in the electronic device in a software form, so that the processor can call and execute operations corresponding to the 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 the steps of 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, which when executed by one or more processors, may further cause the processors to perform the playback control method in any of the above embodiments.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
The embodiment of the application also provides the 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 details of the technology are not disclosed, please refer to the method portion of the embodiments of the present application. The electronic device may be any terminal device having a voice call function and a speaker, including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the electronic device as the mobile phone as an example:
fig. 15 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 15, the cellular phone 1000 includes: radio Frequency (RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (WiFi) module 1070, processor 1080, and power source 1090. Those skilled in the art will appreciate that the handset configuration shown in fig. 15 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 1010 may be configured to receive and transmit signals during information transmission and reception or during a call, and may receive downlink information of a base station and then process the received downlink information to the processor 1080; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 1020 can be used for storing software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by operating 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, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the 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 storage 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 cellular phone 1000. Specifically, 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 by a user (e.g., operations by a user on or near the touch panel 1031 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 1031 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a 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 (such as 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 cellular 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 (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 1031 can overlay the display panel 1041, and when the touch panel 1031 detects a touch operation on or near the touch panel 1031, the touch operation is transmitted to the processor 1080 to determine the type of the touch event, and then the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in fig. 15, the touch panel 1031 and the display panel 1041 are two separate components to implement the input and output 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 cell phone 1000 may also include at least one sensor 1050, such as a light sensor, 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 magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 1060, speaker 1061, and microphone 1062 may provide an audio interface between a user and a cell phone. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and the electrical signal is converted into a sound signal by the speaker 1061 and output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and the audio data is processed by the audio data output processor 1080 and then transmitted to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1070, which provides wireless broadband internet access for the user. Although fig. 15 shows the WiFi module 1070, it is to be understood that it does not belong to the essential constitution of the handset 1000 and may be omitted as needed.
The processor 1080 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the mobile phone. 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 handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1080.
The handset 1000 also includes a power supply 1090 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1080 via a power management system that may be configured to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 1000 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, the steps of S10-S40 described above are implemented when the processor 1080 included in the electronic device executes the computer program stored on the memory.
It should be noted that, an electronic device includes a memory and a processor, where the memory stores computer readable instructions, and the instructions, when executed by the processor, cause the processor to execute the steps of the audio processing method in any of the above embodiments.
The implementation principle and technical effect of the electronic device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile 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 (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (25)

  1. A play control method is applied to electronic equipment, and the method comprises the following steps:
    monitoring whether audio data which are being played exist in the electronic equipment;
    if audio data which are being played exist in the electronic equipment, monitoring the connection state of an earphone and the electronic equipment, and judging whether the earphone has a pulling-out or disconnection behavior;
    if the earphone is pulled out or disconnected, a first processing strategy for the audio data is obtained; and controlling the playing of the audio data according to the first processing strategy.
  2. The method of claim 1, wherein the obtaining a first processing policy for the audio data comprises:
    and judging whether the audio data is paused to be played or not to obtain the first processing strategy.
  3. The method of claim 2, wherein the determining whether to pause the playing of the audio data to obtain the first processing policy comprises:
    judging whether the audio data is paused according to first user setting data to obtain a first pause judgment result;
    judging whether the audio data is paused according to the first user habit data to obtain a second pause judgment result;
    judging whether the audio data is paused according to the first ambient environment data to obtain a third pause judgment result;
    and judging whether the audio data is paused to be played according to the first pause judgment result, the second pause judgment result and the third pause judgment result to obtain the first processing strategy.
  4. The method according to claim 3, wherein the determining whether to pause the playing 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 determination result, the second pause determination result and the third pause determination 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.
  5. The method of claim 3, wherein the determining whether to pause 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 judgment result is that the audio data is paused to be played;
    otherwise, the first pause judgment result is that the audio data is continuously played.
  6. The method of claim 3, wherein the determining whether to pause the audio data according to the first user habit data to obtain a second pause determination result comprises:
    acquiring prestored first user habit data;
    if the number of pause data in the first user habit data is larger than a first preset threshold value, the second pause judgment result is that the audio data is paused to be played;
    otherwise, the second pause judgment result is that the audio data is continuously played.
  7. The method of claim 3, wherein the determining whether to pause the audio data according to the first ambient environment data to obtain a third pause determination result comprises:
    acquiring first ambient environment data;
    if the first ambient environment data meets a first preset condition, the third pause judgment result is that the audio data is paused to be played;
    otherwise, the third pause judgment result is that the audio data is continuously played.
  8. The method of claim 7, wherein the first ambient data includes ambient noise volume data, and the third pause determination result indicates that the audio data is paused if the first ambient data satisfies a first predetermined condition, and the method includes:
    and if the environmental noise volume data is smaller than a second preset threshold, the third pause judgment result is that the audio data is paused to be played.
  9. The method of claim 7, wherein the first environmental data includes time data, and the third pause determination result indicates that the audio data is paused if the first environmental data satisfies a first predetermined condition, and the method includes:
    and if the time data is in a preset range, the third pause judgment result is that the audio data is paused to be played.
  10. The method of claim 2, wherein the determining whether to pause the playing of the audio data to obtain the first processing policy comprises:
    judging whether the audio data is paused according to first user setting data to obtain a first pause judgment result;
    and if the first pause judgment result indicates that the audio data is paused, the first processing strategy indicates that the audio data is paused.
  11. The method of claim 10, wherein after determining whether to pause the audio data according to the first user setting data and obtaining a first pause determination result, the method further comprises:
    if the first pause judgment result is that the audio data is continuously played, judging whether the audio data is paused according to the first user habit data to obtain a second pause judgment result;
    and if the second pause judgment result indicates that the audio data is paused, the first processing strategy indicates that the audio data is paused.
  12. The method of claim 11, wherein after determining whether to pause the audio data according to the first user habit data and obtaining a second pause determination result, the method further comprises:
    if the second pause judgment result is that the audio data is continuously played, judging whether the audio data is paused according to the first ambient environment data to obtain a third pause judgment result;
    if the third pause judgment result indicates that the audio data is paused, the first processing strategy indicates that the audio data is paused;
    and if the third pause judgment result indicates that the audio data is continuously played, the first processing strategy indicates that the audio data is continuously played.
  13. The method of claim 1, wherein after said controlling playback of the audio data according to the first processing policy, the method further comprises:
    if the first processing strategy is to pause the playing of the audio data, then,
    monitoring the connection state of the earphone and the electronic equipment, and judging whether the earphone has insertion or connection behavior;
    if the earphone has an insertion or connection behavior, acquiring a second processing strategy for the audio data;
    and controlling the playing of the audio data according to the second processing strategy.
  14. The method of claim 13, wherein the obtaining a second processing policy for the audio data comprises:
    and judging whether the audio data is restored to be played or not to obtain the second processing strategy.
  15. The method of claim 14, wherein the determining whether to resume playing the audio data, resulting in the second processing policy, comprises:
    judging whether the audio data is restored to be played according to second user setting data to obtain a first restoration judgment result;
    judging whether the audio data is resumed to be played according to second user habit data to obtain a second pause judgment result;
    judging whether the audio data is restored to be played according to the earphone disengagement time to obtain a third restoration judgment result;
    and judging whether to resume playing of the audio data according to the first resumption judgment result, the second resumption judgment result and the third resumption judgment result to obtain the second processing strategy.
  16. The method of claim 15, wherein the determining whether to resume playing of the audio data according to the first resumption judgment result, the second resumption judgment result, and the third resumption judgment result to obtain the second processing policy 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 the playing of the audio data, the second processing strategy is to recover the playing of the audio data;
    otherwise, the second processing policy is to continue pausing the audio data.
  17. The method of claim 15, wherein said determining whether to resume playing of the audio data according to the second user setting data, resulting in a first resumption determination, comprises:
    acquiring the second user setting data;
    if the second user setting data comprises preset recovery data, the first recovery judgment result is that the audio data is recovered to be played;
    otherwise, the first recovery judgment result is that the audio data is continuously suspended.
  18. The method of claim 15, wherein the determining whether to resume playing the audio data according to the second user habit data to obtain a second pause determination result comprises:
    acquiring the second pre-stored user habit data;
    if the quantity 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 and played;
    otherwise, the second recovery judgment result is that the audio data is continuously suspended.
  19. The method of claim 15, wherein the determining whether to resume playing of the audio data according to the earphone drop-off time to obtain a third resumption determination result comprises:
    acquiring earphone disengagement time;
    if the earphone disengagement 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 judgment result is that the audio data is continuously suspended.
  20. The method of claim 14, wherein the determining whether to resume playing the audio data, resulting in the second processing policy, comprises:
    judging whether the audio data is restored to be played according to second user setting data to obtain a first restoration judgment result;
    and if the first recovery judgment result indicates that the audio data is recovered to be played, the second processing strategy indicates that the audio data is recovered to be played.
  21. The method as claimed in claim 20, wherein the determining whether to resume playing of the audio data according to the second user setting data, after obtaining the first resumption determination result, the method further comprises:
    if the first recovery judgment result is that the audio data is continuously paused, judging whether to recover the playing of the audio data according to second user habit data to obtain a second recovery judgment result;
    and if the second recovery judgment result is that the audio data is recovered to be played, the second processing strategy is that the audio data is recovered to be played.
  22. The method of claim 21, wherein after determining whether to resume playing the audio data according to the second user habit data and obtaining a second resumption determination result, the method further comprises:
    if the second recovery judgment result is that the audio data is suspended continuously, judging whether the audio data is recovered to be played according to earphone disengagement time to obtain a third recovery judgment result;
    if the third recovery judgment result is that the audio data is recovered to be played, the second processing strategy is that the audio data is recovered to be played;
    and if the third recovery judgment result indicates that the audio data is continuously suspended, the second processing strategy indicates that the audio data is continuously suspended.
  23. A play control apparatus applied to an electronic device, the apparatus comprising:
    the playing monitoring module is used for monitoring whether audio data which are being played exist in the electronic equipment;
    the first earphone monitoring module is used for monitoring the connection state of an earphone and the electronic equipment when audio data which is being played exists in the electronic equipment, and judging whether the earphone is pulled out or disconnected;
    the first strategy acquisition module is used for acquiring a first processing strategy of the audio data when the earphone is pulled out or disconnected; and
    and the first playing control module is used for controlling the playing of the audio data according to the first processing strategy.
  24. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the playback control method according to any one of claims 1 to 22.
  25. 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 a playback control method as claimed in any one of claims 1 to 22.
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 true CN113039518A (en) 2021-06-25
CN113039518B 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)

Cited By (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
WO2023098551A1 (en) * 2021-12-01 2023-06-08 维沃移动通信有限公司 Audio adjusting method and audio adjusting apparatus

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

Cited By (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
WO2023098551A1 (en) * 2021-12-01 2023-06-08 维沃移动通信有限公司 Audio adjusting method and audio adjusting apparatus

Also Published As

Publication number Publication date
CN113039518B (en) 2023-12-05
WO2020113525A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
CN108683798B (en) Sound output control method and mobile terminal
CN108322599B (en) Network access method and mobile terminal
CN112997470B (en) Audio output control method and device, computer readable storage medium and electronic equipment
CN109088997B (en) Game audio control method, terminal and computer readable storage medium
CN111371705B (en) Download task execution method and electronic device
CN106506437B (en) Audio data processing method and device
CN112019929A (en) Volume adjusting method and device
CN108848267B (en) Audio playing method and mobile terminal
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN112805988B (en) Call control method and device, computer readable storage medium and electronic equipment
CN114077414A (en) Audio playing control method and device, electronic equipment and storage medium
CN106126170B (en) Sound effect setting method of terminal and terminal
CN113039518B (en) Playing control method and device, computer readable storage medium and electronic equipment
CN111417929A (en) Interface display method and control terminal
CN106454953B (en) Flow control method, device and terminal
CN111694536A (en) Audio control method, electronic device and computer-readable storage medium
WO2020124541A1 (en) Audio processing method and apparatus, computer readable storage medium, and electronic device
CN106817621B (en) Mobile terminal and video backup and play method and device thereof
CN110083205B (en) Page switching method, wearable device and computer-readable storage medium
CN110187893B (en) Method for deleting application, mobile terminal and computer readable storage medium
CN106713668B (en) Method and device for controlling vibration of terminal
CN109040425B (en) Information processing method and related product
CN115037831A (en) Mode control method and device, electronic equipment and earphone
CN111796748A (en) Control method and device
CN113168302A (en) Audio mode correction method and device and electronic equipment

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