Wireless microphone multi-component serial number synchronization and USB and BLE identity matching method
Patent Information
- Application Number
- CN202611476712.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本发明的目的在于提供一种无线麦克风多部件序列号同步及USB与BLE身份匹配方法,以克服现有技术中无线麦克风系统多部件身份匹配易受序列号字符串混淆影响、缺少时间同步和交叉验证的问题,借助无线通信活动中的信道驻留时间顺序和USB枚举、BLE广播序列号的时间窗口重叠关系,实现自动、可靠的部件身份绑定
[0060]在获得各部件通信活动记录后,从连续广播事件中统计同一信道的驻留时长,按照驻留时长从短至长分配同步序号,并将同步序号、部件序列号、设备地址、广播信道索引和广播时间戳组合成同步序列号集合,封装在BLE广播数据包的厂商自定义字段中。采用该方式后,原本仅以静态字符串形式存在的部件序列号被赋予与无线通信活动时间顺序相关的同步信息,不同部件之间由此具有可比较的时间排序基准。当多个部件同时进行BLE广播且序列号相同或相近时,信道驻留时间顺序形成额外区分维度,避免了因序列号字符串相同而无法识别部件。同步序列号集合中同时包含设备地址和广播时间戳,使得后续匹配过程能够在同一时间轴上关联有线枚举和无线广播数据,降低了身份误判概率。
Smart Images

Figure CN122994766A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless microphone communication technology, specifically to a method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities. Background Technology
[0002] A wireless microphone system typically consists of multiple components, including a transmitter, receiver, and USB adapter. Each component needs to connect to the host via a wired USB interface and communicate via a BLE wireless interface. Each component has its own serial number, but this serial number exists in different forms during the USB enumeration and BLE broadcast phases. During USB enumeration, the host reads the serial number string using device descriptors, configuration descriptors, and string descriptors. During BLE broadcast, the serial number field is also carried in the broadcast payload. In applications where multiple components are connected simultaneously, it is necessary to map the serial number obtained from USB enumeration to the serial number observed in BLE broadcast to the same physical component to complete component identification and subsequent management.
[0003] In existing technologies, serial numbers of each component are typically recorded manually, or a simple match is performed based solely on the serial number string. When multiple components are powered on simultaneously or perform BLE broadcasting at the same time, manual recording is prone to errors and omissions, while relying solely on serial number string matching can lead to confusion due to duplicate serial numbers, inconsistent formats, or unstable reading order. Furthermore, the USB enumeration process and the BLE broadcasting process occur independently, lacking a unified time reference and cross-validation methods, making the association between wired and wireless identities unreliable. The channel dwell time sequence during wireless communication activities is not used to form a synchronization basis, and the USB enumeration timestamp and the BLE broadcast reception timestamp are not compared on the same timeline, resulting in an inability to effectively distinguish between multiple components with similar identities.
[0004] The aforementioned deficiencies in the existing technology make it impossible to automatically and accurately match USB wired enumeration identities with BLE wireless broadcast identities when multiple components of a wireless microphone system are operating simultaneously. Especially when multiple components have the same or similar serial numbers and broadcast channel transition patterns are similar, relying solely on serial number strings cannot provide sufficient differentiation. Furthermore, the lack of mechanisms for synchronization using communication activity time information and cross-verification using overlapping multi-source time windows makes identity matching results susceptible to interference and difficult to meet practical application requirements. Summary of the Invention
[0005] The purpose of this invention is to provide a method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities, so as to overcome the problems of serial number string confusion, lack of time synchronization and cross-validation in the existing technology of multi-component identity matching of wireless microphone systems. By leveraging the channel dwell time sequence in wireless communication activities and the overlapping time windows of USB enumeration and BLE broadcast serial numbers, automatic and reliable component identity binding can be achieved.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities, comprising:
[0007] The wireless signal of each component in the matched wireless microphone system is monitored to obtain the communication activity record, component serial number and device address of each component on the preset frequency band;
[0008] Based on the channel dwell time sequence in the communication activity record, the component serial number is mapped to a set of synchronization serial numbers;
[0009] When a USB connection is established, obtain the set of wired enumeration serial numbers;
[0010] During BLE broadcasting, obtain the set of wireless broadcast sequence numbers;
[0011] The identity of the matching component is determined based on the time window overlap relationship between the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set.
[0012] The matching component identity is bound to the corresponding component serial number to generate a matching result.
[0013] The above method compares the communication activity records obtained from wireless signal monitoring, the USB enumeration serial number, and the BLE broadcast serial number in the same time window. It uses the overlap of the three in time to determine the identity of the component. This ensures that when multiple components coexist in a wireless microphone system, the component serial number enumerated on the USB side can reliably correspond to the component serial number exposed on the BLE broadcast side, reducing identity mismatch caused by different serial number sources and time asynchrony.
[0014] Preferably, the communication activity records, component serial numbers, and device addresses of each component on a preset frequency band are obtained, including:
[0015] Listen to the BLE broadcast packets emitted by each component on the preset frequency band, obtain the broadcast timestamp, broadcast channel index and device address from the BLE broadcast packets, and extract the component sequence number field from the broadcast payload;
[0016] The broadcast channel index, device address, and component serial number fields are arranged into the communication activity record according to the order of the broadcast timestamps.
[0017] The serial number of each component is obtained by extracting consecutive broadcast segments from the communication activity record according to the device address.
[0018] Furthermore, the broadcast channel index, device address, and component serial number fields are arranged into the communication activity record according to the order of the broadcast timestamps, including:
[0019] Convert the broadcast timestamp in each BLE broadcast packet into a uniform clock scale value;
[0020] The broadcast channel index, device address, and component serial number fields are arranged sequentially in the direction of increasing clock scale values.
[0021] When two adjacent clock scale values are equal, the order of the corresponding fields is adjusted according to the order of the broadcast channel index to obtain the communication activity record.
[0022] By unifying the clock scale and adjusting the synchronous recording using the channel index, the broadcast activity records of multiple components are kept orderly and comparable on the timeline.
[0023] As a technical solution of the present invention, the component serial number is mapped to a set of synchronization serial numbers according to the channel dwell time order in the communication activity record, including:
[0024] The dwell time of each component on the same channel during continuous broadcast events is calculated from the communication activity records.
[0025] According to the dwell time in ascending order, each component serial number is assigned an incrementing synchronization sequence number;
[0026] The synchronization sequence number, component sequence number, device address, broadcast channel index, and broadcast timestamp are combined into a synchronization sequence number list;
[0027] The synchronization sequence number list is encapsulated in the vendor-defined field of the BLE broadcast data packet to form the synchronization sequence number set.
[0028] Furthermore, the dwell time of each component on the same channel during continuous broadcast events is statistically analyzed from the communication activity records, including:
[0029] For each component, extract broadcast event segments with consecutively identical channel indices from the communication activity record;
[0030] The difference between the first and last broadcast timestamps in each broadcast event segment is recorded as the single dwell time.
[0031] The duration of each single dwell time is summed to obtain the dwell time of the component in the communication activity record.
[0032] By generating synchronization sequence numbers according to dwell time, different components have distinguishable sequential characteristics in the synchronization sequence number set. At the same time, the device address, channel index and timestamp are retained, providing a basis for subsequent matching with the time window of USB enumeration and BLE broadcast records.
[0033] Preferably, when the USB connection is established, a set of wired enumeration serial numbers is obtained, including:
[0034] When a USB connection is established, monitor the USB control transmission process between the host and the wireless microphone system.
[0035] Extract the serial number string corresponding to each component from the device descriptor request, configuration descriptor request, and string descriptor request in the USB control transmission process;
[0036] Record the enumerated timestamp corresponding to each of the aforementioned sequence number strings;
[0037] The serial number strings read under the same enumeration timestamp prefix are classified into the wired enumeration serial number set.
[0038] Furthermore, the sequence number strings read under the same enumeration timestamp prefix are categorized into the wired enumeration sequence number set, including:
[0039] Extract the high-order timestamp prefix from each of the enumerated timestamps;
[0040] Sequence number strings with the same high-order timestamp prefix are grouped into the same temporary group;
[0041] According to the order of the high-order timestamp prefix, the sequence number strings in the temporary group are sequentially written into the receive buffer corresponding to the USB interrupt endpoint to obtain the wired enumeration sequence number set.
[0042] Binding the serial number string to the enumeration timestamp during the USB enumeration phase enables the wired identity information read by the host to be matched with the time information, facilitating participation in subsequent three-set time window overlap matching.
[0043] Preferably, during the BLE broadcasting process, a set of wireless broadcast sequence numbers is obtained, including:
[0044] During BLE broadcasting, a continuous scan event is initiated, and the scanned BLE broadcast packets and their reception timestamps are recorded in each continuous scan event;
[0045] Obtain the broadcast channel index from each BLE broadcast packet, parse the broadcast sequence number field from its broadcast payload, and calculate the broadcast transmission interval based on the received timestamp;
[0046] Based on the broadcast transmission interval and the device address in the BLE broadcast packet, multiple broadcast sequence number fields, broadcast channel index and reception timestamps sent consecutively from the same device address are merged into a wireless broadcast sequence number record;
[0047] The wireless broadcast sequence number records are arranged according to the reception time to obtain the wireless broadcast sequence number set.
[0048] By merging BLE broadcast sequence numbers using broadcast transmission intervals and device addresses, a wireless broadcast sequence number time record bound to the device address can be formed, improving the reliability of the correspondence between the wireless side sequence number and the component identity.
[0049] Preferably, the matching component identity is determined based on the time window overlap relationship between the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set, including:
[0050] Each sequence number in the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set is marked with a time window according to its corresponding timestamp.
[0051] Sequence numbers that have a common time intersection in the three time windows are grouped into the same candidate matching group, and the common time intersection is used as the corresponding time window of the sequence number in the candidate matching group.
[0052] Select a serial number that exists in all three sets of synchronization serial numbers, wired enumeration serial numbers, and wireless broadcast serial numbers from the candidate matching group, and use the device address corresponding to the serial number as the identity of the matchable component.
[0053] Further, selecting a sequence number from the candidate matching group that exists in the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set, and using the device address corresponding to the sequence number as the matchable component identity, includes:
[0054] For each sequence number in the candidate matching group, the broadcast channel index and device address associated with that sequence number are extracted from the synchronization sequence number set and the wireless broadcast sequence number set, respectively.
[0055] Extract the enumeration timestamp corresponding to the sequence number from the set of wired enumeration sequence numbers;
[0056] The device address corresponding to the sequence number whose two broadcast channel indices are the same, whose two device addresses are identical, and whose enumeration timestamp belongs to the time window corresponding to the sequence number in the candidate matching group, is used as the matching component identity.
[0057] By cross-validating candidate sequence numbers through common time intersection, broadcast channel index consistency, and device address consistency, temporary sequence numbers that only appear on a single channel can be eliminated, ensuring that the matched component identities simultaneously meet the time and address constraints of both wired enumeration and wireless broadcasting.
[0058] The matching component identity is bound to the corresponding component serial number to generate a matching result, so that multiple components in the wireless microphone system are mapped to the same component serial number on both the USB enumeration and BLE broadcast channels, which facilitates device management and status synchronization with a unified identity.
[0059] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0060] After obtaining the communication activity records of each component, the dwell time on the same channel is counted from continuous broadcast events. Synchronization sequence numbers are assigned according to the dwell time from shortest to longest. The synchronization sequence number, component sequence number, device address, broadcast channel index, and broadcast timestamp are combined into a synchronization sequence number set, which is encapsulated in a vendor-defined field of the BLE broadcast data packet. Using this method, the component sequence number, which originally existed only as a static string, is given synchronization information related to the time sequence of wireless communication activities, thus providing a comparable time ordering basis between different components. When multiple components broadcast BLE simultaneously with the same or similar sequence numbers, the channel dwell time order provides an additional distinguishing dimension, preventing component identification due to identical sequence number strings. The synchronization sequence number set includes both the device address and the broadcast timestamp, allowing the subsequent matching process to correlate wired enumeration and wireless broadcast data on the same timeline, reducing the probability of misidentification.
[0061] Each serial number in the synchronization serial number set, wired enumeration serial number set, and wireless broadcast serial number set is marked with a time window according to its corresponding timestamp. Serial numbers with a common time intersection in the three time windows are grouped into the same candidate matching group. Serial numbers that appear in all three sets are selected from the candidate matching group, and the device address associated with the serial number is used as the matchable component identity, which is then bound to the component serial number. With this method, USB enumeration serial numbers and BLE broadcast serial numbers are no longer isolated strings, but are cross-validated through the overlap of time windows. Even if a serial number appears multiple times in a single set, it will not be incorrectly classified into the same component as long as its time window does not have a common intersection with records in the other two sets. This time intersection-based filtering mechanism reduces mismatches when relying solely on serial number string matching, enhances the accuracy and anti-interference capability of identity matching when multiple components are working simultaneously, and can automatically complete the association between wired and wireless identities, reducing the workload and error risk of manual verification. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0063] Figure 1 This is a flowchart of the method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities;
[0064] Figure 2 This is a flowchart of the method for generating a set of wired enumeration sequence numbers;
[0065] Figure 3 This is a flowchart of the method for obtaining the wireless broadcast sequence number set;
[0066] Figure 4 It is a scatter plot showing the time window matching of synchronization sequence number, wired enumeration sequence number and wireless broadcast sequence number. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0068] See Figure 1This invention provides a method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities, including:
[0069] The wireless signal of each component in the matched wireless microphone system is monitored to obtain the communication activity record, component serial number and device address of each component on the preset frequency band;
[0070] Based on the channel dwell time sequence in the communication activity record, the component serial number is mapped to a set of synchronization serial numbers;
[0071] When a USB connection is established, obtain the set of wired enumeration serial numbers;
[0072] During BLE broadcasting, obtain the set of wireless broadcast sequence numbers;
[0073] The identity of the matching component is determined based on the time window overlap between the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set.
[0074] The matching component identity is bound to the corresponding component serial number to generate the matching result.
[0075] In practice, multiple components in the wireless microphone system transmit BLE broadcast packets on a preset frequency band. This preset frequency band covers the 2.4GHz band where the BLE broadcast channels are located, including three broadcast channels: 2402MHz, 2426MHz, and 2480MHz. Wireless signal monitoring is performed by scanning the preset frequency band using the RF receiving module. After capturing the BLE broadcast packets, the RF receiving module extracts the broadcast timestamp, broadcast channel index, and device address from the packets, and also extracts the component serial number field from the broadcast payload.
[0076] The broadcast timestamp is the time value recorded by the local clock when the RF receiver module receives the BLE broadcast packet. The broadcast channel index is the broadcast channel number used when the BLE broadcast packet is transmitted. The broadcast channel index value is 0, 1, or 2, corresponding to the three broadcast channels 2402MHz, 2426MHz, and 2480MHz, respectively. The device address is the broadcast device address field in the BLE broadcast packet header, and the broadcast device address field is 48 bits long. The component serial number field is located at a pre-agreed offset position in the broadcast payload of the BLE broadcast packet. The component serial number field is used to identify the components in the wireless microphone system.
[0077] The broadcast timestamp in each BLE broadcast packet is converted to a uniform clock scale value. The conversion process uses the following formula:
[0078]
[0079] in, This represents the normalized clock scale value. This represents the original broadcast timestamp value obtained from the BLE broadcast packet. Indicates the preset reference timestamp. This indicates the preset clock interval. Retrieve the time value recorded by the local clock at the start of wireless signal monitoring. Identify and save this information when wireless signal monitoring begins. The time interval is set to 1 microsecond because the local clock timestamp record has a resolution of 1 microsecond, and 1 microsecond is less than the lower limit of the BLE broadcast packet transmission interval, which can preserve the time sequence between BLE broadcast packets.
[0080] In practice, the normalized clock scale values are arranged in ascending order. During the arrangement process, the broadcast channel index, device address, and component serial number fields corresponding to the BLE broadcast packet are treated as a single communication activity record, arranged in ascending order of the normalized clock scale value. When the normalized clock scale value is equal in two adjacent communication activity records, the order of the two adjacent communication activity records is adjusted according to the ascending order of the broadcast channel index. The ascending order of the broadcast channel index is 0, 1, 2. The resulting communication activity record is then obtained.
[0081] In some embodiments, communication activity records are stored in list form, and each record contains a normalized clock scale value, a broadcast channel index, a device address, and a component serial number field. The normalized clock scale value in the communication activity record is incremented.
[0082] The communication activity records are extracted as continuous broadcast segments for each component based on its device address. Specifically, the communication activity records are traversed, and records with the same device address are grouped into the same set of records corresponding to the same component. For the same set of records corresponding to the same component, they are arranged in ascending order of normalized clock scale values to form continuous broadcast segments. The component serial number field is extracted from the continuous broadcast segments and used as the component serial number of the corresponding component. When multiple identical component serial number fields appear in a continuous broadcast segment, only one component serial number field is retained as the component serial number of the corresponding component. Finally, the communication activity records, component serial numbers, and device addresses of each component in the wireless microphone system on the preset frequency band are obtained.
[0083] In practice, broadcast event segments with consecutively identical channel indices are extracted from the communication activity record. The communication activity record consists of multiple records, each containing a normalized clock scale value, broadcast channel index, device address, and component serial number. For each component in the wireless microphone system, all records corresponding to that component are traversed in the communication activity record in ascending order of the normalized clock scale value. When two adjacent communication activity records have the same broadcast channel index, these two records are grouped into the same broadcast event segment; when the broadcast channel index changes, the current broadcast event segment ends, and a new broadcast event segment begins. A broadcast event segment consists of one or more consecutive records, and all records within the same broadcast event segment have the same broadcast channel index.
[0084] For each broadcast event segment, the difference between the normalized clock scale value of the last broadcast timestamp and the normalized clock scale value of the first broadcast timestamp in the broadcast event segment is multiplied by a preset clock scale interval and recorded as the single dwell time. The single dwell time is calculated using the following formula:
[0085]
[0086] in, This indicates the duration of a single stay, measured in microseconds. This represents the normalized clock scale value (dimensionless) corresponding to the last broadcast timestamp in a broadcast event segment. This represents the normalized clock scale value (dimensionless) corresponding to the first broadcast timestamp in the broadcast event segment. This indicates the preset clock interval, in microseconds, with a value of 1 microsecond. and All were read from the communication activity log, and Greater than or equal to Since the time interval of the normalized clock scale values is 1 microsecond, The unit is microsecond.
[0087] The dwell time of a component in the communication activity record is obtained by summing up the single dwell times corresponding to all broadcast event segments of the same component in the communication activity record. The summation process involves sequentially reading all single dwell times of a component in the wireless microphone system, adding up all single dwell times, and the summation result is the dwell time of that component in the communication activity record.
[0088] In practice, after obtaining the dwell time of all components in the wireless microphone system from the communication activity records, an incremental synchronization number is assigned to each component serial number in ascending order of dwell time. The component serial number with the shortest dwell time is assigned synchronization number 1, the next shortest is assigned synchronization number 2, the third shortest is assigned synchronization number 3, and so on, until all component serial numbers in the wireless microphone system have been assigned synchronization numbers. The synchronization numbers are incremental integers, starting from 1 and increasing consecutively.
[0089] In some embodiments, the synchronization sequence number, component serial number, device address, broadcast channel index, and broadcast timestamp are combined into a synchronization sequence number list. For each component, the synchronization sequence number, component serial number, and device address corresponding to the component are read, along with each broadcast channel index and broadcast timestamp corresponding to the component in the communication activity record. The synchronization sequence number, component serial number, device address, and a broadcast channel index and broadcast timestamp are combined into a synchronization sequence number list item. All synchronization sequence number list items for the same component are summarized to obtain the synchronization sequence number list corresponding to that component. The synchronization sequence number lists of all components in the wireless microphone system form a synchronization sequence number list set.
[0090] A synchronization sequence number list is encapsulated in the vendor-defined fields of the BLE broadcast data packet to form a synchronization sequence number set. The broadcast payload of the BLE broadcast data packet contains vendor-defined fields, including a vendor identifier field and a vendor-defined data field. The synchronization sequence number list is written into the vendor-defined data field according to a predetermined encoding format, which includes the order of synchronization sequence number, component sequence number, device address, broadcast channel index, and broadcast timestamp. The encapsulated BLE broadcast data packet is broadcast through a component in the wireless microphone system. The receiving side parses the synchronization sequence number list from the vendor-defined fields of the BLE broadcast data packet to obtain the synchronization sequence number set.
[0091] In specific implementation, please refer to Figure 2When a USB connection is established, the system monitors the USB control transmission process between the host and the wireless microphone system. The monitoring location is set on the connection line between the host and wireless microphone system on the USB bus, achieved by connecting a USB protocol analyzer in parallel to the USB differential signal line. The USB protocol analyzer captures USB control transmission packets during the USB control transmission process and records the capture time. The USB control transmission process includes device descriptor requests, configuration descriptor requests, and string descriptor requests. Device descriptor requests are used by the host to read the device descriptor, configuration descriptor requests are used by the host to read the device's configuration descriptor, and string descriptor requests are used by the host to read the string descriptor in the device, where the string descriptor includes a serial number string.
[0092] The serial number string corresponding to each component is extracted from the device descriptor request, configuration descriptor request, and string descriptor request during the USB control transfer process. In the string descriptor request, the serial number string is located in the string content field of the string descriptor. The first two bytes of the string descriptor represent the string descriptor length and string descriptor type, respectively, and the string content field starts from the third byte. The USB protocol analyzer parses the response packet of the string descriptor request, reads the string descriptor type field, and extracts the serial number string from the string content field when the value of the string descriptor type field is a serial number string type. In the device descriptor request and configuration descriptor request, if the device descriptor or configuration descriptor contains a serial number index field, this serial number index field is recorded, and the serial number string is retrieved from subsequent string descriptor requests based on the serial number index field.
[0093] Record the enumeration timestamp corresponding to each serial number string. The enumeration timestamp is the local clock time when the USB protocol analyzer captures a response packet containing a USB control transfer packet with a serial number string. When the USB protocol analyzer captures a response packet containing a serial number string, it reads the local clock time and uses the read local clock time as the enumeration timestamp. The local clock time is recorded in microseconds.
[0094] Extract the high-order timestamp prefix from each enumerated timestamp. The high-order timestamp prefix is calculated using the following formula:
[0095]
[0096] in, Indicates the high-order timestamp prefix. This represents the enumerated timestamp corresponding to the serial number string. This indicates the preset enumeration time window length. This indicates the floor function. The unit is microsecond. The value is 500 microseconds. The 500-microsecond interval is chosen because during the USB connection establishment process of the wireless microphone system, the time interval between device descriptor requests, configuration descriptor requests, and string descriptor requests in the same batch is less than 500 microseconds, while the time interval between different batch enumeration processes is greater than 500 microseconds. The unit is microsecond. It is an integer representing the sequence number of the 500-microsecond time window into which the timestamp falls.
[0097] Serial number strings with the same high-order timestamp prefix are grouped into the same temporary group. Specifically, the enumeration timestamps corresponding to all serial number strings are traversed, the high-order timestamp prefix corresponding to each enumeration timestamp is calculated, and serial number strings with the same high-order timestamp prefix are placed into the same temporary group. The temporary group is identified by the high-order timestamp prefix, and serial number strings within the same temporary group belong to the same batch of enumeration processes.
[0098] Following the order of the high-order timestamp prefixes, the sequence number strings in the temporary packets are sequentially written into the receive buffer corresponding to the USB interrupt endpoint, resulting in a wired enumeration sequence number set. The high-order timestamp prefixes are arranged in ascending order. For each temporary packet, the sequence number strings within the temporary packet are written into the receive buffer corresponding to the USB interrupt endpoint in the order they were captured. The receive buffer corresponding to the USB interrupt endpoint is located inside the USB interface circuit of the wireless microphone system and is used to store the wired enumeration sequence number set. After writing, the sequence number strings in the receive buffer are arranged in the order of the high-order timestamp prefixes, and all the sequence number strings in the receive buffer constitute the wired enumeration sequence number set.
[0099] In specific implementation, please refer to Figure 3 During BLE broadcasting, a continuous scan event is initiated. This continuous scan event is executed continuously by the RF receiving module at a preset scan period. The preset scan period is 1 millisecond, based on the fact that the minimum transmission interval of BLE broadcast packets is 20 milliseconds. A 1-millisecond preset scan period ensures that at least one scan window exists within each BLE broadcast packet transmission cycle, thus capturing the BLE broadcast packet. In each continuous scan event, the scanned BLE broadcast packet and its reception timestamp are recorded. The reception timestamp is the time value recorded by the local clock when the RF receiving module captures the BLE broadcast packet during the scan event, stored in microseconds.
[0100] The broadcast channel index is obtained from each BLE broadcast packet, and the broadcast sequence number field is parsed from its broadcast payload. The broadcast channel index is the broadcast channel number field in the BLE broadcast packet header, with a value of 0, 1, or 2, corresponding to the three broadcast channels 2402MHz, 2426MHz, and 2480MHz, respectively. The broadcast sequence number field is located at a pre-agreed offset position in the BLE broadcast packet's broadcast payload and is used to identify the broadcast sequence number during the BLE broadcast process. The broadcast sequence number field is read from the BLE broadcast packet's broadcast payload to obtain its value, which is then used as the broadcast sequence number.
[0101] The broadcast interval is calculated based on the received timestamps. To calculate the broadcast interval, first, based on the device address in the BLE broadcast packets, BLE broadcast packets with the same device address are arranged in ascending order of their received timestamps, resulting in a sequence of received timestamps corresponding to the same device address. For two adjacent received timestamps within the sequence corresponding to the same device address, the broadcast interval is calculated using the following formula:
[0102]
[0103] in, Indicates the broadcast transmission interval, in microseconds; This indicates the sequence of received timestamps corresponding to the same device address. The timestamp corresponding to the reception of each BLE broadcast packet. This indicates the sequence of received timestamps corresponding to the same device address. The timestamp corresponding to the reception of each BLE broadcast packet. It is an integer greater than 1. and All data is read from the received timestamp sequence, in microseconds. This is the difference in timestamps between two adjacent BLE broadcast packets, used to represent the time interval between BLE broadcast packet transmissions. Starting from 2, increment sequentially to calculate the broadcast transmission interval of all adjacent BLE broadcast packets corresponding to the same device address.
[0104] In practice, based on the broadcast transmission interval and the device address in the BLE broadcast packet, multiple consecutive broadcast sequence number fields, broadcast channel indexes, and receive timestamps from the same device address are merged into a wireless broadcast sequence number record. For the same device address, when the calculated broadcast transmission interval falls within a preset broadcast interval range, the corresponding adjacent BLE broadcast packets are determined to belong to a consecutive broadcast sequence from the same device address. The preset broadcast interval range is 20 milliseconds to 10.24 seconds, based on the minimum value of the BLE broadcast transmission interval being 20 milliseconds and the maximum value being 10.24 seconds. For multiple consecutive BLE broadcast packets from the same device address, the broadcast sequence number field, broadcast channel index, and receive timestamp in each BLE broadcast packet are read, and these fields are combined into a single wireless broadcast sequence number record. The three data items within the same wireless broadcast sequence number record originate from the same BLE broadcast packet.
[0105] In some embodiments, the radio broadcast sequence number records are arranged according to their reception time to obtain a set of radio broadcast sequence numbers. During arrangement, the reception timestamp in the radio broadcast sequence number record is used as the sorting basis, with the record having a smaller reception timestamp placed first, and the record having a larger reception timestamp placed last. When two radio broadcast sequence number records have the same reception timestamp, they are arranged in ascending order of broadcast channel index, which is 0, 1, 2. The resulting set of radio broadcast sequence numbers is then obtained.
[0106] In practice, each sequence number in the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set is marked with a time window according to its corresponding timestamp. The timestamp corresponding to each sequence number in the synchronization sequence number set is the broadcast timestamp in the synchronization sequence number list. The timestamp corresponding to each sequence number in the wired enumeration sequence number set is the enumeration timestamp. The timestamp corresponding to each sequence number in the wireless broadcast sequence number set is the reception timestamp.
[0107] The default matching window length is 2000 microseconds, based on the premise that the time deviation between the enumeration timestamp generated during the same USB enumeration process and the corresponding reception timestamp in the same BLE broadcast record in the wireless microphone system is less than 2000 microseconds, while the time deviation between different matching processes is greater than 2000 microseconds. For each sequence number, the start time of the time window is the corresponding timestamp minus 1000 microseconds, and the end time of the time window is the corresponding timestamp plus 1000 microseconds.
[0108] In some embodiments, the common intersection length of the three time windows is calculated. The common intersection length is calculated using the following formula:
[0109]
[0110] in, This represents the length of the common intersection of the three time windows, in microseconds. This indicates the end time of the time window corresponding to a sequence number in the set of synchronization sequence numbers; This indicates the end time of the time window corresponding to a sequence number in the wired enumeration sequence number set; This indicates the end time of the time window corresponding to a sequence number in the set of wireless broadcast sequence numbers; This indicates the start time of the time window corresponding to a sequence number in the set of synchronization sequence numbers; This indicates the start time of the time window corresponding to a sequence number in the wired enumeration sequence number set; This indicates the start time of the time window corresponding to a sequence number in the set of radio broadcast sequence numbers. Both the start and end times of the time window are in microseconds.
[0111] Sequence numbers sharing a common temporal intersection across the three time windows are grouped into the same candidate matching group. Specifically, one sequence number is selected from each of the synchronization sequence number set, the wired enumeration sequence number set, and the radio broadcast sequence number set, and the common intersection length is calculated using the formula described above. When the common intersection length is greater than 0, these three sequence numbers are grouped into the same candidate matching group, and the common temporal intersection is used as the corresponding time window for these three sequence numbers within the candidate matching group. The start time of the common temporal intersection is the maximum value among the start times of the three time windows, and the end time of the common temporal intersection is the minimum value among the end times of the three time windows.
[0112] For each sequence number in the candidate matching group, record each sequence number in the candidate matching group as the current matching sequence number. Extract the broadcast channel index and device address associated with the current matching sequence number from the synchronization sequence number set, extract the broadcast channel index and device address associated with the current matching sequence number from the wireless broadcast sequence number set, and extract the enumeration timestamp corresponding to the current matching sequence number from the wired enumeration sequence number set.
[0113] The broadcast channel index associated with the current matching sequence number extracted from the synchronization sequence number set is compared with the broadcast channel index associated with the current matching sequence number extracted from the wireless broadcast sequence number set. When the two broadcast channel indices are the same, the device address associated with the current matching sequence number extracted from the synchronization sequence number set is compared with the device address associated with the current matching sequence number extracted from the wireless broadcast sequence number set. When the two device addresses are the same, it is determined whether the enumeration timestamp corresponding to the current matching sequence number extracted from the wired enumeration sequence number set belongs to the time window corresponding to the current matching sequence number in the candidate matching group. The condition for the enumeration timestamp to belong to the time window corresponding to the current matching sequence number in the candidate matching group is that the enumeration timestamp is greater than or equal to the start time of the time window and less than or equal to the end time of the time window. When the enumeration timestamp belongs to the time window corresponding to the current matching sequence number in the candidate matching group, the device address with the same two device addresses is regarded as the matching component identity.
[0114] See Figure 4 In the figure, the horizontal axis represents the start time of the common intersection of the three time windows in the candidate matching group, in microseconds; the vertical axis represents the length of the common intersection, in microseconds. Green dots represent matchable component identities, and red dots represent unmatchable component identities. According to the technical solution of the above embodiment, for the time windows corresponding to each sequence number in the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set, the length of the common intersection of the three time windows is calculated, and marked with the start time of the common time intersection and the length of the common intersection.
[0115] As shown in the figure, the common intersection length of green, matchable component identities is mostly concentrated in a short range, approximately between 0 and 1000 microseconds. Furthermore, the distribution of the common intersection start times is relatively even, covering most of the horizontal axis range. This indicates that component identities can be accurately matched at different time points through the overlap of the three time windows. The common intersection length of red, unmatchable component identities is more dispersed, with some exceeding 1000 microseconds, but overall concentrated in a shorter common intersection length range. Moreover, there is overlap in the start time distribution between unmatchable and matchable identities, indicating that while the time windows of some serial numbers overlap, the matching conditions are not met, leading to unsuccessful matching.
[0116] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities, characterized in that, include: The wireless signal of each component in the matched wireless microphone system is monitored to obtain the communication activity record, component serial number and device address of each component on the preset frequency band; Based on the channel dwell time sequence in the communication activity record, the component serial number is mapped to a set of synchronization serial numbers; When a USB connection is established, obtain the set of wired enumeration serial numbers; During BLE broadcasting, obtain the set of wireless broadcast sequence numbers; The identity of the matching component is determined based on the time window overlap relationship between the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set. The matching component identity is bound to the corresponding component serial number to generate a matching result.
2. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 1, characterized in that, The process of obtaining the communication activity records, component serial numbers, and device addresses of each component on the preset frequency band includes: Listen to the BLE broadcast packets emitted by each component on the preset frequency band, obtain the broadcast timestamp, broadcast channel index and device address from the BLE broadcast packets, and extract the component sequence number field from the broadcast payload; The broadcast channel index, device address, and component serial number fields are arranged into the communication activity record according to the order of the broadcast timestamps. The serial number of each component is obtained by extracting consecutive broadcast segments from the communication activity record according to the device address.
3. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 1, characterized in that, The step of mapping the component serial number to a set of synchronization serial numbers based on the channel dwell time order in the communication activity record includes: The dwell time of each component on the same channel during continuous broadcast events is calculated from the communication activity records. According to the dwell time in ascending order, each component serial number is assigned an incrementing synchronization sequence number; The synchronization sequence number, component sequence number, device address, broadcast channel index, and broadcast timestamp are combined into a synchronization sequence number list; The synchronization sequence number list is encapsulated in the vendor-defined field of the BLE broadcast data packet to form the synchronization sequence number set.
4. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 1, characterized in that, The step of obtaining the wired enumeration sequence number set when the USB connection is established includes: When a USB connection is established, monitor the USB control transmission process between the host and the wireless microphone system. Extract the serial number string corresponding to each component from the device descriptor request, configuration descriptor request, and string descriptor request in the USB control transmission process; Record the enumerated timestamp corresponding to each of the aforementioned sequence number strings; The serial number strings read under the same enumeration timestamp prefix are classified into the wired enumeration serial number set.
5. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 1, characterized in that, The step of obtaining the wireless broadcast sequence number set during BLE broadcasting includes: During BLE broadcasting, a continuous scan event is initiated, and the scanned BLE broadcast packets and their reception timestamps are recorded in each continuous scan event; Obtain the broadcast channel index from each BLE broadcast packet, parse the broadcast sequence number field from its broadcast payload, and calculate the broadcast transmission interval based on the received timestamp; Based on the broadcast transmission interval and the device address in the BLE broadcast packet, multiple broadcast sequence number fields, broadcast channel index and reception timestamps sent consecutively from the same device address are merged into a wireless broadcast sequence number record; The wireless broadcast sequence number records are arranged according to the reception time to obtain the wireless broadcast sequence number set.
6. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 1, characterized in that, The step of determining the identity of a matching component based on the time window overlap relationship between the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set includes: Each sequence number in the synchronization sequence number set, the wired enumeration sequence number set, and the wireless broadcast sequence number set is marked with a time window according to its corresponding timestamp. Sequence numbers that have a common time intersection in the three time windows are grouped into the same candidate matching group, and the common time intersection is used as the corresponding time window of the sequence number in the candidate matching group. Select a serial number that exists in all three sets of synchronization serial numbers, wired enumeration serial numbers, and wireless broadcast serial numbers from the candidate matching group, and use the device address corresponding to the serial number as the identity of the matchable component.
7. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 2, characterized in that, The step of arranging the broadcast channel index, device address, and component serial number fields into the communication activity record according to the order of the broadcast timestamps includes: Convert the broadcast timestamp in each BLE broadcast packet into a uniform clock scale value; The broadcast channel index, device address, and component serial number fields are arranged sequentially in the direction of increasing clock scale values. When two adjacent clock scale values are equal, the order of the corresponding fields is adjusted according to the order of the broadcast channel index to obtain the communication activity record.
8. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 3, characterized in that, The step of calculating the dwell time of each component on the same channel during continuous broadcast events from the communication activity records includes: For each component, extract broadcast event segments with consecutively identical channel indices from the communication activity record; The difference between the first and last broadcast timestamps in each broadcast event segment is recorded as the single dwell time. The duration of each single dwell time is summed to obtain the dwell time of the component in the communication activity record.
9. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 4, characterized in that, The step of classifying the sequence number strings read under the same enumeration timestamp prefix into the wired enumeration sequence number set includes: Extract the high-order timestamp prefix from each of the enumerated timestamps; Sequence number strings with the same high-order timestamp prefix are grouped into the same temporary group; According to the order of the high-order timestamp prefix, the sequence number strings in the temporary group are sequentially written into the receive buffer corresponding to the USB interrupt endpoint to obtain the wired enumeration sequence number set.
10. The method for synchronizing serial numbers of multiple components of a wireless microphone and matching USB and BLE identities according to claim 6, characterized in that, The step of selecting a serial number from the candidate matching group that exists in the synchronization serial number set, the wired enumeration serial number set, and the wireless broadcast serial number set, and using the device address corresponding to the serial number as the matchable component identity, includes: For each sequence number in the candidate matching group, the broadcast channel index and device address associated with that sequence number are extracted from the synchronization sequence number set and the wireless broadcast sequence number set, respectively. Extract the enumeration timestamp corresponding to the sequence number from the set of wired enumeration sequence numbers; The device address corresponding to the sequence number whose two broadcast channel indices are the same, whose two device addresses are identical, and whose enumeration timestamp belongs to the time window corresponding to the sequence number in the candidate matching group, is used as the matching component identity.