CN111324331A - Interactive message prompting method and device, electronic equipment and storage medium - Google Patents

Interactive message prompting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111324331A
CN111324331A CN202010096869.6A CN202010096869A CN111324331A CN 111324331 A CN111324331 A CN 111324331A CN 202010096869 A CN202010096869 A CN 202010096869A CN 111324331 A CN111324331 A CN 111324331A
Authority
CN
China
Prior art keywords
interactive message
audio
determining
volume
output element
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
CN202010096869.6A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010096869.6A priority Critical patent/CN111324331A/en
Publication of CN111324331A publication Critical patent/CN111324331A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application relates to an interactive message prompting method and device, electronic equipment and a storage medium. The interactive message prompting method comprises the following steps: when the interactive message is received, determining a current audio output element of the electronic equipment; if the audio output element comprises a receiver of the electronic equipment or an earphone connected with the electronic equipment, acquiring the current working volume of the audio output element; determining a prompt parameter of the interactive message according to the current working volume, wherein the prompt parameter at least comprises a target volume of the interactive message, and the target volume is less than or equal to the current working volume; and outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter. In the method, when the electronic device receives the interactive message, the prompt tone of the interactive message can be output through the current audio output element (such as an earphone of the electronic device or an earphone including an access electronic device), so that the user can be prevented from missing the interactive message due to listening to other audio.

Description

Interactive message prompting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic communication technologies, and in particular, to an interactive message prompting method and apparatus, an electronic device, and a storage medium.
Background
With the development of communication technology and the improvement of living standard of people, the mobile phone becomes an important communication tool in daily life of people, and brings great convenience to people. At present, for most mobile phone terminals, for new messages such as short messages, multimedia messages, e-mails or instant messaging messages received by the mobile phone terminal when a user listens to music or FM broadcasts using a wired earphone or a wireless earphone, the existing scheme for prompting the new messages is to externally play a prompt tone through a mobile phone speaker. According to the current design of mobile phone terminals, when a speaker plays a new message prompt tone, the volume of the new message prompt tone generally follows the set volume of the system. If the volume of the system setting is small, the audio sound beside the user is large, or the user is in a fan, the user is difficult to hear the prompt sound played outside through the loudspeaker, so that the user easily misses some important new messages.
Disclosure of Invention
The embodiment of the application provides an interactive message prompting method and device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present application provides an interactive message prompting method, including: when the interactive message is received, determining a current audio output element of the electronic equipment; if the audio output element comprises a receiver of the electronic equipment or an earphone connected with the electronic equipment, acquiring the current working volume of the audio output element; determining a prompt parameter of the interactive message according to the current working volume, wherein the prompt parameter at least comprises a target volume of the interactive message, and the target volume is less than or equal to the current working volume; and outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter.
In a second aspect, an interactive message prompt apparatus is provided in an embodiment of the present application, and includes an audio output element determining module, a volume determining module, a prompt parameter determining module, and a prompt output module. The audio output element determining module is used for determining the current audio output element of the electronic equipment when the electronic equipment receives the interactive message. The volume determination module is used for acquiring the current working volume of the audio output element when the audio output element comprises an earphone of the electronic equipment or an earphone connected into the electronic equipment. The prompt parameter determining module is used for determining prompt parameters of the interactive messages according to the current working volume, wherein the prompt parameters at least comprise target volume of the interactive messages, and the target volume is less than or equal to the current working volume. And the prompt output module is used for outputting prompt tones corresponding to the interactive messages through the audio output element according to the prompt parameters.
In a third aspect, an embodiment of the present application provides an electronic device, including one or more processors, a memory, and one or more applications, where the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the above-mentioned interactive message prompting method.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code is called by a processor to execute the above-mentioned interactive message prompting method.
In the method, the apparatus, and the electronic device for prompting an interactive message provided in the embodiments of the present application, when an interactive message is received, a prompt tone of the interactive message can be output through a current audio output element (such as an earphone of the electronic device or an earphone connected to the electronic device), so that it can be avoided that a user misses the interactive message because the user is listening to other audio. Furthermore, the volume of the prompt tone output by the current audio output element is less than or equal to the working volume of the current audio output element, so that the prompt volume of the interactive message does not need to follow the set volume of the system, the phenomenon that the user is scared by the overlarge prompt volume of the following system can be avoided, and the phenomenon that the undersize volume set by the following system is ignored can be avoided.
Drawings
In order to more clearly illustrate the technical solution of the application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an interactive message prompting method according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of an interactive message prompting method according to an embodiment of the present application.
Fig. 3 is another schematic flow chart of an interactive message prompting method according to an embodiment of the present application.
Fig. 4 is a schematic functional module diagram of an interactive message prompting device according to an embodiment of the present application.
Fig. 5 is a functional block diagram of an electronic device for executing an interactive message prompting method according to an embodiment of the present application.
Fig. 6 is a storage unit, provided in an embodiment of the present application, for storing or carrying program codes for implementing an interactive message prompting method according to the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As used in embodiments herein, "communication terminal" (or simply "terminal"), "electronic device" includes, but is not limited to, devices that are configured to receive/transmit communication signals via a wireline connection, such as via a Public Switched Telephone Network (PSTN), a Digital Subscriber Line (DSL), a digital cable, a direct cable connection, and/or another data connection/network, and/or via a wireless interface (e.g., for a cellular network, a Wireless Local Area Network (WLAN), a digital television network such as a DVB-H network, a satellite network, an AM-FM broadcast transmitter, and/or another communication terminal). A communication terminal arranged to communicate over a wireless interface may be referred to as a "wireless communication terminal", a "wireless terminal" and/or an "electronic device". Examples of electronic devices, terminals include, but are not limited to, including satellite or cellular telephones; a Personal Communications System (PCS) terminal that may combine a cellular radiotelephone with data processing, facsimile and data communications capabilities; PDAs that may include radiotelephones, pagers, internet/intranet access, Web browsers, notepads, calendars, and/or Global Positioning System (GPS) receivers; as well as conventional laptop and/or palmtop receivers, gaming consoles, or other electronic devices that include radiotelephone transceivers. The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic view illustrating an application scenario of an interactive message prompting method according to an embodiment of the present application, where the interactive message prompting method is applied to an electronic device 100, and the electronic device 100 may be, but is not limited to, an electronic device such as a mobile phone, a tablet computer, a game console, and the like. The electronic device 100 of the present embodiment is described by taking a mobile phone as an example.
The electronic device 100 includes an audio playing element, such as a speaker (not shown), an earphone 1001, and the like, for converting the electrical signal into an analog signal to play audio, which may be from an audio file, a voice communication message, an audio signal generated during a call, and the like. In some embodiments, the electronic device 100 may further play audio through the external audio playing component 1006, the external audio playing component may include an external speaker, an earphone, and the like, and the transmission of the audio signal between the external audio playing component 1006 and the electronic device 100 may be achieved through a wired connection or a wireless connection (e.g., a bluetooth connection, and the like). Further, the electronic device 100 may further include an audio output interface 1003, and an external audio playing component 1006 accesses the electronic device 100 through the audio input interface 1003 to receive and play an audio signal provided by the electronic device 100.
Further, the electronic device 100 further includes a proximity sensor 1005, and the proximity sensor 1005 may be disposed adjacent to the earpiece 1001, which is used to detect a distance between the electronic device 100 and an object external thereto. The proximity sensor 1005 includes, but is not limited to, an infrared sensor, an ultrasonic sensor, and the like.
Referring to fig. 2, in the interactive message prompting method provided in the embodiment of the present application, when the electronic device receives an interactive message, a current audio output element of the electronic device is determined, and if the audio output element includes an earphone of the electronic device or an earphone connected to the electronic device, a prompting volume of the interactive message is determined according to a current working volume of the audio output element, and a corresponding prompting tone is output through the audio output element, so that a user can be prevented from missing the interactive message due to listening to other audio. Once triggered, the flow of the method in the embodiment may be automatically run by the electronic device, where each step may be performed sequentially according to a sequence in the flowchart, or may be performed simultaneously according to a plurality of steps according to an actual situation, which is not limited herein. The interactive message prompting method can comprise the steps S101 to S107.
Step S101: when the interactive message is received, the current audio output element of the electronic equipment is determined.
The interactive messages include any of the following messages: the message may also include any other message that needs to play a warning tone through an audio playing element, such as a network connection error warning message, a low power warning message, an application program warning message, and the like. In some embodiments, when the electronic device receives the interactive message, the current audio output element of the electronic device may be actively determined by determining an operating state of an internal audio output element of the electronic device, or may be determined by determining a connection state of an audio output interface of the electronic device, which is not limited in this specification.
Step S103: and if the audio output element comprises an earphone of the electronic equipment or an earphone connected with the electronic equipment, acquiring the current working volume of the audio output element.
The current operating volume of the audio output element may be visually understood as the volume of audio being played by the current audio output element. In some embodiments, the electronic device is generally provided with a volume setting corresponding to a specific audio output element (e.g., corresponding to an earphone, a speaker, an external audio device, etc.), and at this time, the electronic device may directly read the volume setting corresponding to the current audio output element to obtain the working volume thereof. Of course, in other embodiments, there may be no setting option provided in the electronic device for the volume of each audio output element, and the corresponding volume value may be determined as the working volume of the current audio output element according to the amplitude of the audio signal being played by the audio output element.
Step S105: and determining a prompt parameter of the interactive message according to the current working volume, wherein the prompt parameter at least comprises a target volume of the interactive message, and the target volume is less than or equal to the current working volume.
In practical application, when a user listens to audio through the audio output element, the current working volume of the audio output element represents the volume which the user feels suitable currently, so that the target volume of the interactive message is determined according to the current working volume of the audio output element, the volume value can be set according to the actual feeling of the user, and the situation that the volume of the prompt message is suddenly frightened by the user due to the fact that the volume of the prompt message follows the overlarge system volume is avoided.
Step S107: and outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter.
In some embodiments, after determining the audio file of the corresponding alert tone according to the interactive message, the electronic device reads the audio file into the buffer and decodes the audio file to obtain an audio signal, and transmits the audio signal to the audio output element, so that the audio output element plays the alert tone of the interactive message at the target volume.
According to the interactive message prompting method provided by the embodiment of the application, when the interactive message is received, the prompting sound of the interactive message can be output through the current audio output element (such as an earphone of the electronic equipment or an earphone connected with the electronic equipment), so that the phenomenon that a user misses the interactive message due to listening to other audio can be avoided. Furthermore, the volume of the prompt tone output by the current audio output element is less than or equal to the working volume of the current audio output element, so that the prompt volume of the interactive message does not need to follow the set volume of the system, the phenomenon that the user is scared by the overlarge prompt volume of the following system can be avoided, the effects of protecting the ear and the hearing of the user can be achieved, and the phenomenon that the undersize volume set by the following system is overlooked can be avoided.
Referring to fig. 3, based on the above-mentioned interactive message prompting method, an embodiment of the present application further provides another interactive message prompting method, in which when the electronic device receives the interactive message, a current audio output element of the electronic device is determined, and if the audio output element includes an earphone or an earphone, a playing volume of the current audio is reduced, and when a corresponding prompt tone is output through the audio output element, a user can be prevented from missing the interactive message due to listening to other audio. It should be noted that the interactive message prompt method steps of the embodiments of the present application may be performed in a computer system such as a set of computer executable instructions and, although a logical order is shown in the specification, in some cases, the steps shown or described may be performed in an order different than here. In this embodiment, the interactive message prompting method may include steps S201 to S209.
Step S201: when the interactive message is received, the current audio output element of the electronic equipment is determined.
The interactive messages include any of the following messages: the message may also include any other message that needs to play a warning tone through an audio playing element, such as a network connection error warning message, a low power warning message, an application program warning message, and the like.
When the electronic device receives the interactive message, it actively determines its current audio output element.
In some embodiments, the electronic device may determine the audio output element by an operating state of an internal audio output element of the electronic device. For example, the internal audio output element of the electronic device includes an earphone and a plurality of speakers, and when the electronic device receives the interactive message, the operating states of the earphone and the speakers are actively determined, and the audio output element in operation is determined as the current audio output element of the electronic device. In this embodiment, step S201 may include: when receiving the interactive message, determining the working state of a receiver of the electronic equipment; and if the earphone is in work, determining that the current audio output element of the electronic equipment comprises the earphone.
In some embodiments, when the electronic device determines the audio output element, it may also be determined by the connection state of the audio output interface of the electronic device. For example, when the electronic device receives the interactive message, the connection state of the audio output interface is actively acquired, and if the audio output interface is connected to an external audio device, such as an earphone, a sound box, or the like, the external audio device may be determined to be the external audio device regardless of the state of the external audio device, for example, the external audio device is in a working state of outputting audio or in a quiet state of not outputting audio. Therefore, in this embodiment, step S201 may include: when the interactive message is received, determining audio equipment connected with an audio output interface of the electronic equipment; if the audio output interface is connected to the earphone, the current audio output element of the electronic equipment is determined or the earphone connected to the electronic equipment is included.
Step S203: and if the audio output element comprises an earphone of the electronic equipment or an earphone connected with the electronic equipment, acquiring the current working volume of the audio output element.
The current operating volume of the audio output element may be visually understood as the volume of audio being played by the current audio output element. In some embodiments, if the current audio output element of the electronic device is an earphone, the electronic device usually has a volume setting corresponding to the earphone, and at this time, the volume setting corresponding to the earphone can be directly read to obtain the working volume. Of course, in other embodiments, there may be no setting option dedicated to controlling the volume of the receiver in the electronic device, and the amplitude of the audio signal being played by the receiver may be read, and the corresponding volume may be determined as the working volume of the current audio output element according to the amplitude.
In some embodiments, if the current audio output element of the electronic device is a headphone, the electronic device usually has a corresponding volume setting item for an external audio device (e.g., a headphone), and at this time, the volume setting item corresponding to the external audio device may be directly read to obtain the working volume of the electronic device. It should be noted that when the current audio output element of the electronic device is a headphone, the headphone may be in a quiet state without outputting audio, and it is a reliable method to directly read its corresponding volume setting item to obtain the current working volume. Of course, in other embodiments, there may be no setting option provided in the electronic device specifically for controlling the volume of the external audio device, and then the amplitude of the audio signal being played by the external audio device (such as a headphone or the like) may be read, and the corresponding volume may be determined as the working volume of the current audio output element according to the amplitude.
Step S205: and determining a prompt parameter of the interactive message according to the current working volume, wherein the prompt parameter at least comprises a target volume of the interactive message, and the target volume is less than or equal to the current working volume.
In practical application, when a user listens to audio through the audio output element, the current working volume of the audio output element represents the volume which the user feels suitable currently, so that the target volume of the interactive message is determined according to the current working volume of the audio output element, the volume value can be set according to the actual feeling of the user, and the situation that the volume of the prompt message is suddenly frightened by the user due to the fact that the volume of the prompt message follows the overlarge system volume is avoided.
In some embodiments, the prompt parameters of the interactive message may include a prompt tone audio file and a prompt tone volume, different interactive messages have different prompt tone audio files, and the electronic device is capable of representing different interactive messages by different sounds, then step S205 may include: determining a prompt tone audio file corresponding to the interactive message according to the type of the interactive message, determining a target volume of the interactive message according to the current working volume of the current audio output element, and determining prompt parameters of the interactive message according to the prompt tone audio file and the target volume, wherein the prompt parameters comprise the prompt tone audio file and the target volume.
In some embodiments, the prompt priority (e.g., parameters such as the type and volume of the prompt tone) of the electronic device differs for different interactive messages, for example, the electronic device prompts with a larger volume for more important interactive messages. Therefore, the step of determining the target volume of the interactive message according to the current working volume may include: the method comprises the steps of obtaining the audio type of the current output audio of an audio output element, determining the importance degree of an interactive message relative to the current output audio according to the type and the audio type of the interactive message, and determining the target volume of the interactive message according to the current working volume and the importance degree.
In this embodiment, the electronic device may directly read the interactive message to determine its type, or may determine the type of the interactive message based on the application that generated the interactive message. For example, if the application program generating the interactive message is a call application program (such as an incoming call), determining the type of the interactive message as a call type; if the application program generating the interactive message is a short message application program (such as a short message, instant messaging software and the like), determining that the type of the interactive message is a short message type; if the application that generated the interactive message is an entertainment application (e.g., a game message), the type of the interactive message is determined to be entertainment type.
In this embodiment, the importance levels of different types of the interactive messages are different, so that the electronic device can determine the importance level of the interactive message based on the type of the interactive message. Specifically, a preset interactive message type importance list may be preset in the electronic device, and then the electronic device may search for the first importance level of the interactive message in the interactive message type importance list according to the interactive message type. In this embodiment, the first importance level may be represented by a number, such as 1, 2, 3, … …, wherein the larger the number, the more important the interactive message is. For example, a conversation type of interactive message corresponds to level 5, and an entertainment type of interactive message corresponds to level 1.
In other embodiments, the importance level of the interactive message may be determined according to the specific content of the interactive message, for example, interactive messages generated by different application programs may correspond to different first importance levels; for another example, in the same type of interactive message, the electronic device may obtain a sender of the interactive message according to different specific contents, which may correspond to different first importance levels, specifically, for example, for interactive messages all of the short message type, and determine the importance level of the interactive message when the sender of the interactive message is a storage status in communication; when the sender of the interactive message does not exist in the address list, determining the importance level of the interactive message as a lower level (such as level 1 or level 2); when the sender of the interactive message exists in the address book, the importance level of the interactive message is determined to be higher (such as level 2 or level 3).
In this embodiment, the electronic device may determine the audio type of the currently output audio based on the audio signal input to the audio output element or/and based on the audio file being played, which may include a general audio type, a call type, and the like, a general audio file such as a music play file, an audio file embedded in a video, and the like. Further, the electronic device can also determine the audio type of the currently output audio based on the application currently invoking the audio output element. Specifically, when the audio output element is in the working state, the electronic device may call a running application program list, and determine the audio type of the currently output audio according to the running application program and the file read by the application program. For example, when a call application of the electronic device is in an operating state and the audio output element is in a working state, it may be determined that the current audio type is a call type; for another example, when a music player of the electronic device is in an operating state and the audio output element is in an operating state, it may be determined that the current audio type is a normal audio type.
In this embodiment, the importance levels are different for different audio types, so the electronic device can determine the importance level of the currently output audio based on the audio type. Specifically, a preset audio type importance list may be preset in the electronic device, and then it may search the audio type importance list for a second importance level of currently output audio according to the audio type. In this embodiment, the second importance level may be represented by a number, such as 1, 2, 3, … …, where a larger number indicates that the interactive message is more important. For example, the currently output audio of the talk type corresponds to 5 levels, and the currently output audio of the normal audio type corresponds to 3 levels.
After the first importance level and the second importance level are determined, the determining the target volume of the interactive message according to the current working volume and the importance level includes: if the second importance level is greater than the first importance level, determining a corresponding target volume level according to the first importance level, and determining a target volume of the interactive message according to the target volume level, wherein the target volume is less than the current working volume; and if the second importance level is less than or equal to the first importance level, determining that the target volume is equal to the current working volume. In some embodiments, the volume of the audio output element may have multiple levels, such as 7 levels for current electronic devices, with the higher the volume level, the greater the loudness of the output sound. If the second importance level is greater than the first importance level, it indicates that the audio signal currently listened to by the user is more important than the interactive message, and at this time, it is not preferable to set the prompt volume of the interactive message too large, the electronic device determines the target volume to be smaller than the working volume of the current audio output element, and may further determine the corresponding target volume according to the importance level of the interactive message, for example, the lower the first importance level, the lower the corresponding target volume level.
In some embodiments, if the current audio output element of the electronic device is an earphone, the volume of the interactive message may be determined according to the distance between the earphone and the human ear, so as to play the prompt tone of the interactive message with a proper volume, thereby further preventing the user from missing important interactive messages. At this time, step S205 may include: acquiring the distance between the electronic equipment and the human ear, and determining the target volume of the interactive message according to the current working volume and the distance, wherein the target volume is less than or equal to the current working volume; and determining a prompt parameter of the interactive message according to the target volume, wherein the prompt parameter comprises the target volume.
Step S207: and outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter.
In some embodiments, after determining the audio file of the corresponding alert tone according to the interactive message, the electronic device reads the audio file into the buffer and decodes the audio file to obtain an audio signal, and transmits the audio signal to the audio output element, so that the audio output element plays the alert tone of the interactive message at the target volume.
Step S209: and performing gain processing on the audio signal played by the audio output element based on the preset gain parameter to reduce the volume played by the audio signal.
In some embodiments, the amplitude of the audio signal may be gain processed to reduce the amplitude of the audio signal so that the volume at which the audio signal is played is reduced to avoid affecting the prompts of the interactive message. At this time, step S209 may include: and acquiring an audio signal played by the audio output element, performing gain processing on the audio amplitude of the audio signal based on the preset gain parameter, and continuously outputting the processed audio signal until the prompt tone of the interactive message is played. Furthermore, the gain parameter may be a function value that varies with time, or may be a fixed data value, and the volume of the audio signal can be reduced by only keeping the gain parameter smaller than 1.
In some embodiments, the process of performing gain processing on the audio amplitude may include parsing the audio file or the audio signal, modifying data representing amplitude information in the obtained audio signal, and then packaging the modified data, where the audio amplitude of the modified data is modified when the buffer of the electronic device is buffered in the corresponding audio file and played. In other embodiments, during the process of gain processing the audio amplitude, and during the decoding process of audio output playing, the amplitude data is obtained by analyzing the obtained digital audio signal, and the amplitude data is multiplied by the gain parameter to change the amplitude, so as to adjust the playing volume of the audio signal. The gain processing process can be executed before the audio file does not enter the buffer area, so as to reduce the playing load of the electronic equipment, and can also process the content of the audio file in the buffer area, so as to improve the processing efficiency.
In the embodiment of the present application, the execution sequence of step S209 is not limited, and may be executed before or simultaneously with step S207, or may be executed simultaneously with step S201, so as to ensure that when the electronic device receives the interactive message, the volume of the currently output audio can be reduced, so as to avoid that the sound of the currently output audio masks the prompt tone of the interactive message, and to avoid that the user misses the interactive message due to listening to other audio.
According to the interactive message prompting method provided by the embodiment of the application, when the interactive message is received, the prompting sound of the interactive message can be output through the current audio output element (such as an earphone of the electronic equipment or an earphone connected with the electronic equipment), so that the phenomenon that a user misses the interactive message due to listening to other audio can be avoided. Furthermore, the volume of the prompt tone output by the current audio output element is less than or equal to the working volume of the current audio output element, so that the prompt volume of the interactive message does not need to follow the set volume of the system, the phenomenon that the user is scared by the overlarge prompt volume of the following system can be avoided, and the effect of protecting the ear and the hearing of the user can be achieved. Furthermore, after the electronic device receives the interactive message, the volume of the currently output audio is reduced, and the prompt tone of the interactive message is output through the current audio output element, so that the condition that the prompt tone of the interactive message is covered by the sound of the currently output audio can be avoided, and the condition that a user misses the interactive message due to listening to other audio is avoided.
Referring to fig. 4, based on the above-mentioned interactive message prompting method, an interactive message prompting device 200 according to an embodiment of the present application is further provided, and fig. 4 shows a block diagram of the interactive message prompting device 200. The interactive message prompting device 200 is operated in the electronic device 100 shown in fig. 1, and is used for executing the interactive message prompting method. In an embodiment of the present application, the interactive message prompting device 200 is stored in a memory of the electronic device 100 and configured to be executed by one or more processors of the electronic device 100.
Specifically in the embodiment shown in fig. 4, the interactive message prompting device 200 includes an audio output element determination module 210, a volume determination module 230, a prompt parameter determination module 250, and a prompt output module 270. The audio output element determination module 210 is configured to determine a current audio output element of the electronic device when the electronic device receives the interactive message. The volume determination module 230 is configured to obtain a current working volume of the audio output element when the audio output element includes an earphone of the electronic device or a headset connected to the electronic device. The prompt parameter determining module 250 is configured to determine a prompt parameter of the interactive message according to the current working volume, where the prompt parameter at least includes a target volume of the interactive message, and the target volume is less than or equal to the current working volume. The prompt output module 270 is used for outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter. It is to be appreciated that the modules described above can be program modules that execute on computer-readable storage media.
In some embodiments, prompt parameter determination module 250 is further operable to: determining a prompt tone audio file corresponding to the interactive message according to the type of the interactive message, determining a target volume of the interactive message according to the current working volume, and determining prompt parameters of the interactive message according to the prompt tone audio file and the target volume, wherein the prompt parameters comprise the prompt tone audio file and the target volume. Further, when the target volume of the interactive message is determined according to the current working volume, the prompt parameter determining module 250 is configured to obtain an audio type of a currently output audio of the audio output element, determine an importance degree of the interactive message relative to the currently output audio according to the type and the audio type of the interactive message, and determine the target volume of the interactive message according to the current working volume and the importance degree. Further, when determining the importance degree of the interactive message relative to the currently output audio according to the type of the interactive message and the audio type, the prompt parameter determining module 250 is configured to find a first importance degree level of the interactive message according to the type of the interactive message based on a preset interactive message importance list, find a second importance degree level of the currently output audio according to the audio type based on the preset audio type importance list, and determine the importance degree of the interactive message relative to the currently output audio according to the first importance degree level and the second importance degree level. If the second importance level is greater than the first importance level, the prompt parameter determination module 250 is configured to determine a corresponding target volume level according to the first importance level, and determine a target volume of the interactive message according to the target volume level, where the target volume is less than the current working volume; if the second importance level is less than or equal to the first importance level, the prompt parameter determination module 250 is configured to determine that the target volume is equal to the current working volume.
In some embodiments, the audio output element 210 is further configured to determine, when the electronic device receives the interactive message, an audio device to which an audio output interface of the electronic device is connected, and if the audio output interface is connected to the headset, the audio output element 210 is further configured to determine a current audio output element of the electronic device or a headset connected to the electronic device.
In some embodiments, the audio output element 210 is further configured to determine an operating state of an earpiece of the electronic device when the electronic device receives the interactive message, and if the earpiece is in operation, the audio output element 210 is further configured to determine that a current audio output element of the electronic device includes the earpiece.
In some embodiments, the prompt parameter determination module 270 is further configured to obtain a distance between the electronic device and the human ear; determining the target volume of the interactive message according to the current working volume and the distance, wherein the target volume is less than or equal to the current working volume; and determining a prompt parameter of the interactive message according to the target volume.
In some embodiments, the interactive message prompting device 200 further includes a volume adjustment module 290. Before or while outputting the alert tone corresponding to the interactive message through the audio output element, the volume adjusting module 290 is configured to obtain an audio signal played by the audio output element, and perform gain processing on the amplitude of the audio signal based on a preset gain parameter, where the gain parameter is smaller than 1; and the audio processing unit is used for continuously outputting the processed audio signal until the prompt tone of the interactive message is played.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
In a practical application scenario, the electronic device 100 may be used as a smartphone terminal, in which case the electronic device 100 generally further includes one or more (only one shown in fig. 5) of the following components: a processor 102, a memory 104, a capture module 108, an audio circuit 110, an input module 118, a power module 122, and one or more applications, wherein the one or more applications may be stored in the memory 104 and configured to be executed by the one or more processors 102, the one or more programs configured to perform a method as described in the aforementioned method embodiments. The photographing module 108 may include the main control chip 40 described above. It will be understood by those skilled in the art that the structure shown in fig. 5 is merely an illustration and is not intended to limit the structure of the electronic device 100. For example, electronic device 100 may also include more or fewer components than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Processor 102 may include one or more processing cores. The processor 102 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like
The shooting module 108 is used for performing shooting tasks, such as taking pictures, videos, or making video phone calls. The audio circuitry 110, speaker 101, sound jack 103, microphone 105 collectively provide an audio interface between a user and the electronic device 100. Specifically, audio circuitry 110 receives sound data from processor 102, converts the sound data to an electrical signal, and transmits the electrical signal to speaker 101. The speaker 101 converts the electric signal into a sound wave that can be heard by the human ear. The audio circuitry 110 also receives electrical signals from the microphone 105, converts the electrical signals to sound data, and transmits the sound data to the processor 102 for further processing.
In this embodiment, the input module 118 may include a touch screen 109 disposed on the touch screen 30, and the touch screen 109 may collect a touch operation performed by a user on or near the touch screen 109 (e.g., an operation performed by the user on or near the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) and drive a corresponding connection device according to a preset program. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107 or a microphone 105.
The touch screen 30 is used to display information input by a user, information provided to the user, and various graphical user interfaces of the electronic device 100, which may be composed of graphics, text, icons, numbers, video, and any combination thereof, and in one example, the touch screen 109 may be provided on the touch screen 30 so as to be integrated with the touch screen 30.
The power module 122 is used to provide a supply of power to the processor 102 and other components. Specifically, power module 122 may include a power management device, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components associated with the generation, management, and distribution of power within electronic components or touch screen 30.
It should be understood that the electronic device 100 described above is not limited to a smartphone terminal, but it should refer to a computer device that can be used in mobile. Specifically, the electronic device 100 is a mobile computer device equipped with an intelligent operating device, and the electronic device 100 includes, but is not limited to, a smart phone, a smart watch, a notebook, a tablet computer, a POS device, and even a vehicle-mounted computer.
Referring to fig. 6, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 800 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments above.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, particular features or characteristics described may be combined in any one or more embodiments or examples as appropriate. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution apparatus, device, or device (e.g., a computer-based apparatus, processor-containing apparatus, or other apparatus that can fetch the instructions from the instruction execution apparatus, device, or device and execute the instructions). For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution apparatus, device, or apparatus. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (12)

1. An interactive message prompting method is characterized by comprising the following steps:
when the interactive message is received, determining a current audio output element of the electronic equipment;
if the audio output element comprises a receiver of the electronic equipment or an earphone connected with the electronic equipment, acquiring the current working volume of the audio output element;
determining a prompt parameter of the interactive message according to the current working volume, wherein the prompt parameter at least comprises a target volume of the interactive message, and the target volume is less than or equal to the current working volume; and
and outputting a prompt tone corresponding to the interactive message through the audio output element according to the prompt parameter.
2. The method of claim 1, wherein determining the prompt parameter for the interactive message based on the current operating volume comprises:
determining a prompt tone audio file corresponding to the interactive message according to the type of the interactive message;
determining the target volume of the interactive message according to the current working volume; and
and determining prompt parameters of the interactive message according to the prompt tone audio file and the target volume, wherein the prompt parameters comprise the prompt tone audio file and the target volume.
3. The method of claim 2, wherein said determining a target volume of the interactive message based on the current operating volume comprises:
acquiring the audio type of the current output audio of the audio output element;
determining the importance degree of the interactive message relative to the current output audio according to the type of the interactive message and the audio type; and
and determining the target volume of the interactive message according to the current working volume and the importance degree.
4. The method of claim 3, wherein determining the importance of the interactive message relative to the currently output audio based on the type of the interactive message and the type of audio comprises:
searching a first importance level of the interactive message according to the type of the interactive message based on a preset interactive message importance list;
searching a second importance degree grade of the current output audio according to the audio type based on a preset audio type importance list; and
and determining the importance degree of the interactive message relative to the current output audio according to the first importance degree grade and the second importance degree grade.
5. The method of claim 4, wherein determining the target volume of the interactive message based on the current working volume and the importance level comprises:
if the second importance level is greater than the first importance level, determining a corresponding target volume level according to the first importance level, and determining a target volume of the interactive message according to the target volume level, wherein the target volume is less than the current working volume; and
and if the second importance level is less than or equal to the first importance level, determining that the target volume is equal to the current working volume.
6. The method of claim 1, wherein determining a current audio output element of the electronic device upon receiving the interaction message comprises:
when the interactive message is received, determining audio equipment connected with an audio output interface of the electronic equipment; and
and if the audio output interface is connected to an earphone, determining the current audio output element of the electronic equipment or the earphone connected to the electronic equipment.
7. The method of claim 1, wherein determining a current audio output element of the electronic device upon receiving the interaction message comprises:
when receiving the interactive message, determining the working state of a receiver of the electronic equipment; and
and if the earphone is in work, determining that the current audio output element of the electronic equipment comprises the earphone.
8. The method of claim 7, wherein determining the prompt parameter for the interactive message based on the current operating volume comprises:
acquiring the distance between the electronic equipment and the human ear;
determining the target volume of the interactive message according to the current working volume and the distance, wherein the target volume is less than or equal to the current working volume; and
and determining a prompt parameter of the interactive message according to the target volume.
9. The method of any one of claims 1-8, wherein the interaction message comprises any one of the following messages: incoming call message, short message, instant communication message, and push message of application program;
before or while outputting an alert tone corresponding to the interactive message through the audio output element, the method further comprises:
acquiring an audio signal played by the audio output element;
performing gain processing on the amplitude of the audio signal based on a preset gain parameter, wherein the gain parameter is smaller than 1; and
and continuously outputting the processed audio signal until the prompt tone of the interactive message is played.
10. An interactive message prompting device, comprising:
the audio output element determining module is used for determining the current audio output element of the electronic equipment when the electronic equipment receives the interactive message;
the volume determination module is used for acquiring the current working volume of the audio output element when the audio output element comprises an earphone of the electronic equipment or an earphone connected into the electronic equipment;
a prompt parameter determining module, configured to determine a prompt parameter of the interactive message according to the current working volume, where the prompt parameter at least includes a target volume of the interactive message, and the target volume is less than or equal to the current working volume; and
and the prompt output module is used for outputting prompt tones corresponding to the interactive messages through the audio output element according to the prompt parameters.
11. An electronic device comprising one or more processors, memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the interactive message prompting method of any of claims 1-9.
12. A computer-readable storage medium having stored thereon program code that is invoked by a processor to perform the interactive message prompting method of any one of claims 1-9.
CN202010096869.6A 2020-02-17 2020-02-17 Interactive message prompting method and device, electronic equipment and storage medium Pending CN111324331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010096869.6A CN111324331A (en) 2020-02-17 2020-02-17 Interactive message prompting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010096869.6A CN111324331A (en) 2020-02-17 2020-02-17 Interactive message prompting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111324331A true CN111324331A (en) 2020-06-23

Family

ID=71172751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010096869.6A Pending CN111324331A (en) 2020-02-17 2020-02-17 Interactive message prompting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111324331A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225432A (en) * 2021-03-25 2021-08-06 上海闻泰信息技术有限公司 Earphone use prompting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965651A (en) * 2015-06-12 2015-10-07 联想(北京)有限公司 Information processing method and electronic equipment
CN107743178A (en) * 2017-11-29 2018-02-27 维沃移动通信有限公司 A kind of message player method and mobile terminal
CN108093132A (en) * 2017-12-13 2018-05-29 北京小米移动软件有限公司 The control method of terminal device and ringing volume
CN108449491A (en) * 2018-03-09 2018-08-24 广东欧珀移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium
CN110418011A (en) * 2019-08-15 2019-11-05 北京小米移动软件有限公司 Generate the method, apparatus and smart machine of prompt tone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965651A (en) * 2015-06-12 2015-10-07 联想(北京)有限公司 Information processing method and electronic equipment
CN107743178A (en) * 2017-11-29 2018-02-27 维沃移动通信有限公司 A kind of message player method and mobile terminal
CN108093132A (en) * 2017-12-13 2018-05-29 北京小米移动软件有限公司 The control method of terminal device and ringing volume
CN108449491A (en) * 2018-03-09 2018-08-24 广东欧珀移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium
CN110418011A (en) * 2019-08-15 2019-11-05 北京小米移动软件有限公司 Generate the method, apparatus and smart machine of prompt tone

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225432A (en) * 2021-03-25 2021-08-06 上海闻泰信息技术有限公司 Earphone use prompting method and device

Similar Documents

Publication Publication Date Title
US11251763B2 (en) Audio signal adjustment method, storage medium, and terminal
CN107509153B (en) Detection method and device of sound playing device, storage medium and terminal
CN1203709C (en) Portable terminal
US9756439B2 (en) Method and devices for outputting an audio file
CN107580113B (en) Reminding method, device, storage medium and terminal
CN109151566B (en) Audio playing method and device, electronic equipment and computer readable medium
CN111083289B (en) Audio playing method and device, storage medium and mobile terminal
JP2007520943A (en) Extended use of phones in noisy environments
CN102905028A (en) Mobile terminal prompt information regulating method and corresponding mobile terminal
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
CN111033614B (en) Volume adjusting method and device, mobile terminal and storage medium
CN116471355B (en) Audio playing method and electronic equipment
CN105611026B (en) A kind of method, apparatus and electronic equipment adjusting In Call
CN111277697B (en) Audio processing method and device, storage medium and electronic equipment
CN110517711A (en) Playback method, device, storage medium and the electronic equipment of audio
CN113422866A (en) Volume adjusting method and device, storage medium and electronic equipment
CN111324331A (en) Interactive message prompting method and device, electronic equipment and storage medium
CN106657621B (en) Self-adaptive adjusting device and method for sound signal
CN104980583A (en) Event reminding method and terminal
WO2018035868A1 (en) Method for outputting audio, electronic device, and storage medium
CN111552452A (en) Method, apparatus and storage medium for matching audio output parameters
CN113824838B (en) Sounding control method and device, electronic equipment and storage medium
CN111510824B (en) Audio processing circuit, audio processing method, electronic device, and computer-readable storage medium
CN106293607B (en) Method and system for automatically switching audio output modes
CN114710730A (en) Volume prompting method and device, earphone and storage medium

Legal Events

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