Automatic synchronization method for distributed audio system
By setting up the automatic clock synchronization module in the distributed audio system, the unique clock synchronization packet sending device is automatically enumerated, which solves the clock disorder caused by device failure and network disconnection, and realizes the system's adaptive synchronization and stable transmission.
Patent Information
- Application Number
- CN202110939429.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-16
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-08-16
AI Technical Summary
The existing distributed audio system cannot adaptively synchronize when the equipment of the fixed sending system synchronization packet fails or the network is disconnected, resulting in clock mismatch and unstable transmission, and cannot effectively resolve clock conflict problems when multiple synchronization packets conflict.
Set up the automatic clock synchronization module on each audio device, generate a unique clock synchronization packet sending device through automatic enumeration, send clock synchronization packets regularly, and automatically re-enumerate in case of failure or conflict, ensuring that all devices in the system are unified Clock synchronization.
Adaptive synchronization of distributed audio systems is realized, clock disorder and unstable transmission caused by device failure or network problems, and real-time and stable routing and transmission of audio data is ensured.
Smart Images

Figure CN113922906B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of clock synchronization, and in particular to an automatic synchronization method for a distributed audio system. Background Art
[0002] Figure 1 The existing distributed audio system is shown, including multiple audio devices and a network switching system, and the audio devices are connected to each other through the network switching system. Each audio device is provided with an encoding and decoding module. The audio device that sends the system synchronization packet in the system sends the synchronization packet through its synchronization module. Each audio device receives the synchronization packet and generates a system synchronization clock according to the synchronization packet. The audio device can encode the input audio signal, transmit audio data, and decode the received audio data according to the synchronization clock, and can realize flexible routing transmission of audio such as point-to-point or one-to-many.
[0003] Figure 2 A schematic diagram showing a situation in which an audio device that sends a fixed system synchronization packet fails or the network is disconnected in an existing distributed audio system. Since the audio device that sends a fixed system synchronization packet fails or the network is disconnected, each audio device lacks synchronization packet reception and cannot generate a system synchronization clock, resulting in the inability of each device in the system to encode, transmit, and decode audio, and the inability to perform flexible audio routing transmission.
[0004] Figure 3 The schematic diagram shows the system clock conflict in the existing distributed audio system. When there are multiple devices that send system synchronization packets, synchronization packet sending conflicts will occur. Each device receives multiple synchronization packets at the same time, resulting in disordered and unstable system synchronization clocks, causing each device in the system to encode, transmit, and decode audio asynchronously, often resulting in unstable delays, or unstable distortions such as tearing and noise. Summary of the invention
[0005] The object of the present invention is to provide an automatic synchronization method for a distributed audio system, so that the distributed audio system can adaptively send a unique clock synchronization packet, thereby realizing automatic synchronization of the distributed audio system.
[0006] A distributed audio automatic synchronization method of the present invention is used to perform clock synchronization in a distributed audio system including multiple audio devices, specifically comprising:
[0007] Set up a clock automatic synchronization module on each audio device in the distributed audio system;
[0008] During initial clock synchronization, each audio device in the distributed audio system generates a clock synchronization packet sending device through automatic enumeration;
[0009] After a clock synchronization packet sending device is generated through automatic enumeration, the clock synchronization packet sending device periodically sends the clock synchronization packet through its clock automatic synchronization module, so that other audio devices in the distributed audio system can generate a unified synchronization clock for the system based on the received clock synchronization packet, so that all audio devices in the distributed audio system can operate according to the unified synchronization clock.
[0010] Preferably, each audio device in the distributed audio system generates a clock synchronization packet sending device through automatic enumeration, including:
[0011] The audio device determined as the automatic enumeration initiator sends a synchronous enumeration instruction to other audio devices through the network;
[0012] After receiving the synchronous enumeration instruction, other audio devices in the distributed audio system send their own IDs to the automatic enumeration initiating device;
[0013] After receiving the ID sent by other audio devices, the automatic enumeration initiating device generates a clock synchronization packet sending device according to the pre-stored ID values of all audio devices and predetermined rules, and notifies other audio devices in the distributed audio system.
[0014] Preferably, the audio device in the distributed audio system is determined as the automatic enumeration initiating device in the following manner:
[0015] Each audio device in the distributed audio system determines and saves the audio devices in turn as a queue list of automatic enumeration initiating devices through negotiation;
[0016] When initiating automatic enumeration, the audio device ranked at the head of the pair list serves as the automatic enumeration initiating device; after the automatic enumeration is completed, the pair list is updated, the ranking of all audio devices in the pair list is increased by one, and the automatic enumeration initiating device is ranked at the end of the queue list.
[0017] Preferably, the synchronous enumeration instruction carries the ID of the automatic enumeration initiating device, so that the audio device that receives the synchronous enumeration instruction can determine whether the audio device that issues the synchronous enumeration instruction is ranked at the head of the queue based on the queue table it saves. If so, it is determined that the audio device that issues the synchronous enumeration instruction is the automatic enumeration initiating device and sends its own ID to it.
[0018] Preferably, the predetermined rule includes selecting the audio device with the largest audio device ID value in the distributed audio system as the clock synchronization packet sending device, or selecting the audio device with the smallest audio device ID value in the distributed audio system as the clock synchronization packet sending device.
[0019] Preferably, after automatically enumerating and generating a clock synchronization packet sending device, each audio device changes the ID values of all saved audio devices in a manner such that the maximum ID value becomes the minimum ID value and other ID values increase, or each audio device changes the ID values of all saved audio devices in a manner such that the minimum ID value becomes the maximum ID value and other ID values decrease.
[0020] Preferably, the automatic enumeration initiating device starts an enumeration timer while sending a synchronous enumeration instruction to other audio devices via the network, so as to determine that the enumeration cycle ends when the enumeration timer overflows.
[0021] The distributed audio automatic synchronization method of the present invention also includes:
[0022] During the period of scheduled transmission of the clock synchronization packet sending device, the audio device serving as the alternative clock packet sending device in the distributed audio system performs real-time monitoring on whether the clock synchronization packet sending device fails or is disconnected;
[0023] When it is detected that the clock synchronization packet sending device fails or is offline, the standby clock synchronization packet sending device initiates automatic enumeration to generate a new clock synchronization packet sending device so that the new clock synchronization packet sending device sends the clock synchronization packet through its automatic synchronization module.
[0024] Preferably, when it is detected that the clock synchronization packet sending device fails or is offline, the candidate clock packet sending device initiates automatic enumeration including:
[0025] If the standby clock packet sending device does not receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device fails or is offline;
[0026] When it is determined that the clock synchronization packet sending device fails or is offline, the standby clock packet sending device sends a synchronization enumeration instruction to other audio devices in the distributed audio system to select a new clock synchronization packet sending device.
[0027] Preferably, when it is detected that the clock synchronization packet sending device fails or is offline, the candidate clock packet sending device initiates automatic enumeration including:
[0028] If the standby clock packet sending device does not receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device fails or is offline;
[0029] When it is determined that the clock synchronization packet sending device fails or is offline, the alternative clock synchronization packet sending device starts the synchronization packet receiving timer, and when the synchronization packet receiving timer overflows and the clock synchronization packet sent by the clock synchronization packet sending device is not received, a synchronization enumeration instruction is sent to other audio devices in the distributed audio system to select a new clock synchronization packet sending device.
[0030] The distributed audio automatic synchronization method of the present invention also includes:
[0031] The clock synchronization packet sending device detects whether other clock synchronization packets are received while sending the clock synchronization packets at a fixed time;
[0032] When the device sending the clock synchronization packet receives other clock synchronization, it determines that a conflict occurs in the sending of the clock synchronization packet;
[0033] When it is determined that a conflict occurs in the sending of the clock synchronization packet, the clock synchronization packet sending devices all stop sending the clock synchronization packet, and then automatically enumerate to generate a unique clock synchronization packet sending device to send the clock synchronization packet.
[0034] Compared with the prior art, the technical effects of the present invention include:
[0035] 1) The distributed audio automatic synchronization system can adaptively close or enumerate to generate a unique stable synchronization clock.
[0036] 2) When a fixed device that sends system synchronization packets fails or the network is disconnected, etc., each device in the system adaptively enumerates a unique device, and the device sends a unique system synchronization packet. Each device generates a synchronization clock based on the synchronization packet for synchronous encoding, transmission, and decoding, and the sound can be routed and transmitted in real time and stably.
[0037] 3) When the problem of clock conflict caused by multiple synchronous clocks in the system is solved, each device in the system automatically stops sending synchronization packets, and re-adaptively enumerates a unique device, and the device sends a unique system synchronization packet. Each device generates a synchronization clock according to the synchronization packet for synchronous encoding, transmission, and decoding, and the sound can be routed and transmitted in real time and stably.
[0038] The present invention is described in detail below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the normal operation of the existing distributed audio system;
[0040] Figure 2 It is a schematic diagram of an audio device that sends a system synchronization packet in an existing distributed audio system and fails or the network is disconnected;
[0041] Figure 3is a schematic diagram of system clock conflicts in an existing distributed audio system;
[0042] Figure 4 is a schematic diagram of a distributed audio system of the present invention;
[0043] Figure 5 It is a schematic diagram of the distributed audio system automatic synchronization method of the present invention. DETAILED DESCRIPTION
[0044] Figure 4 The distributed audio system of the present invention is shown. The structural difference between the distributed audio system of the present invention and the existing distributed audio system is that a clock automatic synchronization module for sending clock synchronization packets is set in each audio device.
[0045] The distributed audio automatic synchronization system of the present invention is a method and system based on a distributed audio system, which automatically enumerates multiple devices to generate a unique device to send a synchronization packet, thereby generating a unified synchronization clock for the system, and each device synchronously encodes audio data, transmits audio data, and decodes audio data according to the unified synchronization clock.
[0046] In the system, the device's external synchronization clock (or synchronization packet) can be detected. When the device detects an external synchronization packet, it can adaptively close the synchronization packet transmission and automatically initiate synchronization enumeration (i.e., enumerate a unique device to send a synchronization packet). The above technical features can automatically detect abnormal conditions such as system synchronization clock failure, disconnection, repeated conflicts, and automatically restore the only stable system synchronization clock to ensure the system's audio stable and real-time synchronization encoding, transmission, and decoding.
[0047] Figure 5 The invention discloses a distributed audio system automatic synchronization method for clock synchronization in a distributed audio system including a plurality of audio devices.
[0048] Figure 5 The distributed audio system automatic synchronization method shown includes: setting a clock automatic synchronization module on each audio device in the distributed audio system, see Figure 4 ; During the initial clock synchronization, each audio device in the distributed audio system generates a clock synchronization packet sending device through automatic enumeration; after generating a clock synchronization packet sending device through automatic enumeration, the clock synchronization packet sending device periodically sends the clock synchronization packet through its clock automatic synchronization module, so that other audio devices in the distributed audio system can generate a unified synchronization clock for the system based on the received clock synchronization packet, so that all audio devices in the distributed audio system can operate according to the unified synchronization clock.
[0049] Each audio device in the above-mentioned distributed audio system generates a clock synchronization packet sending device through automatic enumeration, including: the audio device determined as the automatic enumeration initiating device sends a synchronization enumeration instruction to other audio devices through the network; after receiving the synchronization enumeration instruction, the other audio devices in the distributed audio system send their own ID to the automatic enumeration initiating device; after receiving the ID sent by other audio devices, the automatic enumeration initiating device generates a clock synchronization packet sending device according to the pre-saved ID values of all audio devices and predetermined rules, and notifies other audio devices in the distributed audio system.
[0050] In the present invention, each audio device takes turns to act as the automatic enumeration initiating device according to the negotiated rules, rather than a fixed audio device acting as the automatic enumeration initiating device, so as to avoid the situation where the automatic enumeration cannot be initiated when the fixed audio device fails or is disconnected. The specific method can be: each audio device in the distributed audio system determines and saves the queue list of audio devices as automatic enumeration initiating devices in turn through negotiation; when initiating automatic enumeration, the audio device ranked at the head of the queue list acts as the automatic enumeration initiating device, and after the automatic enumeration is completed, the queue list is updated to increase the ranking of all audio devices in the queue list by one, and the automatic enumeration initiating device is ranked at the end of the queue list.
[0051] Table 1 is a list of automatic enumeration initiating device teams determined and saved by each audio device through negotiation. Table 2 is a list of automatic enumeration initiating device teams updated by each audio device after the automatic enumeration is completed.
[0052] Table 1
[0053] 6 (tail) 5 4 3 2 1(first part) Device B3 (ID6) Device B2 (ID5) Device B1 (ID4) Device A3 (ID3) Device A2 (ID2) Device A1 (ID1)
[0054] Table 2
[0055] 6 (tail) 5 4 3 2 1(first part) Device A1 Device B3 Device B2 Device B1 Device A3 Device A2
[0056] In the present invention, other audio devices in the distributed audio system can authenticate the automatic enumeration initiating device when receiving the synchronous enumeration instruction to determine whether it has the right to send a clock synchronization packet, so as to ensure that only one audio device sends a unique synchronous enumeration instruction to the network. The specific method can be: the synchronous enumeration instruction can carry the automatic enumeration initiating device ID or send the automatic enumeration initiating device ID and the synchronous enumeration instruction at the same time, so that the audio device that receives the synchronous enumeration instruction can determine whether the audio device that issues the synchronous enumeration instruction is ranked at the head of the queue according to the queue table it saves. If so, it is determined that the audio device that issues the synchronous enumeration instruction is the automatic enumeration initiating device and sends its own ID to it. Otherwise, it refuses to respond to the synchronous enumeration instruction.
[0057] The predetermined rules for automatic enumeration of the present invention include selecting the audio device with the largest audio device ID value in the distributed audio system as the clock synchronization packet sending device, or selecting the audio device with the smallest audio device ID value in the distributed audio system as the clock synchronization packet sending device, or selecting the audio device with an audio device ID value reaching a specified value in the distributed audio system as the clock synchronization packet sending device.
[0058] In order to prevent the audio device in the distributed audio system from being selected as the clock synchronization packet sending device all the time, after automatically enumerating and generating a clock synchronization packet sending device, each audio device will change the ID values of all the devices it has saved. The specific method can be: after automatically enumerating and generating a clock synchronization packet sending device, each audio device changes the ID values of all the audio devices it has saved in such a way that the maximum ID value becomes the minimum ID value and other ID values increase, or each audio device changes the ID values of all the audio devices it has saved in such a way that the minimum ID value becomes the maximum ID value and other ID values decrease.
[0059] Table 3 is a list of ID values saved by each audio device. Table 4 is a list of ID values updated by each audio device after a clock synchronization packet sending device is automatically enumerated. Table 5 is a list of ID values updated by each audio device after a clock synchronization packet sending device is automatically enumerated.
[0060] Table 3
[0061] ID ID1 ID2 ID3 ID4 ID5 ID6 ID value 1 2 3 4 5 6
[0062] Table 4
[0063] ID ID1 ID2 ID3 ID4 ID5 ID6 ID value 2 3 4 5 6 1
[0064] Table 5
[0065] ID ID1 ID2 ID3 ID4 ID5 ID6 ID value 6 1 2 3 4 5
[0066] In the present invention, the automatic enumeration initiating device sends a synchronous enumeration instruction to other audio devices through the network, and also starts an enumeration timer so as to determine the end of the enumeration cycle when the enumeration timer overflows, and generates a clock synchronization packet sending device when the enumeration cycle is determined to be over.
[0067] In order to solve the technical problem of missing clock synchronization caused by failure or disconnection of the clock synchronization packet sending device in the prior art, the distributed audio automatic synchronization method of the present invention also includes: during the period of scheduled sending of the clock synchronization packet sending device, the audio device serving as an alternative clock packet sending device in the distributed audio system monitors in real time whether the clock synchronization packet sending device fails or is disconnected; when it is detected that the clock synchronization packet sending device fails or is disconnected, the alternative clock packet sending device initiates automatic enumeration to generate a new clock synchronization packet sending device, so that the new clock synchronization packet sending device sends the clock synchronization packet through its automatic synchronization module.
[0068] The alternative clock synchronization packet sending device of the present invention is usually played by the audio device currently ranked at the head of the pair list, such as device A2 in Table 2, and can also be played by all other audio devices that receive the clock synchronization packet. The alternative clock synchronization packet device determines whether the clock synchronization packet sending device fails or is disconnected based on whether the synchronization packet sent by the clock synchronization packet sending device is received on time, and when it is determined that the clock synchronization packet sending device fails or is disconnected, the alternative clock packet sending device initiates automatic enumeration. The specific method can be: if the alternative clock packet sending device does not receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device fails or is disconnected; when it is determined that the clock synchronization packet sending device fails or is disconnected, the alternative clock packet sending device sends a synchronization enumeration instruction to other audio devices in the distributed audio system to select a new clock synchronization packet sending device. Alternatively, if the alternative clock packet sending device fails to receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device has failed or is offline; when it is determined that the clock synchronization packet sending device has failed or is offline, the alternative clock packet sending device starts the synchronization packet receiving timer, and when the synchronization packet receiving timer overflows and the clock synchronization packet sent by the clock synchronization packet sending device is not received, it sends a synchronization enumeration instruction to other audio devices in the distributed audio system to select a new clock synchronization packet sending device.
[0069] In order to solve the technical problem of clock synchronization packet conflict caused by audio device failure, the present invention also develops a conflict resolution mechanism, namely: the clock synchronization packet sending device detects whether other clock synchronization packets are received while sending clock synchronization packets at a fixed time; when the clock synchronization packet sending device receives other clock synchronizations, it determines that the clock synchronization packet conflicts; when it determines that the clock synchronization packet conflicts, the clock synchronization packet sending device stops sending the clock synchronization packet, and then automatically enumerates to generate a unique clock synchronization packet sending device to send the clock synchronization packet. For example, due to some reason (such as software reasons), Figure 4The audio device 1 and the audio device 2 in the embodiment both send clock synchronization packets as clock synchronization packet sending devices. While sending clock synchronization packets at regular intervals, the audio device 1 and the audio device 2 detect whether other audio devices are also sending clock synchronization packets at regular intervals (i.e., the audio device 1 and the audio device 2 that send synchronization packets at regular intervals determine whether synchronization packets sent by other devices are received); when the audio device 1 and the audio device 2 respectively detect that other audio devices are sending clock synchronization packets, they stop sending clock synchronization packets, and the automatic enumeration initiating device specified by the automatic enumeration initiating device queue table sends an automatic enumeration instruction to generate a unique clock synchronization packet sending device to send the clock synchronization packet.
[0070] The above contents of the present invention are described in detail below through specific embodiments.
[0071] Embodiment 1, synchronous automatic enumeration processing :
[0072] Automatically enumerate the initiating device, initiate a synchronous enumeration command to other audio devices in the system through the network, and send the unique ID of the device at a fixed time; and start the enumeration timer. Among them, the unique ID includes but is not limited to: a custom unique number and a unique number associated with the device IP address.
[0073] Other audio devices receive the synchronous enumeration command and send their own unique IDs at the same time;
[0074] When the automatic enumeration initiator receives the unique ID of other devices, it compares the ID with its own unique ID to determine whether it meets the rules and becomes the priority synchronization packet sending device;
[0075] The rules include but are not limited to: the ID value is the smallest, largest, or closest to a certain value in the current system.
[0076] Determine whether the enumeration timer overflows, that is, whether the enumeration cycle ends;
[0077] Confirm that the enumeration timer has overflowed, the enumeration cycle has ended, and the automatic enumeration initiator confirms that the ID is more in line with the rules and becomes the priority synchronization packet sending device. It becomes the only synchronization packet sending device and sends system audio synchronization packets to other devices.
[0078] The method of sending the system audio synchronization packet includes but is not limited to the following: network broadcast packet or multicast packet method;
[0079] Each device receives the synchronization packet, corrects the clock according to the synchronization packet, generates a system unified clock, and samples, encodes, sends or receives, and decodes and outputs the audio with the system clock as a reference.
[0080] For example, audio devices A1-A3 send synchronous enumeration instructions to other encoding devices in the system (through multicast packet transmission), and at the same time periodically send the ID value 1 of device A1 once every second, and start the enumeration timer. Others such as audio device A2 receive the synchronous enumeration instruction, enter the synchronous enumeration process, and send the ID value 2 of device A2, etc. (other audio devices A3, audio devices B1, B2, B3 are processed similarly to A2). Then, audio device A1 receives the ID values of audio devices A2-B3, etc. as 2, 3, 4, 5, 6 respectively. The encoding device determines whether the enumeration timer has overflowed. After confirming that the timer has overflowed, it compares the ID values of audio device A1 with those of other devices received, and determines that the ID value of audio device A1 is the smallest, becoming the priority synchronization packet sending device, and then becomes the only synchronization packet sending device, sending the system audio synchronization packet to other devices. Audio device A2 receives the audio synchronization packet, corrects the device clock according to the synchronization packet, generates a clock consistent with that of audio device A1, samples and encodes the audio input with the clock as a reference, forms audio data, and sends the synchronous network audio data to the network. Audio device B1 receives the synchronization packet, corrects the device clock according to the synchronization packet, generates a clock consistent with that of audio device A1, receives audio data packets with the clock as a reference, and synchronously decodes the audio data into audio output; the processing process of audio device A3 is similar to that of audio device A2; the processing process of audio devices B2 and B3 is similar to that of audio device B2.
[0081] Example 2: Fault disconnection processing :
[0082] The audio device receiving the clock synchronization packet starts a synchronization packet receiving timer, determines whether the timer has overflowed, and determines whether the network audio synchronization packet has not been received;
[0083] Confirm that the timer has not overflowed, continue to loop to determine whether the timer has overflowed, and determine whether the network audio synchronization packet has not been received;
[0084] Confirm that the timer has overflowed and that no network audio synchronization packet has been received, that is, the device has timed out and has not received any network audio synchronization packet, then confirm that a failure or disconnection has occurred in the sending of the system audio synchronization packet, and enter the synchronization automatic enumeration process.
[0085] For example, after audio device A1 fails or drops offline, audio device A2 cyclically starts the synchronization packet receiving timer. When the synchronization packet receiving timer overflows, it is determined that no synchronization packet is received from the start of the confirmation timer to the overflow period. It can be confirmed that the system synchronization packet is missing, and then the synchronization enumeration process is started. The other audio devices A3, B1, B2, and B3 are processed in the same way as above.
[0086] Example 3, conflict handling :
[0087] Solution 1:
[0088] The audio device sending the synchronization packet determines whether the network audio synchronization packet is received;
[0089] If it is confirmed that the network audio synchronization packet has been received, it is determined that the synchronization packet conflicts, and the sending of the synchronization packet is stopped, and the synchronization automatic enumeration process is entered.
[0090] Solution 2:
[0091] Each audio device in the distributed audio system determines whether a network audio synchronization packet is received;
[0092] If it is confirmed that the network audio synchronization packet has been received, it is determined whether the device is in a synchronization packet sending state;
[0093] If it is confirmed that the device is in the state of sending synchronization packets, it is determined that a synchronization packet conflict occurs, the sending of synchronization packets is stopped, and the synchronization automatic enumeration process is entered.
[0094] For example, audio devices A1 and A2 determine whether they have received the network audio synchronization packet and confirm that the audio synchronization packet has been received; audio devices A1 and A2 then determine whether the device is in the synchronization packet sending state and confirm that the device is in the synchronization packet sending state, then it can be determined that the system audio synchronization packet conflicts. At this time, audio devices A1 and A2 stop sending synchronization packets and enter the synchronization automatic enumeration process.
[0095] Although the present invention is described in detail above, the present invention is not limited thereto, and those skilled in the art can make various modifications based on the principles of the present invention. Therefore, all modifications made based on the principles of the present invention should be understood to fall within the protection scope of the present invention.
Claims
1. A distributed audio automatic synchronization method for clock synchronization in a distributed audio system including a plurality of audio devices, comprising: Set up a clock automatic synchronization module on each audio device in the distributed audio system; During initial clock synchronization, the audio device determined as the automatic enumeration initiator sends a synchronization enumeration instruction to other audio devices via the network; After receiving the synchronous enumeration instruction, other audio devices in the distributed audio system send their own IDs to the automatic enumeration initiating device; After receiving the ID sent by other audio devices, the automatic enumeration initiating device generates a clock synchronization packet sending device according to the ID values of all audio devices stored in advance and the predetermined rules, and notifies other audio devices in the distributed audio system; The clock synchronization packet sending device sends the clock synchronization packet regularly through its clock automatic synchronization module, so that other audio devices in the distributed audio system generate a unified synchronization clock of the system according to the received clock synchronization packet, so that all audio devices in the distributed audio system operate according to the unified synchronization clock; The audio device in the distributed audio system determines the automatic enumeration initiating device in the following manner: Each audio device in the distributed audio system determines and saves the audio devices in turn as a queue list of automatic enumeration initiating devices through negotiation; When initiating automatic enumeration, the audio device ranked at the head of the queue table serves as the automatic enumeration initiating device; After the automatic enumeration is completed, the queue table is updated, the ranking of all audio devices in the queue table is incremented by one, and the automatic enumeration initiating device is ranked at the end of the queue table.
2. The distributed audio automatic synchronization method according to claim 1, wherein: The synchronous enumeration instruction carries the ID of the automatic enumeration initiating device, so that the audio device that receives the synchronous enumeration instruction can determine whether the audio device that issues the synchronous enumeration instruction is ranked at the head of the queue based on the queue table it saves. If so, it is determined that the audio device that issues the synchronous enumeration instruction is the automatic enumeration initiating device and sends its own ID to it.
3. The distributed audio automatic synchronization method according to claim 1 or 2, wherein: The predetermined rule includes selecting the audio device with the largest audio device ID value in the distributed audio system as the clock synchronization packet sending device, or selecting the audio device with the smallest audio device ID value in the distributed audio system as the clock synchronization packet sending device.
4. The distributed audio automatic synchronization method according to claim 3, wherein: After a clock synchronization packet sending device is generated through automatic enumeration, each audio device changes the ID values of all saved audio devices in a manner such that the maximum ID value becomes the minimum ID value and other ID values increase, or each audio device changes the ID values of all saved audio devices in a manner such that the minimum ID value becomes the maximum ID value and other ID values decrease.
5. The distributed audio automatic synchronization method according to claim 3, wherein: The automatic enumeration initiating device sends a synchronous enumeration instruction to other audio devices through the network and also starts an enumeration timer so as to determine that the enumeration cycle ends when the enumeration timer overflows.
6. The distributed audio automatic synchronization method according to claim 1, further comprising: During the period of scheduled transmission of the clock synchronization packet sending device, the audio device serving as the alternative clock packet sending device in the distributed audio system performs real-time monitoring on whether the clock synchronization packet sending device fails or is disconnected; When it is detected that the clock synchronization packet sending device fails or is offline, the standby clock synchronization packet sending device initiates automatic enumeration to generate a new clock synchronization packet sending device so that the new clock synchronization packet sending device sends the clock synchronization packet through its automatic synchronization module.
7. The distributed audio automatic synchronization method according to claim 6, wherein: When it is detected that the clock synchronization packet sending device fails or is offline, the standby clock packet sending device initiates automatic enumeration including: If the standby clock packet sending device does not receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device fails or is offline; When it is determined that the clock synchronization packet sending device fails or is offline, the standby clock packet sending device sends a synchronization enumeration instruction to other audio devices in the distributed audio system to select a new clock synchronization packet sending device.
8. The distributed audio automatic synchronization method according to claim 6, wherein: When it is detected that the clock synchronization packet sending device fails or is offline, the standby clock packet sending device initiates automatic enumeration including: If the standby clock packet sending device does not receive the clock synchronization packet sent by the clock synchronization packet sending device on time, it is determined that the clock synchronization packet sending device fails or is offline; When it is determined that the clock synchronization packet sending device fails or is offline, the alternative clock synchronization packet sending device starts the synchronization packet receiving timer, and when the synchronization packet receiving timer overflows and the clock synchronization packet sent by the clock synchronization packet sending device is not received, a synchronization enumeration instruction is sent to other audio devices in the distributed audio system to select a new clock synchronization packet sending device.
9. The distributed audio automatic synchronization method according to claim 1 or 6, further comprising: The clock synchronization packet sending device detects whether other clock synchronization packets are received while sending the clock synchronization packets at a fixed time; When the device sending the clock synchronization packet receives other clock synchronization, it determines that a conflict occurs in the sending of the clock synchronization packet; When it is determined that a conflict occurs in the sending of the clock synchronization packet, the clock synchronization packet sending devices all stop sending the clock synchronization packet, and then automatically enumerate to generate a unique clock synchronization packet sending device to send the clock synchronization packet.