Audio playing method and device

By obtaining the reference frequency of the audio playback request and dynamically controlling the enable state of the CODEC chip based on the frequency, the power consumption and timeliness balance of embedded IoT chips during audio playback is solved, and the high timeliness and low power consumption performance of the device is improved.

CN120295598APending Publication Date: 2025-07-11FIBOCOM WIRELESS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510287012.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The prior art is difficult to balance the power consumption and timeliness of embedded IoT chips during audio playback. The CODEC chip has been on and affecting the low power consumption requirements, and the shutdown affects high timeliness.

Method used

By obtaining the reference frequency of the audio playback request, it is determined whether the chip device can enable the processing of the audio signal based on the requested frequency. High frequency enable low frequency is not enabled, and the processing flow is optimized in combination with the timer.

Benefits of technology

A balance between high timeliness and low power consumption is achieved, reducing the initialization operation of CODEC chips and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295598A_ABST
    Figure CN120295598A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an audio playing method and device. The method is applied to a terminal device, and comprises the following steps: the terminal device obtains a reference frequency of an audio playing request; and the terminal equipment determines the request frequency of the audio playing request based on the audio playing request received at least once. In a case where the request frequency is higher than the reference frequency, the terminal device enables a chip device for processing the audio signal. And the terminal equipment does not enable the chip device under the condition that the request frequency is lower than the reference frequency. The method is favorable for balancing the power consumption and timeliness of audio playing of the terminal equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of the Internet of Things, and particularly to an audio playing method and apparatus. Background Art

[0002] When some embedded Internet of Things chips are designed, the built-in audio digital signal processing chips are optimized. A terminal device can externally dispose a codec (coder-decoder) chip and control the codec chip to process an audio signal so as to play the audio signal.

[0003] If the codec chip is always in an on state, the terminal device can quickly play an audio when receiving an audio playing request, but it does not meet the low power consumption requirement of the terminal device for playing an audio; if the codec chip is always in an off state, after the terminal device receives an audio playing request, it needs to first start the codec chip, which does not meet the high timeliness requirement of the terminal device for playing an audio.

[0004] Therefore, how the terminal device controls the on state or off state of the codec chip to balance the power consumption and timeliness of the terminal device for playing an audio still needs to be studied. Summary of the Invention

[0005] Embodiments of the present application provide an audio playing method and apparatus, which are beneficial to balancing the power consumption and timeliness of a terminal device for playing an audio.

[0006] In a first aspect, embodiments of the present application provide an audio playing method. The method includes: The terminal device obtains a reference frequency of an audio playing request. The terminal device determines a request frequency of the audio playing request based on at least one received audio playing request. The terminal device enables a chip device for processing an audio signal when the request frequency is higher than the reference frequency. The terminal device does not enable the chip device for processing the audio signal when the request frequency is lower than the reference frequency.

[0007] It can be seen that in embodiments of the present application, the terminal device enables a chip device for processing an audio signal when the request frequency of the audio playing request is higher than the reference frequency of the audio playing request; the terminal device does not enable the chip device for processing the audio signal when the request frequency of the audio playing request is lower than the reference frequency of the audio playing request. Compared with the case where the terminal device always enables the chip device for processing the audio signal, this method can meet the low power consumption requirement of the terminal device for playing an audio; compared with the case where the terminal device enables the chip device for processing the audio signal after receiving each audio playing request, this method can meet the high timeliness requirement of the terminal device for playing an audio. Therefore, this method is beneficial to balancing the power consumption and timeliness of the terminal device for playing an audio.

[0008] In an alternative embodiment, when the request frequency is higher than the reference frequency, the terminal device may further perform the following operations: start a timer, and when a first audio playback request for requesting to play the first audio signal is received during the counting period of the timer, stop the timer. Wherein, the first counting duration of the timer is determined according to the reference frequency.

[0009] In an alternative embodiment, the terminal device may further perform the following operations: process the first audio signal through a chip device to obtain a second audio signal to be played, and play the second audio signal.

[0010] In an alternative embodiment, the terminal device may further perform the following operations: update the counting duration of the timer from the first counting duration to the second counting duration according to the request frequency.

[0011] In an alternative embodiment, the terminal device may further perform the following operations: when no audio playback request is received during the counting period of the timer, convert the enable state of the chip device to a non-enabled state.

[0012] In an alternative embodiment, the reference frequency and the request frequency are characterized by the number of audio playback requests per unit time; the request frequency being higher than the reference frequency includes: the number of request times of the audio playback request per unit time is greater than the reference number of times of the audio playback request per unit time.

[0013] In an alternative embodiment, the reference frequency and the request frequency are characterized by the average time interval of a preset number of audio playback requests; the request frequency being higher than the reference frequency includes: the average request time interval of a preset number of audio playback requests is less than the average reference time interval of a preset number of audio playback requests.

[0014] In a second aspect, an embodiment of the present application provides an audio playback device, and the device includes:

[0015] An acquisition unit, configured to acquire the reference frequency of the audio playback request;

[0016] A determination unit, configured to determine the request frequency of the audio playback request based on at least one received audio playback request;

[0017] An enable unit, configured to enable a chip device for processing the audio signal when the request frequency is higher than the reference frequency.

[0018] The enable unit is further configured to not enable the chip device when the request frequency is lower than the reference frequency.

[0019] In addition, in this aspect, for other alternative embodiments of the audio playback device, reference may be made to the relevant content of the first aspect above, which will not be elaborated here.

[0020] In a third aspect, an embodiment of the present application provides a module device, which includes a communication module, a power module, a storage module, and a chip, where:

[0021] The power module is used to provide electrical energy for the module device;

[0022] The storage module is used to store data and instructions;

[0023] The communication module is used for internal communication within the module device or for communication between the module device and an external device;

[0024] The chip is used to execute the method described in the first aspect above.

[0025] In a fourth aspect, the present application further provides a computer device, which includes: a memory and a processor, where a computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the method as described above are implemented.

[0026] In a fifth aspect, the present application further provides a computer storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method as described above are implemented. Description of the Drawings

[0027] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments that conform to the present application, and are used together with the specification to explain the principles of the present application. To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a schematic diagram of the architecture of an audio playback system;

[0029] Figure 2 It is a schematic flowchart of an audio playback method;

[0030] Figure 3 It is a schematic flowchart of an audio playback method provided by an embodiment of the present application;

[0031] Figure 4 It is a schematic flowchart of another audio playback method provided by an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of the structure of an audio playback device provided by an embodiment of the present application;

[0033] Figure 6 Schematic structural diagram of a module device provided by an embodiment of the present application;

[0034] Figure 7 Schematic structural diagram of a computer device provided by an embodiment of the present application.

[0035] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Through the above-mentioned accompanying drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and the text description are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners

[0036] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] It should be understood that the terms "comprising" and "including" indicate the presence of the described features, steps, operations, elements, components, items, types, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or", "and / or", "including at least one of the following" and the like used in the present application can be interpreted inclusively, or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and again, "A, B or C" or "A, B and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C". An exception to this definition will occur only when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way.

[0038] It should be understood that although the steps in the flowcharts in the embodiments of the present application are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit and can be executed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0039] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] In the following description, the suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of explaining the present application and have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.

[0041] To better understand the audio playback method disclosed in the embodiments of the present application, the system architecture applicable to the embodiments of the present application is described.

[0042] Figure 1 It is a schematic diagram of the architecture of an audio playback system. As Figure 1 shown, the audio playback system includes a terminal device 101 and a chip device 102. The chip device 102 is a chip device placed outside the terminal device 101, and the chip device 102 is used to process the audio signal from the terminal device 101 to obtain the audio signal to be played. Among them, the terminal device 101 and the chip device 102 can be connected through an interface or a bus. For example, the terminal device 101 and the chip device 102 can be connected through an integrated circuit bus.

[0043] The terminal device in the embodiments of the present application, which can also be referred to as a terminal, can refer to various forms of user equipment (UE), access terminal, user unit, user station, mobile station, mobile station (MS), remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent, or user device. The terminal device can also be a cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device, or other processing device connected to a wireless modem, in-vehicle device, wearable device, terminal device in a fifth-generation mobile communication (5G) network, or terminal device in a future evolved public land mobile network (PLMN), etc. The embodiments of the present application do not limit this.

[0044] In the embodiments of the present application, the chip device is an integrated circuit integrating an audio signal processing function. For example, the chip device can be a coder-decoder (CODEC) chip. The CODEC chip can perform encoding, such as converting an analog audio signal into a digital audio signal; the CODEC chip can also perform decoding, such as converting a digital audio signal into an analog audio signal.

[0045] In the embodiments of the present application, the terminal device 101 can obtain a reference frequency of an audio playback request and determine a request frequency of the audio playback request based on at least one received audio playback request. When the request frequency of the audio playback request is higher than the reference frequency of the audio playback request, the terminal device 101 enables the chip device 102 for processing the audio signal; when the request frequency of the audio playback request is lower than the reference frequency of the audio playback request, the terminal device 101 does not enable the chip device 102 for processing the audio signal.

[0046] In a possible audio playback mode, such as Figure 2As shown in the figure, after receiving an audio playback request, the terminal device can play the audio signal through the following process: S1. The terminal device creates an audio playback manager. Herein, the audio playback manager is used to control the playback process of the audio signal. For example, the terminal device can control the stop of the audio signal playback through the audio playback manager. For another example, the terminal device can control the fast playback of the audio signal through the audio playback manager. S2. The terminal device sets the audio playback parameters. Herein, the audio playback parameters refer to a series of technical parameters that affect the audio quality and speed during the audio playback process, such as the technical parameters that affect the audio playback speed, etc. S3. The terminal device initializes the management register of the CODEC chip. Herein, the terminal device initializes the management register of the CODEC chip by modifying the parameters of the internal control register of the CODEC chip. S4. The terminal device configures the parameters of the CODEC chip and sets the output path. Herein, the terminal device can configure the parameters of the CODEC chip by reading and writing the management register of the CODEC chip so as to control the CODEC chip to process the audio signal. S5. The terminal device sends the audio signal in the buffer to the underlying player. Herein, the buffer is a memory area used to temporarily store the audio signal. Herein, the underlying player is a series of software components responsible for processing the audio data, and the terminal device can play the audio through the underlying player. S6. The terminal device starts to play the audio signal. Herein, the terminal device calls the parameters of the CODEC chip and plays the audio signal through the underlying player. S7. The terminal device shuts down the CODEC chip. Herein, after completing the audio playback, the terminal device shuts down the CODEC chip, that is, the terminal device makes the CODEC chip in a state where it cannot process the audio signal. S8. The terminal device reclaims the resources of the audio playback manager. Herein, the resources of the audio playback manager include memory resources, central processing unit resources, etc.

[0047] It can be seen that when the terminal device completes one audio playback, it will shut down the CODEC chip and reclaim the resources of the audio playback manager. When the terminal device continuously receives audio playback requests, every time it completes an audio playback, it shuts down the CODEC chip and then initializes the management register of the CODEC chip. As a result, the terminal device needs to repeatedly perform the operations of initializing, shutting down, and initializing the CODEC chip, and thus cannot meet the high timeliness requirements for the terminal device to play audio. In addition, for low-cost CODEC chips, the time for the terminal device to initialize the CODEC chip is relatively long, which will affect the user experience of playing audio.

[0048] An embodiment of the present application proposes an audio playback method. Figure 3 The flowchart of an audio playback method provided by an embodiment of the present application is shown in the figure, and the method includes but is not limited to:

[0049] S301. The terminal device obtains the reference frequency of the audio playback request.

[0050] The embodiments of the present application do not limit the representation form of the reference frequency. In an optional implementation manner, the reference frequency can be characterized by the reference number of audio playback requests per unit time. For example, the reference frequency is characterized by the reference number of audio playback requests within one minute. The reference number of audio playback requests within one minute can be 10 times, or can be 20 times, etc.

[0051] In another optional implementation manner, the reference frequency can be characterized by the average reference time interval of a preset number of audio playback requests. Wherein, the preset number can be any number, such as any number from 5 to 10 times. For example, when the preset number is 8 times, the average reference time interval of the audio playback request can be 6000 milliseconds.

[0052] In an optional implementation manner, the terminal device obtains the reference frequency of the audio playback request, including: the terminal device generates the reference frequency of the audio playback request by itself. For example, the terminal device generates by itself that the reference number of audio playback requests within one minute is 10 times.

[0053] Optionally, the terminal device generates the reference frequency of the audio playback request by itself, including: the terminal device generates the reference frequency of the audio playback request by itself according to the service type. For example, when the service type is the collection service, the terminal device generates by itself the reference frequency of the "collection successful" audio playback request according to the collection service.

[0054] It can be seen that the terminal device can generate the reference frequency of the audio playback request by itself according to different service types to adapt to the playback requirements of different services.

[0055] In another optional implementation manner, the terminal device obtains the reference frequency of the audio playback request, including: the terminal device reads the initial value of the reference frequency of the audio playback request from the storage area, and this initial value can be configured by coding. For example, the terminal device reads from the storage area that the average reference time interval of 8 audio playback requests is 6000 milliseconds.

[0056] S302. The terminal device determines the request frequency of the audio playback request based on at least one received audio playback request.

[0057] Wherein, the audio playback request is used to request the playback of an audio signal, and the audio playback request includes the audio signal. The audio playback request can be an instruction for the user to trigger the request to play the audio signal. The audio playback request can also be an instruction for the terminal device to request the playback of the audio signal after completing the service. For example, the audio playback request is an instruction for the terminal device to request the playback of the audio signal "payment completed" after completing the payment service.

[0058] The embodiments of the present application do not limit the expression form of the request frequency. In an optional implementation manner, when the reference frequency is characterized by the reference number of audio playback requests within a unit time, the request frequency is characterized by the request number of audio playback requests within a unit time.

[0059] For example, the request frequency is characterized by the request number of audio playback requests within one minute. Among them, the request number of audio playback requests within one minute can be understood as: the request number of audio playback requests within one minute after the terminal device receives an audio playback request and starts playing the audio.

[0060] In another optional implementation manner, when the reference frequency is characterized by the average reference time interval of a preset number of audio playback requests, the request frequency is characterized by the average request time interval of a preset number of audio playback requests.

[0061] For example, the terminal device is characterized by the average request time interval of 8 audio playback requests. Among them, the average request time interval of a preset number of audio playback requests can be understood as: the average request time interval of a preset number of audio playback requests after the terminal device receives an audio playback request and starts playing the audio.

[0062] In addition, the preset number used to characterize the request frequency is the same as the preset number used to characterize the reference frequency, so that the terminal device can compare the reference frequency of the audio playback request with the request frequency of the audio playback request.

[0063] In an optional implementation manner, when the request frequency is characterized by the request number of audio playback requests within a unit time, the terminal device determines the request frequency of the audio playback request based on at least one received audio playback request, including: determining the request frequency of the audio playback request based on the request number of at least one audio playback request within a unit time.

[0064] In another optional implementation manner, when the request frequency is characterized by the average request time interval of a preset number of audio playback requests, the terminal device determines the request frequency of the audio playback request based on at least one received audio playback request, including: determining the request frequency of the audio playback request based on the average request time interval of a preset number of audio playback requests. Among them, the preset number is greater than one.

[0065] It can be seen that the terminal device can obtain the reference frequency of the audio playback request and determine the request frequency of the audio playback request based on at least one received audio playback request, which is beneficial to determining whether to enable the chip for processing the audio signal based on the reference frequency and the request frequency of the audio playback request, and further beneficial to balancing the power consumption and timeliness of the terminal device for playing audio.

[0066] S303. When the request frequency of the terminal device is higher than the reference frequency, enable the chip device for processing the audio signal.

[0067] In an alternative embodiment, when the reference frequency and the request frequency are characterized by the number of audio playback requests per unit time, the request frequency being higher than the reference frequency includes: the number of requests for audio playback requests per unit time is greater than the reference number of audio playback requests per unit time. For example, if the reference number of audio playback requests in one minute is 10 times, and the number of requests for audio playback requests in one minute is 12 times, and the number of requests for audio playback requests in one minute is greater than the reference number of audio playback requests in one minute, then the request frequency of the audio playback request is higher than the reference frequency of the audio playback request.

[0068] In an alternative embodiment, when the reference frequency and the request frequency are characterized by the average time interval of a preset number of audio playback requests, the request frequency being higher than the reference frequency includes: the average request time interval of a preset number of audio playback requests is less than the average reference time interval of a preset number of audio playback requests. For example, if the preset number is 8 times, the average reference time interval of 8 audio playback requests is 6000 milliseconds, and the average request time interval of 8 audio playback requests is 3000 milliseconds, and the average request time interval of a preset number of audio playback requests is less than the average reference time interval of a preset number of audio playback requests, then the request frequency of the audio playback request is higher than the reference frequency of the audio playback request.

[0069] In another alternative embodiment, when the terminal device continuously receives audio playback requests, it is determined that the request frequency is higher than the reference frequency.

[0070] In an alternative embodiment, enabling the chip device for processing the audio signal by the terminal device can be understood as: putting the chip device in a state where it can process the audio signal, or can be understood as: putting the chip device in an on state.

[0071] Optionally, the chip device for processing the audio signal is a chip device placed outside the terminal device, and this chip device can be a CODEC chip. The CODEC chip can perform encoding, such as converting an analog audio signal into a digital audio signal. The CODEC chip can also perform decoding, such as converting a digital audio signal into an analog audio signal.

[0072] It can be seen that when the request frequency is higher than the reference frequency, it indicates that the request frequency is relatively high. To meet the high timeliness requirement for the terminal device to play audio, the terminal device enables the chip device for processing the audio signal, so that after receiving an audio playback request, the terminal device can timely control the chip device to process the audio signal for playing the audio signal. Additionally, compared with the terminal device always enabling the chip device for processing the audio signal, this method can meet the low power consumption requirement for the terminal device to play audio.

[0073] In an alternative implementation, when the request frequency of the terminal device is higher than the reference frequency, the following steps can also be performed: start a timer, and the first timing duration of the timer is determined according to the reference frequency; when a first audio playback request for requesting to play the first audio signal is received during the timing period of the timer, stop the timer.

[0074] Optionally, when the reference frequency is characterized by the reference number of audio playback requests per unit time, the first timing duration of the timer being determined according to the reference frequency includes: the first timing duration of the timer (denoted by T) is determined according to the reference number of audio playback requests per minute (denoted by n). Specifically, T is determined by "T = 60 * 1000 / n". Here, the unit of T is milliseconds.

[0075] Optionally, when the reference frequency is characterized by the average reference time interval (denoted by t) of a preset number of audio playback requests, the first timing duration of the timer being determined according to the reference frequency includes: T is determined by t. For example, T = t.

[0076] It can be seen that when the request frequency is higher than the reference frequency, the terminal device can also start a timer for timing the enabled chip device, so that it can be determined whether to enable the chip device for processing the audio signal based on the timing of this timer.

[0077] In an alternative implementation, the terminal device can also perform the following operations: process the first audio signal through the chip device to obtain a second audio signal to be played; play the second audio signal.

[0078] Optionally, the terminal device processes the first audio signal through the chip device to obtain a second audio signal to be played, including: the terminal device converts the first audio signal from a digital audio signal to an analog audio signal through the chip device to obtain the second audio signal to be played.

[0079] It can be seen that when the terminal device receives a first audio playback request for requesting to play a first audio signal during the counting period of the timer, the chip device can process the requested first audio signal to obtain a second audio signal to be played, and then play the second audio signal.

[0080] In an alternative implementation, the terminal device can also perform the following operations: update the counting duration of the timer from a first counting duration to a second counting duration according to the request frequency.

[0081] Optionally, when the request frequency is characterized by the number of audio playback requests within a unit time, the terminal device updates the counting duration of the timer from a first counting duration to a second counting duration according to the request frequency, which can be understood as: the terminal device determines the second counting duration according to the number of audio playback requests within a unit time, and updates the counting duration of the timer from the first counting duration to the second counting duration. For example, using T1 to represent the second counting duration, the terminal device determines the number of audio playback requests within one minute (represented by n1), and the terminal device determines T1 through "T1 = 60 * 1000 / n1", and updates the counting duration of the timer from the first counting duration to T1.

[0082] Optionally, when the request frequency is characterized by the average request time interval (represented by t1) of a preset number of audio playback requests, the terminal device updates the counting duration of the timer from a first counting duration to a second counting duration according to the request frequency, which can be understood as: the terminal device determines the second counting duration according to the average request time interval of a preset number of audio playback requests, and updates the counting duration of the timer from the first counting duration to the second counting duration. For example, using T1 to represent the second counting duration, the terminal device determines T1 through "T1 = t1", and updates the counting duration of the timer from the first counting duration to T1.

[0083] It can be seen that when the terminal device receives a first audio playback request during the counting period of the timer, it indicates that the request frequency for the terminal device to receive audio playback is relatively high, while the counting duration of the timer is relatively short. Then the terminal device updates the counting duration of the timer according to the request frequency of the audio playback request to extend the counting duration of the timer. This method can enable the chip device of the terminal device during a longer counting period, so that the audio can be quickly played when an audio playback request is received, thereby meeting the high timeliness requirements for the terminal device to play audio.

[0084] In an alternative implementation, the terminal device can also perform the following operations: when no audio playback request is received during the counting period of the timer, convert the enabling state of the chip device to a non-enabling state.

[0085] Optionally, the enabled state of the chip device can be understood as: the chip device is in a state where it can process audio signals, or it can be understood as: the chip device is in an on state. Optionally, the disabled state of the chip device can be understood as: the chip device is in a state where it cannot process audio signals, or it can be understood as: the chip device is in an off state.

[0086] It can be seen that when the terminal device does not receive an audio playback request during the counting period of the timer, it indicates that the frequency of receiving audio playback requests by the terminal device is relatively low. Converting the enabled state of the chip device from the enabled state to the disabled state can save the power consumption of the chip device and meet the low-power requirement for audio playback of the terminal device.

[0087] S304. When the request frequency of the terminal device is lower than the reference frequency, the chip device used for processing audio signals is not enabled.

[0088] Optionally, when the reference frequency and the request frequency are characterized by the number of audio playback requests per unit time; the request frequency being lower than the reference frequency includes: the number of requests for audio playback requests per unit time is less than the reference number of requests for audio playback requests per unit time.

[0089] Optionally, when the reference frequency and the request frequency are characterized by the average time interval of a preset number of audio playback requests; the request frequency being lower than the reference frequency includes: the average request time interval of a preset number of audio playback requests is greater than the average reference time interval of a preset number of audio playback requests.

[0090] Optionally, the terminal device not enabling the chip device used for processing audio signals can be understood as: the chip device used for processing audio signals is in a state where it cannot process audio signals; or, it can be understood as: the chip device used for processing audio signals is in an off state.

[0091] It can be seen that when the request frequency of the terminal device is lower than the reference frequency, it indicates that the frequency of receiving audio playback requests by the terminal device is relatively low. To reduce power consumption, the chip device used for processing audio signals is not enabled. Compared with the terminal device always enabling the chip device used for processing audio signals, this method can save the power consumption of the chip device and meet the low-power requirement for audio playback of the terminal device.

[0092] It can be seen that in the embodiments of the present application, when the request frequency of the audio playback request of the terminal device is higher than the reference frequency of the audio playback request, the chip device for processing the audio signal is enabled; when the request frequency of the audio playback request of the terminal device is lower than the reference frequency of the audio playback request, the chip device for processing the audio signal is not enabled. Compared with the method where the terminal device always enables the chip device for processing the audio signal, this method can meet the low-power requirement for the terminal device to play audio; compared with the method where the terminal device enables the chip device for processing the audio signal after receiving each audio playback request, this method can meet the high-timeliness requirement for the terminal device to play audio. Therefore, this method is beneficial to balancing the power consumption and timeliness of the terminal device for playing audio.

[0093] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another audio playback method provided by the embodiments of the present application. The method includes but is not limited to:

[0094] S401. The terminal device automatically generates management optimization parameters for the CODEC chip and sets the timing duration T of the timer (play-timer).

[0095] Among them, the management optimization parameter of the CODEC chip is the reference number of audio playback requests per unit time. For example, the management optimization parameter of the CODEC chip can be the reference number of audio playback requests within one minute (denoted by n).

[0096] Among them, after receiving the audio playback request, the terminal device automatically generates the management optimization parameters for the CODEC chip and sets the timing duration T of the play-timer. The terminal device can set T according to the management optimization parameters of the CODEC chip. For example, the terminal device can set T according to "T = 60 * 1000 / n".

[0097] S402. The terminal device initializes the CODEC chip.

[0098] Among them, the terminal device initializing the CODEC chip can be understood as: the terminal device turns on the CODEC chip to make the CODEC chip in a state capable of processing the audio signal.

[0099] S403. The terminal device starts playing audio.

[0100] Among them, the relevant content of S403 can be referred to the relevant description of the audio playback method shown above Figure 2 and will not be elaborated here.

[0101] S404. The terminal device determines whether the audio is successfully played.

[0102] When the terminal device determines that the audio has not been successfully played, S405 is executed; when the terminal device determines that the audio has been successfully played, S406 is executed.

[0103] S405. The terminal device determines that there is an error in audio playback and stops playing the audio.

[0104] After the terminal device executes S405, S4016 is executed.

[0105] S406. The terminal device completes audio playback.

[0106] S407. The terminal device determines the number of requests for audio playback within a unit of time.

[0107] Among them, the number of requests for audio playback can be the number of requests for audio playback within one minute (denoted by n1).

[0108] S408. The terminal device determines whether the number of requests for audio playback within a unit of time is greater than a threshold.

[0109] Among them, the threshold is the management optimization parameter of the CODEC chip proposed in S401. That the number of requests for audio playback is greater than the threshold can be understood as: n1 is greater than n.

[0110] In the embodiments of the present application, when the number of requests is greater than the threshold, the terminal device executes S409; when the number of requests is not greater than the threshold, the terminal device executes S4016. Among them, that the number of requests is not greater than the threshold includes: the number of requests is less than or equal to the threshold.

[0111] S409. The terminal device does not turn off the CODEC chip and starts a play-timer.

[0112] Among them, for the relevant content of S409, reference can be made to the relevant description of S303 above, and details will not be repeated.

[0113] S4010. The terminal device determines whether an audio playback request is received during the counting period of the timer.

[0114] When the terminal device determines that an audio playback request is received during the counting period of the timer, S4011 is executed; when the terminal device determines that no audio playback request is received during the counting period of the timer, S4014 is executed.

[0115] S4011. The terminal device turns off the play-timer.

[0116] Among them, for the relevant content of S4011, reference can be made to the relevant description of S303 above, and details will not be repeated.

[0117] S4012. The terminal device re-determines the timing duration T1 of the play-timer.

[0118] For the relevant content of S4012, refer to the relevant description of S303 above, which will not be elaborated here.

[0119] S4013. The terminal device updates the timing duration of the play-timer from T to T1.

[0120] After the terminal device executes S4013, it executes S403.

[0121] S4014. The terminal device determines whether the play-timer times out.

[0122] Among them, the terminal device determines whether the play-timer times out, which can be understood as: the terminal device determines whether the timing duration of the play-timer ends.

[0123] When the play-timer times out for the terminal device, that is, when it determines that the timing duration of the play-timer ends, it executes S4016; when the terminal device determines that the play-timer does not time out, that is, when it determines that the timing duration of the timer does not end, it executes S4015.

[0124] S4015. The terminal device waits for the play-timer to time out.

[0125] Among them, the terminal device waits for the play-timer to time out, which can be understood as: the terminal device waits for the timing duration of the play-timer to end.

[0126] After the terminal device executes S4015, it executes S4010.

[0127] S4016. The terminal device turns off the CODEC chip.

[0128] Among them, the terminal device turns off the CODEC chip, which can be understood as: the terminal device makes the CODEC chip in a state where it cannot process audio signals.

[0129] S4017. The terminal device reclaims the resources of the audio playback manager.

[0130] For the relevant content of S4017, refer to the relevant description of S8 in the Figure 2 audio playback method shown above, which will not be elaborated here.

[0131] It can be seen that, based on the relationship between the management optimization parameters of the CODEC chip and the number of requests for audio playback per unit time, and whether the terminal device receives an audio playback request during the counting period of the timer, enabling or disabling the CODEC chip helps to balance the power consumption and timeliness of audio playback on the terminal device. When the terminal device continuously receives audio playback requests, there is no need to repeatedly initialize, disable, and re-initialize the CODEC chip, which can improve the user experience of playing audio.

[0132] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of an audio playback device provided by an embodiment of the present application. The audio playback device at least includes an acquisition module 501, a determination module 502, and an enabling module 503, where:

[0133] The acquisition module 501 is configured to acquire the reference frequency of the audio playback request;

[0134] The determination module 502 is configured to determine the request frequency of the audio playback request based on at least one received audio playback request;

[0135] The enabling module 503 is configured to enable the chip device for processing the audio signal when the request frequency is higher than the reference frequency.

[0136] The enabling module 503 is further configured to disable the chip device when the request frequency is lower than the reference frequency.

[0137] In an optional implementation, the audio playback device further includes: an enabling module, configured to enable a timer, and the first counting duration of the timer is determined according to the reference frequency; a disabling module, configured to disable the timer when a first audio playback request for requesting to play a first audio signal is received during the counting period of the timer.

[0138] In an optional implementation, the audio playback device further includes: an obtaining module, configured to process the first audio signal through the chip device to obtain a second audio signal to be played; a playing module, configured to play the second audio signal.

[0139] In an optional implementation, the audio playback device further includes: an updating module, configured to update the counting duration of the timer from the first counting duration to a second counting duration according to the request frequency.

[0140] In an optional implementation, the audio playback device further includes: a conversion module, configured to convert the enabling state of the chip device to a non-enabling state when no audio playback request is received during the counting period of the timer.

[0141] In an alternative embodiment, the reference frequency and the request frequency are characterized by the number of audio playback requests within a unit time; the request frequency being higher than the reference frequency includes: the number of requests for audio playback within a unit time being greater than the reference number of requests for audio playback within a unit time.

[0142] In an alternative embodiment, the reference frequency and the request frequency are characterized by the average time interval between a preset number of audio playback requests; the request frequency being higher than the reference frequency includes: the average request time interval for a preset number of audio playback requests being less than the average reference time interval for a preset number of audio playback requests.

[0143] The embodiments of the present application and the method embodiments shown above are based on the same concept, and the technical effects brought by them are also the same. For the specific principle, please refer to the description of the embodiments shown above and will not be elaborated here.

[0144] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a module device provided by an embodiment of the present application. This module device can execute the relevant steps of the terminal device in the foregoing method embodiment. This module device includes: a communication module 601, a power module 602, a storage module 603, and a chip 604.

[0145] Among them, the power module 602 is used to supply electrical energy to the module device; the storage module 603 is used to store data and instructions; the communication module 601 is used for internal communication of the module device or for communication between the module device and external devices; the chip 604 is used to execute the method performed by the terminal device in the foregoing method embodiment.

[0146] The implementation manner of this module device can refer to the relevant content of the foregoing method embodiment and will not be elaborated here.

[0147] The embodiments of the present application and the foregoing method embodiments are based on the same concept, and the technical effects brought by them are also the same. For the specific principle, please refer to the description of the foregoing method embodiments and will not be elaborated here.

[0148] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. This computer device at least includes a processor 701, a memory 703, and a user interface 702. The processor 701, the memory 703, and the user interface 702 are interconnected. Among them, the memory 703 is used to store a computer program, and the computer program includes program instructions. The processor 701 is used to execute the program instructions.

[0149] The memory 703 may include a volatile memory, for example, a random-access memory (RAM); the memory 703 may also include a non-volatile memory, for example, a flash memory, a solid-state drive (SSD), etc.; the memory 703 may further include a combination of the above types of memories.

[0150] The processor 701 may be a central processing unit (CPU). The processor 701 may further include a hardware chip. The above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), etc. The above PLD may be a field-programmable gate array (FPGA), a generic array logic (GAL), etc.

[0151] In an alternative embodiment, the memory 703 is further configured to store program instructions. The processor 701 may call the program instructions: the processor 701 is configured to call the program instructions to perform the following steps:

[0152] Obtain a reference frequency of an audio playback request;

[0153] Based on at least one received audio playback request, determine a request frequency of the audio playback request;

[0154] When the request frequency is higher than the reference frequency, enable a chip device for processing an audio signal;

[0155] When the request frequency is lower than the reference frequency, disable the chip device.

[0156] Optionally, the processor 701 further performs the following steps: when the request frequency is higher than the reference frequency, start a timer, and a first timing duration of the timer is determined according to the reference frequency; when a first audio playback request for requesting to play a first audio signal is received during the timing period of the timer, stop the timer.

[0157] Optionally, the processor 701 further performs the following steps: process the first audio signal through the chip device to obtain a second audio signal to be played; play the second audio signal.

[0158] Optionally, the processor 701 further performs the following steps: update the timing duration of the timer from a first timing duration to a second timing duration according to the request frequency.

[0159] Optionally, the processor 701 further performs the following steps: when no audio playback request is received during the timing period of the timer, convert the enable state of the chip device to a non-enabled state.

[0160] Optionally, the reference frequency and the request frequency are characterized by the number of audio playback requests per unit time; the request frequency being higher than the reference frequency includes: the number of request times of the audio playback request per unit time being greater than the reference number of times of the audio playback request per unit time.

[0161] Optionally, the reference frequency and the request frequency are characterized by the average time interval of a preset number of audio playback requests; the request frequency being higher than the reference frequency includes: the average request time interval of a preset number of audio playback requests being less than the average reference time interval of a preset number of audio playback requests.

[0162] The embodiments of the present application and the above-described method embodiments are based on the same concept, and the technical effects brought by them are also the same. For the specific principle, please refer to the description of the above-described embodiments and will not be elaborated here.

[0163] The present application further provides a computer-readable storage medium, on which a detection program is stored. When the detection program is executed by a processor, the steps of an audio playback method in any of the above embodiments are implemented.

[0164] In the embodiments of the mobile terminal and the computer-readable storage medium provided by the present application, all the technical features of the above-described audio playback method embodiments are included. The expansion and explanation content of the specification are basically the same as those of the above method embodiments and will not be elaborated here.

[0165] The embodiments of the present application further provide a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer is caused to execute the methods in the above various possible implementation manners.

[0166] The embodiments of the present application further provide a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device installed with the chip executes the methods in the above various possible implementation manners.

[0167] The serial numbers of the above embodiments of the present application are only for description and do not represent the superiority or inferiority of the embodiments.

[0168] The steps in the method embodiments of the present application can be adjusted, combined, and deleted according to actual needs.

[0169] The units in the devices of the embodiments of this application can be combined, divided, and deleted according to actual needs.

[0170] In this application, for the description of the same or similar term concepts, technical solutions, and / or application scenarios, generally only the first occurrence is described in detail. When it appears repeatedly later, for the sake of brevity, it is generally not described again. When understanding the technical solutions of this application and other content, for the same or similar term concepts, technical solutions, and / or application scenario descriptions that are not described in detail later, reference can be made to their relevant detailed descriptions before.

[0171] In this application, the descriptions of the various embodiments each have their own emphases. For the parts not described in detail or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0172] The technical features of the technical solutions of this application can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.

[0173] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the essence of the technical solutions of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0174] 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 processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, storage disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.

[0175] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. An audio playback method, characterized in that, The method includes: Obtaining a reference frequency of an audio playback request; Determining a request frequency of the audio playback request based on at least one received audio playback request; Enabling a chip device for processing an audio signal when the request frequency is higher than the reference frequency; Disabling the chip device when the request frequency is lower than the reference frequency.

2. The method according to claim 1, characterized in that, When the request frequency is higher than the reference frequency, the method further includes: Starting a timer, where a first timing duration of the timer is determined according to the reference frequency; When a first audio playback request for requesting to play a first audio signal is received during the timing period of the timer, turning off the timer.

3. The method according to claim 2, wherein The method further includes: Processing the first audio signal through the chip device to obtain a second audio signal to be played; Playing the second audio signal.

4. The method according to claim 2 or 3, characterized in that, The method further includes: Updating the timing duration of the timer from the first timing duration to a second timing duration according to the request frequency.

5. The method according to any one of claims 2 to 4, characterized in that The method further includes: When no audio playback request is received during the timing period of the timer, converting the enabling state of the chip device to a disabling state.

6. The method according to any one of claims 1 to 5, wherein: The reference frequency and the request frequency are characterized by the number of audio playback requests per unit time; The request frequency being higher than the reference frequency includes: the number of request times of the audio playback request per unit time is greater than the reference number of times of the audio playback request per unit time.

7. The method according to any one of claims 1 to 5, wherein: The reference frequency and the request frequency are characterized by an average time interval of a preset number of audio playback requests; The request frequency being higher than the reference frequency includes: the average request time interval of the preset number of audio playback requests is less than the average reference time interval of the preset number of audio playback requests.

8. A module device, characterized in that, The module device includes a communication module, a power supply module, a storage module, and a chip, wherein: The power supply module is used to supply electrical energy to the module device; The storage module is used to store data and instructions; The communication module is used for internal communication of the module device or for communication between the module device and an external device; The chip is used to execute the method according to any one of claims 1 to 7.

9. A computer device, characterized in that, The computer device includes: a memory, a processor, wherein a computer program is stored on the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that, Computer-readable instructions are stored in the computer-readable storage medium, and when the computer-readable instructions run on an audio playback device, the audio playback device is caused to execute the method according to any one of claims 1 to 7.