Coding parameter configuration method and device of audio data, equipment and storage medium
By obtaining the status parameters of cloud desktop and local devices, and adaptively configuring the audio stream encoding parameters, the problem of low freedom to adjust encoding parameters in the prior art is solved, and higher audio quality and adaptability are achieved.
Patent Information
- Application Number
- CN202310994217.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
In the existing cloud desktop audio stream encoding scheme, the degree of freedom of adjusting encoding parameters is low, which cannot meet the audio quality requirements in complex cloud desktop usage scenarios.
By obtaining the application name currently running on the cloud desktop, the status parameters of the local device and the current encoding parameters of the audio data, the encoding parameters of the audio stream are adaptively configured to match the specific usage scenario and device status.
It improves the freedom of encoding parameters, realizes finer granular adjustment of audio data, and meets the audio quality requirements in complex usage scenarios of cloud desktops.
Smart Images

Figure CN119479665A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data coding technology, and specifically relates to a method, device, equipment and storage medium for configuring coding parameters of audio data. Background Art
[0002] With the continuous development of cloud computing technology, the application of cloud services is increasing and becoming more and more popular. For example, the increasingly mature cloud computer technology can be understood as a desktop service based on cloud computing. Its computing resources are deployed on cloud servers. Users access the application services provided by cloud computers through local terminals. Local terminals do not need to be equipped with CPU, memory, hard disk, etc. By connecting the local terminal to the cloud computer, the local terminal can interact with other terminals or applications.
[0003] The cloud desktop service provided by the cloud computer can transmit various audio data to local devices, which has complex usage scenarios. As a result, the cloud desktop service has high requirements for audio, requiring low latency, low lag, and audio quality. Moreover, the local device will perform differently under different audio encoding parameters (such as sampling rate, bit depth, encoding format, bit rate, etc.) when the status parameters (such as but not limited to network environment, memory configuration, etc.) are different.
[0004] However, in the existing cloud desktop audio stream encoding scheme, a fixed encoding format is generally adopted, and the adjustable encoding parameters have very low freedom and cannot achieve more fine-grained adjustment to meet the needs of various complex usage scenarios of the cloud desktop. Summary of the invention
[0005] The present application proposes a method, apparatus, device and storage medium for configuring encoding parameters of audio data, which can adaptively select encoding parameters of an audio stream according to the usage scenario of a cloud desktop and the status of a local device.
[0006] The first embodiment of the present application provides a method for configuring encoding parameters of audio data, including:
[0007] Obtain the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; the current state parameters of the local device are used to characterize the encoding parameters of the audio data supported by the local device;
[0008] Determine the current application scenario of the cloud desktop based on the application name and the current encoding parameters;
[0009] Based on the current application scenario and the current state parameters, encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured.
[0010] In some embodiments of the present application, determining the current application scenario of the cloud desktop based on the application name and the current encoding parameter includes:
[0011] Determine, from the preset application scene set of the cloud desktop, a preset application scene that matches the application name and the current encoding parameter, the preset application scene set comprising a plurality of preset application scenes, each preset application scene comprising a respective corresponding preset application name and preset encoding parameter;
[0012] The determined preset application scenario is determined as the current application scenario of the cloud desktop.
[0013] In some embodiments of the present application, before determining the preset application scenario that matches the application name and the current encoding parameter from the preset application scenario set of the cloud desktop, the method further includes:
[0014] Obtain all historical applications that have been run on the cloud desktop, and historical encoding parameters of audio data in the cloud desktop under each historical application;
[0015] Based on the names and historical coding parameters of each historical application, all applications are divided into application scenarios;
[0016] The preset application scenario set is formed based on all the divided application scenarios.
[0017] In some embodiments of the present application, configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameter includes:
[0018] Based on the current application scenario and the current state parameter, determining whether relevant configuration information sent by the local device is received; the relevant configuration information includes encoding parameters of audio data transmitted between the cloud desktop and the local device;
[0019] If so, configuring encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the relevant configuration information;
[0020] If not, the encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured based on the current application scenario and the current state parameters, as well as a preset parameter set of the current application scenario.
[0021] In some embodiments of the present application, configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameter, as well as the preset parameter set of the current application scenario, includes:
[0022] Determining a target parameter group matching the current state parameters from a preset parameter set of the current application scenario;
[0023] Based on the target parameter group, encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured.
[0024] In some embodiments of the present application, before configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameter and the preset parameter set of the current application scenario, the method further includes:
[0025] Acquire audio characteristics, historical encoding parameters, and historical status parameters of the local device for each of the application scenarios;
[0026] Based on the audio characteristics of each application scenario and the historical encoding parameters, multiple groups of encoding parameters are configured for each application scenario corresponding to different state parameters of the local device to form a preset parameter set for each application scenario.
[0027] In some embodiments of the present application, obtaining current encoding parameters of the audio data in the cloud desktop includes:
[0028] The encoding parameters currently used by the audio device in the cloud desktop are detected through the audio driver in the cloud desktop.
[0029] The second aspect of the present application provides a device for configuring encoding parameters of audio data, including:
[0030] A data acquisition module, used to acquire the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; the current state parameters of the local device are used to characterize the encoding parameters of the audio data supported by the local device;
[0031] A scene determination module, used to determine the current application scene of the cloud desktop based on the application name and the current encoding parameters;
[0032] A parameter configuration module is used to configure encoding parameters of audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameters.
[0033] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.
[0034] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and the program is executed by a processor to implement the method described in the first aspect above.
[0035] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0036] In an embodiment of the present application, the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop are first obtained; and based on the application name and the current encoding parameters, the current application scenario of the cloud desktop is determined; based on the current application scenario and the current state parameters, the encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured. In this way, the current application scenario of the cloud desktop is determined in combination with the application name running on the cloud desktop and the current encoding parameters of the audio data in the cloud desktop, which can avoid the influence of the application that is not playing audio but is running, and reduce the deviation caused by determining the application scenario only based on the application name, so that the determination of the application scenario is more accurate. And after determining the current application scenario, the encoding parameters of the audio data transmitted between the cloud desktop and the local device can be adaptively configured in combination with the state parameters of the local device, thereby increasing the degree of freedom of the encoding parameters, that is, increasing the number of adjustable encoding parameters, and the audio data can be adjusted in a more fine-grained manner, so that the sound quality experience gap between each adjustment gear is smaller, so as to meet the needs of various complex usage scenarios of the cloud desktop.
[0037] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.
[0039] In the attached picture:
[0040] Figure 1 A schematic diagram showing an application scenario of a method for configuring encoding parameters of audio data provided by some embodiments of the present application is shown;
[0041] Figure 2 A schematic diagram showing a flow chart of a method for configuring encoding parameters of audio data provided in some embodiments of the present application;
[0042] Figure 3 A schematic diagram of the specific process in step S2 in an embodiment of the present application is shown;
[0043] Figure 4 A schematic diagram of the specific process in step S3 in an embodiment of the present application is shown;
[0044] Figure 5 A schematic diagram showing a specific flow chart of a method for configuring encoding parameters of audio data provided in some other embodiments of the present application;
[0045] Figure 6 A schematic diagram showing the structure of an audio data encoding parameter configuration device provided in some embodiments of the present application;
[0046] Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present application is shown.
[0047] Figure 8 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0049] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0050] Cloud computing is a new type of service that deploys computing power on cloud servers and interacts locally. It has the advantages of high availability, high security, easy specification expansion, and multi-terminal connection. Figure 1 As shown, the cloud computer can output audio data to the local terminal through the transmission protocol, and the audio data can be encoded in the cloud before the data is transmitted. After the local device receives the encoded audio data transmitted by the cloud computer, it can decode the encoded audio data and cache it in the buffer of the local device. The local device can also install an operating system, which can call the audio data cached in the buffer through a callback function and connect to the audio driver to play the audio data.
[0051] Given the strong processing power and compatibility of cloud computers, cloud desktop services (a service of cloud computers) can transmit audio data formed by various encoding parameters, which has relatively complex usage scenarios. As a result, cloud desktop services have high requirements for audio, requiring low latency, low lag, and audio quality. Moreover, the performance of local devices under different state parameters (such as but not limited to network environment, memory configuration, etc.) is also different under different audio encoding parameters (such as sampling rate, bit depth, encoding format, bit rate, etc.).
[0052] In the related art, for different application scenarios, cloud desktop services generally adopt a fixed encoding method to encode audio streams. Even if the status parameters of the local device (including but not limited to the hardware status of the device and the network status, etc.) are different, due to the use of a fixed encoding method for encoding, the adjustable encoding parameters have a very low degree of freedom and cannot be adjusted in a more fine-grained manner, resulting in a large difference in the sound quality experience between each adjustment level, which cannot meet the needs of various complex usage scenarios of the cloud desktop.
[0053] Based on the above reasons, the embodiment of the present application provides a method for configuring the encoding parameters of audio data, first obtaining the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; and based on the application name and the current encoding parameters, determining the current application scenario of the cloud desktop; based on the current application scenario and the current state parameters, configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device. In this way, the current application scenario of the cloud desktop is determined in combination with the application name running on the cloud desktop and the current encoding parameters of the audio data in the cloud desktop, which can avoid the influence of the application that is not playing audio but is running, and reduce the deviation caused by determining the application scenario only based on the application name, so that the determination of the application scenario is more accurate. And after determining the current application scenario, the encoding parameters of the audio data transmitted between the cloud desktop and the local device can be adaptively configured in combination with the state parameters of the local device, thereby increasing the degree of freedom of the encoding parameters, that is, increasing the number of adjustable encoding parameters, and the audio data can be adjusted in a more fine-grained manner, so that the sound quality experience gap between each adjustment gear is smaller, so as to meet the needs of various complex usage scenarios of the cloud desktop.
[0054] The application running on the cloud desktop may include any application that can run on the cloud desktop, which may be one or more. The current status parameters of the local device are used to characterize the encoding parameters of the audio data supported by the local device, which may include but are not limited to the encoding format supported by the local device, the buffer size, whether the network status is good, etc.
[0055] The application scenarios of cloud desktops can be divided according to the application type of application audio data, for example, they may include music playback, voice calls, games, ringtones and prompt sounds, etc., and these scenarios can also be expanded according to service requirements. For example, if other types of application services are subsequently connected, such as audio books, the audio data on the newly connected application service can be used as a new application scenario.
[0056] The encoding parameters of audio data can refer to any parameters that affect the playback sound quality, including some parameters related to the audio data itself, such as encoding format, encoding bit rate, and audio frame length. It also includes some parameters related to the audio driver, such as audio sampling rate, number of audio channels, audio bit depth, etc. It also includes some parameters related to the hardware of the local device, such as audio buffer size, etc. Among them, the audio encoding bit rate is the amount of encoded data transmitted per second; the audio frame size is the length of audio data encoded and decoded once; the audio sampling rate is the number of times the audio driver obtains sound samples per second; the number of audio channels is the number of sound channels of the audio driver, such as mono, stereo, etc.; the audio bit depth is the resolution of the audio driver sampling the audio data; the audio buffer is the buffer in the local device that caches the decoded audio data.
[0057] The method for configuring the encoding parameters of the audio data can be to configure the device on the cloud computer side so that the audio data encoded on the cloud computer side can meet the needs of various complex usage scenarios of the cloud desktop. The local device can also be configured so that the local device can realize the application of various complex usage scenarios of the cloud desktop. The execution subject of the method can be a server or cluster on the cloud computer side that can perform parameter configuration, or a server or cluster on the local side that can perform parameter configuration, or a processing module on these servers or clusters that is specifically used for encoding parameter configuration.
[0058] The following is a detailed description of the audio data encoding parameter configuration method provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0059] See also Figure 2 , is a flow chart of a method for configuring encoding parameters of audio data provided in an embodiment of the present application, such as Figure 2 As shown, the method for configuring the encoding parameters of the audio data may include the following steps:
[0060] Step S1, obtaining the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop.
[0061] In actual applications, one or more applications can be run on the cloud desktop at the same time, multiple applications can transmit audio data, and some applications may need to transmit audio data. Some applications may be running, but they are not necessarily transmitting audio data. Therefore, judging the usage scenario of audio data based solely on the application name may be biased. Therefore, this embodiment also obtains the current encoding parameters of the audio data in the cloud desktop. According to the current encoding parameters, combined with the obtained application name, the current application scenario of the cloud desktop can be accurately judged. The current state parameters of the local device obtained are used to configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device to increase the degree of freedom of the encoding parameters.
[0062] Specifically, when obtaining the current encoding parameters of the audio data in the cloud desktop, the audio driver in the cloud desktop can detect the encoding parameters currently used by the audio device in the cloud desktop, and determine the detected encoding parameters as the current encoding parameters of the audio data in the cloud desktop.
[0063] In view of the fact that some of the above-mentioned applications may be running but not necessarily transmitting audio data, for example, the cloud desktop may be running chat software and playback software, both of which may perform audio transmission, and the audio data of the two may use different encoding formats and be transmitted through different transmission protocols. When audio data transmission is required between the cloud computer side device and the local device, the encoding parameters currently used by the audio device in the cloud desktop can be used to determine whether it is the audio data in the chat software or the audio data in the playback software, and then accurately obtain the current encoding parameters of the audio data in the cloud desktop.
[0064] Step S2, determining the current application scenario of the cloud desktop based on the application name and the current encoding parameters.
[0065] In this embodiment, after determining the name of the application running on the cloud desktop and the current encoding parameters of the audio data in the cloud desktop, the name of the application using the audio data to be transmitted can be determined from the name of the application currently running on the cloud desktop based on the current encoding parameters of the audio data in the cloud desktop, and then the current application scenario of the cloud desktop can be accurately judged.
[0066] In actual applications, the usage of audio data can be divided into scenarios first. Specifically, all historical applications that have been run on the cloud desktop and the historical encoding parameters of the audio data in the cloud desktop under each historical application can be obtained first; then, based on the name and historical encoding parameters of each historical application, all applications can be divided into application scenarios; and a preset application scenario set is formed based on all the divided application scenarios.
[0067] Among them, historical applications can be understood as applications that have been run on the cloud desktop, and the historical encoding parameters of the audio data in the cloud desktop under each historical application can be understood as the encoding parameters of the audio data at that time during the operation of each historical application. It can be understood that the encoding parameters of the audio data at that time may not only be related to the application, but also to the state parameters of the local device, so under the same application, the encoding parameters of the audio data may also include multiple groups.
[0068] The service type of the application can be determined based on the name of the application, which may include music, games, instant messaging, etc. Different service types may correspond to different coding parameter groups, and the same coding parameter group may also correspond to different service types. Therefore, based on the name and historical coding parameters of each historical application, all applications can be accurately divided into application scenarios. The collection of all divided application scenarios forms a preset application scenario set, which may include multiple preset application scenarios.
[0069] Furthermore, after establishing the above-mentioned preset application scenario set, a preset parameter set for each application scenario can also be pre-established. Specifically, the audio characteristics, historical encoding parameters, and historical state parameters of the local device of each application scenario can be obtained first; based on the audio characteristics and historical encoding parameters of each application scenario, corresponding to different state parameters of the local device, multiple sets of encoding parameters are configured for each application scenario to form a preset parameter set for each application scenario.
[0070] The audio characteristics of the application scenario may include the requirements for sound quality in the application scenario, whether the application scenario is sensitive to audio delay, etc.
[0071] When configuring multiple groups of encoding parameters for each application scenario, different encoding parameter groups can be set based on different audio characteristics, corresponding to different status parameters of the local device, and different encoding parameter groups can be configured for the same audio characteristics. Therefore, based on the audio characteristics and historical encoding parameters of each application scenario, corresponding to different status parameters of the local device, multiple groups of encoding parameters can be configured for each application scenario, and each group of encoding parameters can constitute an adjustment gear in the scenario, thereby improving the degree of freedom of encoding parameters in each application scenario, refining the adjustment granularity of encoding parameters, and reducing the difference in sound quality experience between adjustment gears, so as to further meet the needs of various complex usage scenarios of cloud desktops.
[0072] For example, in the music playback scenario, the audio delay is relatively insensitive, but the sound quality requirement is high. You can choose to use the lossless PCM encoding (Pulse Code Modulation) format, and set a larger audio frame length and audio buffer size to reduce audio jams and improve the sound quality of audio data. When the network condition is not ideal, you can also choose AAC encoding (Advanced Audio Coding) with a smaller bit rate. In the voice call scenario, the audio delay is relatively sensitive, the sound quality requirement is not high, and it is mainly human voice. When the network condition is good, you can use the lossless PCM encoding format, set a longer audio frame length and a larger audio buffer to reduce audio jams and improve the sound quality of audio data; when the network condition is not ideal, you can also choose the OPUS encoding (lossy sound encoding) format with smaller encoding delay and better support for human voice, and set a smaller audio frame length and a smaller audio buffer to reduce delay.
[0073] In some embodiments, Figure 3 As shown, step S2 may include the following processing: step S21, determining a preset application scenario that matches the application name and current encoding parameters from the preset application scenario set of the cloud desktop, the preset application scenario set including multiple preset application scenarios; step S21, determining the determined preset application scenario as the current application scenario of the cloud desktop.
[0074] In this embodiment, given that each preset application scenario may include its own corresponding preset application name and preset encoding parameters, when determining the cloud desktop, the preset application scenario that matches the application name and current encoding parameters can be determined from the preset application scenario set of the cloud desktop based on the application name and current encoding parameters currently running on the cloud desktop, and the preset application scenario is determined as the current application scenario of the cloud desktop, thereby accurately judging the current application scenario of the cloud desktop.
[0075] Step S3, based on the current application scenario and current state parameters, configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device.
[0076] In this actual application, the same application scenario corresponds to the status parameters of the local device, and the encoding parameters of the audio data transmitted between the cloud desktop and the local device can be configured accordingly. Therefore, after determining the current application scenario, it is also necessary to configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device in combination with the current status parameters of the local device to achieve a more fine-grained adaptive configuration of the audio data.
[0077] In some embodiments, Figure 4As shown, the above step S3 may include the following processing: step S31, based on the current application scenario and current state parameters, determine whether relevant configuration information sent by the local device is received; step S32, if yes, then based on the relevant configuration information, configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device; step S33, if not, then based on the current application scenario and current state parameters, and the preset parameter set of the current application scenario, configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device.
[0078] The relevant configuration information includes encoding parameters of audio data transmitted between the cloud desktop and the local device.
[0079] In actual applications, users can configure the encoding parameters of audio data transmitted between the cloud desktop and the local device through the local device. In the case of user configuration, the encoding parameters of audio data transmitted between the cloud desktop and the local device are configured based on the user's configuration information to improve user participation and autonomy. In the case of no configuration by the user, the encoding parameters of audio data transmitted between the cloud desktop and the local device are adaptively configured based on the current application scenario and current state parameters to further improve the audio data encoding parameter configuration strategy.
[0080] Specifically, the above-mentioned step of configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameters, as well as the preset parameter set of the current application scenario, may include the following processing: determining a target parameter group that matches the current state parameters from the preset parameter set of the current application scenario; and configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the target parameter group.
[0081] In this embodiment, after the parameter sets of each application scenario are preconfigured, when configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device, the target parameter group that matches the current state parameters can be first determined from the preset parameter set of the current application scenario. For example, if the network status of the local device is not ideal and the buffer is small, the target parameter group with a small audio frame length, a small audio buffer, and a small bit rate in the current application scenario is selected; and if the network status of the local device is good and the buffer is large, the target parameter group with a large audio frame length, a large audio buffer, and a large bit rate in the current application scenario can be selected. Then, based on the selected target parameter group, the encoding parameters of the audio data transmitted between the cloud desktop and the local device can be configured to achieve adaptive configuration of the encoding parameters of the audio data transmitted between the cloud desktop and the local device.
[0082] In other embodiments, Figure 5As shown, the method for configuring the encoding parameters of the audio data may include the following specific steps:
[0083] 1) The usage scenarios of cloud desktops are divided into music playback, voice calls, games, ringtones and prompts, etc., and these scenarios can be expanded according to the needs of application services.
[0084] 2) According to the needs of different scenarios, parameter groups of different gears are pre-set. The parameter group format is as follows:
[0085] Sampling rate: unit Hz (Hertz);
[0086] Number of channels: 1 for single channel and 2 for dual channels;
[0087] Data bit depth: data resolution;
[0088] Audio frame length: unit: ms (milliseconds);
[0089] Coding format: PCM, AAC, OPUS, etc.
[0090] Bit rate: the amount of audio data per second, in kbps;
[0091] Buffer length: unit: ms (milliseconds).
[0092] Table 1 below is an example of the setting of the encoding parameter group for audio data when the application scenario is music playback. In view of the above audio characteristics, the music playback scenario is relatively insensitive to audio delay and has high requirements for sound quality. You can choose to use the lossless PCM encoding format and set a larger audio frame length and a larger audio buffer to reduce audio stuttering. When the network conditions of the local device are not ideal, you can also choose the AAC encoding format with a smaller bit rate.
[0093] Table 1
[0094]
[0095]
[0096] Table 2 below is an example of setting the encoding parameter group for audio data when the application scenario is a voice call. In view of the above-mentioned audio characteristics, the voice call scenario is relatively sensitive to audio delay, has low requirements for sound quality, and is mainly for human voice. When the network condition is not ideal, you can also choose the OPUS encoding format with smaller encoding delay and better support for human voice, and set a smaller audio frame length and a smaller audio buffer to reduce delay.
[0097] Table 2
[0098]
[0099] 3) Detect the name of the application currently being used by the cloud desktop user. Combine the application name and the speaker and microphone status to determine the current cloud desktop usage scenario: Classify various commonly used applications according to the scenarios in step 1 above, and preliminarily determine the usage scenario after obtaining the name of the currently used application.
[0100] 4) Detect whether the user has set the audio encoding parameters independently. If not, detect the sampling rate, number of channels, and data bit depth used by the speakers in the cloud desktop through the audio driver in the cloud desktop, and select matching parameters in the scene parameter set; if the user has set the audio encoding parameters independently, use the encoding parameters selected by the user.
[0101] In summary, the method for configuring the encoding parameters of audio data provided in this embodiment first obtains the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; then, the current application scenario of the cloud desktop is determined in combination with the name of the application running on the cloud desktop and the current encoding parameters of the audio data in the cloud desktop, which can avoid the influence of applications that are running but not playing audio, reduce the deviation caused by determining the application scenario only based on the application name, and make the determination of the application scenario more accurate. After determining the current application scenario, the encoding parameters of the audio data transmitted between the cloud desktop and the local device can be adaptively configured in combination with the state parameters of the local device, thereby increasing the degree of freedom of the encoding parameters, that is, increasing the number of adjustable encoding parameters, and making it possible to adjust the audio data in a more fine-grained manner, so that the difference in sound quality experience between each adjustment gear is smaller, so as to meet the needs of the cloud desktop in various complex usage scenarios.
[0102] Some embodiments of the present application further provide a device for configuring encoding parameters of audio data, the device being used to execute the method for configuring encoding parameters of audio data provided in any of the above embodiments. Figure 6 A schematic diagram of a device for configuring the encoding parameters of the audio data is shown. Figure 6 As shown, the encoding parameter configuration device of the audio data includes:
[0103] The data acquisition module is used to obtain the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; the current state parameters of the local device are used to characterize the encoding parameters of the audio data supported by the local device;
[0104] A scene determination module, used to determine the current application scene of the cloud desktop based on the application name and current encoding parameters;
[0105] The parameter configuration module is used to configure the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameters.
[0106] It can be understood that the encoding parameter configuration device for audio data provided in this embodiment and the encoding parameter configuration method for audio data provided in the embodiment of the present application are based on the same inventive concept, and can at least achieve the same beneficial effects of the encoding parameter configuration method for audio data, and the various implementation methods of the embodiment of the encoding parameter configuration method for audio data are also applicable to the embodiment of the encoding parameter configuration device for audio data, which will not be repeated here.
[0107] It should be noted that the data involved in this application (including but not limited to data used for model training, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0108] The present application also provides an electronic device to execute the above-mentioned method for configuring the encoding parameters of audio data. Figure 7 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 7 As shown, the electronic device 4 includes: a processor 400, a memory 401, a bus 402 and a communication interface 403, and the processor 400, the communication interface 403 and the memory 401 are connected via the bus 402; the memory 401 stores a computer program that can be run on the processor 400, and when the processor 400 runs the computer program, it executes the encoding parameter configuration method of the audio data provided in any of the aforementioned embodiments of the present application.
[0109] The memory 401 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0110] The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 401 is used to store a program, and the processor 400 executes the program after receiving an execution instruction. The encoding parameter configuration method of the audio data disclosed in any implementation of the embodiment of the present application may be applied to the processor 400, or implemented by the processor 400.
[0111] The processor 400 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 400. The above processor 400 can be a general-purpose processor, including a processor (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 401, and the processor 400 reads the information in the memory 401 and completes the steps of the above method in combination with its hardware.
[0112] The electronic device provided in the embodiment of the present application and the method for configuring the encoding parameters of the audio data provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented therein.
[0113] The present application also provides a computer-readable storage medium corresponding to the method for configuring the encoding parameters of the audio data provided in the above embodiment. Figure 8 The computer-readable storage medium shown is a CD 50 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the encoding parameter configuration method for audio data provided by any of the aforementioned embodiments will be executed.
[0114] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0115] An embodiment of the present application also provides a computer program product, including a computer program, which is executed by a processor to implement the encoding parameter configuration method for audio data described in any of the above embodiments.
[0116] The computer-readable storage medium and computer program product provided in the above-mentioned embodiments of the present application are based on the same inventive concept as the encoding parameter configuration method of audio data provided in the embodiments of the present application, and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0117] It should be noted that:
[0118] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.
[0119] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed application requires more features than the features explicitly recited in the individual claims. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.
[0120] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0121] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for configuring encoding parameters of audio data, characterized in that: include: Obtain the name of the application currently running on the cloud desktop, the current status parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; The current state parameter of the local device is used to characterize the encoding parameters of the audio data supported by the local device; Determine the current application scenario of the cloud desktop based on the application name and the current encoding parameters; Based on the current application scenario and the current state parameters, encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured.
2. The method according to claim 1, characterized in that The determining the current application scenario of the cloud desktop based on the application name and the current encoding parameter includes: Determine, from the preset application scene set of the cloud desktop, a preset application scene that matches the application name and the current encoding parameter, the preset application scene set comprising a plurality of preset application scenes, each preset application scene comprising a respective corresponding preset application name and preset encoding parameter; The determined preset application scenario is determined as the current application scenario of the cloud desktop.
3. The method according to claim 2, characterized in that Before determining the preset application scenario that matches the application name and the current encoding parameter from the preset application scenario set of the cloud desktop, the method further includes: Obtain all historical applications that have been run on the cloud desktop, and historical encoding parameters of audio data in the cloud desktop under each historical application; Based on the names and historical coding parameters of each historical application, all applications are divided into application scenarios; The preset application scenario set is formed based on all the divided application scenarios.
4. The method according to claim 1, characterized in that: The configuring, based on the current application scenario and the current state parameter, encoding parameters of the audio data transmitted between the cloud desktop and the local device includes: Based on the current application scenario and the current state parameter, determining whether relevant configuration information sent by the local device is received; the relevant configuration information includes encoding parameters of audio data transmitted between the cloud desktop and the local device; If so, configuring encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the relevant configuration information; If not, the encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured based on the current application scenario and the current state parameters, as well as a preset parameter set of the current application scenario.
5. The method according to claim 4, characterized in that The configuring, based on the current application scenario and the current state parameter, and the preset parameter set of the current application scenario, encoding parameters of the audio data transmitted between the cloud desktop and the local device includes: Determining a target parameter group matching the current state parameters from a preset parameter set of the current application scenario; Based on the target parameter group, encoding parameters of the audio data transmitted between the cloud desktop and the local device are configured.
6. The method according to claim 4, characterized in that Before configuring the encoding parameters of the audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameter and the preset parameter set of the current application scenario, the method further includes: Acquire audio characteristics, historical encoding parameters, and historical status parameters of the local device for each of the application scenarios; Based on the audio characteristics of each application scenario and the historical encoding parameters, multiple groups of encoding parameters are configured for each application scenario corresponding to different state parameters of the local device to form a preset parameter set for each application scenario.
7. The method according to claim 1, characterized in that Obtaining the current encoding parameters of the audio data in the cloud desktop includes: The encoding parameters currently used by the audio device in the cloud desktop are detected through the audio driver in the cloud desktop.
8. A device for configuring encoding parameters of audio data, characterized in that: include: A data acquisition module, used to acquire the name of the application currently running on the cloud desktop, the current state parameters of the local device connected to the cloud desktop, and the current encoding parameters of the audio data in the cloud desktop; The current state parameter of the local device is used to characterize the encoding parameters of the audio data supported by the local device; A scene determination module, used to determine the current application scene of the cloud desktop based on the application name and the current encoding parameters; A parameter configuration module is used to configure encoding parameters of audio data transmitted between the cloud desktop and the local device based on the current application scenario and the current state parameters.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 7.