Control method and apparatus of external audio device, and electronic device
By acquiring the characteristic parameters of external audio devices to generate identity identifiers and aggregating device data using a designated server, the problem of inaccurate identification of external audio device types and audio output capabilities in existing technologies is solved, achieving efficient optimization of audio output strategies and improvement of user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to accurately identify the type and audio output capabilities of external audio devices, making it difficult to tailor audio output strategies to local conditions and impacting the user's auditory experience.
By acquiring the characteristic parameters of external audio devices, generating identity identifiers, and aggregating device data from multiple terminal devices using a designated server, the target audio strategy is determined, enabling a comprehensive evaluation and strategy optimization of audio output capabilities.
It improves the control efficiency of external audio devices, enhances audio playback quality, and ensures the accuracy and adaptability of audio output strategies.
Smart Images

Figure CN122431631A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio processing technology, and more specifically, to a control method, apparatus, and electronic device for an external audio device. Background Technology
[0002] In scenarios such as music playback and video playback, user-operated terminal devices frequently connect to various external audio devices. The terminal device needs to select an appropriate audio output strategy for these external audio devices to ensure a better listening experience for the user.
[0003] In related technologies, terminal devices typically rely on preset type judgment rules or static device capability databases to determine the device type and audio output capabilities of external audio devices, thereby determining the corresponding audio output strategy for the external audio devices. However, external audio devices are updated and iterated rapidly, making it difficult for the above methods to cope with the massive and rapidly evolving device ecosystem. This results in low accuracy in identifying external audio devices. Furthermore, the aforementioned static rules and databases fail to reflect the actual performance of external audio devices in real and complex terminal system environments, making it difficult to tailor the audio output strategy determined for external audio devices to specific situations and providing users with a superior listening experience. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a control method, device and electronic device for external audio devices, so as to provide a more comprehensive audio output capability for various types of external audio devices in various device environments, facilitate the terminal device to determine the audio output strategy, improve the control efficiency of external audio devices, and thus improve the audio playback effect of external audio devices.
[0005] In a first aspect, embodiments of the present invention provide a control method for an external audio device, the method being applied to a first terminal device; the method includes: in response to an access event of the first external audio device, acquiring characteristic parameters of the first external audio device; the characteristic parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; determining a first identity of the first external audio device based on the characteristic parameters; acquiring target data, determining a target audio policy corresponding to the first external audio device based on the first identity and the target data, and controlling the external audio device to output audio based on the target audio policy; the target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment; the target data is generated by a designated server aggregating external device data sent by the first terminal device and / or a second terminal device.
[0006] Secondly, embodiments of the present invention provide a control method for an external audio device, the method being applied to a designated server; the method includes: acquiring multiple sets of second external device data sent by a third terminal device; the second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device; wherein, the second identity identifier is generated based on the feature parameters of the second external audio device; the feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; the second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, and stability. Data, routing change behavior data, and latency and smoothness index data; based on the second identity and device information in multiple second external device data, the multiple second external device data are aggregated to obtain multiple data sets; based on the second behavior data in each data set, the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment are determined; the audio output capability parameters of the external audio device of each device type in the corresponding device environment are sent to the fourth terminal device so that the fourth terminal device responds to the access event of the third external audio device; based on the audio output capability parameters of the external audio device of each device type in the corresponding device environment, the target audio policy corresponding to the third external audio device is determined; and the audio output of the third external audio device is controlled based on the target audio policy.
[0007] Thirdly, embodiments of the present invention provide a control device for an external audio device, which is disposed in a first terminal device; the device includes: a feature parameter acquisition module, used to acquire feature parameters of the first external audio device in response to an access event of the first external audio device; the feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; an identity identification module, used to determine a first identity of the first external audio device based on the feature parameters; and an audio policy determination module, used to acquire target data, determine a target audio policy corresponding to the first external audio device based on the first identity and the target data, and control the external audio device to output audio based on the target audio policy; the target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment; the target data is generated by a designated server aggregating external device data uploaded by the first terminal device and / or the second terminal device.
[0008] Fourthly, embodiments of the present invention also provide a control device for an external audio device, which is configured on a designated server; the device includes: a device data acquisition module, used to acquire multiple second external device data sent by a third terminal device; the second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device; wherein, the second identity identifier is generated based on the feature parameters of the second external audio device; the feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; the second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, and routing change behavior. The system includes: data and latency and smoothness metrics; a data aggregation module for aggregating multiple second external device data based on second identity identifiers and device information to obtain multiple data sets; a capability parameter determination module for determining the audio output capability parameters of external audio devices of each device type in their corresponding device environment based on the second row data in each data set; and a capability parameter sending module for sending the audio output capability parameters of external audio devices of each device type in their corresponding device environment to a fourth terminal device. This enables the fourth terminal device to respond to the access event of the third external audio device, determine the target audio policy corresponding to the third external audio device based on the audio output capability parameters of external audio devices of each device type in their corresponding device environment, and control the third external audio device to output audio based on the target audio policy.
[0009] Fifthly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for controlling an external audio device.
[0010] In a sixth aspect, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the aforementioned control method for an external audio device.
[0011] The embodiments of the present invention bring the following beneficial effects: The aforementioned control method, apparatus, and electronic device for an external audio device, in response to an access event of a first external audio device, acquires characteristic parameters of the first external audio device. These characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Based on the characteristic parameters, a first identity identifier of the first external audio device is determined. Target data is acquired, and based on the first identity identifier and the target data, a target audio strategy corresponding to the first external audio device is determined. The external audio device is then controlled to output audio based on the target audio strategy. The target data includes audio output capability parameters for multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by a first terminal device and / or a second terminal device. This method comprehensively provides audio output capabilities for various types of external audio devices in various device environments, facilitating the determination of audio output strategies by terminal devices, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0012] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0013] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0014] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating a method for controlling an external audio device according to an embodiment of the present invention; Figure 2 A flowchart illustrating another method for controlling an external audio device provided in an embodiment of the present invention; Figure 3 A system architecture diagram for implementing a control method for an external audio device is provided in an embodiment of the present invention; Figure 4 A flowchart illustrating the process of implementing a method for controlling an external audio device in a client-side application, as provided in this embodiment of the invention. Figure 5A flowchart illustrating a cloud server method for controlling external audio devices, provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a control device for an external audio device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of another control device for an external audio device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions 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.
[0017] In scenarios such as mobile music playback and video playback, users frequently connect various external audio devices (also known as "peripherals"). Different peripherals have significantly different capabilities in terms of sound quality, sound effects, and spatial audio. For example, Bluetooth headphones may support spatial audio and personalized sound effects; home speakers or soundbars are more suitable for multi-channel output and high dynamic range enhancement; in-vehicle systems need to balance calls, navigation, and music playback, and have special requirements for routing switching and lyrics display; serial buses (USB), digital-to-analog converters (DACs), and some wired headphones support high sampling rates and high bit depth pass-through; and screen mirroring devices such as TVs and stereos also have their own characteristics in terms of decoding capabilities and latency.
[0018] Only when the application running on the terminal device has a relatively accurate judgment of the type of currently connected peripheral device and its actual audio capabilities can it automatically select the appropriate sound quality, sound effects, and output strategy for the user.
[0019] In practical use of external devices, the following situations often arise that make it difficult for terminal devices to directly identify the type of external device and determine its true audio capabilities: the Bluetooth protocol stack does not provide a clear type field such as "headphones / speakers / car audio"; many Bluetooth device names are not standardized, such as "BT Audio" and "Car Kit," making it difficult to determine the type based on the name alone; various audio peripherals are updated rapidly, with new models constantly appearing; different mobile phone systems and ROMs have their own limitations and strategies regarding sampling rates and codecs, resulting in significant differences in the performance of the same peripheral on different phones; WiFi screen mirroring devices use mDNS / SSDP for discovery, and the fields are completely different from Bluetooth. Therefore, it is difficult to maintain a high recognition accuracy and capability judgment accuracy in the long run based solely on static rules or single-dimensional information.
[0020] In related technologies, the type of external audio device is determined based on its name and Bluetooth configuration information (profile). For example, if the name contains words like "Car" or "Auto," it is considered an in-vehicle device; if the name contains words like "Speaker" or "Sound," it is considered a speaker; if no specific rule can be matched, it is treated as headphones by default; the presence of an HFP profile is further used to guess whether it has in-vehicle or headphone attributes. This method is simple to implement, but it is highly dependent on naming conventions and profile configuration. If manufacturers use unconventional naming or trimmed profiles, a large number of misjudgments will occur.
[0021] Alternatively, a third-party maintained device capability library can be used to search for fields such as sampling rate range, Bluetooth codec support, and channel capabilities by device name or model. When connecting to an external device, the terminal device typically obtains the device name / model and searches for the corresponding record in a local or cloud-based device library. If a match is found, the type and capability information from the library is used directly to guide the audio strategy. This method is effective for some mainstream devices, but it suffers from limited coverage, untimely updates, and inconsistencies between capability fields and actual negotiation results.
[0022] When combining static rules with manual labeling, to improve the hit rate, top-ranking devices (such as the top 1000 Bluetooth devices) are often selected from log statistics first. These devices are then manually labeled with their type and capabilities by comparing them with third-party information and actual test results. Devices at the bottom of the ranking continue to be handled using default rules or conservative strategies.
[0023] This approach can improve some aspects of the user experience, but it is costly to maintain, and manual labeling cannot keep up with the continuous emergence of new devices.
[0024] The above methods share the following common problems: 1. Type judgment relies heavily on static information and lacks self-correction capability: Name rules and profile fields are static information. Once the device naming or configuration method changes, the original rules are difficult to adjust in time, which can easily lead to misjudgment.
[0025] 2. Inability to reflect the performance of peripherals in the actual playback chain: Third-party libraries often record the manufacturer's claimed capabilities, but in actual use, due to the influence of mobile phone systems and Bluetooth stack strategies, peripherals often fail to reach their claimed capabilities. For example, some headphones claim to support 96kHz, but on many Android models, they can only work at 48kHz; the support for AAC in in-vehicle systems also varies across different mobile phones. Existing solutions lack a mechanism to correct for this by utilizing actual negotiation results and stability behavior.
[0026] 3. New and tail-end equipment is difficult to cover in a timely manner, resulting in high labor costs: Relying on manual annotation and third-party library updates, new equipment is often in an "unknown state" for a period of time, requiring a conservative approach. Furthermore, the sheer number of tail-end equipment makes manual annotation of all equipment virtually impossible; if the number continues to grow, maintenance costs become unacceptable.
[0027] 4. Privacy and permission restrictions lead to unstable device identification: With enhanced privacy protection in systems, newer versions of Android and iOS make it difficult for applications to directly obtain the real Bluetooth MAC address, and even if obtained, it may be a random value. This makes the simple reliance on MAC for device aggregation and identification unreliable. Existing solutions lack alternative device identification designs and do not consider data collision and pollution issues when a large number of Bluetooth white-label devices share names and Organizationally Unique Identifiers (OUIs).
[0028] Based on this, the present invention provides a control method, device and electronic device for an external audio device, which can be applied to audio output scenarios such as music playback, video playback and screen projection.
[0029] See Figure 1 First, we will introduce a control method for an external audio device provided by an embodiment of the present invention. This method is applied to a first terminal device. The first terminal device can be a mobile phone, tablet computer, in-vehicle computer, computer, etc., which will not be specified here.
[0030] The method includes the following steps: Step S102: In response to the access event of the first external audio device, obtain the characteristic parameters of the first external audio device; the characteristic parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information and manufacturer information.
[0031] The aforementioned first external audio device can be a wired headset, Bluetooth headset, speaker, loudspeaker, etc., and there are no restrictions on this. The first external audio device can be electrically connected to the first terminal device, or it can be connected via Bluetooth or a local area network, etc.
[0032] After the first external audio device is connected to the first terminal device, it is necessary to obtain the characteristic parameters of the first external audio device. The aforementioned identification information is usually the name of the first external audio device. The aforementioned configuration information usually includes the audio frequency band and audio channel configured for the first external audio device. The aforementioned audio routing information includes, but is not limited to: the current output port type, profile connection status, whether HFP is stored, and routing switching events.
[0033] When the first external audio device is a Bluetooth device, the original device name, Media Access Control Address (MAC), Bluetooth CoD parameters (Class of Device), and current audio routing type can be obtained.
[0034] Step S104: Determine the first identity identifier of the first external audio device based on the feature parameters.
[0035] After obtaining the characteristic parameters, the desired content can be retrieved from them. For example, prefixes, suffixes, and special characters can be removed from the original device name to obtain the standardized name; the usable OUI (Organizationally Unique Identifier) portion can also be extracted from the Bluetooth MAC address as information about the device manufacturer. Multiple pieces of content to be retrieved can be preset; if some content is not retrieved, it can be replaced with an empty character or a preset character.
[0036] The found content can be concatenated in a preset order, and the concatenated string can be processed to generate the first identifier of the first external audio device. Typically, a hash calculation can be performed on the concatenated string, and the resulting hash value can be used as the first identifier of the first external audio device.
[0037] Step S106: Obtain target data; based on the first identity identifier and the target data, determine the target audio policy corresponding to the first external audio device; control the external audio device to output audio based on the target audio policy; the target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment; the target data is generated by a designated server aggregating and processing the external device data sent by the first terminal device and / or the second terminal device.
[0038] The target data mentioned above is generated by a designated server based on external device data sent from multiple terminal devices. The designated server can be a specific server, a distributed server cluster consisting of multiple servers, or a cloud server, etc., without limitation. The multiple terminal devices can include a first terminal device, or a second terminal device different from the first terminal device.
[0039] External device data typically includes: the identifier of the external audio device connected to the terminal device sending the data, the device information of the terminal device, and behavioral data of the external audio device during audio output. The identifier in the external device data is generated in a similar way to the first identifier mentioned above, based on the characteristic parameters of the external audio device. The behavioral data typically includes actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness metrics during audio output. Notably, the aforementioned data types (sampling rate change data, channel number change data, and routing change behavior data) are usually absent when they are not changing.
[0040] The audio output performance of the same external audio device often differs under different device environments. A designated server can identify external devices of the same type and in the same device environment based on their identity and device information. This device information may include the phone model, computer model, operating system type, and version.
[0041] A designated server can group external device data corresponding to the same identity and operating environment into a single data set. It then analyzes the specific details of various audio output parameters within the behavioral data of this data set, such as the number of sampling rates, the proportion of each rate, the number of channels, and the usage ratio of each channel. The most stable audio output parameters are then identified as the music output capability parameters for that device type within that operating environment. These music output capability parameters typically include: recommended available sampling rate, number of supported channels, stability level, and device type.
[0042] The first terminal device can periodically obtain target data from a designated server, or the designated server can periodically push target data to the first terminal device. The target data is typically stored in the local storage of the first terminal device. The first terminal device can search for data corresponding to its first identity identifier from the target data. If found, it can further filter for data corresponding to its own device information. If found, it can determine the audio output strategy for the first external audio device based on the audio output capability parameters in the data, such as using the recommended sampling rate, using supported channels, or using the corresponding device type's standard settings.
[0043] If the first terminal device cannot find data corresponding to the first identity identifier in the target data, it can determine the audio output strategy based on local historical experience. During the use of the first external audio device, it continuously collects the behavior data of the first external audio device and sends it to the designated server, thereby enabling the designated server to determine the audio output capability parameters of the external audio device.
[0044] The aforementioned method for controlling an external audio device, in response to an access event of a first external audio device, acquires characteristic parameters of the first external audio device. These characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Based on the characteristic parameters, a first identity identifier of the first external audio device is determined. Target data is acquired, and based on the first identity identifier and the target data, a target audio strategy corresponding to the first external audio device is determined. The external audio device is then controlled to output audio based on the target audio strategy. The target data includes audio output capability parameters for multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by a first terminal device and / or a second terminal device. This method comprehensively provides audio output capabilities for various types of external audio devices in various device environments, facilitating the determination of audio output strategies by terminal devices, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0045] The following embodiments provide an implementation for determining a first identity of a first external audio device based on feature parameters.
[0046] The feature parameters used to generate the first identifier are typically multiple. These multiple feature parameters can be concatenated in a preset order to obtain the target parameter. In specific implementations, specific fields can be selected for concatenation. After obtaining the target parameter, a hash operation needs to be performed on it, and the result is used as the first identifier of the first external audio device. The first identifier includes the contents of multiple feature parameters and can uniquely identify the external audio device.
[0047] The following embodiments provide an implementation for determining a first identity of a first external audio device based on feature parameters.
[0048] The aforementioned target data typically also includes identifiers for multiple types of external audio devices. The first terminal device can retrieve the first identifier from among the identifiers of the multiple external audio devices in the target data.
[0049] If a first identifier is found, the target audio strategy corresponding to the first external audio device is determined based on the audio output capability parameters of the external audio device corresponding to the first identifier in at least one device environment. Typically, it is also necessary to determine the target device environment based on the device information of the first terminal device, and then determine the target audio strategy corresponding to the first external audio device based on the audio output capability parameters of the external audio device corresponding to the first identifier in the target device environment.
[0050] If the first identifier is not found, the device type of the first external audio device is determined based on its characteristic parameters. As mentioned above, the characteristic parameters may include one or more of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Different types of external audio devices typically have different characteristic parameters, and the characteristic parameters used to identify the external audio device are also usually different. For example, if the name of the external audio device includes the vehicle manufacturer's brand, and the external audio device has a hands-free configuration file, then the external audio device can be identified as an in-vehicle audio device.
[0051] Typically, terminal devices have built-in basic audio policies set for different types of external audio devices, which can be stored as local historical data. After determining the device type of the first external audio device, a target audio policy corresponding to the first external audio device can be determined based on the device type and the local historical data. Specifically, the audio policy pre-set in the local historical data corresponding to the device type of the first external audio device is determined as the target audio policy for the first external audio device.
[0052] During the audio output process of the first external audio device, it is necessary to collect the first line data of the first external audio device in real time. The first line data typically includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data (if there is no change, it will not be acquired), channel number change data (if there is no change, it will not be acquired), stability data, routing change behavior data (if there is no change, it will not be acquired), and latency and smoothness index data.
[0053] After collecting a certain duration of first-line data, first external device data corresponding to the first external audio device can be generated based on the first identity of the first external audio device, the first-line data, and the device information of the first terminal device. The first terminal device sends the first external device data to a designated server, so that the designated server updates the audio output capability parameters of the external audio device of the type corresponding to the first external audio device in the device environment corresponding to the first terminal device based on the first external device data. The designated server can aggregate the first external device data to external device data corresponding to the same identity and device environment, thereby updating the audio output capability parameters of the first external device data.
[0054] This invention also provides another method for controlling an external audio device, which is applied to a designated server. As mentioned above, the designated server can refer to a specific server, a distributed system consisting of multiple servers, or a cloud server. Figure 2 As shown, the method includes the following steps: Step S202: Obtain multiple second external device data sent by the third terminal device; the second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device; wherein, the second identity identifier is generated based on the feature parameters of the second external audio device; the feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; the second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data.
[0055] The aforementioned third terminal device can be one or more, without limitation. Multiple second external devices can be for the same external audio device or for different external audio devices, without limitation.
[0056] The aforementioned second identity identifier is typically generated by the third terminal device. The aforementioned second behavioral data is typically collected by the second terminal device during the use of the second external audio device.
[0057] Step S204: Based on the second identity identifier and device information in the multiple second external device data, the multiple second external device data are aggregated to obtain multiple data sets.
[0058] The same identifier usually indicates an external audio device of the same type. Identical device information usually indicates a similar device environment. Data from second external devices corresponding to the same device type and environment can be aggregated together as a single dataset.
[0059] Step S206: Based on the second row of data in each data set, determine the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment for each data set.
[0060] For the second row of data in each dataset, statistical analysis is usually required to determine the common sampling rate, common channels, stability, and other parameters of the external audio device of this device type in the current device environment, and these parameters are used as audio output capability parameters.
[0061] Step S208: Send the audio output capability parameters of each type of external audio device in the corresponding device environment to the fourth terminal device, so that the fourth terminal device responds to the access event of the third external audio device, determines the target audio policy corresponding to the third external audio device based on the audio output capability parameters of each type of external audio device in the corresponding device environment, and controls the third external audio device to output audio based on the target audio policy.
[0062] The above methods provide a comprehensive range of audio output capabilities for various types of external audio devices in different device environments, making it easier for terminal devices to determine audio output strategies, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0063] The following embodiments provide an implementation method for aggregating multiple second external device data based on second identity identifiers and device information from multiple second external device data to obtain multiple data sets.
[0064] For each piece of second external device data, at least one aggregation parameter needs to be generated based on the second identity identifier and device information within the second external device data. Device information typically includes the device model and operating system version. The second external device data may also include the chip parameters and firmware version of the external audio device, or it may not. The aggregation parameter includes one or more of the following: the second identity identifier, the model of the third terminal device, the version of the operating system running on the third terminal device, and the chip parameters and firmware version of the second external audio device. When all the above parameters are complete, all parameters can be used as the aggregation parameter; if a parameter is missing, the remaining parameters can be used as the aggregation parameter. Furthermore, multiple pieces of second external device data can be aggregated based on the aggregation parameters corresponding to each piece of second external device data to obtain multiple data sets; each data set contains the same aggregation parameter for the second external device data.
[0065] The following embodiments provide an implementation method for determining the audio output capability parameters of an external audio device of a corresponding device type in a corresponding device environment based on the second row of data in each data set.
[0066] For each dataset, behavioral statistics can be determined based on the second row of data. These statistics include several of the following: the sampling rate used by the external audio device corresponding to the dataset's device type, the usage ratio of each sampling rate, channel configuration information, multi-channel support, stability, first frame time, and stuttering rate. Behavioral data typically differs for different types of external audio devices; for example, only LAN projection devices may include first frame time. Specific settings can be configured according to actual needs and are not limited here. After obtaining the behavioral statistics, the audio output capability parameters for the dataset's device type in the corresponding device environment are determined based on these statistics. Generally, the more stable audio output parameters from the behavioral statistics can be used as the audio output capability parameters for the dataset's device type in that device environment.
[0067] After determining the behavioral statistics, the dispersion parameter corresponding to those statistics can also be determined. This dispersion parameter typically reflects the stability of the external audio device to some extent, and can specifically be the variance or standard deviation of the sampling rate. If the dispersion parameter is greater than or equal to a preset threshold, the performance of the external audio device can be considered highly unstable. Therefore, it is necessary to abandon the use of a dataset to determine the audio output capability parameters of the corresponding device type in the corresponding device environment.
[0068] After determining that the dispersion parameter corresponding to the behavioral statistics of a dataset is greater than or equal to a threshold, the corresponding identity identifier can be directly marked as a low-confidence identifier. In implementation, a confidence parameter can be added to this identity identifier and set to a specified value. This confidence parameter can be present for every identity identifier, and the confidence parameters for low-confidence identifiers and non-low-confidence identifiers can be set differently. The specific settings can be configured according to requirements and are not limited here.
[0069] After identifying a low-confidence identifier, the server can send an indication message to the terminal device. Upon receiving this indication, if the identifier of the connected external audio device is a low-confidence identifier, the terminal device will use local historical data to determine the target audio policy corresponding to the third external audio device. The server can also write the identifier and the parameters indicating that the identifier is a low-confidence identifier into the target data. After receiving the target data, the terminal device generates the identifier of the connected external audio device, reads the identifier from the target data, and if it finds that the identifier is a low-confidence identifier, it will use local historical data to determine the target audio policy corresponding to the connected external audio device. As mentioned above, the local historical data can include audio policies for different types of external audio devices based on their basic settings. The device type can be determined first based on characteristic parameters such as the name and routing information of the connected external audio device, and then the audio policy corresponding to that device type can be read from the local historical data to determine the target audio policy for that external audio device.
[0070] In the following specific embodiments, taking a cloud server as an example, the implementation process of the control method for external audio devices is specifically described.
[0071] like Figure 3 As shown, the system architecture adopted in the implementation of this method mainly consists of three parts: the peripheral layer (referring to external audio devices connected to the terminal device), the client module layer (mainly composed of terminal devices connected to the cloud server, referred to as the "end-side"), and the cloud capability service layer (implemented by the cloud server, referred to as the "cloud"). The client is responsible for peripheral detection, generation of peripheral identification identifiers (also known as "soft fingerprints"), behavior collection, and audio policy decision-making; the cloud is responsible for data aggregation, determination of peripheral identification identifier types, peripheral capability calibration, and distribution of target data; the peripheral layer includes Bluetooth headsets, speakers, in-vehicle systems, USB / DACs, and WiFi projection devices, etc. This architecture enables the end-side and cloud to form a closed-loop mechanism for capability calibration, thereby improving the accuracy of peripheral capability identification.
[0072] The core ideas of this approach include the following points: 1. On the device side, the identity of the peripheral device is constructed using the name, OUI, profile information, audio routing characteristics, etc., and the appearance of the same peripheral device on different user devices is aggregated. For WiFi screen mirroring devices, the corresponding soft fingerprint is constructed using fields such as Model Name and Manufacturer in mDNS / SSDP broadcast. Firmware Version is used as the aggregation bucket dimension (equivalent to the above "aggregation parameter") rather than the identifier (ID) factor in the soft fingerprint.
[0073] 2. On the device side, continuously record behavioral data such as negotiation sampling rate, number of channels, and Bluetooth stability of the peripheral device in the actual playback link, and report them according to different scenarios.
[0074] 3. In the cloud, the peripheral device's identity identifier is combined with dimensions such as the terminal device's mobile phone model and system version to perform bucket aggregation, and a multi-level fallback strategy is designed. When the precise bucket data is insufficient, it falls back to the brand level, SoC level or global level statistics to generate a peripheral device capability profile (equivalent to the above "audio output capability parameters"). At the same time, the type of peripheral device's identity identifier is determined by methods such as distribution variance detection. For example, when the variance of the corresponding audio output capability parameter is large, the peripheral device's identity identifier type can be determined as a low-level identifier (which can be called "dirty ID"). Identities with large sample size and small variance are regarded as popular standard identifiers.
[0075] 4. The updated target data (which can be called the "capability library version") is sent to the edge to correct subsequent type identification and policy judgment, forming an edge-cloud closed loop; in a cloudless environment, the edge can also achieve pure local adaptation based on historical data.
[0076] This approach uses identity identifiers instead of a single MAC field to identify peripherals, enabling cross-device aggregation under privacy constraints. It uses actual negotiated sampling rates, routing behavior, and stability behavior as the basis for capability calibration, rather than relying solely on manufacturer names or third-party data. In the cloud, it performs bucket analysis based on combinations of "peripheral and host device information" (model / system version / SoC) and provides multi-level fallback logic. By detecting the variance and concentration of data distribution under soft fingerprinting, it distinguishes between low-level identifiers and popular standard identifiers, adopting conservative configurations or edge-side adaptive fallback for low-level identifiers and increasing the weight of popular standard identifiers. Through cyclical updates of the capability library between the edge and cloud, the type and capability information of new devices automatically converges over time.
[0077] like Figure 4 As shown, the processing flow on the client side includes steps such as collecting peripheral device feature parameters, generating soft fingerprints, preliminary type recognition, recording behavioral data, merging capabilities, and outputting audio strategies. The client not only performs the initial judgment of peripheral devices, but is also responsible for reporting behavioral data such as the negotiated sampling rate in the actual playback link to the cloud for subsequent capability calibration.
[0078] Specifically, the steps include the following: 1: Collect basic device features and construct a soft fingerprint When the system detects a peripheral device connected, the client can typically collect the following information for different types of peripheral devices: For Bluetooth peripherals, the system can collect the original device name and the standardized name after cleaning (removing prefixes and suffixes, special characters, etc.), the available OUI part of the Bluetooth MAC address (if the system allows it to be obtained, otherwise it will be empty), the Bluetooth Class Of Device (CoD) field, the set of supported profiles (such as A2DP, HFP, etc.), the manufacturer information in BLE broadcast, the product ID, etc., and the current audio routing type (specifically, it can be Bluetooth headset, Bluetooth speaker, car Bluetooth, etc.).
[0079] For network peripherals such as WiFi screen mirroring, fields such as Model Name, Manufacturer, and Friendly Name can be collected when discovering via mDNS / SSDP, as well as the available Firmware Version or hardware version field, which can be used as an environment context field. The connection protocol type (DLNA, Chromecast, etc.) can also be collected.
[0080] The client concatenates the aforementioned relatively stable fields, which are independent of the firmware version, in a preset order and performs a hash operation to generate a soft fingerprint identifier for the peripheral device.
[0081] For example, for Bluetooth peripherals, a soft fingerprint identifier can be generated as follows: SoftFingerprintID = Hash(Standardized Name + OUI + CoD + Set of Supported Profiles) For WiFi peripherals, the following soft fingerprint identifiers can be generated: SoftFingerprintID = Hash(Model Name + Manufacturer + Friendly Name) In the above process, the firmware version does not participate in the generation of the identity identifier, but is sent along with the reported data for use in the server-side bucket aggregation process.
[0082] When the system provides a real MAC address that has not been randomized, the MAC address can also be used as one of the inputs; if the MAC address cannot be obtained, then only the aforementioned soft fields should be relied upon.
[0083] 2. Preliminary Type Identification and Confidence Calculation at the End-Side Based on standardized names, OUI vendor information, profile combinations, audio routing behavior, etc., the client calculates the preliminary type and confidence level of the peripheral according to rules or simple models. For example, it can determine that the preliminary type is headphones, speakers, car accessories, screen projection devices, or others, and the type confidence level is a real number between 0 and 1.
[0084] For example, if the name includes the car manufacturer's brand and the Bluetooth hands-free profile (HFP) is consistently present, the confidence level for an in-vehicle device is high; if the name includes "Speaker" and does not contain HFP, the confidence level for a speaker is high; if a DLNA / Chromecast router is detected, it is marked as a screen mirroring device. The client records the soft fingerprint identifier, preliminary type, and confidence level for reporting and local policy purposes.
[0085] 3. Capabilities to record real audio and behavioral data During audio playback, the client records behavioral data related to the peripheral device, including but not limited to the following: the actual negotiated sampling rate (e.g., 48kHz, 96kHz), the actual number of channels and channel layout (mono / stereo / multichannel), whether system downsampling or channel number changes occur during playback, the number of Bluetooth disconnections, the number of reconnections, the duration of playback interruptions, and other stability indicators; for in-vehicle scenarios, it can record routing changes during call access; for screen projection devices, it can record latency and smoothness indicators such as first frame time and buffer ratio.
[0086] These data are packaged and reported to the server according to a certain period (such as daily) or event threshold (such as playback duration, number of interruptions reaching a certain amount). The reported data includes information such as soft fingerprint ID, mobile phone model, system version, and firmware version.
[0087] 4. Local caching and pure client-side adaptive caching In scenarios with network restrictions or no cloud services, the client can maintain a simplified capability table locally: using the soft fingerprint ID as the key, it records the negotiation sampling rate, type judgment, and stability statistics of the peripheral in history; when the peripheral is reconnected, the local history is reused first, rather than relying entirely on the naming rules; if the local history conflicts significantly with the current system performance, it can trigger a re-evaluation and update of the local cache.
[0088] This mechanism can also achieve a certain degree of adaptability on the client side even without cloud support, thus forming a pure client-side version of this solution.
[0089] like Figure 5As shown, the cloud processing flow includes data access, standardization, bucketing and aggregation based on soft fingerprint identifiers and host environment, statistical analysis, determination of peripheral device identity types, and updating of the peripheral capability library. By detecting the distribution consistency of behavioral data, low-level identifiers can be identified and conservative strategies can be adopted; while for popular standard identifiers with stable behavior, high-confidence capability profiles are generated and written into the capability library.
[0090] After receiving data reported from different users, the server first preprocesses and buckets the data. Bucketing dimensions can include the following: peripheral soft fingerprint identifier, specific mobile phone model (e.g., a brand and model), operating system version (e.g., Android 14, iOS 18), optional SoC information (e.g., a Qualcomm platform, a MediaTek platform); for WiFi screen mirroring devices, a Firmware Version field can also be included.
[0091] Use a multi-level fallback mechanism when querying or analyzing data: The first level is precise bucket query, which aggregates data by combination of "soft fingerprint ID + specific model + system version". If the sample size is sufficient, it will be used first. The second level aggregates data by "soft fingerprint ID + phone brand + system version", ignoring differences in specific models; The third level is aggregated by "soft fingerprint ID + SoC platform", which utilizes the similarity achieved by the Bluetooth stack on the same chip platform; The fourth level aggregates only by "soft fingerprint ID", ignoring host differences, to obtain the overall performance of peripherals in all environments.
[0092] For WiFi screen mirroring devices, firmware version can be added as an additional dimension in the first or second level to distinguish the behavioral differences brought about by different firmware versions.
[0093] The cloud-based statistics obtained through the above methods include: the usage ratio of different sampling rates and their distribution in each bucket level, channel configuration and multi-channel support, Bluetooth stability (disconnection rate, reconnection rate, etc.), HFP existence probability, routing switching mode and other related behaviors; for screen projection devices, network performance such as first frame time and stuttering rate.
[0094] Because many white-label devices may share names, OUIs, and CoDs, the server needs to detect data corruption caused by soft fingerprint collisions. Specific methods include: (1) For data with the same soft fingerprint ID in the same level bucket, calculate the dispersion of statistical information, such as the variance and distribution pattern of key indicators such as negotiation sampling rate and disconnection rate; (2) If the data in multiple buckets is highly divergent and has a large variance, and it is difficult to find consistent capability characteristics between different buckets, then the soft fingerprint identifier is more likely to correspond to a collection of multiple hardware. In this case, the identifier can be judged as a low-level identifier. (3) If a certain soft fingerprint ID has a large sample size, but its distribution on key capability indicators is highly concentrated and its variance is small, it indicates that the identifier corresponds to a popular standard device with consistent hardware performance. It should be marked as a popular standard identifier and its weight should be increased in subsequent capability library calibration and strategy decision-making.
[0095] For low-level identifiers, the server can adopt the following strategy: • Instead of directly generating high-confidence capability profiles, it only outputs conservative capability configurations, such as simply identifying it as "supporting 48kHz stereo, with unknown stability"; • Marking low-level identifiers in the capability library as having lower credibility instructs clients to prioritize local adaptive strategies and distrust cloud results.
[0096] For popular standard identifiers and ordinary identifiers, the server generates a capability profile of the soft fingerprint identifier in different host environments based on multi-level bucket statistical results, including maximum stable sampling rate, multi-channel support, Bluetooth stability score, and type confidence.
[0097] The following example uses Bluetooth headsets to illustrate the situation: A certain Bluetooth headset's soft fingerprint identifier, combined with peripheral soft fingerprints, a certain model of mobile phone, and a corresponding bucket of a certain Android version, has accumulated behavioral data from multiple users.
[0098] Statistical results show: (1) In the actual negotiated sampling rate, 48kHz accounted for more than 95%, while 96kHz appeared only in a very small number of abnormal samples; (2) The number of channels is stable at 2 channels; (3) The Bluetooth disconnection rate is low during playback, and the stability score is high; (4) The low frequency of HFP call routing is consistent with the behavior characteristics of headsets rather than vehicle-mounted devices.
[0099] The following peripheral capability profile can then be generated: (1) Recommended available sampling rate: 48kHz; (2) Number of supported channels: 2; (3) Stability level: High; (4) Peripheral type preference: Headphones; (5) Capability confidence: High (can be marked as a popular standard identifier).
[0100] The server will compare the capability profile with existing third-party device libraries and internal manual testing results as follows: (1) If the records in the third-party library are seriously inconsistent with the actual statistics, the corresponding fields will be downgraded or marked as low confidence; for fields that are obviously stable in the capability profile (such as those that can only be 48kHz in most environments), they will be written into the capability library as real usable capabilities. (2) For type judgment, the type confidence is improved or corrected by combining preliminary type statistics and behavioral characteristics; (3) The confidence weight of the capability field of popular standard identifiers can be appropriately increased so that the end side can trust the device profile more when making policy decisions.
[0101] Upon completion, the server updates the peripheral capability library and generates a new version number. The client periodically retrieves the latest version of the capability library from the server. During subsequent peripheral connections, the client can query the capability library for the peripheral's type and capability information using a soft fingerprint ID. The client then combines its initial local assessment with the capability library results, prioritizing the capability library results and using the initial assessment and local history as supplementary references. For peripherals marked with low-level identifiers, the trust in cloud capabilities is reduced, and the weight of local adaptive and conservative strategies is increased. For peripherals corresponding to popular standard identifiers, more aggressive configurations can be appropriately used in terms of sound quality and sound effects strategies.
[0102] For soft fingerprint identifiers appearing for the first time in the cloud, the server can search for similar device families based on standardized names and OUIs. For example, if it's a product from the same brand and series, it can inherit the default capability configuration of that series in the capability library and mark it as low confidence. As the sample size increases, the initial configuration is gradually replaced with real statistical results.
[0103] In scenarios with poor network conditions or where frequent reporting is undesirable, the client can prioritize using locally cached historical data for quick assessment. When network conditions permit, it can then align and correct with the cloud capability library, achieving two-level adaptive behavior. Devices marked with a low-level identifier can prioritize using the local mode, and only when local data is insufficient should the conservative cloud configuration be used.
[0104] This method has the following advantages: 1. It can still aggregate behavioral data from the same peripheral device under privacy restrictions.
[0105] By using a soft fingerprinting mechanism, samples of the same peripheral device reported by different users can be aggregated without relying on real MAC addresses. Low-level identifier detection avoids serious pollution problems caused by shared identifiers of white-label devices. Popular standard identifiers with large sample sizes and stable behavior are given higher weights to ensure data availability and robustness.
[0106] 2. The peripheral device capability information is more closely related to the real-world usage environment.
[0107] By using data such as actual negotiation sampling rate, channel layout, and Bluetooth disconnection, the capability library is corrected so that the capability fields reflect the "capabilities actually experienced by users" rather than the parameters advertised by manufacturers. At the same time, models are built separately in different mobile phone models / system versions to distinguish between peripheral capabilities and system limitations.
[0108] 3. Improve the accuracy of type recognition, especially in distinguishing between Bluetooth headsets / speakers / car accessories.
[0109] By combining behavioral information such as HFP existence probability, routing switching mode, and mobile scene characteristics with name and OUI, a more reliable type judgment can be achieved than simple name matching, which is particularly evident for vehicle device identification.
[0110] 4. Reduce manual maintenance and testing costs.
[0111] New equipment initially acquires its capabilities through similarity inheritance and conservative strategies. As usage data accumulates, it is automatically corrected. Humans primarily focus on high-weight or abnormal equipment, significantly reducing ongoing maintenance costs.
[0112] 5. Supports both pure edge-side adaptive and edge-cloud collaborative modes.
[0113] Even in environments without cloud access or with limited network coverage, the client can still record the historical negotiation results of locally connected peripherals and reuse them directly in the next connection. With cloud support, the accuracy and coverage of capability assessment can be further improved across user groups.
[0114] 6. The capability library covers Bluetooth, wired, USB / DAC, and WiFi projection devices, forming a unified audio peripheral capability base.
[0115] Audio peripherals with different connection types can manage capability information within the same framework, providing unified data support for upper-level sound quality, sound effects, and spatial audio strategies.
[0116] For the above method embodiments, see Figure 6 The diagram shows a control device for an external audio device, the device comprising: The feature parameter acquisition module 602 is used to acquire the feature parameters of the first external audio device in response to the access event of the first external audio device; the feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; The identity determination module 604 is used to determine the first identity of the first external audio device based on feature parameters; The audio policy determination module 606 is used to acquire target data, determine the target audio policy corresponding to the first external audio device based on the first identity identifier and the target data, and control the external audio device to output audio based on the target audio policy; the target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment; the target data is generated by a designated server aggregating and processing the external device data sent by the first terminal device and / or the second terminal device.
[0117] The aforementioned control device for an external audio device, in response to an access event of a first external audio device, acquires characteristic parameters of the first external audio device. These characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Based on the characteristic parameters, a first identity identifier of the first external audio device is determined. Target data is acquired, and based on the first identity identifier and the target data, a target audio strategy corresponding to the first external audio device is determined. The external audio device is then controlled to output audio based on the target audio strategy. The target data includes audio output capability parameters for multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by a first terminal device and / or a second terminal device. This method comprehensively provides audio output capabilities for various types of external audio devices in various device environments, facilitating the determination of audio output strategies by terminal devices, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0118] The aforementioned feature parameters include multiple ones; the identity identification module is also used to: concatenate the multiple feature parameters in a preset order to obtain the target parameter; perform a hash operation on the target parameter, and determine the operation result as the first identity identifier of the first external audio device.
[0119] The aforementioned target data also includes the identification identifiers of multiple types of external audio devices; the audio policy determination module is further configured to: search for a first identification identifier from the multiple external audio device identification identifiers in the target data; if the first identification identifier is found, determine the target audio policy corresponding to the first external audio device based on the audio output capability parameters of the external audio device corresponding to the first identification identifier in at least one device environment.
[0120] The aforementioned device further includes: a device type determination module, used to determine the device type of the first external audio device based on the characteristic parameters of the first external audio device if the first identity identifier is not found; and a second target audio strategy determination module, used to determine the target audio strategy corresponding to the first external audio device based on the device type of the first external audio device and local historical data.
[0121] The aforementioned apparatus further includes: a behavior data acquisition module, used to acquire first behavior data of the first external audio device during the audio output process; the first behavior data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data; a device data generation module, used to generate first external device data corresponding to the first external audio device based on the first identity identifier of the first external audio device, the first behavior data, and the device information of the first terminal device; and a device data sending module, used to send the first external device data to a designated server, so that the designated server updates the audio output capability parameters of the type of external audio device corresponding to the first external audio device in the device environment corresponding to the first terminal device based on the first external device data.
[0122] This invention also provides another control device for an external audio device, which is located on a designated server; such as... Figure 7 As shown, the device includes: The device data acquisition module 702 is used to acquire multiple second external device data sent by the third terminal device. The second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device. The second identity identifier is generated based on the feature parameters of the second external audio device. The feature parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. The second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data. The data aggregation module 704 is used to aggregate multiple second external device data based on the second identity identifier and device information in multiple second external device data to obtain multiple data sets. The capability parameter determination module 706 is used to aggregate multiple second external device data based on the second identity identifier and device information in multiple second external device data to obtain multiple data sets. The capability parameter sending module 708 is used to determine the audio output capability parameters of the external audio device of each device type in the corresponding device environment based on the second row of data in each data set; send the audio output capability parameters of the external audio device of each device type in the corresponding device environment to the fourth terminal device, so that the fourth terminal device responds to the access event of the third external audio device, determines the target audio policy corresponding to the third external audio device based on the audio output capability parameters of the external audio device of each device type in the corresponding device environment, and controls the third external audio device to output audio based on the target audio policy.
[0123] The above methods provide a comprehensive range of audio output capabilities for various types of external audio devices in different device environments, making it easier for terminal devices to determine audio output strategies, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0124] The aforementioned data aggregation module is further configured to: for each second external device data, generate at least one aggregation parameter corresponding to the second external device data based on the second identity identifier and device information in the second external device data; wherein, the aggregation parameter includes one or more of the following: second identity identifier, model of the third terminal device, version of the operating system running on the third terminal device, chip parameters and firmware version of the second external audio device; and aggregate multiple second external device data based on the aggregation parameters corresponding to each second external device data to obtain multiple data sets; the aggregation parameters of the second external device data included in each data set are the same.
[0125] The aforementioned capability parameter determination module is also used to: for each data set, determine behavioral statistics based on the second row of data in the data set; the behavioral statistics include multiple of the following: the sampling rate used by the external audio device of the device type corresponding to the data set and the usage ratio of each sampling rate, channel configuration information, multi-channel support, stability, first frame time and stuttering rate; based on the behavioral statistics, determine the audio output capability parameters of the device type corresponding to the data set in the corresponding device environment.
[0126] The aforementioned device further includes: a dispersion parameter statistics module, used to determine the dispersion parameter corresponding to the behavioral statistics information; and an audio output capability parameter cancellation module, used to cancel the use of a data set to determine the audio output capability parameter of the corresponding device type in the corresponding device environment if the dispersion parameter is greater than or equal to a preset parameter threshold.
[0127] The aforementioned device further includes: a low-confidence identifier determination module, used to mark the identity identifier corresponding to the data set as a low-confidence identifier if the dispersion parameter is greater than or equal to a preset parameter threshold, and to determine the target audio strategy corresponding to the third external audio device using local historical data in response to the identity identifier of the fourth terminal device being a low-confidence identifier.
[0128] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the control method for the external audio device implemented by the first terminal device, for example: In response to an access event of a first external audio device, the system acquires characteristic parameters of the first external audio device. These characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Based on the characteristic parameters, a first identity of the first external audio device is determined. Target data is acquired, and based on the first identity and the target data, a target audio policy corresponding to the first external audio device is determined. The system then controls the external audio device to output audio based on the target audio policy. The target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by a first terminal device and / or a second terminal device.
[0129] The above methods provide a comprehensive range of audio output capabilities for various types of external audio devices in different device environments, making it easier for terminal devices to determine audio output strategies, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0130] Optionally, the aforementioned feature parameters include multiple features; the step of determining the first identity of the first external audio device based on the feature parameters includes: concatenating multiple feature parameters in a preset order to obtain target parameters; performing a hash operation on the target parameters, and determining the operation result as the first identity of the first external audio device.
[0131] Optionally, the target data may also include the identification of multiple types of external audio devices; the step of determining the target audio strategy corresponding to the first external audio device based on the first identification and the target data includes: searching for the first identification from the identification of multiple external audio devices in the target data; if the first identification is found, determining the target audio strategy corresponding to the first external audio device based on the audio output capability parameters of the external audio device corresponding to the first identification in at least one device environment.
[0132] Optionally, the above method further includes: if the first identity identifier is not found, determining the device type of the first external audio device based on the characteristic parameters of the first external audio device; and determining the target audio strategy corresponding to the first external audio device based on the device type of the first external audio device and local historical data.
[0133] Optionally, the above method further includes: acquiring first behavioral data of the first external audio device during the audio output process; the first behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data; generating first external device data corresponding to the first external audio device based on the first identity of the first external audio device, the first behavioral data, and the device information of the first terminal device; and sending the first external device data to a designated server so that the designated server updates the audio output capability parameters of the type of external audio device corresponding to the first external audio device in the device environment corresponding to the first terminal device based on the first external device data.
[0134] The processor, by executing machine-executable instructions, can also implement the control methods for external audio devices described above, which are implemented by a specified server. For example: The system acquires multiple sets of data from second external devices sent by a third terminal device. These second external device data include: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device. The second identity identifier is generated based on the characteristic parameters of the second external audio device. The characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. The second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data. Based on the second identity identifier and device information in multiple second external device data, the multiple second external device data are aggregated to obtain multiple data sets; based on the second row data in each data set, the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment are determined; the audio output capability parameters of the external audio device of each device type in the corresponding device environment are sent to the fourth terminal device so that the fourth terminal device responds to the access event of the third external audio device; based on the audio output capability parameters of the external audio device of each device type in the corresponding device environment, the target audio policy corresponding to the third external audio device is determined; and the third external audio device is controlled to output audio based on the target audio policy.
[0135] Optionally, the step of aggregating multiple second external device data based on the second identity identifier and device information in multiple second external device data to obtain multiple data sets includes: for each second external device data, generating at least one aggregation parameter corresponding to the second external device data based on the second identity identifier and device information in the second external device data; wherein, the aggregation parameter includes one or more of the following: second identity identifier, model of the third terminal device, version of the operating system running on the third terminal device, chip parameters and firmware version of the second external audio device; aggregating multiple second external device data based on the aggregation parameters corresponding to each second external device data to obtain multiple data sets; the aggregation parameters of the second external device data included in each data set are the same.
[0136] Optionally, the step of determining the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment based on the second row of data in each data set includes: for each data set, determining behavioral statistics based on the second row of data in the data set; the behavioral statistics include multiple of the following: the sampling rate used by the external audio device of the corresponding device type of the data set and the usage ratio of each sampling rate, channel configuration information, multi-channel support, stability, first frame time and stuttering rate; and determining the audio output capability parameters of the corresponding device type in the corresponding device environment based on the behavioral statistics.
[0137] Optionally, the above method further includes: determining the dispersion parameter corresponding to the behavioral statistics; if the dispersion parameter is greater than or equal to a preset parameter threshold, canceling the use of a dataset to determine the audio output capability parameter of the corresponding device type in the corresponding device environment.
[0138] Optionally, the above method further includes: if the dispersion parameter is greater than or equal to a preset parameter threshold, marking the identity identifier corresponding to the data set as a low confidence identifier, using the identity identifier of the fourth terminal device in response to the third external audio device as a low confidence identifier, and using local historical data to determine the target audio strategy corresponding to the third external audio device.
[0139] See Figure 8 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the aforementioned control method for the external audio device.
[0140] Furthermore, Figure 8 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0141] The memory 101 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0142] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams of the invention in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method invented in conjunction with the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0143] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described control method for the external audio device.
[0144] The present invention provides a method, apparatus, and electronic device for controlling an external audio device, comprising a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the method described in the preceding method embodiments, performed by a first terminal device, for example: In response to an access event of a first external audio device, the system acquires characteristic parameters of the first external audio device. These characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. Based on the characteristic parameters, a first identity of the first external audio device is determined. Target data is acquired, and based on the first identity and the target data, a target audio policy corresponding to the first external audio device is determined. The system then controls the external audio device to output audio based on the target audio policy. The target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by a first terminal device and / or a second terminal device.
[0145] The above methods provide a comprehensive range of audio output capabilities for various types of external audio devices in different device environments, making it easier for terminal devices to determine audio output strategies, improving the control efficiency of external audio devices, and thus enhancing the audio playback effect of external audio devices.
[0146] Optionally, the aforementioned feature parameters include multiple features; the step of determining the first identity of the first external audio device based on the feature parameters includes: concatenating multiple feature parameters in a preset order to obtain target parameters; performing a hash operation on the target parameters, and determining the operation result as the first identity of the first external audio device.
[0147] Optionally, the target data may also include the identification of multiple types of external audio devices; the step of determining the target audio strategy corresponding to the first external audio device based on the first identification and the target data includes: searching for the first identification from the identification of multiple external audio devices in the target data; if the first identification is found, determining the target audio strategy corresponding to the first external audio device based on the audio output capability parameters of the external audio device corresponding to the first identification in at least one device environment.
[0148] Optionally, the above method further includes: if the first identity identifier is not found, determining the device type of the first external audio device based on the characteristic parameters of the first external audio device; and determining the target audio strategy corresponding to the first external audio device based on the device type of the first external audio device and local historical data.
[0149] Optionally, the above method further includes: acquiring first behavioral data of the first external audio device during the audio output process; the first behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data; generating first external device data corresponding to the first external audio device based on the first identity of the first external audio device, the first behavioral data, and the device information of the first terminal device; and sending the first external device data to a designated server so that the designated server updates the audio output capability parameters of the type of external audio device corresponding to the first external audio device in the device environment corresponding to the first terminal device based on the first external device data.
[0150] The program code includes instructions that can be used to execute the methods described in the preceding method embodiments, which are executed by a specified server, for example: The system acquires multiple second external device data sent by a third terminal device. The second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavioral data during the audio output process of the second external audio device connected to the third terminal device. The second identity identifier is generated based on the characteristic parameters of the second external audio device. The characteristic parameters indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information. The second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavioral data, and latency and smoothness index data. Based on the second identity identifier and device information in the multiple second external device data, the system aggregates the multiple second external device data to obtain multiple data sets. Based on the second behavioral data in each data set, it determines the audio output capability parameters of the external audio device of each device type in the corresponding device environment. The system then assigns the external audio device of each device type to the appropriate device environment. The audio output capability parameters in the corresponding device environment are sent to the fourth terminal device so that the fourth terminal device responds to the access event of the third external audio device. Based on the audio output capability parameters of the external audio devices of each device type in the corresponding device environment, the target audio strategy corresponding to the third external audio device is determined. Based on the selectable target audio, the above-mentioned steps of aggregating multiple second external device data based on the second identity and device information in multiple second external device data to obtain multiple data sets include: for each second external device data, generating at least one aggregation parameter corresponding to the second external device data based on the second identity and device information in the second external device data; wherein, the aggregation parameter includes one or more of the following: second identity, model of the third terminal device, version of the operating system running on the third terminal device, chip parameters and firmware version of the second external audio device; aggregating multiple second external device data based on the aggregation parameters corresponding to each second external device data to obtain multiple data sets; the aggregation parameters of the second external device data included in each data set are the same.
[0151] Optionally, the step of determining the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment based on the second row of data in each data set includes: for each data set, determining behavioral statistics based on the second row of data in the data set; the behavioral statistics include multiple of the following: the sampling rate used by the external audio device of the corresponding device type of the data set and the usage ratio of each sampling rate, channel configuration information, multi-channel support, stability, first frame time and stuttering rate; and determining the audio output capability parameters of the corresponding device type in the corresponding device environment based on the behavioral statistics.
[0152] Optionally, the above method further includes: determining the dispersion parameter corresponding to the behavioral statistics; if the dispersion parameter is greater than or equal to a preset parameter threshold, canceling the use of a dataset to determine the audio output capability parameter of the corresponding device type in the corresponding device environment.
[0153] Optionally, the above method further includes: if the dispersion parameter is greater than or equal to a preset parameter threshold, marking the identity identifier corresponding to the data set as a low confidence identifier, using the identity identifier of the fourth terminal device in response to the third external audio device as a low confidence identifier, and using local historical data to determine the target audio strategy corresponding to the third external audio device.
[0154] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0155] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0156] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0157] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0158] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for controlling an external audio device, characterized in that, The method is applied to a first terminal device; the method includes: In response to an access event of a first external audio device, the characteristic parameters of the first external audio device are obtained; the characteristic parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; Based on the aforementioned feature parameters, a first identity identifier for the first external audio device is determined. The system acquires target data, determines a target audio policy corresponding to the first external audio device based on the first identity identifier and the target data, and controls the external audio device to output audio based on the target audio policy. The target data includes audio output capability parameters of multiple types of external audio devices in at least one device environment. The target data is generated by a designated server aggregating external device data sent by the first terminal device and / or the second terminal device.
2. The method according to claim 1, characterized in that, The feature parameters include multiple parameters; The step of determining the first identity of the first external audio device based on the aforementioned feature parameters includes: The target parameters are obtained by concatenating multiple feature parameters in a preset order. A hash operation is performed on the target parameter, and the result is determined as the first identity identifier of the first external audio device.
3. The method according to claim 1, characterized in that, The target data also includes the identification of multiple types of external audio devices; The step of determining the target audio strategy corresponding to the first external audio device based on the first identity identifier and the target data includes: Search for the first identity identifier among the identity identifiers of multiple external audio devices in the target data; If the first identity is found, the target audio strategy corresponding to the first external audio device is determined based on the audio output capability parameters of the external audio device corresponding to the first identity in at least one device environment.
4. The method according to claim 3, characterized in that, The method further includes: If the first identity identifier is not found, the device type of the first external audio device is determined based on the characteristic parameters of the first external audio device; Based on the device type of the first external audio device and local historical data, the target audio strategy corresponding to the first external audio device is determined.
5. The method according to claim 1, characterized in that, The method further includes: Acquire first behavioral data of the first external audio device during audio output; the first behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data; Based on the first identity identifier of the first external audio device, the first behavior data, and the device information of the first terminal device, first external device data corresponding to the first external audio device is generated. The first external device data is sent to the designated server so that the designated server updates the audio output capability parameters of the external audio device of the type corresponding to the first external audio device in the device environment corresponding to the first terminal device based on the first external device data.
6. A method for controlling an external audio device, characterized in that, The method is applied to a specified server; The method includes: Acquire multiple second external device data sent by the third terminal device; the second external device data includes: a second identity identifier of the second external audio device connected to the third terminal device, device information of the third terminal device, and second behavior data of the second external audio device during the process of connecting to the third terminal device to output audio; The second identity identifier is generated based on the characteristic parameters of the second external audio device; the characteristic parameters are used to indicate at least one of the following: identification information, configuration information, audio routing information, model information, and manufacturer information; the second behavioral data includes one or more of the following: actual sampling rate, actual number of channels, actual channel layout, sampling rate change data, channel number change data, stability data, routing change behavior data, and latency and smoothness index data. Based on the second identity identifier and device information in multiple second external device data, the multiple second external device data are aggregated to obtain multiple data sets; Based on the second row of data in each of the data sets, determine the audio output capability parameters of the external audio device of the device type corresponding to each data set in the corresponding device environment; The audio output capability parameters of each type of external audio device in the corresponding device environment are sent to the fourth terminal device, so that the fourth terminal device responds to the access event of the third external audio device, determines the target audio strategy corresponding to the third external audio device based on the audio output capability parameters of each type of external audio device in the corresponding device environment, and controls the third external audio device to output audio based on the target audio strategy.
7. The method according to claim 6, characterized in that, The steps of aggregating multiple sets of data based on the second identity identifier and device information from multiple sets of second external device data include: For each piece of the second external device data, at least one aggregation parameter corresponding to the second external device data is generated based on the second identity identifier and device information in the second external device data; The aggregation parameters include one or more of the following: the second identity identifier, the model of the third terminal device, the version of the operating system running on the third terminal device, and the chip parameters and firmware version of the second external audio device; Based on the aggregation parameters corresponding to each of the second external device data, multiple sets of second external device data are aggregated to obtain multiple data sets; the aggregation parameters of the second external device data included in each data set are the same.
8. The method according to claim 6, characterized in that, The step of determining the audio output capability parameters of the external audio device of the corresponding device type in the corresponding device environment based on the second row of data in each of the data sets includes: For each data set, behavioral statistics are determined based on the second row of data in the data set; the behavioral statistics include multiple of the following: the sampling rate used by the external audio device of the device type corresponding to the data set and the usage ratio of each sampling rate, channel configuration information, multi-channel support, stability, first frame time and stuttering rate. Based on the behavioral statistics, the audio output capability parameters of the device type corresponding to the data set in the corresponding device environment are determined.
9. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the control method of the external audio device according to any one of claims 1-8.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the control method for an external audio device as described in any one of claims 1-8.