Audio data processing system, method and server
By implementing downmixing and encoding of audio data in the processor, the transmission problem of multi-channel virtual sound cards under limited bandwidth conditions is solved, the host load is reduced, the needs of multi-channel virtual sound cards are met and the virtualization efficiency is improved. Diversity of desktop applications.
Patent Information
- Application Number
- CN202311787268.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-12-22
AI Technical Summary
The existing technology cannot meet the needs of multi-channel virtual sound cards when the bandwidth is limited or the client audio configuration cannot be changed, and audio data processing increases the load of the host.
By implementing downmixing and encoding functions in the processor, the audio data transmission bandwidth is reduced, and audio data processing is completed by a processor outside the host, supporting multi-channel audio data transmission and reducing the load on the host.
Without increasing the transmission bandwidth or changing the client audio configuration, it meets the needs of multi-channel virtual sound cards, improves the diversity of virtual sound cards in virtual desktop application scenarios, and reduces the processing load of the host.
Smart Images

Figure CN117762373B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of audio data processing, and in particular to an audio data processing system, method and server. Background Art
[0002] Virtual desktop infrastructure (VDI), or virtual desktop for short, is a desktop delivery model that supports hosting client desktop workloads (operating systems, applications, user data) on servers in data centers. Users can communicate with the server's virtual desktop through a client that supports the remote desktop protocol (RDP). Each user in the virtual desktop can access their personal desktop through any authorized device, greatly improving desktop flexibility.
[0003] The application on the virtual desktop may include a virtual sound card. When the user operates the virtual sound card to play audio through the client, audio data will be generated. These audio data need to be transmitted from the host machine on the server side to the client. The more channels of audio data there are, the greater the transmission bandwidth required. Therefore, when the bandwidth is limited or the client audio configuration cannot be changed, the existing technology usually only supports single-channel or dual-channel virtual sound cards, which cannot meet the user's demand for multi-channel virtual sound cards. In addition, the encoding is usually completed by the host machine, which increases the load of the host machine. Summary of the invention
[0004] In view of this, the present disclosure proposes an audio data processing system, method and server. The audio data processing system of the present disclosure embodiment uses a processor that can realize the down-mixing function. After the multi-channel audio data is down-mixed and encoded, the bandwidth required for transmission is greatly reduced, thereby meeting the user's demand for multi-channel virtual sound cards without increasing the transmission bandwidth and changing the client audio configuration, and improving the diversity of virtual sound cards that can be supported in virtual desktop application scenarios. Down-mixing and encoding are realized by a processor outside the host machine, reducing the load of the host machine.
[0005] According to one aspect of the present disclosure, there is provided an audio data processing system, the system comprising a host machine and a processor, the host machine running at least one virtual machine, the virtual machine comprising a virtual sound card, the virtual machine being used to receive a control instruction from a client corresponding to the virtual machine and transmit the control instruction to the host machine, and to generate first audio data when the operation indicated by the control instruction is to play audio; the host machine being used to create a first instance in the processor, obtain the first audio data and output it to the processor when the operation indicated by the control instruction is to start the virtual sound card; the processor being used to down-mix and encode the first audio data according to an instruction of the first instance to obtain second audio data, and output the second audio data to the host machine; the host machine being also used to output the second audio data to the client.
[0006] In a possible implementation, the system further includes a shared memory accessed by the host machine and the virtual machine, wherein the virtual machine is specifically used to generate first audio data and store the first audio data in the shared memory; and the host machine is specifically used to obtain the first audio data from the shared memory.
[0007] In a possible implementation, the host machine is further used to: create and run the virtual machine in response to a virtual service request from the client; allocate a corresponding storage area to the virtual machine in the shared memory; and transmit address information of the storage area to the virtual machine.
[0008] In one possible implementation, the host machine is also used to: when there is a created and unallocated virtual machine, in response to a virtual service request from the client, select a created and unallocated virtual machine to allocate to the user, and transmit address information of the storage area corresponding to the virtual machine to the virtual machine.
[0009] In a possible implementation, a driver for the virtual sound card is installed on the virtual machine, and the driver for the virtual sound card is used to: create the virtual sound card; allocate a cache for the virtual sound card in the storage area, and the cache is used to store the first audio data; and transmit address information of the cache to the host machine.
[0010] In a possible implementation, a driver of the processor is installed on the host machine, the first instance is created by the driver of the processor, and the first audio data is acquired by the driver of the processor according to the cached address information.
[0011] In a possible implementation, the driver of the processor is further used to: load the firmware of the processor into the shared memory; modify the running start address of the processor to the start address of the firmware in the shared memory and start the processor.
[0012] In a possible implementation manner, the processor is a coprocessor.
[0013] In a possible implementation manner, the virtual sound card includes multiple channels.
[0014] According to another aspect of the present disclosure, there is provided an audio data processing method, the method being applied to an audio data processing system, the system comprising a host machine and a processor, the host machine running at least one virtual machine, the virtual machine comprising a virtual sound card, the method comprising: the virtual machine receiving a control instruction from a client corresponding to the virtual machine and transmitting the control instruction to the host machine, and generating first audio data when the operation indicated by the control instruction is to play audio; the host machine creating a first instance in the processor when the operation indicated by the control instruction is to start the virtual sound card, obtaining the first audio data and outputting it to the processor; the processor down-mixing and encoding the first audio data according to an instruction of the first instance to obtain second audio data, and outputting the second audio data to the host machine; the host machine outputting the second audio data to the client.
[0015] In a possible implementation, the system also includes a shared memory accessed by the host machine and the virtual machine, and generating the first audio data includes: generating the first audio data and storing it in the shared memory; obtaining the first audio data and outputting it to the processor includes: obtaining the first audio data from the shared memory.
[0016] In one possible implementation, the method further includes: the host machine creates and runs the virtual machine in response to a virtual service request from the client; the host machine allocates a corresponding storage area to the virtual machine in the shared memory; and the host machine transmits address information of the storage area to the virtual machine.
[0017] In one possible implementation, the method further includes: when there is a created and unallocated virtual machine, the host machine selects a created and unallocated virtual machine to allocate to the user in response to a virtual service request from the client, and transmits address information of a storage area corresponding to the virtual machine to the virtual machine.
[0018] In a possible implementation, a driver for the virtual sound card is installed on the virtual machine, and the method further includes: the driver for the virtual sound card creates the virtual sound card; the driver for the virtual sound card allocates a cache for the virtual sound card in the storage area, and the cache is used to store the first audio data; the driver for the virtual sound card transmits address information of the cache to the host machine.
[0019] In a possible implementation, a driver of the processor is installed on the host machine, the first instance is created by the driver of the processor, and the first audio data is acquired by the driver of the processor according to the cached address information.
[0020] In a possible implementation, the method further includes: the driver of the processor loads the firmware of the processor into the shared memory; the driver of the processor modifies the running start address of the processor to the start address of the firmware in the shared memory and starts the processor.
[0021] In a possible implementation manner, the processor is a coprocessor.
[0022] In a possible implementation manner, the virtual sound card includes multiple channels.
[0023] According to another aspect of the present disclosure, a server is provided, comprising the above-mentioned audio data processing system.
[0024] According to the audio data processing system of the embodiment of the present disclosure, a control instruction from a client corresponding to the virtual machine is received through a virtual machine and the control instruction is transmitted to a host machine. When the operation indicated by the control instruction is to start a virtual sound card, the host machine creates a first instance in a processor, so that the processor can have the ability of down-mixing and encoding; when the operation indicated by the control instruction is to play audio, the virtual machine generates first audio data, obtains the first audio data through the host machine and outputs it to the processor, so that the processor can obtain the processed data; the processor down-mixes and encodes the first audio data according to the instruction of the first instance to obtain second audio data, outputs the second audio data to the host machine, and the host machine outputs the second audio data to the client. The transmission of the processed audio data can be completed. Since the processor can be used to achieve down-mixing and encoding, the transmission of multi-channel audio data between the host machine and the client can be supported, so that the virtual sound card can support multi-channel, without increasing the transmission bandwidth and without changing the client audio configuration, the diversity of virtual sound cards that can be supported in the virtual desktop application scenario is improved. And the audio data processing is completed by a processor outside the host machine, which can effectively accelerate the audio processing process and reduce the host machine load.
[0025] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0027] Figure 1 An exemplary application scenario of the audio data processing system according to an embodiment of the present disclosure is shown.
[0028] Figure 2 A schematic diagram showing the structure of an audio data processing system according to an embodiment of the present disclosure.
[0029] Figure 3 A schematic diagram showing the structure of an audio data processing system according to an embodiment of the present disclosure.
[0030] Figure 4 An exemplary flowchart of an audio data processing method according to an embodiment of the present disclosure is shown.
[0031] Figure 5 A block diagram of an apparatus 1900 according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0033] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0034] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0035] Figure 1 An exemplary application scenario of the audio data processing system according to an embodiment of the present disclosure is shown.
[0036] like Figure 1As shown, the audio data processing system can be set on a server in a data center. The audio data processing system runs at least one virtual machine, each of which can be provided to a user and presented as a virtual desktop. The virtual machine can support multiple virtual services, such as a virtual sound card, etc., and the virtual services can be displayed in the virtual desktop.
[0037] When the user operates the virtual sound card to play audio, the client generates a control instruction indicating the user's operation mode, and the virtual machine generates audio data (such as the first audio data described below). The control instruction can be transmitted to the audio data processing system. The audio data processing system downmixes and encodes the audio data generated by the virtual sound card according to the control instruction, and then transmits the encoded data (such as the second audio data described below) to the client through a network transmission protocol.
[0038] Figure 2 A schematic diagram showing the structure of an audio data processing system according to an embodiment of the present disclosure.
[0039] like Figure 2 As shown, in a possible implementation, the system includes a host machine and a processor. The host machine runs at least one virtual machine, and the virtual machine includes a virtual sound card.
[0040] The virtual machine is used to receive a control instruction from a client corresponding to the virtual machine and transmit the control instruction to the host machine, and generate first audio data when the operation indicated by the control instruction is to play audio;
[0041] The host machine is used to, when the operation indicated by the control instruction is to start the virtual sound card, create a first instance in the processor, obtain the first audio data and output it to the processor;
[0042] The processor is used to, according to the instruction of the first instance, down-mix and encode the first audio data to obtain second audio data, and output the second audio data to the host machine;
[0043] The host machine is also used to output the second audio data to the client.
[0044] For example, an audio data processing system may include a host machine and a processor, wherein the processor is responsible for completing down-mixing and encoding operations in audio data processing, and the host machine is responsible for completing other operations in audio data processing, such as running virtual machines and transmitting data and instructions. The host machine can run multiple virtual machines. Figure 2 In the example of FIG. 1 , only the virtual machine VMn is shown.
[0045] The client's control instructions are operated on the virtual desktop, which is run by the virtual machine, so the control instructions are also received by the virtual machine. Figure 2In the example, the virtual machine corresponding to the client is the virtual machine VMn, so the control instruction can be received by the virtual machine VMn and transmitted to the host machine.
[0046] The virtual machine includes a virtual sound card. When the user operates the virtual sound card, the virtual sound card is usually started first, and then the virtual sound card is operated to play the audio, and then the virtual sound card may be operated to stop playing. Therefore, common control instructions may include instructions for starting the virtual sound card, instructions for playing audio, instructions for stopping playing audio, and the like. If the user operates the virtual sound card to play audio, the virtual machine will generate audio data, and the generated audio data needs to be transmitted to the client. Therefore, when the operation indicated by the control instruction is to start the virtual sound card, the host machine may assume that the user may continue to operate the virtual sound card to play audio at any time. In order to timely transmit the audio data generated after the virtual sound card plays the audio, the host machine can create a first instance in the processor. The first instance indicates a way to down-mix and encode the audio data. For example, it can be indicated that the audio data is down-mixed to stereo data and encoded into an audio encoding format supported by the virtual desktop (such as Opus, etc.). After the host machine creates the first instance in the processor, it can be considered that the processor has the ability to down-mix and encode the audio data.
[0047] The virtual machine may generate first audio data when the operation indicated by the control instruction is to play audio. The first audio data may be mono audio data, dual-channel audio data, or multi-channel audio data. The first audio data may be stored in a specific storage location, which may be on the host machine, or in other storage areas outside the host machine, such as a ring buffer allocated to the virtual sound card described below. For specific storage methods, please refer to the relevant description below.
[0048] The host machine may obtain the first audio data from the specific storage location, and then transmit the first audio data to the processor.
[0049] The processor may down-mix the first audio data to obtain stereo data according to the instructions of the first instance, then encode the stereo data to obtain second audio data, and then output the second audio data to the host machine. The format of the second audio data may be the audio encoding format required by the virtual desktop (such as Opus format, etc.). Finally, the host machine transmits the second audio data to the client. The transmission may use a network transmission protocol, such as remote desktop protocol (RDP), etc. The embodiments of the present disclosure do not limit the specific method of transmission.
[0050] According to the audio data processing system of the embodiment of the present disclosure, a control instruction from a client corresponding to the virtual machine is received through a virtual machine and the control instruction is transmitted to a host machine. When the operation indicated by the control instruction is to start a virtual sound card, the host machine creates a first instance in a processor, so that the processor can have the ability of down-mixing and encoding; when the operation indicated by the control instruction is to play audio, the virtual machine generates first audio data, obtains the first audio data through the host machine and outputs it to the processor, so that the processor can obtain the processed data; the processor down-mixes and encodes the first audio data according to the instruction of the first instance to obtain second audio data, outputs the second audio data to the host machine, and the host machine outputs the second audio data to the client. The transmission of the processed audio data can be completed. Since the processor can be used to achieve down-mixing and encoding, the transmission of multi-channel audio data between the host machine and the client can be supported, so that the virtual sound card can support multi-channel, without increasing the transmission bandwidth and without changing the client audio configuration, the diversity of virtual sound cards that can be supported in the virtual desktop application scenario is improved. And the audio data processing is completed by a processor outside the host machine, which can effectively accelerate the audio processing process and reduce the host machine load.
[0051] The host machine may also be provided with multiple memories. In the prior art, the memory used by the virtual machine is different from the memory used by the host machine itself. After the audio data is generated, it can be stored in the memory used by the virtual machine. When the host machine obtains the audio data, the audio data is copied from the memory used by the virtual machine to the memory used by the host machine itself. This method results in a lot of data copies, and the time when the audio data is finally transmitted to the client is greatly delayed from the time when the audio data is generated.
[0052] Figure 3 A schematic diagram showing the structure of an audio data processing system according to an embodiment of the present disclosure.
[0053] like Figure 3 As shown, in a possible implementation, the system also includes a shared memory accessed by the host machine and the virtual machine.
[0054] The virtual machine is specifically used to generate first audio data and store it in the shared memory;
[0055] The host machine is specifically used to obtain the first audio data from the shared memory.
[0056] For example, the disclosed embodiment proposes to set a shared memory that is accessed by the host machine and the virtual machine. The first audio data generated by the virtual machine can be stored in the shared memory, and the host machine can obtain the first audio data from the shared memory. In this way, data copying can be effectively reduced and the time for the audio data to be finally transmitted to the client and the delay of the audio data can be reduced.
[0057] Those skilled in the art should understand that the first audio data may also be stored in a memory in a manner according to the prior art, and the embodiments of the present disclosure do not limit the specific storage location of the first audio data.
[0058] The following describes an exemplary method for the audio data processing system of an embodiment of the present disclosure to enable a host machine and a virtual machine to jointly access a shared memory.
[0059] In a possible implementation, the host machine is further used for:
[0060] In response to a virtual service request from a client, create and run a virtual machine;
[0061] In the shared memory, a corresponding storage area is allocated for the virtual machine;
[0062] The address information of the storage area is transmitted to the virtual machine.
[0063] For example, the audio data processing system can be configured to create a virtual machine in real time based on a user's application. That is, in response to a virtual service application from a client, a virtual machine is created and run. Then, in the shared memory, a corresponding storage area is allocated to the virtual machine (the allocation can be completed by executing the processor driver described below). An unallocated storage area adjacent to an allocated storage area can be allocated to the virtual machine so that the addresses of the storage areas corresponding to every two virtual machines are continuous, or a storage area can be randomly selected from the unallocated storage area and allocated to the virtual machine. The embodiment of the present disclosure does not limit the allocation method of the storage area.
[0064] When the virtual machine is started, the host machine can transmit the address information of the storage area to the virtual machine to expose the storage area to the virtual machine. In this case, after the virtual machine generates the first audio data, the first audio data can be stored in the storage area according to the address information of the storage area.
[0065] In this way, the host machine maintains a smaller number of virtual machines and a lower load.
[0066] In a possible implementation, the host machine is further used for:
[0067] When there is a created but unallocated virtual machine, in response to a virtual service request from a client, a created but unallocated virtual machine is selected to be allocated to the user, and address information of a storage area corresponding to the virtual machine is transmitted to the virtual machine.
[0068] For example, the audio data processing system can be set to pre-create a certain number of virtual machines and run them. The storage areas corresponding to these virtual machines can be allocated together when they are created. For example, when N virtual machines (N is an integer greater than 1) are created, N storage areas can be allocated to the N virtual machines in the shared memory. The N storage areas can be continuous or discontinuous, and the present disclosure does not limit this.
[0069] When the virtual machine is started, the host machine can transmit the address information of the N storage areas to the N virtual machines respectively, so as to expose each storage area to the corresponding virtual machine. In this case, after any virtual machine generates the first audio data, the first audio data can be stored in the storage area corresponding to the virtual machine according to the received address information of the storage area.
[0070] At this time, if there is a created and unallocated virtual machine, and a virtual service request is received from the client, the created and unallocated virtual machine can be directly selected and allocated to the user. The selection method can be random selection, or a virtual machine with more comprehensive virtual services can be selected, or a virtual machine matching the user's further requirements for virtual services can be selected. The embodiment of the present disclosure does not limit the method of selecting the virtual machine.
[0071] In this way, the efficiency of providing virtual sound card services to users can be improved.
[0072] The following describes an exemplary method for a virtual machine to create a virtual sound card according to an embodiment of the present disclosure.
[0073] In a possible implementation, a driver of a virtual sound card is installed on the virtual machine, and the driver of the virtual sound card is used to:
[0074] Create a virtual sound card;
[0075] In the storage area, a cache is allocated to the virtual sound card, where the cache is used to store the first audio data;
[0076] Transmit the cached address information to the host machine.
[0077] For example, you can install a virtual sound card driver on the virtual machine. After the virtual sound card driver is started, you can create a virtual sound card on the virtual machine. The virtual sound card can be a multi-channel sound card (with a channel number between 2 and 8 channels).
[0078] In addition to the virtual sound card, the virtual machine may also create other virtual services. Different virtual services may generate different types of data. In this regard, a cache can be allocated for each virtual service in the storage area corresponding to the virtual machine, and the cache can be used to specifically store the data generated by the corresponding storage service. For example, in the storage area, a cache is allocated for the virtual sound card, and the cache is used to store the first audio data. The cache can be a ring buffer or other forms, which is not limited in the embodiments of the present disclosure.
[0079] The address information of the cache may then be transmitted to the host machine. In this case, the host machine may obtain the first audio data from the cache according to the address information of the cache.
[0080] In addition, when the virtual machine transmits the control instruction to the host machine, the driver of the virtual sound card may transmit the control instruction to the host machine through an event or the like.
[0081] In this way, when the first audio data is stored in the shared memory, it can be accurately acquired by the host machine.
[0082] The following describes an exemplary method in which a host machine transmits first audio data to a processor according to an embodiment of the present disclosure.
[0083] In a possible implementation, a driver of a processor is installed on a host machine, the first instance is created by the driver of the processor, and the first audio data is obtained by the driver of the processor according to cached address information.
[0084] For example, the driver of the processor can be installed on the host machine. After the driver of the processor is started, it can provide services for the processor with the help of the functions of the host machine.
[0085] For example, the first instance and the first audio data described above are both used by the processor when it is working, and therefore need to be transmitted to the processor. To this end, the driver of the processor can create the first instance on the host machine and transmit the first instance to the processor; and obtain the first audio data from the shared memory through the host machine.
[0086] In addition, when the virtual machine transmits control instructions and cached address information to the host machine, they can be transmitted to the driver of the processor. In addition, the allocation of storage area for the virtual machine can also be completed by the driver of the processor.
[0087] In this way, the processor can obtain the information required for audio processing and complete the audio processing task.
[0088] The following describes an exemplary method in which a processor obtains first audio data from a shared memory via a host machine.
[0089] In a possible implementation, the driver of the processor is further used to:
[0090] Load the processor's firmware into shared memory;
[0091] Change the processor's running start address to the firmware's start address in the shared memory and start the processor.
[0092] For example, if the processor is set to access the shared memory through the host machine, then data can be obtained from the shared memory through the host machine. Therefore, when the driver of the processor of the embodiment of the present disclosure is running, the firmware of the processor can be loaded into the shared memory, and the running start address of the processor can be modified to the start address of the firmware in the shared memory. In this case, the shared memory can become hardware accessible to both the processor and the host machine. The processor can access the shared memory through the driver of the processor on the host machine, thereby successfully obtaining the first audio data.
[0093] In one possible implementation, the processor is a coprocessor.
[0094] A coprocessor is a processor developed and applied to assist a central processing unit in completing processing tasks that the central processing unit cannot perform or performs inefficiently or ineffectively. In the disclosed embodiment, the coprocessor may be attached to a graphics processing unit (GPU) and is developed to improve the efficiency of down-mixing and encoding. The method for improving the efficiency of down-mixing and encoding by the coprocessor can be implemented based on the prior art and will not be described in detail here.
[0095] It is understandable that if other processors also have the function of improving the efficiency of down-mixing and encoding, other types of processors may also be used, and the embodiments of the present disclosure do not limit the specific type of processor.
[0096] In a possible implementation, the virtual sound card includes multiple channels. The virtual sound card of the embodiment of the present disclosure may be a virtual sound card with 2-8 channels. It is understandable that as long as it is within the range allowed by the bandwidth, virtual sound cards with more channels may also be supported, and the embodiment of the present disclosure does not limit the specific number of channels of the virtual sound card.
[0097] In a possible implementation, the present disclosure further provides an audio data processing method, Figure 4 An exemplary flowchart of an audio data processing method according to an embodiment of the present disclosure is shown.
[0098] like Figure 4 As shown, the method is applied to an audio data processing system, the system includes a host machine and a processor, the host machine runs at least one virtual machine, the virtual machine includes a virtual sound card, and the method includes:
[0099] Step S41, the virtual machine receives a control instruction from a client corresponding to the virtual machine and transmits the control instruction to the host machine, and generates first audio data when the operation indicated by the control instruction is to play audio;
[0100] Step S42, when the operation indicated by the control instruction is to start the virtual sound card, the host machine creates a first instance in the processor, obtains the first audio data and outputs it to the processor;
[0101] Step S43, the processor down-mixes and encodes the first audio data according to the instruction of the first instance to obtain second audio data, and outputs the second audio data to the host machine;
[0102] Step S44: the host machine outputs the second audio data to the client.
[0103] In a possible implementation, the system further includes a shared memory accessed by the host machine and the virtual machine.
[0104] The generating the first audio data comprises: generating the first audio data and storing it in the shared memory;
[0105] The acquiring the first audio data and outputting it to the processor includes: acquiring the first audio data from the shared memory.
[0106] In a possible implementation, the method further includes:
[0107] The host machine creates and runs the virtual machine in response to the virtual service request from the client;
[0108] The host machine allocates a corresponding storage area for the virtual machine in the shared memory;
[0109] The host machine transmits the address information of the storage area to the virtual machine.
[0110] In a possible implementation, the method further includes:
[0111] When there is a created but unallocated virtual machine, the host machine selects a created but unallocated virtual machine to allocate to the user in response to a virtual service request from the client, and transmits address information of a storage area corresponding to the virtual machine to the virtual machine.
[0112] In a possible implementation, a driver of the virtual sound card is installed on the virtual machine, and the method further includes:
[0113] The driver of the virtual sound card creates the virtual sound card;
[0114] The driver of the virtual sound card allocates a buffer for the virtual sound card in the storage area, and the buffer is used to store the first audio data;
[0115] The driver of the virtual sound card transmits the cached address information to the host machine.
[0116] In a possible implementation, a driver of the processor is installed on the host machine, the first instance is created by the driver of the processor, and the first audio data is acquired by the driver of the processor according to the cached address information.
[0117] In a possible implementation, the method further includes:
[0118] The driver of the processor loads the firmware of the processor into the shared memory;
[0119] The driver of the processor modifies the operation start address of the processor to the start address of the firmware in the shared memory and starts the processor.
[0120] In a possible implementation manner, the processor is a coprocessor.
[0121] In a possible implementation manner, the virtual sound card includes multiple channels.
[0122] In a possible implementation, the present disclosure further provides a server, comprising the audio data processing system described above.
[0123] Figure 5 1 is a block diagram of a device 1900 according to an embodiment of the present disclosure. For example, the device 1900 may be provided as a server. Figure 5 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0124] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS XTM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0125] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.
[0126] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0127] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0128] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0129] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0130] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0131] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0132] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0133] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0134] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. An audio data processing system, It is characterized in that The system includes a host machine and a processor. The host machine runs at least one virtual machine. The virtual machine includes a virtual sound card. The virtual machine is used to receive a control instruction from a client corresponding to the virtual machine and transmit the control instruction to the host machine, and generate first audio data when the operation indicated by the control instruction is to play audio; The host machine is used for, when the operation indicated by the control instruction is to start the virtual sound card, creating a first instance in the processor, acquiring the first audio data and outputting it to the processor; The processor is used to, according to the instruction of the first instance, down-mix and encode the first audio data to obtain second audio data, and output the second audio data to the host machine; The host machine is further used to output the second audio data to the client; The host machine has a driver for the processor installed thereon, the first instance is created by the driver for the processor, and the first instance indicates a method for down-mixing and encoding audio data.
2. The system according to claim 1, It is characterized in that The system also includes a shared memory accessed by the host machine and the virtual machine. The virtual machine is specifically used to generate first audio data and store it in the shared memory; The host machine is specifically used to obtain the first audio data from the shared memory.
3. The system according to claim 2, It is characterized in that The host machine is also used for: In response to a virtual service request from the client, creating and running the virtual machine; In the shared memory, allocating a corresponding storage area for the virtual machine; The address information of the storage area is transmitted to the virtual machine.
4. The system according to claim 2, It is characterized in that The host machine is also used for: When there is a created but unallocated virtual machine, in response to a virtual service request from the client, a created but unallocated virtual machine is selected to be allocated to the user, and address information of a storage area corresponding to the virtual machine is transmitted to the virtual machine.
5. The system according to claim 3 or 4, It is characterized in that The virtual machine is installed with a driver for the virtual sound card, and the driver for the virtual sound card is used to: Creating the virtual sound card; In the storage area, a buffer is allocated for the virtual sound card, where the buffer is used to store the first audio data; The cached address information is transmitted to the host machine.
6. The system according to claim 5, It is characterized in that The first audio data is acquired by a driver of the processor according to the address information of the cache.
7. The system according to claim 6, It is characterized in that The processor driver is also used to: Loading the firmware of the processor into the shared memory; The operation start address of the processor is modified to the start address of the firmware in the shared memory and the processor is started.
8. The system according to claim 1, It is characterized in that The processor is a coprocessor.
9. The system according to claim 1, It is characterized in that The virtual sound card includes multiple channels.
10. A method for processing audio data, It is characterized in that The method is applied to an audio data processing system, the system comprising a host machine and a processor, the host machine runs at least one virtual machine, the virtual machine comprises a virtual sound card, and the method comprises: The virtual machine receives a control instruction from a client corresponding to the virtual machine and transmits the control instruction to the host machine, and generates first audio data when the operation indicated by the control instruction is to play audio; When the operation indicated by the control instruction is to start the virtual sound card, the host machine creates a first instance in the processor, obtains the first audio data and outputs it to the processor; The processor down-mixes and encodes the first audio data according to the instruction of the first instance to obtain second audio data, and outputs the second audio data to the host machine; The host machine outputs the second audio data to the client; The host machine has a driver for the processor installed thereon, the first instance is created by the driver for the processor, and the first instance indicates a method for down-mixing and encoding audio data.
11. A server, It is characterized in that An audio data processing system comprising any one of claims 1-9.
Citation Information
Patent Citations
Vehicle to vehicle data communication system
CN105122762A
Audio output method and audio output device in VDI (Virtualization Desktop Infrastructure)
CN105245557A
Audio processing method, device and system of virtual machine and electronic equipment
CN114579258A
