Background
Today, the automotive industry is rapidly developing and automobiles have become the primary vehicles of people. Meanwhile, automobiles are becoming popular consumer products, consumer groups of automobiles are expanding, and consumers have the automobiles and have higher and higher requirements on the automobiles, especially on the aspects of automobile performance and experience in driving the automobiles. For example, the user needs to have corresponding technical measures in the automobile to provide multimedia services such as music, video, and pictures, and services such as navigation, real-time traffic, and destination maps.
The vehicle-mounted equipment provides safety service including position information, personalized service and the like for the automobile on the basis of mobile communication and internet technology. In addition, the in-vehicle device can provide a navigation function, a traffic information function, an emergency function, and the like. Furthermore, the vehicle-mounted device can also provide various multimedia services, such as playing of local audio and video such as movies and music, receiving of broadcast television station programs, and the like. With the development of the internet, the network functions provided by the vehicle-mounted device are more and more, for example, accessing the internet wirelessly through the vehicle-mounted device, listening to network music or watching network videos, and the like.
For the vehicle-mounted device, music stored in a USB flash disk (USB flash disk) played by the vehicle-mounted device, abbreviated as U-disk music, music stored in a secure digital Memory Card (secure digital Memory Card) played by the vehicle-mounted device, abbreviated as SD Card music, music stored in another device, referred to as bluetooth music, transmitted to the vehicle-mounted device by bluetooth and played by the vehicle-mounted device, a fm broadcast played by the vehicle-mounted device, voice navigation of a navigation apparatus of the vehicle-mounted device, a ring tone of a vehicle-mounted phone, and the like are all played by the vehicle-mounted device, and therefore, they are collectively referred to as vehicle-mounted audio.
Third party audio refers to audio applications developed by others or other companies, not the company itself, that have no source code, and therefore, others, except the author or the developing company, cannot make source code modifications to their programs. For example: for the development companies of car audio applications, QQ music may then be considered third party audio.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a connection between a policy manager of a conventional in-vehicle device and an in-vehicle audio application unit and a third-party audio application unit; it can be seen from fig. 1 that there is no interconnection between the policy manager and the third-party audio application unit, which is mainly caused by that the third-party audio application unit and the policy manager of the vehicle-mounted device are not developed by the same company, so that the multimedia file called by the third-party audio application unit cannot be directly controlled by the vehicle-mounted device in the prior art, or the third-party audio in playing cannot be controlled. For example, when a user listens to a song through QQ music, the car phone receives a call dialed in, at this time, the user needs to manually turn off the listening QQ music, if the user is driving, the listening QQ music cannot be turned off in time, so that the call quality during the call of the car phone may be affected, and if the user needs to turn off the listening QQ music, the user also needs to manually turn off, and after the user finishes listening to the call, if the user still wants to listen to the QQ music, the user needs to manually turn on the QQ music again, which brings great inconvenience to the user.
Therefore, how to directly control the third-party audio through the vehicle-mounted device in a scene where the vehicle-mounted audio and the third-party audio coexist becomes one of the problems to be solved at present.
For the related art of car audio, reference may also be made to chinese patent application with publication number CN 101192812.
Disclosure of Invention
The invention solves the problem that in the prior art, in a scene where a vehicle-mounted audio and a third-party audio coexist, a vehicle-mounted device cannot directly control the third-party audio.
In order to solve the above problem, the present invention provides an audio control method applied to a vehicle-mounted device, including:
the strategy manager acquires the playing scene of the currently played multimedia file based on the information from the media player;
and the strategy manager determines an audio control strategy corresponding to the current playing scene and executes the audio control strategy so as to realize the control of the media player under the current playing scene.
Optionally, the executing the audio control policy includes: controlling the media player to execute the audio control strategy.
Optionally, the controlling the media player to execute the audio control policy is implemented by the media player controlling a multimedia file called by a third-party audio application unit and/or a car audio application unit.
Optionally, the controlling, by the media player, the multimedia file called by the third-party audio application unit and/or the car audio application unit includes: pausing execution of the called multimedia file, exiting execution of the multimedia file, and reloading the multimedia file.
Optionally, the executing the audio control policy includes: and controlling the volume of the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit during playing through a volume control module of the vehicle-mounted equipment.
Optionally, the information from the media player includes a type of a currently playing multimedia file, and the policy manager obtains a playing scene of the currently playing multimedia file based on the type of the multimedia file.
Optionally, the media player receives the type of the multimedia file sent by the third-party audio application unit and/or the vehicle-mounted audio application unit.
Optionally, the information from the media player includes: and playing scenes of the currently played multimedia file.
Optionally, the media player receives the type of the multimedia file sent by the third-party audio application unit and/or the vehicle-mounted audio application unit to determine a playing scene of the currently played multimedia file.
In order to solve the above problem, the present invention further provides an audio control apparatus applied to a vehicle-mounted device, including:
the strategy determining unit is used for receiving information from the media player, acquiring a playing scene of a currently played multimedia file, and determining an audio control strategy corresponding to the currently played scene;
and the strategy execution unit is used for executing the audio control strategy so as to realize the control of the media player under the current scene.
Optionally, the policy executing unit includes:
a first control unit for controlling the media player to execute the audio control strategy;
and the second control unit is used for controlling the volume control module of the vehicle-mounted equipment to execute the audio control strategy.
Optionally, the policy determining unit includes:
the first information receiving unit is used for receiving the type of the currently played multimedia file sent by the media player;
a scene determining unit, configured to determine a playing scene of the currently playing multimedia file based on the type of the currently playing multimedia file;
and the first strategy acquisition unit is used for acquiring an audio control strategy based on the playing scene of the currently played multimedia file.
Optionally, the policy executing unit includes:
a second information receiving unit, configured to receive a playing scene of a currently playing multimedia file sent by the media player;
and the second strategy acquisition unit is used for acquiring an audio control strategy based on the playing scene of the currently played multimedia file.
In order to solve the above problem, the present invention also provides an in-vehicle device, including:
the audio control device described above;
the media player is used for sending information to the audio control device and executing the audio control strategy under the control of the audio control device;
and the volume control module is used for executing the audio control strategy under the control of the audio control device.
Optionally, the information includes: the type of multimedia file currently being played.
Optionally, the information includes: and playing scenes of the currently played multimedia file.
Optionally, the vehicle-mounted device further includes:
the third-party audio application unit is used for sending the type of the currently called multimedia file to the media player;
and the vehicle-mounted audio application unit is used for sending the type of the currently called multimedia file to the media player.
Optionally, the media player interacts with the third-party audio application unit, the vehicle-mounted audio application unit, and the audio control device through interfaces.
Compared with the prior art, the technical scheme of the invention has the following advantages:
the strategy manager acquires the playing scene of the currently played multimedia file based on the information from the media player, determines the audio control strategy corresponding to the currently played scene, and executes the audio control strategy to realize the control of the media player under the currently played scene. The media player is controlled by the policy manager to execute the audio control policy, and the media player controls the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit to realize the audio control policy, so that the control of the third-party audio by the policy manager is realized.
Furthermore, the multimedia files called by the third-party audio application unit can be controlled through the policy manager, so that the importance of the third-party audio application unit is improved to a certain extent. In addition, the media player is controlled by the strategy manager, and then the third-party audio is controlled by the media player, so that an interface between the third-party audio application unit and the strategy manager does not need to be developed, the development time of the third-party audio application unit and the strategy manager is greatly shortened, the matching difficulty between the third-party audio application unit and the strategy manager is reduced, and the utilization rate of the third-party audio application unit is improved.
In addition, the direct control of the third-party audio through the vehicle-mounted equipment is realized, so that when a scene in which the third-party audio and the vehicle-mounted audio coexist appears, the vehicle-mounted equipment can directly perform corresponding control on the third-party audio, the application of manually controlling the third-party audio by a user is not needed, great convenience is brought to the user, and the experience degree of the user is improved.
Detailed Description
As described in the background art, since the policy manager of the existing in-vehicle device and the third-party audio application unit are not developed by the same company, the existing in-vehicle device cannot directly control the third-party audio. Referring to fig. 1, in the prior art, a car audio application unit informs a policy manager of a type of a car audio currently being called (U disc music, SD card music, bluetooth music, etc.), that is, informs the policy manager of a current playing scene, for example, informs the policy manager that the type of the car audio currently being called is U disc music or a ring of a car phone, and the policy manager selects a corresponding audio control policy, for example, pauses playing of the U disc music, according to the type of the current car audio provided by the car audio application unit, and informs the car audio application unit of the audio control policy, and informs a media player of pausing playing of the current U disc music by the car audio application unit.
Because the third-party audio application unit and the policy manager cannot interact with each other, when a playing scene in which the third-party audio and the vehicle-mounted audio coexist occurs, the policy manager cannot control the third-party audio. Therefore, the inventor proposes that a policy manager controls a media player, and then the media player correspondingly controls multimedia files called by the vehicle-mounted audio application unit and the third-party audio application unit, and because the media player is directly controlled by the policy manager to further control the vehicle-mounted audio and the third-party audio, an interface between the policy manager and the third-party audio application unit does not need to be developed, the development time of the third-party audio application unit and the policy manager is greatly shortened, the matching difficulty between the third-party audio application unit and the policy manager is also reduced, and the utilization rate of the third-party audio application unit is improved.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, specific details are set forth in order to provide a thorough understanding of the present invention. The invention can be implemented in a number of ways different from those described herein and similar generalizations can be made by those skilled in the art without departing from the spirit of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
Referring to fig. 2, fig. 2 is a flowchart of an audio control method applied to an in-vehicle device according to an embodiment of the present invention, and as shown in fig. 2, the audio control method applied to the in-vehicle device includes:
step S11: the policy manager obtains a playing scene of the currently playing multimedia file based on the information from the media player.
Step S12: and the strategy manager determines an audio control strategy corresponding to the current playing scene and executes the audio control strategy so as to realize the control of the media player under the current playing scene.
Step S11 is executed, and the policy manager receives information from the media player, where the information from the media player may be a type of a currently playing multimedia file in this embodiment. And the type of the currently played multimedia file is sent to the media player by the third-party audio application unit and/or the vehicle-mounted audio application unit. And when the third-party audio application unit and the vehicle-mounted audio application unit simultaneously start to operate and call the multimedia file to be played, the media player receives the types of the multimedia file to be called respectively sent by the third-party audio application unit and the vehicle-mounted audio application unit. And when the third-party audio application unit and the vehicle-mounted audio application unit do not start to operate simultaneously, the media player receives the types of the respectively called multimedia files sent by the third-party audio application unit or the vehicle-mounted audio application unit.
It should be noted that the type of the multimedia file described in this embodiment does not mean that the audio file is of mp3 or wav, but means that the currently played multimedia file is of usb disk music, SD card music, bluetooth music, fm broadcast, voice navigation, ring tone of car phone, or third party audio in the car audio. And the strategy manager acquires the playing scene of the currently played multimedia file based on the type of the multimedia file.
Step S12 is executed: and the strategy manager determines an audio control strategy corresponding to the current playing scene according to the obtained playing scene of the current playing multimedia file.
Specifically, for the policy manager, an audio control policy table is stored therein, where the audio control policy table usually includes audio control policies corresponding to different playing scenes, and the playing scenes are determined according to the type of the currently played multimedia file. The audio control policy table is specifically a file in an XML format, and the audio control policy table is determined by the actual requirements of the user.
After determining the audio control policy corresponding to the current playing scene, the policy manager executes the audio control policy, where in this embodiment, the executing of the audio control policy by the policy manager includes: and controlling the media player to execute the audio control strategy, wherein the strategy manager controls the media player to execute the audio control strategy by controlling the multimedia files called by the third-party audio application unit and/or the vehicle-mounted audio application unit through the media player. And the strategy manager controls the volume of the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit during playing through a volume control module of the vehicle-mounted equipment.
Specifically, the media player suspends the execution of the multimedia files called by the third-party audio application unit and/or the vehicle-mounted audio application unit, quits the execution of the multimedia files called by the third-party audio application unit and/or the vehicle-mounted audio application unit, and reloads the multimedia files called by the third-party audio application unit and/or the vehicle-mounted audio application unit. Namely: pausing the third party audio, quitting the third party audio, and replaying the third party audio. Taking the third-party audio application unit as a QQ music program as an example, the execution of the multimedia file called by the QQ music program is suspended, or the execution of the multimedia file called by the QQ music program is exited, or the multimedia file called by the QQ music program is reloaded after the execution of the multimedia file called by the QQ music program is suspended. Taking the example that the vehicle-mounted audio application unit plays the U disk music, the execution of the U disk music called by the vehicle-mounted audio application unit is paused, or the execution of the U disk music called by the vehicle-mounted audio application unit is exited, or the U disk music called by the vehicle-mounted audio application unit is reloaded after the execution of the U disk music called by the vehicle-mounted audio application unit is paused.
In this embodiment, the policy manager further controls a volume control module of the vehicle-mounted device based on the audio control policy, and further controls the volume of the third-party audio application unit and/or the multimedia file called by the vehicle-mounted audio application unit during playing through the volume control module.
In order to better illustrate the control of the third party audio and the car audio by the policy manager according to the embodiment of the present invention, the following is described in detail with reference to table 1. Table 1 is an audio control policy table according to an embodiment of the present invention, and it should be noted that the audio control policy table in table 1 is only used to illustrate that the policy manager according to the embodiment of the present invention controls a media player based on the audio control policy, and then the media player controls a multimedia file called by the third party audio application unit and/or the car audio application unit. In practical applications, the audio control policy table should be determined according to the actual needs of the user.
TABLE 1
As shown in table 1, for the first case shown in table 1, the user listens to the QQ music, at this time, the third party audio application unit (QQ music program) sends the type of the multimedia file "third party music" called by the third party audio application unit to the media player, the car phone receives the incoming call, i.e. the car phone ring sounds, the car audio application unit sends the multimedia file type "car phone ring" to the media player, the media player sends the type of the currently played multimedia file "third party music" and "car phone ring" to the policy manager, the policy manager obtains the currently played scene as the first scene according to the received information from the media player, determines that the audio control policy corresponding to the first scene is QQ music pause, the policy manager sends the QQ music pause, and continues playing the QQ music after the call is over to the media player, the media player pauses the play of QQ music based on the command. And after the conversation is finished, continuously playing the currently paused QQ music.
Similarly, for the second case shown in table 1, where the QQ music and the usb disk music are both playing and the navigation device of the vehicle-mounted device is also performing voice navigation, the third-party audio application unit (QQ music program) sends the type of the multimedia file called by the third-party audio application unit "third-party music" to the media player, the vehicle-mounted audio application unit sends the type of the multimedia file called by the third-party audio application unit "usb disk music" and "navigation audio" to the media player, the media player sends the types of the currently playing multimedia file "third-party music", "usb disk music" and "navigation audio" to the policy manager, the policy manager obtains the currently playing scene as the second scene according to the received information from the media player, determines the audio control policy corresponding to the second scene as the exit of playing the QQ music and muting the usb disk music, the policy manager sends a command to the media player to quit playing the QQ music, and the media player quits executing the QQ music based on the command. The strategy manager sends a command of reducing the playing volume of the USB flash disk music to zero to a volume control module of the vehicle-mounted equipment, and then reduces the volume of the USB flash disk music called by the vehicle-mounted audio application unit to zero through the volume control module when the USB flash disk music is played, namely the played USB flash disk music is in a mute state. And executing the audio control strategy corresponding to the second scene through the strategy manager, so that the user can clearly hear the voice navigation of the vehicle-mounted navigation device.
Similarly, for the third case in table 1, the volume control module of the in-vehicle device is controlled by the policy manager, and then the volume of the QQ music called by the third-party audio application unit (QQ music program) is reduced to zero by the volume control module, so that the QQ music being played is in a mute state, and the volume control module of the in-vehicle device is controlled by the policy manager, and then the volume of the navigation audio called by the in-vehicle audio application unit is increased by the volume control module.
In other embodiments, the information received by the policy manager from the media player may be a playing scene of a currently playing multimedia file, and the scene of the currently playing multimedia file is determined by the media player. The media player determines a current playing scene according to the type of a multimedia file received from a third-party audio application unit and/or a vehicle-mounted audio application unit and sends the playing scene to a policy manager, at the moment, an audio control policy table stored in the policy manager does not include a column of audio types and only includes the playing scene and an audio control policy, the policy manager determines an audio control policy corresponding to the playing scene of the current playing multimedia file based on the received playing scene, and then controls the media player to correspondingly control the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit, or controls a volume control module of the vehicle-mounted equipment by the policy manager, and further controls the volume control module to play the audio of the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit when the multimedia file is played The amount is controlled accordingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an audio control apparatus applied to a vehicle-mounted device according to an embodiment of the present invention, and as shown in fig. 3, the audio control apparatus 20 includes:
the policy determining unit 10 is configured to receive information from a media player, acquire a playing scene of a currently playing multimedia file, and determine an audio control policy corresponding to the currently playing scene.
And the strategy executing unit 11 is connected to the strategy determining unit 10, and is configured to execute the audio control strategy to implement control over the media player in the current scene.
In this embodiment, the policy determining unit 10 includes:
a first information receiving unit 101, configured to receive the type of the currently playing multimedia file sent by the media player.
And a scene determining unit 102, connected to the first information receiving unit 101, configured to determine a playing scene of the currently playing multimedia file based on the type of the currently playing multimedia file.
A first policy obtaining unit 103, connected to the scene determining unit 102, configured to obtain an audio control policy based on the playing scene of the currently playing multimedia file.
The policy execution unit 11 includes: a first control unit 110, connected to the first policy obtaining unit 103, configured to control the media player to execute the audio control policy.
And the second control unit 111 is connected to the first policy obtaining unit 103, and is configured to control a volume control module of the vehicle-mounted device to execute the audio control policy.
In other embodiments, the policy determination unit includes:
and the second information receiving unit is used for receiving the playing scene of the currently played multimedia file sent by the media player.
And the second strategy acquisition unit is used for acquiring an audio control strategy based on the playing scene of the currently played multimedia file.
In this embodiment, the working process of the audio control apparatus may be performed by referring to the above audio control method applied to the vehicle-mounted device, and details are not described here.
An embodiment of the present invention further provides a vehicle-mounted device, including:
the audio control device 20 described above.
And the media player 21 is connected with the audio control device 20 and used for sending information to the audio control device 20 and executing the audio control strategy under the control of the audio control device 20.
And the volume control module 22 is connected to the audio control device 20 and the media player 21, and is configured to execute the audio control policy under the control of the audio control device 20.
In this embodiment, the vehicle-mounted device further includes:
and the third-party audio application unit 23 is connected to the media player 21 and configured to send the type of the currently called multimedia file to the media player 21.
And the vehicle-mounted audio application unit 24 is connected with the media player 21 and used for sending the type of the currently called multimedia file to the media player 21.
In this embodiment, the information sent by the media player 21 includes: the type of the currently playing multimedia file, and in other embodiments, the information may also include a playing scene of the currently playing multimedia file.
In this embodiment, the media player 21 interacts with the third-party audio application unit 23, the car audio application unit 24, and the audio control device 20 through interfaces.
In summary, the technical scheme of the invention has at least the following beneficial effects:
the strategy manager acquires the playing scene of the currently played multimedia file based on the information from the media player, determines the audio control strategy corresponding to the currently played scene, and executes the audio control strategy to realize the control of the media player under the currently played scene. The media player is controlled by the policy manager to execute the audio control policy, and the media player controls the multimedia file called by the third-party audio application unit and/or the vehicle-mounted audio application unit to realize the audio control policy, so that the control of the third-party audio by the policy manager is realized.
Furthermore, the multimedia files called by the third-party audio application unit can be controlled through the policy manager, so that the importance of the third-party audio application unit is improved to a certain extent. In addition, the media player is controlled by the strategy manager, and then the third-party audio is controlled by the media player, so that an interface between the third-party audio application unit and the strategy manager does not need to be developed, the development time of the third-party audio application unit and the strategy manager is greatly shortened, the matching difficulty between the third-party audio application unit and the strategy manager is reduced, and the utilization rate of the third-party audio application unit is improved.
In addition, the direct control of the third-party audio through the vehicle-mounted equipment is realized, so that when a scene in which the third-party audio and the vehicle-mounted audio coexist appears, the vehicle-mounted equipment can directly perform corresponding control on the third-party audio, the application of manually controlling the third-party audio by a user is not needed, great convenience is brought to the user, and the experience degree of the user is improved.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the present invention, and those skilled in the art can make variations and modifications of the present invention without departing from the spirit and scope of the present invention by using the methods and technical contents disclosed above.