Audio data streaming method, device and equipment of cloud host and storage medium
By creating multiple virtual audio devices on a cloud server and binding them to the user's audio session, the problem of audio data corruption in a multi-user environment is solved, independent audio data streaming is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202110023642.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-08
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2041-01-08
AI Technical Summary
When existing cloud servers stream audio data in a multi-user environment, the audio data generated by each user's operating program cannot be output independently, resulting in audio data corruption.
Multiple virtual audio devices are pre-created, and one virtual audio device is assigned to each client when a user connects. The audio session in the client's operation process is bound to the virtual audio device, so that each user's audio data is output to the corresponding client through an independent virtual audio device.
This achieves isolation of audio data for each user, avoids mixed audio data output, and improves the user's operating experience.
Smart Images

Figure CN112631736B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud platform technology, and in particular to an audio data streaming method, apparatus, device, and computer-readable storage medium for a multi-user cloud host. Background Art
[0002] With the advancement of computer science, more and more applications are being developed and upgraded. To provide users with a better application experience, various applications have seen significant improvements in both rendering and runtime performance. However, this also presents the challenge of requiring high-performance computer hardware to run these applications. For example, game developers have developed numerous large-scale 3D games. Leveraging high-performance computers, these games are able to render realistic graphics, providing players with an excellent gaming experience. However, these games also generally place high demands on computer performance, hindering many players from experiencing these games due to limited hardware. Purchasing a computer capable of running large-scale 3D games smoothly can be a significant expense.
[0003] Cloud platform applications allow developed applications to run on cloud servers, and users can operate and use the applications through data exchange between the client and the cloud server. Taking cloud gaming as an example, all game programs run on the cloud host provided by the cloud gaming service provider. The cloud host is responsible for rendering the game screen using its high-performance CPU and GPU. The streaming module compresses the video on the cloud host and transmits it to the user over the network. This allows users to smoothly experience various games that require high-performance hardware with just a device capable of basic video decompression.
[0004] This demonstrates that the use of cloud platforms can largely resolve the issue of insufficient computer performance preventing users from operating cloud gaming and other applications. Furthermore, cloud hosts typically have relatively high hardware configurations, and even running only one user's application leaves significant performance redundancy. Therefore, cloud hosts can generally support multiple users simultaneously accessing applications through client-side operations. Summary of the Invention
[0005] The purpose of the present invention is to provide an audio data streaming method, device, equipment and computer-readable storage medium for a multi-user cloud host, so that the cloud host can better support the operation process-related programs of multiple users and bring users a good user experience.
[0006] To solve the above technical problems, the present invention provides an audio data streaming method for a multi-user cloud host, comprising:
[0007] Pre-create at least one virtual audio device;
[0008] When a signal indicating that a new client has connected is received, selecting an unassigned virtual audio device from the virtual audio device and assigning it to the newly connected client;
[0009] Binding the audio session in the operation process corresponding to the client and the virtual audio device allocated by the client;
[0010] When audio data is generated in the audio session, the audio data is obtained through the virtual audio device bound to the audio session and output to the client.
[0011] In an optional embodiment of the present application, binding the audiosession in the operation process corresponding to the client and the virtual audio device allocated by the client includes:
[0012] querying, according to a predetermined time period, whether the audio sessions of each of the operation processes have been bound to the virtual audio device;
[0013] If there is an audio session that is not bound to the virtual audio device, the audio session that is not bound to the virtual audio device and the virtual audio device allocated to the client corresponding to the audio session are bound; the client corresponding to the audio session is the client to which the operation process corresponding to the audio session belongs.
[0014] In an optional embodiment of the present application, querying whether the audio sessions corresponding to the respective operation processes have been bound to the virtual audio device according to a predetermined time period includes:
[0015] Query the process ID of the operation process to which each audio session belongs;
[0016] Query the JobObject corresponding to the operation process to which each audio session belongs using the process ID; wherein the operation process corresponding to each client is bound to the JobObject corresponding to the client;
[0017] According to the process list in the JobObject corresponding to the audio session, query whether the audiosession is bound to a virtual audio device;
[0018] Binding the audio session to the virtual audio device allocated by the client corresponding to the audio session, including:
[0019] Bind the audio session to the virtual audio device allocated by the client to which the corresponding JobObject belongs.
[0020] In an optional embodiment of the present application, it further includes:
[0021] When the input audio data input by the client is received, the input audio data is input into the virtual audio device allocated to the client.
[0022] The present application also provides an audio data streaming device for a multi-user cloud host, comprising:
[0023] A device creation module, configured to pre-create at least one virtual audio device;
[0024] A device allocation module is configured to, when receiving a signal from a new client connecting, select an unallocated virtual audio device from the virtual audio devices and allocate it to the newly connected client;
[0025] A device binding module, configured to bind the audio session in the operation process corresponding to the client to the virtual audio device allocated by the client;
[0026] A data streaming module is used to obtain audio data through the virtual audio device bound to the audiosession and output the audio data to the client when audio data is generated in the audio session.
[0027] In an optional embodiment of the present application, the device binding module is used to query whether the audio session of each of the operation processes has been bound to the virtual audio device according to a predetermined time period; if there is an audio session that is not bound to the virtual audio device, the audio session that is not bound to the virtual audio device is bound to the virtual audio device allocated by the client corresponding to the audio session; and the audiosession is bound to the virtual audio device allocated by the client to which the corresponding JobObject belongs.
[0028] In an optional embodiment of the present application, the device binding module is used to query the process ID of the operation process to which each audiosession belongs; query the JobObject corresponding to the operation process to which each audio session belongs through the process ID; wherein, the operation process corresponding to each client is bound to the JobObject corresponding to the client; according to the process list in the JobObject corresponding to the audio session, query whether the audio session is bound to the information of the virtual audio device; if there is an audiosession that is not bound to the virtual audio device, bind the audio session and the virtual audio device allocated by the client described in the corresponding JobObject.
[0029] In an optional embodiment of the present application, a data input module is further included, which is used to input the input audio data into the virtual audio device allocated by the client when receiving the input audio data input by the client.
[0030] The present application also provides an audio data streaming device for a multi-user cloud host, comprising:
[0031] memory for storing computer programs;
[0032] A processor is configured to execute the computer program to implement the operating steps of the audio data streaming method for a multi-user cloud host as described in any one of the above items.
[0033] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the operating steps of the audio data streaming method of the multi-user cloud host as described in any one of the above items.
[0034] The audio data streaming method for a multi-user cloud host provided by the present invention includes pre-creating at least one virtual audio device; when a signal from a new client connection is received, selecting a virtual audio device to be allocated from the virtual audio devices and allocating it to the newly connected client; binding an audio session in an operation process corresponding to the client and the virtual audio device allocated by the client; and when audio data is generated in the audio session, obtaining the audio data through the virtual audio device bound to the audiosession and outputting it to the client.
[0035] When the cloud host in the present application runs the operation programs of multiple users at the same time, in order to prevent the audio data generated in the operation process of each user from being output to all clients through the real audio device of the cloud host, multiple virtual audio devices are created in advance as the audio data output ports of the client's operation process, and the virtual audio devices are bound to the client and the audio session corresponding to the client, so that the audio data generated during the operation process corresponding to each client is output from the bound virtual audio device and sent to the corresponding client, thereby realizing the independent transmission of the audio data generated in the operation process of each client to the corresponding client, realizing the mutual isolation of the audio data of each client, enabling the cloud host to better support the operation process-related programs of multiple users and bringing users a good user experience.
[0036] The present application also provides an audio data streaming device, equipment and computer-readable storage medium for a multi-user cloud host, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 A flowchart of an audio data streaming method for a multi-user cloud host provided in an embodiment of the present application;
[0039] Figure 2 A schematic diagram of an audio management system for multi-user cloud gaming is provided for an embodiment of the present application;
[0040] Figure 3 This is a structural block diagram of an audio data streaming device for a multi-user cloud host provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In existing technologies, cloud hosts, when running applications for multiple users, utilize dedicated multi-core CPUs and professional graphics cards that support virtualization. This allows multiple virtual machines to run on the cloud host, providing application services to multiple users, similar to cloud gaming services. However, virtual machines often result in performance losses. Furthermore, since cloud hosts have relatively low CPU clock speeds, while applications like large-scale games require higher CPU clock speeds, these cloud hosts struggle to run large-scale games. Furthermore, the server CPUs and professional graphics cards used in cloud hosts are expensive, which drives up the cost of building computer rooms.
[0042] To this end, when the cloud host in this application simultaneously runs operating programs similar to cloud gaming services, it directly uses the physical machine of the cloud host to run the operating programs of multiple users, and displays the operating interfaces of different users in different areas on the cloud host display screen through the graphics card, and obtains the video stream of each user by capturing the screen and transmits it to the user's client for display to the user. In other words, the client is only equivalent to a display, thereby reducing the configuration requirements for the computer used by the user.
[0043] Although screen capture can achieve independent transmission of each user's video stream, the cloud host only has one audio device. The audio data generated by each user's operating program needs to be output through this audio device and streamed to each client. In other words, all audio data generated by each user's operating program will be streamed to each client at the same time. The user receives the audio data generated by all users' operating programs through the client, which leads to audio data confusion.
[0044] To this end, the present application provides a technical solution that can achieve independent streaming of audio data for each user to a certain extent.
[0045] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0046] like Figure 1 As shown, Figure 1 This is a flow chart of an audio data streaming method for a multi-user cloud host provided in an embodiment of the present application. The audio data streaming method may include:
[0047] S11: Pre-create at least one virtual audio device.
[0048] S12: When a signal indicating that a new client has connected is received, an unassigned virtual audio device is selected from the virtual audio devices and assigned to the newly connected client.
[0049] It can be understood that the client referred to in this embodiment is the display device actually operated by the user, which acts as the display and audio player of the cloud host. The cloud host streams the display interface and audio data of the operation process (such as the game process) operated by the user to the client, so that the user can watch the video operation interface and audio from the client. The visual and auditory effects are the same as operating directly on the client, while the operation process running performance can greatly improve the operation experience.
[0050] In actual application, multiple virtual audio devices may be created first, and a management list of each virtual audio device may be created. The management list records information such as whether each virtual audio device is assigned a corresponding client and which client is assigned.
[0051] Each time a new client is connected, the management list can be queried to select a virtual audio device from the unassigned virtual audio devices and assign it to the client.
[0052] Of course, each time a new client is connected, a new virtual audio device may be created and the newly created virtual audio device may be allocated to the newly connected client, and the relevant information of the virtual audio device may also be recorded in the management list.
[0053] Of course, during this process, not only new clients are added, but clients also exit. When a client exits, its corresponding virtual audio device is released and becomes an unassigned virtual audio device again, ready to be reallocated when the next client joins.
[0054] S13: Bind the audio session in the client's operation process to the virtual audio device allocated by the client.
[0055] S14: When audio data is generated in the audio session, the audio data is obtained through the virtual audio device bound to the audio session and output to the client.
[0056] When a user opens an operation process through the client, if the operation process has an audio session, an audio session is automatically generated in the operation process and the audio session is bound to the virtual audio device allocated by the corresponding client. Then, the audio data generated by the audio session during the operation process can be output through the virtual audio device.
[0057] It should be noted that although each user's operating process runs on the cloud host, the operating process is an independent running program. The data generated by the running program cannot be easily accessed by the cloud host's main control CPU. The virtual audio device is equivalent to an output port for the operating process to output audio data, and the cloud host can obtain this audio data based on this output port. Of course, although the cloud host can obtain this audio data through certain other methods, these generally require modifying the operating process's running program code. The development process of an operating program such as a cloud game is inherently complex, and modifying the operating program itself is obviously more difficult.
[0058] To this end, this application does not make any modifications to the operation process itself run by the user operation, but creates multiple virtual audio devices, which is equivalent to allocating an audio data output port to each user's operation process. Compared with the operation processes of each user sharing the physical audio device of the cloud host as the output port, the audio data generated by each user's operation process is independently output from their corresponding virtual audio devices without interfering with each other. The cloud host can send the audio data stream output by each virtual audio device to each client based on the corresponding allocation relationship between each virtual audio device and the client, so that the audio data received by the user through the client only contains the audio data corresponding to his own operation process, and does not include the audio data corresponding to other users' operation processes.
[0059] It is understood that when the cloud host streams audio data, it not only includes audio data that needs to be output to the client, but also includes audio data that the user can input through the client. Therefore, when the user inputs audio data through the client, the audio data can be streamed to the virtual audio device corresponding to the client and used as input data during the operation process.
[0060] For example, in a cloud gaming service, there may be multiple users online playing the same game, and voice chat is required between the users. Therefore, after the user inputs voice data through the virtual audio device corresponding to the client, it can be forwarded to another user through the game process.
[0061] To sum up, the present application pre-creates multiple virtual audio devices. When the user's client accesses the cloud host, a virtual audio device is allocated to each client, so that the audio data generated in the operation process of each user operation can be independently output through the corresponding virtual audio device to be streamed to the corresponding client, avoiding the problem that the audio data generated in the operation process of each user is mixed and output to each client, causing the user to be unable to receive normal audio data.
[0062] Based on the above embodiment, in another optional embodiment of the present application, the process of binding the audio session in the operation process corresponding to the client and the virtual audio device allocated by the client may include:
[0063] Check whether the audio sessions corresponding to each operation process have been bound to virtual audio devices according to the scheduled time period;
[0064] If there is an audio session that is not bound to a virtual audio device, the audiosession that is not bound to the virtual audio device is bound to the virtual audio device allocated to the client corresponding to the audio session; the client corresponding to the audio session is the client to which the operation process corresponding to the audio session belongs.
[0065] As mentioned above, when the client connects to the cloud host, if the operation process opened by the user on the cloud host through the client contains an audio session, the operation process will automatically create an audio session. When each audio session is created, it can be bound to the corresponding virtual audio device allocated by the client. However, the audio session is automatically created by the operation process, and the cloud host may not be able to know immediately after the audio session is created. For this reason, the existing audio sessions can be enumerated periodically and checked whether each audio session has been bound to the corresponding virtual audio device. If not, the corresponding virtual audio device can be found based on the operation process corresponding to the audio session for binding.
[0066] For the same client, there may be multiple sub-processes opened on the cloud host. A user may also open multiple sub-processes at the same time. Each sub-process has its corresponding audio session. Each client is allocated only one virtual audio device. The audio data generated by the audio sessions of multiple sub-processes corresponding to the client should also be bound to the same virtual audio device.
[0067] To this end, in an optional embodiment of the present application, when a client accesses a cloud host, a JobObject (job object) can be created for each client. JobObject is a method provided by Windows to batch manage a group of processes. The operation process opened by the client user on the cloud host is bound to the corresponding JobObject. Then, during subsequent operations, when a subprocess of the operation process opened by the user is opened and run, the subprocess can also be automatically bound to the corresponding JobObject. The JobObject contains a process list of all operation processes bound to the JobObject. The process list of the JobObject records information such as whether the audio session corresponding to each operation process is bound to a virtual audio device and the corresponding client, thereby achieving the management of all operation processes of the same client through the same JobObject.
[0068] When determining whether an audio session is bound to a corresponding virtual audio device, you can first query the JobObject corresponding to the operation process to which the audio session belongs based on the process ID of the operation process to which the audiosession belongs. Then, based on the process list of the JobObject, it is recorded whether the audio session corresponding to each operation process is bound to a virtual audio device. If the virtual audio device is not bound, query the client to which the JobObject corresponding to the audio session belongs, and then bind the virtual audio device allocated to the client to the audio session.
[0069] To summarize, when binding each audio session to a virtual audio device, you can bind the corresponding virtual audio device when each operation process opens and runs the created audio session. You can also periodically enumerate and detect whether there is an audio session that is not bound to a virtual audio device. If so, bind the audio session that is not bound to a virtual audio device to the corresponding virtual audio device.
[0070] In order to further illustrate the process of audio data streaming in this application, the audio data streaming process of cloud gaming is taken as an example.
[0071] like Figure 2 As shown, Figure 2A schematic diagram of an audio management system for multi-user cloud gaming is provided for an embodiment of the present application, including a cloud gaming platform, a cloud host cluster, and a client. Each cloud host includes an audio management module and a streaming module. Multiple virtual audio devices with specific name prefixes are created in advance on the cloud host through a virtual sound card driver. A specific prefix is uniformly added to the name of the virtual audio device for distinction. Taking the creation of three virtual audio devices as an example, cloud gaming services can be provided for three users.
[0072] The cloud host's audio management module first initializes and enumerates all audio devices on the cloud host using the Windows-provided IMMDeviceEnumerator::EnumAudioEndpoints interface. The enumeration results may include both real and virtual audio devices. The module distinguishes the device IDs of all virtual audio devices using their unique name prefixes. The module then records each virtual audio device's device ID and whether it has been assigned to a client in the audio device list. At this point, the cloud host is ready to provide services to users.
[0073] After a user selects a game they want to play, the cloud platform dispatches a cloud host that can provide the service and notifies the game program on the cloud host that it is ready to provide the service. When the user's client connects to the cloud host, the audio management module traverses the list of virtual audio devices, finds an unassigned virtual audio device, and marks it as assigned. The audio management module also notifies the streaming module of the virtual audio device ID, which is then used as the virtual audio device for audio data streaming.
[0074] The audio management module can call CreateJobObject to create a JobObject for the user. After the program opens the process corresponding to the game selected by the user through CreateProcess, it will call AssignProcessToJobObject to bind the process to the JobObject. In this way, all child processes created by this process will be automatically added to the JobObject.
[0075] The audio management module periodically enumerates all audio sessions on the cloud host using IAudioSessionManager2:GetSessionEnumerator. For each enumerated audio session, it queries whether the corresponding game process has been bound to a virtual audio device. If not, the current audio session is considered newly created. For newly created audio sessions, the game process ID is queried using IAudioSessionControl2::GetProcessId. The process list of each JobObject is then searched using QueryInformationJobObject. If the game process is found in a JobObject's process list, IAudioPolicyConfigFactory::SetPersistedDefaultAudioEndpoint is called to bind the audio session to the virtual audio device of the user to whom the JobObject belongs, thus achieving audio isolation in a multi-user environment.
[0076] The following describes an audio data streaming device for a multi-user cloud host provided by an embodiment of the present invention. The audio data streaming device for a multi-user cloud host described below and the audio data streaming method for a multi-user cloud host described above can be referenced in correspondence with each other.
[0077] Figure 3 The structural block diagram of the audio data streaming device of the multi-user cloud host provided by the embodiment of the present invention is shown in FIG. Figure 3 The audio data streaming devices of the multi-user cloud host may include:
[0078] The device creation module 100 is used to pre-create at least one virtual audio device;
[0079] The device allocation module 200 is configured to, upon receiving a signal from a new client, select a virtual audio device to be allocated from the virtual audio devices and allocate it to the newly connected client;
[0080] The device binding module 300 is used to bind the audio session in the client's operation process to the virtual audio device allocated by the client;
[0081] The data streaming module 400 is used to obtain the audio data through the virtual audio device bound to the audio session and output it to the client when audio data is generated in the audio session.
[0082] In an optional embodiment of the present application, the device binding module 300 is used to query whether the audio sessions corresponding to each of the operation processes have been bound to the virtual audio device according to a predetermined time period; if there is an audio session that is not bound to the virtual audio device, the audiosession that is not bound to the virtual audio device and the virtual audio device allocated to the client corresponding to the audio session are bound; the client corresponding to the audio session is the client to which the operation process corresponding to the audio session belongs.
[0083] In an optional embodiment of the present application, the device binding module 300 is used to query the process ID of the operation process to which the audiosession belongs; query the JobObject corresponding to the operation process to which the audio session belongs through the process ID; wherein, the operation process of each of the clients is bound to the pre-created JobObject corresponding to the client; according to the process list in the JobObject corresponding to the audio session, query whether the audio session is bound to the information of the virtual audio device; if there is an audiosession that is not bound to the virtual audio device, bind the audio session and the virtual audio device allocated by the client described in the corresponding JobObject.
[0084] In an optional embodiment of the present application, a data input module is further included, which is used to input the input audio data into the virtual audio device allocated by the client when receiving the input audio data input by the client.
[0085] The audio data streaming device of the multi-user cloud host of this embodiment is used to implement the aforementioned audio data streaming method of the multi-user cloud host. Therefore, the specific implementation of the audio data streaming device of the multi-user cloud host can be found in the embodiment of the audio data streaming method of the multi-user cloud host described above and will not be repeated here.
[0086] The present application also provides an embodiment of an audio data streaming device for a multi-user cloud host, which may include:
[0087] memory for storing computer programs;
[0088] A processor is configured to execute the computer program to implement the operating steps of the audio data streaming method for a multi-user cloud host as described in any one of the above items.
[0089] The audio data streaming method of the multi-user cloud host executed by the processor may include:
[0090] At least one virtual audio device is created in advance; when a signal from a new client connection is received, a virtual audio device to be allocated is selected from the virtual audio devices and allocated to the newly connected client; an audio session in the client's operating process is bound to the virtual audio device allocated by the client; when audio data is generated in the audio session, the audio data is obtained through the virtual audio device bound to the audio session and output to the client.
[0091] The audio data streaming device of the multi-user cloud host provided in this application can realize independent streaming of the operation process data corresponding to each user's client, avoiding the problem that each user can receive the audio data of all users, and improving the user experience of running various operation processes through the cloud host.
[0092] The present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the operating steps of the audio data streaming method of the multi-user cloud host as described in any one of the above items.
[0093] The computer-readable storage medium may include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.
[0094] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements are inherent to the elements. In the absence of further restrictions, the elements limited by the statement "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device comprising the elements. In addition, the above-mentioned technical solutions provided in the embodiments of the present application are not described in detail in accordance with the corresponding technical solutions in the prior art to achieve the same principle, so as to avoid excessive elaboration.
[0095] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for streaming audio data in a multi-user cloud host, characterized in that: include: Pre-create at least one virtual audio device; When a signal indicating that a new client has connected is received, selecting an unassigned virtual audio device from the virtual audio device and assigning it to the newly connected client; Binding the audio session in the operation process corresponding to the client and the virtual audio device allocated by the client; When audio data is generated in the audio session, the audio data is obtained through the virtual audio device bound to the audio session and output to the client; Binding the audio session in the operation process corresponding to the client and the virtual audio device allocated by the client, including: querying, according to a predetermined time period, whether the audio sessions of each of the operation processes have been bound to the virtual audio device; If there is an audio session that is not bound to the virtual audio device, the audio session that is not bound to the virtual audio device and the virtual audio device allocated to the client corresponding to the audio session are bound; the client corresponding to the audio session is the client to which the operation process corresponding to the audio session belongs; wherein the virtual audio device is the output port for outputting audio data of the operation process; and when there are multiple sub-processes of the operation process opened by the same client on the cloud host, each sub-process has its corresponding audio session, each client is allocated only one virtual audio device, and the audio sessions of the multiple sub-processes corresponding to the same client are bound to the same virtual audio device.
2. The audio data streaming method of a multi-user cloud host according to claim 1, wherein: Querying whether the audio sessions of each of the operation processes have been bound to the virtual audio device according to a predetermined time period includes: Query the process ID of the operation process to which each audio session belongs; Query the JobObject corresponding to the operation process to which each audio session belongs using the process ID; wherein the operation process corresponding to each client is bound to the JobObject corresponding to the client; According to the process list in the JobObject corresponding to the audio session, query whether the audiosession is bound to a virtual audio device; Binding the audio session to the virtual audio device allocated by the client corresponding to the audio session, including: Bind the audio session to the virtual audio device allocated by the client to which the corresponding JobObject belongs.
3. The audio data streaming method of a multi-user cloud host according to claim 1, wherein: Also includes: When the input audio data input by the client is received, the input audio data is input into the virtual audio device allocated to the client.
4. An audio data streaming device for a multi-user cloud host, characterized in that: include: A device creation module, configured to pre-create at least one virtual audio device; A device allocation module is configured to, when receiving a signal from a new client connecting, select an unallocated virtual audio device from the virtual audio devices and allocate it to the newly connected client; A device binding module, configured to bind the audio session in the operation process corresponding to the client to the virtual audio device allocated by the client; a data streaming module, configured to obtain audio data generated in the audio session through the virtual audio device bound to the audiosession and output the audio data to the client; The device binding module is used to query whether the audio session of each operation process has been bound to the virtual audio device according to a predetermined time period; if there is an audio session that is not bound to the virtual audio device, the audio session that is not bound to the virtual audio device is bound to the virtual audio device allocated by the client corresponding to the audio session; the audio session is bound to the virtual audio device allocated by the client to which the corresponding JobObject belongs; wherein the virtual audio device is the output port for outputting audio data of the operation process; and when the operation process opened by the same client on the cloud host has multiple sub-processes, each sub-process has its corresponding audio session, each client is allocated only one virtual audio device, and the audio sessions of the multiple sub-processes corresponding to the same client are bound to the same virtual audio device.
5. The audio data streaming device for a multi-user cloud host according to claim 4, wherein: The device binding module is used to query the process ID of the operation process to which each audio session belongs; query the JobObject corresponding to the operation process to which each audio session belongs through the process ID; wherein, the operation process corresponding to each client is bound to the JobObject corresponding to the client; query whether the audio session is bound to the virtual audio device based on the process list in the JobObject corresponding to the audio session; if there is an audio session that is not bound to the virtual audio device, bind the audio session to the virtual audio device allocated by the client described in the corresponding JobObject.
6. The audio data streaming device for a multi-user cloud host according to claim 4, wherein: The system further includes a data input module, which is used to input the input audio data into the virtual audio device allocated to the client when receiving the input audio data input by the client.
7. An audio data streaming device for a multi-user cloud host, characterized in that: include: memory for storing computer programs; A processor, configured to execute the computer program to implement the operating steps of the audio data streaming method for a multi-user cloud host according to any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is executed by a processor to implement the operating steps of the audio data streaming method of the multi-user cloud host according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method for cloud based mobile application virtualization
US20180109625A1