Audio equipment virtualization method and device, first equipment and second equipment
By virtualizing the local audio device on the first device, broadcasting virtual audio device data to the second device through the target network, establishing a voice call path across devices, the problem of difficulty in realizing cross-device answering calls in the prior art is solved, and the call experience is improved.
Patent Information
- Application Number
- CN202311396715.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
The existing technology is difficult to answer incoming calls across devices, resulting in users needing to interrupt current services and reduce user experience when using mobile devices such as smartphones.
By virtualizing the local audio device on the first device, virtual audio device data is generated, and broadcast to the second device through the target network, a voice call path and an audio device call path are established to receive incoming calls across devices.
The audio processing capability between the first device and the second device is realized, reducing the probability of incoming calls being missed and improving the call experience.
Smart Images

Figure CN119883174A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of control technology, and in particular to an audio device virtualization method and apparatus, a first device, and a second device. Background Art
[0002] Electronic devices are usually equipped with different accessories. For example, personal computers are usually equipped with high-performance microphones, speakers and other audio devices, as well as powerful data processing capabilities; while mobile devices such as smartphones are usually portable. In actual applications, users may receive calls while using smartphones (such as watching videos), which requires interrupting the current business and reducing the user experience. Therefore, it is necessary to provide a function that can answer calls across devices. Summary of the invention
[0003] The present disclosure provides an audio device virtualization method and apparatus, a first device, and a second device to solve the above technical problems.
[0004] According to a first aspect of the present disclosure, there is provided an audio device virtualization method, which is applied to a first device, and the method includes:
[0005] In response to detecting that the first device is connected to the target network, virtualizing the local audio device of the first device to obtain virtual device data of at least one virtual audio device;
[0006] Broadcast data is generated according to the virtual device data, and the broadcast data is broadcast to at least one second device through the target network.
[0007] Optionally, the method further comprises:
[0008] A voice call channel is established with the second device, where the voice call channel is used to transmit a notification message of the voice call.
[0009] Optionally, the method further comprises:
[0010] In response to receiving a notification message of an incoming call event, generating an incoming call message pop-up window in the display interface; the pop-up window includes at least one of the following: an answer button, a reject button, and a hang-up button;
[0011] In response to detecting an operation of selecting a button in the pop-up window, the operation request is sent to the second device through a voice call path.
[0012] Optionally, the method further comprises:
[0013] When the operation request indicates answering an incoming call, establishing an audio device calling path with the second device;
[0014] In response to detecting a calling request of a target audio device sent by the second device, calling the target audio device;
[0015] The audio data of the target audio device is transmitted through the audio transmission path.
[0016] Optionally, the method further comprises:
[0017] When the operation request indicates hanging up the call, the audio device calling path is disconnected and the audio transmission path is disconnected.
[0018] Optionally, the method further comprises:
[0019] When the operation request indicates rejecting the incoming call, the pop-up window is closed.
[0020] According to a second aspect of the present disclosure, there is provided an audio device virtualization method, which is applied to a second device, and the method includes:
[0021] In response to receiving broadcast data sent by the first device, parsing the broadcast data to obtain virtual device data of at least one virtual audio device;
[0022] Determine whether to call the virtual audio device corresponding to the virtual device data in the first device.
[0023] Optionally, determining whether to call a virtual audio device corresponding to the virtual device data in the first device includes:
[0024] In response to acquiring the virtual device data, establishing a voice call path with the first device, wherein the voice call path is used to transmit a notification message of the voice call;
[0025] In response to detecting an incoming call event, a notification message of the incoming call event is generated and sent to the first device through the voice call path.
[0026] Optionally, the method further comprises:
[0027] In response to receiving an operation request sent by the first device, and the operation request indicates answering an incoming call, establishing an audio device calling path with the first device;
[0028] calling the target audio device through the audio device calling path;
[0029] The audio data of the target audio device is transmitted through the audio transmission path.
[0030] Optionally, the method further comprises:
[0031] When the operation request indicates hanging up the call, the audio device calling path is disconnected and the audio transmission path is disconnected.
[0032] Optionally, the method further comprises:
[0033] In response to receiving an operation request sent by the first device and the operation request indicating rejecting the incoming call, closing the incoming call event.
[0034] According to a third aspect of the present disclosure, there is provided an audio device virtualization apparatus, applied to a first device, the apparatus comprising:
[0035] A virtual device acquisition module, configured to, in response to detecting that a first device is connected to a target network, virtualize a local audio device of the first device to obtain virtual device data of at least one virtual audio device;
[0036] The broadcast data acquisition module is used to generate broadcast data according to the virtual device data, and broadcast the broadcast data to at least one second device through the target network.
[0037] Optionally, the device further comprises:
[0038] The call channel establishing module is used to establish a voice call channel with the second device, and the voice call channel is used to transmit a notification message of the voice call.
[0039] Optionally, the device further comprises:
[0040] A message pop-up window module, used to generate an incoming call message pop-up window in the display interface in response to receiving a notification message of an incoming call event; the pop-up window includes at least one of the following: an answer button, a reject button, and a hang-up button;
[0041] The operation request sending module is used to send the operation request to the second device through the voice call channel in response to detecting the operation of selecting a button in the pop-up window.
[0042] Optionally, the device further comprises:
[0043] A calling path establishing module, used for establishing an audio device calling path with the second device when the operation request indicates answering an incoming call;
[0044] a target device calling module, configured to call the target audio device in response to detecting a calling request of the target audio device sent by the second device;
[0045] The audio data transmission module is used to transmit the audio data of the target audio device through the audio transmission path.
[0046] Optionally, the device further comprises:
[0047] The path disconnection module is used to disconnect the audio device calling path and the audio transmission path when the operation request indicates hanging up the call.
[0048] Optionally, the device further comprises:
[0049] The pop-up window closing module is used to close the pop-up window when the operation request indicates rejecting the incoming call.
[0050] According to a fourth aspect of the present disclosure, there is provided an audio device virtualization apparatus, applied to a second device, the apparatus comprising:
[0051] a device data acquisition module, configured to, in response to receiving broadcast data sent by the first device, parse the broadcast data to obtain virtual device data of at least one virtual audio device;
[0052] The audio device calling module is used to determine whether to call the virtual audio device corresponding to the virtual device data in the first device.
[0053] Optionally, the audio device calling module includes:
[0054] a call path establishing module, configured to establish a voice call path with the first device in response to acquiring the virtual device data, wherein the voice call path is used to transmit a notification message of the voice call;
[0055] The incoming call event notification module is used to generate a notification message of the incoming call event in response to detecting the incoming call event and send the notification message to the first device through the voice call path.
[0056] Optionally, the device further comprises:
[0057] a calling channel establishing module, configured to establish an audio device calling channel with the first device in response to receiving an operation request sent by the first device, wherein the operation request indicates answering an incoming call;
[0058] A target device calling module, used for calling a target audio device through the audio device calling path;
[0059] The audio data transmission module is used to transmit the audio data of the target audio device through the audio transmission path.
[0060] Optionally, the device further comprises:
[0061] The path disconnection module is used to disconnect the audio device calling path and the audio transmission path when the operation request indicates hanging up the call.
[0062] Optionally, the device further comprises:
[0063] The incoming call event closing module is used to close the incoming call event in response to receiving an operation request sent by the first device, and the operation request indicates rejecting the incoming call.
[0064] According to a fifth aspect of the present disclosure, a first device is provided, including:
[0065] Processor and memory;
[0066] The memory is used to store a computer program executable by the processor;
[0067] The processor is configured to execute the computer program in the memory to implement the method as described in any one of the first aspects.
[0068] According to a sixth aspect of the present disclosure, a second device is provided, including:
[0069] Processor and memory;
[0070] The memory is used to store a computer program executable by the processor;
[0071] The processor is configured to execute the computer program in the memory to implement the method as described in any one of the second aspects.
[0072] According to a seventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, and when an executable computer program in the storage medium is executed by a processor, the method described in any one of the first aspect or the second aspect can be implemented.
[0073] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0074] The solution of this embodiment can, in response to detecting that the first device is connected to the target network, virtualize the local audio device of the first device to obtain virtual device data of at least one virtual audio device; then, generate broadcast data based on the virtual device data, and broadcast the broadcast data to at least one second device through the target network. In this way, in this embodiment, by providing the local audio device to the second device for use, the audio processing capabilities between the first device and the second device can be opened up, making it convenient to use other devices for audio processing, reducing the probability of missed calls, and improving the call experience.
[0075] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 The present invention is a flowchart of an audio device virtualization method according to an embodiment of the present invention.
[0077] Figure 2 The present invention is a flowchart of another audio device virtualization method according to an embodiment of the present invention.
[0078] Figure 3 The present invention is a flowchart of an audio device virtualization method according to an embodiment of the present invention.
[0079] Figure 4 The present invention is a block diagram of an audio device virtualization apparatus according to an embodiment of the present invention.
[0080] Figure 5 The present invention is a block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0081] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.
[0082] The embodiments of the present disclosure provide an audio device virtualization method and apparatus, a first device, and a second device. The first device may include but is not limited to personal computers, smart display screens, and other devices with local audio devices. The audio device includes an audio acquisition device, such as a microphone or a microphone array; and also includes an audio rendering device, such as a speaker, a headset, and a stereo. The second device may include but is not limited to a smart phone, a tablet computer, and other devices configured with an electric current transfer function. For the convenience of description, the subsequent embodiments describe the schemes of each embodiment with the first device and the second device, but this does not constitute a limitation on the scheme of the present disclosure.
[0083] Figure 1 Flow chart of an audio device virtualization method according to an embodiment of the present disclosure. Figure 1 , an audio device virtualization method, which can be applied to a first device, includes steps 11 to 13.
[0084] In step 11, in response to detecting that the first device is connected to the target network, the local audio device of the first device is virtualized to obtain virtual device data of at least one virtual audio device.
[0085] In this embodiment, the first device includes a communication module, which can access a local area network, a WIFI network or a Tianqin network, and can select a corresponding local area network according to a specific scenario. The communication module of the first device can detect a local area network within a preset range according to a preset period, and when a pre-configured target network is detected, the target network can be accessed.
[0086] In this embodiment, after detecting access to the target network, the first device can virtualize the local audio device. For example, the first device can obtain the sampling rate of each audio device, and each sampling rate can virtualize a virtual audio device, that is, the first device obtains the virtual device data of a virtual audio device. Based on the above method, the first device can virtualize each local audio device to obtain the virtual device data of at least one virtual audio device.
[0087] In step 12, broadcast data is generated according to the virtual device data, and the broadcast data is broadcast to at least one second device through the target network.
[0088] In this embodiment, the first device can generate broadcast data based on the virtual device data of each virtual audio device. Then, the first device can broadcast the broadcast data to at least one second device through the above-mentioned target network. The second device can receive the broadcast data sent by the first device through the above-mentioned target network. Then, the second device can parse the broadcast data to obtain the virtual device data of at least one virtual audio device. After obtaining the virtual device data, the second device can establish a voice call channel with the first device, and the voice call channel is used to transmit notification messages of voice calls, such as notification messages of incoming call events, operation messages (answer, reject or hang up, etc.).
[0089] In one example, a first device and a second device establish a voice communication path, including:
[0090] The second device can obtain the communication method of broadcast data, such as Tianqin network, BLE, WIFI local area network, etc., and continue to use the communication method to send a voice call channel establishment request to the first device. After receiving the voice call channel establishment request, the first device can consult the local communication module; when the communication module meets the communication conditions, it can be paired with the communication module of the second device to establish a voice call channel establishment request, obtain the channel establishment result, and feedback the channel establishment result to the second device. The second device receives the channel establishment result. When the channel establishment result indicates that the voice call channel is successfully established, the second device can determine that the voice call channel is successfully established; when the channel establishment result indicates that the voice call channel fails to be established, the second device can determine that the voice call channel fails to be established. At this time, the voice call channel establishment request can be resent until the voice call channel is successfully established; or if it still fails to be established after sending several times (for example, 2-5 times), stop sending the voice call channel establishment request.
[0091] In this embodiment, when the channel establishment result indicates that the voice call channel is successfully established, the second device can wait for an incoming call event. When an incoming call event is detected, the second device can generate a notification message of the incoming call event, and first generate an incoming call message pop-up window in the local display interface of the second device. The incoming call message pop-up window may include at least one of the following: an answer button, a reject button, or a hang up button. Then it is sent to the first device through the above-mentioned voice call channel. It is understandable that during the process of the second device displaying the incoming call message pop-up window, the user can choose to operate the function button, such as the answer button, to answer the call and make a voice call. Other functions are similar and will not be repeated here.
[0092] In this embodiment, the first device can receive a notification message of an incoming call event through a voice call channel, and generate an incoming call message pop-up window in the display interface. The pop-up window includes at least one of the following: an answer button, a reject button, and a hang-up button, and can display the same content as the incoming call message pop-up window of the second device. In some examples, the incoming call message pop-up window of the first device can also include the type of incoming call, such as whether the incoming call is a transferred call, or whether the incoming call is transferred from the second device, etc., that is, the incoming call type can assist the user in determining whether the incoming call is a local call or a transferred call from the second device, thereby improving the user experience.
[0093] In this embodiment, during the process of displaying the incoming call message pop-up window, the user can operate various function keys in the incoming call message pop-up window, such as clicking an answer button, sliding a reject button, etc. The first device can detect the user's operation of selecting a button in the pop-up window, generate an operation request that matches the operated function key, and send the operation request to the second device through the voice call path.
[0094] In this embodiment, the second device may receive the above operation request through a voice call path. When the above operation request indicates answering an incoming call, an audio device call path may be established with the first device. In one example, the second device and the first device establish an audio device call path, including:
[0095] The second device can continue to use the communication method of broadcast data to send an audio device call path establishment request to the first device. After receiving the audio device call path establishment request, the first device can check the local communication module; when there is a matching communication module, it can be paired with the communication module of the second device to establish an audio device call path and obtain a call path establishment result; and the call path establishment result is fed back to the second device through the voice call path. Then, the second device can receive the above call path establishment result through the voice call path.
[0096] When the call path establishment result indicates that the audio device call path is successfully established, the second device can determine that the audio device call path is successfully established; when the call path establishment result indicates that the audio device call path fails to be established, the second device can determine that the audio device call path fails to be established, and at this time, the audio device call path establishment request can be resent until the audio device call path is successfully established; or if it still fails to be established after sending several times (for example, 2-5 times), stop sending the audio device call path establishment request. In one example, the audio device call path is implemented at the RPC communication layer of the first device and the second device. For example, the RPC communication layer of the first device can provide an API interface service for virtualized audio devices for the Android system, so as to improve the efficiency of calling audio devices.
[0097] In this embodiment, after the audio device call path is successfully established, the second device can call the audio device in the first device through the audio device call path. Before calling the audio device, the second device will select the target audio device from the virtual audio device list, and the device parameters of the target audio device are the optimal values of the device parameters of at least one audio device supported by the second device. For example, the virtual audio device list includes microphones that support a sampling rate of 8kHZ, microphones that support a sampling rate of 16kHZ, and microphones that support a sampling rate of 56kHZ, while the second device supports microphones with a sampling rate of 8kHZ and microphones with a sampling rate of 56kHZ. At this time, the second device can use the microphone with a sampling rate of 56kHZ as the target acquisition device. The target rendering device is selected in a similar manner, and the device with the best device parameters is selected from multiple candidate rendering devices as the target rendering device. In this way, it can be ensured that the second device can equip the audio device with the optimal parameters to improve the quality of voice calls.
[0098] In one example, when the audio device includes an audio acquisition device, the second device and the first device can establish a data uplink path as the uplink path for the voice call. For example, after the second device calls the microphone of the first device, the microphone can collect the audio data stream and send it to the second device through the data uplink path after encryption. At this time, the second device can send the above audio data stream to the device of the caller. When the audio device includes an audio rendering device, the second device and the first device can establish a data downlink path as the downlink path for the voice call. For example, after the second device calls the speaker of the first device, the second device can send the received audio data stream to the first device through the data downlink path. The first device performs a decryption operation on the audio data stream to obtain the original audio, and sends the original audio to the virtual audio device, that is, the virtual microphone can send the audio data stream to the speaker hardware to render the voice. In this way, in this example, by transmitting the audio acquisition data and the audio rendering data separately, the efficiency of voice data transmission can be improved.
[0099] In one embodiment, when the operation request indicates rejecting the incoming call, the second device may close the incoming call event. The first device and the second device both close the incoming call message pop-up window, so as not to affect the user's continued use of the first device and the second device.
[0100] In one embodiment, when the operation request indicates hanging up the call, the second device can disconnect the audio device calling path and the audio transmission path, and close the incoming call message pop-up window. The first device can disconnect the audio device calling path and the audio transmission path, and close the incoming call message pop-up window.
[0101] At this point, in this embodiment, by providing the local audio device to the second device for use, the audio processing capabilities between the first device and the second device can be opened up, making it convenient to use other devices for audio processing, reducing the probability of missed calls, and improving the call experience.
[0102] exist Figure 1 Based on the audio device virtualization method shown in FIG. 1 , the present disclosure also provides an audio device virtualization method that can be applied to a second device. Figure 2 , including step 21 and step 22.
[0103] In step 21, in response to receiving broadcast data sent by the first device, the broadcast data is parsed to obtain virtual device data of at least one virtual audio device.
[0104] In this embodiment, after accessing the target network, the first device can virtualize the local audio device to obtain virtual device data of at least one virtual audio device. The second device can access the target network to obtain the broadcast data. Then, the second device can parse the broadcast data to obtain virtual device data of at least one virtual audio device.
[0105] In step 22, it is determined whether to call the virtual audio device corresponding to the virtual device data in the first device.
[0106] In this embodiment, after obtaining the virtual device data, the second device can establish a voice call channel with the first device, and the voice call channel is used to transmit notification messages of the voice call, such as notification messages of incoming call events and operation messages (answer, reject or hang up, etc.).
[0107] It should be noted that the solution for establishing a voice communication channel between the second device and the first device can refer to the content of step 12, which will not be repeated here.
[0108] In this embodiment, when the channel establishment result indicates that the voice call channel is successfully established, the second device can wait for the incoming call event. When an incoming call event is detected, the second device can generate a notification message of the incoming call event, and first generate an incoming call message pop-up window in the local display interface of the second device. And, the notification message of the incoming call event is sent to the first device through the voice call channel. The first device can receive the notification message of the incoming call event through the voice call channel, and generate an incoming call message pop-up window in the display interface. The user can select an operation button in the incoming call message pop-up window, and send the generated operation request to the second device.
[0109] In this embodiment, the second device can receive the above operation request through the voice call path. When the above operation request indicates answering the incoming call, an audio device call path can be established with the first device. In one example, the second device and the first device establish an audio device call path. The solution for establishing the audio device call path can refer to the content of the above embodiment, which will not be repeated here.
[0110] In this embodiment, the second device can continue to use the communication method of broadcast data to send an audio device call path establishment request to the first device, and establish an audio device call path with the first device. At this time, the second device can call the audio device through the audio device call path, and establish an audio upstream path and / or an audio downstream path corresponding to the audio device, and then transmit the audio data of the audio device through the audio upstream path or the audio downstream path, so as to achieve the effect of the first device answering the incoming call of the second device.
[0111] In one embodiment, when the operation request indicates rejecting the incoming call, the second device may close the incoming call event. The first device and the second device both close the incoming call message pop-up window, so as not to affect the user's continued use of the first device and the second device.
[0112] In one embodiment, when the operation request indicates hanging up the call, the second device can disconnect the audio device calling path and the audio transmission path, and close the incoming call message pop-up window. The first device can disconnect the audio device calling path and the audio transmission path, and close the incoming call message pop-up window.
[0113] At this point, in this embodiment, the second device can call the audio device of the first device, allowing the user to receive calls on the first device, reducing the probability of missed calls and improving the call experience.
[0114] The following describes a method for virtualizing an audio device according to an embodiment of the present disclosure in conjunction with the accompanying drawings. Figure 3 ,include:
[0115] The first device includes an audio capability layer, an application layer and a communication layer. The audio capability layer includes a WASAPI module, which can call a default microphone and / or a default speaker. The application layer includes a telephone service, a device performance data publishing module, a telephone control module, an audio device control module, an audio transmission module and a display interface.
[0116] After accessing the target network, the first device virtualizes the local audio device to obtain at least one virtual audio device and virtual device data of each virtual audio device. Then, the first device generates broadcast data according to the virtual device data of each virtual audio device and broadcasts it to the second device through the target network.
[0117] After receiving the broadcast data, the second device may establish a voice call channel with the first device.
[0118] When an incoming call event is detected, the second device can send a notification message of the incoming call event to the first device. After receiving the notification message, the communication layer of the second device can send it to the telephone service through the telephone control module to control the display interface to generate an incoming call message pop-up window.
[0119] When the first device detects that the user is operating the incoming call message pop-up window, the operation request can be sent to the communication layer through the phone control module, and then sent to the second device through the communication layer. The second device can send an audio device call request and call the default microphone (i.e., the target acquisition device in the above embodiment) or the default speaker (i.e., the target rendering device in the above embodiment) of the audio capability layer through the communication layer and the audio device control module.
[0120] In one example, the default microphone can collect audio data, send it to the telephone service, and send it to the second device through the audio transmission module and the data uplink path.
[0121] In one example, the second device can send the audio data to the first device through the data downlink channel. The first device sends the audio data to the telephone service through the audio transmission module, and the telephone service calls the WASAPI module of the audio capability layer, and the WASAPI module calls the default speaker to render the audio data and restore the original voice.
[0122] When the user rejects the call, both the first device and the second device close the incoming call message pop-up window.
[0123] When the user hangs up the phone, the first device can close the incoming call message pop-up window and send an operation request indicating closing the incoming call to the second device. After receiving the operation request, the second device disconnects the audio device calling path and disconnects the audio transmission path.
[0124] At this point, the audio device virtualization method provided in this embodiment can shield the heterogeneity of the audio devices in the first device and the second device, and can make the virtual audio device mounted on the first device be virtualized and called by each second device, thereby expanding the number of audio devices of the second device. In addition, the solution of this embodiment can also switch freely between multiple operating systems, and no longer restricts the operating system of the second device, and can be extended to devices with different operating systems. Finally, when the second device calls, it can answer the call on any first device of the target network, which can reduce the dependence of the call scene on the second device, greatly reduce the probability of missed calls, and improve user experience.
[0125] The present disclosure provides an audio device virtualization method, and the present disclosure also provides an audio device virtualization device. Figure 4 , the device comprises:
[0126] A virtual device acquisition module 41, configured to, in response to detecting that a first device is connected to a target network, virtualize a local audio device of the first device to obtain virtual device data of at least one virtual audio device;
[0127] The broadcast data acquisition module 42 is used to generate broadcast data according to the virtual device data, and broadcast the broadcast data to at least one second device through the target network.
[0128] In one embodiment, the device further comprises:
[0129] The call channel establishing module is used to establish a voice call channel with the second device, and the voice call channel is used to transmit a notification message of the voice call.
[0130] In one embodiment, the device further comprises:
[0131] A message pop-up window module, used to generate an incoming call message pop-up window in the display interface in response to receiving a notification message of an incoming call event; the pop-up window includes at least one of the following: an answer button, a reject button, and a hang-up button;
[0132] The operation request sending module is used to send the operation request to the second device through the voice call channel in response to detecting the operation of selecting a button in the pop-up window.
[0133] In one embodiment, the device further comprises:
[0134] A calling path establishing module, used for establishing an audio device calling path with the second device when the operation request indicates answering an incoming call;
[0135] a target device calling module, configured to call the target audio device in response to detecting a calling request of the target audio device sent by the second device;
[0136] The audio data transmission module is used to transmit the audio data of the target audio device through the audio transmission path.
[0137] In one embodiment, the device further comprises:
[0138] The path disconnection module is used to disconnect the audio device calling path and the audio transmission path when the operation request indicates hanging up the call.
[0139] In one embodiment, the device further comprises:
[0140] The pop-up window closing module is used to close the pop-up window when the operation request indicates rejecting the incoming call.
[0141] It should be noted that the device embodiment shown in this embodiment matches the content of the above method embodiment, and the content of the above method embodiment can be referred to, which will not be repeated here.
[0142] In the audio device virtualization method provided in the present disclosure, the embodiment of the present disclosure also provides an audio device virtualization device, which is applied to a second device, and the device includes:
[0143] a device data acquisition module, configured to, in response to receiving broadcast data sent by the first device, parse the broadcast data to obtain virtual device data of at least one virtual audio device;
[0144] The audio device calling module is used to determine whether to call the virtual audio device corresponding to the virtual device data in the first device.
[0145] In one embodiment, the audio device calling module includes:
[0146] a call path establishing module, configured to establish a voice call path with the first device in response to acquiring the virtual device data, wherein the voice call path is used to transmit a notification message of the voice call;
[0147] The incoming call event notification module is used to generate a notification message of the incoming call event in response to detecting the incoming call event and send the notification message to the first device through the voice call path.
[0148] In one embodiment, the device further comprises:
[0149] a calling channel establishing module, configured to establish an audio device calling channel with the first device in response to receiving an operation request sent by the first device, wherein the operation request indicates answering an incoming call;
[0150] A target device calling module, used for calling a target audio device through the audio device calling path;
[0151] The audio data transmission module is used to transmit the audio data of the target audio device through the audio transmission path.
[0152] In one embodiment, the device further comprises:
[0153] The path disconnection module is used to disconnect the audio device calling path and the audio transmission path when the operation request indicates hanging up the call.
[0154] In one embodiment, the device further comprises:
[0155] The incoming call event closing module is used to close the incoming call event in response to receiving an operation request sent by the first device, and the operation request indicates rejecting the incoming call.
[0156] It should be noted that the device embodiment shown in this embodiment matches the content of the above method embodiment, and the content of the above method embodiment can be referred to, which will not be repeated here.
[0157] Figure 5 5 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 500 may be a smart phone, a computer, a digital broadcast terminal, a tablet device, a medical device, a fitness device, a personal digital assistant, etc. The electronic device may be used as the first device or the second device.
[0158] Reference Figure 5 The electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , a communication component 516 , and an image acquisition component 518 .
[0159] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute computer programs. In addition, the processing component 502 may include one or more modules to facilitate interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502. In an example, the processor 520 may implement the scheme of the above method.
[0160] The memory 504 is configured to store various types of data to support operations on the electronic device 500. Examples of such data include computer programs for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0161] The power supply component 506 provides power to various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 500. The power supply component 506 may include a power supply chip, and the controller may communicate with the power supply chip to control the power supply chip to turn on or off the first switch device, so that the battery supplies power to the mainboard circuit or does not supply power.
[0162] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the target object. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input information from the target object. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0163] The audio component 510 is configured to output and / or input audio file information. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive external audio file information. The received audio file information can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio file information.
[0164] The I / O interface 512 provides an interface between the processing component 502 and a peripheral interface module, such as a keyboard, a click wheel, a button, etc.
[0165] The sensor component 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor component 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display screen and keypad of the electronic device 500, and the sensor component 514 can also detect the position change of the electronic device 500 or a component, the presence or absence of contact between the target object and the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. In this example, the sensor component 514 can include a magnetic sensor, a gyroscope, and a magnetic field sensor, and can also include an inertial sensor, an image sensor, etc., wherein the magnetic field sensor includes at least one of the following: a Hall sensor, a thin film magnetoresistive sensor, and a magnetic liquid acceleration sensor.
[0166] The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives broadcast information or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0167] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0168] In an exemplary embodiment, the present disclosure also provides a non-transitory computer-readable storage medium, and when an executable computer program in the storage medium is executed by a processor, the above-mentioned method can be implemented.
[0169] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0170] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for virtualizing an audio device, characterized in that: Applied to a first device, the method includes: In response to detecting that the first device is connected to the target network, virtualizing the local audio device of the first device to obtain virtual device data of at least one virtual audio device; Broadcast data is generated according to the virtual device data, and the broadcast data is broadcast to at least one second device through the target network.
2. The method according to claim 1, characterized in that The method further comprises: A voice call channel is established with the second device, where the voice call channel is used to transmit a notification message of the voice call.
3. The method according to claim 2, characterized in that The method further comprises: In response to receiving a notification message of an incoming call event, generating an incoming call message pop-up window in the display interface; the pop-up window includes at least one of the following: an answer button, a reject button, and a hang-up button; In response to detecting an operation of selecting a button in the pop-up window, the operation request is sent to the second device through a voice call path.
4. The method according to claim 3, characterized in that The method further comprises: When the operation request indicates answering an incoming call, establishing an audio device calling path with the second device; In response to detecting a calling request of a target audio device sent by the second device, calling the target audio device; The audio data of the target audio device is transmitted through the audio transmission path.
5. The method according to claim 4, characterized in that The method further comprises: When the operation request indicates hanging up the call, the audio device calling path is disconnected and the audio transmission path is disconnected.
6. The method according to claim 3, characterized in that: The method further comprises: When the operation request indicates rejecting the incoming call, the pop-up window is closed.
7. A method for virtualizing an audio device, characterized in that: Applied to the second device, the method includes: In response to receiving broadcast data sent by the first device, parsing the broadcast data to obtain virtual device data of at least one virtual audio device; Determine whether to call the virtual audio device corresponding to the virtual device data in the first device.
8. The method according to claim 7, characterized in that Determining whether to call the virtual audio device corresponding to the virtual device data in the first device includes: In response to acquiring the virtual device data, establishing a voice call path with the first device, the voice call path being used to transmit a notification message of the voice call; In response to detecting an incoming call event, a notification message of the incoming call event is generated and sent to the first device through the voice call path.
9. The method according to claim 8, characterized in that The method further comprises: In response to receiving an operation request sent by the first device, and the operation request indicates answering an incoming call, establishing an audio device calling path with the first device; calling the target audio device through the audio device calling path; The audio data of the target audio device is transmitted through the audio transmission path.
10. The method according to claim 9, characterized in that The method further comprises: When the operation request indicates hanging up the call, the audio device calling path is disconnected and the audio transmission path is disconnected.
11. The method according to claim 8, characterized in that The method further comprises: In response to receiving an operation request sent by the first device and the operation request indicating rejecting the incoming call, closing the incoming call event.
12. An audio device virtualization device, characterized in that: Applied to a first device, the apparatus comprises: A virtual device acquisition module, configured to, in response to detecting that a first device is connected to a target network, virtualize a local audio device of the first device to obtain virtual device data of at least one virtual audio device; The broadcast data acquisition module is used to generate broadcast data according to the virtual device data, and broadcast the broadcast data to at least one second device through the target network.
13. An audio device virtualization device, characterized in that: Applied to a second device, the apparatus comprises: a device data acquisition module, configured to, in response to receiving broadcast data sent by the first device, parse the broadcast data to obtain virtual device data of at least one virtual audio device; The audio device calling module is used to determine whether to call the virtual audio device corresponding to the virtual device data in the first device.
14. A first device, characterized in that: include: Processor and memory; The memory is used to store a computer program executable by the processor; The processor is configured to execute the computer program in the memory to implement the method according to any one of claims 1 to 6.
15. A second device, characterized in that: include: Processor and memory; The memory is used to store a computer program executable by the processor; The processor is configured to execute the computer program in the memory to implement the method according to any one of claims 7 to 11.
16. A non-transitory computer-readable storage medium, characterized in that: When the executable computer program in the storage medium is executed by a processor, the method according to any one of claims 1 to 6 or 7 to 11 can be implemented.