Audio playing method and device, electronic equipment and storage medium
Through hierarchical energy consumption state management, the energy consumption module configuration of the audio device is dynamically adjusted, which solves the problem of balancing power consumption and discoverability of audio streaming devices in standby state and realizes low-power and efficient connection.
Patent Information
- Application Number
- CN202510514654.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-09-19
AI Technical Summary
Existing audio streaming devices cannot balance power consumption and discoverability in standby mode, resulting in power waste or connection difficulties.
By establishing hierarchical energy consumption states, including deep sleep, listening, ready, and full-featured states, adjusting the configuration parameters of energy consumption modules to detect connection requests, and dynamically switching energy consumption states to optimize power consumption and discoverability.
It achieves a significant reduction in energy consumption while maintaining device discoverability, achieving a balance between power consumption and discoverability.
Smart Images

Figure CN120676435A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of audio playback technology, and in particular to an audio playback method, device, electronic device, and storage medium. Background Art
[0002] Audio streaming devices currently on the market often exist in two extreme situations when in standby mode: either they completely turn off Bluetooth Low Energy (BLE) broadcasts to save power, forcing users to search for pairing again; or they maintain high-frequency broadcasts to maintain connections, resulting in excessive power consumption. There is a lack of audio playback technology that balances power consumption and discoverability. Summary of the Invention
[0003] In view of this, the purpose of the present disclosure is to provide an audio playback method, device, electronic device and storage medium to provide an audio playback technology that balances power consumption and discoverability.
[0004] In a first aspect, an embodiment of the present disclosure provides an audio playback method, the method comprising: when in a first energy consumption state, detecting a connection request through a first periodic frequency; when a preset energy consumption state switching condition is met, adjusting the first energy consumption state to a second energy consumption state by adjusting the configuration parameters of the energy consumption module, and detecting a connection request according to the second periodic frequency; wherein, the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; if a connection request from the requesting end is detected, the second energy consumption state is adjusted to a third energy consumption state, the basic function module is activated, and communication is established with the requesting end; wherein, the basic function module includes a communication module; in response to an audio playback instruction from the requesting end, the third energy consumption state is adjusted to a fourth energy consumption state, the audio playback module is activated, and the target audio indicated by the audio playback instruction is played.
[0005] In a second aspect, an embodiment of the present disclosure provides an audio playback device, which includes: a sleep module, which is used to detect connection requests through a first periodic frequency when in a first energy consumption state; a monitoring module, which is used to adjust the first energy consumption state to a second energy consumption state by adjusting the configuration parameters of the energy consumption module when a preset energy consumption state switching condition is met, and detect connection requests according to the second periodic frequency; wherein the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; a preparation module, which is used to adjust the second energy consumption state to a third energy consumption state if a connection request from the requesting end is detected, activate the basic function module, and establish communication with the requesting end; wherein the basic function module includes a communication module; an activation module, which is used to respond to the audio playback instruction of the requesting end, adjust the third energy consumption state to a fourth energy consumption state, activate the audio playback module, and play the target audio indicated by the audio playback instruction.
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned audio playback method.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned audio playback method.
[0008] The embodiments of the present disclosure bring the following beneficial effects:
[0009] The above-mentioned audio playback method, device, electronic device and storage medium, by establishing hierarchical energy consumption states, can significantly reduce energy consumption while maintaining the discoverability of the audio playback device, thereby achieving a balance between power consumption and discoverability.
[0010] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or understood by practicing the present disclosure. The objectives and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 This is a flow chart of an embodiment of a method for playing audio in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of an audio playback device provided in an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0017] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of the present disclosure and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0018] It should be noted that the embodiments of the present disclosure can be applied to devices with Bluetooth low energy function (hereinafter referred to as BLE devices), including but not limited to smart bracelets / smart watches, smart home devices (such as smart bulbs, smart door locks, smart switches, etc.), audio playback devices (such as wireless headphones, portable speakers, etc.), smart toys, industrial sensors and control equipment, environmental monitoring devices, vehicle-mounted equipment, etc., which can establish a connection with the requesting end through the Bluetooth low energy function and perform audio playback. The specific details are not limited here.
[0019] For ease of understanding, the specific process of the embodiment of the present disclosure is described below. Figure 1 , an embodiment of the audio playback method in the embodiment of the present disclosure includes:
[0020] Step S10: When in the first energy consumption state, detecting a connection request through a first periodic frequency;
[0021] The first energy consumption state, also known as the deep sleep state, is the state in which the BLE device consumes the lowest energy while maintaining discoverability. In the first energy consumption state, only the scheduled wake-up function with the lowest power consumption is retained, and the remaining energy-consuming modules are completely shut down, thereby achieving both discoverability and reduced power consumption.
[0022] When the BLE device is in the first energy consumption state, the scheduled wake-up function is implemented by detecting the connection request at a first periodic frequency. The first periodic frequency can be several minutes, tens of minutes, or even longer. For example, a connection request is detected every 10 minutes. The specific frequency is not limited here.
[0023] In one embodiment, a timer can be used to set the time period during which the BLE device is in the first energy consumption state. During the corresponding time period, the BLE device automatically enters the first energy consumption state and detects connection requests at a first periodic frequency. For example, the late night period can be set as a deep sleep period, causing the audio playback device to enter the first energy consumption state, allowing users to establish a connection with the audio playback device at any time while minimizing energy consumption.
[0024] In one embodiment, the period when the BLE device enters the first energy consumption state can also learn and predict the user's behavior based on historical control data, thereby dynamically generating a deep sleep period that conforms to the user's behavior habits, and then controlling the BLE device to enter the first energy consumption state during the deep sleep period through a timer, so that the audio playback device becomes smarter and the user experience is enhanced.
[0025] In one embodiment, when learning and predicting user behavior based on historical control data, control data within a certain continuous period of time can be collected first, where the control data includes: connection request time distribution, connection duration, function usage frequency, target movement pattern and distance change. Then, based on the above control data, user behavior pattern modeling is performed, and based on the modeling results, deep sleep periods that are consistent with user behavior habits are predicted to achieve more accurate prediction results.
[0026] Step S20: When a preset energy consumption state switching condition is met, the first energy consumption state is adjusted to a second energy consumption state by adjusting configuration parameters of the energy consumption module, and connection requests are detected at a second periodic frequency; wherein the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency;
[0027] The second energy consumption state, also known as the listening state, can adjust the BLE device in the first energy consumption state to the second energy consumption state when the preset energy consumption switching conditions are met, so that the frequency of detecting connection requests is increased, and it is in a more active state than the first energy consumption state. It can listen to connection requests more frequently, allowing the BLE device to respond to connection requests more quickly and enter playback.
[0028] The energy-consuming modules of a BLE device include but are not limited to a broadcast module, a clock module, a radio frequency module, a baseband processing module, a link control module, and a host interface module. In the second energy-consuming state, the BLE device maintains the minimum broadcast power of the broadcast module, the radio frequency receiver and the clock module of the radio frequency module are also in working state, and the remaining energy-consuming modules are still in the off state, so that the BLE device can respond to connection requests quickly while maintaining power consumption at a low level.
[0029] When the BLE device is in the listening state, it can send a broadcast packet through the RF module according to the second periodic frequency, where the second periodic frequency can be tens of seconds, several minutes, etc. For example, the BLE device can send a broadcast every 10 seconds to make it more active.
[0030] The second energy consumption state can achieve zero-power wake-up through external wake-up sources, such as network events, scheduled tasks, etc. That is to say, when the preset wake-up event is triggered, it can be determined that the BLE device meets the preset energy consumption state switching conditions, and the BLE device can be switched from the first energy consumption state to the second energy consumption state, achieving the effect of zero-power wake-up.
[0031] When adjusting the first energy consumption state to the second energy consumption state, it can be achieved by adjusting the configuration parameters of the energy consumption module. Specifically, the BLE receiving window can be configured to be open for the first 10ms of each second and completely closed for the remaining 990ms. By adjusting the duty cycle configuration of the RF receiver and controlling the RF frequency, the crystal oscillator accuracy configuration of the BLE device can be reduced to a preset value, for example, from ±20ppm to ±300ppm. The microcontroller (MCU) core can also be reduced to the lowest stable frequency to achieve the purpose of adjusting the energy consumption state.
[0032] Step S30: If a connection request from the requesting end is detected, the second energy consumption state is adjusted to the third energy consumption state, the basic function module is activated, and communication is established with the requesting end; wherein the basic function module includes a communication module;
[0033] If a connection request from the requesting end is detected in the second energy consumption state, the BLE device can be adjusted from the second energy consumption state to the third energy consumption state, thereby activating the basic functional modules of the BLE device and establishing communication with the requesting end. The third energy consumption state is also called the ready state, that is, the BLE is in a state ready to perform any function, for example, ready to play audio, ready to respond to configuration parameter modifications, etc., which are not limited here.
[0034] A BLE device in a ready state has its main processing unit and communication module activated. A communication stack is established with the requesting end through the communication module. Through the communication stack, the BLE device can complete data exchange with the requesting end or the data acquisition end, so that the BLE device can prepare to perform response functional processing based on the data obtained from the exchange, such as playback of streaming media such as audio and video, modification of configuration parameters, etc., which are not limited here.
[0035] In the ready state, the BLE device can start the necessary random access memory (RAM) and peripheral registers, and can accelerate the function execution response speed of the BLE device through caching, so that the BLE device does not need to enter the full function state immediately after receiving the connection request. Instead, it can further reduce energy consumption through the ready state and reduce unnecessary full function state startup.
[0036] Step S40: respond to the audio play instruction from the requesting end, adjust the third energy consumption state to the fourth energy consumption state, activate the audio play module, and play the target audio indicated by the audio play instruction.
[0037] The fourth energy consumption state, also known as the full-function state, is when the BLE device performs its functional tasks. For example, it plays audio, video and other streaming media, modifies configuration parameters and other functional tasks. In the full-function state, all / partial functional modules of the BLE device are started and can handle any business functions it has. The power consumption level of the BLE device in the fourth energy consumption state is the highest among the above-mentioned first energy consumption state, second energy consumption state and third energy consumption state.
[0038] When the requesting end triggers the audio playback instruction, the BLE device can enter the fourth energy consumption state, activate the audio playback function module, and play the target audio indicated by the audio playback instruction through the audio playback function module, so that the corresponding function module is only started when necessary, thereby reducing energy consumption.
[0039] The audio playback method provided in the above embodiment, by establishing hierarchical energy consumption states, can significantly reduce energy consumption while maintaining the discoverability of the audio playback device, thereby achieving a balance between power consumption and discoverability.
[0040] Next, the specific method of playing audio is explained.
[0041] In one embodiment, it also includes: obtaining a target time period indicated by a target timer; wherein the target time period is used to indicate a time period during which the connection probability of the audio playback device is lower than a preset probability threshold; in response to a trigger instruction that the target timer is in the target time period, switching the energy consumption state to a first energy consumption state; when in the first energy consumption state, detecting a connection request through a first periodic frequency, including: when in the first energy consumption state, turning off energy consumption modules other than the first timer; wherein the first timer is used to indicate a first periodic frequency; in response to a trigger instruction that the first timer is in the first periodic frequency, detecting a connection request.
[0042] During a period when the connection probability is lower than a preset probability threshold, the energy consumption state of the BLE device can be switched to the first energy consumption state through the target timer. In one embodiment, when the energy consumption state is switched to the first energy consumption state in response to a trigger instruction when the target timer is in the target period, the current energy consumption state can be obtained first. If the current energy consumption state is the second energy consumption state, the second energy consumption state can be switched to the first energy consumption state. If the current energy consumption state is the third energy consumption state or the fourth energy consumption state, the current energy consumption state is maintained without switching.
[0043] In one embodiment, user behavior learning and prediction can be performed based on historical control data to determine a target time period. When user behavior learning and prediction are performed based on historical control data, user behavior pattern modeling can be performed based on the historical control data. When modeling, a time series analysis algorithm, a Markov model state prediction algorithm, or a machine learning clustering algorithm can be used to construct a user behavior pattern model, and then a time period in which the connection probability is lower than a preset probability threshold is determined as the target time period based on the user behavior pattern model.
[0044] When determining the target time period, the reliability of the time period predicted by the user behavior pattern model can also be scored. If the score is greater than a certain value, the time period is used as the target time period. Otherwise, the time period configured by the user is used as the target time period to make the sleep period of the BLE device more accurate and flexible.
[0045] When performing reliability scoring, the score can be calculated using the following preset reliability scoring formula:
[0046] Reliability score = (Tr / Ts) × (1-γ × t)
[0047] Where Tr represents the number of correctly predicted connection requests within the time period predicted by the user behavior pattern model, Ts represents the total number of connection requests within the time period predicted by the user behavior pattern model, t represents the time in advance for making predictions, and γ is the time penalty coefficient to avoid making predictions too early.
[0048] In one embodiment, when a preset energy consumption state switching condition is met, the first energy consumption state is adjusted to the second energy consumption state by adjusting the configuration parameters of the energy consumption module, and the connection request is detected according to the second periodic frequency, including: when the preset energy consumption state switching condition is met, obtaining broadcast-related parameters; calculating the configuration parameters of the minimum broadcast power of the broadcast module according to the broadcast-related parameters to obtain the minimum broadcast power parameters; adjusting the configuration parameters of the broadcast module to the minimum broadcast power parameters; adjusting the configuration parameters of the energy consumption modules other than the broadcast module to the preset configuration parameters to adjust the first energy consumption state to the second energy consumption state; and detecting the connection request in response to the trigger instruction of the second timer being at the second periodic frequency.
[0049] The broadcast power (TX Power) of a BLE device refers to the RF transmit power when the BLE device sends a broadcast signal, measured in dBm (decibel milliwatts). The minimum broadcast power refers to sufficient communication power, which is the minimum RF transmit power that allows the BLE device to remain discoverable. It is related to the path loss (Path Loss), distance, and environment of communication between the requesting end. Parameters related to the path loss (Path Loss), distance, and environment of communication between the requesting end can be used as broadcast-related parameters, and the specific parameters are not limited here.
[0050] The minimum broadcast power parameter may refer to the above-mentioned minimum broadcast power, that is, the minimum radio frequency transmission power that enables the BLE device to remain discoverable. In one embodiment, the calculation formula of the minimum broadcast power parameter is:
[0051] P_rx=P_tx-(P_loss+10n×log 10 (d))
[0052] Where P_rx represents the received power of the BLE device, P_tx represents the RF transmit power of the BLE device, P_loss represents the path loss, n is the environmental attenuation coefficient, and d is the preset expected communication distance.
[0053] In one embodiment, the expected communication distance can be determined based on historical control information for the BLE device. As an example and not a limitation, the expected communication distance can be the average value of the distance between the two devices each time the requesting end sends a connection request to the BLE device in the historical control information. For example, in the past 10 days, the average distance between the user and the BLE device when the user requested to connect to the BLE device was 10 meters. Then, 10 meters can be preset as the expected communication distance for calculating the minimum broadcast power.
[0054] In one embodiment, the minimum broadcast power parameters may also include parameters such as RF transmission power, broadcast interval duration, and broadcast packet length that can reduce the power consumed by BLE devices during broadcasting. When the configuration parameters of the minimum broadcast power are calculated for the broadcast module based on the broadcast-related parameters to obtain the minimum broadcast power parameters, it includes: calculating the RF transmission power of the minimum broadcast power of the broadcast module based on the signal receiving power, path loss, environmental attenuation coefficient, and distance in the broadcast-related parameters; calculating the broadcast interval duration of the minimum broadcast power of the broadcast module based on the basic broadcast interval, user activity coefficient, user activity score, power supply coefficient, power status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters; determining the broadcast packet length of the minimum broadcast power based on the number of bytes required for the broadcast content; and obtaining the minimum power configuration parameters by combining the RF transmission power, broadcast interval duration, and broadcast packet length.
[0055] When calculating the minimum broadcast power for the broadcast module, the RF transmit power can be calculated using the formula for the minimum broadcast power parameter described above. The specifics are not detailed here. The broadcast interval, which refers to the time interval before and after a BLE device broadcasts, can be dynamically adjusted based on broadcast-related parameters to better suit user behavior.
[0056] Specifically, the broadcast interval duration for the minimum broadcast power of the broadcast module can be calculated based on the basic broadcast interval, user activity coefficient, user activity score, power coefficient, power status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters. The calculation formula is:
[0057] AT=AT_base×(1+α×U+β×B+δ×N)
[0058] Among them, AT_base is the basic broadcast interval, α is the user activity coefficient, U is the user activity score, β is the power coefficient, B is the power status parameter, δ is the environmental noise coefficient, and N is the environmental noise score.
[0059] Specifically, the basic broadcast interval is a benchmark value that can be determined based on the type of BLE device, the energy consumption target, or a preset standard reference value, which is not limited here. The user activity coefficient refers to the user's activity level during the corresponding time period, that is, the frequency with which the user requests to establish a connection with the BLE device. The user activity score refers to the confidence level in the user activity coefficient. The power coefficient is a mapping value of the current power level of the BLE device. The power status parameter is a comprehensive indicator of the current power status of the BLE device, including a comprehensive measurement of the battery health (ageing level), charging status (charging / discharging), load change trend (whether the power consumption is stable), and power quality (whether there are voltage fluctuations). The environmental noise coefficient refers to the mapping value of the environmental noise level, and the environmental noise score refers to the confidence level in the environmental noise level.
[0060] The broadcast packet length refers to the memory size occupied by the broadcast packet, which can be determined based on the number of bytes of the broadcast content. The broadcast content is compressed using a preset compression algorithm, and the resulting broadcast packet is the broadcast packet that can be used for broadcasting. The memory size occupied by the broadcast packet is the broadcast packet level with the minimum broadcast power.
[0061] For energy consumption modules other than the broadcast module, the configuration parameters of the corresponding energy consumption modules may be adjusted to corresponding preset configuration parameters, so that the energy consumption state is switched from the first energy consumption state to the second energy consumption state.
[0062] Specifically, in one embodiment, the energy-consuming modules outside the broadcast module include a radio frequency module, a baseband processing module, a link control module, and a host interface module; when adjusting the configuration parameters of the energy-consuming modules outside the broadcast module to preset configuration parameters to adjust the first energy consumption state to the second energy consumption state, it includes: adjusting the configuration parameters of the transceiver, power amplifier, and low-noise amplifier of the radio frequency module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the data packet processing unit, cyclic redundancy check unit, and encryption unit of the baseband processing module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the connection parameter management unit and the frequency hopping sequence generation unit of the link control module to the preset configuration parameters corresponding to the second energy consumption state; and adjusting the configuration parameters of the command parser and status reporting unit of the host interface module to the preset configuration parameters corresponding to the second energy consumption state.
[0063] Specifically, for the RF module, the transceiver adopts time division multiplexing by configuring parameters, and rotates between the three states of receive / send / sleep, so that the power amplifier is activated only in the transmit state, and the low-noise amplifier is activated only in the receive state, that is, the preset configuration parameters corresponding to the RF module in the second energy consumption state.
[0064] For the baseband processing module, by configuring parameters, the data packet processing unit is awakened by event-driven mode, the cyclic redundancy check (CRC) unit is awakened on demand, and the encryption unit is awakened only during the pairing phase.
[0065] In the link control module, configuration parameters are used to periodically wake up the connection parameter management unit, enabling the frequency hopping sequence generation unit to pre-calculate and cache data. In the host interface module, configuration parameters are used to enable the command parser to wake up on event triggers, enabling the status reporting unit to process data in batches. By adjusting the configuration parameters of these energy-consuming modules, BLE devices can enter a second energy-consuming state, achieving a balance between maintaining discoverability and keeping energy consumption low.
[0066] In one embodiment, if a connection request from the requesting end is detected, the second energy consumption state is adjusted to the third energy consumption state, including: if the radio frequency module in the energy consumption module receives a preamble code in the receiving window of the second periodic frequency, the preamble code is matched; if the preamble code matches successfully, the connection request is received, and the device identifier, instruction format, and suffix code of the connection request are verified to obtain a first verification result; if the first verification result is passed, the connection request is decrypted, and the decryption result is verified with a timestamp, an instruction counter, and a security check value to obtain a second verification result; if the second verification result is passed, the connection request is determined to be a legal request, and the second energy consumption state is adjusted to the third energy consumption state.
[0067] The basic format of a connection request can be: preamble (8 bits): 0xA5; device identifier (Identity document, ID) (32 bits): unique identifier; instruction code (8 bits): defines the wake-up level and operation; timestamp (32 bits): anti-replay attack; security check (32 bits): Hash-based Message Authentication Code (HMAC) or digital signature; suffix code (8 bits): 0x5A.
[0068] If the radio frequency module in the energy consumption module receives the preamble code when the receiving window of the second cycle frequency is open, the preamble code can be matched. If the preamble code matches successfully, the connection request is accepted, and then the device ID is checked for matching, the format of the instruction code is verified to be complete, and the validity of the suffix code is confirmed. If the device ID matches, the format of the instruction code is complete, and the suffix code is valid, the first verification result obtained is passed, otherwise it is failed.
[0069] Next, security verification is performed, the content of the request instruction is decrypted, the validity of the timestamp in the decryption result is verified, the incrementality of the instruction counter is checked, and the calculated and compared security verification value meets the preset conditions. If the timestamp is valid, the instruction counter is incremental, and the calculated security verification value meets the preset conditions, the second verification result obtained is passed, the connection request is a legal request, and the second energy consumption state can be adjusted to the third energy consumption state for subsequent function control of the BLE device.
[0070] Frequent switching between different energy states causes circuit loads to change rapidly. Without proper energy buffering, this can lead to voltage instability, causing system resets or malfunctions. Therefore, in one embodiment, an energy buffering mechanism is used to switch between energy states when switching from any energy state to another, preventing voltage fluctuations caused by frequent energy state switching.
[0071] In one embodiment, when switching the energy consumption state, the method includes: performing energy buffering startup on the energy consumption modules to be started / shut down according to a preset startup sequence and startup time interval to switch the energy consumption state.
[0072] In this embodiment, a soft start mechanism is used to enable each functional module to start gradually in a preset order and time interval to avoid voltage drops caused by instantaneous large currents. Before the energy consumption state is switched, the functional module to be started can also be pre-charged to ensure the power supply stability of key circuits. Dynamic power management can also be introduced to increase the power output capacity before switching the energy consumption state, and then perform the switching operation, so that the energy is increased or decreased in a buffered manner, thereby increasing the service life of the BLE device.
[0073] Corresponding to the above method embodiment, see Figure 2 A schematic diagram of an audio playback device is shown, which includes: a sleep module 22, which is used to detect connection requests through a first periodic frequency when in a first energy consumption state; a monitoring module 24, which is used to adjust the first energy consumption state to a second energy consumption state by adjusting the configuration parameters of the energy consumption module when a preset energy consumption state switching condition is met, and detect connection requests according to the second periodic frequency; wherein the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; a preparation module 26, which is used to adjust the second energy consumption state to a third energy consumption state if a connection request from a requesting end is detected, activate the basic function module, and establish communication with the requesting end; wherein the basic function module includes a communication module; an activation module 28, which is used to respond to an audio playback instruction from the requesting end, adjust the third energy consumption state to a fourth energy consumption state, activate the audio playback module, and play the target audio indicated by the audio playback instruction.
[0074] The above-mentioned audio playback device, by establishing a hierarchical energy consumption state, can significantly reduce energy consumption while maintaining the discoverability of the audio playback device, thereby achieving a balance between power consumption and discoverability.
[0075] Optionally, the above-mentioned device also includes: an acquisition module, used to obtain a target time period indicated by a target timer; wherein, the target time period is used to indicate a time period in which the connection probability of the audio playback device is lower than a preset probability threshold; a switching module, used to switch the energy consumption state to a first energy consumption state in response to a trigger instruction that the target timer is in the target time period; the above-mentioned sleep module 22 is also used to: when in the first energy consumption state, turn off energy consumption modules other than the first timer; wherein, the first timer is used to indicate a first cycle frequency; and detect a connection request in response to a trigger instruction that the first timer is in the first cycle frequency.
[0076] Optionally, the above-mentioned monitoring module 24 includes: an acquisition unit, used to obtain broadcast-related parameters when the preset energy consumption state switching conditions are met; a calculation unit, used to calculate the configuration parameters of the minimum broadcast power of the broadcast module based on the broadcast-related parameters to obtain the minimum broadcast power parameters; an adjustment unit, used to adjust the configuration parameters of the broadcast module to the minimum broadcast power parameters; a switching unit, used to adjust the configuration parameters of the energy consumption module other than the broadcast module to the preset configuration parameters to adjust the first energy consumption state to the second energy consumption state; a detection unit, used to detect a connection request in response to a trigger instruction of the second timer being at a second periodic frequency.
[0077] Optionally, the configuration parameters of the minimum broadcast power include RF transmission power, broadcast interval duration, and broadcast packet length; the above-mentioned calculation unit is specifically used to: calculate the RF transmission power of the minimum broadcast power of the broadcast module based on the signal receiving power, path loss, environmental attenuation coefficient, and expected communication distance in the broadcast-related parameters; calculate the broadcast interval duration of the minimum broadcast power of the broadcast module based on the basic broadcast interval, user activity coefficient, user activity score, power coefficient, power status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters; determine the broadcast packet length of the minimum broadcast power based on the number of bytes required for the broadcast content; and obtain the minimum power configuration parameters in combination with the RF transmission power, the broadcast interval duration, and the broadcast packet length.
[0078] Optionally, the energy consumption modules other than the broadcast module include a radio frequency module, a baseband processing module, a link control module, and a host interface module; the above-mentioned switching unit is specifically used to: adjust the configuration parameters of the transceiver, power amplifier, and low noise amplifier of the radio frequency module to the preset configuration parameters corresponding to the second energy consumption state; adjust the configuration parameters of the data packet processing unit, cyclic redundancy check unit, and encryption unit of the baseband processing module to the preset configuration parameters corresponding to the second energy consumption state; adjust the configuration parameters of the connection parameter management unit and the frequency hopping sequence generation unit of the link control module to the preset configuration parameters corresponding to the second energy consumption state; adjust the configuration parameters of the command parser and status reporting unit of the host interface module to the preset configuration parameters corresponding to the second energy consumption state.
[0079] Optionally, the above-mentioned preparation module 26 is specifically used to: if the radio frequency module in the energy consumption module receives a preamble code in the receiving window of the second periodic frequency, then match the preamble code; if the preamble code matches successfully, then receive a connection request, perform device identifier, instruction format, and suffix code verification on the connection request, and obtain a first verification result; if the first verification result is passed, then decrypt the connection request, and perform timestamp, instruction counter, and security check value verification on the decryption result to obtain a second verification result; if the second verification result is passed, then determine that the connection request is a legal request, and adjust the second energy consumption state to the third energy consumption state.
[0080] Optionally, when switching the energy consumption state, the method includes: performing energy buffering startup on the energy consumption modules to be started / shut down according to a preset startup sequence and startup time interval to switch the energy consumption state.
[0081] This embodiment further provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned audio playback method. The electronic device can be a server or a terminal device.
[0082] See also Figure 3 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine executable instructions that can be executed by the processor 100. The processor 100 executes the machine executable instructions to implement the above audio playback method.
[0083] Furthermore, Figure 3 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0084] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0085] The processor 100 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 100 or by instructions in the form of software. The above-mentioned processor 100 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register, which is well-known in the art. The storage medium is located in the memory 101. The processor 100 reads the information in the memory 101 and, in conjunction with its hardware, performs the steps of the method of the aforementioned embodiment, for example:
[0086] When in the first energy consumption state, the connection request is detected through the first periodic frequency; when the preset energy consumption state switching condition is met, the first energy consumption state is adjusted to the second energy consumption state by adjusting the configuration parameters of the energy consumption module, and the connection request is detected according to the second periodic frequency; wherein, the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; if a connection request from the requesting end is detected, the second energy consumption state is adjusted to the third energy consumption state, the basic function module is activated, and communication is established with the requesting end; wherein, the basic function module includes a communication module; in response to the audio playback instruction of the requesting end, the third energy consumption state is adjusted to the fourth energy consumption state, the audio playback module is activated, and the target audio indicated by the audio playback instruction is played.
[0087] In this way, by establishing hierarchical energy consumption states, the energy consumption of the audio playback device can be significantly reduced while maintaining its discoverability, thereby achieving a balance between power consumption and discoverability.
[0088] Optionally, the method further includes: obtaining a target time period indicated by a target timer; wherein the target time period is used to indicate a time period in which the connection probability of the audio playback device is lower than a preset probability threshold; in response to a trigger instruction that the target timer is in the target time period, switching the energy consumption state to a first energy consumption state; when in the first energy consumption state, detecting a connection request through a first periodic frequency, comprising: when in the first energy consumption state, turning off energy consumption modules other than the first timer; wherein the first timer is used to indicate a first periodic frequency; and detecting a connection request in response to a trigger instruction that the first timer is in the first periodic frequency.
[0089] Optionally, when the preset energy consumption state switching conditions are met, the first energy consumption state is adjusted to the second energy consumption state by adjusting the configuration parameters of the energy consumption module, and the step of detecting the connection request according to the second periodic frequency includes: when the preset energy consumption state switching conditions are met, obtaining broadcast-related parameters; calculating the configuration parameters of the minimum broadcast power of the broadcast module according to the broadcast-related parameters to obtain the minimum broadcast power parameters; adjusting the configuration parameters of the broadcast module to the minimum broadcast power parameters; adjusting the configuration parameters of the energy consumption modules other than the broadcast module to the preset configuration parameters to adjust the first energy consumption state to the second energy consumption state; and detecting the connection request in response to the trigger instruction of the second timer being at the second periodic frequency.
[0090] Optionally, the configuration parameters of the minimum broadcast power include radio frequency transmission power, broadcast interval duration, and broadcast packet length; the configuration parameters of the minimum broadcast power are calculated for the broadcast module based on the broadcast-related parameters, and the steps of obtaining the minimum broadcast power parameters include: calculating the radio frequency transmission power of the minimum broadcast power for the broadcast module based on the signal receiving power, path loss, environmental attenuation coefficient, and expected communication distance in the broadcast-related parameters; calculating the broadcast interval duration of the minimum broadcast power for the broadcast module based on the basic broadcast interval, user activity coefficient, user activity score, power supply coefficient, power supply status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters; determining the broadcast packet length of the minimum broadcast power based on the number of bytes required for the broadcast content; and obtaining the minimum power configuration parameters in combination with the radio frequency transmission power, the broadcast interval duration, and the broadcast packet length.
[0091] Optionally, the energy-consuming modules outside the broadcast module include a radio frequency module, a baseband processing module, a link control module, and a host interface module; the step of adjusting the configuration parameters of the energy-consuming modules outside the broadcast module to preset configuration parameters to adjust the first energy consumption state to the second energy consumption state includes: adjusting the configuration parameters of the transceiver, power amplifier, and low-noise amplifier of the radio frequency module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the data packet processing unit, cyclic redundancy check unit, and encryption unit of the baseband processing module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the connection parameter management unit and the frequency hopping sequence generation unit of the link control module to the preset configuration parameters corresponding to the second energy consumption state; and adjusting the configuration parameters of the command parser and status reporting unit of the host interface module to the preset configuration parameters corresponding to the second energy consumption state.
[0092] Optionally, if a connection request from the requesting end is detected, the step of adjusting the second energy consumption state to the third energy consumption state includes: if the radio frequency module in the energy consumption module receives a preamble code in the receiving window of the second periodic frequency, matching the preamble code; if the preamble code matches successfully, receiving the connection request, performing device identifier, instruction format, and suffix code verification on the connection request, and obtaining a first verification result; if the first verification result is passed, decrypting the connection request, and verifying the decryption result with a timestamp, instruction counter, and security check value to obtain a second verification result; if the second verification result is passed, determining that the connection request is a legal request, and adjusting the second energy consumption state to the third energy consumption state.
[0093] Optionally, when switching the energy consumption state, the method includes: performing energy buffering startup on the energy consumption modules to be started / shut down according to a preset startup sequence and startup time interval to switch the energy consumption state.
[0094] This embodiment further provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned audio playback method, for example:
[0095] When in the first energy consumption state, the connection request is detected through the first periodic frequency; when the preset energy consumption state switching condition is met, the first energy consumption state is adjusted to the second energy consumption state by adjusting the configuration parameters of the energy consumption module, and the connection request is detected according to the second periodic frequency; wherein, the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; if a connection request from the requesting end is detected, the second energy consumption state is adjusted to the third energy consumption state, the basic function module is activated, and communication is established with the requesting end; wherein, the basic function module includes a communication module; in response to the audio playback instruction of the requesting end, the third energy consumption state is adjusted to the fourth energy consumption state, the audio playback module is activated, and the target audio indicated by the audio playback instruction is played.
[0096] In this way, by establishing hierarchical energy consumption states, the energy consumption of the audio playback device can be significantly reduced while maintaining its discoverability, thereby achieving a balance between power consumption and discoverability.
[0097] Optionally, the method further includes: obtaining a target time period indicated by a target timer; wherein the target time period is used to indicate a time period in which the connection probability of the audio playback device is lower than a preset probability threshold; in response to a trigger instruction that the target timer is in the target time period, switching the energy consumption state to a first energy consumption state; when in the first energy consumption state, detecting a connection request through a first periodic frequency, comprising: when in the first energy consumption state, turning off energy consumption modules other than the first timer; wherein the first timer is used to indicate a first periodic frequency; and detecting a connection request in response to a trigger instruction that the first timer is in the first periodic frequency.
[0098] Optionally, when the preset energy consumption state switching conditions are met, the first energy consumption state is adjusted to the second energy consumption state by adjusting the configuration parameters of the energy consumption module, and the step of detecting the connection request according to the second periodic frequency includes: when the preset energy consumption state switching conditions are met, obtaining broadcast-related parameters; calculating the configuration parameters of the minimum broadcast power of the broadcast module according to the broadcast-related parameters to obtain the minimum broadcast power parameters; adjusting the configuration parameters of the broadcast module to the minimum broadcast power parameters; adjusting the configuration parameters of the energy consumption modules other than the broadcast module to the preset configuration parameters to adjust the first energy consumption state to the second energy consumption state; and detecting the connection request in response to the trigger instruction of the second timer being at the second periodic frequency.
[0099] Optionally, the configuration parameters of the minimum broadcast power include radio frequency transmission power, broadcast interval duration, and broadcast packet length; the configuration parameters of the minimum broadcast power are calculated for the broadcast module based on the broadcast-related parameters, and the steps of obtaining the minimum broadcast power parameters include: calculating the radio frequency transmission power of the minimum broadcast power for the broadcast module based on the signal receiving power, path loss, environmental attenuation coefficient, and expected communication distance in the broadcast-related parameters; calculating the broadcast interval duration of the minimum broadcast power for the broadcast module based on the basic broadcast interval, user activity coefficient, user activity score, power supply coefficient, power supply status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters; determining the broadcast packet length of the minimum broadcast power based on the number of bytes required for the broadcast content; and obtaining the minimum power configuration parameters in combination with the radio frequency transmission power, the broadcast interval duration, and the broadcast packet length.
[0100] Optionally, the energy-consuming modules outside the broadcast module include a radio frequency module, a baseband processing module, a link control module, and a host interface module; the step of adjusting the configuration parameters of the energy-consuming modules outside the broadcast module to preset configuration parameters to adjust the first energy consumption state to the second energy consumption state includes: adjusting the configuration parameters of the transceiver, power amplifier, and low-noise amplifier of the radio frequency module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the data packet processing unit, cyclic redundancy check unit, and encryption unit of the baseband processing module to the preset configuration parameters corresponding to the second energy consumption state; adjusting the configuration parameters of the connection parameter management unit and the frequency hopping sequence generation unit of the link control module to the preset configuration parameters corresponding to the second energy consumption state; and adjusting the configuration parameters of the command parser and status reporting unit of the host interface module to the preset configuration parameters corresponding to the second energy consumption state.
[0101] Optionally, if a connection request from the requesting end is detected, the step of adjusting the second energy consumption state to the third energy consumption state includes: if the radio frequency module in the energy consumption module receives a preamble code in the receiving window of the second periodic frequency, matching the preamble code; if the preamble code matches successfully, receiving the connection request, performing device identifier, instruction format, and suffix code verification on the connection request, and obtaining a first verification result; if the first verification result is passed, decrypting the connection request, and verifying the decryption result with a timestamp, instruction counter, and security check value to obtain a second verification result; if the second verification result is passed, determining that the connection request is a legal request, and adjusting the second energy consumption state to the third energy consumption state.
[0102] Optionally, when switching the energy consumption state, the method includes: performing energy buffering startup on the energy consumption modules to be started / shut down according to a preset startup sequence and startup time interval to switch the energy consumption state.
[0103] The audio playback method, device, electronic device, and computer program product of the storage medium provided in the embodiments of the present disclosure include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.
[0104] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0105] In addition, in the description of the embodiments of the present disclosure, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present disclosure based on the specific circumstances.
[0106] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0107] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate the description of this disclosure and simplify the description. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0108] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A method for playing audio, characterized in that: The method comprises: When in the first energy consumption state, detecting a connection request through a first periodic frequency; When a preset energy consumption state switching condition is met, the first energy consumption state is adjusted to a second energy consumption state by adjusting configuration parameters of the energy consumption module, and connection requests are detected at a second periodic frequency; wherein the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; If a connection request from the requesting end is detected, the second energy consumption state is adjusted to a third energy consumption state, a basic function module is activated, and communication is established with the requesting end; wherein the basic function module includes a communication module; In response to the audio playback instruction of the requesting end, the third energy consumption state is adjusted to the fourth energy consumption state, the audio playback module is activated, and the target audio indicated by the audio playback instruction is played.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a target time period indicated by a target timer; wherein the target time period is used to indicate a time period during which the connection probability of the audio playback device is lower than a preset probability threshold; In response to a trigger instruction indicating that the target timer is in the target time period, switching the energy consumption state to a first energy consumption state; When in the first energy consumption state, the step of detecting a connection request using a first periodic frequency includes: When in the first energy consumption state, turning off energy consumption modules except a first timer; wherein the first timer is used to indicate a first cycle frequency; In response to a trigger instruction that the first timer is at the first period frequency, a connection request is detected.
3. The method according to claim 1, characterized in that When a preset energy consumption state switching condition is met, the step of adjusting the first energy consumption state to the second energy consumption state by adjusting the configuration parameters of the energy consumption module and detecting the connection request according to the second periodic frequency includes: When the preset energy consumption state switching conditions are met, the broadcast related parameters are obtained; Calculating the configuration parameters of the minimum broadcast power of the broadcast module according to the broadcast-related parameters to obtain the minimum broadcast power parameters; Adjusting the configuration parameters of the broadcast module to the minimum broadcast power parameters; Adjusting the configuration parameters of the energy consumption modules other than the broadcast module to preset configuration parameters, so as to adjust the first energy consumption state to a second energy consumption state; In response to a trigger instruction that the second timer is at a second period frequency, a connection request is detected.
4. The method according to claim 3, characterized in that The configuration parameters of the minimum broadcast power include RF transmission power, broadcast interval duration, and broadcast packet length; The step of calculating the configuration parameters of the minimum broadcast power of the broadcast module according to the broadcast-related parameters to obtain the minimum broadcast power parameters includes: Calculate the minimum radio frequency transmission power for the broadcast module based on the signal receiving power, path loss, environmental attenuation coefficient, and expected communication distance in the broadcast-related parameters; Calculate the broadcast interval duration of the minimum broadcast power for the broadcast module based on the basic broadcast interval, user activity coefficient, user activity score, power coefficient, power status parameter, environmental noise coefficient, and environmental noise score in the broadcast-related parameters; Determine the broadcast packet length with minimum broadcast power based on the number of bytes required for the broadcast content; A minimum power configuration parameter is obtained by combining the radio frequency transmission power, the broadcast interval duration, and the broadcast packet length.
5. The method according to claim 3, characterized in that The energy consumption modules other than the broadcast module include a radio frequency module, a baseband processing module, a link control module, and a host interface module; The step of adjusting the configuration parameters of the energy consumption modules other than the broadcast module to preset configuration parameters to adjust the first energy consumption state to the second energy consumption state includes: Adjusting the configuration parameters of the transceiver, power amplifier, and low noise amplifier of the radio frequency module to preset configuration parameters corresponding to the second energy consumption state; Adjusting the configuration parameters of the data packet processing unit, the cyclic redundancy check unit, and the encryption unit of the baseband processing module to the preset configuration parameters corresponding to the second energy consumption state; Adjusting the configuration parameters of the connection parameter management unit and the frequency hopping sequence generation unit of the link control module to preset configuration parameters corresponding to the second energy consumption state; The configuration parameters of the command parser and the status reporting unit of the host interface module are adjusted to preset configuration parameters corresponding to the second energy consumption state.
6. The method according to claim 1, characterized in that If a connection request from the requesting end is detected, the step of adjusting the second energy consumption state to a third energy consumption state includes: If the radio frequency module in the energy consumption module receives a preamble code in the receiving window of the second periodic frequency, matching the preamble code; If the preamble matches successfully, receiving a connection request, performing device identifier, instruction format, and suffix code verification on the connection request, and obtaining a first verification result; If the first verification result is passed, decrypt the connection request, verify the decryption result using a timestamp, an instruction counter, and a security check value to obtain a second verification result; If the second verification result is passed, the connection request is determined to be a legal request, and the second energy consumption state is adjusted to a third energy consumption state.
7. The method according to claim 1, characterized in that When switching energy consumption states, it includes: According to the preset startup sequence and startup time interval, the energy consumption modules that need to be started / shut down are started in an energy buffering manner to switch the energy consumption state.
8. An audio playback device, characterized in that: The device comprises: a sleep module, configured to detect a connection request at a first periodic frequency when in a first energy consumption state; a monitoring module, configured to, when a preset energy consumption state switching condition is met, adjust the configuration parameters of the energy consumption module to adjust the first energy consumption state to a second energy consumption state, and detect connection requests at a second periodic frequency; wherein the energy consumption module includes at least one module that needs to consume energy, and the second periodic frequency is greater than the first periodic frequency; a preparation module, configured to, upon detecting a connection request from a requesting end, adjust the second energy consumption state to a third energy consumption state, activate a basic function module, and establish communication with the requesting end; wherein the basic function module includes a communication module; The activation module is used to respond to the audio playback instruction of the request end, adjust the third energy consumption state to the fourth energy consumption state, activate the audio playback module, and play the target audio indicated by the audio playback instruction.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the audio playing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the audio playback method according to any one of claims 1 to 7.