Audio processing method and electronic equipment
By obtaining the occupation status information of the terminal device, the business conflict between terminal devices is solved and the user experience is improved.
Patent Information
- Application Number
- CN202311475611.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively avoid business conflicts between terminal devices and affect user experience.
By obtaining the occupation status information of local and peer devices, it is determined whether services can be transferred to peer devices, thereby avoiding business conflicts.
It realizes decision-making of business flow based on the equipment occupation status, avoids business conflicts and improves user experience.
Smart Images

Figure CN119996560A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal equipment, and in particular to an audio processing method and electronic equipment. Background Art
[0002] With the development of terminal technology and the widespread use of terminals, terminal devices can provide users with various services to meet their daily needs. Trust ring services allow multiple devices in the same ring to transfer services (such as notifications, incoming calls, etc.). For example, when a terminal device provides a user with a call service, if the user is not convenient to make a call on the terminal, the user can transfer the call to another terminal device to maintain the continuity of the call and meet the user's call needs. Summary of the invention
[0003] The present application provides an audio processing method and an electronic device. In the method, the electronic device can decide whether to transfer the service flow to the opposite device based on the occupancy status of the local device and the occupancy status of the opposite device, thereby avoiding service conflicts and improving the user experience.
[0004] In a first aspect, the present application provides an audio processing method, wherein a first electronic device, a second electronic device, and a third electronic device perform data interaction through a wireless connection, and a first business data flow is performed between the second electronic device and the third electronic device, and the method includes: the first electronic device obtains first occupancy status information of a first module of the second electronic device, and the first occupancy status information is used to indicate that the first module is not occupied. Among them, the first module is used to process data of a second business, and the priority of the second business is higher than the priority of the first business. The first electronic device receives a first user operation, and the first user operation is used to indicate that the second business data is transferred to the second electronic device. When the first electronic device determines that the first module of the first electronic device is not occupied based on the second occupancy status information of the first module of the first electronic device, and the first electronic device determines that the first module of the second electronic device is not occupied based on the first occupancy status information, the second business data is transferred to the second electronic device. The second electronic device and the first electronic device perform the flow of the second business data, and the second electronic device disconnects the flow of the first business data between the second electronic device and the third electronic device. In this way, the electronic device can decide whether to transfer the business to the opposite device based on the occupancy status of the local device and the occupancy status of the opposite device, thereby avoiding business conflicts and improving user experience.
[0005] Exemplarily, the first service may be a streaming service including audio data, such as an audio data streaming service, or a video data streaming service, and the like.
[0006] Exemplarily, the second service may be a call service.
[0007] Exemplarily, the first module may be a call audio device in an embodiment of the present application.
[0008] Exemplarily, the second module may be a common audio device in the embodiment of the present application.
[0009] In the present application, the first module and the second module are modules that provide virtual services. In an electronic device, the first module and the second module both call physical audio devices in the electronic device, such as a microphone, a speaker, and the like.
[0010] Exemplarily, the first electronic device caches the acquired occupancy status information of other devices in a designated cache.
[0011] In a possible implementation, before the second electronic device disconnects the flow of the first business data between the second electronic device and the third electronic device, the method further includes: the first electronic device sends a first module occupancy status update indication to the second electronic device, indicating that the first electronic device has occupied the first module of the second electronic device. In response to the first module occupancy status update indication, the second electronic device updates the first occupancy status information of the first module of the second electronic device to the third occupancy status information, and the third occupancy status information is used to indicate that the first module of the second electronic device is occupied. The second electronic device updates the fourth occupancy status information of the second module of the second electronic device to the fifth occupancy status information, and the fourth occupancy status information is used to indicate that the second module of the second electronic device is occupied, and the fifth occupancy status information is used to indicate that the second module of the second electronic device is not occupied; wherein the second module is used to process the first business data. In this way, each device in the trust ring can timely update the occupancy status of the corresponding module that processes the business based on the business execution status, so that the occupancy status of other devices obtained by each device in the trust ring is real-time and accurate, so as to further perform the flow task according to the occupancy status of the device.
[0012] In a possible implementation, the second electronic device disconnects the flow of the first business data between the second electronic device and the third electronic device, including: the second electronic device determines that the second module is preempted based on the change in the occupancy status information of the second module of the second electronic device. The second electronic device sends a business flow disconnection indication to the third electronic device, and the business flow disconnection indication is used to indicate the disconnection of the flow of the first business data. In this way, the electronic device in the present application can decide whether to preempt based on the business priority. Exemplarily, if the priority of the current business is the same as the priority of the business to be circulated, or the priority of the current business is higher than the priority of the business to be circulated, the business to be circulated cannot preempt the current business's right to use the specified module. If the priority of the current business is lower than the priority of the business to be circulated, the business to be circulated can preempt the current business's right to use the specified module.
[0013] In one possible implementation, after the second business data is transferred between the second electronic device and the first electronic device, the method further includes: the first electronic device updates the second occupancy status information of the first module of the first electronic device to the sixth occupancy status information, and the sixth occupancy status information is used to indicate that the first module of the first electronic device is occupied. The first electronic device updates the first occupancy status information of the first module of the second electronic device cached locally to the seventh occupancy status information, and the seventh occupancy status information is used to indicate that the first module of the second electronic device is occupied. In this way, each device in the trust ring can timely update the occupancy status of the corresponding module that processes the business based on the business execution status, so that the occupancy status of other devices obtained by each device in the trust ring is real-time and accurate, so as to further execute the flow task according to the occupancy status of the device.
[0014] In a possible implementation, the method further includes: the first electronic device receives a second user operation, and the second user operation is used to instruct to transfer another second business data to the second electronic device. The first electronic device determines that the first module of the second electronic device is occupied based on the seventh occupancy status information, and stops the flow operation of the other second business data. In this way, the electronic device can decide whether to preempt the current flow business based on the occupancy status of the module. In the present application, businesses of the same priority cannot preempt the same module.
[0015] In a possible implementation, the first electronic device obtains the first occupancy status information of the first module of the second electronic device, including: the first electronic device also obtains the fourth occupancy status information of the second module of the second electronic device; before the first electronic device receives the first user operation, the method also includes: the first electronic device receives a third user operation, and the third user operation is used to indicate that another first service data is transferred to the second electronic device; the first electronic device determines that the second module of the second electronic device is occupied based on the fourth occupancy status information, and stops the transfer operation of another first service data. In this way, the electronic device can decide whether it can seize the current transfer service based on the occupancy status of the module. For example, when the first electronic device is transferring the first service with other devices, another first service (i.e., another audio service) cannot seize the use right of the currently flowing audio service (i.e., the first service).
[0016] In a possible implementation, after the first electronic device and the second electronic device finish the flow of the second business data, the method further includes: the first electronic device receives a fourth user operation, the fourth user operation is used to instruct to transfer another first business data to the second electronic device; the first electronic device obtains the fifth occupancy status information of the second module of the second electronic device; the first electronic device determines that the second module of the first electronic device is not occupied based on the eighth occupancy status information of the second module of the first electronic device, and the first electronic device determines that the second module of the second electronic device is not occupied based on the fifth occupancy status information, and transfers another first business flow to the second electronic device. In this way, the electronic device can decide whether to transfer the business flow to the opposite device based on the occupancy status of the local device and the occupancy status of the opposite device, thereby avoiding business conflicts and improving user experience.
[0017] In a second aspect, the present application provides an electronic device, wherein a second electronic device and a third electronic device perform data interaction through a wireless connection, and a first business data flow is performed between the second electronic device and the third electronic device, and the electronic device includes: one or more processors, a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: obtaining first occupancy status information of a first module of the second electronic device, the first occupancy status information is used to indicate that the first module is not occupied, wherein the first module is used to process data of a second business, and the priority of the second business is higher than the priority of the first business; receiving a first user operation, the first user operation is used to indicate that the second business data is transferred to the second electronic device; determining that the first module of the electronic device is not occupied based on the second occupancy status information of the first module of the electronic device, and when determining that the first module of the second electronic device is not occupied based on the first occupancy status information, the second business data is transferred to the second electronic device; and the second electronic device disconnects the flow of the first business data between it and the third electronic device.
[0018] In one possible implementation, when the computer program is executed by one or more processors, the electronic device performs the following steps: sending a first module occupancy status update indication to a second electronic device, indicating that the electronic device has occupied the first module of the second electronic device; causing the second electronic device to update the first occupancy status information of the first module of the second electronic device to third occupancy status information in response to the first module occupancy status update indication, the third occupancy status information being used to indicate that the first module of the second electronic device is occupied; and the second electronic device updates the fourth occupancy status information of the second module of the second electronic device to fifth occupancy status information, the fourth occupancy status information being used to indicate that the second module of the second electronic device is occupied, and the fifth occupancy status information being used to indicate that the second module of the second electronic device is not occupied; wherein the second module is used to process the first business data.
[0019] In one possible implementation, when the computer program is executed by one or more processors, the electronic device performs the following steps: updating the second occupancy status information of the first module of the electronic device to the sixth occupancy status information, the sixth occupancy status information being used to indicate that the first module of the electronic device is occupied; updating the first occupancy status information of the first module of the second electronic device that is locally cached to the seventh occupancy status information, the seventh occupancy status information being used to indicate that the first module of the second electronic device is occupied.
[0020] In one possible implementation, when the computer program is executed by one or more processors, the electronic device performs the following steps: receiving a second user operation, where the second user operation is used to instruct the transfer of another second business data to a second electronic device; based on the seventh occupancy status information, determining that the first module of the second electronic device is occupied, and stopping the transfer operation of another second business data.
[0021] In one possible implementation, when the computer program is executed by one or more processors, the electronic device performs the following steps: obtaining fourth occupancy status information of the second module of the second electronic device; before the electronic device receives the first user operation, receiving a third user operation, the third user operation is used to instruct to transfer another first business data to the second electronic device; based on the fourth occupancy status information, determining that the second module of the second electronic device is occupied, and stopping the flow operation of another first business data.
[0022] In one possible implementation, when the computer program is executed by one or more processors, the electronic device performs the following steps: receiving a fourth user operation, where the fourth user operation is used to instruct to transfer another first business data stream to a second electronic device; obtaining fifth occupancy status information of a second module of the second electronic device; determining that the second module of the electronic device is not occupied based on the eighth occupancy status information of the second module of the electronic device, and, based on the fifth occupancy status information, determining that the second module of the second electronic device is not occupied, transferring another first business stream to the second electronic device.
[0023] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0024] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0025] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0026] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a schematic diagram of an application scenario shown as an example;
[0028] Figure 2 is a schematic diagram of the hardware structure of an electronic device shown as an example;
[0029] Figure 3 A schematic diagram of the software structure of an electronic device is shown as an example;
[0030] Figure 4 is a schematic diagram of the hardware structure of an electronic device shown as an example;
[0031] Figure 5 A schematic diagram of the software structure of an electronic device is shown as an example;
[0032] Figure 6The figure is a flowchart of an audio processing method shown as an example;
[0033] Figure 7a to Figure 7c A schematic diagram of an exemplary user interface;
[0034] Figure 8 is a schematic diagram of module interaction shown as an example;
[0035] Fig. 9 is a flowchart of an audio processing method shown as an example;
[0036] Fig.10a and Fig.10b A schematic diagram of a scene is shown as an example;
[0037] Fig.11 The figure is a flowchart of an audio processing method shown as an example;
[0038] Fig.12 A schematic diagram of a scene is shown as an example;
[0039] Fig.13 The figure is a flowchart of an audio processing method shown as an example;
[0040] Fig.14a and Fig.14b A schematic diagram of a scene is shown as an example;
[0041] Fig.15 The figure is a flowchart of an audio processing method shown as an example;
[0042] Fig.16 The figure is a flowchart of an audio processing method shown as an example;
[0043] Fig.17a and Fig.17b A schematic diagram of a scene is shown as an example;
[0044] Fig.18 The figure is a flowchart of an audio processing method shown as an example;
[0045] Fig.19 Schematic diagram of the structure of the device shown as an example. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0048] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0049] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0050] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0051] In the embodiment of the present application, the terminal device may be a mobile phone with a shooting function, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and other devices with an audio function. The embodiment of the present application does not limit the specific type of the terminal device.
[0052] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on a mobile device or electronic device, and finally presented as content that the user can recognize. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of a mobile device or electronic device.
[0053] In the embodiment of the present application, multiple terminal devices in the same trust ring can perform service transfer through wireless connection, such as video sharing, audio sharing, call sharing, etc., which can also be called video service transfer, audio service transfer, call service transfer (or call service transfer), etc. Among them, the mobile device (such as a mobile phone) can also be called an output end or a source end (source end), and the electronic device (such as a notebook) can also be called an input end or a receiving end (sink end).
[0054] Figure 1 This is a schematic diagram of an exemplary application scenario. Figure 1 In this scenario, mobile phone A and the notebook perform collaborative services. For example, mobile phone A transfers the video stream played on mobile phone A to the notebook for continued playback. During the collaborative service between mobile phone A and the notebook, mobile phone B responds to the received user operation to share the incoming call with the notebook, that is, the call stream on mobile phone B is transferred to the notebook to answer. In this scenario, the audio device of the notebook has been occupied by mobile phone A, that is, the audio device of the notebook is playing the audio data from mobile phone A. In response to the call sharing demand of mobile phone B, the notebook's call audio device will play the call data from mobile phone B. This will cause the audio data and call data to be played simultaneously on the notebook, affecting the user experience.
[0055] The present application provides an audio processing method, which can allocate the use rights of audio devices based on the priority of the business, thereby avoiding the problem of audio conflicts within the trust ring.
[0056] Figure 2 1 shows a schematic diagram of the structure of the electronic device 100. It should be understood that Figure 2The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 2 The various components shown in the drawings may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0057] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0058] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor (Modem), a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0059] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0060] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0061] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0062] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0063] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0064] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0065] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0066] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0067] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0068] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0069] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0070] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0071] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0072] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0073] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0074] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0075] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0076] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0077] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0078] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0079] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0080] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0081] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0082] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0083] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0084] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0085] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0086] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0087] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0088] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0089] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0090] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0091] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0092] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0093] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0094] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0095] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0096] Figure 3 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, from top to bottom, it includes but is not limited to: application layer, framework layer, HAL layer and kernel layer.
[0097] The application layer can include a series of application packages. Figure 3 As shown, the application package may include but is not limited to: music, call, collaboration, map and other applications.
[0098] The framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0099] like Figure 3 As shown, the framework layer may include but is not limited to: a window manager, a content provider, a view system, a distributed mobile sensing development platform (DMSDP) service, etc.
[0100] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0101] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0102] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0103] The DMSDP service is used to provide virtualization services, including but not limited to: concurrent state cache module, virtualization capability module, concurrent management module, and concurrent information interaction module.
[0104] The concurrent state cache module is used to store the device information of each device or module (such as audio equipment, camera equipment, etc.) in the electronic device. Among them, the device information includes the identification information of the device (such as device ID) and the occupancy status information. The occupancy status information includes but is not limited to the occupancy status identification and the identification information of the occupied object. Among them, the occupancy status identification is used to identify whether the device is occupied (that is, including the occupancy identification (for example, "1") and the non-occupancy identification (for example, "0")). In an embodiment of the present application, the concurrent state cache module can also be referred to as the concurrent state cache, that is, it can be understood as a cache space for caching device information. Optionally, the concurrent state cache module can also be understood as a controller for managing the concurrent state cache, which is not limited in this application.
[0105] In an embodiment of the present application, an occupied object can be divided into an occupied object and an occupying object. For example, if a mobile phone transfers the audio data stream to a notebook to play the audio data through the audio device of the notebook, that is to say, for the mobile phone side, the mobile phone is the occupied object of the audio device of the notebook, and the mobile phone occupies the audio device of the notebook. For the notebook side, the notebook is the occupied object of the mobile phone, that is, the audio device of the notebook is occupied by the mobile phone. Correspondingly, in this scenario, the occupied state of the audio device of the mobile phone is "occupied" (for example, marked as 1 (i.e., the occupied mark), which can be set according to actual needs, and is not limited in this application), and the occupied object is "notebook". The occupied state of the audio device of the notebook is also "occupied", and the occupied object is "mobile phone".
[0106] The concurrency management module is used to manage devices and device information of each device. Exemplarily, the concurrency management module can update the device information of the corresponding device stored in the concurrency status cache module after detecting a change in device information (such as occupancy status, etc.).
[0107] The concurrent information interaction module is used to provide a data transmission channel to interact with other devices, such as transmitting device information.
[0108] The virtualization capability module is used to enable the DMSDP service. The module can exchange data or instructions with applications through application interfaces between other applications in the application layer.
[0109] The HAL layer is an interface layer between the operating system kernel layer and the hardware (such as a camera) of the electronic device 100, and its purpose is to abstract the hardware and provide a virtual hardware platform for the operating system. The HAL layer includes but is not limited to: CameraHAL, Audio HAL, etc.
[0110] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0111] Understandably, Figure 3 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.
[0112] Figure 4 FIG. 2 is an exemplary hardware structure of the electronic device 200. Figure 4 As shown, the electronic device 200 may include: a video codec 221, a processor 222, a memory 223, a wireless communication processing module 224, a power switch 225, a wired LAN communication processing module 226, a high definition multimedia interface (HDMI) communication processing module 227, a USB communication processing module 228, a display screen 229, and an audio module 230. Each module may be connected via a bus. Among them: the processor 222 may be used to read and execute computer-readable instructions. In a specific implementation, the processor 222 may mainly include a controller, an operator, and a register. Among them, the controller is mainly responsible for instruction decoding and sends a control signal for the operation corresponding to the instruction. The operator is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, etc., and may also perform address operations and conversions. The register is mainly responsible for storing register operands and intermediate operation results temporarily stored during the execution of instructions. In a specific implementation, the hardware architecture of the processor 222 may be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.
[0113] The wireless communication processing module 224 may include a WLAN communication processing module 224A, and may also include a Bluetooth (BT) communication processing module 224B, an NFC processing module 224C, a cellular mobile communication processing module (not shown), and the like.
[0114] In some embodiments, the wireless communication processing module 224 may be used to establish a communication connection with the mobile device 100, and receive the encoded data sent by the mobile device 100 based on the communication connection. For example, the WLAN communication processing module 224A may be used to establish a Wi-Fi direct communication connection with the mobile device 100, the Bluetooth (BT) communication processing module 224B may be used to establish a Bluetooth communication connection with the mobile device 200, and the NFC processing module 224C may be used to establish an NFC connection with the mobile device 100, etc. That is, the wireless communication processing module 224 may support the mobile device 100 and the mobile device 200 to share multimedia content through mirroring (such as miracast).
[0115] In one embodiment, the wireless communication processing module 224 can monitor the signals transmitted by the mobile device 100, such as detection requests and scanning signals, discover the mobile device 100, and establish a communication connection with the mobile device 100. In another embodiment, the wireless communication processing module 224 can also transmit signals, such as detection requests and scanning signals, so that the electronic device 200 can discover the mobile device 100 and establish a communication connection (such as a Wi-Fi P2P connection) with the mobile device 100.
[0116] In some embodiments, when the mobile device 100 and the electronic device 200 share multimedia content through mirroring (such as miracast), the wireless communication processing module 224 (such as the WLAN communication processing module 224A) can also receive the scene notified by the mobile device 100. The processor 222 can parse and learn the scene, and adaptively select a playback strategy corresponding to the scene, and use the playback strategy to call the display screen 229, audio module 230 and other modules to play the multimedia content sent by the mobile device 100.
[0117] In some embodiments, the wireless communication processing module 224 (such as the WLAN communication processing module 224A) can also access the local area network or other network formed by the Wi-Fi access point 300, and receive the URL of the network video sent by the mobile device 100 through the Wi-Fi access point 300, and then directly obtain the network video from the server corresponding to the URL. That is, the WLAN communication processing module 224A can support the mobile device 100 and the electronic device 200 to share the network video through online screen projection (such as DLNA).
[0118] The video codec 221 is used to compress or decompress digital video. In an embodiment of the present application, the video codec 221 can decompress multimedia content from the mobile device 100 or the server 400. The electronic device 200 can support one or more video codecs and can play videos in one or more encoding formats. For example: MPEG1, MPEG2, MPEG3, MPEG4, etc. The processor 222 can be used to parse the signal received by the wireless communication processing module 224, such as the detection request broadcast by the electronic device 200. The processor 222 can be used to perform corresponding processing operations according to the analysis results, such as generating a detection response, etc. The processor 222 can be used to drive the display screen 229 to perform display according to the decompression result of the video codec 221.
[0119] The memory 223 is coupled to the processor 222 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 223 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. The memory 223 may store an operating system, such as an embedded operating system such as uCOS, VxWorks, RTLinux, Harmony, Android, etc. The memory 223 may also store a communication program, which may be used to communicate with the electronic device 200, one or more servers, or an additional device.
[0120] The power switch 225 can be used to control the power supply to the electronic device 200. The wired LAN communication processing module 226 can be used to communicate with other devices in the same LAN through the wired LAN, and can also be used to connect to a WAN through the wired LAN and communicate with devices in the WAN.
[0121] The HDMI communication processing module 227 may be used to communicate with other devices via an HDMI interface (not shown).
[0122] The USB communication processing module 228 may be used to communicate with other devices via a USB interface (not shown).
[0123] The display screen 229 can be used to display images, videos, etc. The display screen 229 can be LCD, OLED, AMOLED, FLED, QLED, etc. The content displayed by the display screen 229 can refer to the relevant description of the subsequent method embodiment. The audio module 230 can be used to output audio signals through the audio output interface, so that the electronic device 200 can support audio playback. The audio module 230 can also be used to receive audio data through the audio input interface. The audio module 230 may include but is not limited to: a microphone, a speaker, a receiver, etc.
[0124] In some embodiments, the electronic device 200 may also include a serial interface such as an RS-232 interface. The serial interface may be connected to other devices, such as an audio player such as a speaker, so that the display and the audio player cooperate to play audio and video. It is understood that Figure 4 The illustrated structure does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0125] Figure 5 2 is a schematic diagram of the software structure of the electronic device 200. The software system of the electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture, etc. Exemplarily, the software system of the electronic device 200 includes but is not limited to Linux or other operating systems.
[0126] Please refer to Figure 5 The application layer of the software system of the electronic device 200 may include DMSDP services, music applications, call applications, collaborative applications, etc. DMSDP services include but are not limited to: concurrent cache module, virtualization capability module, concurrent management module and concurrent information interaction module. For a detailed description, please refer to Figure 3 The relevant content will not be repeated here.
[0127] The kernel layer of the electronic device 200 may include, but is not limited to: a display driver, an audio driver, a Wi-Fi driver, a Bluetooth driver, and a sensor driver.
[0128] Figure 6 For an exemplary flowchart of the audio processing method, please refer to Figure 6 , including but not limited to the following steps:
[0129] S601, the mobile phone enables Modem Audio.
[0130] In the embodiment of the present application, the mobile phone receives an incoming call, and at the same time, electronic devices (such as laptops and tablets) in the same trust ring (i.e., with the same account) as the mobile phone all ring, i.e., vibrate simultaneously. The process of establishing a trust ring and the interactive process of ringing an incoming call can refer to the existing embodiments, and this application will not repeat them. Figure 7a For an exemplary user interface diagram, please refer to Figure 7a, the mobile phone displays an incoming call interface 701, which includes but is not limited to a rejection option and an acceptance option, and at the same time, the notebook interface displays an incoming call prompt box 702. The incoming call prompt box 702 displays the incoming call information (such as the incoming call number), the hang-up option and the answering option, etc. The tablet interface is similar to the notebook interface, which will not be described here.
[0131] Figure 8 The diagram is an exemplary diagram of module interaction. Figure 8 The left side is the software structure diagram of the mobile phone side, and the right side is the software structure diagram of the laptop side. Figure 8 After receiving an incoming call, the call application of the mobile phone sends a call enabling instruction to the DMSDP service through the application interface (not shown in the figure) between the DMSDP service and the mobile phone. The call enabling instruction includes but is not limited to the service type (Service type), which is used to indicate the type of service that needs to be enabled (or called). In this example, the service type is Modem Audio, which is used to indicate the call audio service.
[0132] The virtualization capability module determines to enable the incoming call sharing virtualization capability provided by the call audio service in response to the received call enabling instruction, that is, to enable Modem Audio.
[0133] It should be noted that the capabilities provided by the DMSDP service are different according to different enabling instructions. For example, an audio enabling instruction from a music application (or other applications) can be used to instruct the DMSDP service to provide audio virtualization capabilities, which is not limited in this application.
[0134] In the embodiment of the present application, the audio device can be divided into Audio and Modem Audio, which can also be called ordinary audio and call audio. Ordinary audio can be understood as calling the audio device of the mobile phone (such as a speaker, etc.) to process audio data such as music and video. Call audio can be understood as calling the audio device of the mobile phone to process call audio. In other words, although audio data such as music and call audio data are both called from the audio device in the mobile phone, the sources of the two audio data are different.
[0135] S602a, the mobile phone sends a device information query request to the notebook.
[0136] In an embodiment of the present application, after the mobile phone enables Modem Audio, the device information of at least one device in the trust ring can be obtained.
[0137] As described above, the device information in the embodiments of the present application includes but is not limited to: identification information and occupancy status information of the device. The device refers to a device or module in an electronic device, such as an audio device, a camera device, etc.
[0138] After the mobile phone enables Modem Audio, it can send a device information query request to at least one device in the trust circle to obtain the device information of the corresponding device.
[0139] In one possible implementation, the mobile phone can detect whether the device information of other electronic devices in the trust ring has been cached in the local cache. If so, there is no need to repeatedly obtain device information from these electronic devices, that is, there is no need to send device information query requests, and only send device information query requests to electronic devices in the trust ring that have not obtained device information. Specific examples will be illustrated in the following scenarios. For example, suppose the mobile phone is sharing audio with a tablet, that is, the device information of the tablet has been obtained in the process of audio sharing between the mobile phone and the tablet (the specific process will be described in Figure 8 ). Accordingly, in Figure 6 In the process shown, if the mobile phone detects that the device information of the tablet has been saved, there is no need to send a device information query request to the tablet. The mobile phone can send a device information query request to other devices (such as a laptop) in the trust circle.
[0140] In this example, the mobile phone does not cache the device information of the notebook and the tablet. Accordingly, the mobile phone sends a device information query request to both the notebook and the tablet.
[0141] Specifically, Figure 8 As shown, the concurrent management module can instruct the concurrent information interaction module to interact with the notebook end to send a device information query request. Among them, the concurrent information interaction module sends the device information query request to the notebook through the transmission channel between the concurrent information interaction module on the notebook end. It should be noted that the interaction between the concurrent information interaction modules is only a schematic illustration, and the actual interaction process needs to be processed by other modules accordingly, which will not be repeated in this application.
[0142] S602b, the notebook sends device information to the mobile phone.
[0143] For example, refer to Figure 8 The concurrent information interaction module on the notebook side receives the device information query request and forwards the request to the concurrent management module. The concurrent management module obtains the device information cached in the concurrent status cache module and sends it to the mobile phone side through the concurrent information interaction module.
[0144] Exemplarily, the device information cached on the notebook side includes identification information and occupancy status information of each device. In an embodiment of the present application, as described above, audio devices can be divided into ordinary audio devices and call audio devices. The device information may include the occupancy status of ordinary audio devices and the occupancy status of call audio devices. For example, if the notebook is currently sharing calls with other devices, the notebook's call audio device (such as a modem speaker (microphone), etc.) is in an occupied state, and its ordinary audio device (such as a speaker) is in a non-occupied state.
[0145] In a possible implementation, the electronic device in the embodiment of the present application can set an occupancy status flag bit for each device (for example, audio, camera, etc.) to record the real-time occupancy status of each device. In this example, the device information fed back by the notebook to the mobile phone includes the occupancy status information corresponding to each device.
[0146] In another possible implementation, the electronic device in the embodiment of the present application may set each device (for example, including audio, camera, etc.) with an occupied status flag bit to record the real-time occupied status of each device. In this example, the device information query request sent by the mobile phone to the notebook may include an audio device (including ordinary audio devices and call audio devices) occupancy status query indication, which is used to indicate the opposite end to feedback the occupancy status of the audio device. Correspondingly, the notebook feeds back device information, and the device information includes relevant information of each device (including audio devices and other devices), such as identification information, etc., and the device information fed back by the notebook includes the occupancy status information of the audio device (only the occupancy status identification can be fed back). In other words, the notebook can only feed back the occupancy status corresponding to the audio device, without feeding back the occupancy status of other devices.
[0147] In another possible implementation, the electronic device may also only record the occupancy status of the audio device (including ordinary audio devices and call audio devices), which is not limited in this application. That is, in the device information fed back by the notebook to the mobile phone, the audio device (including ordinary audio and call audio) has corresponding occupancy status information, while other devices (such as cameras) do not need to have corresponding occupancy status information.
[0148] Optionally, as described above, the occupancy status information cached in the electronic device includes an occupancy status identifier and identification information of an occupied object. In an embodiment of the present application, the device information fed back by the electronic device may only include an occupancy status identifier (including an occupancy identifier or a non-occupancy identifier) to identify whether the device is occupied.
[0149] Optionally, in an embodiment of the present application, the electronic device may further mark "occupied" or "occupied" in the occupancy status cached on the local side. The device information fed back by the electronic device to other electronic devices, such as the device information fed back by the laptop to the mobile phone, only needs to mark whether the device is occupied. For example, suppose that the laptop is currently sharing calls with other mobile phones, that is, its call audio device is occupied by other mobile phones. Correspondingly, the occupancy status corresponding to the call audio device in the device information cached on the notebook side may include the identification information of the mobile phone and the "occupied" mark, which is used to identify that the call audio device of the notebook is occupied by the mobile phone. The mobile phone is the occupied object of the call audio device of the notebook. In the device information fed back by the notebook to the mobile phone, the occupancy status information of the call audio device may only include the "occupied" mark to indicate that the call audio device of the notebook is currently occupied, without indicating whether the call audio device of the notebook is occupied by itself or occupied, and the occupation status information does not need to carry the occupied object. It can be understood that for the mobile phone side, it only cares whether the audio device of the notebook is occupied, but not the occupied object and whether it is "occupied".
[0150] Still refer to Figure 8 After the concurrent information interaction module on the mobile phone side obtains the device information of the notebook, it sends the device information of the notebook to the concurrent management module. The concurrent management module caches the device information of the notebook into the cache maintained by the concurrent status cache module. In this way, the mobile phone side caches the device information of each device on the mobile phone side and the device information of the notebook.
[0151] S602b, the mobile phone sends a device information query request to the tablet.
[0152] S603b, the tablet sends device information to the mobile phone.
[0153] For the specific description, please refer to S602a to S603a, which will not be repeated here.
[0154] S604, the mobile phone confirms that the call is switched to the notebook.
[0155] For example, please refer to Figure 7a , the user can click the answer option in the incoming call interface 701 of the mobile phone. Figure 7b For an exemplary user interface diagram, please refer to Figure 7b After the mobile phone answers the call in response to the received user operation (i.e., clicking or sliding the answer option), the call interface 703 is displayed. The call interface 703 includes a call sharing option 704. The user can click on the option to select the object to share the call. Assume that the user chooses to transfer the call to the notebook side. Exemplarily, the mobile phone determines to switch (or transfer) the call to the notebook in response to the received user operation.
[0156] Optionally, the call sharing scenario of receiving an incoming call is used as an example in the embodiment of the present application. In other embodiments, the method in the embodiment of the present application can also be applied to the scenario of actively making a call. For example, a mobile phone actively calls other users. During the call waiting process, the mobile phone can execute the device information query process. After the call is connected, the mobile phone displays the call interface 703 and can continue to execute the subsequent call flow process.
[0157] S605, the mobile phone checks whether the local call audio device is occupied.
[0158] Exemplarily, as described above, each device's concurrent status cache caches the device information of the local device. The device information includes occupancy status information. Figure 8 As shown, the concurrency management module in the mobile phone can obtain the device information of the local device from the concurrency status cache, and further query the occupied status information of the call audio device from the device information of the local device to detect whether the call audio device of the local device is occupied.
[0159] It should be noted that, in the embodiment of the present application, what is cached in the concurrent status cache is the occupancy status information of the modules occupied by the services provided by the DMSDP service. For example, after the mobile phone answers a call, before the call is transferred using the DMSDP service, the mobile phone will not update the occupancy status of the call audio device cached in the concurrent status cache. Only after the call is transferred to other devices using the DMSDP service (for example, after executing S609b), the occupancy status of the call audio cached in the concurrent cache will be refreshed. Similarly, the update nodes of the occupancy status of other devices will update the occupancy status only after the service is transferred using the DMSDP service. This will not be repeated below.
[0160] Optionally, as described above, the occupancy status information may include an occupancy status flag, and the mobile phone may determine whether the call audio device is occupied based on the occupancy status flag corresponding to the call audio device. For example, if the flag is "1", i.e., an occupancy flag, it is determined that the call audio device is occupied. If the flag is "0", i.e., a non-occupancy flag, it is determined that the call audio device is not occupied.
[0161] In one example, if the call audio device is occupied, execute S606.
[0162] In another example, if the call audio device is not occupied, execute S607.
[0163] S606, the mobile phone prompts that the call is busy.
[0164] Exemplarily, when the concurrent management module detects that the local call audio is occupied, it can report a first status code to the call application, which is used to indicate that the call audio device is occupied. The call application can display a prompt message in the call interface 703 to prompt that the call is occupied. Optionally, in other embodiments, the call application can also perform other operations based on the first status code, which can be set according to actual needs and is not limited in this application.
[0165] S607, the mobile phone queries whether the laptop call audio device is occupied.
[0166] For example, as described above, the mobile phone has obtained the device information of the laptop, wherein the device information of the laptop may be obtained when executing S602a and S603a, or may be obtained before executing this process, which is not limited in this application.
[0167] Please refer to Figure 8 The concurrent management module can obtain the device information corresponding to the cached notebook from the concurrent status cache. And further query the occupation status information of the notebook's call audio device from the notebook's device information to detect whether the notebook's call audio device is occupied. The specific query method is the same as the query method of this machine, and will not be repeated here.
[0168] In one example, if the call audio device of the notebook is occupied, for example, the notebook is sharing an incoming call with other devices, S608 is executed.
[0169] In another example, if the call audio device of the notebook is not occupied, S609a is executed.
[0170] S608, the mobile phone prompts that the call is busy.
[0171] Exemplarily, when the concurrent management module detects that the call audio of the notebook is occupied, a second status code may be reported to the call application, which is used to indicate that the call audio device of the notebook is occupied. The call application may display a prompt message in the call interface 703 to prompt that the call of the notebook is occupied. Optionally, in other embodiments, the call application may also perform other operations based on the second status code, which may be set according to actual needs and is not limited in this application.
[0172] S609a, the mobile phone sends a switching instruction to the notebook.
[0173] Specifically, the concurrent management module detects that the call audio device of the notebook is not occupied, and can determine that the call flow can be transferred to the notebook side. The concurrent management module can instruct the concurrent information interaction module to send a switching instruction to the notebook side, and the switching instruction is used to instruct to transfer the call flow to the notebook.
[0174] S609b, the notebook sends a switching success indication to the mobile phone.
[0175] Exemplarily, in response to the switching indication, the notebook calls the communication audio device on the notebook side to play the call audio data from the mobile phone side. Figure 7c For an exemplary user interface diagram, please refer to Figure 7c , the phone side displays the call interface. For a description of the call interface, refer to Figure 7b The notebook side displays a call prompt box 705, which includes but is not limited to call information of the current call (such as the incoming call number) and a hang-up option, etc., which can be set according to actual needs and is not limited in this application.
[0176] Optionally, the notebook sends a switching success indication to the mobile phone, indicating that the call has been successfully switched (or transferred) to the notebook.
[0177] S610: The mobile phone refreshes the status of the local audio device.
[0178] Exemplarily, the concurrency management module determines that the call has been successfully switched to the notebook in response to the switching success indication. That is, the current state of the call audio device of the mobile phone is "occupied", and the occupied object is the notebook. Accordingly, the concurrency management module updates the device information of the call audio device in the concurrency state cache, that is, updates the occupied state identifier in the occupied state information of the call audio device to "occupied identifier", for example, "1", and updates the occupied object to "identification information of the notebook".
[0179] And, the concurrent management module updates the device information of the notebook cached locally, that is, the occupation status indicator in the occupation status information of the call audio device of the notebook is also updated to "occupancy indicator" to indicate that the call audio device of the notebook is occupied.
[0180] In the embodiment of the present application, the priority of the audio service is that the priority of the call audio service is higher than the priority of the ordinary audio service. That is to say, when the audio device of the mobile phone is playing audio, the call audio can preempt the use right of the audio device. For example, after the mobile phone answers the call, the concurrent management module updates the "occupied" state of the ordinary audio device to the "non-occupied" state.
[0181] S611, the mobile phone detects whether the local audio is preempted.
[0182] In this step, the mobile phone can determine whether the audio is preempted based on the changes in the occupancy status of the ordinary audio device in the concurrent status cache. As mentioned above, when the audio device of the mobile phone is playing audio, the call audio can preempt the use rights of the audio device. For example, after the mobile phone answers the incoming call, the concurrent management module updates the "occupied" state of the ordinary audio device to the "non-occupied" state. Correspondingly, the concurrent management module can determine whether the use rights of the ordinary audio device are preempted by the call audio based on the occupancy status of the ordinary audio device before the incoming call is transferred and the occupancy status of the ordinary audio device after the incoming call is transferred.
[0183] In one example, if the audio is preempted, S612a is executed.
[0184] In another example, if it is not preempted, execute S613a.
[0185] S612a, the mobile phone sends an audio disconnect indication to the tablet.
[0186] For example, taking the example of a mobile phone performing an audio streaming service with a tablet before answering an incoming call, after the mobile phone detects that the ordinary audio device is preempted, it can send a disconnection indication to the tablet based on the identification information of the occupied object in the device information of the ordinary audio device (i.e., the identification information of the tablet). Optionally, the disconnection indication includes a third status code for indicating that the audio streaming service has been disconnected.
[0187] S612b, the tablet plays audio locally.
[0188] Exemplarily, the tablet can determine that the audio streaming service is disconnected in response to the third status code in the disconnection indication. Optionally, the tablet can continue to play the audio data on the local device based on the third status code. In other embodiments, the tablet can also perform other operations based on the third status code, such as pausing the playback of audio data and popping up a prompt that the audio device is preempted, which can be set according to actual needs and is not limited in this application.
[0189] It should be noted that this example only takes the case where the tablet transfers the audio service to the mobile phone for playback and the audio device on the mobile phone side is preempted as an example. Correspondingly, in this scenario, the tablet may continue to play the audio locally. In other embodiments, if the mobile phone occupies the tablet's audio device, that is, the mobile phone transfers the audio service to the tablet for playback, the tablet disconnects the audio streaming service with the mobile phone after receiving the disconnection instruction.
[0190] Optionally, after the concurrent management module in the tablet detects that the audio streaming service is disconnected, it updates the occupancy status information of the common audio device cached locally. That is, the previous occupied object is the mobile phone, and after the update, the common audio device of the tablet is occupied by itself. In other words, the occupancy status of the common audio device is still "occupied", and the occupied object is updated.
[0191] S613a, the mobile phone sends an audio device status update indication to the notebook.
[0192] Exemplarily, the mobile phone sends an audio device status update indication to the notebook, indicating that the occupation status of the call audio device of the notebook is updated to “occupied”. Optionally, the audio device status update indication includes identification information of the mobile phone, indicating that the occupation object of the call audio device of the notebook is the mobile phone.
[0193] S603b, the notebook computer refreshes the status of the local audio device.
[0194] Exemplarily, the notebook updates the occupancy status of the call audio device cached on the local side in response to the audio device update indication sent by the mobile phone.
[0195] For details, please refer to Figure 8 , the concurrent information interaction module obtains the audio device update indication and outputs the indication to the concurrent management module. In response to the audio device update indication, the concurrent management module updates the occupancy status flag of the call audio device in the concurrent status cache to "occupied", for example, to "1", to indicate that the call audio is occupied. In addition, the concurrent management module updates the occupancy object, which is the "identification information of the mobile phone". Correspondingly, in the occupancy status information of the call audio device currently saved by the notebook, the occupancy flag is "1" and the occupancy object is "identification information of the mobile phone", which is used to indicate that the call audio of the notebook is occupied by the mobile phone.
[0196] Optionally, as described above, the priority of the audio service is that the priority of the call audio service is greater than the priority of the ordinary audio service. That is, when the audio device of the notebook is playing audio, the call audio can preempt the use right of the audio device. For example, after the notebook answers the call, when executing S603b, the concurrent management module of the notebook updates the "occupied" state of the ordinary audio device to the "non-occupied" state.
[0197] S613b, the notebook sends a successful response to the mobile phone indicating that the audio device occupancy status has been refreshed.
[0198] Exemplarily, after the notebook computer refreshes the device information of the local audio device, it sends a successful response to the mobile phone indicating that the audio device occupancy status has been refreshed.
[0199] S614, the notebook detects whether the local audio device is preempted.
[0200] Exemplarily, the notebook detects whether the local audio device is preempted based on the change in the occupancy state of the common audio device before and after the call transfer. The specific execution method can be referred to S611, which will not be described in detail here.
[0201] In one example, if the common audio device of the notebook is preempted, S615a is executed.
[0202] In another example, if the notebook's normal audio device is not preempted, no processing is done.
[0203] S615a, the notebook sends an audio disconnect indication to the tablet.
[0204] For example, taking the example of a laptop performing an audio streaming service with a tablet before answering an incoming call, after the laptop detects that the ordinary audio device is preempted, it can send a disconnection indication to the tablet based on the identification information of the occupied object in the device information of the ordinary audio device (i.e., the identification information of the tablet). Optionally, the disconnection indication includes a fourth status code, which is used to indicate that the audio streaming service has been disconnected.
[0205] In an embodiment of the present application, after detecting that it has been preempted, the notebook can promptly disconnect the business flow with other devices, thereby avoiding the problem of audio conflict (i.e., coexistence of multiple audios) and improving the user experience.
[0206] S612b, the tablet plays audio locally.
[0207] Exemplarily, the tablet can determine that the audio streaming service is disconnected in response to the third status code in the disconnection indication. Optionally, the tablet can continue to play the audio data on the local device based on the third status code. In other embodiments, the tablet can also perform other operations based on the third status code, which can be set according to actual needs and is not limited in this application.
[0208] It should be noted that this example only takes the case where the tablet transfers the audio service to the mobile phone for playback and the audio device on the mobile phone is preempted as an example. Accordingly, in this scenario, the tablet may continue to play the audio locally. In other embodiments, if the tablet's audio device is occupied by a notebook, that is, the notebook transfers the audio service to the tablet for playback, the tablet disconnects the audio streaming service with the notebook after receiving the disconnection instruction.
[0209] Optionally, after the concurrent management module in the tablet detects that the audio streaming service is disconnected, it updates the occupancy status information of the common audio device cached locally. That is, the previous occupied object is the mobile phone, and after the update, the common audio device of the tablet is occupied by itself. In other words, the occupancy status flag of the common audio device is still "occupancy flag", and the occupied object is updated.
[0210] In one possible implementation, after the call transfer service ends, for example, the call application of the mobile phone responds to the received user hang-up operation, or responds to the received hang-up prompt (i.e., sent by the call counterpart), and ends the call. Correspondingly, the call application can send a call end indication to the DMSDP service to indicate the end of the local call. The DMSDP service ends the call transfer service. Specifically, the concurrent management module sends a call transfer service end prompt to the notebook through the concurrent information interaction module to indicate the end of the local call transfer service. The notebook cancels the display of the call information box 705. And, the mobile phone and the notebook update their respective device information. In an embodiment of the present application, after the end of this process, the mobile phone deletes the cached device information of the notebook and tablet, and updates the occupancy status of the local call audio device to "not occupied". The notebook also updates the occupancy status of the local call audio device to "not occupied".
[0211] Fig. 9 The flowchart of the audio processing method is used to illustrate the processing method of the audio data service flow. Fig. 9 , including but not limited to the following steps:
[0212] S901, the mobile phone enables Audio.
[0213] Exemplarily, when the mobile phone is playing audio, the music application determines to transfer the audio data service to the tablet in response to the received user operation. Optionally, the user operation may be a user clicking a transfer option, etc., which is not limited in this application.
[0214] The music application can send an Audio enable instruction to the DMSDP through the interface with the DMSDP service. The Audio enable instruction includes but is not limited to the service type, which is used to indicate the type of service that needs to be enabled (or called). In this example, the service type is Audio, which is used to indicate the call of a common audio service.
[0215] In response to the received Audio enable instruction, the virtualization capability module determines to enable the audio sharing virtualization capability provided by the common audio service, that is, to enable Audio.
[0216] S902, the mobile phone sends a device information query request to the tablet.
[0217] S903, the tablet sends device information to the mobile phone.
[0218] For example, Figure 8The difference between the steps in this example is that the mobile phone only needs to obtain the device information of the tablet (i.e. the target object of the audio service flow), and does not need to obtain the device information of other devices in the trust ring. For other contents not described, please refer to Figure 8 The relevant content will not be repeated here.
[0219] S904, the mobile phone detects whether the local audio device is occupied.
[0220] For example, the mobile phone queries whether the local general audio device is occupied based on the cached device information. Figure 8 The query method for whether the call audio is occupied is the same as that in the previous example, and will not be repeated here.
[0221] In one example, if the common audio device of the mobile phone is already occupied, S905 is executed.
[0222] In another example, if the common audio device of the mobile phone is not occupied, execute S906.
[0223] S905, the mobile phone prompts that the audio device is occupied.
[0224] Exemplarily, when the concurrent management module detects that the local common audio device is occupied, a fifth status code may be reported to the music application, where the status code is used to indicate that the common audio device is occupied. The music application may display a prompt message in the interface to indicate that the audio is occupied. Optionally, in other embodiments, the music application may also perform other operations based on the fifth status code, which may be set according to actual needs and is not limited in this application.
[0225] S906, the mobile phone queries whether the tablet audio device is occupied.
[0226] For example, as described above, the mobile phone has obtained the device information of the tablet, wherein the device information of the tablet may be obtained when executing S902a and S903a, or may be obtained before executing this process, which is not limited in this application.
[0227] Exemplarily, the concurrency management module may obtain the device information corresponding to the cached tablet from the concurrency status cache, and further query the occupation status information of the tablet's common audio device from the tablet's device information to detect whether the notebook's common audio device is occupied.
[0228] In one example, if the ordinary audio device of the tablet is occupied, for example, the tablet is performing an audio streaming service with other devices, S907 is executed.
[0229] In another example, if the common audio device of the tablet is not occupied, S908a is executed.
[0230] S907, the mobile phone prompts that the audio device is occupied.
[0231] Exemplarily, when the concurrent management module detects that the ordinary audio of the tablet is occupied, the sixth status code may be reported to the music application, where the status code is used to indicate that the ordinary audio device of the tablet is occupied. The music application may display a prompt message in the interface to indicate that the audio of the tablet is occupied. Optionally, in other embodiments, the music application may also perform other operations based on the sixth status code, which may be set according to actual needs and is not limited in this application.
[0232] S908a, the mobile phone sends a switching instruction to the tablet.
[0233] Specifically, the concurrent management module detects that the ordinary audio device of the tablet is not occupied, and can determine that the audio data stream can be transferred to the tablet side. The concurrent management module can instruct the concurrent information interaction module to send a switching instruction to the tablet side, and the switching instruction is used to instruct the audio data stream to be transferred to the tablet.
[0234] S908b, the tablet sends a switching success indication to the mobile phone.
[0235] Exemplarily, in response to the switching instruction, the tablet calls a common audio device on the tablet side to play the audio data from the mobile phone side.
[0236] Optionally, the tablet sends a switching success indication to the mobile phone, indicating that the audio has been successfully switched (or transferred) to the tablet.
[0237] S909, the mobile phone refreshes the local audio device status.
[0238] Exemplarily, the concurrent management module determines that the audio data has been successfully transferred to the tablet in response to the switching success indication. That is, the current state of the ordinary audio device of the mobile phone is the "occupied" state, and the occupied object is the tablet. Accordingly, the concurrent management module updates the device information of the ordinary audio device in the concurrent state cache, that is, updates the occupied state identifier in the occupied state information of the ordinary audio device to the "occupied identifier", for example, "1", and updates the occupied object to the "identification information of the tablet".
[0239] And, the concurrent management module updates the device information of the tablet cached locally, that is, the occupied state flag in the occupied state information of the ordinary audio device of the tablet is also updated to "occupied flag" to indicate that the ordinary audio device of the tablet is occupied.
[0240] In an embodiment of the present application, a high-priority service can preempt the device usage rights of a low-priority service. For example, a call transfer service can preempt the audio device usage rights of an audio transfer service. Services of the same priority level cannot preempt the device usage rights of services of the same priority level without setting special conditions or receiving user instructions. For example, a call transfer service cannot preempt the audio device usage rights of a call transfer service that has already occurred, and an audio transfer service cannot preempt the audio device usage rights of an audio transfer service that has already occurred. Accordingly, in this example, Fig. 9 The process in does not need to be executed Figure 6 The relevant process of detecting whether the audio device is preempted (for example, S611 to S615).
[0241] S910a, the mobile phone sends an audio device status refresh instruction to the tablet.
[0242] Exemplarily, the mobile phone sends an audio device status update indication to the tablet, indicating that the occupation status of the tablet's common audio device is updated to "occupied". Optionally, the audio device status update indication includes identification information of the mobile phone, indicating that the occupied object of the tablet's common audio device is the mobile phone.
[0243] S910b: The tablet refreshes the status of the local audio device.
[0244] Exemplarily, the tablet updates the occupancy status of the common audio device cached on the local side in response to the audio device update indication sent by the mobile phone.
[0245] Specifically, the concurrent information interaction module obtains the audio device update indication and outputs the indication to the concurrent management module. In response to the audio device update indication, the concurrent management module updates the occupancy status flag of the ordinary audio device in the concurrent status cache to "occupied", for example, to "1", to indicate that the ordinary audio device is occupied. In addition, the concurrent management module updates the occupancy object, which is the "identification information of the mobile phone". Correspondingly, in the occupancy status information of the ordinary audio device currently saved by the tablet, the occupancy flag is "1" and the occupancy object is "identification information of the mobile phone", which is used to indicate that the ordinary audio of the tablet is occupied by the mobile phone.
[0246] S910c: The tablet sends a successful response to the mobile phone indicating that the audio device occupancy status has been refreshed.
[0247] Exemplarily, after refreshing the device information of the local audio device, the tablet sends a successful response to the mobile phone indicating that the audio device occupancy status has been refreshed.
[0248] The following is a specific example. Figure 6 and Fig. 9 The process is described in detail.
[0249] Scene 1
[0250] Fig.10a and Fig.10b For an exemplary scene diagram, please refer to Fig.10a , the mobile phone, laptop and tablet are currently in the same trust ring and no transfer or collaboration services are being performed. Fig.10b , the mobile phone shares the incoming call with the notebook in response to the received user operation.
[0251] Combination Figure 6 , Fig.11 This is a schematic diagram of an audio processing method flow chart, which should be explained as follows: Fig.11 The step numbers in Figure 6 The sequence number in the figure is used to more clearly illustrate the direction of the steps. For detailed descriptions of each step, please refer to Figure 6 The relevant contents will not be repeated. Please refer to Fig.11 , including but not limited to:
[0252] S601, the mobile phone enables Modem Audio.
[0253] S602a, the mobile phone sends a device information query request to the notebook.
[0254] S603a, the notebook sends device information to the mobile phone.
[0255] S602b, the mobile phone sends a device information query request to the tablet.
[0256] S603b, the tablet sends device information to the mobile phone.
[0257] For example, Fig.10a As shown in the figure, no business flow is performed between the mobile phone, tablet and notebook. Accordingly, the mobile phone does not cache the device information of the notebook and tablet. Accordingly, the mobile phone sends a device information query request to the notebook and tablet to obtain the device information of the notebook and tablet. In addition, the current Modem Audio (i.e., call audio device) of the notebook and tablet are both in "non-occupied" state. Fig.11 As shown, the occupancy status of Modem Audio in the device information of the local device cached by the mobile phone is "not occupied", and the occupancy status of Modem Audio in the device information of the laptop and the tablet cached by the mobile phone are both "not occupied". It should be noted that only the occupancy status of Modem Audio is shown in this scenario. In fact, the cache also includes the occupancy status of other devices, such as the occupancy status of ordinary audio devices (Audio), which will not be repeated here and will not be repeated below.
[0258] S604, the mobile phone confirms that the call is switched to the notebook.
[0259] S605, the mobile phone queries whether the local call audio device is occupied.
[0260] In this example, the mobile phone detects that the occupancy state of the Modem Audio is "not occupied" based on the cached device information, and the step proceeds to S607.
[0261] S607, the mobile phone queries whether the laptop call audio device is occupied.
[0262] In this example, the mobile phone detects that the occupancy state of the laptop's Modem Audio is "not occupied" based on the cached device information of the laptop, and the step proceeds to S609a.
[0263] S609a, the mobile phone sends a switching instruction to the notebook.
[0264] S609b, the notebook sends a switching success indication to the mobile phone.
[0265] S610: The mobile phone refreshes the status of the local audio device.
[0266] For example, Fig.11 As shown, the mobile phone updates the local Modem Audio to the "occupied" state. In addition, the mobile phone can mark the occupied object as "laptop". In addition, the mobile phone updates the cached laptop Modem Audio occupancy state to "occupied".
[0267] S611, the mobile phone detects whether the local audio is preempted.
[0268] In this example, the mobile phone can determine that the local audio device is not preempted based on the occupied state of the Audio. The step proceeds to S613a.
[0269] S613a, the mobile phone sends an audio device status refresh indication to the notebook.
[0270] S613b, the notebook computer refreshes the audio device status.
[0271] like Fig.11 As shown, in this example, the notebook updates the occupancy status of the local Modem Audio to "occupied", and the occupied object is "mobile phone".
[0272] S613c, the notebook sends a successful response of audio device status refresh to the mobile phone.
[0273] S614, the notebook detects whether the local audio device is preempted.
[0274] In this example, based on the occupancy status of Audio, the notebook can determine that the local audio device is not preempted and does not take any action.
[0275] Scene 2
[0276] Fig.12 For an exemplary scene diagram, please refer to Fig.12 , mobile phone A, laptop and mobile phone B are currently in the same trust ring. Mobile phone B and laptop are performing call sharing service, that is, mobile phone B transfers the audio data of mobile phone call to the laptop. The process between mobile phone B and laptop can refer to Fig.11 In this scenario, mobile phone A receives an incoming call and expects the current to be transferred to the laptop to answer the call.
[0277] Combination Figure 6 , Fig.13 This is a schematic diagram of an audio processing method flow chart, which should be explained as follows: Fig.13 The step numbers in Figure 6 The sequence number in the figure is used to more clearly illustrate the direction of the steps. For detailed descriptions of each step, please refer to Figure 6 The relevant contents will not be repeated. Please refer to Fig.13 , including but not limited to:
[0278] S601, the mobile phone enables Modem Audio.
[0279] S602a, the mobile phone sends a device information query request to the notebook.
[0280] S603a, the notebook sends device information to the mobile phone.
[0281] S602b, the mobile phone sends a device information query request to the tablet.
[0282] S603b, the tablet sends device information to the mobile phone.
[0283] For example, Fig.12 As shown, no business flow is performed between mobile phone A and laptop and mobile phone B. Accordingly, the mobile phone does not cache the device information of laptop and mobile phone B. Accordingly, the mobile phone sends a device information query request to the laptop and mobile phone B to obtain the device information of the laptop and mobile phone B. In addition, the current Modem Audio (i.e., call audio device) of the laptop and mobile phone B are both in "occupied" state. Fig.13 As shown, the occupancy status of Modem Audio in the device information of the local device cached by the mobile phone is "not occupied", and the occupancy status of Modem Audio in the device information of the laptop and the device information of the tablet cached by the mobile phone are both "occupied".
[0284] S604, the mobile phone confirms that the call is switched to the notebook.
[0285] S605, the mobile phone queries whether the local call audio device is occupied.
[0286] In this example, the mobile phone detects that the occupancy state of the Modem Audio is "not occupied" based on the cached device information, and the step proceeds to S607.
[0287] S607, the mobile phone queries whether the laptop call audio device is occupied.
[0288] In this example, the mobile phone detects that the occupancy status of the laptop's Modem Audio is "occupied" based on the cached device information of the laptop, and the step proceeds to S608.
[0289] S608, the mobile phone prompts that the call is busy.
[0290] Scene 3
[0291] Fig.14a and Fig.14b For an exemplary scene diagram, please refer to Fig.14a , the mobile phone, laptop and tablet are currently in the same trust ring, and the mobile phone and tablet perform audio streaming services (i.e. audio sharing). Please refer to Fig.14b ,In this scenario, the mobile phone receives an incoming call, and in response to the received user ,operation, it is desired to transfer the call to the notebook.
[0292] Combination Fig. 9 , Fig.15 This is a schematic diagram of an audio processing method flow chart, which should be explained as follows: Fig.15 The step numbers in Fig. 9 The sequence number in the figure is used to more clearly illustrate the direction of the steps. For detailed descriptions of each step, please refer to Fig. 9 The relevant contents will not be repeated. Please refer to Fig.15 , including but not limited to:
[0293] S901, the mobile phone enables Audio.
[0294] S902a, the mobile phone sends a device information query request to the tablet.
[0295] S902b, the tablet sends device information to the mobile phone.
[0296] In this example, if Fig.15 As shown, in the device information of the local device cached by the mobile phone, the occupancy status of the local Audio (ie, ordinary audio device) is "not occupied", and the occupancy status of the tablet Audio obtained and cached by the mobile phone is "not occupied".
[0297] S904, the mobile phone detects whether the local audio device is occupied.
[0298] In this example, the mobile phone detects that the occupancy state of the local common audio device (ie, Audio) is "unoccupied", and the step proceeds to S906.
[0299] S906, the mobile phone queries whether the tablet audio device is occupied.
[0300] In this example, the mobile phone detects that the occupancy state of the common audio device (ie, Audio) of the tablet is "unoccupied", and the step proceeds to S908a.
[0301] S908a, the mobile phone sends a switching instruction to the tablet.
[0302] S908b, the tablet sends a switching success indication to the mobile phone.
[0303] S909, the mobile phone refreshes the local audio device status.
[0304] like Fig.15 As shown, the mobile phone updates the occupancy status of the cached local common audio device (ie, Audio) to "occupied", and updates the occupancy status of the cached tablet's common audio device to "occupied".
[0305] S910a, the mobile phone sends an audio device status refresh instruction to the tablet.
[0306] S910b: The tablet refreshes the status of the local audio device.
[0307] In this example, if Fig.15 As shown, the tablet updates the occupancy status of the local ordinary audio device to "occupied", and the occupied object is the mobile phone.
[0308] S910c: The tablet sends a successful response to the mobile phone indicating that the audio device occupancy status has been refreshed.
[0309] Please refer to Fig.14b During the audio streaming service between the mobile phone and the tablet, the mobile phone receives an incoming call and transfers the call service to the laptop, and the audio streaming service between the mobile phone and the tablet is disconnected. The specific execution process can be as follows Fig.16 As shown, Fig.16 This is a schematic diagram of an audio processing method flow chart, which should be explained as follows: Fig.16 The step numbers in Figure 6 The sequence number in the figure is used to more clearly illustrate the direction of the steps. For detailed descriptions of each step, please refer to Figure 6 The relevant contents will not be repeated. Please refer to Fig.16 , including but not limited to:
[0310] S601, the mobile phone enables Modem Audio.
[0311] S602a, the mobile phone sends a device information query request to the notebook.
[0312] S603a, the notebook sends device information to the mobile phone.
[0313] like Fig.16 As shown, the occupancy status of Modem Audio in the local device information cached by the mobile phone is "not occupied", and the occupancy status of Modem Audio in the device information of the laptop and the tablet cached by the mobile phone is "not occupied". In addition, the occupancy status of Audio (i.e., ordinary audio device) in the local device information cached by the mobile phone is "occupied", and the occupied object is "tablet". The occupancy status of the laptop Audio cached by the mobile phone is "not occupied", and the occupancy status of the tablet Audio cached by the mobile phone is "occupied".
[0314] For example, since the mobile phone Fig.15 The device information of the tablet has been obtained in the process, and the call transfer service is started before the audio data transfer service ends (if the audio transfer service ends, the mobile phone will delete the cached tablet device information). Therefore, the mobile phone still saves the device information of the tablet. Accordingly, the mobile phone does not need to repeatedly obtain the device information of the tablet.
[0315] S604, the mobile phone confirms that the call is switched to the notebook.
[0316] S605, the mobile phone queries whether the local call audio device is occupied.
[0317] In this example, the mobile phone detects that the occupancy state of the Modem Audio is "not occupied" based on the cached device information, and the step proceeds to S607.
[0318] S607, the mobile phone queries whether the laptop call audio device is occupied.
[0319] In this example, the mobile phone detects that the occupancy state of the laptop's Modem Audio is "not occupied" based on the cached device information of the laptop, and the step proceeds to S609a.
[0320] S609a, the mobile phone sends a switching instruction to the notebook.
[0321] S609b, the notebook sends a switching success indication to the mobile phone.
[0322] S610: The mobile phone refreshes the status of the local audio device.
[0323] For example, Fig.11As shown, the mobile phone updates the local Modem Audio to the "occupied" state. In addition, the mobile phone can mark the occupied object as "laptop". In addition, the mobile phone updates the cached laptop Modem Audio occupancy state to "occupied". In addition, the mobile phone updates the occupancy state of the local Audio and the tablet Audio to "unoccupied".
[0324] S611, the mobile phone detects whether the local audio is preempted.
[0325] In this example, the mobile phone can determine that the local audio device is preempted based on the occupied state of Audio, and the step proceeds to S612a.
[0326] S612a, the mobile phone sends an audio disconnect indication to the tablet.
[0327] S612b, the tablet plays audio.
[0328] In this example, the tablet updates the occupancy state of the local Audio (ie, a common audio device) from the "occupied" state to the "unoccupied" state.
[0329] S613a, the mobile phone sends an audio device status refresh indication to the notebook.
[0330] S613b, the notebook computer refreshes the audio device status.
[0331] like Fig.11 As shown, in this example, the notebook updates the occupancy status of the local Modem Audio to "occupied", and the occupied object is "mobile phone".
[0332] S613c, the notebook sends a successful response of audio device status refresh to the mobile phone.
[0333] S614, the notebook detects whether the local audio device is preempted.
[0334] In this example, based on the occupancy status of Audio, the notebook can determine that the local audio device is not preempted and does not take any action.
[0335] Scene 4
[0336] Fig.17a and Fig.17b For an exemplary scene diagram, please refer to Fig.17a , mobile phone A, laptop and mobile phone B are currently in the same trust ring, and mobile phone B and laptop are performing audio streaming services (i.e. audio sharing). The execution process of the audio streaming service between mobile phone B and laptop can be referred to Fig. 9 , I will not go into details here.
[0337] Please refer to Fig.17b, while mobile phone B and the notebook are performing the audio streaming service, mobile phone A receives an incoming call and transfers the call service to the notebook, and the audio streaming service between mobile phone B and the notebook is disconnected. The specific execution process can be as follows Fig.18 As shown, Fig.18 This is a schematic diagram of an audio processing method flow chart, which should be explained as follows: Fig.18 The step numbers in Figure 6 The sequence number in the figure is used to more clearly illustrate the direction of the steps. For detailed descriptions of each step, please refer to Figure 6 The relevant contents will not be repeated. Please refer to Fig.18 , including but not limited to:
[0338] S601, the mobile phone enables Modem Audio.
[0339] S602a, the mobile phone sends a device information query request to the notebook.
[0340] S603a, the notebook sends device information to the mobile phone.
[0341] like Fig.18 As shown, the occupancy status of Modem Audio in the local device information cached by the mobile phone is "not occupied", and the occupancy status of Modem Audio in the laptop device information cached by the mobile phone is "not occupied". In addition, the occupancy status of Audio (i.e., ordinary audio device) in the local device information cached by the mobile phone is "not occupied", and the occupancy status of Audio of the laptop cached by the mobile phone is "occupied", that is, the ordinary audio device of the laptop is being occupied by mobile phone B.
[0342] Optionally, in the embodiment of the present application, services such as audio streaming and call transfer cannot be performed between mobile phones under normal circumstances. Accordingly, in this scenario, mobile phone A does not need to obtain the device information of mobile phone B. In other embodiments, if services such as audio streaming and / or call transfer can be performed between mobile phones, mobile phone A will also obtain the device information of mobile phone B.
[0343] S604, the mobile phone confirms that the call is switched to the notebook.
[0344] S605, the mobile phone queries whether the local call audio device is occupied.
[0345] In this example, the mobile phone detects that the occupancy state of the Modem Audio is "not occupied" based on the cached device information, and the step proceeds to S607.
[0346] S607, the mobile phone queries whether the laptop call audio device is occupied.
[0347] In this example, the mobile phone detects that the occupancy state of the laptop's Modem Audio is "not occupied" based on the cached device information of the laptop, and the step proceeds to S609a.
[0348] S609a, the mobile phone sends a switching instruction to the notebook.
[0349] S609b, the notebook sends a switching success indication to the mobile phone.
[0350] S610: The mobile phone refreshes the status of the local audio device.
[0351] For example, Fig.18 As shown, the mobile phone updates the local Modem Audio to the "occupied" state. In addition, the mobile phone can mark the occupied object as "laptop". In addition, the mobile phone updates the cached laptop Modem Audio occupancy state to "occupied". In addition, the mobile phone updates the occupancy state of the local Audio and the laptop Audio to "unoccupied".
[0352] S611, the mobile phone detects whether the local audio is preempted.
[0353] In this example, the mobile phone can determine that the local audio device is not preempted based on the occupied state of the Audio. The step proceeds to S613a.
[0354] S613a, the mobile phone sends an audio device status refresh indication to the notebook.
[0355] S613b, the notebook computer refreshes the audio device status.
[0356] like Fig.18 As shown, in this example, the notebook updates the occupancy status of the local Modem Audio to "occupied", and the occupied object is "mobile phone".
[0357] S613c, the notebook sends a successful response of audio device status refresh to the mobile phone.
[0358] S614, the notebook detects whether the local audio device is preempted.
[0359] In this example, the notebook computer may determine that the local audio device is preempted based on the occupied state of Audio, and the step proceeds to S615a.
[0360] S615a, the notebook sends an audio disconnect indication to the tablet.
[0361] S615b, the tablet plays audio locally.
[0362] In this example, the tablet updates the occupancy state of the local Audio (ie, a common audio device) from the "occupied" state to the "unoccupied" state.
[0363] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0364] In one example, Fig.19 A schematic block diagram of a device 1900 according to an embodiment of the present application is shown. The device 1900 may include: a processor 1901 and a transceiver / transceiver pin 1902 , and optionally, a memory 1903 .
[0365] The various components of the device 1900 are coupled together via a bus 1904, wherein the bus 1904 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus 1904 in the figure.
[0366] Optionally, the memory 1903 may be used for the instructions in the aforementioned method embodiment. The processor 1901 may be used to execute the instructions in the memory 1903, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
[0367] The apparatus 1900 may be the electronic device or a chip of the electronic device in the above method embodiment.
[0368] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0369] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.
[0370] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method in the above-mentioned embodiment.
[0371] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the methods in the above-mentioned method embodiments.
[0372] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0373] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An audio processing method, characterized in that: The first electronic device, the second electronic device, and the third electronic device exchange data through a wireless connection, and the second electronic device and the third electronic device transfer first business data. The method includes: The first electronic device acquires first occupancy status information of a first module of the second electronic device, where the first occupancy status information is used to indicate that the first module is not occupied, wherein the first module is used to process data of a second service, and a priority of the second service is higher than a priority of the first service; The first electronic device receives a first user operation, where the first user operation is used to instruct to transfer the second service data flow to the second electronic device; When the first electronic device determines that the first module of the first electronic device is not occupied based on the second occupancy state information of the first module of the first electronic device, and the first electronic device determines that the first module of the second electronic device is not occupied based on the first occupancy state information, transfer the second service data stream to the second electronic device; The second electronic device transfers the second service data with the first electronic device, and the second electronic device disconnects the transfer of the first service data with the third electronic device.
2. The method according to claim 1, characterized in that: Before the second electronic device disconnects the flow of the first service data with the third electronic device, the method further includes: The first electronic device sends a first module occupation status update indication to the second electronic device, which is used to indicate that the first electronic device has occupied the first module of the second electronic device; The second electronic device updates the first occupancy state information of the first module of the second electronic device to third occupancy state information in response to the first module occupancy state update indication, wherein the third occupancy state information is used to indicate that the first module of the second electronic device is occupied; The second electronic device updates the fourth occupancy status information of the second module of the second electronic device to the fifth occupancy status information, wherein the fourth occupancy status information is used to indicate that the second module of the second electronic device is occupied, and the fifth occupancy status information is used to indicate that the second module of the second electronic device is not occupied; wherein the second module is used to process the first business data.
3. The method according to claim 2, characterized in that The second electronic device disconnects the flow of the first service data between the second electronic device and the third electronic device, including: The second electronic device determines, based on a change in the occupation status information of the second module of the second electronic device, that the second module is preempted; The second electronic device sends a service flow disconnection indication to the third electronic device, where the service flow disconnection indication is used to indicate disconnection of the flow of the first service data.
4. The method according to claim 2, characterized in that: After the second electronic device and the first electronic device transfer the second service data, the method further includes: The first electronic device updates the second occupancy state information of the first module of the first electronic device to sixth occupancy state information, where the sixth occupancy state information is used to indicate that the first module of the first electronic device is occupied; The first electronic device updates the locally cached first occupancy state information of the first module of the second electronic device to seventh occupancy state information, where the seventh occupancy state information is used to indicate that the first module of the second electronic device is occupied.
5. The method according to claim 4, characterized in that The method further comprises: The first electronic device receives a second user operation, where the second user operation is used to instruct to transfer another second service data stream to the second electronic device; The first electronic device determines, based on the seventh occupancy status information, that the first module of the second electronic device is occupied, and stops the flow operation of the another second service data.
6. The method according to claim 4, characterized in that The first electronic device acquires first occupancy state information of a first module of the second electronic device, including: The first electronic device also acquires the fourth occupancy state information of the second module of the second electronic device; Before the first electronic device receives the first user operation, the method further includes: The first electronic device receives a third user operation, where the third user operation is used to instruct to transfer another first service data stream to the second electronic device; The first electronic device determines, based on the fourth occupancy status information, that the second module of the second electronic device is occupied, and stops the flow operation of the another first service data.
7. The method according to claim 2, characterized in that After the first electronic device and the second electronic device complete the flow of the second service data, the method further includes: The first electronic device receives a fourth user operation, where the fourth user operation is used to instruct to transfer another first service data stream to the second electronic device; The first electronic device acquires the fifth occupancy state information of the second module of the second electronic device; When the first electronic device determines that the second module of the first electronic device is not occupied based on the eighth occupancy status information of the second module of the first electronic device, and when the first electronic device determines that the second module of the second electronic device is not occupied based on the fifth occupancy status information, the other first service flow is transferred to the second electronic device.
8. An electronic device, characterized in that: The electronic device, the second electronic device, and the third electronic device perform data exchange through a wireless connection, and the second electronic device and the third electronic device perform first service data flow, and the electronic device includes: One or more processors, memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: Acquire first occupancy status information of a first module of the second electronic device, where the first occupancy status information is used to indicate that the first module is not occupied, wherein the first module is used to process data of a second service, and a priority of the second service is higher than a priority of the first service; receiving a first user operation, where the first user operation is used to instruct to transfer a second service data flow to the second electronic device; When it is determined that the first module of the electronic device is not occupied based on the second occupancy status information of the first module of the electronic device, and when it is determined that the first module of the second electronic device is not occupied based on the first occupancy status information, the second business data is transferred to the second electronic device; and the second electronic device disconnects the flow of the first business data with the third electronic device.
9. The electronic device according to claim 8, characterized in that: When the computer program is executed by the one or more processors, the electronic device performs the following steps: A first module occupancy status update indication is sent to the second electronic device, indicating that the electronic device has occupied the first module of the second electronic device; so that the second electronic device updates the first occupancy status information of the first module of the second electronic device to third occupancy status information in response to the first module occupancy status update indication, and the third occupancy status information is used to indicate that the first module of the second electronic device is occupied; and the second electronic device updates the fourth occupancy status information of the second module of the second electronic device to fifth occupancy status information, the fourth occupancy status information is used to indicate that the second module of the second electronic device is occupied, and the fifth occupancy status information is used to indicate that the second module of the second electronic device is not occupied; wherein the second module is used to process the first business data.
10. The electronic device according to claim 9, characterized in that: When the computer program is executed by the one or more processors, the electronic device performs the following steps: updating the second occupancy state information of the first module of the electronic device to sixth occupancy state information, where the sixth occupancy state information is used to indicate that the first module of the electronic device is occupied; The locally cached first occupancy state information of the first module of the second electronic device is updated to seventh occupancy state information, where the seventh occupancy state information is used to indicate that the first module of the second electronic device is occupied.
11. The electronic device according to claim 10, characterized in that: When the computer program is executed by the one or more processors, the electronic device performs the following steps: receiving a second user operation, where the second user operation is used to instruct to transfer another second service data stream to the second electronic device; Based on the seventh occupancy status information, it is determined that the first module of the second electronic device is occupied, and the flow operation of the another second business data is stopped.
12. The electronic device according to claim 10, characterized in that: When the computer program is executed by the one or more processors, the electronic device performs the following steps: Acquire the fourth occupancy state information of the second module of the second electronic device; Before the electronic device receives the first user operation, the electronic device receives a third user operation, where the third user operation is used to instruct to transfer another first service data stream to the second electronic device; Based on the fourth occupancy state information, it is determined that the second module of the second electronic device is occupied, and the flow operation of the another first service data is stopped.
13. The electronic device according to claim 9, characterized in that: When the computer program is executed by the one or more processors, the electronic device performs the following steps: receiving a fourth user operation, where the fourth user operation is used to instruct to transfer another first service data stream to the second electronic device; Acquire the fifth occupancy state information of the second module of the second electronic device; When it is determined that the second module of the electronic device is not occupied based on the eighth occupancy status information of the second module of the electronic device, and when it is determined that the second module of the second electronic device is not occupied based on the fifth occupancy status information, the other first service flow is transferred to the second electronic device.
14. A computer storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
15. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
16. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 7.