CN105045555A - Configuration file based method and apparatus for implementing audio conflict resolution - Google Patents

Configuration file based method and apparatus for implementing audio conflict resolution Download PDF

Info

Publication number
CN105045555A
CN105045555A CN201510435010.2A CN201510435010A CN105045555A CN 105045555 A CN105045555 A CN 105045555A CN 201510435010 A CN201510435010 A CN 201510435010A CN 105045555 A CN105045555 A CN 105045555A
Authority
CN
China
Prior art keywords
audio
configuration file
mobile terminal
conflict resolution
audio frequency
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.)
Pending
Application number
CN201510435010.2A
Other languages
Chinese (zh)
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.)
Beijing Yuanxin Science and Technology Co Ltd
Original Assignee
Beijing Yuanxin Science and 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 Beijing Yuanxin Science and Technology Co Ltd filed Critical Beijing Yuanxin Science and Technology Co Ltd
Priority to CN201510435010.2A priority Critical patent/CN105045555A/en
Publication of CN105045555A publication Critical patent/CN105045555A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The present invention provides a configuration file based method for implementing audio conflict resolution. The method comprises: loading the configuration file to obtain an audio type and an audio conflict resolution policy of a mobile terminal through analysis from the configuration file; receiving output request information, for an audio, of an application program that runs in the mobile terminal; acquiring state information of an audio device in the mobile terminal; and determining whether to call the audio device to output the audio according to the audio type and the audio conflict resolution policy of the mobile terminal, obtained by analysis, the output request information and the state information of the audio device. Correspondingly, the present invention further provides a configuration file based apparatus for implementing the audio conflict resolution. According to the method and the apparatus, implementation of audio type definition and audio conflict resolution policy definition can be separated from implementation of audio device calling, so that the maintenance of the overall audio system in the mobile terminal can be facilitated.

Description

A kind of method and device realizing audio conflict solution based on configuration file
Technical field
The present invention relates to technical field of mobile terminals, particularly relate to a kind of method and the device that realize audio conflict solution based on configuration file.
Background technology
Along with the fast development of the such as mobile terminal such as smart mobile phone, panel computer, relate to the application program more and more (such as music player, video player, game etc.) that audio frequency exports, meanwhile can the equipment (such as loudspeaker, receiver, wired earphone, wireless headset etc.) of output audio also get more and more.Thus, user in practical application scene is caused can to encounter various audio conflict problem.For an embody rule scene, music player exports MP3 by the earphone of smart mobile phone, exports in the process of this MP3 at earphone, and the loudspeaker that alarm clock calls smart mobile phone export prompt tone, in this case, the output of MP3 and the output of alarm clock prompting sound create audio conflict problem.Therefore, need the output of audio frequency and can the calling of equipment (hereinafter referred to audio frequency apparatus) of output audio manage to solve audio conflict problem.
In the prior art, mobile terminal utilizes media playback service to manage the output of audio frequency and calling of audio frequency apparatus.Below, how media playback service is worked be described.
Particularly, the interface that application program (hereafter representing with application program 1) calls media playback service to be provided goes audio plays (hereafter representing with audio frequency 1), and media playback service can remove selection audio frequency apparatus output audio 1 according to the connection status of the type of audio frequency 1 and current multiple audio frequency apparatus.In the process of application program 1 audio plays 1, Another application program (hereafter representing with application program 2) needs audio plays (hereafter representing with audio frequency 2), in this case, media playback service can determine whether allowing audio frequency 2 to be exported by audio frequency apparatus according to the resolution policy of predetermined audio conflict.If allow to export, media playback service can determine it is suspend audio frequency 1 output audio 2 according to predetermined audio conflict resolution policy, or audio frequency 1 and audio frequency 2 audio mixing is exported.
Be directed to the mobile terminal adopting android system at present, the definition of audio conflict resolution policy and the definition of audio types are all realized by computer programming language by the AudioPolicyService in media playback service.In addition, call audio frequency apparatus output audio also to be realized by computer programming language by AudioPolicyService.There is following weak point in above-mentioned implementation:
The first, due to the definition of audio conflict resolution policy, the calling these three kinds and realize weave in of the definition of audio types and audio frequency apparatus, the complexity of computer programming language is therefore substantially increased.
The second, when audio conflict resolution policy changes, the computer programming language in corresponding modify AudioPolicyService is needed.Similarly, when needs increase or when deleting audio types, also need the computer programming language in corresponding modify AudioPolicyService.Because computer programming language is relatively complicated, the calculation procedure language called for realizing the definition of audio conflict resolution policy, audio types definition and audio frequency apparatus is write together, therefore, amendment personnel are allowed to there is the sensation of pulling one hair and move the whole body, in this case, modifying to the computer programming language for realizing the definition of audio conflict resolution policy and/or audio types definition is have certain difficulty, and amendment also easily causes other beyond thought problems.In addition, after modifying to computer programming language, also need to re-start compiling to computer programming language, whole process is comparatively loaded down with trivial details.
Three, because the definition of audio conflict resolution policy, the definition of audio types and calling of audio frequency apparatus realize together, therefore, the computer programming language called for realizing the definition of audio conflict resolution policy, audio types definition and audio frequency apparatus is not easy to transplant between the system different at audio conflict resolution policy, audio types is different, audio frequency apparatus is different.
Summary of the invention
In order to overcome above-mentioned defect of the prior art, the invention provides a kind of method realizing audio conflict solution based on configuration file, the method comprises:
Loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
Receive the output solicited message that the application program run on the mobile terminal is directed to audio frequency;
Obtain the status information of the audio frequency apparatus of described mobile terminal;
The audio types of described mobile terminal obtained according to parsing and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determine whether that calling audio frequency apparatus exports described audio frequency.
According to an aspect of the present invention, in the method, loading configuration file with resolve from this configuration file obtain the audio types of mobile terminal and audio conflict resolution policy before the method also comprise: adopt artificial intelligence language to generate described configuration file.
According to another aspect of the present invention, in the method, described configuration file comprises the first configuration file and the second configuration file; The audio types of described mobile terminal is defined in the content of described first configuration file; The audio conflict resolution policy of described mobile terminal is defined in the content of described second configuration file.
According to a further aspect of the invention, in the method, described audio conflict resolution policy comprises the definition of the output priority of described audio types.
According to a further aspect of the invention, in the method, described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset.
Correspondingly, present invention also offers a kind of device realizing audio conflict solution based on configuration file, this device comprises:
Parsing module, for loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
Receiver module, is directed to the output solicited message of audio frequency for receiving operation application program on the mobile terminal;
Acquisition module, for obtaining the status information of the audio frequency apparatus of described mobile terminal;
Determination module, for according to resolving the audio types of described mobile terminal that obtains and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determines whether that calling audio frequency apparatus exports described audio frequency.
According to an aspect of the present invention, this device also comprises generation module, generates described configuration file for adopting artificial intelligence language.
According to another aspect of the present invention, in this device, described configuration file comprises the first configuration file and the second configuration file; The audio types of described mobile terminal is defined in the content of described first configuration file; The audio conflict resolution policy of described mobile terminal is defined in the content of described second configuration file.
According to a further aspect of the invention, in this device, described audio conflict resolution policy comprises the definition of the output priority of described audio types.
According to a further aspect of the invention, in this device, described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset.
Provided by the present inventionly realize based on configuration file method that audio conflict solves and device defines audio types and definition audio conflict resolution policy and realize calling of audio frequency apparatus by computer programming language by configuration file, thus audio types defines and audio conflict resolution policy defines realization and the realization that audio frequency apparatus calls are separated.Thus, with by computer programming language, audio types is defined, audio conflict resolution policy defines and calls realization prior art together with audio frequency apparatus and compare, the invention has the advantages that: the first, because configuration file can be realized by artificial intelligence language, only need to realize calling of audio frequency apparatus by computer programming language, therefore significantly reduce the complexity of realization; The second, the realization that the realization that audio types defines and audio conflict resolution policy defines and audio frequency apparatus call separates the maintenance of the whole audio system be convenient to mobile terminal, that is, when needs are revised audio conflict resolution policy, interpolation or deleted audio types time, only need to revise configuration file, and without the need to revising computer programming language and then without the need to re-starting compiling, thus make amendment become simple efficient, but also can effectively avoid owing to revising other mistakes that may cause; Three, due to the definition of the definition and audio conflict resolution policy that are realized audio types by configuration file, therefore parsing module is needed to resolve configuration file, this parsing module can be applied to other independently and have in the audio system of similar demand, thus be convenient to transplant between the audio system different at audio conflict resolution policy, audio types is different, audio frequency apparatus is different, and then effectively can simplify the realization of audio system.
Accompanying drawing explanation
By reading the detailed description done non-limiting example done with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 is according to the method flow diagram realizing audio conflict solution based on configuration file of the present invention;
Fig. 2 is according to the structural representation realizing the device that audio conflict solves based on configuration file of the present invention;
Fig. 3 can realize the structural representation realizing the intelligent terminal of the method that audio conflict solves based on configuration file provided by the invention;
In accompanying drawing, same or analogous Reference numeral represents same or analogous parts.
Embodiment
For a better understanding and interpretation of the present invention, below in conjunction with accompanying drawing, the present invention is described in further detail.
The invention provides a kind of method realizing audio conflict solution based on configuration file.Please refer to Fig. 1, Fig. 1 is according to the method flow diagram realizing audio conflict solution based on configuration file of the present invention.As shown in the figure, the method comprises the following steps:
In step S101, loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
In step s 102, the output solicited message that the application program run on the mobile terminal is directed to audio frequency is received;
In step s 103, the status information of the audio frequency apparatus of described mobile terminal is obtained;
In step S104, the audio types of described mobile terminal obtained according to parsing and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determine whether that calling audio frequency apparatus exports described audio frequency.
Particularly, in step S101, in the present embodiment, described mobile terminal includes but not limited to smart mobile phone or the panel computer of having installed the terminal operating systems such as Android, SyberOS, iOS, Symbian, WindowsMobile, Maemo, WebOS, PalmOS or BlackberryOS.It will be appreciated by those skilled in the art that, every have audio output function and the electronic equipment that there is audio conflict problem includes in the scope that the present invention protects.Hereinafter will be described step provided by the present invention for smart mobile phone.
The device realizing audio conflict solution based on configuration file is arranged in the audio system of smart mobile phone, when the audio system in smart mobile phone starts (such as during smart mobile phone start), realize the device loading configuration file of audio conflict solution based on configuration file.Wherein, described configuration file adopts artificial intelligence language to generate in advance.In the present embodiment, the artificial intelligence language for generating configuration file is Prolog (ProgramminginLogic).It will be understood by those skilled in the art that, Prolog generating configuration file is used to be only a preferred implementation, other existing artificial intelligence languages also may be used for generating described configuration file, for brevity, no longer enumerate existing artificial intelligence language.After generating configuration file, this configuration file is stored in the Installed System Memory of smart mobile phone.Because configuration file is generated by artificial intelligence language, therefore, in the process of loading configuration file, the content resolving to obtain this configuration file to this configuration file is needed.The audio types of smart mobile phone and the audio conflict resolution policy of smart mobile phone is defined in the content of configuration file.Wherein, described audio types refers in smart mobile phone the type relating to the application program that audio frequency exports.In the present embodiment, described audio types comprises call, telephone bell, the happy player of information reminding voice, video player, alarm clock, calendar reminding, game and camera.It will be appreciated by persons skilled in the art that the difference according to smart mobile phone model, also may there is difference in its audio types supported, for brevity, no longer enumerates the audio types likely existed at this.Described audio conflict resolution policy refers to the strategy solving this conflict when the output of two or more audio types clashes.In the present embodiment, described audio conflict resolution policy comprises the definition of the output priority of all audio types to smart mobile phone.That is, audio conflict resolution policy defines which audio types when the output of two or more audio types clashes and should preferentially be output.That telephone bell and music player are described for audio types, for these two audio types, the output priority of telephone bell is higher than the output priority of music player, when namely clashing between telephone bell and music player, suspend music player and export telephone bell.It will be appreciated by persons skilled in the art that the audio conflict resolution policy of different model smart mobile phone may exist difference, the audio conflict resolution policy of the smart mobile phone of each model needs to define according to the actual design demand of this smart mobile phone is corresponding.
In a specific embodiment, the definition of audio types and the definition of audio conflict resolution policy can realize in same configuration file, namely based on configuration file realize audio conflict solve device only need loading configuration file can obtain audio types and the audio conflict resolution policy of smart mobile phone.In another specific embodiment, configuration file comprises the first configuration file and the second configuration file, wherein, the audio types of smart mobile phone is defined in the content of the first configuration, define the audio conflict resolution policy of smart mobile phone in the content of the second configuration file, namely the definition of audio types and being defined in different configuration files of audio conflict resolution policy realize.Realize based on configuration file device that audio conflict solves and need to load respectively audio types and the audio conflict resolution policy that the first configuration file and the second configuration file could obtain smart mobile phone.Be directed to above-mentioned two kinds of modes, the advantage of first kind of way is that configuration file quantity is few, the advantage of the second way is the definition of the definition of audio types and audio conflict resolution policy to separate, in time needing to add or delete audio types or when needs amendment audio conflict resolution policy time, only need to modify to corresponding configuration file, flexible operation and be convenient to maintenance.
In step s 102, when operating in the application program on smart mobile phone and needing to export audio frequency, the audio system to smart mobile phone sends and exports the audio frequency apparatus of solicited message application for output audio.Be arranged in audio system based on configuration file realize audio conflict solve device receive the output solicited message that this application program is directed to audio frequency.Illustrate, user arranges alarm clock application program and at the appointed time plays quarter-bell music, when arriving this fixed time, alarm clock application program sends output solicited message and exports this quarter-bell music to the device application audio frequency apparatus realizing audio conflict solution based on configuration file.
In step s 103, the status information of all audio frequency apparatuses of the device acquisition smart mobile phone that audio conflict solves is realized based on configuration file.Described audio frequency apparatus refers to the built-in or external device resource that may be used for output audio of smart mobile phone.In the present embodiment, described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset (such as bluetooth earphone).It will be understood by those skilled in the art that; except above-mentioned loudspeaker, receiver, wired earphone and wireless headset; that other have existed or future may occur, that be built in smart mobile phone or be placed on smart mobile phone, to may be used for output audio device resource includes in the scope that the present invention protects; for brevity, this is no longer going to repeat them.The status information of described audio frequency apparatus refers to the duty that this audio frequency apparatus is current, namely this audio frequency apparatus current whether carry out audio frequency output and if the audio types that exports of this audio frequency apparatus of words.Illustrate, when alarm clock application program to realize based on configuration file audio conflict solve device application audio frequency apparatus time, the status information realizing the audio frequency apparatus of the smart mobile phone accessed by device of audio conflict solution based on configuration file is as follows: wired earphone is carrying out audio frequency output, wherein audio types is music player, and other audio frequency apparatuses (loudspeaker, receiver and wireless headset) of smart mobile phone do not carry out audio frequency output.
In step S104, after the status information of all audio frequency apparatuses obtaining smart mobile phone, realize device that audio conflict solves according to resolving the audio types of the smart mobile phone obtained and audio conflict resolution policy, the output solicited message of application program transmission received and the status information of all audio frequency apparatuses that gets determines whether that calling audio frequency apparatus exports the audio frequency play desired by this application program from configuration file based on configuration file.Based on configuration file realize audio conflict solve device first according to application program send output solicited message and configuration file in audio types definition determine this application program wish play audio frequency corresponding to audio types, then compare according to the output priority of the audio conflict resolution policy in configuration file to the output priority of this audio types and the current audio types exported of audio frequency apparatus, if the former output priority is lower than the output priority of the latter, then do not allow to call audio frequency apparatus and export the desired audio frequency play of application program, if the former output priority is identical with the output priority of the latter, then allow to call audio frequency apparatus to export the two simultaneously, if the former output priority is higher than the output priority of the latter, then allow to call audio frequency apparatus and export the former and the output meanwhile suspending the latter.Illustrate, alarm clock application program is to the device application audio frequency apparatus realizing audio conflict solution based on configuration file, now the wired earphone of smart mobile phone is carrying out audio frequency output, wherein audio types is music player, and other audio frequency apparatuses of smart mobile phone (loudspeaker, receiver and wireless headset) do not carry out audio frequency output.The output priority of output priority higher than music player of alarm clock is defined in audio conflict resolution policy, in this case, the device realizing audio conflict solution based on configuration file allows to call loudspeaker output quarter-bell music, and does not allow to call wired earphone output audio.After loudspeaker are for quarter-bell music end of output, the device realizing audio conflict solution based on configuration file continues to call the output that wired earphone carries out music player sound intermediate frequency by allowing.
It should be noted that, although describe the operation of the inventive method in the accompanying drawings with particular order, but this is not that requirement or hint must perform these operations according to this particular order, or must perform the result that all shown operation could realize expectation.On the contrary, the step described in process flow diagram can change execution sequence.Additionally or alternatively, some step can be omitted, multiple step be merged into a step and perform, and/or a step is decomposed into multiple step and perform.
Correspondingly, present invention also offers a kind of device realizing audio conflict solution based on configuration file.Please refer to Fig. 2, Fig. 2 is according to the structural representation realizing the device that audio conflict solves based on configuration file of the present invention.As shown in the figure, this device 20 comprises:
Parsing module 210, for loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
Receiver module 220, is directed to the output solicited message of audio frequency for receiving operation application program on the mobile terminal;
Acquisition module 230, for obtaining the status information of the audio frequency apparatus of described mobile terminal;
Determination module 240, for according to resolving the audio types of described mobile terminal that obtains and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determines whether that calling audio frequency apparatus exports described audio frequency.
Below, be described in detail to the specific works process of upper module.
Particularly, in the present embodiment, described mobile terminal includes but not limited to smart mobile phone or the panel computer of having installed the terminal operating systems such as Android, SyberOS, iOS, Symbian, WindowsMobile, Maemo, WebOS, PalmOS or BlackberryOS.It will be appreciated by those skilled in the art that, every have audio output function and the electronic equipment that there is audio conflict problem includes in the scope that the present invention protects.Hereinafter will be described device provided by the present invention for smart mobile phone.
Described device 20 is arranged in the audio system of smart mobile phone, when the audio system in smart mobile phone starts (such as during smart mobile phone start), and parsing module 210 loading configuration file.Described device 20 also comprises generation module 250, and this generation module 250 generates described configuration file for adopting artificial intelligence language.In the present embodiment, the artificial intelligence language for generating configuration file is Prolog (ProgramminginLogic).It will be understood by those skilled in the art that, Prolog generating configuration file is used to be only a preferred implementation, other existing artificial intelligence languages also may be used for generating described configuration file, for brevity, no longer enumerate existing artificial intelligence language.After generation module 250 generating configuration file, this configuration file is stored in the Installed System Memory of smart mobile phone.Because configuration file is generated by artificial intelligence language, therefore, parsing module 210 needs the content resolving to obtain this configuration file to this configuration file in the process of loading configuration file.The audio types of smart mobile phone and the audio conflict resolution policy of smart mobile phone is defined in the content of configuration file.Wherein, described audio types refers in smart mobile phone the type relating to the application program that audio frequency exports.In the present embodiment, described audio types comprises call, telephone bell, the happy player of information reminding voice, video player, alarm clock, calendar reminding, game and camera.It will be appreciated by persons skilled in the art that the difference according to smart mobile phone model, also may there is difference in its audio types supported, for brevity, no longer enumerates the audio types likely existed at this.Described audio conflict resolution policy refers to the strategy solving this conflict when the output of two or more audio types clashes.In the present embodiment, described audio conflict resolution policy comprises the definition of the output priority of all audio types to smart mobile phone.That is, audio conflict resolution policy defines which audio types when the output of two or more audio types clashes and should preferentially be output.That telephone bell and music player are described for audio types, for these two audio types, the output priority of telephone bell is higher than the output priority of music player, when namely clashing between telephone bell and music player, suspend music player and export telephone bell.It will be appreciated by persons skilled in the art that the audio conflict resolution policy of different model smart mobile phone may exist difference, the audio conflict resolution policy of the smart mobile phone of each model needs to define according to the actual design demand of this smart mobile phone is corresponding.
In a specific embodiment, the definition of audio types and the definition of audio conflict resolution policy can realize in same configuration file, and namely device 20 only needs loading configuration file can obtain audio types and the audio conflict resolution policy of smart mobile phone.In another specific embodiment, configuration file comprises the first configuration file and the second configuration file, wherein, the audio types of smart mobile phone is defined in the content of the first configuration, define the audio conflict resolution policy of smart mobile phone in the content of the second configuration file, namely the definition of audio types and being defined in different configuration files of audio conflict resolution policy realize.Device 20 needs to load respectively audio types and the audio conflict resolution policy that the first configuration file and the second configuration file could obtain smart mobile phone.Be directed to above-mentioned two kinds of modes, the advantage of first kind of way is that configuration file quantity is few, the advantage of the second way is the definition of the definition of audio types and audio conflict resolution policy to separate, in time needing to add or delete audio types or when needs amendment audio conflict resolution policy time, only need to modify to corresponding configuration file, flexible operation and be convenient to maintenance.
When operating in the application program on smart mobile phone and needing to export audio frequency, the audio system to smart mobile phone sends and exports the audio frequency apparatus of solicited message application for output audio.Receiver module 220 receives the output solicited message that this application program is directed to audio frequency.Illustrate, user arranges alarm clock application program and at the appointed time plays quarter-bell music, and when arriving this fixed time, alarm clock application program sends output solicited message and exports this quarter-bell music to audio system application audio frequency apparatus.
Acquisition module 230 obtains the status information of all audio frequency apparatuses of smart mobile phone.Described audio frequency apparatus refers to the built-in or external device resource that may be used for output audio of smart mobile phone.In the present embodiment, described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset (such as bluetooth earphone).It will be understood by those skilled in the art that; except above-mentioned loudspeaker, receiver, wired earphone and wireless headset; that other have existed or future may occur, that be built in smart mobile phone or be placed on smart mobile phone, to may be used for output audio device resource includes in the scope that the present invention protects; for brevity, this is no longer going to repeat them.The status information of described audio frequency apparatus refers to the duty that this audio frequency apparatus is current, namely this audio frequency apparatus current whether carry out audio frequency output and if the audio types that exports of this audio frequency apparatus of words.Illustrate, when alarm clock application program is to audio system application audio frequency apparatus, the status information of the audio frequency apparatus of the smart mobile phone accessed by acquisition module 230 is as follows: wired earphone is carrying out audio frequency output, wherein audio types is music player, and other audio frequency apparatuses (loudspeaker, receiver and wireless headset) of smart mobile phone do not carry out audio frequency output.
Acquisition module 230 after the status information of all audio frequency apparatuses obtaining smart mobile phone, determination module 240 according to resolving the audio types of the smart mobile phone obtained and audio conflict resolution policy from configuration file, output solicited message that the application program that receives sends and the status information of all audio frequency apparatuses that gets determine whether that calling audio frequency apparatus exports the audio frequency play desired by this application program.Determination module 240 first according to application program send output solicited message and configuration file in audio types definition determine this application program wish play audio frequency corresponding to audio types, then compare according to the output priority of the audio conflict resolution policy in configuration file to the output priority of this audio types and the current audio types exported of audio frequency apparatus, if the former output priority is lower than the output priority of the latter, then do not allow to call audio frequency apparatus and export the desired audio frequency play of application program, if the former output priority is identical with the output priority of the latter, then allow to call audio frequency apparatus to export the two simultaneously, if the former output priority is higher than the output priority of the latter, then allow to call audio frequency apparatus and export the former and the output meanwhile suspending the latter.Illustrate, alarm clock application program is to audio system application audio frequency apparatus, now the wired earphone of smart mobile phone is carrying out audio frequency output, and wherein audio types is music player, and other audio frequency apparatuses of smart mobile phone (loudspeaker, receiver and wireless headset) do not carry out audio frequency output.Define the output priority of output priority higher than music player of alarm clock in audio conflict resolution policy, in this case, determination module 240 allows to call loudspeaker and exports quarter-bell music, and does not allow to call wired earphone output audio.After loudspeaker are for quarter-bell music end of output, determination module 240 continues to call the output that wired earphone carries out music player sound intermediate frequency by allowing.
It should be noted that, for the ease of communicating between application program and device 20, device 20 can provide an interface, and this interface carries out the information format processed to obtain auto levelizer 20 for the output solicited message that application programs sends.
Please refer to Fig. 3, Fig. 3 can realize the structural representation realizing the intelligent terminal of the method that audio conflict solves based on configuration file provided by the invention, and this intelligent terminal comprises above the described mobile terminal mentioned.Fig. 3 schematically shows the common structure of described intelligent terminal, is described the intraware of common intelligent terminal, software and protocol architecture with reference to figure 3.
This intelligent terminal has processor 510, and it is responsible for the integrated operation of intelligent terminal, and any business can be utilized can to obtain the realization of CPU (central processing unit), digital signal processor or any other electronic programmable logic device.The related storer 520 of processor 510 tool, this storer 520 includes but not limited to RAM storer, ROM storer, eeprom memory, flash memory or its combination.Storer 520 controls for various object by processor 500, and one of them is as software stored program instruction various in intelligent terminal and data.
The software view of this intelligent terminal comprises real time operating system 540, driver for man-machine interface 560, application processor 550 and various application.Described application examples is text editor 551, handwriting recognition application 552 and other multimedia application 553 various in this way, and typically these other multimedia application comprise such as audio call application, video call application, send and reception Short Message Service (SMS) messages application, multimedia information service (MMS) application or e-mail applications, web browser, instant message transrecieving application, book applications, calendar application, control panel application, camera application, one or more video-game, notepad appli-cation etc.Two or more that it should be noted that above-mentioned application can perform as same application.
Described intelligent terminal also comprises one or more hardware control, for together with the driver of man-machine interface 560 with display device 561, physical button 562, microphone 563 and other I/O equipment various (such as loudspeaker, Vib., Ring Generator, LED indicator etc.) cooperate, to realize the man-machine interaction of described intelligent terminal.Those skilled in the art are to be understood that user can carry out operative intelligence terminal by the man-machine interface 560 formed like this.
The software view of this intelligent terminal can also comprise the logic relevant to communication such as various module, protocol stack, driver, be summarized as communication interface 570 as shown in Figure 3, for for wireless radio interface 571 and alternatively for blue tooth interface 572 and/or infrared interface 573 provide communication service (such as transmit, network and connectedness), to realize the network connectivty of described intelligent terminal.Wireless radio interface 571 comprises inside or exterior antenna and the suitable radio circuit for setting up and safeguard the wireless link towards base station.As known to the skilled person, described radio circuit comprises a series of analog-and digital-electronic package, and it forms radio receiver and transmitter together.These assemblies such as comprise bandpass filter, amplifier, frequency mixer, local oscillator, low-pass filter, ad/da converter etc.
Mobile communication terminal can also comprise reader device 530, and this reader device 530 generally includes processor and data-carrier store etc., for reading the information of SIM card and the network that provides of cooperation wireless radio interface 517 access carrier of taking this as a foundation.
Provided by the invention based on configuration file realize audio conflict solve method can use programmable logic device (PLD) to realize, also may be embodied as computer software, can be such as a kind of computer program according to embodiments of the invention, run this program product and computing machine is performed for demonstrated method.Described computer program comprises computer-readable recording medium, this medium comprises computer program logic or code section, for realizing each step of said method.Described computer-readable recording medium can be the built-in medium be mounted in a computer or the removable medium (such as hot-plugging technology memory device) can dismantled from basic computer.Described built-in medium includes but not limited to rewritable nonvolatile memory, such as RAM, ROM, flash memory and hard disk.Described removable medium includes but not limited to: optical storage media (such as CD-ROM and DVD), magneto-optic storage media (such as MO), magnetic recording medium (such as tape or portable hard drive), have the media (such as storage card) of built-in rewritable nonvolatile memory and have the media (such as ROM box) of built-in ROM.
It will be appreciated by those skilled in the art that any computer system with suitable programmer all can perform all steps of the method for the present invention be included in program product.Although the most embodiments described in this instructions all lay particular emphasis on software program, as the alternate embodiment of firmware and hardware implementing method provided by the invention equally within the scope of protection of present invention.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of miscellaneous part, unit or step, odd number does not get rid of plural number.Multiple parts, unit or the device of stating in system claims also can be realized by software or hardware by parts, unit or a device.
Provided by the present inventionly realize based on configuration file method that audio conflict solves and device defines audio types and definition audio conflict resolution policy and realize calling of audio frequency apparatus by computer programming language by configuration file, thus audio types defines and audio conflict resolution policy defines realization and the realization that audio frequency apparatus calls are separated.Thus, with by computer programming language, audio types is defined, audio conflict resolution policy defines and calls realization prior art together with audio frequency apparatus and compare, the invention has the advantages that: the first, because configuration file can be realized by artificial intelligence language, only need to realize calling of audio frequency apparatus by computer programming language, therefore significantly reduce the complexity of realization; The second, the realization that the realization that audio types defines and audio conflict resolution policy defines and audio frequency apparatus call separates the maintenance of the whole audio system be convenient to mobile terminal, that is, when needs are revised audio conflict resolution policy, interpolation or deleted audio types time, only need to revise configuration file, and without the need to revising computer programming language and then without the need to re-starting compiling, thus make amendment become simple efficient, but also can effectively avoid owing to revising other mistakes that may cause; Three, due to the definition of the definition and audio conflict resolution policy that are realized audio types by configuration file, therefore parsing module is needed to resolve configuration file, this parsing module can be applied to other independently and have in the audio system of similar demand, thus be convenient to transplant between the audio system different at audio conflict resolution policy, audio types is different, audio frequency apparatus is different, and then effectively can simplify the realization of audio system.
Above disclosedly be only preferred embodiments more of the present invention, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (10)

1. realize a method for audio conflict solution based on configuration file, it is characterized in that, the method comprises:
Loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
Receive the output solicited message that the application program run on the mobile terminal is directed to audio frequency;
Obtain the status information of the audio frequency apparatus of described mobile terminal;
The audio types of described mobile terminal obtained according to parsing and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determine whether that calling audio frequency apparatus exports described audio frequency.
2. method according to claim 1, is characterized in that, loading configuration file with from this configuration file resolve obtain mobile terminal audio types and audio conflict resolution policy before, the method also comprises:
Artificial intelligence language is adopted to generate described configuration file.
3. method according to claim 1 and 2, is characterized in that:
Described configuration file comprises the first configuration file and the second configuration file;
The audio types of described mobile terminal is defined in the content of described first configuration file;
The audio conflict resolution policy of described mobile terminal is defined in the content of described second configuration file.
4. method according to claim 1, is characterized in that:
Described audio conflict resolution policy comprises the definition of the output priority of described audio types.
5. method according to claim 1, is characterized in that:
Described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset.
6. realize a device for audio conflict solution based on configuration file, it is characterized in that, this device comprises:
Parsing module, for loading configuration file to resolve the audio types and the audio conflict resolution policy that obtain mobile terminal from this configuration file;
Receiver module, is directed to the output solicited message of audio frequency for receiving operation application program on the mobile terminal;
Acquisition module, for obtaining the status information of the audio frequency apparatus of described mobile terminal;
Determination module, for according to resolving the audio types of described mobile terminal that obtains and the status information of audio conflict resolution policy, described output solicited message and described audio frequency apparatus determines whether that calling audio frequency apparatus exports described audio frequency.
7. device according to claim 6, is characterized in that, this device also comprises:
Generation module, generates described configuration file for adopting artificial intelligence language.
8. the device according to claim 6 or 7, is characterized in that:
Described configuration file comprises the first configuration file and the second configuration file;
The audio types of described mobile terminal is defined in the content of described first configuration file;
The audio conflict resolution policy of described mobile terminal is defined in the content of described second configuration file.
9. device according to claim 6, is characterized in that:
Described audio conflict resolution policy comprises the definition of the output priority of described audio types.
10. device according to claim 6, is characterized in that:
Described audio frequency apparatus comprises loudspeaker, receiver, wired earphone and wireless headset.
CN201510435010.2A 2015-07-22 2015-07-22 Configuration file based method and apparatus for implementing audio conflict resolution Pending CN105045555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510435010.2A CN105045555A (en) 2015-07-22 2015-07-22 Configuration file based method and apparatus for implementing audio conflict resolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510435010.2A CN105045555A (en) 2015-07-22 2015-07-22 Configuration file based method and apparatus for implementing audio conflict resolution

Publications (1)

Publication Number Publication Date
CN105045555A true CN105045555A (en) 2015-11-11

Family

ID=54452123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510435010.2A Pending CN105045555A (en) 2015-07-22 2015-07-22 Configuration file based method and apparatus for implementing audio conflict resolution

Country Status (1)

Country Link
CN (1) CN105045555A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827825A (en) * 2016-02-29 2016-08-03 维沃移动通信有限公司 Audio data processing method and mobile terminal
CN105959466A (en) * 2016-04-22 2016-09-21 青岛海信移动通信技术股份有限公司 Method and device for processing audio data
CN106445448A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Audio device control method and system of terminal and mobile terminal
CN107995369A (en) * 2017-12-19 2018-05-04 广州市千钧网络科技有限公司 A kind of method, apparatus and equipment for solving audio conflict
CN109614252A (en) * 2018-12-10 2019-04-12 苏州思必驰信息科技有限公司 Audio playout schedule method and system for Intelligent story device
CN110488976A (en) * 2019-08-20 2019-11-22 广东小天才科技有限公司 Function management method, apparatus, equipment and storage medium
CN111124351A (en) * 2019-12-24 2020-05-08 RealMe重庆移动通信有限公司 Audio output method, audio output device, electronic equipment and storage medium
WO2020113390A1 (en) * 2018-12-03 2020-06-11 深圳市欢太科技有限公司 Alarm clock playback method and apparatus, and electronic device
CN111464689A (en) * 2020-01-22 2020-07-28 华为技术有限公司 Audio output method and terminal equipment
CN112860322A (en) * 2019-11-26 2021-05-28 成都鼎桥通信技术有限公司 Operating system switching method, device, equipment and storage medium
CN112965685A (en) * 2021-02-04 2021-06-15 RealMe重庆移动通信有限公司 Audio control method, device, system, terminal equipment and storage medium
CN114598967A (en) * 2022-03-03 2022-06-07 合众新能源汽车有限公司 Audio policy management system, method, apparatus and computer readable medium
CN115469824A (en) * 2022-11-02 2022-12-13 蔚来汽车科技(安徽)有限公司 Method and device for controlling playing of vehicle-mounted audio, vehicle-mounted equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778158A (en) * 2009-12-29 2010-07-14 闻泰集团有限公司 Method for processing audio conflict of mobile phone
CN101944048A (en) * 2010-09-26 2011-01-12 中兴通讯股份有限公司 Management method of terminal in audio resource conflict and terminal
CN102117221A (en) * 2009-12-31 2011-07-06 上海博泰悦臻电子设备制造有限公司 Audio frequency application conflict management method and manager
CN102572060A (en) * 2010-12-07 2012-07-11 基信康信息技术(上海)有限公司 Processing method for mobile phone sound
CN103699501A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 Audio equipment managing method and system of mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778158A (en) * 2009-12-29 2010-07-14 闻泰集团有限公司 Method for processing audio conflict of mobile phone
CN102117221A (en) * 2009-12-31 2011-07-06 上海博泰悦臻电子设备制造有限公司 Audio frequency application conflict management method and manager
CN101944048A (en) * 2010-09-26 2011-01-12 中兴通讯股份有限公司 Management method of terminal in audio resource conflict and terminal
CN102572060A (en) * 2010-12-07 2012-07-11 基信康信息技术(上海)有限公司 Processing method for mobile phone sound
CN103699501A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 Audio equipment managing method and system of mobile terminal

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827825A (en) * 2016-02-29 2016-08-03 维沃移动通信有限公司 Audio data processing method and mobile terminal
CN105959466B (en) * 2016-04-22 2019-09-17 青岛海信移动通信技术股份有限公司 The treating method and apparatus of audio data
CN105959466A (en) * 2016-04-22 2016-09-21 青岛海信移动通信技术股份有限公司 Method and device for processing audio data
CN106445448A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Audio device control method and system of terminal and mobile terminal
CN107995369A (en) * 2017-12-19 2018-05-04 广州市千钧网络科技有限公司 A kind of method, apparatus and equipment for solving audio conflict
CN113170014A (en) * 2018-12-03 2021-07-23 深圳市欢太科技有限公司 Alarm clock playing method and device and electronic equipment
WO2020113390A1 (en) * 2018-12-03 2020-06-11 深圳市欢太科技有限公司 Alarm clock playback method and apparatus, and electronic device
CN113170014B (en) * 2018-12-03 2022-07-26 深圳市欢太科技有限公司 Alarm clock playing method and device and electronic equipment
CN109614252A (en) * 2018-12-10 2019-04-12 苏州思必驰信息科技有限公司 Audio playout schedule method and system for Intelligent story device
CN110488976A (en) * 2019-08-20 2019-11-22 广东小天才科技有限公司 Function management method, apparatus, equipment and storage medium
CN112860322A (en) * 2019-11-26 2021-05-28 成都鼎桥通信技术有限公司 Operating system switching method, device, equipment and storage medium
CN112860322B (en) * 2019-11-26 2022-04-26 成都鼎桥通信技术有限公司 Operating system switching method, device, equipment and storage medium
CN111124351A (en) * 2019-12-24 2020-05-08 RealMe重庆移动通信有限公司 Audio output method, audio output device, electronic equipment and storage medium
CN111464689A (en) * 2020-01-22 2020-07-28 华为技术有限公司 Audio output method and terminal equipment
US11979516B2 (en) 2020-01-22 2024-05-07 Honor Device Co., Ltd. Audio output method and terminal device
CN112965685A (en) * 2021-02-04 2021-06-15 RealMe重庆移动通信有限公司 Audio control method, device, system, terminal equipment and storage medium
CN112965685B (en) * 2021-02-04 2023-08-25 RealMe重庆移动通信有限公司 Audio control method, device, system, terminal equipment and storage medium
CN114598967A (en) * 2022-03-03 2022-06-07 合众新能源汽车有限公司 Audio policy management system, method, apparatus and computer readable medium
CN115469824A (en) * 2022-11-02 2022-12-13 蔚来汽车科技(安徽)有限公司 Method and device for controlling playing of vehicle-mounted audio, vehicle-mounted equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105045555A (en) Configuration file based method and apparatus for implementing audio conflict resolution
CN106445448B (en) Audio device control method and system of terminal and mobile terminal
TW202016693A (en) Human-computer interaction processing system, method, storage medium and electronic device
CN110515633B (en) Burning device and system
US20140179377A1 (en) Mobile electronic device having program notification function and program notification method thereof
US11837217B2 (en) Message playing method and terminal
CN109495792A (en) A kind of subtitle adding method, device, electronic equipment and the readable medium of video
CN106681698B (en) Dynamic list generation method and device
CN110956956A (en) Voice recognition method and device based on policy rules
CN104951335A (en) Processing method and device for application program installation packages
CN103905644A (en) Generating method and equipment of mobile terminal call interface
CN111222637A (en) Neural network model deployment method and device, electronic equipment and storage medium
CN102752704A (en) Sound information processing method and terminal
CN113110829B (en) Multi-UI component library data processing method and device
CN108834122A (en) A kind of bluetooth recognition method, apparatus, equipment and storage medium
CN105262878A (en) Processing method of automatic call recording and mobile terminal
CN105847572A (en) Creating method and device for reminding ringtone
CN104301486A (en) Electronic equipment and conversation control method
CN104346192A (en) Download method and download system for mobile application
CN104391742B (en) Optimizing application method and apparatus
CN104834450B (en) A kind of function activating method and terminal
US20120198418A1 (en) Software development and programming through voice
CN108491473A (en) Audio file playing method and device, electronic equipment and medium
CN108184193A (en) Control method for playing back, bluetooth equipment and the computer storage media of bluetooth playback terminal
CN107767857B (en) Information playing method, first electronic equipment and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151111