Audio playback method, electronic device and storage medium

By combining audio intensity and dynamic effect parameters in electronic devices, synchronous playback of audio and animation is achieved, which solves the problem of lack of interest in audio playback in the existing technology and improves user experience.

CN117689776BActive Publication Date: 2024-09-13HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310699757.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2024-09-13
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

Existing electronic devices lack interest when playing audio and cannot effectively combine audio features and motion effects, resulting in a single user experience.

Method used

By obtaining audio files and corresponding feature files from electronic devices, the animation playback speed and motor vibration frequency are dynamically adjusted based on the audio intensity to achieve synchronous playback of audio and motion effects, making audio playback more interesting.

Benefits of technology

Through sound-picture synergy and sound-picture shock synergy, the fun of audio playback is improved, making the audio playback process more visual and auditory interactive, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117689776B
    Figure CN117689776B
Patent Text Reader

Abstract

The present application provides an audio playback method, an electronic device, and a storage medium. When a preset condition is met, the electronic device obtains a first feature file corresponding to the first audio file, and the first feature file includes the audio intensity of the first audio file at different times; when the audio intensity at the first moment is greater than the first preset audio intensity, the electronic device determines a first motion effect parameter based on the audio intensity at the first moment; the electronic device plays the first image frame in the first animation based on the first motion effect parameter, and the first motion effect parameter is used to control the switching speed when switching from the second image frame to the first image frame, and the second image frame shown is an image frame before the first image frame; wherein the first motion effect parameter is greater than the preset motion effect parameter at the first moment. Through this method, audio features and audio motion effects can be associated, and the greater the audio intensity of the audio, the faster the animation is played, thereby achieving sound and picture coordination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an audio playback method, an electronic device and a storage medium. Background Art

[0002] With the development of Internet technology, people's lifestyles have undergone tremendous changes. For example, in daily life, the way people listen to music has changed. Now they can listen to songs through applications with audio playback functions on smart devices (such as smartphones, tablets, or smart TVs).

[0003] However, currently, the way in which electronic devices play audio is relatively simple, and how to improve the fun of playing audio by electronic devices needs further research. Summary of the invention

[0004] The present application provides an audio playback method, an electronic device, and a storage medium, which achieves the association of audio features and audio motion effects, thereby improving the fun of audio playback.

[0005] In a first aspect, the present application provides an audio playback method, the method comprising: when a preset condition is met, the electronic device obtains a first audio file and a first animation, the first animation comprising multiple image frames; the electronic device plays the first audio file and the first animation; the electronic device plays the first animation, comprising: the electronic device obtains a first feature file corresponding to the first audio file, the first feature file comprising the audio intensity of the first audio file at different moments; when the audio intensity at the first moment is greater than the first preset audio intensity, the electronic device determines a first motion effect parameter based on the audio intensity at the first moment; the electronic device plays the first image frame in the first animation based on the first motion effect parameter, the first motion effect parameter being used to control the switching speed from the second image frame to the first image frame, the second image frame being an image frame before the first image frame; wherein the first motion effect parameter is greater than the preset motion effect parameter at the first moment.

[0006] Optionally, the first audio file and the first feature file have the same duration. The electronic device can play the first audio file and the first animation at the same time. When starting to play the first audio file, you can start using a window of fixed duration to traverse the first feature file from front to back in chronological order to determine the first moment when the audio intensity is greater than the first audio intensity, thereby controlling the playback speed of the animation and achieving sound and picture coordination. The synchronization of audio and animation is achieved through time attributes. The shorter the fixed duration of the window, the stronger the synchronization between the first audio file and the first animation, and the smaller the error.

[0007] Optionally, the first moment may be a time point or a period of time. The audio intensity at the first moment may be the audio intensity at a certain time point or the average audio intensity over a period of time.

[0008] In some embodiments, the animations for different audios may be the same, or the animations for different audios may be different.

[0009] Optionally, the electronic device may also match different animations based on the audio features of the audio. Alternatively, the animation associated with the audio may also be preset.

[0010] The switching speed between two adjacent image frames in the first animation is preset. That is, the preset animation parameters of each image frame in the first animation are preset, and the preset animation parameters of each image frame are used by the electronic device to control the switching speed between the image frame and the previous image frame.

[0011] Through this method, audio features and audio animations can be associated. The greater the audio intensity of the audio, the faster the animation is played, thus achieving sound and picture synergy and improving the fun of audio playback.

[0012] In combination with the first aspect, in a possible implementation, the method also includes: when the audio intensity at the second moment is less than the first preset audio intensity, the electronic device obtains the preset motion effect parameters at the second moment; the electronic device plays the second image frame based on the preset motion effect parameters at the second moment, and the preset motion effect parameters at the second moment are used to control the switching speed when switching from the third image frame to the second image frame, and the third image frame shown is an image frame before the second image frame.

[0013] In this way, when the audio intensity of the audio is less than the first preset audio intensity, the electronic device may not update the motion effect parameters at that moment, but still play the image frame at that moment based on the preset motion effect parameters at that moment.

[0014] In combination with the first aspect, in a possible implementation method, the electronic device obtains the preset motion effect parameters at the second moment, specifically including: when the audio intensity at the second moment is greater than the second preset audio intensity and less than the first preset audio intensity, the electronic device obtains the preset motion effect parameters at the second moment.

[0015] In combination with the first aspect, in a possible implementation, the method also includes: when the audio intensity at the third moment is less than the second preset audio intensity, the electronic device determines a second motion effect parameter based on the audio intensity at the third moment; the electronic device plays the fourth image frame based on the second motion effect parameter, and the first motion effect parameter is used to control the switching speed from the fifth image frame to the fourth image frame, and the fifth image frame shown is an image frame before the fourth image frame; wherein the second motion effect parameter is less than the preset motion effect parameter at the third moment.

[0016] In this way, when the audio intensity of the audio is less than the second preset audio intensity, the electronic device also needs to update the animation parameter at that moment, obtain the second animation parameter, and play the image frame at that moment based on the second animation parameter. The second animation parameter is different from the preset animation parameter at the third moment. The second animation parameter is less than the preset animation parameter at the third moment.

[0017] The greater the audio intensity of the audio, the faster the animation plays; the smaller the audio intensity of the audio, the slower the animation plays, thus achieving the coordination of sound and picture and improving the fun of audio playback.

[0018] In combination with the first aspect, in a possible implementation method, when the preset motion effect parameters at the first moment are the same as the preset motion effect parameters at the second moment, the switching speed when switching from the second image frame to the first image frame is greater than the switching speed when switching from the third image frame to the second image frame.

[0019] That is to say, the first motion effect parameter is greater than the second motion effect parameter.

[0020] Optionally, the preset motion effect parameters at different moments in the first animation may be the same or different.

[0021] In combination with the first aspect, in a possible implementation, when the preset motion effect parameters at the second moment are the same as the preset motion effect parameters at the third moment, a switching speed when switching from the third image frame to the second image frame is greater than a switching speed when switching from the fifth image frame to the fourth image frame. In other words, the preset motion effect parameters at the second moment are greater than the second motion effect parameters.

[0022] In combination with the first aspect, in a possible implementation, the electronic device determines the first motion effect parameter based on the audio intensity at the first moment, specifically including: according to the formula Determine the first dynamic effect parameter; where Y represents the first dynamic effect parameter, Y max Indicates the maximum dynamic effect parameter value, Y min Indicates the minimum dynamic effect parameter value, Y max and Y min is preset; X represents the audio intensity at the first moment, X max Indicates the maximum audio intensity value, Xmin Indicates the minimum audio intensity value, X max and X min For preset.

[0023] In this way, when the audio intensity is greater than the first preset audio intensity, or the audio intensity is less than the second preset audio intensity, the electronic device can obtain updated motion effect parameters based on the audio intensity in this way, thereby achieving the effect of sound and picture coordination.

[0024] In combination with the first aspect, in a possible implementation method, before the electronic device plays the first audio file and plays the first animation, the method also includes: the electronic device decodes the first audio file to obtain a first PCM file; the electronic device performs feature extraction on the first PCM file to obtain a first feature file corresponding to the first audio file.

[0025] In this way, the electronic device can pre-process and save the first characteristic file. When playing the first animation, the electronic device does not need to determine the first characteristic file in real time to improve the synchronization effect of the first audio file and the first animation.

[0026] In combination with the first aspect, in a possible implementation method, before the electronic device obtains the first feature file corresponding to the first audio file, the method also includes: when the electronic device determines that the first feature file corresponding to the first audio file is not stored locally, the electronic device decodes the first audio file to obtain a first PCM file, and performs feature extraction on the first PCM file to obtain the first feature file corresponding to the first audio file.

[0027] In some embodiments, the electronic device can update the feature file corresponding to the stored audio. For example, the feature file that has not been used for a certain period of time is deleted. Then before playing the first animation, the electronic device can determine whether the first feature file corresponding to the first audio file is stored locally. Avoid the situation where the first feature file is not obtained and the sound and picture collaboration cannot be achieved.

[0028] In combination with the first aspect, in a possible implementation, the electronic device includes a motor, and the method also includes: when the audio intensity at a first moment is greater than a first preset audio intensity, the electronic device determines a first vibration frequency of the motor based on the audio intensity at the first moment; while the electronic device plays a first image frame in a first animation based on a first motion effect parameter, the electronic device also vibrates through the motor based on the first vibration frequency; wherein the first vibration frequency is greater than the preset vibration frequency at the first moment.

[0029] The vibration frequency of each image frame in the first animation is preset. The preset vibration frequency of each image frame is used for the electronic device to vibrate through the motor when displaying the image frame.

[0030] Through this method, audio features, audio animation and vibration effects can be associated. The greater the audio intensity, the faster the animation playback speed, and the faster the motor vibration speed, thus achieving three-dimensional coordination of sound, image and vibration, and improving the fun of audio playback.

[0031] In combination with the first aspect, in a possible implementation, the method further includes: when the audio intensity at the second moment is less than the first preset audio intensity, the electronic device obtains the preset vibration frequency of the motor at the second moment; while the electronic device plays the second image frame based on the preset motion effect parameter at the second moment, the electronic device vibrates through the motor based on the preset vibration frequency at the second moment. Optionally, the preset vibration frequency can also be 0, that is, there is no vibration effect.

[0032] In combination with the first aspect, in a possible implementation manner, when the audio intensity at the second moment is greater than the second preset audio intensity and less than the first preset audio intensity, the electronic device obtains the preset vibration frequency at the second moment.

[0033] In combination with the first aspect, in a possible implementation, the method also includes: when the audio intensity at the third moment is less than the second preset audio intensity, the electronic device determines a second vibration frequency based on the audio intensity at the third moment; while the electronic device plays the fourth image frame based on the second motion effect parameter at the third moment, the electronic device vibrates based on the second vibration frequency through a motor.

[0034] In this way, when the audio intensity of the audio is less than the second preset audio intensity, the electronic device also needs to update the vibration frequency at that moment to obtain the second vibration frequency, and while the electronic device plays the fourth image frame based on the second motion effect parameter at the third moment, the electronic device vibrates based on the second vibration frequency through the motor. The second vibration frequency is less than the preset vibration frequency at the third moment.

[0035] The greater the audio intensity of the audio, the faster the animation plays and the faster the motor vibrates. The smaller the audio intensity of the audio, the slower the animation plays and the slower the motor vibrates, thus achieving the coordination of sound, picture and vibration and increasing the fun of audio playback.

[0036] In combination with the first aspect, in a possible implementation, the electronic device may also determine the first vibration frequency based on the audio intensity at the first moment, specifically including: according to the formula Determine the first dynamic effect parameter; where Z represents the first vibration frequency, Z max Indicates the maximum vibration frequency, Z min Indicates the minimum vibration frequency, Z max and Z min is preset; X represents the audio intensity at the first moment, X max Indicates the maximum audio intensity value, Xmin Indicates the minimum audio intensity value, X max and X min For preset.

[0037] In this way, when the audio intensity is greater than the first preset audio intensity, or the audio intensity is less than the second preset audio intensity, the electronic device can obtain an updated vibration frequency based on the audio intensity in this way, thereby achieving the effect of sound, image and vibration coordination.

[0038] In combination with the first aspect, in a possible implementation manner, the first audio file is an alarm audio file, and the preset condition includes that the time reaches a preset start time of the alarm.

[0039] In conjunction with the first aspect, in a possible implementation, the first audio file is an incoming call audio file, and the preset condition includes that the electronic device receives an incoming call request sent by another electronic device. The incoming call request here may be an operator phone request.

[0040] In other embodiments, the incoming call request here may also be an Internet phone request.

[0041] In combination with the first aspect, in a possible implementation, the first audio file is a first music downloaded in real time in a music application, and the preset condition includes the electronic device receiving a user operation to play the first music.

[0042] In a second aspect, the present application provides an electronic device, which includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes an audio playback method provided in any possible implementation of any of the above aspects.

[0043] In a third aspect, the present application provides a chip system, which includes one or more processors, and is characterized in that the processor is used to call computer instructions to enable an electronic device to execute an audio playback method provided in any possible implementation of any of the above aspects.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium, including instructions, which, when executed on an electronic device, enable the electronic device to execute an audio playback method provided in any possible implementation of any of the above aspects.

[0045] For the beneficial effects unique to the second to fourth aspects, reference can be made to the description of the beneficial effects in the first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1A-1JA schematic diagram showing a scenario in which the electronic device 100 plays an incoming call ringtone;

[0047] Figure 2A-2I A schematic diagram showing a scenario in which the electronic device 100 plays an alarm ringtone;

[0048] Figure 3A-3E A schematic diagram showing a scenario in which the electronic device 100 plays music from a music application;

[0049] Figure 4A and Figure 4B A schematic diagram showing an electronic device 100 extracting and storing audio features of an audio file;

[0050] Figure 5 A schematic diagram showing another electronic device 100 extracting and storing audio features of an audio file;

[0051] Figure 6 A schematic diagram showing an electronic device 100 playing audio and displaying motion effects;

[0052] Figure 7A-7B A set of audio intensity diagrams provided for this application;

[0053] Figure 8 A schematic diagram showing a method for an audio feature extraction engine to obtain a first feature file is shown;

[0054] Fig. 9 A flowchart of an audio playback method provided by this application;

[0055] Fig.10 A schematic diagram of the structure of an electronic device is shown;

[0056] Fig.11 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0058] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0059] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. A common form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0060] First, an audio playback scenario provided by this application is introduced.

[0061] Figure 1A-1J A schematic diagram of a scenario in which the electronic device 100 plays an incoming call ring tone is shown.

[0062] Set the incoming call ringtone ( Figure 1A-Figure 1D )

[0063] Figure 1A The main interface of the electronic device 100 is shown. The main interface includes icons of multiple applications, such as icons of weather applications, icons of Huawei store applications, icons of smart home applications, icons of sports and health applications, icons of memo applications, icons of alarm clock applications, icons of music applications, icons of settings applications, icons of camera applications, icons of address book applications, icons of phone applications, icons of information applications, etc. The main interface 210 also shows a battery indicator, a weather indicator, a date indicator, a network signal indicator, a page indicator, etc.

[0064] like Figure 1A As shown, the electronic device 100 may receive an input operation (eg, a single click) from a user on an icon of a setting application, and in response to the input operation from the user, the electronic device 100 may display Figure 1B User interface 1200 is shown. User interface 1200 is the main interface of the settings application.

[0065] like Figure 1BAs shown, the user interface 1200 shows multiple setting options, such as an airplane mode setting option, in which the airplane mode of the electronic device 100 is turned off. A Wi-Fi setting option, in which the Wi-Fi function of the electronic device 100 is turned on. A Bluetooth setting option, in which the Bluetooth function of the electronic device 100 is turned on. A personal hotspot setting option, a mobile network setting option, a do not disturb mode setting option, a display and brightness setting option, a Huawei account, a sound setting option, etc.

[0066] like Figure 1B As shown, the electronic device 100 may receive an input operation (eg, a single click) from a user for a sound setting option in the user interface 1200, and in response to the user's input operation, the electronic device 100 may display Figure 1C The user interface 1300 shown in the figure allows the user to set the incoming call ringtone in the user interface 1300. The user interface 1300 may include multiple setting items. For example, a ringing vibration mode setting item, in which the ringing vibration mode is turned off. A silent mode vibration setting item, in which the silent mode vibration is turned on. A button to adjust the incoming call ringtone volume setting item, in which the button to adjust the incoming call ringtone volume is turned off. The user interface 1300 also shows multiple ringtones, such as ringtone 1, ringtone 2, and ringtone 3, and ringtone 1, ringtone 2, and ringtone 3 are different. The current incoming call ringtone of the electronic device 100 is ringtone 1.

[0067] The electronic device 100 may also receive a ring tone when the user changes the electronic device 100. Figure 1C As shown, the electronic device 100 can receive an input operation (e.g., a click) from the user for the ringtone 2 option. In response to the user's input operation, the electronic device 100 can set the ringtone 2 as the incoming call ringtone of the electronic device 100. After setting the ringtone 2 as the incoming call ringtone of the electronic device 100, the electronic device 100 can display Figure 1D The user interface shown is used to prompt the user that the current incoming ringtone of the electronic device 100 is ringtone 2.

[0068] Then, after the electronic device 100 receives the incoming call request from other devices, the electronic device 100 can play the ringtone 2 to remind the user that there is an incoming call that needs to be answered.

[0069] In some implementations, in order to enhance the fun of the incoming call ringtone played by the electronic device 100, the electronic device 100 can play a dynamic effect on the incoming call interface when playing the ringtone 2. In this way, the user's usage experience is visually and auditorily prompted.

[0070] Play incoming call ringtone and animation ( Figure 1E-1G )

[0071] When the electronic device 100 receives a call answering request sent by another device, the electronic device 100 may display Figure 1EThe incoming call interface shown. The incoming call interface shows multiple incoming call information, such as the incoming call number "123456789", a reject control and an answer control. Among them, the user can click the reject control to stop establishing a call connection with other devices, and the user can also click the answer control to establish a call connection with other devices.

[0072] Before the user clicks the answer control or rejects the answer control, the electronic device 100 can continuously play the ringtone 2 to remind the user that there is a new call that needs to be answered.

[0073] While the electronic device 100 is playing the ringtone 2, the electronic device 100 may display the incoming call effect on the incoming call interface. For example, the electronic device 100 may display Figure 1E-1G The incoming power effect is shown.

[0074] Figure 1E-1G The incoming call effect shown may be a complete set of incoming call effects, and the incoming call effect may be a water ripple effect. At different times when the electronic device 100 plays the ringtone 2, the incoming call effect displayed by the electronic device 100 is different.

[0075] After the electronic device 100 displays Figure 1G After the incoming power effect is shown, the electronic device 100 can then display Figure 1E , Figure 1F and Figure 1G The incoming power effect is shown.

[0076] It should be noted that Figure 1E and Figure 1F between, Figure 1F and Figure 1G In between, 0 or more motion effect schematic diagrams may be included, and this application does not limit this.

[0077] Play incoming call ringtone and animation ( Figure 1H-1J )

[0078] In other embodiments, while the electronic device 100 plays the ringtone 2, the electronic device 100 may display the incoming call effect on the incoming call interface. For example, the electronic device 100 may display Figure 1H-1J The incoming power effect is shown.

[0079] At different moments when the electronic device 100 plays the ringtone 2, the incoming call effect displayed by the electronic device 100 is different. Figure 1J After the incoming power effect is shown, the electronic device 100 can then display Figure 1H , Fig. 1I and Figure 1J The incoming power effect is shown.

[0080] It should be noted that Figure 1H and Fig. 1I between, Fig. 1I and Figure 1J In between, 0 or more motion effect schematic diagrams may be included, and this application does not limit this.

[0081] Optional, incoming power effects are not limited to Figure 1E-1G and Figure 1H-1J In addition to the water ripple effect shown, the electronic device 100 can also display other incoming call effects. For example, the user can select an incoming call effect from multiple incoming call effects, so that the electronic device 100 can play the incoming call effect selected by the user when displaying the incoming call interface.

[0082] For another example, different incoming call ringtones may have different corresponding incoming call effects, or different incoming call ringtones may have the same corresponding incoming call effects.

[0083] Figure 2A-2I A schematic diagram of a scenario in which the electronic device 100 plays an alarm ringtone is shown.

[0084] Set an alarm tone ( Figure 2A-2C )

[0085] like Figure 2A As shown, the electronic device 100 can receive an input operation (such as a single click) from a user on an icon of a clock application in the main interface. In response to the input operation from the user, the electronic device 100 can display Figure 2B The user interface 220 shown. The user interface 220 is the main interface of the clock application. The user can set an alarm in the user interface 220.

[0086] like Figure 2B As shown, multiple alarm setting items are shown in the user interface 220. In one of the alarm setting items, the alarm is activated at 6:30 a.m. every day, and the alarm is in the off state. In another alarm setting item, the alarm is activated at 9:58 a.m. on Monday, Tuesday, Wednesday, Thursday, and Friday, and the alarm is also in the off state.

[0087] like Figure 2B As shown, the electronic device 100 may receive an input operation (eg, a single click) from a user for the first alarm setting item in the user interface 220. In response to the input operation from the user, the electronic device 100 may display Figure 2C The user interface shown.

[0088] like Figure 2C As shown, the electronic device 100 starts the first alarm, and the alarm ringtone will be played at 6:30 am every day.

[0089] Optionally, the electronic device 100 may also receive a user operation to modify the alarm ringtone.

[0090] Optionally, the electronic device 100 may also receive a user input operation for an editing option in the user interface 220 to reset other alarm information.

[0091] Play alarm ringtone and animation ( Figure 2D-2F )

[0092] After the user sets the alarm for 6:30 am every day, when the time reaches 6:30 am every day, the electronic device 100 will start the alarm and play the alarm ringtone.

[0093] When the electronic device 100 plays the alarm ringtone, the electronic device 100 may display Figure 2D The alarm interface shown in FIG. 100 may include an option to turn off the alarm and an option to remind you later. The user may press the option to turn off the alarm and slide it to the left or right to turn off the alarm. The user may also click the option to remind you later to have the electronic device 100 play the alarm again in 10 minutes.

[0094] Before the user clicks on the option to turn off the alarm or the option to remind you later, the electronic device 100 can continue to play the alarm ringtone to remind the user that there is an alarm reminder.

[0095] While the electronic device 100 is playing the alarm ringtone, the electronic device 100 can display the alarm animation on the alarm interface. For example, the electronic device 100 can display Figure 2D-2F The alarm clock animation shown.

[0096] Figure 2D-2F The alarm clock dynamic effect shown may be a complete set of alarm clock dynamic effects, and the alarm clock dynamic effect may be a water ripple dynamic effect. At different times when the electronic device 100 plays the alarm clock ringtone, the alarm clock dynamic effect displayed by the electronic device 100 is different.

[0097] After the electronic device 100 displays Figure 2F After the alarm clock animation shown, the electronic device 100 can then display Figure 2D , Figure 2E and Figure 2F The alarm clock animation shown.

[0098] It should be noted that Figure 2D and Figure 2E between, Figure 2E and Figure 2F In between, 0 or more motion effect schematic diagrams may be included, and this application does not limit this.

[0099] Optional, alarm clock effects are not limited to Figure 1E-1G and Figure 1H-1JAs shown in the water ripple effect, the electronic device 100 can also display other alarm clock effects. For example, the user can select an alarm clock effect from multiple alarm clock effects, so that the electronic device 100 can play the alarm clock effect selected by the user when displaying the incoming call interface.

[0100] For another example, different incoming call ringtones may have different corresponding alarm clock effects, or different alarm clock ringtones may have the same corresponding alarm clock effects.

[0101] Play alarm ringtone and animation ( Figure 2G-Figure 2I )

[0102] In other embodiments, while the electronic device 100 is playing the alarm ringtone, the electronic device 100 may display an alarm clock animation on the alarm clock interface. For example, the electronic device 100 may display Figure 2G-Figure 2I The alarm clock animation shown.

[0103] At different moments when the electronic device 100 plays the alarm ringtone, the alarm clock animation displayed by the electronic device 100 is different. Fig.2I After the alarm clock animation shown, the electronic device 100 can then display Figure 2G , Figure 2H and Fig.2I The alarm clock animation shown.

[0104] It should be noted that Figure 2G and Figure 2H between, Figure 2H and Fig.2I In between, 0 or more motion effect schematic diagrams may be included, and this application does not limit this.

[0105] Optional, alarm clock effects are not limited to Figure 2D-2F and Figure 2G-Figure 2I As shown in the water ripple effect, the electronic device 100 can also display other alarm clock effects. For example, the user can select an alarm clock effect from multiple alarm clock effects, so that the electronic device 100 can play the alarm clock effect selected by the user when displaying the alarm clock interface.

[0106] For another example, different alarm ringtones may have different corresponding alarm effects, or different alarm ringtones may have the same corresponding alarm effects.

[0107] Figure 3A Figure 3E A schematic diagram of a scene in which the electronic device 100 plays music in a music application is shown.

[0108] Play Music( Figure 3A-3B )

[0109] like Figure 3AAs shown, the electronic device 100 can receive an input operation (such as a single click) from a user on an icon of a music application in the main interface. In response to the input operation from the user, the electronic device 100 can display Figure 3B The user interface 320 shown. The user interface 320 is the main interface of the music application. The user can choose to play music in the user interface 320.

[0110] Figure 3B The user interface 320 shown is the main interface of the music application, and the user interface 320 includes a search icon 1001, a my control 1002, a music control 1003, a discovery control 1004, a popular radio control 1005, and a favorites control 1007; below the popular radio control 1005, a list of the most popular playlists 1006 of the music application is displayed, such as Figure 3B As shown, the first song in the playlist is AAA; the second song is BBB; the third song is CCC; and the fourth song is DDD.

[0111] The collection control 1007 can receive and respond to a click operation by the user to collect the song.

[0112] like Figure 3B , the electronic device 100 may receive an input operation (eg, a single click) from a user on the icon of the song name "DDD" in the user interface 320, and in response to the input operation from the user, the electronic device 100 may display Figure 3C The audio playback interface shown.

[0113] like Figure 3C As shown, the audio playback interface may include controls such as a music play / pause button, a next song button, a previous song button, a music playback progress bar, a music download button, and a music share button.

[0114] Play music animation( Figure 3C-Figure 3E )

[0115] While the electronic device 100 is playing music, the electronic device 100 can display music effects on the audio playback interface. For example, the electronic device 100 can display Figure 3C-Figure 3E The music animation shown.

[0116] At different moments when the electronic device 100 plays music, the music effects displayed by the electronic device 100 are different. Figure 3E After the alarm clock animation shown, the electronic device 100 can then display Figure 3C , Figure 3D and Figure 3E The music animation shown.

[0117] It should be noted that Figure 3C and Figure 3Dbetween, Figure 3D and Figure 3E In between, 0 or more motion effect schematic diagrams may be included, and this application does not limit this.

[0118] Optional, music effects are not limited to Figure 3C-Figure 3E In addition to the petal animation shown, the electronic device 100 may also display other music animations. For example, a user may select a music animation from a plurality of music animations, so that the electronic device 100 may play the music animation selected by the user when displaying the music playback interface.

[0119] For another example, different music presets may have corresponding music effects that are different, or different music presets may have corresponding music effects that are the same.

[0120] Next, the specific implementation of how the electronic device 100 displays the motion effect will be introduced.

[0121] Figure 4A A schematic diagram showing an electronic device 100 extracting and saving audio features of an audio file is shown.

[0122] like Figure 4A As shown, the electronic device 100 includes a first application, an audio feature extraction engine. In some embodiments, the audio feature extraction engine may also be referred to as a sound visualization engine.

[0123] S401: A first application receives a user operation and obtains a first audio file to be played.

[0124] The first audio may be audio stored in the electronic device 100 .

[0125] For example, the first application may be a clock application, and the first audio file may be Figure 1A-Figure 1D The user-set ringtone 2 is shown. After the electronic device 100 receives an incoming call request sent by another device, the music player can play the ringtone 2.

[0126] For example, the first application may be a settings application, and the first audio file may be Figure 2A-2C The alarm tone set by the user shown in the figure. After the time reaches the start time of the alarm, for example, when the time reaches 6:30 every morning, the music player can play the alarm tone.

[0127] Exemplarily, the first application may also be a music application, and the first audio file may also be Figure 3A-3C The user downloaded music 1 shown. When the first application receives a user operation to play music 1 in the music application, the first application can play music 1. Music 1 can be cached music.

[0128] S402: The first application obtains a first storage path of a first audio file.

[0129] S403: The first application sends the first storage path of the first audio file to the audio feature extraction engine.

[0130] After storing the first audio file, the first application may obtain a first storage path of the first audio file, and send the first storage path of the first audio file to the audio feature extraction engine.

[0131] S404: The audio feature extraction engine obtains the first audio file based on the first storage path of the first audio file.

[0132] After receiving the first storage path of the first audio file sent by the first application, the audio feature extraction engine may acquire the first audio file based on the first storage path of the first audio file.

[0133] Optionally, S403 and S404 may not be performed. After the first application obtains the first storage path of the first audio file, the first application may obtain the first audio file based on the first storage path of the first audio file and send the first audio file to the audio feature extraction engine. The audio feature extraction engine may directly obtain the first audio file.

[0134] S405: The audio feature extraction engine extracts features from the first audio file to obtain a first feature file corresponding to the first audio file.

[0135] The first audio file may be a formatted audio file, such as WAV format, MP3 format, MP4 format, 3GP format, etc.

[0136] After acquiring the first audio file, the audio feature extraction module can decode the first audio file in a preset format to obtain pulse code modulation (PCM) data, such as first PCM data. The first PCM data is discrete data. The audio feature extraction module can perform feature extraction on discrete data.

[0137] The audio feature extraction module can extract features from the first PCM data based on a preset algorithm to obtain a first feature file. The preset algorithm can be designed based on the perception characteristics of human ears to sound.

[0138] Audio features include but are not limited to loudness (or sound intensity), audio time corresponding to the loudness, and the like.

[0139] For example, the first audio file is a file of the first duration, the first PCM data is also a file of the first duration, and the first feature file obtained after the audio feature extraction module extracts features from the first PCM data is also a file of the first duration.

[0140] The first feature file may represent audio features of the audio at different times in the first audio file, such as sound intensity features of the audio at different times.

[0141] Figure 4B A schematic diagram of a first feature file is shown.

[0142] like Figure 4B As shown, the duration of the first feature file is the first duration, for example, the first duration may be 60s, and the first feature file also includes sound intensities corresponding to different moments.

[0143] like Figure 4B The sound intensity corresponding to the audio at some moments is shown in FIG.

[0144] For example, the sound intensity of the audio at 0s is 40 decibels, the sound intensity of the audio at 5s is 42 decibels, the sound intensity of the audio at 10s is 75 decibels, the sound intensity of the audio at 15s is 80 decibels, the sound intensity of the audio at 20s is 38 decibels, the sound intensity of the audio at 25s is 78 decibels, the sound intensity of the audio at 30s is 80 decibels, the sound intensity of the audio at 35s is 43 decibels, and the sound intensity of the audio at 60s is 36 decibels. Figure 4B Only the sound intensities corresponding to the audio at some moments are shown, and the first feature file may also include the sound intensities corresponding to the audio at other more moments.

[0145] S406: The audio feature extraction engine saves the first feature file.

[0146] After the audio feature extraction engine obtains the first feature file based on the first audio file, the audio feature extraction engine can save the first feature file. After the audio feature extraction engine saves the first feature file, the audio feature extraction engine can obtain the storage path of the first feature file.

[0147] S407: The audio feature extraction engine sends a confirmation message to the first application.

[0148] After saving the first feature file or obtaining the first feature file, the audio feature extraction engine may send a confirmation message to the first application, where the confirmation message is used to inform the first application that the audio feature extraction engine has obtained the first feature file corresponding to the first audio file.

[0149] Optionally, the audio feature extraction engine also needs to send the storage path of the first feature file to the first application. In one possible implementation, the storage path of the first feature file can be carried in a confirmation message and sent to the first application. In other possible implementations, the storage path of the first feature file can also be sent to the first application independently of the confirmation message.

[0150] Optionally, the storage path of the first feature file corresponding to the first audio file may also be sent by the first application to the audio feature extraction engine, so that the audio feature extraction engine can store the first feature file based on the storage path of the first feature file sent by the first application.

[0151] Figure 5 A schematic diagram showing another electronic device 100 extracting and saving audio features of an audio file is shown.

[0152] S501: A first application receives a user operation and obtains a first audio file to be played.

[0153] S502: The first application obtains a first storage path of a first audio file.

[0154] For the description of S501 and S502, reference may be made to the description of S401 and S402, and this application will not go into details here.

[0155] S503: The first application applies for a second storage path of a feature file corresponding to the first audio file.

[0156] The first application applies for a second storage path for a feature file corresponding to the first audio file, so that the audio feature extraction engine can store the feature file corresponding to the first audio file in a storage area corresponding to the second storage path.

[0157] S504: The first application sends the first storage path of the first audio file and the second storage path of the feature file corresponding to the first audio file to the audio feature extraction engine.

[0158] S505: The audio feature extraction engine obtains the first audio file based on the storage path of the first audio file.

[0159] S506: The audio feature extraction engine extracts features from the first audio file to obtain a first feature file corresponding to the first audio file.

[0160] For the description of S505 and S506, reference may be made to the description of S404 and S405, and this application will not go into details here.

[0161] S507: The audio feature extraction engine stores the first feature file in a storage area corresponding to the second storage path.

[0162] After the audio feature extraction engine obtains the first feature file based on the first audio file, the audio feature extraction engine can obtain the first feature file and save it in the storage area corresponding to the second storage path. The second storage path is sent by the first application to the audio feature extraction engine.

[0163] S508. The audio feature extraction engine sends a confirmation message to the first application.

[0164] After saving the first feature file or obtaining the first feature file, the audio feature extraction engine may send a confirmation message to the first application, where the confirmation message is used to inform the first application that the audio feature extraction engine has obtained the first feature file corresponding to the first audio file.

[0165] In this way, before the electronic device 100 plays the first audio file, the electronic device 100 can calculate the first feature file corresponding to the first audio file in advance, and when the electronic device 100 plays the first audio file, it can directly determine whether to modify the motion effect parameters based on the first feature file. There is no need to calculate the first feature file corresponding to the first audio file in real time, so that the motion effect and the audio can correspond.

[0166] Figure 6 A schematic diagram of an electronic device 100 playing audio and displaying motion effects is shown.

[0167] like Figure 6 As shown, the electronic device 100 includes a first application, an audio player, an audio feature extraction engine and a motion effect engine. In some embodiments, the audio feature extraction engine may also be referred to as a sound visualization engine.

[0168] S601: When a preset condition is met, a first application starts playing a first audio file.

[0169] In some embodiments, the first application may be a clock application, the first audio file may be an alarm ringtone, and the preset condition may be that the time reaches the alarm start time, and the clock application may start playing the first audio file.

[0170] In other embodiments, the first application may be a settings application, the first audio file may be an incoming call ringtone (eg, ringtone 2), and the preset condition may be that the electronic device 100 receives an incoming call request sent by another device, and the clock application may start playing the first audio file.

[0171] In other embodiments, the first application may also be a music application, and the first audio file may also be music 1 downloaded by the user. The preset condition may be that the first application receives a user operation to play music 1 in the music application, and the first application may play music 1. Music 1 may be music downloaded in real time, or music downloaded and cached in advance.

[0172] S602: The first application sends a first storage path of a first audio file to an audio player.

[0173] S603: The audio player obtains the first audio file based on the first storage path of the first audio file.

[0174] S604: The audio player plays the first audio file.

[0175] When the first application determines that the preset conditions are met and the first audio file needs to be played, the first application can obtain the first storage path of the first audio file and send the first storage path of the first audio file to the audio player. After the audio player receives the first storage path of the first audio file sent by the first application, the audio player can obtain the first audio file based on the first storage path of the first audio file and start playing the first audio file. Exemplarily, the duration of the first audio file can be a first duration (e.g., 60s), and the audio player can repeatedly play the first audio file before receiving a user operation to stop playing the first audio file. Alternatively, before receiving a user operation to stop playing the first audio file, the audio player can stop playing the first audio file after the playback duration reaches the maximum duration.

[0176] Optionally, in S602 and S604, the first application may obtain the first audio file based on the first storage path of the first audio file, and then send the first audio file to the audio player. The audio player may directly obtain the first audio file and start playing the first audio file.

[0177] S605: The first application sends a motion effect playback request to the motion effect engine.

[0178] When the first application determines that the preset condition is met and the first audio file needs to be played, in order to enhance the fun of the electronic device 100 playing the first audio file, when the audio player plays the first audio file, the motion effect corresponding to the first audio file can be played through the motion effect engine to enhance the user's auditory and visual experience.

[0179] S606: The first application sends the second storage path of the first feature file to the audio feature extraction engine.

[0180] S607: The audio feature extraction engine obtains the first feature file based on the second storage path.

[0181] When the first application determines that the preset condition is met and the first audio file needs to be played, the first application can also send the second storage path of the first feature file to the audio feature extraction engine. After the audio feature extraction engine receives the second storage path of the first feature file sent by the first application, the audio feature extraction engine can obtain the first feature file based on the second storage path of the first feature file. The audio feature extraction engine can determine whether to modify the motion effect parameters based on the first feature file corresponding to the first audio file.

[0182] Optionally, in S606 and S607, the first application may also obtain the first feature file based on the second storage path, and then send the first feature file to the audio feature extraction engine, and the audio feature extraction engine may directly obtain the first feature file.

[0183] S605 and S606 may be executed simultaneously with S602, or may be executed before S602, which is not limited in this application.

[0184] S608: The audio feature extraction engine obtains preset animation parameters of the first animation associated with the first audio file.

[0185] While the audio player is playing the first audio file, the motion effect engine can obtain the first animation corresponding to the first audio file and obtain the preset motion effect parameters in the first animation. The preset motion effect parameters of the first animation may include the switching speed between the previous and next image frames in the animation, etc. The faster the switching speed between the previous and next image frames in the animation, the shorter the switching time between the previous and next image frames, and the faster the animation is played. The slower the switching speed between the previous and next image frames in the animation, the longer the switching time between the previous and next image frames, and the slower the animation is played.

[0186] The preset motion effect parameters of the first animation may also include transparency of the image frame, image frame size, center point position of the image frame, etc. The following embodiments of the present application are described by taking the switching speed between the two preceding and following image frames in the animation as an example.

[0187] The preset motion effect parameters of the first animation can be preset and have nothing to do with the audio file. When the electronic device 100 plays the first animation based on the preset motion effect parameters, the motion effect parameters of each image frame in the first animation are preset, and the electronic device 100 only needs to switch the image frame in the first animation based on the motion effect parameters of each image frame.

[0188] For example, Fig. 7AAs shown, the first feature file corresponding to the first audio file may be a file of the first duration (e.g., 60 seconds). The first feature file may include the sound intensity corresponding to the audio at different times. When the electronic device 100 plays the first audio file, it may play the first animation. The first animation may include multiple image frames, and the dynamic effect parameters of each image frame are preset. Fig. 7A As shown, the audio at each moment corresponds to a preset animation parameter.

[0189] The motion effect parameters of the image frames corresponding to the audio at different times may be all the same, all different, or partially the same, and this application does not impose any limitation on this.

[0190] When the electronic device 100 plays the first animation, for example, before playing the image frame at time 1s, the electronic device 100 can obtain the preset motion effect parameters at time 1s, and switch to display the image frame at time 1s based on the preset motion effect parameters at time 1s. Before the electronic device 100 plays the image frame at time 10s, the electronic device 100 can obtain the preset motion effect parameters at time 10s, and switch to display the image frame at time 10s based on the preset motion effect parameters at time 10s.

[0191] Optionally, different audio files may correspond to the same animation, for example, all are the first animation.

[0192] Optionally, different audio files may correspond to different animations, for example, the first audio file may correspond to the first animation, and the second audio file may correspond to the second animation. The electronic device 100 may store a plurality of different animations, and when setting the first audio file, the user may select an animation (such as the first animation) from the plurality of different animations, so that when the electronic device 100 plays the first audio file, it may simultaneously play the first animation, and the animation includes a plurality of image frames.

[0193] Among them, the animation is associated with preset motion effect parameters.

[0194] In a possible implementation, preset motion effect parameters of different image frames in the first animation are the same, the first animation includes multiple image frames, and the switching time between any two adjacent image frames in the first animation is equal.

[0195] For example, Figure 1E and Figure 1F The switching time between two image frames is Figure 1F and Figure 1G The switching time between two image frames is equal. For another example, Figure 1H and Fig. 1I The switching time between two image frames is Fig. 1I and Figure 1J The switching time between two image frames is equal.

[0196] For example, Figure 2D and Figure 2E The switching time between two image frames is Figure 2E and Figure 2F The switching time between two image frames is equal. For another example, Figure 2G and Figure 2H The switching time between two image frames is Figure 2H and Fig.2I The switching time between two image frames is equal.

[0197] In other possible implementations, different image frames in the first animation have different preset motion effect parameters. The first animation includes multiple image frames, and the switching time between two adjacent image frames in the first animation decreases from the front to the back.

[0198] For example, Figure 1E and Figure 1F The switching time between two image frames is greater than Figure 1F and Figure 1G The switching time between two image frames. For example, Figure 1H and Fig. 1I The switching time between two image frames is greater than Fig. 1I and Figure 1J The switching time between two image frames.

[0199] For example, Figure 2D and Figure 2E The switching time between two image frames is greater than Figure 2E and Figure 2F The switching time between two image frames. For example, Figure 2G and Figure 2H The switching time between two image frames is greater than Figure 2H and Fig.2I The switching time between two image frames.

[0200] In other possible implementations, different image frames in the first animation have different preset motion effect parameters. The first animation includes multiple image frames, and the switching time between two adjacent image frames in the first animation increases from the front to the back.

[0201] For example, Figure 1E and Figure 1F The switching time between two image frames is less than Figure 1F and Figure 1G The switching time between two image frames. For example, Figure 1H and Fig. 1I The switching time between two image frames is less than Fig. 1I and Figure 1J The switching time between two image frames.

[0202] For example, Figure 2D and Figure 2E The switching time between two image frames is less than Figure 2E and Figure 2F The switching time between two image frames. For example, Figure 2G and Figure 2H The switching time between two image frames is less than Figure 2H and Fig.2I The switching time between two image frames.

[0203] It should be noted that different animations have different animation effects, and the preset animation effect parameters of different animations may be the same or different.

[0204] S609: The audio feature extraction engine traverses the first feature file in sequence to determine whether the audio intensity is greater than a preset audio intensity.

[0205] Depend on Figure 4B As can be seen from the embodiment, the audio feature extraction module obtains the first feature file corresponding to the first audio file. The first feature file includes the sound intensity corresponding to the audio at different times. Then the audio feature extraction engine can traverse the first feature file in sequence to determine the relationship between the audio intensity at each moment in the first audio file and the preset audio intensity.

[0206] When the audio intensity is greater than the preset audio intensity, the audio feature extraction engine can update the animation parameters of the audio moment when the audio intensity is greater than the preset audio intensity to obtain updated animation parameters. The image frame is then switched based on the updated animation parameters. In this way, the animation playback effect can be associated with the characteristics of the audio file, thereby enhancing the association between the animation and the audio file.

[0207] When the audio intensity is less than the preset audio intensity, the audio feature extraction engine can switch the display image frame based on the preset motion effect parameters at the audio moment.

[0208] Figure 7B A schematic diagram showing the audio feature extraction engine obtaining updated motion effect parameters.

[0209] like Figure 7BAs shown, the audio feature extraction engine can obtain a window (or timer) of a fixed duration (e.g., 20ms), traverse the first feature file from front to back in chronological order, and determine the audio moment when the audio intensity is greater than the preset audio intensity. Specifically, first, the audio feature extraction engine can first traverse the feature files of 1ms to 20ms in the first feature file, and determine whether this part of the feature files includes an audio moment with an audio intensity greater than the preset audio intensity. If not included, when traversing the feature files of 21ms to 40ms, it is determined whether some of the feature files include an audio moment with an audio intensity greater than the preset audio intensity. If not included, the feature files of 31ms to 60ms in the first feature file are traversed again. By analogy, when traversing to the feature files of 601ms to 620ms in the first feature file, it is determined whether this part of the feature files includes an audio moment with an audio intensity greater than the preset audio intensity. If included, the audio feature extraction engine can determine the audio moment with an audio intensity greater than the preset audio intensity, for example, at the 601ms audio moment, the audio intensity is greater than the preset audio intensity. The audio feature extraction engine can obtain the audio intensity (e.g., 75 decibels) at the 601ms audio moment, and then obtain the updated animation parameter 1 based on the audio intensity at the 601ms audio moment. When displaying the image frame corresponding to the 601ms audio moment, the animation engine can switch to display the image frame corresponding to the 601ms audio moment based on the updated animation parameter 1. Afterwards, the audio feature extraction engine traverses the feature files after 620ms in turn and determines whether to modify the animation parameters.

[0210] like Figure 7B As shown, according to the above traversal method, the audio feature extraction engine can obtain the updated animation parameter 2 based on the audio intensity of the 901ms audio moment. When displaying the image frame corresponding to the 901ms audio moment, the animation engine can switch to display the image frame corresponding to the 901ms audio moment based on the updated animation parameter 2.

[0211] The audio feature extraction engine can obtain the updated animation parameter 3 based on the audio intensity of the 1501ms audio moment. When displaying the image frame corresponding to the 1501ms audio moment, the animation engine can switch to display the image frame corresponding to the 1501ms audio moment based on the updated animation parameter 3.

[0212] The audio feature extraction engine can obtain updated dynamic effect parameter 4 based on the audio intensity of the 1801ms audio moment. When displaying the image frame corresponding to the 1801ms audio moment, the dynamic effect engine can switch to display the image frame corresponding to the 1801ms audio moment based on the updated dynamic effect parameter 4.

[0213] When the audio intensity is greater than the preset audio intensity, S610 - S612 may be executed.

[0214] When the audio intensity is less than the preset audio intensity, S613 - S614 may be executed.

[0215] The shorter the window or timer is, the more accurately the playing progress of the first audio file matches the playing progress of the first animation, and the smaller the error is.

[0216] Optionally, the window or timer time can be adjusted, and this application only uses 20ms as an example for illustration.

[0217] S610: The audio feature extraction engine determines update animation parameters based on the audio intensity.

[0218] When the audio intensity is greater than the preset audio intensity, the audio feature extraction engine can determine the update animation parameters based on the audio intensity.

[0219]

[0220] Optionally, the audio feature extraction engine can convert the audio intensity into an update animation parameter by using formula (1). Where Y represents the update animation parameter, X represents the audio intensity, and Y max Indicates the maximum dynamic effect parameter, Y min Indicates the minimum dynamic effect parameter, Y max and Y min For the default, X max Indicates the maximum audio intensity value, C min Indicates the minimum audio intensity value, X max and X min For preset.

[0221] For example, when the animation parameter is the switching time between any two adjacent image frames in the first animation, Y max It can be 30, Y min It can be 5, X max It can be 100, X min Can be 0.

[0222] According to formula (1), when the audio intensity is greater than the preset audio intensity, the audio feature extraction engine can map the audio intensity to the motion effect parameter, obtain the updated motion effect parameter based on the audio intensity, and then switch to display the image frame corresponding to the audio intensity based on the updated motion effect parameter.

[0223] For example, the audio feature extraction engine can obtain updated motion effect parameter one based on an audio intensity of 75 decibels through formula (1). The audio feature extraction engine can obtain updated motion effect parameter two based on an audio intensity of 80 decibels through formula (1). The audio feature extraction engine can obtain updated motion effect parameter three based on an audio intensity of 78 decibels through formula (1). The audio feature extraction engine can obtain updated motion effect parameter four based on an audio intensity of 80 decibels through formula (1). Updated motion effect parameter one, updated motion effect parameter two, and updated motion effect parameter three are different. Updated motion effect parameter one is less than updated motion effect parameter three, which is less than updated motion effect parameter two.

[0224] S611. The audio feature extraction engine sends the updated motion effect parameters to the motion effect engine.

[0225] S612: The motion effect engine switches to display the first motion effect image frame based on the updated motion effect parameters.

[0226] After the audio feature extraction engine obtains the updated motion effect parameters based on the audio intensity, the audio feature extraction engine may send the updated motion effect parameters to the motion effect engine. The motion effect engine may switch to display the first motion effect image frame based on the updated motion effect parameters.

[0227] For example, when the motion effect parameters of different image frames in the first animation are the same, the first animation includes multiple image frames, and the switching time between any two adjacent image frames in the first animation is equal. Figure 1G The animation parameters corresponding to the image frame are modified to update the animation parameters 1. Then the animation parameters are modified Figure 1F and Figure 1G The switching time between two frames is longer than before the animation parameters are modified. Figure 1E and Figure 1F The switching time between two image frames.

[0228] For another example, when the motion effect parameters of different image frames in the first animation are different, the first animation includes multiple image frames, and the switching time between two adjacent image frames in the first animation decreases from the beginning to the end. Figure 1G The animation parameters corresponding to the image frame are modified to update the animation parameters 1. Then the animation parameters are modified Figure 1F and Figure 1G The switching time between two frames is longer than before the animation parameters are modified. Figure 1F and Figure 1G The switching time between two image frames.

[0229] For another example, when the motion effect parameters of different image frames in the first animation are different, the first animation includes multiple image frames, and the switching time between two adjacent image frames in the first animation increases from the beginning to the end. Figure 1GThe animation parameters corresponding to the image frame are modified to update the animation parameters 1. Then the animation parameters are modified Figure 1F and Figure 1G The switching time between two frames is shorter than before the animation parameters are modified. Figure 1F and Figure 1G The switching time between two image frames.

[0230] S613: The audio feature extraction engine sends the preset motion effect parameters to the motion effect engine.

[0231] S614: The motion effect engine switches to display a second motion effect image frame based on preset motion effect parameters.

[0232] When the audio intensity is less than the preset audio intensity, the audio feature extraction engine may not update the motion effect parameters, but may switch to display the second motion effect image frame based on the preset motion effect parameters.

[0233] Optionally, in other embodiments, when the audio intensity is less than the preset audio intensity, the audio feature extraction engine determines whether the audio intensity is less than the minimum audio intensity. In the case of the minimum audio intensity of Xiaoyu, the audio feature extraction engine can also obtain updated motion effect parameters based on the audio intensity, and send the updated motion effect parameters to the motion effect engine, and the motion effect engine switches to display the fourth motion effect image frame based on the preset motion effect parameters.

[0234] S609-S614 are executed periodically until the audio player stops playing the first audio file, and then S609-S614 stop executing.

[0235] Optionally, before the audio feature extraction engine executes S609 and before the first audio file is obtained, the audio feature extraction engine needs to determine whether the first feature file has been obtained. In some embodiments, the electronic device 100 regularly cleans up the memory and deletes the first feature file that has not been used for a long time. In other embodiments, if the electronic device 100 has not stored the first audio file before, the first audio file is downloaded in real time, for example, the first audio file downloaded in real time by the electronic device 100 is music, and the electronic device 100 has not calculated the first feature file of the first audio file downloaded in real time. Then the electronic device 100 cannot obtain the first feature file corresponding to the first audio file. Then before the audio feature extraction engine executes S609, it can first determine whether the first feature file corresponding to the first audio file is obtained to avoid execution failure.

[0236] Figure 8 A schematic diagram of a method for an audio feature extraction engine to obtain a first feature file is shown.

[0237] S801: An audio feature extraction engine reads a first audio file.

[0238] S802: The audio feature extraction engine needs to determine whether the first feature file is obtained.

[0239] Because in some embodiments, the electronic device 100 regularly cleans up the memory and deletes the first feature file that has not been used for a long time. In other embodiments, if the electronic device 100 has not stored the first audio file before, the first audio file is downloaded in real time, for example, the first audio file downloaded in real time by the electronic device 100 is music, and the electronic device 100 has not calculated the first feature file of the first audio file downloaded in real time. Then the electronic device 100 cannot obtain the first feature file corresponding to the first audio file. Therefore, before executing S609, the audio feature extraction engine needs to determine whether the first feature file is obtained.

[0240] When the audio feature extraction engine obtains the first feature file, S806 is executed.

[0241] If the audio feature extraction engine fails to obtain the first feature file, S803 is executed.

[0242] S803: The audio feature extraction engine obtains a first audio file.

[0243] S804: The audio feature extraction engine decodes the first audio file to obtain first PCM data.

[0244] S805: The audio feature extraction engine extracts features from the first PCM data to obtain a first feature file corresponding to the first audio file.

[0245] The first audio file may be a formatted audio file, such as WAV format, MP3 format, MP4 format, 3GP format, etc.

[0246] After acquiring the first audio file, the audio feature extraction module can decode the first audio file in a preset format to obtain pulse code modulation (PCM) data, such as first PCM data. The first PCM data is discrete data. The audio feature extraction module can perform feature extraction on discrete data.

[0247] The audio feature extraction module can extract features from the first PCM data based on a preset algorithm to obtain a first feature file. The preset algorithm can be designed based on the perception characteristics of human ears to sound.

[0248] Audio features include but are not limited to loudness (or sound intensity), the time corresponding to the loudness, and the like.

[0249] For example, the first audio file is a file of the first duration, the first PCM data is also a file of the first duration, and the first feature file obtained after the audio feature extraction module extracts features from the first PCM data is also a file of the first duration.

[0250] The first feature file may represent audio features of audio at different times in the first audio file, such as loudness features of audio at different times.

[0251] For example, the first feature file can be Figure 4B After the audio feature extraction engine obtains the first feature file corresponding to the first audio file, the audio feature extraction engine can save the first feature file and obtain the storage path of the first feature file. The audio feature extraction engine also needs to send the storage path of the first feature file to the first application to inform the first application of the storage location of the first feature file corresponding to the first audio file.

[0252] S806: Audio feature extraction engine execution Figure 6 S609-S614 in the embodiment.

[0253] After the audio feature extraction engine obtains the first feature file corresponding to the first audio file, the audio feature extraction engine can execute Figure 6 In S609-S614 of the embodiment, the first feature file is traversed in sequence to determine the relationship between the audio intensity at each moment in the first audio file and the preset audio intensity.

[0254] When the audio intensity is greater than the preset audio intensity, the audio feature extraction engine can update the dynamic effect parameters of the audio moment when the audio intensity is greater than the preset audio intensity to obtain updated dynamic effect parameters. And switch the displayed image frame based on the updated dynamic effect parameters. In this way, the playback effect of the animation can be associated with the characteristics of the audio file. The higher the audio intensity in the first audio file, the faster the animation is played. The lower the audio intensity in the first audio file, the slower the animation is played, thereby improving the association between the animation and the audio file.

[0255] When the audio intensity is less than the preset audio intensity, the audio feature extraction engine can switch the display image frame based on the preset motion effect parameters at the audio moment.

[0256] For details, please refer to the description in the S609-S614 embodiments, and this application will not go into details here.

[0257] Fig. 9 A flowchart of an audio playback method provided in this application.

[0258] S901: When a preset condition is met, the electronic device obtains a first audio file and a first animation, where the first animation includes a plurality of image frames; and the electronic device plays the first audio file and the first animation.

[0259] In some embodiments, the animations for different audios may be the same, or the animations for different audios may be different.

[0260] Optionally, the electronic device may also match different animations based on the audio features of the audio. Alternatively, the animation associated with the audio may also be preset.

[0261] S902: The electronic device obtains a first feature file corresponding to the first audio file, where the first feature file includes audio intensities of the first audio file at different times.

[0262] S903: When the audio intensity at the first moment is greater than the first preset audio intensity, the electronic device determines a first motion effect parameter based on the audio intensity at the first moment.

[0263] Optionally, the first audio file and the first feature file have the same duration. The electronic device can play the first audio file and the first animation at the same time. When starting to play the first audio file, you can start using a fixed-length window to traverse the first feature file from front to back in chronological order to determine the first moment when the audio intensity is greater than the first audio intensity, thereby controlling the playback speed of the animation and achieving sound and picture coordination. The shorter the fixed duration of the window, the stronger the synchronization between the first audio file and the first animation, and the smaller the error.

[0264] Optionally, the first moment may be a time point or a period of time. The audio intensity at the first moment may be the audio intensity at a certain time point or the average audio intensity over a period of time.

[0265] Exemplarily, the first moment may be Fig. 7A The 10ms time, 15ms time, 25ms time, 30ms time, etc. are shown.

[0266] The first animation parameter can be Figure 7B The updated motion effect parameter 1 is determined based on 75 decibels at the 10ms moment shown.

[0267] The first animation parameter can also be Figure 7B The updated animation parameter 2 is determined based on 80 decibels at the 15ms moment shown.

[0268] The first animation parameter can also be Figure 7B The updated animation parameter three is determined based on 78 decibels at the 25ms moment shown.

[0269] The first animation parameter can also be Figure 7B The updated motion effect parameter four is determined based on 80 decibels at the 30ms moment shown.

[0270] The switching speed between two adjacent image frames in the first animation is preset. That is, the preset animation parameters of each image frame in the first animation are preset, and the preset animation parameters of each image frame are used by the electronic device to control the switching speed between the image frame and the previous image frame.

[0271] S904. The electronic device plays the first image frame in the first animation based on the first motion effect parameter, where the first motion effect parameter is used to control the switching speed from the second image frame to the first image frame, and the second image frame shown is an image frame before the first image frame; wherein the first motion effect parameter is greater than the preset motion effect parameter at the first moment.

[0272] In a possible implementation, the method also includes: when the audio intensity at the second moment is less than the first preset audio intensity, the electronic device obtains the preset motion effect parameters at the second moment; the electronic device plays the second image frame based on the preset motion effect parameters at the second moment, and the preset motion effect parameters at the second moment are used to control the switching speed when switching from the third image frame to the second image frame, and the third image frame shown is an image frame before the second image frame.

[0273] In this way, when the audio intensity of the audio is less than the first preset audio intensity, the electronic device may not update the motion effect parameters at that moment, but still play the image frame at that moment based on the preset motion effect parameters at that moment.

[0274] Exemplarily, the second moment may be Fig. 7A The 0ms time, 5ms time, 20ms time, 35ms time, 60ms time, etc. are shown.

[0275] In a possible implementation, the electronic device obtains the preset motion effect parameters at the second moment, specifically including: when the audio intensity at the second moment is greater than the second preset audio intensity and less than the first preset audio intensity, the electronic device obtains the preset motion effect parameters at the second moment.

[0276] In one possible implementation, the method also includes: when the audio intensity at a third moment is less than a second preset audio intensity, the electronic device determines a second motion effect parameter based on the audio intensity at the third moment; the electronic device plays a fourth image frame based on the second motion effect parameter, and the first motion effect parameter is used to control a switching speed from a fifth image frame to a fourth image frame, wherein the fifth image frame is an image frame before the fourth image frame; wherein the second motion effect parameter is less than the preset motion effect parameter at the third moment.

[0277] In this way, when the audio intensity of the audio is less than the second preset audio intensity, the electronic device also needs to update the animation parameter at that moment, obtain the second animation parameter, and play the image frame at that moment based on the second animation parameter. The second animation parameter is different from the preset animation parameter at the third moment. The second animation parameter is less than the preset animation parameter at the third moment.

[0278] The greater the audio intensity of the audio, the faster the animation plays; the smaller the audio intensity of the audio, the slower the animation plays, thus achieving the coordination of sound and picture and improving the fun of audio playback.

[0279] In a possible implementation, when the preset motion effect parameters at the first moment are the same as the preset motion effect parameters at the second moment, the switching speed when switching from the second image frame to the first image frame is greater than the switching speed when switching from the third image frame to the second image frame.

[0280] That is to say, the first motion effect parameter is greater than the second motion effect parameter.

[0281] Optionally, the preset motion effect parameters at different moments in the first animation may be the same or different.

[0282] In a possible implementation, when the preset motion effect parameters at the second moment are the same as the preset motion effect parameters at the third moment, the switching speed when switching from the third image frame to the second image frame is greater than the switching speed when switching from the fifth image frame to the fourth image frame. In other words, the preset motion effect parameters at the second moment are greater than the second motion effect parameters.

[0283] In a possible implementation, the electronic device determines the first motion effect parameter based on the audio intensity at the first moment, specifically including: according to the formula Determine the first dynamic effect parameter; where Y represents the first dynamic effect parameter, Y max Indicates the maximum dynamic effect parameter value, Y min Indicates the minimum dynamic effect parameter value, Y max and Y min is preset; X represents the audio intensity at the first moment, X max Indicates the maximum audio intensity value, X min Indicates the minimum audio intensity value, X max and X min For preset.

[0284] In this way, when the audio intensity is greater than the first preset audio intensity, or the audio intensity is less than the second preset audio intensity, the electronic device can obtain updated motion effect parameters based on the audio intensity in this way, thereby achieving the effect of sound and picture coordination.

[0285] In a possible implementation, before the electronic device plays the first audio file and plays the first animation, the method further includes: the electronic device decodes the first audio file to obtain a first PCM file; the electronic device extracts features from the first PCM file to obtain a first feature file corresponding to the first audio file.

[0286] In this way, the electronic device can pre-process and save the first characteristic file. When playing the first animation, the electronic device does not need to determine the first characteristic file in real time to improve the synchronization effect of the first audio file and the first animation.

[0287] In one possible implementation, before the electronic device obtains the first feature file corresponding to the first audio file, the method also includes: when the electronic device determines that the first feature file corresponding to the first audio file is not stored locally, the electronic device decodes the first audio file to obtain a first PCM file, and performs feature extraction on the first PCM file to obtain the first feature file corresponding to the first audio file.

[0288] In some embodiments, the electronic device can update the feature file corresponding to the stored audio. For example, the feature file that has not been used for a certain period of time is deleted. Then before playing the first animation, the electronic device can determine whether the first feature file corresponding to the first audio file is stored locally. Avoid the situation where the first feature file is not obtained and the sound and picture collaboration cannot be achieved.

[0289] In one possible implementation, the electronic device includes a motor, and the method further includes: when the audio intensity at a first moment is greater than a first preset audio intensity, the electronic device determines a first vibration frequency of the motor based on the audio intensity at the first moment; while the electronic device plays a first image frame in a first animation based on a first motion effect parameter, the electronic device also vibrates through the motor based on the first vibration frequency; wherein the first vibration frequency is greater than the preset vibration frequency at the first moment.

[0290] The vibration frequency of each image frame in the first animation is preset. The preset vibration frequency of each image frame is used for the electronic device to vibrate through the motor when displaying the image frame.

[0291] Through this method, audio features, audio animation and vibration effects can be associated. The greater the audio intensity, the faster the animation playback speed, and the faster the motor vibration speed, thus achieving three-dimensional coordination of sound, image and vibration, and improving the fun of audio playback.

[0292] In a possible implementation, the method also includes: when the audio intensity at the second moment is less than the first preset audio intensity, the electronic device obtains a preset vibration frequency of the motor at the second moment; while the electronic device plays the second image frame based on the preset motion effect parameters at the second moment, the electronic device vibrates through the motor based on the preset vibration frequency at the second moment.

[0293] In a possible implementation, when the audio intensity at the second moment is greater than the second preset audio intensity and less than the first preset audio intensity, the electronic device acquires the preset vibration frequency at the second moment.

[0294] In one possible implementation, the method also includes: when the audio intensity at the third moment is less than the second preset audio intensity, the electronic device determines a second vibration frequency based on the audio intensity at the third moment; while the electronic device plays the fourth image frame based on the second motion effect parameter at the third moment, the electronic device vibrates based on the second vibration frequency through a motor.

[0295] In this way, when the audio intensity of the audio is less than the second preset audio intensity, the electronic device also needs to update the vibration frequency at that moment to obtain the second vibration frequency, and while the electronic device plays the fourth image frame based on the second motion effect parameter at the third moment, the electronic device vibrates based on the second vibration frequency through the motor. The second vibration frequency is less than the preset vibration frequency at the third moment.

[0296] The greater the audio intensity of the audio, the faster the animation plays and the faster the motor vibrates. The smaller the audio intensity of the audio, the slower the animation plays and the slower the motor vibrates, thus achieving the coordination of sound, picture and vibration and increasing the fun of audio playback.

[0297] In a possible implementation, the electronic device may also determine the first vibration frequency based on the audio intensity at the first moment, specifically including: according to the formula Determine the first dynamic effect parameter; where Z represents the first vibration frequency, Z max Indicates the maximum vibration frequency, Z min Indicates the minimum vibration frequency, Z max and Z min is preset; X represents the audio intensity at the first moment, X max Indicates the maximum audio intensity value, X min Indicates the minimum audio intensity value, X max and x min For preset.

[0298] In this way, when the audio intensity is greater than the first preset audio intensity, or the audio intensity is less than the second preset audio intensity, the electronic device can obtain an updated vibration frequency based on the audio intensity in this way, thereby achieving the effect of sound, image and vibration coordination.

[0299] In a possible implementation, the first audio file is an alarm audio file, and the preset condition includes that the time reaches a preset start time of the alarm.

[0300] In a possible implementation, the first audio file is an incoming call audio file, and the preset condition includes that the electronic device receives an incoming call request sent by another electronic device. The incoming call request here may be an operator phone request.

[0301] In other embodiments, the incoming call request here may also be an Internet phone request.

[0302] In a possible implementation, the first audio file is the first music downloaded in real time in a music application, and the preset condition includes the electronic device receiving a user operation to play the first music.

[0303] The present application provides an electronic device, the electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, when the one or more processors execute the computer instructions, the electronic device executes Fig. 9 An audio playback method is shown.

[0304] The present application provides a chip system, which includes one or more processors, which are used to call computer instructions to enable electronic devices to execute Fig. 9 An audio playback method is shown.

[0305] The present application provides a computer-readable storage medium, including instructions, which, when executed on an electronic device, cause the electronic device to execute Fig. 9 An audio playback method is shown.

[0306] refer to Fig.10 , Fig.10 A schematic structural diagram of an electronic device is shown.

[0307] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0308] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0309] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0310] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0311] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0312] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0313] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0314] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0315] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0316] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0317] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0318] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0319] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0320] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0321] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0322] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0323] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0324] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0325] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0326] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0327] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0328] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0329] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0330] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0331] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0332] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0333] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0334] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0335] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0336] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0337] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0338] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0339] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0340] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0341] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0342] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0343] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0344] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0345] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0346] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0347] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0348] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0349] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0350] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0351] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0352] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0353] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0354] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0355] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0356] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0357] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0358] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0359] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0360] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0361] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0362] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0363] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0364] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0365] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0366] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0367] Fig.11 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0368] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0369] The application layer can include a series of application packages.

[0370] like Fig.11 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0371] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0372] like Fig.11 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0373] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0374] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0375] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0376] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0377] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0378] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0379] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0380] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0381] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0382] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0383] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0384] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0385] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0386] A 2D graphics engine is a drawing engine for 2D drawings.

[0387] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0388] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0389] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.

[0390] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0391] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0392] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0393] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. An audio playback method, It is characterized in that The method comprises: When a preset condition is met, the electronic device acquires a first audio file and a first animation, wherein the first animation includes a plurality of image frames; The electronic device plays the first audio file and the first animation; The electronic device plays the first animation, including: The electronic device acquires a first feature file corresponding to the first audio file, where the first feature file includes audio intensities of the first audio file at different times; When the audio intensity at the first moment is greater than the first preset audio intensity, the electronic device determines a first motion effect parameter based on the audio intensity at the first moment; The electronic device plays the first image frame in the first animation based on the first motion effect parameter, the first motion effect parameter is used to control the switching speed when switching from the second image frame to the first image frame, and the second image frame is an image frame before the first image frame; Among them, the first motion effect parameter is greater than the preset motion effect parameter at the first moment.

2. The method according to claim 1, It is characterized in that The method further comprises: When the audio intensity at the second moment is less than the first preset audio intensity, the electronic device acquires the preset motion effect parameter at the second moment; The electronic device plays the second image frame based on the preset motion effect parameters at the second moment, and the preset motion effect parameters at the second moment are used to control the switching speed from the third image frame to the second image frame, and the third image frame shown is an image frame before the second image frame.

3. The method according to claim 2, It is characterized in that The electronic device obtains the preset motion effect parameters at the second moment, specifically including: When the audio intensity at the second moment is greater than the second preset audio intensity and less than the first preset audio intensity, the electronic device obtains the preset motion effect parameters at the second moment.

4. The method according to claim 3, It is characterized in that The method further comprises: When the audio intensity at the third moment is less than the second preset audio intensity, the electronic device determines a second motion effect parameter based on the audio intensity at the third moment; The electronic device plays a fourth image frame based on the second motion effect parameter, the first motion effect parameter is used to control a switching speed when switching from a fifth image frame to the fourth image frame, and the fifth image frame is an image frame before the fourth image frame; Among them, the second motion effect parameter is smaller than the preset motion effect parameter at the third moment.

5. The method according to any one of claims 2 to 4, It is characterized in that When the preset motion effect parameters at the first moment are the same as the preset motion effect parameters at the second moment, a switching speed when switching from the second image frame to the first image frame is greater than a switching speed when switching from the third image frame to the second image frame.

6. The method according to claim 4, It is characterized in that When the preset motion effect parameters at the second moment are the same as the preset motion effect parameters at the third moment, a switching speed when switching from the third image frame to the second image frame is greater than a switching speed when switching from the fifth image frame to the fourth image frame.

7. The method according to any one of claims 1 to 4 or claim 6, It is characterized in that The electronic device determines the first motion effect parameter based on the audio intensity at the first moment, specifically including: According to the formula Determining the first motion effect parameter; Wherein, the Y represents the first dynamic effect parameter, the Y max Indicates the maximum dynamic effect parameter value, the Y min Indicates the minimum dynamic effect parameter value, the Y max and the Y min For the preset; The X represents the audio intensity at the first moment. max Indicates the maximum audio intensity value, the X min Indicates the minimum audio intensity value, the X max and the X min For preset.

8. The method according to any one of claims 1 to 4 or claim 6, It is characterized in that Before the electronic device plays the first audio file and plays the first animation, the method further includes: The electronic device decodes the first audio file to obtain a first PCM file; The electronic device extracts features from the first PCM file to obtain the first feature file corresponding to the first audio file.

9. The method according to any one of claims 1 to 4 or claim 6, It is characterized in that Before the electronic device acquires the first feature file corresponding to the first audio file, the method further includes: When the electronic device determines that the first feature file corresponding to the first audio file is not stored locally, the electronic device decodes the first audio file to obtain a first PCM file, and extracts features from the first PCM file to obtain the first feature file corresponding to the first audio file.

10. The method according to claim 2, It is characterized in that The electronic device includes a motor, and the method further includes: When the audio intensity at the first moment is greater than the first preset audio intensity, the electronic device determines a first vibration frequency of the motor based on the audio intensity at the first moment; While the electronic device plays the first image frame in the first animation based on the first motion effect parameter, the electronic device vibrates based on the first vibration frequency through the motor; Wherein, the first vibration frequency is greater than a preset vibration frequency at the first moment.

11. The method according to claim 10, It is characterized in that The method further comprises: When the audio intensity at the second moment is less than the first preset audio intensity, the electronic device obtains the preset vibration frequency of the motor at the second moment; While the electronic device plays the second image frame based on the preset motion effect parameters at the second moment, the electronic device vibrates through the motor based on the preset vibration frequency at the second moment.

12. The method according to any one of claims 1 to 4 or claims 6 or 10 to 11, It is characterized in that The first audio file is an alarm audio file, and the preset condition includes that the time reaches the preset start time of the alarm.

13. The method according to any one of claims 1 to 4 or claims 6 or 10 to 11, It is characterized in that The first audio file is an incoming call audio file, and the preset condition includes that the electronic device receives an incoming call request sent by another electronic device.

14. The method according to claim 9, It is characterized in that The first audio file is a first music downloaded in real time in a music application, and the preset condition includes the electronic device receiving a user operation to play the first music.

15. An electronic device, It is characterized in that The electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-14.

16. A chip system, the chip system is applied to electronic equipment, the chip system comprises one or more processors, It is characterized in that The processor is configured to call computer instructions so that the electronic device executes the method according to any one of claims 1 to 14.

17. A computer-readable storage medium comprising instructions, It is characterized in that When the instruction is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 14.