Determine the method and system of the application program played sound
Technical field
The present invention relates to application identification technical field, particularly relate to the method and system of the application program determining playing sound.
Background technology
Along with the raising of electronic equipment performance, the application program that the electronic equipment such as mobile phone, panel computer, computing machine of user is installed also gets more and more.
In order to have better interaction effect when carrying out mutual with user, many application programs can control electronic equipment and sound, such as various music application program, video playback application program, network radio station application program, sound reading application program, voice-enabled chat application program etc.Run in the electronic equipment of user have multiple when can control the application program that electronic equipment sounds, if electronic equipment have issued sound, user may and do not know the sound that the application program which is running sends.If user wishes this is being controlled to the application program that electronic equipment sounds and operates, need first to find this application program.According to existing mode of operation, user needs the interface of opening each application program run respectively, and then determines to control according to the broadcast state at interface the application program that electronic equipment sounds.
Visible, existing mode of operation efficiency is lower, not only be not easy to user use, and the unnecessary consumption of electronic equipment resource also can be caused in the interface of repeatedly opening application program, the application program how helping user to find fast to control electronic equipment and sounding, is still a technical matters urgently to be resolved hurrily.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of method and system determining the application program played sound, and finds the application program controlling electronic equipment and sounding to help user fast.
For achieving the above object, the embodiment of the invention discloses a kind of method determining the application program played sound, be applied to electronic equipment, described method comprises:
Inquire about the process identification (PID) of the process played sound;
According to the corresponding relation of process identification (PID) and application program, determine the application program that the described process identification (PID) that inquires is corresponding;
On the display screen of described electronic equipment, show the icon of determined application program.
Optionally, shown icon has default display effect.
Optionally, the process identification (PID) of the process that described inquiry is playing sound, comprising:
After the application queries operation receiving user, inquire about the process identification (PID) of the process played sound;
Or,
After having detected that process plays sound, inquire about the process identification (PID) of the process played sound.
Optionally, also comprise:
Receive user for the clicking operation of described icon, show the interface of determined application program according to described clicking operation;
Or,
Receive the process shut-down operation of user, stop the operation of the process played sound according to described process shut-down operation.
Optionally, described electronic equipment is mobile terminal, and described application queries is operating as: the query manipulation of the application program run.
Optionally, the process identification (PID) of the process that described inquiry is playing sound, comprising:
Inquired about by the process identification (PID) of voice output passage Audio Track to the process of the audio flinger module transfer voice data of audio subsystem by application programming interface.
Determine a system for the application program played sound, be applied to electronic equipment, described system comprises: process query unit, application determining unit and icon display unit,
Described process query unit, for inquiring about the process identification (PID) of the process played sound;
Described application determining unit, for the corresponding relation according to process identification (PID) and application program, determines the application program that the described process identification (PID) that inquires is corresponding;
Described icon display unit, for the display screen at described electronic equipment, shows the icon of determined application program.
Optionally, shown icon has default display effect.
Optionally, described process query unit, comprising: action queries subelement or detection inquiry subelement,
Described action queries subelement, for after the application queries operation receiving user, inquires about the process identification (PID) of the process played sound;
Described detection inquiry subelement, for after having detected that process plays sound, has inquired about the process identification (PID) of the process played sound.
Optionally, also comprise: interface display unit or process stop element,
Described interface display unit, for receiving the clicking operation of user for described icon, shows the interface of determined application program according to described clicking operation;
Described process stop element, for receiving the process shut-down operation of user, stops the operation of the process played sound according to described process shut-down operation.
Optionally, described electronic equipment is mobile terminal, and described application queries is operating as: the query manipulation of the application program run.
Optionally, described process query unit, specifically for: inquired about by the process identification (PID) of voice output passage Audio Track to the process of the audio flinger module transfer voice data of audio subsystem by application programming interface.
The method and system of the application program that the determination that the embodiment of the present invention provides is playing sound, the process identification (PID) of the process played sound can be inquired about, according to the corresponding relation of process identification (PID) and application program, determine the application program that the process identification (PID) that inquires is corresponding to show the icon of determined application program.Therefore, the present invention automatically can determine the application program that playing sound and be shown by the icon of this application program, thus helps user to find the application program controlling electronic equipment and sounding fast.Therefore, the present invention can avoid because user repeatedly opens the resource consumption that Application Program Interface brings.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
A kind of process flow diagram determining the method for the application program played sound that Fig. 1 provides for the embodiment of the present invention;
The icon schematic diagram of the application program of a kind of display effect with presetting that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 determines the process flow diagram of the method for the application program played sound for another kind that the embodiment of the present invention provides;
Fig. 4 determines the process flow diagram of the method for the application program played sound for another kind that the embodiment of the present invention provides;
Fig. 5 determines the process flow diagram of the method for the application program played sound for another kind that the embodiment of the present invention provides;
A kind of schematic diagram at icon side display volume adjusting control that Fig. 6 provides for the embodiment of the present invention;
A kind of structural representation determining the system of the application program played sound that Fig. 7 provides for the embodiment of the present invention;
Fig. 8 determines the structural representation of the system of the application program played sound for another kind that the embodiment of the present invention provides;
Fig. 9 determines the structural representation of the system of the application program played sound for another kind that the embodiment of the present invention provides;
Figure 10 determines the structural representation of the system of the application program played sound for another kind that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, a kind of method determining the application program played sound that the embodiment of the present invention provides, be applied to electronic equipment, the method can comprise:
The process identification (PID) of the process that S100, inquiry are playing sound;
Electronic equipment in the present invention can be the equipment such as mobile phone, panel computer, computing machine, and the present invention is particularly useful in mobile phone.
Wherein, the implementation process of S100 can be any one in the concrete executive mode of the following two kinds:
Mode one, after the application queries operation receiving user, inquire about the process identification (PID) of process played sound;
Mode two, after having detected that process plays sound, inquire about the process identification (PID) of process played sound.
In mode one, when electronic equipment is the mobile terminals such as mobile phone, application queries operation can be: the query manipulation of the application program run, as: application manager start-up operation, clicking operation to " running " option of " application " option in " setting " option, wherein, application manager start-up operation can have multiple, if the double click operation to Home key, the length to Home key are by operation etc.Certainly, the operation of this application queries can be also other operations, and the present invention is in this no limit.
Certainly, mode one, after receiving the application manager start-up operation of user, can also start the icon that the application program run in application manager inquiry electronic equipment also shows the application program inquired.Function of the present invention can be added in existing application manager, like this, when application manager will inquire about the process identification (PID) of the process played sound when inquiring about the application program run in electronic equipment simultaneously.Certainly, function of the present invention also can independent of application manager.
The process identification (PID) of the process that mode one can play sound in the rear inquiry of application queries operation receiving user, like this, when user wants to find the application program played sound, only needs to make application queries to electronic equipment and operates.
Mode two can after having detected that process plays sound, and the process identification (PID) of the process that Automatic inquirying is playing sound, operates without the need to user, convenient.
In actual applications, user can select in mode one and mode two, also can switch this two kinds of modes at any time.
In actual applications, S100 can comprise: the process identification (PID) of the process of the sound of preset sound type is being play in inquiry.
Wherein, the sound play in electronic equipment can be divided into muli-sounds type, such as: RING type, MUSIC type, ALARM type and NOTIFICATION type.Above-mentioned preset sound type can be any one in this Four types, preferably, can be MUSIC type.
Wherein, the sound of RING type is for playing incoming ring tone; The sound of MUSIC type is for playing the content of multimedia such as music; The sound of ALARM type is for playing ring of alarm clock; The sound of NOTIFICATION type for playing various notice sound, as note.
Wherein, when electronic equipment is mobile phone, the operating system of electronic equipment can be the primary operating system of Android or the operating system based on the primary operating system exploitation of Android.
The operating system of electronic equipment can also arrange different priority and output policy for different sound types.Such as: the priority of ALARM type is higher than MUSIC type; When exporting, the sound prioritizing selection of ALARM type exports from loudspeaker, and MUSIC type priority exports from earphone.
The primary operating system of Android or comprise audio policy manager module and audio flinger module based on the nucleus module of the audio subsystem in the operating system of Android primary operating system exploitation, they all operate in system process media server.
When application program will play sound, need by voice output passage AudioTrack, voice data to be passed to audio flinger from the process at oneself place, audio flinger carries out the process of the aspects such as volume, resampling, audio mixing, audio to the voice data received, and then passes to the hardware device (as loudspeaker) that audio policy manager specifies and plays sound.
Therefore, S100 can specifically comprise: inquired about by the process identification (PID) of voice output passage Audio Track to the process of the audio flinger module transfer voice data of audio subsystem by application programming interface.
The process of application program can carry out the state that order Audio Track enters transmission voice data by the play () function or start () function calling AudioTrack.
S200, corresponding relation according to process identification (PID) and application program, determine the application program that the described process identification (PID) that inquires is corresponding;
Be understandable that, an application program can have one or more process, and each process identification (PID) only can be corresponding with an application program.
S300, on the display screen of described electronic equipment, show the icon of determined application program.
Wherein, shown icon can have default display effect.This display effect preset can have multiple, such as flickering effect, ripple effect, amplification effect, aperture effect etc.
The icon schematic diagram of the application program of a kind of display effect with presetting that Fig. 2 provides for the embodiment of the present invention.As can be seen from Figure 2, because shown icon has default display effect, therefore user can find this icon more easily.
The method of the application program that the determination that the embodiment of the present invention provides is playing sound, the process identification (PID) of the process played sound can be inquired about, according to the corresponding relation of process identification (PID) and application program, determine the application program that the process identification (PID) that inquires is corresponding to show the icon of determined application program.Therefore, the present invention automatically can determine the application program that playing sound and be shown by the icon of this application program, thus helps user to find the application program controlling electronic equipment and sounding fast.Therefore, the present invention can avoid because user repeatedly opens the resource consumption that Application Program Interface brings.
As shown in Figure 3, the another kind that the embodiment of the present invention provides determines the method for the application program played sound, and can also comprise:
S400, reception user, for the clicking operation of described icon, show the interface of determined application program according to described clicking operation.
After user clicks the icon of display, the present invention just can control the interface that electronic equipment shows application program corresponding to this icon, and such user just can be controlled by interface application programs, as regulated volume etc.
As shown in Figure 4, the another kind that the embodiment of the present invention provides determines the method for the application program played sound, and can also comprise:
The process shut-down operation of S500, reception user, stops the operation of the process played sound according to described process shut-down operation.
In the multiple operation that user will carry out the application program played sound, stopping sound playing is the most urgent operation.Therefore, S500 can make user carry out process shut-down operation immediately after the application program determining playing sound by S300, thus stops the operation of the process played sound.
Wherein, process shut-down operation can have multiple, such as: the clicking operation to the icon of S300 display, the slide to the icon of S300 display, operate, described electronic equipment carried out to turn-over and make the operation etc. downward of its display screen the shake of described electronic equipment.
As shown in Figure 5, the another kind that the embodiment of the present invention provides determines the method for the application program played sound, and can also comprise:
The volume adjusting operation of S600, reception user, operates according to described volume adjusting, only regulates the broadcast sound volume of determined application program.
Wherein, described volume adjusting is operating as: operate the shake of described electronic equipment, described electronic equipment carried out to the pressing operation that turn-over makes the operation downward of its display screen or the entity volume button to described electronic equipment.
In prior art, be the adjustment operation of the volume of all application programs to all application programs or preset kind to the pressing operation of the entity volume button of electronic equipment.When user is regulated by the volume of entity volume button to a certain application program played sound, other application programs or be that the volume of other application programs of identical type is also by adjusted in concert with this application program.And this adjusted in concert is not desired by user, therefore when volume adjusting is operating as the pressing operation to the entity volume button of described electronic equipment, the present invention only can regulate the broadcast sound volume of determined application program according to the pressing operation of entity volume button, does not then regulate the volume of other application programs.So just avoid the generation of above-mentioned situation.
Certainly, in actual applications, S600 can specifically comprise: receive the volume adjusting operation made in the preset time period of user after step S300 display icon, operate according to described volume adjusting, only regulates the broadcast sound volume of application program corresponding to shown icon.
Like this, when user makes volume adjusting operation outside above-mentioned preset time period, the volume adjusting of prior art can be adopted to operate response mode and to respond.
In an alternative embodiment of the invention, above the icon that can also show at S300 or side shows volume adjusting control, and like this, user just can directly operate the volume adjusting control of display.A kind of schematic diagram at icon side display volume adjusting control that Fig. 6 provides for the embodiment of the present invention.As shown in Figure 6, shown adjustment control is made up of quiet control 002 and tuning control 001.When user need to control this application program stop playing sound time, directly can click quiet control 002.When user needs the volume of the sound regulating this application program to play, user can drag the slide block on tuning control 001.
Corresponding with said method embodiment, the embodiment of the present invention additionally provides a kind of system determining the application program played sound.
As shown in Figure 7, a kind of system determining the application program played sound that the embodiment of the present invention provides, be applied to electronic equipment, this system can comprise: process query unit 100, application determining unit 200 and icon display unit 300,
Process query unit 100, for inquiring about the process identification (PID) of the process played sound;
Wherein, process query unit 100, can comprise: action queries subelement or detection inquiry subelement,
Described action queries subelement, for after the application queries operation receiving user, inquires about the process identification (PID) of the process played sound;
Described detection inquiry subelement, for after having detected that process plays sound, has inquired about the process identification (PID) of the process played sound.
To action queries subelement, when electronic equipment is the mobile terminals such as mobile phone, application queries operation can be: the query manipulation of the application program run, as: application manager start-up operation, clicking operation to " running " option of " application " option in " setting " option, wherein, application manager start-up operation can have multiple, if the double click operation to Home key, the length to Home key are by operation etc.Certainly, the operation of this application queries can be also other operations, and the present invention is in this no limit.
The process identification (PID) of the process that action queries subelement can play sound in the rear inquiry of application queries operation receiving user, like this, when user wants to find the application program played sound, only need that application queries is made to electronic equipment and operate.
Detecting inquiry subelement can after having detected that process plays sound, and the process identification (PID) of the process that Automatic inquirying is playing sound, operates without the need to user, convenient.
In actual applications, process query unit can be specifically for: the process identification (PID) of the process of the sound of preset sound type is being play in inquiry.Preferably, preset sound type can be MUSIC type.
Wherein, described process query unit, can be specifically for: inquired about by the process identification (PID) of voice output passage Audio Track to the process of the audio flinger module transfer voice data of audio subsystem by application programming interface.
Application determining unit 200, for the corresponding relation according to process identification (PID) and application program, determines the application program that the described process identification (PID) that inquires is corresponding;
Be understandable that, an application program can have one or more process, and each process identification (PID) only can be corresponding with an application program.
Icon display unit 300, for the display screen at described electronic equipment, shows the icon of determined application program.
Wherein, the icon shown by icon display unit 300 can have default display effect.This display effect preset can have multiple, such as flickering effect, ripple effect, amplification effect, aperture effect etc.
The system of the application program that the determination that the embodiment of the present invention provides is playing sound, the process identification (PID) of the process played sound can be inquired about, according to the corresponding relation of process identification (PID) and application program, determine the application program that the process identification (PID) that inquires is corresponding to show the icon of determined application program.Therefore, the present invention automatically can determine the application program that playing sound and be shown by the icon of this application program, thus helps user to find the application program controlling electronic equipment and sounding fast.Therefore, the present invention can avoid because user repeatedly opens the resource consumption that Application Program Interface brings.
As shown in Figure 8, the another kind that the embodiment of the present invention provides determines the system of the application program played sound, can also comprising: interface display unit 400, for receiving the clicking operation of user for described icon, showing the interface of determined application program according to described clicking operation.
After user clicks the icon of display, the present invention just can control the interface that electronic equipment shows application program corresponding to this icon, and such user just can be controlled by interface application programs, as regulated volume etc.
As shown in Figure 9, the another kind that the embodiment of the present invention provides determines the system of the application program played sound, can also comprising: process stop element 500, for receiving the process shut-down operation of user, stopping the operation of the process played sound according to described process shut-down operation.
In the multiple operation that user will carry out the application program played sound, stopping sound playing is the most urgent operation.Therefore, process stop element 500 can make user carry out process shut-down operation immediately after the application program determining playing sound by icon display unit 300, thus stops the operation of the process played sound.
Wherein, process shut-down operation can have multiple, such as: the clicking operation to the icon that icon display unit 300 shows, the slide to the icon that icon display unit 300 shows, operate, described electronic equipment carried out to turn-over and make the operation etc. downward of its display screen the shake of described electronic equipment.
As shown in Figure 10, the another kind that the embodiment of the present invention provides determines the system of the application program played sound, can also comprise: sound volume regulation unit 600, for receiving the volume adjusting operation of user, operate according to described volume adjusting, only the broadcast sound volume of determined application program is regulated.
Wherein, described volume adjusting is operating as: operate the shake of described electronic equipment, described electronic equipment carried out to the pressing operation that turn-over makes the operation downward of its display screen or the entity volume button to described electronic equipment.
In an alternative embodiment of the invention, above the icon that can also show at icon display unit 300 or side shows volume adjusting control, and like this, user just can directly operate the volume adjusting control of display.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Each embodiment in this instructions all adopts relevant mode to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.