Resource plan switching method and device, electronic equipment and readable storage medium

By collecting and analyzing multi-dimensional feature time-series data of satellite speakers, candidate resource plans are generated and switched to the optimal resource plan, which solves the problem of inconsistent audio synchronization in multi-device home theater systems and improves the stability and consistency of audio synchronization.

CN123145652APending Publication Date: 2026-11-20MALANSHAN AUDIO & VIDEO LABORATORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611511401.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing multi-device home theater systems, the audio synchronization between the main control device and satellite speakers is poor, mainly due to interference from the 2.4 GHz band shared by Wi-Fi and other devices, which causes link errors, packet loss, and unstable latency. Existing adaptive frequency hopping and rate adaptation mechanisms are difficult to effectively deal with interference, resulting in inconsistent audio synchronization.

Method used

By collecting multi-dimensional feature time-series data of satellite speakers, performing exponential moving average calculations, obtaining group risk values, determining the operating status based on group risk values ​​and hard trigger conditions, generating candidate resource plans, and switching to the optimal resource plan when both become effective, the stable synchronization of the audio group is ensured.

Benefits of technology

It improves the audio synchronization between the main control device and the satellite speakers, reduces link errors and latency instability, and ensures consistent playback time for each channel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145652A_ABST
    Figure CN123145652A_ABST
Patent Text Reader

Abstract

The application provides a resource plan switching method and device, electronic equipment and a readable storage medium, and belongs to the technical field of audio. The method comprises the following steps: acquiring multi-dimensional feature time sequence data of each satellite sound box in a collection period, and performing exponential moving average calculation according to the multi-dimensional feature time sequence data; acquiring a group risk value of a synchronous audio group according to the moving average value, and determining an operation state of the synchronous audio group; if the operation state is a pre-warning state or a high-risk state, generating a candidate resource plan according to a candidate performance gear, and determining an optimal resource plan from the candidate resource plan according to a constraint condition and a scoring rule; acquiring a common effective time, broadcasting a plan after confirmation of a key satellite sound box, switching, by a master control device and each satellite sound box, to an optimal resource plan corresponding to a resource plan version number at the common effective time, so that the master control device and the satellite sound box can be switched to the optimal resource plan at the common effective time, and the audio synchronization effect between the master control device and the satellite sound box is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio technology, and in particular to a resource plan switching method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] Existing multi-device home theater systems consist of a fixed master control device (such as a soundbar) and multiple satellite speakers. The master control device synchronously transmits multiple audio streams to each satellite speaker via a short-range wireless link. Unlike data services, synchronous audio requires not only high throughput but also stable end-to-end latency and consistent playback time for each channel. These links often operate in the 2.4 GHz band shared by devices such as Wi-Fi and Bluetooth. Co-channel interference can cause link errors, packet loss, retransmissions, and increased tail latency, resulting in popping sounds, frame drops, or channel desynchronization.

[0003] Existing mechanisms such as Adaptive Frequency Hopping (AFH) and Autorate passively adjust based on single instantaneous indicators like RSSI and packet loss rate. When applied to multi-speaker synchronized audio groups, these mechanisms have the following limitations: difficulty in distinguishing short-term fluctuations and predictable interference occurring with the Wi-Fi duty cycle; adjustments only for the worst-case link can disrupt the overall audio buffer and playback synchronization baseline; resource or performance level changes lack a common effective time, confirmation, and timeout fallback mechanism, leading to inconsistencies in terminal parameters; and channel map updates and fixed frequency hopping increments are internal mechanisms of each protocol and cannot be modified or applied to the satellite radio interface. Therefore, existing technologies suffer from poor audio synchronization between the master control device and satellite speakers. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a resource plan switching method, apparatus, electronic device, and readable storage medium.

[0005] In a first aspect, the present invention provides a resource plan switching method, applied to a master control device, wherein the master control device and multiple satellite speakers constitute a synchronized audio group, the method comprising: Multidimensional feature time-series data of each satellite speaker are acquired at the acquisition cycle, and exponential moving average is calculated based on the multidimensional feature time-series data to obtain the moving average value. Based on the moving average value, obtain the group risk value of the synchronized audio group, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition; If the synchronous audio group is in a warning state or a high-risk state, then a candidate resource plan is generated based on the candidate performance level, and the optimal resource plan is determined from the candidate resource plan according to the constraints and scoring rules. A plan preparation message is broadcast to the satellite speakers, and a plan readiness confirmation is obtained from the satellite speakers. The plan readiness confirmation is obtained based on the plan preparation message. A common effective time is obtained. After the key satellite speakers confirm, the plan is broadcast and submitted. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

[0006] In an optional implementation, the step of calculating the exponential moving average based on multidimensional feature time-series data to obtain the moving average includes: The multidimensional feature time series data is normalized to obtain normalized feature data; The normalized feature data are subjected to exponential moving average calculations to obtain the moving average values.

[0007] In an optional implementation, the moving average includes a moving average of the error rate and a moving average of the missing rate; The step of obtaining the group risk value of the synchronized audio group based on the moving average includes: Based on the moving average of the packet error rate, the moving average of the packet loss rate, the number of retransmissions, the buffer risk item, and the single-link synchronization deviation risk item, calculate the single-link risk value for each satellite speaker in the future planning window. Based on the maximum value of each single-link risk value, the bandwidth risk flag, and the group synchronization risk flag, calculate the group risk value. The operating states include stable state, early warning state, and high-risk state. Determining the operating state of the synchronized audio group based on the group risk value and hard triggering conditions includes: If the group risk value is less than the first preset threshold and does not meet the hard trigger condition, it is determined to be a stable state; If, within a first preset number of consecutive collection cycles, the group risk value is greater than or equal to the first preset threshold and the group risk value is less than or equal to the second preset threshold, then it is determined to be a warning state. If the group risk value is greater than the second preset threshold, or if the hard trigger condition is met, then it is determined to be a high-risk state; The hard triggering conditions include the following: Audio underload occurs in any critical channel; The error rate for the second consecutive preset number of collection cycles is greater than or equal to a preset percentage threshold. No status report was received from the satellite speaker for the third consecutive preset number of data collection cycles; The synchronization deviation is greater than or equal to the synchronization deviation threshold.

[0008] In an optional implementation, generating a candidate resource plan based on the candidate performance tier includes: The physical layer nominal rate is obtained from the available rate table in the protocol stack based on the candidate performance rate; The effective load efficiency is obtained based on the historical statistics of the candidate performance levels. The available capacity of the candidate performance tiers is calculated based on the physical layer nominal rate, the payload efficiency, reserved bandwidth, synchronization-related overhead, and reserved capacity. Calculate the budget usage for each independent audio stream, and calculate the total budget usage based on the budget usage of each independent audio stream, the protocol encapsulation factor, and the retransmission reservation ratio; The difference between the available capacity of the candidate performance level and the total budget usage is taken as the remaining bandwidth of the candidate plan. When the preset screening conditions are met, the candidate resource plan is determined; The preset filtering conditions include: The remaining bandwidth of the candidate plan is greater than or equal to the target value, which is the larger of a first threshold determined according to a preset ratio and the available capacity of the candidate performance level, and a preset absolute threshold. In each acquisition cycle, the single-link risk value of all critical satellite speakers is less than the first preset risk value and does not meet the hard trigger condition; The predicted delivery rate is greater than or equal to the lower limit of the delivery rate. Predicted tail latency is less than or equal to the latency upper limit; The current planned stay duration is greater than or equal to the minimum stay duration, and there exists one of the hard trigger conditions that are met; All satellite speakers declare support for the aforementioned candidate performance levels and redundancy parameters.

[0009] In an optional implementation, determining the optimal resource plan from the candidate resource plans based on constraints and scoring rules includes: The score for each candidate resource plan is calculated based on the predicted delivery rate, the first weight, the predicted tail delay, the second weight, the switching cost, the third weight, the synchronization disturbance risk, and the fourth weight. The candidate resource plan that satisfies the constraints and has the highest score is selected as the optimal resource plan. The constraints include: The sum of all audio bitrates and redundancy overhead corresponding to each candidate resource plan is less than or equal to the available capacity of each candidate resource plan. The difference between the time of joint effectiveness and the current time is greater than or equal to the safety window; The method further includes; If no candidate resource plan meets the constraints, a backup resource plan is selected or the coding bitrate of non-critical channels is reduced.

[0010] In an optional implementation, obtaining the common effective time includes: The minimum time interval is obtained by summing the actual maximum round-trip time of the plan preparation message, the plan readiness confirmation, and the plan submission, converting the time to the preset beat length and rounding it up, adding the preset buffer beat number, and taking the larger of the preset beat number lower limit. Based on the product of the beat period of the fine synchronization time axis and the minimum time interval, and the current synchronization time, a target time value is determined, and the target time value is aligned with the fine synchronization time axis to obtain the common effective time.

[0011] In an optional implementation, the method further includes: Store the current resource plan and the backup resource plan; When any of the following rollback conditions occur, a rollback operation is performed, and the rollback operation carries the future effective time. At the future effective time, the main control device and each of the satellite speakers will switch to the minimum resource plan. Set the minimum dwell time, upshift / downshift hysteresis threshold, and maximum number of switches per unit time; If the hard trigger condition is met, downshifting will be performed immediately; If the actual dwell time is equal to the minimum dwell time, the actual group risk value is less than the first risk threshold, the actual bandwidth margin is greater than the absolute lower limit of the bandwidth margin, there is no audio underload, and upgrade processing is performed. Once the number of handovers per unit time reaches the handover limit, maintain the minimum resource plan and report link quality anomalies. The rollback conditions include: If any key channel experiences an audio underload within the verification window, or if the error rate for the fourth consecutive preset number of acquisition cycles exceeds the rollback error rate threshold; After the current plan takes effect, the group risk value for the fourth consecutive preset number of collection cycles is greater than or equal to the second risk threshold; The following are possible reasons: the critical satellite speaker is not confirmed; the actual application resource plan version number is inconsistent with the submitted plan version number; or the satellite speaker is out of contact during the verification window. The absolute value of the playback synchronization deviation of any key satellite speaker is greater than or equal to the synchronization deviation threshold; The actual bandwidth margin is less than zero, or the actual bandwidth margin is lower than the absolute lower limit threshold of the bandwidth margin for the fifth consecutive preset number of collection cycles.

[0012] Secondly, the present invention provides a resource plan switching device applied to a main control device, wherein the main control device and multiple satellite speakers constitute a synchronized audio group, the device comprising: The acquisition module is used to acquire multi-dimensional feature time-series data of each satellite speaker at the acquisition cycle, and to calculate the exponential moving average based on the multi-dimensional feature time-series data to obtain the moving average value. The determination module is used to obtain the group risk value of the synchronized audio group based on the moving average value, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition; The generation module is used to generate candidate resource plans based on candidate performance levels if the operating status of the synchronized audio group is a warning state or a high-risk state, and to determine the optimal resource plan from the candidate resource plans according to the constraints and scoring rules. The switching module is used to broadcast a plan preparation message to the satellite speakers, obtain a plan readiness confirmation returned by the satellite speakers (the plan readiness confirmation is obtained based on the plan preparation message), obtain a common effective time, and broadcast a plan submission after the key satellite speakers confirm the plan. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

[0013] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the resource plan switching method described in any of the foregoing embodiments when the processor is running.

[0014] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when run on a processor, executes the resource plan switching method described in any of the foregoing embodiments.

[0015] The resource plan switching method provided in this application acquires multi-dimensional feature time-series data of each satellite speaker during the acquisition cycle, calculates an exponential moving average based on the multi-dimensional feature time-series data, and obtains the moving average value respectively; based on the moving average value, the group risk value of the synchronous audio group is obtained, and the operating status of the synchronous audio group is determined based on the group risk value and hard trigger conditions; if the operating status of the synchronous audio group is a warning state or a high-risk state, a candidate resource plan is generated based on the candidate performance level, and the optimal resource plan is determined from the candidate resource plans based on the constraints and scoring rules; a plan preparation message is broadcast to the satellite speakers, and a plan readiness confirmation is obtained from the satellite speakers, the plan readiness confirmation is obtained based on the plan preparation message, and a common effective time is obtained; when the key satellite speakers are confirmed, the plan is broadcast for submission, the plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan, and the main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time, so that the main control device and the satellite speakers can switch to the optimal resource plan at the common effective time, thereby improving the audio synchronization effect between the main control device and the satellite speakers. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be considered as a limitation on the scope of protection of this application. In the various drawings, similar components are numbered similarly.

[0017] Figure 1 A schematic diagram of the structure of a synchronized audio group provided in this application is shown; Figure 2 A flowchart illustrating the resource plan switching method provided in this application is shown; Figure 3 Another flowchart illustrating the resource plan switching method provided in this application is shown; Figure 4 This paper illustrates another flowchart of the resource plan switching method provided in this application; Figure 5 This paper illustrates another flowchart of the resource plan switching method provided in this application; Figure 6 A schematic diagram of the resource plan switching device provided in this application is shown.

[0018] Icons: 100 - Main control device, 210 - First satellite speaker, 220 - Second satellite speaker, 230 - Third satellite speaker, 600 - Resource plan switching device, 610 - Acquisition module, 620 - Confirmation module, 630 - Generation module, 640 - Switching module. Detailed Implementation

[0019] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] The components of this application, typically described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0022] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0023] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0024] Example 1 This application provides a resource plan switching method applied to a synchronized audio group, which includes a master control device and multiple satellite speakers. See also... Figure 1 The synchronized audio group includes a main control device 100, a first satellite speaker 210, a second satellite speaker 220, and a third satellite speaker 230.

[0025] See Figure 2 Resource plan switching methods include: Step S110: Acquire multidimensional feature time-series data of each satellite speaker according to the acquisition period, and calculate the exponential moving average based on the multidimensional feature time-series data to obtain the moving average value.

[0026] It should be noted that in a home theater, the main control device and multiple satellite speakers transmit multiple audio streams simultaneously via a wireless link. In the 2.4GHz unlicensed frequency band, devices such as Wi-Fi and Bluetooth coexist. The instantaneous value of the link quality at any single moment is often obscured by sudden interference. It is difficult to distinguish between the self-recovery of short-term jitter and the continuous degradation that occurs with the duty cycle of external devices, thus distorting the observation of the link.

[0027] In practice, this step is executed by the main control device. The acquisition period is used to constrain the time interval for observing each satellite speaker, which can be set to 100ms. At each cycle, the main control device acquires a set of multi-dimensional feature time-series data for each satellite speaker. These data may include dimensions such as Received Signal Strength Indication (RSSI), packet loss rate, packet error rate, retransmission count, queue depth, audio underload, tail delay, and effective transmission rate. Some dimensions can also be selectively acquired based on the implementation capabilities.

[0028] The master control device stores multi-dimensional feature timing data from the most recent W acquisition cycles (e.g., 5 cycles) to form multi-link timing features. RSSI, packet loss rate, and packet error rate are obtained by the master control device from its registered link quality callbacks (e.g., bs_sle_link_quality_cbk). The number of retransmissions is obtained from the protocol stack statistics interface or based on the sending sequence number and acknowledgment result. Queue depth, audio underload, and synchronization deviation (i.e., the deviation of the local playback timeline relative to the master control device) exist on the satellite speaker side and need to be supplemented by the satellite speaker through status reporting. Each status report carries fields such as resource plan version number, beat count, receive buffer duration, underload increment, and synchronization deviation. The master control device only accepts data that matches the version number of the currently executing resource plan. If no status report is received for a preset number (e.g., 3) consecutive acquisition cycles, or if the link quality callback is missing, the master control device will no longer use the previously obtained data, but will set the link risk of the satellite speaker to the maximum value and switch to the backup resource plan or switch to the fallback decision.

[0029] In this embodiment, the step of calculating the exponential moving average based on multidimensional feature time series data to obtain the moving average includes: The multidimensional feature time series data is normalized to obtain normalized feature data; The normalized feature data are subjected to exponential moving average calculations to obtain the moving average values.

[0030] As an example, multidimensional feature time-series data can be normalized before entering the calculation. For continuous measurements such as error rate and missed rate, the normalization process takes the smaller of the ratio of its own value to its respective degradation threshold and 1. For example, the normalization process for the missed rate is: min(missed_rate_i / M_bad, 1), where missed_rate_i represents the missed rate and M_bad represents the missed rate threshold. The normalization process for the error rate is: min(err_packet_rate_i / E_bad, 1), where err_packet_rate_i represents the error rate and E_bad represents the error rate threshold. The normalization process for the number of retransmissions is: min(retrans_i / R_bad, 1), where retrans_i represents the number of retransmissions and R_bad represents the retransmission number threshold. Queue depth and audio underload are binarized. For queue depth binarization, a value of 1 is used when the receive buffer is below the lower limit or above the upper limit, and 0 otherwise. For audio underload binarization, a value of 1 is used when the underload increment in the current cycle is greater than 0, and 0 otherwise. For RSSI normalization, signal strength below the calibrated lower limit is mapped to a value between 0 and 1.

[0031] Based on this, the main control equipment performs exponential moving average calculations using multidimensional feature time-series data. The principle is that the weight of historical data decays exponentially over time, with greater contributions from data closer to the current period. The expression is: In the formula This provides the multidimensional feature time-series data of the i-th satellite speaker in the k-th acquisition period. The resulting moving average, The moving average value is the average value of the previous acquisition period, and the smoothing coefficient α can be set to 0.2. Each dimension of feature data for each satellite speaker is calculated independently, thus obtaining a moving average value for each. For the same dimension, indicators such as slope and burstiness can also be used to characterize the trend and fluctuation pattern. The initial values ​​of the acquisition period, the number of the most recent acquisition period W, the smoothing coefficient, and various degradation thresholds (such as a packet error rate threshold of 5%) can be calibrated by the main control device in scenarios such as an anechoic room, a typical living room, and strong interference, and then written into non-volatile memory. Alternatively, they can be obtained in other ways, without any restrictions.

[0032] It should be understood that the main control equipment collects data from each satellite speaker in a unified manner, so that the observations of each satellite speaker are based on the same time reference, and the data are continuous and comparable in time series. The exponential moving average calculation gives greater weight to recent changes, and random fluctuations gradually converge. The resulting moving average reflects the true trend of link quality without being obscured by short-term jitter, and subsequent processing based on it obtains a stable and reliable data foundation.

[0033] It should be noted that the main control device can also calculate the slope and burst index. The slope reflects the upward or downward trend of the characteristic data in that dimension. The burst index, from another perspective, characterizes the degree to which a peak deviates from the normal level within a window. Its technical principle is that the median of the data in the most recent collection period represents the typical level of that dimension, and the maximum value of the data in the most recent collection period represents the worst-case scenario. The difference between the two is the deviation of the worst fluctuation from the normal level. Its expression is:

[0034] In the formula, X_i(k) represents the multidimensional feature time-series data of the i-th satellite speaker in the k-th acquisition period, X_i(k-W+1) represents the multidimensional feature time-series data of the i-th satellite speaker in the k-W+1-th acquisition period, W is the number of the most recent acquisition periods stored by the main control device, and burst_i(k) is the calculated burst index. It should be understood that the burst index can be calculated for each dimension of data of each satellite speaker.

[0035] This can be understood as follows: when the link experiences gradual overall degradation, both the maximum and median values ​​rise together, while the burstiness index does not increase accordingly. When the overall level is stable with occasional short bursts, the median remains near normal, the maximum value is determined by the timing of the bursts, and the burstiness index increases accordingly. For example, if a satellite speaker experiences a short spike in packet error rate approximately every 100ms, and maintains a stable period over five consecutive acquisition cycles, this spike can be identified by the burstiness index, unaffected by the dilution effect of other stable samples within the cycle. Thus, the average level represented by the moving average, the trend represented by the slope, and the spike represented by the burstiness index together constitute the overall picture of the fluctuations in each dimension of the data over time. Short-term random jitter, periodic bursts, and persistent degradation can be distinguished from each other, providing a complete and stable data foundation for subsequent observation and judgment of the synchronous audio group link quality.

[0036] Step S120: Obtain the group risk value of the synchronized audio group based on the moving average value, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition.

[0037] As an example, the moving average includes the moving average of the error rate and the moving average of the missing rate, and there may be moving averages of other dimensions, which are not limited here.

[0038] In this embodiment, step S120, obtaining the group risk value of the synchronized audio group based on the moving average, includes: Based on the moving average of the packet error rate, the moving average of the packet loss rate, the number of retransmissions, the buffer risk item, and the single-link synchronization deviation risk item, calculate the single-link risk value for each satellite speaker in the future planning window. Based on the maximum value of each single-link risk value, the bandwidth risk flag, and the group synchronization risk flag, calculate the group risk value.

[0039] It's important to note that the smooth playback of a synchronized audio group consisting of the main control unit and multiple satellite speakers in a home theater often depends on the weakest link. Even a short-term degradation of the link for any satellite speaker can cause popping or even lag in its channels. The conventional observation method, focusing on the instantaneous indicators of a single link, only reflects the situation of that link at a particular moment and fails to provide an overall picture of the risk faced by the entire group at that instant. Furthermore, playback synchronization issues between speakers and insufficient available bandwidth are group-level phenomena that cannot be observed in individual link indicators. Without a unified metric representing the overall risk of the synchronized audio group, the main control unit is prone to overestimating or underestimating the group's condition when deciding whether to maintain or adjust playback parameters.

[0040] In practice, this step can be executed by the risk prediction module set up on the main control device. The output of the group risk value is oriented towards a future planning window, which can be approximately 300ms. This means it depicts risks expected to occur within a certain future period, representing forward prediction rather than post-event statistics. The group risk value uses the moving average calculated from the exponential moving average as the main input. First, the individual link risk value for each link, i.e., each satellite speaker, is obtained, and then aggregated into the group risk value for the synchronized audio group. This type of prediction can employ an interpretable rule-weighted form, without relying on a large, uninterpretable model; if a lightweight classifier is introduced, it is only used to replace the prediction function.

[0041] As an example, the single-link risk value q_i of the i-th satellite speaker can be obtained by the following formula:

[0042] in, This is the moving average of the packet error rate in multidimensional feature time series data. This is the moving average corresponding to the packet loss rate. This is a risk item calculated based on the number of retransmissions. To buffer risk items, The synchronization risk item is calculated based on the deviation of the satellite speaker's local playback timeline relative to the main control device. Clamp calculation involves first limiting the weighted sum to the range of 0 to 1, then amplifying it by a factor of 100 to ensure that the risk values ​​of each link fall under the same dimension. The packet error rate (0.35) has a higher weight than the others, the packet loss rate (0.25), the risk calculated from retransmission counts and the buffer risk (each with a weight of 0.15), and the synchronization risk item has a weight of 0.10. Other weights are also possible and are not restricted here. The weight of the buffer risk item is increased in three situations: first, when the satellite speaker reports a receive buffer duration below a set lower limit; second, when the underload increment within the current acquisition period is greater than zero; and third, when the receive buffer duration is continuously decreasing, indicating a depletion of the buffer depth.

[0043] Based on the risk values ​​of each individual link, the group risk value Q can be calculated using the following formula:

[0044] Taking three satellite speakers as an example, which respectively handle the left, right and bass channels, , , The risk value of each of the three links is taken as the maximum value for synthesis. When there are more satellite speakers, the maximum value of each link risk value is taken as well. For bandwidth risk indicators and The group synchronization risk flag is set to either 0 or 1, and each flag is multiplied by the corresponding coefficient 20 before being included in the calculation. The bandwidth risk flag is set to 1 when the resource plan generated for the synchronized audio group cannot retain the minimum air interface margin. The group synchronization risk flag is also set to 1 when the difference in playback time axis deviation reported by any two satellite speakers exceeds the allowable value. The group synchronization risk flag observes the difference between pairwise deviations of the speakers, not their deviations relative to the master control device. Therefore, even if the deviation of each speaker relative to the master control device is small, as long as there is a difference between pairwise deviations, this item will still be set to 1. This is precisely the problem that cannot be exposed in a single link assessment. The group risk value synthesized using the above formula is ultimately limited to between 0 and 100.

[0045] During implementation, the group risk value and hard trigger conditions are used together to determine the operating status, with the hard trigger conditions taking precedence over the weighted group risk value. For example, if any critical channel experiences audio underload, the packet error rate is not lower than a set percentage (e.g., 10%) for two consecutive acquisition cycles, no status report is received for three consecutive acquisition cycles, or the synchronization deviation exceeds the deviation threshold, it is directly identified as high-risk, even if the group risk value has not yet increased. In conjunction with the group risk value and the status, the operating status of the synchronized audio group can be classified into at least three categories: stable state, warning state, and high-risk state.

[0046] In this way, the group risk value converges the moving average of the multidimensional feature time series data after exponential moving average smoothing to a unified numerical range. The maximum value of the single link risk value is added to the composite group risk value, so that the overall group risk is not diluted by the overall level of the other links. When calculating the group risk value, two group-level factors, bandwidth risk indicator and group synchronization risk indicator, are incorporated, which solves the problems of synchronization loss and capacity that are not visible from the perspective of a single link. The calculation for the future planning window makes the observation occur before the degradation occurs, and the single link risk value of each input item can be traced back to the specific quality dimension. Therefore, the subsequent judgment of the operating status has a unified, stable and interpretable basis.

[0047] In this embodiment, the operating state in step S120 includes a stable state, a warning state, and a high-risk state. Determining the operating state of the synchronized audio group based on the group risk value and hard triggering conditions includes: If the group risk value is less than the first preset threshold and does not meet the hard trigger condition, it is determined to be a stable state; If, within a first preset number of consecutive collection cycles, the group risk value is greater than or equal to the first preset threshold and the group risk value is less than or equal to the second preset threshold, then it is determined to be a warning state. If the group risk value is greater than the second preset threshold, or if the hard trigger condition is met, then it is determined to be a high-risk state; The hard triggering conditions include the following: Audio underload occurs in any critical channel; The error rate for the second consecutive preset number of collection cycles is greater than or equal to a preset percentage threshold. No status report was received from the satellite speaker for the third consecutive preset number of data collection cycles; The synchronization deviation is greater than or equal to the synchronization deviation threshold.

[0048] In this embodiment, the second preset quantity, the third preset quantity, and the preset percentage threshold can be determined according to actual conditions. Based on the group risk value and hard trigger conditions, the operating status of the synchronized audio group can be classified into at least three categories. First, when the group risk value is less than the first preset threshold (e.g., 30) and no hard trigger conditions are met, the operating status is determined to be stable, and the main control device can maintain the current resource plan accordingly. Second, when the group risk value rises above the first preset threshold but is still less than the second preset threshold (e.g., 60), for example, between 30 and 60, and remains between 30 and 60 for a continuous first preset number of acquisition cycles, for example, 3 acquisition cycles, the operating status is determined to be a warning state. At this time, the main control device can generate a candidate resource plan and preset it to the satellite speakers, but the audio parameters do not change immediately. Third, when the group risk value reaches or exceeds the second preset threshold, or regardless of the group risk value, as long as the hard trigger conditions are met, the operating status is determined to be a high-risk state.

[0049] It is understandable that hard trigger conditions are a type of judgment situation that takes precedence over group risk values. They are not based on the magnitude of the group risk value result. Hard trigger conditions may include: (1) Audio underload occurs in any critical channel, that is, the audio data required for the playback of the critical channel has been exhausted in its buffer. The critical channel may include the left channel and the right channel. (2) The packet error rate is not lower than the preset percentage threshold (e.g., 10%) within two consecutive acquisition cycles. (3) No status report is received from the satellite speaker for three consecutive acquisition cycles. At this time, the link corresponding to the speaker can no longer retrieve data. (4) The synchronization deviation exceeds the synchronization deviation threshold S_bad, that is, the phase deviation of the playback time axis of each speaker relative to the main control device exceeds the allowable range. If any of the four conditions is met, the operating status is directly identified as a high-risk status.

[0050] Understandably, a stable state means that neither the statistical data nor extreme cases exceed the limits, and the entire synchronized audio group requires no action. A warning state requires the group's risk value to remain within a specific range for several consecutive acquisition cycles to be valid; instantaneous spikes are insufficient to cause a sudden change in state, and jitter is kept out of the threshold. It only triggers the preparation of candidate resource plans, without immediate switching, thus mitigating the disturbance of switching. A high-risk state can be directly triggered by hard conditions; user-perceptible damage such as audio underload or loss of connection does not need to wait for the group's risk value to accumulate, ensuring timely intervention.

[0051] Step S130: If the operating status of the synchronized audio group is a warning state or a high-risk state, then a candidate resource plan is generated according to the candidate performance level, and the optimal resource plan is determined from the candidate resource plan according to the constraints and scoring rules.

[0052] It's important to note that existing rate-adaptive mechanisms typically determine the speed range based on a single instantaneous metric such as throughput or signal strength. Bandwidth determination may even involve directly distributing the air interface rate equally among the number of devices. Home theater multi-channel audio implementations are different. The encoding bitrates for the left, right, and subwoofer channels often differ, and their redundancy levels, protocol overhead, and importance to the listening experience also vary. Distributing the air interface rate equally among the number of devices would either over-reserve bandwidth for low-demand channels, leaving insufficient bandwidth for high-bitrate channels, or under-reserve bandwidth for high-demand channels, leaving excessive bandwidth for low-bitrate channels. Without prior screening and a unified selection criterion, the main control device can easily switch speed ranges hastily, with the disruption cost of the switch itself approaching or even exceeding the gains.

[0053] See Figure 3 The process of generating candidate resource plans based on candidate performance tiers includes the following steps: Step S131: Obtain the physical layer nominal rate from the available rate table in the protocol stack according to the candidate performance rate; Step S132: Obtain the effective load efficiency based on the historical statistics of the candidate performance levels; Step S133: Calculate the available capacity of the candidate performance level based on the physical layer nominal rate, the payload efficiency, reserved bandwidth, synchronization-related overhead, and reserved capacity. Step S134: Calculate the budget usage for each independent audio stream. Based on the budget usage of each independent audio stream, the protocol encapsulation factor, and the retransmission reservation ratio, calculate the total budget usage. Step S135: The difference between the available capacity of the candidate performance level and the total budget occupancy is taken as the remaining bandwidth of the candidate plan. Step S136: When the preset screening conditions are met, determine the candidate resource plan.

[0054] In practice, when the operating state is in a warning or high-risk state, the master control device generates a candidate resource plan within the resource set allowed by the protocol stack or driver. This candidate performance level is the air interface performance level supported by the protocol stack, which supports automatic rate adjustment (Autorate). The master control device can retrieve this information one by one from the available performance level table of the protocol stack, with each level corresponding to a physical layer nominal rate. This candidate resource plan can be represented by the following P_v: P_v = { version = v, eligible_channel_set, air_rate_profile, redundancy_profile, audio_bitrate_profile, E_activate, validity_window, fallback_version } The candidate resource plan P_v contains eight elements: version number, available channel set (eligible_channel_set), selected candidate performance profile (air_rate_profile), redundancy policy (redundancy_profile), audio bitrate policy (audio_bitrate_profile), co-activation time (E_activate), validity window (validity_window), and fallback version (fallback_version). The available channel set is represented by the underlying configurable channel map, channel blacklist, or resource pool, and does not change the protocol's frequency hopping algorithm by methods such as changing the frequency hopping modulus from 37 to 36. The redundancy policy can include configurable parameters such as retransmission count, redundancy groups, or guard intervals. The audio bitrate policy is determined by the number of online satellite speakers, channel priority, and available capacity budget. The co-activation time is a future beat point on the precise synchronization timeline that is at least G beats later than the current synchronization time, and the fallback version refers to a fallback resource plan that has passed quality verification.

[0055] In the synchronized audio group of the three satellite speakers on the main control device, the bit rate, redundancy level, overhead, and channel importance of each channel are not entirely the same, and should be estimated based on the actual total traffic. For a candidate performance level r, the main control device obtains its physical layer nominal rate η_payload(r) from the available level table. The expression for the available capacity of the candidate performance level is:

[0056] in, This indicates the available capacity for a candidate performance level, also known as air interface capacity. Indicates the physical layer nominal rate. The effective load efficiency for this gear can be obtained by the following formula: Where F represents the effective ISO payload within the most recent L stable windows, and B represents the number of bits sent by the physical layer; Bandwidth is reserved for control channel and protocol management. To synchronize related overhead, To address the reserve capacity for sudden retransmissions, scheduling gaps, and statistical errors, the initial version can use C_guard = max(15% × R_phy(r), C_guard_min), which is the larger of 15% of the nominal rate and the lower limit of the reserve capacity. The final value should be determined by the actual throughput of the corresponding chip at that level.

[0057] The main control device calculates the budget usage for each independent audio stream using the following formula: ,in, This indicates the budget allocation for each independent audio stream. This represents the raw bitrate of the audio encoder. Indicates protocol encapsulation overhead. Indicates the overhead of forward error correction / redundant grouping. This indicates the retransmission reserve ratio.

[0058] The total budget usage for each independent audio stream is calculated using the following formula. , in, This represents the total budget usage. If there are 3 satellite speakers, B_i are B_1, B_2, and B_3 respectively.

[0059] The remaining bandwidth of the candidate plan is calculated using the following formula: ,in, Indicates the remaining bandwidth of the candidate plan. Indicates the available capacity for the candidate performance level. This represents the total budget used for each individual ISO audio stream.

[0060] If multiple satellite speakers receive the exact same audio stream, the shared stream is counted only once. The left, right, and bass channels, which are independent, are typically counted separately to avoid over-reserving the bass channel and under-reserving the high-bitrate surround channel. The difference between the available capacity of the candidate slot and the total budget occupied is the remaining bandwidth of the candidate plan.

[0061] In this embodiment, the preset filtering conditions include: The remaining bandwidth of the candidate plan is greater than or equal to the target value, which is the larger of a first threshold determined according to a preset ratio and the available capacity of the candidate performance level, and a preset absolute threshold. In each acquisition cycle, the single-link risk value of all critical satellite speakers is less than the first preset risk value and does not meet the hard trigger condition; The predicted delivery rate is greater than or equal to the lower limit of the delivery rate, and the predicted tail delay is less than or equal to the upper limit of the delay. The current planned stay duration is greater than or equal to the minimum stay duration, and there exists one of the hard trigger conditions that are met; All satellite speakers declare support for the aforementioned candidate performance levels and redundancy parameters.

[0062] As an example, the preset screening criteria include the following five conditions: (1) H(r) ≥ max(0.15 × C_air(r), H_min), where H(r) represents the remaining bandwidth of the candidate plan, C_air(r) represents the available capacity of the candidate performance level, the preset ratio is 0.15, and H_min represents the preset absolute threshold.

[0063] (2) The single-link risk value of each key satellite speaker within the prediction window (i.e., the acquisition period) is less than the first preset risk value (e.g., 60) and does not meet the hard triggering condition.

[0064] (3) The predicted delivery rate of this level is greater than or equal to the lower limit of delivery rate D_min. For example, the lower limit of delivery rate D_min is 99%, and the predicted tail delay (i.e., the 99th percentile delay) is less than or equal to the upper limit of delay L_max. The upper limit of delay L_max can be the sum of the current audio frame period and the local decoding buffer budget. (4) The current plan has already been in place for at least the minimum stay time, or there is a high-risk hard trigger; (5) All satellite speakers declare that they support the candidate performance level and related redundancy parameters.

[0065] In this embodiment, H_min=32 kbps, D_min=99%, and L_max=current isochronous (ISO) frame period + local decoding buffer budget are used as the starting point for the initial test. Other values ​​are also acceptable and are not limited here. The main control device traverses the available gears from low to high, selecting the lowest gear that meets the preset screening conditions to reduce air interface occupation and power consumption. If the current gear meets the conditions and there is no high risk, the current gear is maintained to avoid switching without benefit. If no gear meets the conditions, the encoding bitrate of the audio stream is reduced or redundancy is increased according to channel priority, and then recalculated; if there is still no feasible solution, the backup resource plan pointed to by the backup version is called. This backup resource plan uses a combination of encoding and redundancy that has been tested to maintain continuous playback of key channels.

[0066] For example, if the encoding bitrates of three independent audio streams are 128kbps, 128kbps, and 96kbps respectively, and the protocol encapsulation factor is 1.10 and the retransmission reservation ratio is 15%, the total budget occupancy is approximately 445kbps; a candidate bitrate has a nominal rate of 1150kbps, a payload efficiency of 0.78, and control and synchronization reservations... , , The total bandwidth is 30kbps, with an available capacity of approximately 867kbps and a remaining bandwidth of approximately 422kbps, thus meeting the bandwidth requirement. The other candidate performance level has an available capacity of only 369kbps, therefore this candidate performance level is not valid. The entire process compares the actual total budget usage with the actual available capacity, rather than simply dividing the nominal rate by the average number of channels (e.g., if the nominal rate is 1150 or 512, the average value obtained by dividing 1150 by 3 or 512 by 3).

[0067] See Figure 4 The step of determining the optimal resource plan from the candidate resource plans based on constraints and scoring rules includes the following steps: Step S137: Calculate the score for each candidate resource plan based on the predicted delivery rate, the first weight, the predicted tail delay, the second weight, the switching cost, the third weight, the synchronization disturbance risk, and the fourth weight. Step S138: The candidate resource plan that satisfies the constraints and has the highest score is selected as the optimal resource plan. In this embodiment, the constraints include: The sum of all audio bitrates and redundancy overhead corresponding to each candidate resource plan is less than or equal to the available capacity of each candidate resource plan. The difference between the time of joint effectiveness and the current time is greater than or equal to the safety window; In this embodiment, the method further includes; If no candidate resource plan meets the constraints, a backup resource plan is selected or the coding bitrate of non-critical channels is reduced.

[0068] In this embodiment, among the candidate resource plans selected through admission screening, the optimal resource plan is determined by constraints and scoring rules. Based on the scoring rules, the benefits and costs of the candidate resource plans are converted into a weighted sum, and the score can be calculated using the following formula:

[0069] Scoring of candidate resource plans The predicted delivery rate is the only positive term in the formula. To predict tail delay, For the cost of switching, To synchronize the disturbance risk, w1, w2, w3, and w4 are their respective weights.

[0070] The constraints are two hard thresholds, including: (1) the sum of the audio bitrate and the redundancy overhead of each channel is less than or equal to the available capacity of the candidate resource plan, which can be expressed by the following formula; sum(audio_bitrate_i) + redundancy_overhead ≤ usable_air_capacity(P_v) sum(audio_bitrate_i) represents the sum of the audio bitrates for each channel, redundancy_overhead represents the redundancy overhead, and usable_air_capacity(P_v) represents the available capacity of the candidate resource plan.

[0071] (2) The difference between the common activation time and the current time is greater than or equal to the safety window, which can be expressed by the following formula: E_activate - E_now ≥ guard_window, where E_activate represents the common activation time, E_now represents the current time, and guard_window represents the safety window, which allows time for the entire group to complete the handover preparation. The master control device selects the candidate resource plan that meets the constraints and has the highest score as the optimal resource plan; if there is no candidate that meets the constraints, the backup resource plan is selected, or the coding bitrate of non-critical channels is reduced.

[0072] It should be understood that candidate resource plans are only generated after a warning or high-risk state is triggered. Each candidate resource plan entering the selection process is already documented on both the main control equipment and the satellite speakers. The traversal from low to high ensures that candidate resource plans stop at the lowest level that is just sufficient, thus tightening air interface occupancy and power consumption. Maintaining the current level also prevents unprofitable handovers. The two conditions of predicted delivery rate and tail latency extend the evaluation from capacity to listening results, while the conditions of capability declaration and dwell time exclude equipment mismatch and excessively frequent handovers. The scoring rules combine predicted delivery rate, predicted tail latency, handover cost, and synchronization disturbance risk to calculate the score, improving the accuracy of the score. The constraints maintain the two bottom lines of capacity and time interval. The resulting optimal resource plan has no worries about capacity, promises quality, and controlled disturbances, making the resource adjustment of the synchronization audio group more appropriate and precise.

[0073] Step S140: Broadcast a plan preparation message to the satellite speakers, obtain a plan readiness confirmation returned by the satellite speakers, the plan readiness confirmation is obtained based on the plan preparation message, obtain the common effective time, and when the key satellite speakers confirm, broadcast the plan submission, the plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan, the main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

[0074] It should be noted that current multi-device parameter configuration practices often involve the master control device sending new parameters to each slave device, which then applies them immediately upon receipt. Messages arrive at different times and are processed at varying speeds. During the switching process, there is a period where old and new parameters coexist, causing channel misalignment that directly affects the listening experience. If control messages are lost or delayed, some devices may retain their original parameters while others have already been updated, making it impossible to align the boundaries between old and new parameters. Furthermore, the effective timing is often set based on experience, meaning the slowest slave device may be forcibly switched off before it is ready, turning the switching action itself into a source of playback problems. Multi-channel synchronous playback relies on the consistency of speaker parameters and timing; however, parameter tuning is precisely when this consistency is first broken.

[0075] In this embodiment, after the synchronous audio group is in a warning or high-risk state and the optimal resource plan is determined, the master control device broadcasts a plan preparation message to all online satellite speakers via a control channel. For example, the control channel is a Port channel provided by the StarFlash protocol. The plan preparation message can be denoted as RESOURCE_PLAN_PREPARE and carries at least nine items: version number, member bitmap, target air interface rate, target channel set identifier, target redundancy parameter, target coding rate per member, predetermined common effective time, effective window, and backup version. The member bitmap defines the set of satellite speakers that need to be synchronized and switched; the target coding rate per member is used to support different target codes for the left, right, and bass channels; the target channel set identifier only references the channel map or resource pool already allowed by the protocol stack and cannot require the satellite speakers to modify the underlying frequency hopping calculation formula; the backup version points to a backup resource plan that has been quality verified.

[0076] After receiving the plan preparation message, each satellite speaker first performs a local self-check. Only when all five self-checks are met simultaneously will it return a plan readiness confirmation. For example, the plan readiness confirmation is recorded as RESOURCE_PLAN_READY, where the plan readiness confirmation carries the version number and local status. The self-check content includes: (1) The version number carried in the plan preparation message is greater than the version already applied locally and the jump does not exceed the allowed version jump range. (2) The target rate, redundancy parameters and target encoding parameters all belong to the set supported by this satellite speaker. (3) The receiving buffer duration of this satellite speaker is between the set lower limit and upper limit, and no audio underload has occurred in the most recently set observation period. (4) The local clock can resolve the predetermined common effective time, and its advance relative to the current time of this satellite speaker is not less than the product of the minimum time interval G_min and the beat length toggle_len. (5) The channel role of this satellite speaker belongs to the member bitmap and the pre-configuration of the corresponding isochronous audio stream has been completed.

[0077] The master control device confirms the readiness of each satellite speaker's plan and determines whether the target air interface performance level is acceptable. All critical satellite speakers handling key channels such as the left and right must confirm before the plan can be broadcast and submitted. Degradable channels, such as bass channels or optional height channels, can be temporarily removed from the member bitmap according to a preset strategy before submission, but the bandwidth budget and versioned member table must be updated simultaneously during removal. The plan submission (e.g., RESOURCE_PLAN_COMMIT) only carries two parameters: the common effective time and the resource plan version number corresponding to the optimal resource plan. The entire plan content has been fully delivered by the plan preparation message and temporarily stored by each satellite speaker.

[0078] See Figure 5 To obtain the common effective time, the following steps are included: Step S141: Before sending the plan preparation message, obtain the measured values ​​of the stage time of the control channel within the preset statistical window; determine the upper bound of the time of the plan preparation message sending stage, the upper bound of the time of the waiting for plan readiness confirmation stage, and the upper bound of the time of the plan submission broadcast stage respectively; convert the sum of the upper bounds of the time of the three stages according to the preset beat length and round it up; then add the preset buffer beat number and take the larger of the preset beat number lower limit to obtain the minimum time interval. Step S142: Based on the current time read on the fine synchronization time axis before sending the plan preparation message, determine the candidate effective time according to the minimum time interval and the beat length of the fine synchronization time axis, and align the candidate effective time to the first beat boundary no earlier than the candidate effective time to obtain the common effective time.

[0079] In this embodiment, the co-effective time is calculated before the current round of plan preparation message is sent. The stage time used for calculation comes from the measured upper bound formed within a preset statistical window by previous control interactions or pre-tests, rather than an arbitrary empirical value, and does not depend on the plan readiness confirmation that has not yet been completed in this round. The minimum time interval G_min is determined by the following formula: G_min = max(5,ceil((T_prepare + T_ready_timeout + T_commit) / toggle_len) + 2). Wherein, T_prepare is the upper bound of the measured time taken from when the master control device starts sending the plan preparation message to when the message is completed; T_ready_timeout is the upper bound of the allowed waiting time set according to the measured results, from when the plan preparation message is completed to when the plan readiness confirmation of the key satellite speakers is received. This time includes the time required for the satellite speakers to perform local self-checks and pre-configuration and return the plan readiness confirmation; T_commit is the upper bound of the measured time taken from when the master control device starts broadcasting the plan commit to when the control channel completes sending the message; toggle_len is the beat length of the fine synchronization time axis; ceil indicates rounding up; the constant 2 indicates that two extra beats are reserved, one beat is used to cover the jitter introduced by task scheduling and beat boundary alignment, and the other beat is used to cover the control channel retransmission and synchronization residual error; the constant 5 indicates that the minimum time interval must not be less than five beats.

[0080] The common activation time E_activate is determined by the following formula: E_activate = next_toggle(E_now + G_min × toggle_len). Where E_now is the current time read by the master control device from the fine synchronization timeline before sending the plan preparation message in this round; next_toggle(x) represents the first beat boundary on the fine synchronization timeline no earlier than time x. The master control device first calculates the candidate time E_now + G_min × toggle_len, and then aligns the candidate time backward to the first beat boundary using the next_toggle function, thus obtaining the common activation time E_activate. Therefore, the time from E_now to E_activate is no less than the sum of the measured upper bounds of the three stages: plan preparation message transmission, satellite speaker completing local self-check and pre-configuration and returning plan readiness confirmation, and plan submission broadcast, with an additional safety margin of at least two beats. Therefore, provided that the actual time consumed in each stage does not exceed the corresponding measured upper limit and no control message is irrecoverably lost, each satellite speaker can complete the plan preparation, return the plan ready confirmation and receive the plan submission before the common effective time arrives.

[0081] To prevent incorrect activation due to lost control messages, satellite speakers do not switch immediately even if they have received a plan submission. The optimal resource plan corresponding to the resource plan version number is only applied when both conditions are met: receiving the plan submission and the local time reaches the common effective time. Satellite speakers that have not received a plan submission will maintain their original resource plan.

[0082] Upon reaching the shared activation time, the master control device and all eligible satellite speakers simultaneously switch to the optimal resource plan, maintaining the same playback synchronization benchmark throughout the audio data plane. Then, each satellite speaker returns an application confirmation, for example, denoted as RESOURCE_PLAN_APPLIED. This confirmation carries the actual version number and application status of the satellite speaker. The master control device activates at the shared activation time (E_activate), and after a verification period (T_verify), determines whether the switch was successful based on the status report. This verification period (T_verify) can cover at least five acquisition cycles to avoid misjudging a single momentary packet loss as a plan failure. For scenarios with one master control device supporting three satellite speakers, the control channel can be implemented to separately receive plan readiness confirmations and application confirmations from each of the three satellite speakers. Existing implementations supporting only two channels can be extended to support three channels.

[0083] It should be understood that under this switching method, at any given moment, the synchronized audio group is either entirely in the original resource plan or entirely in the optimal resource plan, and the window for inconsistent parameters between devices no longer exists in terms of mechanism; the consequence of lost control messages is limited to the device not being changed this time, rather than being changed to distorted parameters, and disturbances at the control end no longer spread to the playback end; the common effective time is derived from the measured round-trip time, so even the slowest satellite speaker has enough time to complete preparation; the requirement of confirming all critical satellite speakers maintains the continuity of the main channel, and the removal of degradeable members allows for the parallel processing of differential processing and overall group synchronization; the resource plan version number runs through the plan preparation, plan submission, and application receipt, with these three points corresponding to each other, ensuring that the satellite speakers switch to the correct optimal resource plan.

[0084] In this embodiment, the method further includes; Store the current resource plan and the backup resource plan; When any of the following rollback conditions occur, a rollback operation is performed, and the rollback operation carries the future effective time. At the future effective time, the main control device and each of the satellite speakers will switch to the minimum resource plan. Set the minimum dwell time, upshift / downshift hysteresis threshold, and maximum number of switches per unit time; If the hard trigger condition is met, downshifting will be performed immediately; If the actual dwell time is equal to the minimum dwell time, the actual group risk value is less than the first risk threshold, the actual bandwidth margin is greater than the absolute lower limit of the bandwidth margin, there is no audio underload, and upgrade processing is performed. Once the number of handovers per unit time reaches the handover limit, maintain the minimum resource plan and report link quality anomalies. The rollback conditions include: If any key channel experiences an audio underload within the verification window, or if the error rate for the fourth consecutive preset number of acquisition cycles exceeds the rollback error rate threshold; After the current plan takes effect, the group risk value for the fourth consecutive preset number of collection cycles is greater than or equal to the second risk threshold; The following are possible causes: the critical satellite speaker is not confirmed; the actual application resource plan version number is inconsistent with the submitted plan version number; or the satellite speaker becomes unreachable during the verification window. The absolute value of the playback synchronization deviation of any key satellite speaker is greater than or equal to the synchronization deviation threshold; The actual bandwidth margin is less than zero, or the actual bandwidth margin is lower than the absolute lower limit threshold of the bandwidth margin for the fifth consecutive preset number of collection cycles.

[0085] It should be understood that in existing wireless audio systems, when adjusted parameters are found to be unsuitable, the common approach is to temporarily recalculate the parameters or have each device revert to its factory default values. Temporary recalculation, coinciding with channel degradation, inherently carries a high probability of miscalculation; individual reversion causes the entire set of parameters to become scattered again, making synchronization a second fault superimposed on the first. Furthermore, the lack of a pre-prepared backup and a unified recovery point makes the system prone to getting caught in a cycle of switching, failure, reverting, and switching again, resulting in continuous playback interruptions.

[0086] In this embodiment, the master control device can maintain at least two resource plans. One is the current resource plan, for example, denoted as P_active, which is the parameter combination currently being executed; the other is a backup resource plan, for example, denoted as P_safe. The backup resource plan is not an answer generated on the spot, but a resource plan that has been historically verified and covers a large range of interference. It is stored in advance on the master control device and coexists with the current resource plan, and can be called at any time.

[0087] A rollback operation will be executed when any of the following rollback conditions are met. Rollback conditions may include: (1) If any key channel experiences an audio underload within the verification window, or if the error rate exceeds the rollback error rate threshold within two consecutive acquisition cycles, meaning that the quality after the new plan takes effect has not been realized, a rollback operation can be triggered.

[0088] (2) After the current plan takes effect, the group risk value continues to reach the second risk threshold (e.g., 60) and continues for the fourth preset number (e.g., 2) collection cycles; (3) The key satellite speaker is not confirmed, the version number carried in the actual application is inconsistent with the one submitted in the plan, or the satellite speaker loses contact during the verification window, any one of these conditions must be met; (4) The absolute value of the playback synchronization deviation of any key satellite speaker is greater than or equal to the synchronization deviation threshold. Leading and lagging are considered the same, and the deviation on either side is included in the count. (5) If the actual bandwidth margin is less than zero, or is lower than the lower limit of the margin and continues for the fifth preset number (e.g., 2) collection cycles, it means that the actual channel conditions can no longer accommodate the paper budget.

[0089] When performing a rollback operation, the future effective time is also carried over. The master control device and each satellite speaker restore the backup resource plan at that time on the same timeline, following the same timing as the forward switch, to avoid each reverting separately and causing parameter misalignment again. The rollback plan prioritizes reducing the target bitrate of non-critical channels or temporarily removing degradeable members, prioritizing the continuous playback of critical channels. During the rollback process, three types of behavior are prohibited: changing the master control identity, resetting the synchronization epoch of isochronous audio, and temporarily initiating a leadership contest between devices, to prevent the restoration action itself from introducing further disturbances in side selection and time synchronization.

[0090] To prevent oscillations, the rhythm of rollback and recovery is also constrained. The master control device can set the minimum dwell time, the hysteresis threshold for downgrading / upgrading, and the maximum number of handovers per unit time. For example, downgrading can be executed immediately when a high-risk event is triggered, while upgrading is only allowed if the group risk is less than the set low level, such as 30, and the minimum dwell time is maintained for a period of time, such as 5 seconds, and the actual bandwidth margin is not lower than the lower limit of the margin and there is no underload. Once the number of handovers per unit time reaches the upper limit, the backup resource plan is maintained, and a link quality anomaly is reported to the user application.

[0091] In this way, with both the current resource plan and the backup resource plan readily available, there is no need for on-the-spot planning in case of prediction failures or substandard quality after switching, and rollback can be initiated at any time; when the plan takes effect in the future, the entire group remains at the same point of contact upon recovery, and handling faults will not create new setbacks; the two-pronged approach of immediate downgrading and strict upgrading ensures that degraded plans are eliminated without exception, and that any aggressive upgrading is first verified by checking for reserves and margins; once the limit is reached, the backup plan is locked and the user is notified of the anomaly, and the back-and-forth switching is blocked within the boundaries, thus giving the synchronous audio group the certainty to self-correct after an unexpected event.

[0092] In this embodiment, resource plan switching also includes online learning and model updates. Exemplarily, the execution results of each resource plan form a sample: sample = {H(k), P_v, actual_PER, actual_latency_p99, underflow_count, sync_error, switch_result} Wherein, H(k) represents the multi-link timing characteristics, P_v represents the selected resource plan (version, channel set, gear, redundancy, bitrate), actual_PER represents the actual packet error rate within the validation window, actual_latency_p99 represents the actual P99 tail latency, underflow_count represents the actual number of audio underflows, sync_error represents the actual playback synchronization deviation, and switch_result represents the success or failure conclusion of the switch (positive / negative). Samples can be stored locally on the main control device and offline or low-priority model updates can be performed during non-playback periods; during online periods, only inference constrained by computing power / latency is performed. The new model (i.e., the optimal resource plan) is only activated when it outperforms the baseline rule model (safety resource plan) in retaining the validation set and live playback data, avoiding blind online learning that could disrupt playback stability.

[0093] The following is an application example 1 of the resource plan switching method provided in this embodiment: Wi Predictive pre-switching under periodic Fi occupancy. During 1T3R (i.e., 1 master control unit and 3 satellite speakers) playback, the master control unit summarizes the RSSI, packet loss rate, packet error rate, retransmission count, receive buffer depth, and audio underload count for the three links every 100 ms. The master control unit detected a short spike in the packet error rate of the right surround satellite speaker every approximately 100 ms, which remained stable over 5 consecutive acquisition cycles; its 5-cycle moving average of the packet error rate had exceeded E_bad (e.g., 5%), and the receive buffer depth had decreased from 60 ms to 25 ms, but no underload had yet occurred.

[0094] Based on the aforementioned formula, the master control device obtains q_right=52 for right surround sound, group risk Q=52, and is in a warning state for three consecutive windows. The master control device calculates C_air(r), the total budget usage B_req, and H(r) for each candidate performance level: any plan that does not satisfy H(r) ≥ max(0.15×C_air(r), H_min) is directly discarded; among feasible candidates, the plan with the lowest air interface usage and predicted delivery rate satisfying D_min is selected as the candidate resource plan. Plan version v+1 includes the set of low-interference resources allowed by the protocol stack, the improved redundancy level, and the target coding bitrate determined separately for each channel.

[0095] The master control device calculates G_min based on the maximum round-trip time and toggle period of the message, rather than a fixed 20 toggle periods, enabling adaptive dynamic calculation of G_min; then, E_activate = next_toggle(E_now + G_min × toggle_len). Each of the three satellite speakers returns a RESOURCE_PLAN_READY confirmation. The master control device only issues the plan commit when all three critical channel satellite speakers return RESOURCE_PLAN_READY confirmations, ensuring that the three satellite speakers switch E_activate simultaneously at the common activation time.

[0096] After the switch, within the verification window T_verify=500 ms, compare the actual packet error rate, P99 latency, number of underload events, receive buffer level, and synchronization deviation. If all thresholds are met, record P_v+1 as a valid plan; if any critical channel is underloaded, the error rate exceeds the rollback packet error rate threshold E_rollback for two consecutive windows, or the synchronization deviation exceeds the synchronization deviation threshold S_bad, then rollback to the backup resource plan P_safe will occur at the next co-effective time.

[0097] The following is an application example 2 of the resource plan switching method provided in this embodiment: avoiding bandwidth risks caused by adding satellite speakers. After the system is expanded from 1T2R to 1T3R, the master control device calculates the current three-channel coding bitrate, the expected retransmission overhead, and the available capacity of the current performance level. If bandwidth_risk exceeds the threshold, the master control device generates a candidate resource plan that includes a lower coding level and / or a higher air interface performance level. All satellite speakers, including the newly added satellite speakers, and the master control device are activated to the candidate resource plan at the same activation time.

[0098] This avoids the situation where the playback buffer of the original two channels becomes asynchronous due to instantaneous speed adjustment triggered by a single link RSSI after a new device is connected.

[0099] The following is an application example 3 of the resource plan switching method provided in this embodiment: The process of packet loss and safe rollback at the control end is as follows: After the master control device sends the plan preparation message RESOURCE_PLAN_PREPARE(v), one of the critical satellite speakers fails to reply with a plan ready confirmation RESOURCE_PLAN_READY within the timeout period. The master control device cancels version v and does not send a plan commit RESOURCE_PLAN_COMMIT, while each device maintains the backup resource plan P_save. If the link quality further deteriorates, the master control device will send the backup resource plan P_safe using a repeated sending / acknowledgment mechanism; switching will only occur after receiving acknowledgments from all satellite speakers and reaching the common activation time E_activate.

[0100] In this embodiment, candidate resource plans are generated before underload occurs based on multi-dimensional characteristic time-series data, reducing audio pops and interruptions. Joint decision-making is performed using group risk values, rather than simply adjusting the worst-performing RSSI link, achieving overall quality assessment for multi-terminal audio links. This does not modify the frequency hopping calculation formulas specified by satellite flash or other underlying protocols, but operates within the resource plan interface allowed by the protocol stack. Through version numbers, future common effective times, and two-stage confirmation, multiple satellite speakers and a master control device switch on a unified synchronous timeline, achieving atomic switching. A backup resource plan, timeout cancellation, verification windows, and hysteresis mechanisms prevent prediction errors or control-end packet loss from escalating into audio interruptions, improving overall recoverability. Group risk values ​​can be quantitatively evaluated using packet loss rate, packet error rate, tail delay, number of underloads, and synchronization deviation, improving engineering verifiability.

[0101] The resource plan switching method provided in this embodiment acquires multi-dimensional feature time-series data of each satellite speaker during the acquisition cycle, calculates an exponential moving average based on the multi-dimensional feature time-series data, and obtains the moving average value respectively; based on the moving average value, the group risk value of the synchronized audio group is obtained, and the operating status of the synchronized audio group is determined based on the group risk value and hard trigger conditions; if the operating status of the synchronized audio group is a warning state or a high-risk state, a candidate resource plan is generated based on the candidate performance level, and the optimal resource plan is determined from the candidate resource plans according to the constraints and scoring rules; a plan preparation message is broadcast to the satellite speakers, and a plan readiness confirmation is obtained from the satellite speakers. The plan readiness confirmation is obtained based on the plan preparation message, and a common effective time is obtained. When the key satellite speakers are confirmed, the plan is broadcast for submission. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time, so that the main control device and the satellite speakers can switch to the optimal resource plan at the common effective time, thereby improving the audio synchronization effect between the main control device and the satellite speakers.

[0102] Example 2 In addition, this application provides a resource plan switching device.

[0103] Specifically, such as Figure 6 As shown, the resource planning switching device 600 includes: The acquisition module 610 is used to acquire multi-dimensional feature time-series data of each satellite speaker at the acquisition cycle, and perform exponential moving average calculation based on the multi-dimensional feature time-series data to obtain the moving average value respectively. The determination module 620 is used to obtain the group risk value of the synchronized audio group based on the moving average value, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition; The generation module 630 is used to generate a candidate resource plan based on the candidate performance level if the operating status of the synchronized audio group is a warning state or a high-risk state, and to determine the optimal resource plan from the candidate resource plan based on the constraints and scoring rules. The switching module 640 is used to broadcast a plan preparation message to the satellite speakers, obtain a plan readiness confirmation returned by the satellite speakers, the plan readiness confirmation is obtained based on the plan preparation message, obtain a common effective time, and broadcast a plan submission after the key satellite speakers confirm the plan. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

[0104] The resource plan switching device 600 provided in this embodiment can implement the resource plan switching method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0105] The resource plan switching device provided in this embodiment acquires multi-dimensional feature time-series data of each satellite speaker at a collection cycle, calculates an exponential moving average based on the multi-dimensional feature time-series data, and obtains the moving average value respectively; based on the moving average value, it obtains the group risk value of the synchronized audio group, and determines the operating status of the synchronized audio group based on the group risk value and hard trigger conditions; if the operating status of the synchronized audio group is a warning state or a high-risk state, it generates candidate resource plans based on candidate performance levels, and determines the optimal resource plan from the candidate resource plans according to constraints and scoring rules; it broadcasts a plan preparation message to the satellite speakers, obtains plan readiness confirmation returned by the satellite speakers, the plan readiness confirmation is obtained based on the plan preparation message, obtains the common effective time, and when the key satellite speakers are confirmed, it broadcasts the plan submission, the plan submission including the common effective time and the resource plan version number corresponding to the optimal resource plan, the main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time, so that the main control device and the satellite speakers can switch to the optimal resource plan at the common effective time, thereby improving the audio synchronization effect between the main control device and the satellite speakers.

[0106] Example 3 In addition, this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the resource plan switching method provided in Embodiment 1 when running on the processor.

[0107] The electronic device provided in this embodiment can implement the resource plan switching method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0108] Example 4 This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the resource plan switching method provided in Embodiment 1.

[0109] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0110] The computer-readable storage medium provided in this embodiment can implement the resource plan switching method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, 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 (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0113] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A resource plan switching method, characterized in that, Applied to a main control device, wherein the main control device and multiple satellite speakers constitute a synchronized audio group, the method includes: Multidimensional feature time-series data of each satellite speaker are acquired at the acquisition cycle, and exponential moving average is calculated based on the multidimensional feature time-series data to obtain the moving average value. Based on the moving average value, obtain the group risk value of the synchronized audio group, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition; If the synchronous audio group is in a warning state or a high-risk state, then a candidate resource plan is generated based on the candidate performance level, and the optimal resource plan is determined from the candidate resource plan according to the constraints and scoring rules. A plan preparation message is broadcast to the satellite speakers, and a plan readiness confirmation is obtained from the satellite speakers. The plan readiness confirmation is obtained based on the plan preparation message. A common effective time is obtained. After the key satellite speakers confirm, the plan is broadcast and submitted. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

2. The method according to claim 1, characterized in that, The step of calculating the exponential moving average based on multidimensional feature time-series data to obtain the moving average values ​​includes: The multidimensional feature time series data is normalized to obtain normalized feature data; The normalized feature data are subjected to exponential moving average calculations to obtain the moving average values.

3. The method according to claim 1, characterized in that, The moving average includes the moving average of the error rate and the moving average of the missing rate; The step of obtaining the group risk value of the synchronized audio group based on the moving average includes: Based on the moving average of the packet error rate, the moving average of the packet loss rate, the number of retransmissions, the buffer risk item, and the single-link synchronization deviation risk item, calculate the single-link risk value for each satellite speaker in the future planning window. Based on the maximum value of each single-link risk value, the bandwidth risk flag, and the group synchronization risk flag, calculate the group risk value. The operating states include stable state, early warning state, and high-risk state. Determining the operating state of the synchronized audio group based on the group risk value and hard triggering conditions includes: If the group risk value is less than the first preset threshold and does not meet the hard trigger condition, it is determined to be a stable state; If, within a first preset number of consecutive collection cycles, the group risk value is greater than or equal to the first preset threshold and the group risk value is less than or equal to the second preset threshold, then it is determined to be a warning state. If the group risk value is greater than the second preset threshold, or if the hard trigger condition is met, then it is determined to be a high-risk state; The hard triggering conditions include the following: Audio underload occurs in any critical channel; The error rate for the second consecutive preset number of collection cycles is greater than or equal to a preset percentage threshold. No status report was received from the satellite speaker for the third consecutive preset number of data collection cycles; The synchronization deviation is greater than or equal to the synchronization deviation threshold.

4. The method according to claim 3, characterized in that, The process of generating candidate resource plans based on candidate performance tiers includes: The physical layer nominal rate is obtained from the available rate table in the protocol stack based on the candidate performance rate; The effective load efficiency is obtained based on the historical statistics of the candidate performance levels. The available capacity of the candidate performance tiers is calculated based on the physical layer nominal rate, the payload efficiency, reserved bandwidth, synchronization-related overhead, and reserved capacity. Calculate the budget usage for each independent audio stream, and calculate the total budget usage based on the budget usage of each independent audio stream, the protocol encapsulation factor, and the retransmission reservation ratio; The difference between the available capacity of the candidate performance level and the total budget usage is taken as the remaining bandwidth of the candidate plan. When the preset screening conditions are met, the candidate resource plan is determined; The preset filtering conditions include: The remaining bandwidth of the candidate plan is greater than or equal to the target value, which is the larger of a first threshold determined according to a preset ratio and the available capacity of the candidate performance level, and a preset absolute threshold. In each acquisition cycle, the single-link risk value of all critical satellite speakers is less than the first preset risk value and does not meet the hard trigger condition; The predicted delivery rate is greater than or equal to the lower limit of the delivery rate. Predicted tail latency is less than or equal to the latency upper limit; The current planned stay duration is greater than or equal to the minimum stay duration, and there exists one of the hard trigger conditions that are met; All satellite speakers declare support for the aforementioned candidate performance levels and redundancy parameters.

5. The method according to claim 4, characterized in that, The step of determining the optimal resource plan from the candidate resource plans based on constraints and scoring rules includes: The score for each candidate resource plan is calculated based on the predicted delivery rate, the first weight, the predicted tail delay, the second weight, the switching cost, the third weight, the synchronization disturbance risk, and the fourth weight. The candidate resource plan that satisfies the constraints and has the highest score is selected as the optimal resource plan. The constraints include: The sum of all audio bitrates and redundancy overhead corresponding to each candidate resource plan is less than or equal to the available capacity of each candidate resource plan. The difference between the time of joint effectiveness and the current time is greater than or equal to the safety window; The method further includes; If no candidate resource plan meets the constraints, a backup resource plan is selected or the coding bitrate of non-critical channels is reduced.

6. The method according to claim 5, characterized in that, To obtain the common effective time, including: The minimum time interval is obtained by summing the actual maximum round-trip time of the plan preparation message, the plan readiness confirmation, and the plan submission, converting the time to the preset beat length and rounding it up, adding the preset buffer beat number, and taking the larger of the preset beat number lower limit. Based on the product of the beat period of the fine synchronization time axis and the minimum time interval, and the current synchronization time, a target time value is determined, and the target time value is aligned with the fine synchronization time axis to obtain the common effective time.

7. The method according to claim 1, characterized in that, The method further includes: Store the current resource plan and the backup resource plan; When any of the following rollback conditions occur, a rollback operation is performed, and the rollback operation carries the future effective time. At the future effective time, the main control device and each of the satellite speakers will switch to the minimum resource plan. Set the minimum dwell time, upshift / downshift hysteresis threshold, and maximum number of switches per unit time; If the hard trigger condition is met, downshifting will be performed immediately; If the actual dwell time is equal to the minimum dwell time, the actual group risk value is less than the first risk threshold, the actual bandwidth margin is greater than the absolute lower limit of the bandwidth margin, there is no audio underload, and upgrade processing is performed. Once the number of handovers per unit time reaches the handover limit, maintain the minimum resource plan and report link quality anomalies. The rollback conditions include: If any key channel experiences an audio underload within the verification window, or if the error rate for the fourth consecutive preset number of acquisition cycles exceeds the rollback error rate threshold; After the current plan takes effect, the group risk value for the fourth consecutive preset number of collection cycles is greater than or equal to the second risk threshold; The following are possible reasons: the critical satellite speaker is not confirmed; the actual application resource plan version number is inconsistent with the submitted plan version number; or the satellite speaker is out of contact during the verification window. The absolute value of the playback synchronization deviation of any key satellite speaker is greater than or equal to the synchronization deviation threshold; The actual bandwidth margin is less than zero, or the actual bandwidth margin is lower than the absolute lower limit threshold of the bandwidth margin for the fifth consecutive preset number of collection cycles.

8. A resource planning switching device, characterized in that, Applied to a main control device, the main control device and multiple satellite speakers form a synchronized audio group, the device comprising: The acquisition module is used to acquire multi-dimensional feature time-series data of each satellite speaker at the acquisition cycle, and to calculate the exponential moving average based on the multi-dimensional feature time-series data to obtain the moving average value. The determination module is used to obtain the group risk value of the synchronized audio group based on the moving average value, and determine the operating status of the synchronized audio group based on the group risk value and the hard trigger condition; The generation module is used to generate candidate resource plans based on candidate performance levels if the operating status of the synchronized audio group is a warning state or a high-risk state, and to determine the optimal resource plan from the candidate resource plans according to the constraints and scoring rules. The switching module is used to broadcast a plan preparation message to the satellite speakers, obtain a plan readiness confirmation returned by the satellite speakers (the plan readiness confirmation is obtained based on the plan preparation message), obtain a common effective time, and broadcast a plan submission after the key satellite speakers confirm the plan. The plan submission includes the common effective time and the resource plan version number corresponding to the optimal resource plan. The main control device and each of the satellite speakers switch to the optimal resource plan corresponding to the resource plan version number at the common effective time.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that executes the resource plan switching method according to any one of claims 1 to 7 when the processor is running.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the resource plan switching method according to any one of claims 1 to 7.