Call flow processing method and electronic equipment

By establishing audio channels and timely release of waiting threads in the trust network, the audio data transmission problem caused by the user's waiting threads not released when using the super incoming call function is solved, and the call transfer success rate and user experience are improved.

CN120166366AActive Publication Date: 2025-06-17HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311692116.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-06-17
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

In a trust network, when users use the super call function, they may have problems that the phone cannot transmit audio data normally with other devices due to the waiting thread not being released in time, which affects the call transfer success rate.

Method used

It provides a call flow processing method, which can establish an audio channel by responding to a call, obtain a session identifier, delete call information, and release waiting threads to ensure timely release of resources.

Benefits of technology

It effectively improves the success rate of call transfers for super incoming calls, improves the user experience, and ensures the normal progress of subsequent calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166366A_ABST
    Figure CN120166366A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a call flow processing method and electronic equipment, relates to the field of communication, can effectively improve the call transfer success rate of a super incoming call, and solves the problem that the call transfer success rate of the super incoming call is increased when a user continuously and quickly connects a call, hangs up and then connects the call in a super incoming call function process. And the problem that audio data cannot be normally transmitted with other equipment due to the fact that a waiting thread of the mobile phone is not released in time is solved. The method comprises the steps of establishing an audio channel between the electronic equipment and the collaborative equipment in response to connection of a call of the electronic equipment to the collaborative equipment; and in response to hanging up of the call, obtaining a session identifier corresponding to the call information. The call information is used for indicating audio hardware information occupied by the call and opposite-end equipment information of the call. The session identifier is used for indicating the session in the process of connecting the call to the collaborative device. And when the session identifier is valid, deleting the call information, and releasing the waiting thread. Wherein the session identifier is effective to indicate that the session is in progress. The waiting thread refers to resources occupied by the session.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of communications, and in particular, to a call process handling method and an electronic device. Background Art

[0002] With the continuous development of electronic technology, the types and quantities of electronic devices owned by users are increasing. For example, a user can own three electronic devices such as a mobile phone, a tablet, and a personal computer at the same time. In some scenarios, multiple electronic devices owned by a user can form a trusted network so that the electronic devices other than the mobile phone in the trusted network can share the communication capabilities of the mobile phone. For example, after a trusted network is formed among the user's mobile phone, tablet, and personal computer, the user can answer incoming calls on the mobile phone on the tablet and the personal computer, and can also make calls through the mobile phone on the tablet and the personal computer.

[0003] However, when making a call through a mobile phone or answering an incoming call on a mobile phone on an electronic device in the trusted network, there may be a problem that the call sound cannot be transferred to the electronic device. Summary of the Invention

[0004] A call process handling method and an electronic device provided by embodiments of the present application can effectively improve the call transfer success rate of super incoming calls, and solve the problem that when the user continuously and quickly answers a call, hangs up the call, and then answers the call during the use of the super incoming call function, the mobile phone cannot normally transmit audio data to other devices due to the waiting thread not being released in time.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions.

[0006] In a first aspect, a call process handling method is provided, which is applied to an audio hardware abstraction layer in an electronic device. The method includes: in response to a call of the electronic device being connected to a collaborative device, establishing an audio channel with the collaborative device; the audio channel is used to transmit audio data in the call; the collaborative device and the electronic device are in the same trusted ring. In response to the call being hung up, obtaining a session identifier corresponding to the call information. The call information is used to indicate the audio hardware information occupied by the call and the peer device information of the call. The session identifier is used to indicate the session during the process of the call being connected to the collaborative device. The peer device refers to the device that makes a call with the electronic device. When the session identifier is valid, deleting the call information and releasing the waiting thread. Wherein, the session identifier being valid indicates that the session is in progress. The waiting thread refers to the resources occupied by the session.

[0007] Based on this solution, the electronic device will clean up the waiting threads in the call immediately after the call is hung up, thus avoiding the problem that when the user uses the super call function, continuously and quickly answering the call, hanging up the call, and then answering the call again, the mobile phone cannot transmit audio data normally with other devices due to the waiting threads not being released in time. This is beneficial to improving the call transfer success rate of the super call and enhancing the user experience.

[0008] In a possible implementation, when the session identifier is valid, delete the call information and release the waiting threads, including: when the session identifier is valid, delete the call information and generate a simulated success instruction. The simulated success instruction is used to simulate an instruction indicating the successful establishment of any channel or the successful configuration of any channel parameter in the audio channel corresponding to the call. The audio channel at least includes a control channel, a downlink data channel, and an uplink data channel. The channel parameters in the audio channel at least include: the configuration parameters of the downlink data channel and the configuration parameters of the uplink data channel. Release the waiting threads based on the simulated success instruction. Based on this solution, the purpose of releasing the waiting threads can be achieved with relatively small resource consumption.

[0009] In a possible implementation, after releasing the waiting threads, the method further includes: sending a call cancellation instruction to the audio virtualization module of the electronic device to instruct the audio virtualization module not to forward the instructions corresponding to the call. The instructions corresponding to the call include an instruction indicating the successful establishment of any channel or the successful configuration of any channel parameter in the audio channel corresponding to the call. The audio channel at least includes a control channel, a downlink data channel, and an uplink data channel. The channel parameters in the audio channel at least include: the configuration parameters of the downlink data channel and the configuration parameters of the uplink data channel. Based on this solution, it is possible to avoid the invalid transmission of instructions after the call is cancelled, which is beneficial to improving the instruction transmission efficiency.

[0010] In a possible implementation, the session during the process of the call of the electronic device being continued to the collaborative device at least includes: a session for establishing a control channel, a session for establishing a downlink data channel, a session for establishing an uplink channel, a session for configuring the downlink data channel parameters, and a session for configuring the uplink data channel parameters.

[0011] In a possible implementation, the method further includes: when the session identifier is invalid, delete the call information. The invalid session identifier indicates that the session has ended.

[0012] In a possible implementation, when the session identifier is valid, the method further includes: unload the driver occupied by the session.

[0013] In a possible implementation, the session identifier includes a field indicating whether the session is valid. When the session identifier is valid, delete the call information and release the waiting threads, including: when the field indicates that the session identifier is valid, delete the call information and release the waiting threads.

[0014] In one possible implementation, the call hang-up is any of the following: receiving a call cancellation instruction; receiving an indication to delete call information.

[0015] In a second aspect, an electronic device is provided. The electronic device includes one or more processors, one or more memories, and an audio hardware abstraction layer. The one or more memories are coupled to the one or more processors, the audio hardware abstraction layer is coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the electronic device is caused to execute the call flow processing method as in the first aspect.

[0016] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes computer instructions that, when run, execute the call flow processing method as in any one of the first aspect.

[0017] In a fourth aspect, a chip system is provided. The chip includes a processing circuit and an interface. The processing circuit is configured to call and run a computer program stored in a storage medium to execute the call flow processing method as in any one of the first aspect.

[0018] In a fifth aspect, a computer program product is provided. The computer program product includes instructions that, when the computer program product runs on a computer, cause the computer to execute the call flow processing method as in any one of the first aspect according to the instructions.

[0019] It should be understood that for the technical solutions provided in the above second aspect, third aspect, fourth aspect, and fifth aspect, their technical features can all correspond to the call flow processing method provided in the first aspect and its possible designs. Therefore, the beneficial effects that can be achieved are similar and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0021] Figure 2 It is a schematic software architecture diagram of an electronic device provided by an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of an audio channel establishment process provided by an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a call flow provided by an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of another call flow provided by an embodiment of the present application;

[0025] Figure 6 It is a flowchart of a call flow processing method provided by an embodiment of the present application;

[0026] Figure 7 It is a flowchart of another call flow processing method provided by an embodiment of the present application;

[0027] Figure 8 It is a schematic diagram of the composition of a chip system provided by an embodiment of the present application. Detailed implementation manners

[0028] In the embodiments of the present application, "first", "second", "third", etc. are used to distinguish different objects, rather than to limit a specific order. In addition, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present related concepts in a specific manner.

[0029] To facilitate the understanding of the embodiments of the present application, the application background of the embodiments of the present application is introduced below first.

[0030] With the development of communication technologies, multiple electronic devices can form a trust network and work together based on the trust network. Among them, the trust network may include multiple electronic devices such as mobile phones, tablets, personal computers, smart screens, watches, etc., and the electronic devices are connected in trust. In some possible implementation manners, the trust network may also be referred to as a collaborative network, a trust ring, a MagicRing trust ring, etc.

[0031] In the embodiments of the present application, for the electronic devices to form a trust network, the following conditions need to be met simultaneously for each electronic device:

[0032] Condition 1: The electronic devices communicate and connect through an NFC (near field communication) network or the same Wi-Fi (Wireless Fidelity).

[0033] When communicating and connecting through a near field communication network or the same Wi-Fi, the network latency for the electronic devices to work together is lower and the collaborative efficiency is higher.

[0034] Condition 2: The system accounts logged in by the electronic devices are the same.

[0035] In an embodiment of the present application, the system account can be an account provided by the operating system of an electronic device. For example, the operating systems of electronic device A and electronic device B are both operating system S, and the account provided by this operating system S is the system account. Among them, the account provided by operating system S can be an account registered by the user on the cloud server of operating system S.

[0036] It should be noted that the operating system S of the above-mentioned electronic device A and the operating system S of electronic device B can be of the same version or different versions. That is to say, the version numbers of the operating system S of electronic device A and the operating system S of operating system B can be different.

[0037] In addition, in an embodiment of the present application, the operating system of the electronic device can be an operating system independently developed by the electronic device manufacturer, or an operating system developed by the electronic device manufacturer based on the kernel of an existing operating system (such as ).

[0038] It should be understood that for multiple electronic devices connected through the NFC network or the same Wi-Fi, a trusted network can be established after verifying that the logged-in system accounts are the same.

[0039] Electronic devices in the same trusted network have a call synchronization function, which can also be called super call in an embodiment of the present application. Exemplarily, the trusted network includes three electronic devices such as a mobile phone, a tablet, and a personal computer. When the mobile phone receives an incoming call, the tablet and the personal computer will synchronously give an incoming call notification, such as vibration, ringing, and displaying an incoming call notification interface. The user can answer the incoming call on the mobile phone on the tablet or the personal computer. Similarly, the user can also make a call through the mobile phone on the tablet or the personal computer.

[0040] However, in actual applications, when the user quickly hangs up after making a call through the mobile phone or answering an incoming call on the mobile phone on an electronic device other than the mobile phone in the trusted network, and then makes a call through the mobile phone or answers an incoming call on the mobile phone on an electronic device other than the mobile phone in the trusted network, the call sound may not be transferred from the mobile phone to the electronic device making the call or answering the incoming call, resulting in the user being unable to make a normal call and affecting the user's communication experience.

[0041] To solve the above problems, an embodiment of the present application provides a call process processing method and an electronic device, which can timely release the thread resources between the mobile phone and the electronic device making the call or answering the incoming call when the user hangs up the phone, so as to ensure that the subsequent call can be normally transferred to the electronic device making the call or answering the incoming call.

[0042] The call flow processing method provided by the embodiments of this application is applied to an electronic device with communication functions in a trusted network. Among them, the electronic device includes but is not limited to mobile phones, smart watches, tablets, personal computers, in-vehicle devices, etc.

[0043] As an example, please refer to Figure 1 , which is a schematic structural diagram of an electronic device 100 provided by the embodiments of this application. The call flow processing method provided by the embodiments of this application can be applied to an electronic device 100 as shown in Figure 1 .

[0044] As shown in Figure 1 , the electronic device 100 may include a processor 101, a communication module 102, a display screen 103, an internal memory 104, an audio module 105, a subscriber identification module (SIM) card interface 106, etc.

[0045] Among them, the processor 101 may include one or more processing units. For example, the processor 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors 101.

[0046] The electronic device 100 realizes the display function through the GPU, the display screen 103, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 103 and the application processor. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information.

[0047] The display screen 103 is used to display images, video streams, etc.

[0048] The communication module 102 may include a mobile communication module 102A and a wireless communication module 102B. The wireless communication function of the electronic device 100 can be realized through the mobile communication module 102A, the wireless communication module 102B, the modem processor, and the baseband processor, etc.

[0049] The mobile communication module 102A can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 102A may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. In some embodiments, at least some functional modules of the mobile communication module 102A may be disposed in the processor 101. In some embodiments, at least some functional modules of the mobile communication module 102A and at least some modules of the processor 101 may be disposed in the same device.

[0050] The wireless communication module 102B can provide solutions for wireless communications such as wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 102B may be one or more devices integrating at least one communication processing module.

[0051] In some embodiments, the mobile communication module 102A and the wireless communication module 102B of the electronic device 100 enable the electronic device 100 to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies 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 technologies, etc.

[0052] The internal memory 104 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 104. Exemplarily, the internal memory 104 can also store one or more computer programs corresponding to the call flow processing method provided in the embodiments of the present application. When the processor 101 executes these computer programs, the call flow processing method provided in the embodiments of the present application can be implemented.

[0053] The audio module 106 can be used to receive sound information or play sound. The audio module 106 can include, but is not limited to, a microphone, a speaker, etc.

[0054] The electronic device 100 can implement audio functions through the audio module 106 and the application processor, etc. For example, music playback, recording, calls with other electronic devices, etc.

[0055] The SIM card interface 106 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface to achieve contact and separation from the electronic device 100. The SIM card interface can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The electronic device 100 interacts with the network through the SIM card to achieve functions such as calls and data communication.

[0056] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0057] The above Figure 1 introduces the hardware structure of the electronic device provided in the embodiments of the present application. Next, taking the system of the layered architecture as an example, the software architecture of the electronic device provided in the embodiments of the present application is exemplarily described.

[0058] Please refer to Figure 2 , which is a schematic diagram of the software architecture of an electronic device provided in the embodiments of the present application. As Figure 2 shown, the software architecture of the electronic device in the embodiments of the present application can be divided into an application layer 201, a service layer 202, a device connection layer 203, a device virtualization layer 204, a hardware abstraction layer (HAL) 205, and a hardware layer 206.

[0059] As Figure 2As shown, the application layer 201 may include application programs such as an Incall UI program and a contacts application. Exemplarily, when the electronic device receives an incoming call, it may start the Incall UI program to display an incoming call interface to prompt the user to answer the call.

[0060] The service layer 202 is used to provide application programming interfaces (APIs) and programming frameworks for the application programs in the application layer 201. The service layer includes some predefined functions.

[0061] Among them, the programming framework may include the Telecom AOSP (Android Open - Source Project) call framework. Among them, the Telecom AOSP call framework can be used to manage audio and video calls of the electronic device, such as calls based on the SIM (Subscriber Identity Module).

[0062] In addition, the service layer 202 may also include APIs for calling Telephony cellular call services, APIs for calling Profile information services, APIs for calling call continuation services, and APIs for calling the super terminal control center. In this way, the installed application programs can call the corresponding APIs or programming frameworks from the service layer according to actual business needs to implement the services required by the business. Among them, the API for call continuation services is used to continue the call in the electronic device 200 to other electronic devices. For example, when the trusted network includes a mobile phone and a tablet, the incoming call received by the mobile phone can be continued to the tablet through the API for call continuation services.

[0063] The device connection layer 203 includes a data transmission module, a connection management module, etc. Among them, the data transmission module is used to transmit data between the electronic device 200 and other devices. The connection management module is used to manage the devices connected to the electronic device 200.

[0064] The device virtualization layer 204 can virtualize modules that implement specific functions on the basis of hardware modules. For example, the device virtualization layer may include an audio virtualization module. The audio virtualization module is used to virtualize the module that implements the audio function.

[0065] The hardware abstraction layer 205 provides HALs corresponding to different hardware modules. For example, Audio HAL, Camera HAL (not shown in the figure) Figure 2 and so on. In this way, each HAL can drive the corresponding hardware module to implement the functions corresponding to the hardware module.

[0066] Exemplarily, the hardware layer 206 includes multiple types of hardware modules, and different hardware modules can implement different functions. For example, the hardware layer 206 includes a modem, an audio module, and an audio digital signal processor (ADSP). Among them, the modem is used for the conversion between digital signals and analog signals. The audio module can be hardware such as a speaker, a receiver, a stereo, a HiFi (high-fidelity) stereo, etc. The audio digital signal processor is used to process audio signals.

[0067] It should be noted that the layering of the software architecture of the electronic device in the embodiments of the present application described above is only exemplary, and other methods can also be used to layer the software architecture of the electronic device. The present application does not make any limitations in this regard.

[0068] For an electronic device without communication capabilities in a trusted network, its software architecture is similar to the above. Figure 2 The difference is that an electronic device without communication capabilities does not include call modules such as the Telecom AOSP call framework and the Telephony cellular call service.

[0069] When an electronic device without communication capabilities and an electronic device with communication capabilities are in the same trusted network, the electronic device without communication capabilities can share the communication capabilities of the electronic device with communication capabilities. For example, when a mobile phone and a tablet without communication capabilities are in the same trusted network, the tablet can share the communication capabilities of the mobile phone. In this way, the user can answer or reject calls on the mobile phone on the tablet, or make calls through the mobile phone on the tablet. Among them, an electronic device without communication capabilities can also be called a collaborative device.

[0070] For the convenience of description, in the following embodiments, an electronic device with communication capabilities in the trusted network is taken as a mobile phone, and an electronic device without communication capabilities is taken as a tablet for illustration. It should be understood that the mobile phone in the following embodiments can be replaced by any type of electronic device with communication capabilities, and the tablet can be replaced by any one or more different types of electronic devices, which will not be elaborated hereinafter.

[0071] Regarding the process of the tablet synchronously notifying an incoming call when the mobile phone receives an incoming call, reference can be made to the related technology, and this application will not elaborate on it. To illustrate the cause of the technical problem to be solved by the call flow processing method provided in the embodiments of this application, the following introduces the process after the user answers an incoming call on the mobile phone on the tablet or after the call made through the mobile phone on the tablet is connected. For ease of description, in the following embodiments, both the situation where the user answers an incoming call on the mobile phone on the tablet and the situation where the call made through the mobile phone on the tablet is connected are referred to as after the call is connected. In some possible implementation manners, after the call is connected may also refer to that the user answers an incoming call on the mobile phone and then migrates the incoming call to the tablet.

[0072] After the call is connected, an audio channel for transmitting audio data during the call needs to be established between the mobile phone and the tablet. Specifically, this audio channel is used to send the voice received by the mobile phone during the call to the tablet for the user to listen to; or to send the voice of the user received by the tablet to the mobile phone so that the mobile phone can send it to the other party of the call. In the embodiments of this application, the audio channel can at least include three channels: a control channel, a downlink data channel, and an uplink data channel. Among them, the control channel can be used to control parameters such as the volume of the audio. The downlink data channel is used to send the voice received by the mobile phone during the call to the tablet. The uplink data channel is used to send the voice of the user received by the tablet to the mobile phone.

[0073] Please refer to Figure 3 , which is a schematic diagram of the establishment process of an audio channel provided in the embodiments of this application. As Figure 3 shown, when the electronic device with communication capabilities in the trusted network is a mobile phone and the electronic device without communication capabilities is a tablet, after the call is connected, the establishment process of the audio channel can include the following steps.

[0074] S301. The call module in the mobile phone sends a virtual channel establishment instruction to the audio virtualization module.

[0075] Among them, the virtualization channel instruction is used to indicate the establishment of a channel for transmitting audio data between the mobile phone and the tablet, and this channel can be called a virtual channel or an audio channel. The call module is the Telecom AOSP call framework, Telephony cellular call service, etc. in Figure 2 .

[0076] S302. The audio virtualization module in the mobile phone responds to the received virtual channel establishment instruction and sends a call device switching instruction to the audio HAL.

[0077] Among them, the call device switching instruction can indicate the device during a call handover or indicate switching the call device from the mobile phone to other devices in the trusted network. The call device switching instruction may include the identity identifier of the other device. For example, in this embodiment, the other device may be a tablet or other device in the trusted network where the mobile phone is located.

[0078] The audio virtualization module and the audio HAL can refer to Figure 2 the relevant descriptions and will not be elaborated here.

[0079] It should be noted that when the mobile phone receives an incoming call, the electronic devices in the trusted network will synchronously give an incoming call notification. After the user answers the call on the tablet, the tablet will send an answered instruction to the audio virtualization module in the mobile phone. The answered instruction includes the identity identifier (identity, ID) of the answering device, that is, the identity identifier of the tablet. When the audio virtualization module in the mobile phone receives the virtual channel establishment instruction, it can send a call device switching instruction to the audio HAL according to the identity identifier of the answering device, and the call device switching instruction can include the identity identifier of the answering device.

[0080] S303. The audio HAL in the mobile phone generates a control channel establishment instruction according to the call device switching instruction.

[0081] Among them, the control channel establishment instruction can be used to instruct the tablet to establish a control channel between the audio virtualization module in the tablet and the audio HAL in the mobile phone.

[0082] Further optionally, after receiving the call device switching instruction, the audio HAL will store the ID of the answering device in the call device switching instruction, that is, the identity identifier of the above-mentioned tablet. In addition, when the audio HAL generates the control channel establishment instruction, the service for establishing the control channel starts, and the service information for establishing the control channel will be generated and stored in the audio HAL at the same time. In the embodiments of the present application, the service information refers to the information of the audio hardware occupied by establishing the audio channel. Among them, the audio hardware may include a receiver, a microphone, a speaker, and so on.

[0083] S304. The audio HAL in the mobile phone sends the control channel establishment instruction to the audio virtualization module in the mobile phone.

[0084] Correspondingly, the audio virtualization module in the mobile phone receives the instruction to establish a control channel. Further optionally, when the audio virtualization module in the mobile phone receives the instruction to establish a control channel sent by the audio HAL in the mobile phone, it generates an identity identifier (session id) of the control channel. On the one hand, the audio virtualization module in the mobile phone can return the identity identifier of the control channel to the audio HAL in the mobile phone. In this way, the audio HAL in the mobile phone stores at least three pieces of information: the identity identifier of the answering device, the service information, and the identity identifier of the control channel. On the other hand, the audio virtualization module in the mobile phone can also update the instruction to establish a control channel according to the identity identifier of the control channel, so that the audio virtualization module in the tablet establishes the control channel corresponding to the identity identifier of the control channel. Among them, updating the instruction to establish a control channel according to the identity identifier of the control channel may mean adding the identity identifier of the control channel to the instruction to establish a control channel.

[0085] S305. The audio virtualization module in the mobile phone sends the instruction to establish a control channel to the audio virtualization module in the tablet.

[0086] S306. The audio virtualization module in the tablet establishes a control channel between the audio virtualization module in the tablet and the audio HAL in the mobile phone according to the instruction to establish a control channel. The process of establishing a control channel between the audio virtualization module in the tablet and the audio HAL in the mobile phone can refer to the related technology, and this application does not make specific descriptions here.

[0087] As described above, the instruction to establish a control channel in S305 and S306 may be different from the instruction to establish a control channel in S304. For example, the instruction to establish a control channel in S305 and S306 may have one more piece of information, that is, the identity identifier of the control channel, compared with the instruction to establish a control channel in S304.

[0088] S307. After the control channel is successfully established, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0089] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0090] Optionally, the completion instruction can be used to indicate that the control channel is successfully established. The completion instruction can be a preset message instruction, and the message instruction may not include the specific content information of the completion. The completion instruction can include the information of successfully establishing the control channel.

[0091] S308. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0092] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0093] Optionally, after receiving the completion instruction, the audio virtualization module in the mobile phone will also check whether the service information is valid. Exemplarily, in the audio virtualization module, the service information can be marked by a service flag to indicate whether it is valid. When the call is not hung up, the audio virtualization module can set the service flag to true to indicate that the service information is valid. When the call is hung up, the audio virtualization module can mark the service flag as false to indicate that the service information is invalid. In the embodiments of the present application, the process of the audio virtualization module marking the service flag as false can also be referred to as service de - enabling.

[0094] In the embodiments of the present application, when the audio virtualization module in the mobile phone receives the completion instruction and determines that the service information corresponding to the completion instruction is valid, it will continue to execute the subsequent steps of establishing the audio channel. When it determines that the service information corresponding to the completion instruction is invalid, it will stop executing the steps of establishing the audio channel, that is, it will not send the completion instruction to the audio HAL in the mobile phone.

[0095] Further optionally, in response to the completion instruction, the audio HAL in the mobile phone unlocks the current thread in the audio HAL of the mobile phone, that is, the thread for establishing the control channel, and continues to execute subsequent steps, such as establishing a downlink data path, establishing an uplink data path, and other steps.

[0096] It should be noted that in the present application, steps such as establishing a control channel, establishing a downlink data path, and establishing an uplink data path in the audio HAL of the mobile phone are performed serially. Each step will lock the current thread until the completion instruction is received and then the current thread will be unlocked. Exemplarily, when the audio HAL in the mobile phone sends an instruction to establish a control path in S304, it locks the current thread and unlocks the current thread after receiving the completion instruction. During the locking period of the current thread, the audio HAL will not perform subsequent steps of establishing the audio channel.

[0097] In some possible implementation manners, the thread generated when initiating the process of establishing a control channel can be called a session. When the audio HAL in the mobile phone initiates the process of establishing a control channel, it will generate a session identifier (sessionid) corresponding to the session. When the audio HAL in the mobile phone initiates a session, it can set the session identifier to a valid state. When the audio HAL in the mobile phone receives the completion instruction, it can set the session identifier to an invalid state. On this basis, it should be understood that the audio HAL in the mobile phone stores at least four types of information, namely, the identity identifier of the receiving device, service information, the identity identifier of the control channel, and the session identifier. In the embodiments of the present application, locking a thread can refer to locking the resources occupied by the corresponding session, such as channel resources, hardware resources, etc. Unlocking or releasing a thread refers to releasing the resources occupied by the corresponding session.

[0098] In addition, the identity identifier, service information, and session identifier of the answering device stored in the audio HAL of the mobile phone are corresponding. That is to say, after determining the identity identifier and service information of the answering device, the session identifier corresponding to the identity identifier and service information of the answering device can be uniquely determined.

[0099] S309. The audio HAL in the mobile phone generates a downlink channel establishment instruction in response to receiving a completion instruction.

[0100] This downlink channel establishment instruction is used to instruct the tablet to establish a downlink data channel between the audio virtualization module of the tablet and the audio HAL in the mobile phone.

[0101] S310. The audio HAL in the mobile phone sends the downlink channel establishment instruction to the audio virtualization module in the mobile phone.

[0102] Correspondingly, the audio virtualization module in the mobile phone receives the downlink channel establishment instruction.

[0103] S311. The audio virtualization module in the mobile phone sends the downlink channel establishment instruction to the audio virtualization module in the tablet.

[0104] Similar to the description in S305 above, when the audio virtualization module in the mobile phone receives the downlink channel establishment instruction, it will generate an identity identifier for the downlink data channel. On the one hand, the audio virtualization module in the mobile phone will return the identity identifier of the downlink data channel to the audio HAL in the mobile phone. In this way, the audio HAL in the mobile phone stores at least four types of information: the identity identifier of the answering device, service information, the identity identifier of the downlink data channel, and the session identifier. On the other hand, it will update the downlink channel establishment instruction according to the identity identifier of the downlink data channel, so that the audio virtualization module in the tablet can establish the downlink data channel corresponding to the identity identifier of the downlink data channel. Among them, updating the downlink channel establishment instruction according to the identity identifier of the downlink data channel may refer to adding the identity identifier of the downlink data channel to the downlink channel establishment instruction.

[0105] S312. The audio virtualization module in the tablet establishes a downlink data channel between the audio virtualization module of the tablet and the audio HAL of the mobile phone according to the downlink channel establishment instruction.

[0106] S313. After successfully establishing the downlink data channel, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0107] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0108] S314. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0109] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0110] S315. In response to receiving the completion instruction, the audio HAL in the mobile phone generates an instruction for configuring downlink channel parameters.

[0111] This instruction for configuring downlink channel parameters is used to instruct the audio virtualization module of the tablet to configure audio parameters such as frequency for the downlink data channel.

[0112] In addition, it should be noted that similar to the description in S307 above, the audio HAL in the mobile phone locks the current thread when sending the instruction to establish the downlink channel in S310, and will not unlock the current thread until it receives the completion instruction.

[0113] S316. The audio HAL in the mobile phone sends the instruction for configuring downlink channel parameters to the audio virtualization module in the mobile phone.

[0114] Correspondingly, the audio virtualization module in the mobile phone receives the instruction for configuring downlink channel parameters.

[0115] S317. The audio virtualization module in the mobile phone sends the instruction for configuring downlink channel parameters to the audio virtualization module in the tablet.

[0116] Correspondingly, the audio virtualization module in the tablet receives the instruction for configuring downlink channel parameters.

[0117] S318. The audio virtualization module in the tablet configures audio parameters for the downlink data channel according to the instruction for configuring downlink channel parameters.

[0118] S319. After successfully configuring audio parameters for the downlink data channel, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0119] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0120] S320. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0121] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0122] S321. In response to receiving the completion instruction, the audio HAL in the mobile phone generates an instruction to establish an uplink channel.

[0123] This instruction to establish an uplink channel is used to instruct the tablet to establish an uplink data channel between the audio virtualization module of the tablet and the audio HAL in the mobile phone.

[0124] Similar to the description in S307 above, when the audio HAL in the mobile phone sends an instruction to configure the downlink channel parameters in S316, it locks the current thread and will not unlock the current thread until it receives a completion instruction.

[0125] It should be noted that during the process of establishing the downlink data channel, the control channel established in the foregoing S303 to S308 may become invalid. Therefore, between S320 and S321, the audio HAL in the mobile phone can also execute the step of determining whether the control channel exists. If the audio HAL in the mobile phone can determine that the control channel already exists, it executes S321; if the audio HAL in the mobile phone determines that the control channel does not exist, it can establish the control channel through the same steps as in the foregoing S303 to S308, which will not be elaborated in this application.

[0126] S322. The audio HAL in the mobile phone sends an instruction to establish an uplink channel to the audio virtualization module in the mobile phone.

[0127] Correspondingly, the audio virtualization module in the mobile phone receives the instruction to establish an uplink channel.

[0128] S323. The audio virtualization module in the mobile phone sends the instruction to establish an uplink channel to the audio virtualization module in the tablet.

[0129] Correspondingly, the audio virtualization module in the tablet receives the instruction to establish an uplink channel. Similar to the description in S305 above, when the audio virtualization module in the mobile phone receives the uplink channel instruction, it generates an identity identifier for the uplink data channel. On the one hand, the audio virtualization module in the mobile phone returns the identity identifier of the uplink data channel to the audio HAL in the mobile phone. In this way, the audio HAL in the mobile phone stores at least four types of information: the identity identifier of the receiving device, service information, the identity identifier of the uplink data channel, and the session identifier. On the other hand, it updates the instruction to establish an uplink channel according to the identity identifier of the uplink data channel, so that the audio virtualization module in the tablet establishes the uplink data channel corresponding to the identity identifier of the uplink data channel.

[0130] S324. The audio virtualization module in the tablet establishes an uplink data channel between the audio virtualization module in the tablet and the audio HAL in the mobile phone according to the instruction to establish an uplink channel.

[0131] S325. After successfully establishing the uplink data channel, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0132] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0133] S326. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0134] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0135] S327. In response to receiving the completion instruction, the audio HAL in the mobile phone generates an instruction for configuring the uplink channel parameters.

[0136] This instruction for configuring the uplink channel parameters is used to instruct the audio virtualization module of the tablet to configure audio parameters such as frequency for the uplink data channel.

[0137] Similar to the description in S307 above, when the audio HAL in the mobile phone sends the instruction to establish the uplink channel in S322, it locks the current thread and will not unlock the current thread until it receives the completion instruction.

[0138] S328. The audio HAL in the mobile phone sends the instruction for configuring the uplink channel parameters to the audio virtualization module in the mobile phone.

[0139] Correspondingly, the audio virtualization module in the mobile phone receives the instruction for configuring the uplink channel parameters.

[0140] S329. The audio virtualization module in the mobile phone sends the instruction for configuring the uplink channel parameters to the audio virtualization module in the tablet.

[0141] Correspondingly, the audio virtualization module in the tablet receives the instruction for configuring the uplink channel parameters.

[0142] S330. The audio virtualization module in the tablet configures audio parameters for the uplink data channel according to the instruction for configuring the uplink channel parameters.

[0143] S331. After successfully configuring the audio parameters for the uplink data channel, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0144] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0145] S332. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0146] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0147] Similar to the description in S307 above, when the audio HAL in the mobile phone sends the instruction for configuring the uplink channel parameters in S327, it locks the current thread and will not unlock the current thread until it receives the completion instruction. It can be seen that in the above process of establishing the audio path, the completion instructions in each step can be the same. In the embodiments of the present application, after the thread is locked, it can also be called a waiting thread, and unlocking a thread in a locked state can also be called releasing the waiting thread.

[0148] From the perspective of the session, the above process can be summarized as follows: when the audio HAL in the mobile phone initiates the process of establishing a control channel, it generates a session identifier a and sets the session identifier a to the valid state. When receiving the completion instruction, the audio HAL in the mobile phone sets the session identifier a to the invalid state and releases the resources occupied by the session corresponding to the session identifier a (i.e., unlocks the waiting thread). When the audio HAL in the mobile phone initiates the process of establishing a downlink data channel, it generates a session identifier b and sets the session identifier b to the valid state. When receiving the completion instruction, the audio HAL in the mobile phone sets the session identifier b to the invalid state and releases the resources occupied by the session corresponding to the session identifier b. The processes of configuring the parameters of the downlink data channel, establishing the uplink data channel, and configuring the parameters of the uplink data channel are the same and will not be elaborated here.

[0149] In this way, an audio channel capable of transmitting audio data during a call can be established between the mobile phone and the tablet. After the audio channel is successfully established, the user can answer the voice received by the mobile phone on the tablet or send voice to the other party of the mobile phone call through the tablet.

[0150] It should be noted that the above instruction transmission between the mobile phone and the tablet can be Figure 2 implemented by the data transmission module in the device connection layer 203 in Figure 3 (not shown in the figure).

[0151] Based on the above description, it can be seen that after the call is connected, it takes a period of time to establish the audio channel before the audio data during the call can be transmitted between the tablet and the mobile phone.

[0152] If the user hangs up the phone before the establishment of the audio channel and then receives an incoming call and answers the call, there may be a problem that the audio data cannot be normally transmitted between the mobile phone and the tablet, that is, the audio channel may not be normally established between the mobile phone and the tablet. Taking the user hanging up the phone after S305 and before S308 and then answering the call as an example, the reason for this problem will be described below. It should be noted that hanging up the phone here can refer to hanging up the phone on the mobile phone, or hanging up the phone on any electronic device in the tablet or the trusted network. Answering the call here refers to answering the incoming call received by the mobile phone on the tablet, or answering the call made through the mobile phone on the tablet, or transferring the call answered on the mobile phone to the tablet. The embodiments of the present application do not make specific limitations on this.

[0153] In addition, in the call answered by the mobile phone for the second time (i.e., the above-mentioned answering the call again) in the embodiments of the present application, the peer device can be the device of the previous call or other devices, and the present application does not make a limitation on this.

[0154] Please refer to Figure 4, which is a schematic diagram of a call process provided by an embodiment of the present application. As Figure 4 shown, when the call is hung up, the audio virtualization module in the mobile phone has sent a control path establishment instruction to the audio virtualization module of the tablet, and has not received the completion instruction sent by the audio virtualization module of the tablet. The subsequent call process may include the following steps.

[0155] S401. The call module of the mobile phone sends a call cancellation instruction to the audio HAL of the mobile phone.

[0156] Among them, the call cancellation instruction is used to indicate that the call has been hung up. Among them, the call may refer to the phone in the foregoing embodiment.

[0157] Correspondingly, the audio HAL of the mobile phone receives the call cancellation instruction.

[0158] S402. The audio HAL of the mobile phone deletes the stored device information and service information according to the call cancellation instruction.

[0159] Among them, the device information may include the identity identifier of the answering device in the foregoing embodiment. The service information may refer to the service information for establishing an audio channel in the foregoing embodiment. In some possible implementation manners, the audio HAL may also unload the loaded driver module for the call when receiving the call instruction.

[0160] S403. The audio HAL in the mobile phone sends the call cancellation instruction to the audio virtualization module in the mobile phone.

[0161] Correspondingly, the audio virtualization module in the mobile phone receives the call cancellation instruction.

[0162] S404. The audio virtualization module in the mobile phone sets the service flag to false.

[0163] As described in the foregoing embodiment, the audio virtualization module identifies whether the service information is valid through the service flag, which will not be elaborated here.

[0164] It should be understood that after the audio virtualization module in the mobile phone sets the service flag to false, when receiving the completion instruction sent in S307, since the service flag indicates that the establishment service of the corresponding audio channel has failed, the audio virtualization module in the mobile phone will not send the completion instruction to the audio HAL in the mobile phone.

[0165] However, as described in the foregoing embodiment, when the audio HAL in the mobile phone executes the establishment control path instruction sent in S304, it will lock the current thread. When the completion instruction is not received, the audio HAL in the mobile phone will always be in a locked state. At this time, the user makes a call again, and the subsequent call process is as follows.

[0166] S405. The mobile phone establishes a control channel with the tablet.

[0167] For the specific process of establishing the control channel, reference can be made to the relevant descriptions in S303 - S308 in the foregoing embodiments. However, it should be particularly noted that during the process of establishing the control channel, when the audio HAL in the mobile phone receives the completion instruction, it will preferentially unlock the thread locked when sending the instruction to establish the control path in Figure 4 S304.

[0168] Please refer to Figure 5 , which is a schematic diagram of another call process provided by the embodiments of the present application. As Figure 5 shown, after the call is connected again, the call process may include the following steps.

[0169] S501. The call module in the mobile phone sends an instruction to establish a virtual channel to the audio virtualization module.

[0170] Correspondingly, the audio virtualization module in the mobile phone receives the virtual channel instruction.

[0171] S502. In response to receiving the instruction to establish a virtual channel, the audio virtualization module in the mobile phone sends an instruction to switch the call device to the audio HAL.

[0172] Correspondingly, the audio HAL in the mobile phone receives the virtual channel instruction.

[0173] S503. The audio HAL in the mobile phone generates an instruction to establish a control channel according to the instruction to switch the call device.

[0174] S504. The audio HAL in the mobile phone sends the instruction to establish a control channel to the audio virtualization module in the mobile phone.

[0175] Correspondingly, the audio virtualization module in the mobile phone receives the instruction to establish a control channel.

[0176] S505. The audio virtualization module in the mobile phone sends the instruction to establish a control channel to the audio virtualization module in the tablet.

[0177] Correspondingly, the audio virtualization module in the tablet receives the instruction to establish a control channel.

[0178] S506. The audio virtualization module in the tablet establishes a control channel between the audio virtualization module of the tablet and the audio HAL of the mobile phone according to the instruction to establish a control channel.

[0179] S507. After the control channel is successfully established, the audio virtualization module in the tablet sends a completion instruction to the audio virtualization module in the mobile phone.

[0180] Correspondingly, the audio virtualization module in the mobile phone receives the completion instruction.

[0181] S508. The audio virtualization module in the mobile phone sends the completion instruction to the audio HAL in the mobile phone.

[0182] Correspondingly, the audio HAL in the mobile phone receives the completion instruction.

[0183] It should be noted that after receiving the completion instruction, the audio HAL in the mobile phone unlocks the thread locked at S304 according to the completion instruction. Thus, the thread locked in S504 remains locked.

[0184] Then, the mobile phone and the tablet will perform the process of establishing a downlink data channel.

[0185] S406. Establish a downlink data channel.

[0186] The process of establishing a downlink data channel can refer to the relevant descriptions in S309 - S314 and will not be elaborated here.

[0187] It should be understood that when the audio HAL in the mobile phone receives the completion instruction corresponding to the successful establishment of the downlink data channel, it unlocks the thread locked in S504 based on the completion instruction. Thus, the thread locked when the audio HAL in the mobile phone sends the downlink channel establishment instruction remains unlocked and is in a locked state.

[0188] S407. Configure the parameters of the downlink data channel.

[0189] The process of configuring the parameters of the downlink data channel can refer to the relevant descriptions in S315 - S320 and will not be elaborated here.

[0190] It should be understood that when the audio HAL in the mobile phone receives the completion instruction corresponding to the successful configuration of the parameters of the downlink data channel, it unlocks the thread locked when sending the downlink channel establishment instruction based on the completion instruction. Thus, the thread locked when the audio HAL in the mobile phone sends the downlink channel parameter configuration instruction remains unlocked and is in a locked state.

[0191] S408. Establish an uplink data channel.

[0192] The process of configuring the uplink data channel can refer to the relevant descriptions in S321 - S326 and will not be elaborated here.

[0193] It should be understood that when the audio HAL in the mobile phone receives the completion instruction corresponding to the successful establishment of the uplink data channel, it unlocks the thread locked when sending the downlink channel parameter configuration instruction based on the completion instruction. Thus, the thread locked when the audio HAL in the mobile phone sends the uplink channel establishment instruction remains unlocked and is in a locked state.

[0194] S409. Configure the parameters of the uplink data channel.

[0195] The process of configuring the parameters of the uplink data channel can refer to the relevant descriptions in S327 - S332 and will not be elaborated here.

[0196] It should be understood that when the audio HAL in the mobile phone receives the completion instruction corresponding to the successful configuration of the parameters of the uplink data channel, it will unlock the thread locked when sending the instruction to establish the uplink channel based on this completion instruction. Thus, the thread locked by the audio HAL in the mobile phone when sending the instruction to configure the uplink channel parameters remains unlocked and is in a locked state.

[0197] The audio HAL in the mobile phone will continuously wait for the completion instruction to unlock the thread locked when sending the instruction to configure the uplink channel parameters. However, since the process of establishing the audio channel has been completed, the audio HAL in the mobile phone will not receive the completion instruction again, and this waiting will time out (for example, if the completion instruction is not received within 10s, it is determined that the waiting times out), resulting in the failure of the process of establishing the audio channel between the mobile phone and the tablet, that is, the audio data cannot be normally transmitted between the mobile phone and the tablet.

[0198] From the perspective of the session, the above process can be summarized as follows: when the audio HAL in the mobile phone initiates the process of establishing the control channel, it will generate a session identifier a and set this session identifier a to the valid state. At this time, the call is hung up and then connected again. The audio HAL in the mobile phone initiates a new process of establishing the control channel, generates a new session identifier c, and sets this session identifier c to the valid state. When receiving the completion instruction, the audio HAL in the mobile phone will set the session identifier a (instead of the session identifier c) to the invalid state based on this completion instruction. That is to say, the audio HAL in the mobile phone will unlock the waiting thread in the previous call based on the first completion instruction in this call, and there is an offset between the completion instruction and the waiting thread. Thus, the session identifier d generated when the audio HAL in the mobile phone initiates the process of configuring the parameters of the uplink data channel will always be in the valid state, and the waiting thread generated when initiating the process of configuring the parameters of the uplink data channel has no completion instruction to unlock. Therefore, the session corresponding to the session identifier d cannot be completed, resulting in the failure of the process of establishing the audio channel between the mobile phone and the tablet, that is, the audio data cannot be normally transmitted between the mobile phone and the tablet.

[0199] The above is the reason why the audio data cannot be normally transmitted between the mobile phone and the tablet when the user continuously and quickly answers the call, hangs up the call, and then answers the call on the tablet. Based on the above analysis, a call process processing method provided by an embodiment of the present application can timely release all relevant resources and threads when the user hangs up the call to ensure the normal progress of subsequent calls.

[0200] It should be noted that the call flow processing method provided in the embodiments of this application can be applied to the audio HAL in a mobile phone. In other words, the execution subject of the call flow processing method provided in the embodiments of this application can be the audio HAL in a mobile phone.

[0201] Please refer to Figure 6 , which is a flowchart of a call flow processing method provided in the embodiments of this application. As Figure 6 shown, the method includes the following steps.

[0202] S601. In response to a call hangup, obtain the session identifier corresponding to the call information.

[0203] Among them, the call information may include the device information and service information in the foregoing embodiments. As described in the foregoing embodiments, the device information, service information, and session identifier in the audio HAL are in one-to-one correspondence. In the communication field, this session identifier may also be referred to as sessionid. For the description of the device information, service information, and session identifier, reference may be made to the foregoing embodiments, and details are not described herein again.

[0204] In addition, in the embodiments of this application, the audio HAL in the mobile phone responding to a call hangup may mean that the audio HAL in the mobile phone receives a call cancellation instruction, or it may also mean that the audio HAL in the mobile phone receives an instruction to delete the call information, or it may also mean that the audio HAL in the mobile phone detects that the corresponding service mark of the call is marked as false.

[0205] S602. Determine whether the session identifier is valid. If it is valid, execute S603a; if it is invalid, execute S603b.

[0206] Exemplarily, the session identifier may include a field indicating whether the session identifier is valid, and the specific content of this field may indicate that the session identifier is valid or invalid. For example, the session identifier is indicated as valid by the character 1, and the session identifier is indicated as invalid by the character 0. For another example, the session identifier is indicated as valid by the string true, and the session identifier is indicated as invalid by the string false. On this basis, the audio HAL in the mobile phone can determine whether the session identifier is valid according to the specific content of the field indicating whether the session identifier is valid in the session identifier.

[0207] S603a. Delete the call information and release the waiting thread.

[0208] When the session identifier is valid, the audio HAL in the mobile phone can delete the device information and service information, and generate a simulation completion instruction. This simulation completion instruction may be the same as the completion instruction in the foregoing embodiments. The audio HAL in the mobile phone can release the waiting thread based on this simulation completion instruction.

[0209] As described in the foregoing embodiments, the audio HAL release waiting thread in the mobile phone refers to releasing the resources occupied by the session corresponding to the waiting thread. After the release is completed, the audio channel can be normally established between the mobile phone and other devices.

[0210] S603b. Delete call information.

[0211] When the session identifier is invalid, it indicates that the waiting thread has been released, and the audio HAL in the mobile phone only needs to delete the device information and service information.

[0212] It should be noted that this method can be executed in Figure 4 step S402, that is, after the audio HAL in the mobile phone responds to receiving the call cancellation instruction and before deleting the device information and service information, the call flow processing method provided in the embodiments of the present application can be synchronously executed. It should be noted that Figure 4 This is a call flow scenario after the call is hung up during the establishment of the control channel. The call flow processing method provided in the embodiments of the present application can also be applied to other scenarios, such as the call flow scenario after the call is hung up during the establishment of the downlink data channel, or during the process of configuring the parameters of the downlink data channel, or during the establishment of the uplink data channel, or during the process of configuring the parameters of the uplink data channel in the mobile phone tablet, which will not be elaborated here.

[0213] Taking the execution of the call flow processing method provided in the embodiments of the present application after the audio HAL in the mobile phone responds to receiving the call cancellation instruction and before deleting the device information and service information as an example, the effect of the call flow processing method provided in the embodiments of the present application is described.

[0214] Please refer to Figure 7 , which is a flowchart of another call flow processing method provided in the embodiments of the present application. As Figure 7 shown, this method includes the following steps.

[0215] S701. In response to receiving the call cancellation instruction, obtain the session identifier corresponding to the call information.

[0216] S702. When the session identifier is valid, delete the call information and release the waiting thread.

[0217] In this way, in Figure 7 S307, since the service flag is false, although the audio virtualization module in the mobile phone still does not send the completion instruction to the audio HAL in the mobile phone after receiving the completion instruction, the waiting thread has been released and will not affect subsequent calls.

[0218] That is to say, in Figure 7In S508, when the audio HAL in the mobile phone receives a completion instruction, it releases the waiting thread established in S504 based on this completion instruction, rather than releasing the waiting thread established when executing S304 as in Figure 5 the one released when executing S304. In this way, the audio channel between the mobile phone and the tablet can be normally connected during subsequent calls, and problems such as inability to transmit audio data and inability to transfer calls will not occur.

[0219] From the above description, it can be seen that the call process handling method provided in the embodiments of this application can effectively improve the call transfer success rate of super incoming calls, and solve the problem that when the user continuously and quickly answers, hangs up, and then answers the phone during the use of the super incoming call function, the mobile phone cannot normally transmit audio data to other devices due to the waiting thread not being released in time.

[0220] Figure 8 The composition schematic diagram of a chip system 800 is shown. The chip system 800 can be set in an electronic device. For example, the chip system 800 can be set in a mobile phone. Exemplarily, the chip system 800 can include: a processor 801 and a communication interface 802, which are used to support the electronic device to implement the functions involved in the above embodiments. In a possible design, the chip system 800 further includes a memory for storing necessary program instructions and data of the electronic device. This chip system can be composed of chips or can include chips and other discrete devices. It should be noted that, in some implementation manners of this application, the communication interface 802 can also be referred to as an interface circuit.

[0221] It should be noted that all relevant contents of each step involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be elaborated here.

[0222] The embodiments of this application also provide a computer storage medium, in which computer instructions are stored. When the computer instructions run on an electronic device, the electronic device is enabled to execute the above relevant method steps to implement the method in the above embodiments.

[0223] The embodiments of this application also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the method in the above embodiments.

[0224] In addition, the embodiments of this application also provide a device, which can specifically be a chip, a component or a module. This device can include a processor and a memory connected to each other; wherein, the memory is used to store computer execution instructions. When the device runs, the processor can execute the computer execution instructions stored in the memory so that the chip executes the methods in the above method embodiments.

[0225] Among them, the electronic device, computer storage medium, computer program product or chip provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.

[0226] The above mainly introduces the solutions provided by the embodiments of the present application from the perspective of the electronic device. To implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0227] The embodiments of the present application can divide the devices involved according to the above method examples. For example, each function module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0228] The functions, actions, operations, steps, etc. in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc. Although the present application has been described in conjunction with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application defined by the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A call flow processing method, characterized in that, An audio hardware abstraction layer applied to an electronic device; the method includes: In response to the call of the electronic device being connected to a collaborative device, establish an audio channel with the collaborative device; the audio channel is used to transmit audio data in the call; the collaborative device and the electronic device are in the same trust ring; In response to the call being hung up, obtain a session identifier corresponding to the call information; the call information is used to indicate the audio hardware information occupied by the call and the information of the peer device of the call; the session identifier is used to indicate the session during the process of the call being connected to the collaborative device; the peer device refers to the device that makes a call with the electronic device; When the session identifier is valid, delete the call information and release the waiting thread; wherein, the valid session identifier indicates that the session is in progress; the waiting thread refers to the resources occupied by the session.

2. The method according to claim 1, characterized in that, The step of, when the session identifier is valid, deleting the call information and releasing the waiting thread includes: When the session identifier is valid, delete the call information and generate a simulated success instruction; the simulated success instruction is used to simulate an instruction that any channel in the audio channel corresponding to the call is successfully established or any channel parameter is successfully configured; the audio channel at least includes a control channel, a downlink data channel, and an uplink data channel; the channel parameters in the audio channel at least include: the configuration parameters of the downlink data channel and the configuration parameters of the uplink data channel; Release the waiting thread based on the simulated success instruction.

3. The method according to claim 1, characterized in that, After releasing the waiting thread, the method further includes: Send a call cancellation instruction to the audio virtualization module of the electronic device to instruct the audio virtualization module not to forward the instruction corresponding to the call; the instruction corresponding to the call includes an instruction that any channel in the audio channel corresponding to the call is successfully established or any channel parameter is successfully configured; the audio channel at least includes a control channel, a downlink data channel, and an uplink data channel; the channel parameters in the audio channel at least include: the configuration parameters of the downlink data channel and the configuration parameters of the uplink data channel.

4. The method according to any one of claims 1 - 3, characterized in that, The session during the process of the call being connected to the collaborative device at least includes: a session for establishing a control channel, a session for establishing a downlink data channel, a session for establishing an uplink channel, a session for configuring downlink data channel parameters, and a session for configuring uplink data channel parameters.

5. The method according to any one of claims 1 - 4, characterized in that, The method further includes: When the session identifier is invalid, delete the call information; the invalid session identifier indicates that the session has ended.

6. The method according to any one of claims 1 - 5, characterized in that, When the session identifier is valid, the method further includes: Uninstall the driver occupied by the session.

7. The method according to any one of claims 1 - 6, characterized in that, The session identifier includes a field indicating whether the session is valid; the step of, when the session identifier is valid, deleting the call information and releasing the waiting thread includes: When the field indicates that the session identifier is valid, delete the call information and release the waiting thread.

8. The method according to any one of claims 1 - 7, characterized in that, The call being hung up is any one of the following: receiving a call cancellation instruction; receiving an indication to delete the call information.

9. An electronic device, characterized in that, The electronic device includes one or more processors, one or more memories, and an audio hardware abstraction layer; the one or more memories are coupled to the one or more processors, the audio hardware abstraction layer is coupled to the one or more processors, and the one or more memories store computer instructions; When the one or more processors execute the computer instructions, the electronic device is caused to execute the call flow processing method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when running, execute the call flow processing method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Path processing method and device, equipment and storage medium

    CN114245060A

  • Collaborative call method and device, equipment, storage medium and program product

    CN114500716A

  • Call method and electronic equipment

    CN114584734A

  • Method for releasing call in codeless telephone

    CN1182337A

  • Collaborative calling method and apparatus, device, storage medium, and program product

    WO2023130991A1