Voice communication method and device, terminal, storage medium and chip

By establishing a direct-connected call link between terminals, point-to-point voice calls are realized, and the high deployment and call cost problems caused by cloud server dependence in the prior art are solved, reducing costs and improving call efficiency and security.

CN119232747APending Publication Date: 2024-12-31GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411413025.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing IP-based voice calling systems need to rely on cloud servers for connection and message transmission, resulting in high deployment costs and increased call costs.

Method used

By establishing a direct-connected call link between the terminals, using the direct-connected communication capabilities of the first terminal and the second terminal, point-to-point voice calls are realized, and dependence on cloud servers is avoided.

Benefits of technology

Save the deployment cost of cloud servers, reduce the total cost of voice calls, and improve the efficiency and security of calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232747A_ABST
    Figure CN119232747A_ABST
Patent Text Reader

Abstract

The invention provides a voice communication method and device, a terminal, a storage medium and a chip, and belongs to the technical field of communication. Comprising the steps of running a first detection program through a first thread of a first terminal; receiving a connection request sent by the second terminal through the first detection program, wherein the connection request is sent when the second terminal sends a voice call request to the first terminal; establishing a first direct connection call link with the second terminal based on the connection request; and performing a voice call with the second terminal based on the first direct connection call link. In the embodiment of the invention, the point-to-point conversation between the first terminal and the second terminal is realized by utilizing the direct connection communication capability (establishing the first direct connection conversation link) of the first terminal and the second terminal, so that the voice conversation between the two terminals can be realized without depending on a cloud server, and the voice conversation efficiency is improved. The deployment cost of the cloud server is saved, and the cost of voice communication is further saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a voice call method, device, terminal, storage medium and chip. Background Art

[0002] At present, voice over Internet Protocol (VOIP) calls based on IP, such as voice calls based on social application software or communication applications (WhatsApp), all require the support of cloud servers. During the call establishment phase, both ends of the voice call need to address each other through the cloud server and establish a connection; and subsequent media messages and control messages need to be forwarded through the cloud server. Summary of the invention

[0003] The embodiments of the present application provide a voice call method, device, terminal, storage medium and chip, which can realize a voice call between two terminals without relying on a cloud server, thereby saving the deployment cost of the cloud server and further saving the cost of the voice call. The technical solution is as follows:

[0004] In one aspect, a voice call method is provided, the method comprising:

[0005] Running a first detection program through a first thread of a first terminal;

[0006] receiving, through the first detection program, a connection request sent by a second terminal, where the connection request is sent when the second terminal sends a voice call request to the first terminal;

[0007] Based on the connection request, establishing a first direct call link with the second terminal;

[0008] Conduct a voice call with the second terminal based on the first direct call link.

[0009] In another aspect, a voice communication device is provided, the device comprising:

[0010] An operating module, configured to operate a first detection program through a first thread of a first terminal;

[0011] a detection module, configured to receive, through the first detection program, a connection request sent by the second terminal, wherein the connection request is sent when the second terminal sends a voice call request to the first terminal;

[0012] A first establishing module, configured to establish a first direct call link with the second terminal based on the connection request;

[0013] The first call module is used to conduct a voice call with the second terminal based on the first direct call link.

[0014] On the other hand, a terminal is provided, the terminal comprising a processor and a memory, the memory storing at least one program code, the at least one program code being loaded and executed by the processor to implement the above-mentioned voice call method.

[0015] On the other hand, a computer-readable storage medium is provided, wherein at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the above-mentioned voice call method.

[0016] On the other hand, a chip is provided, wherein the chip stores at least one program code, and the at least one program code is used to be executed by a processor to implement the above-mentioned voice call method.

[0017] In an embodiment of the present application, the direct communication capability of the first terminal and the second terminal is utilized (a first direct call link is established) to implement a point-to-point call between the first terminal and the second terminal. Thus, the present application can implement a voice call between the two terminals without relying on a cloud server, thereby saving the deployment cost of the cloud server and, in turn, the cost of the voice call. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram showing an implementation environment of a voice call method shown in an exemplary embodiment of the present application;

[0019] Figure 2 A flowchart of a voice call method according to an exemplary embodiment of the present application is shown;

[0020] Figure 3 A flowchart of a voice call method according to an exemplary embodiment of the present application is shown;

[0021] Figure 4 A flowchart of a voice call method according to an exemplary embodiment of the present application is shown;

[0022] Figure 5 A flowchart of a voice call method according to an exemplary embodiment of the present application is shown;

[0023] Figure 6 A block diagram of a voice call device according to an exemplary embodiment of the present application is shown;

[0024] Figure 7 A block diagram of a terminal according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0026] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0027] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the detection procedures (first detection procedure and second detection procedure), voice call requests, Telecom modules, link information of call links, account information of call accounts and voice data (first voice data and second voice data) involved in this application are all obtained with full authorization.

[0028] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment of an exemplary communication management method of the present application. Figure 1 , the implementation environment includes a first terminal 101 and a second terminal 102, and the first terminal 101 and the second terminal 102 can make a voice call through a direct communication module. In addition, the first terminal 101 and the second terminal 102 both have multiple direct communication modules, and the first terminal 101 can switch the direct communication module for voice calls. For example, the first terminal 101 establishes a first direct call link with the second terminal through the first direct communication link, and then makes a voice call with the second terminal based on the first direct call link; subsequently, at least one second direct call link is established with the second terminal based on at least one second direct communication module of the first terminal; a target second direct call link is determined from at least one second direct call link; the call link for the voice call with the second terminal is switched from the first direct call link to the target second direct call link; and a voice call is made with the second terminal based on the target second direct call link. The multiple direct communication modules may include multiple of Bluetooth (BT), Wireless Local Area Network (WLAN), Peer to Peer lending (P2P), and sidelink.

[0029] In some embodiments, the operating system of the first terminal 101 may be Android, Hongmeng or Apple operating system (IOS); the operating system of the second terminal 102 may also be Android, Hongmeng or IOS, etc. In addition, the first terminal 101 may include various handheld devices (mobile phones or tablets, etc.) with multiple direct communication modules, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment (UE), mobile stations (MS), etc. For the convenience of description, in the embodiments of the present application, the above-mentioned devices are collectively referred to as the first terminal 101. In the embodiments of the present application, "UE" is used in some places to represent "first terminal 101". The second terminal 102 may include various handheld devices with multiple direct communication modules, vehicle-mounted devices, wearable devices, computing devices or other processing devices linked to wireless modems, as well as various forms of user equipment, mobile stations, etc.

[0030] Please refer to Figure 2 , which shows a flow chart of a voice call method shown in an exemplary embodiment of the present application. Figure 2 , the method comprising:

[0031] Step 201: Run a first detection program through a first thread of a first terminal.

[0032] When the first terminal is started, the first terminal starts the first thread and runs the first detection program of the first direct communication module through the first thread. The first direct communication module can be BT, WLAN, P2P or sidelink, etc. The first detection program can be a first socket; for example, if the first direct communication module is BT, this step can be running the server socket of BT through the first thread.

[0033] In some embodiments, the first direct communication module may be any direct communication module among the multiple direct communication modules of the first terminal; before this step, the first terminal determines the first direct communication module from the multiple direct communication modules, and then runs the first detection program of the first direct communication module through the first thread of the first terminal. The first terminal may determine the first direct communication module based on the on-state of the multiple direct communication modules; accordingly, the step of the first terminal determining the first direct communication module from the multiple direct communication modules may be: the first terminal determines the states of the multiple direct communication modules; based on the states of the multiple direct communication modules, selects the first direct communication module in the on-state from the multiple direct communication modules. In the case where there are multiple direct communication modules in the on-state, the first terminal may determine the most recently used first direct communication module from the multiple direct communication modules in the on-state; or determine the most frequently used first direct communication module from the multiple direct communication modules in the on-state.

[0034] In other embodiments, the first terminal may determine the first direct communication module based on the usage frequencies of multiple direct communication modules; accordingly, the step of the first terminal determining the first direct communication module from the multiple direct communication modules may be: the first terminal determines the usage frequencies of the multiple direct communication modules, and based on the usage frequencies of the multiple direct communication modules, selects the first direct communication module whose usage frequency is greater than the preset frequency from the multiple direct communication modules. In the embodiment of the present application, the first terminal may comprehensively select the first direct communication module based on information such as the opening status or usage frequency of the multiple direct communication modules, thereby selecting the first direct communication module that the user often uses or prefers to use, and then conducts a point-to-point voice call based on the first direct communication module.

[0035] Step 202: receiving a connection request sent by a second terminal through a first detection program, where the connection request is sent by the second terminal when sending a voice call request to the first terminal.

[0036] The first terminal is the called terminal, and the second terminal is the calling terminal; when the second terminal initiates a voice call request, it starts the second thread, and runs the second detection program of the first direct communication module through the second thread, and the second detection program is used to detect the connection status (whether connected) between the first terminal and the second terminal. The second detection program can be a second socket; for example, if the first direct communication module is BT, the second terminal runs the client socket of BT through the second thread, and detects the connection status (whether connected) between the first terminal and the second terminal through the socket of BT. In some embodiments, when the second detection program of the second terminal detects that the connection status is connected, the second terminal sends a voice call request to the first terminal.

[0037] Step 203: Establish a first direct call link with the second terminal based on the connection request.

[0038] In response to the connection request, a first direct communication module based on the first terminal establishes a first direct call link with the second terminal. For example, if the first direct communication module is BT, the first direct call link may be a BT link. In some embodiments, after the first terminal establishes the first direct call link with the second terminal, the first terminal starts a third thread, and detects the connection status of the first direct call link (whether it is continuously in a connected state) through the third thread; and the second terminal starts a fourth thread, and detects the connection status of the first direct call link (whether it is continuously in a connected state) through the fourth thread. Among them, the first thread and the third thread belong to the same process, and the second thread and the fourth thread belong to the same process.

[0039] In some embodiments, when the third thread of the first terminal detects that the connection state of the first direct call link is continuously in a connected state, the third thread continues to detect the connection state of the first direct call link; when the third thread of the first terminal detects that the connection state of the first direct call link is in a disconnected state, the first terminal re-establishes the first direct call link with the second terminal. Similarly, when the fourth thread of the second terminal detects that the connection state of the first direct call link is continuously in a connected state, the fourth thread continues to detect the connection state of the first direct call link; when the fourth thread of the second terminal detects that the connection state of the first direct call link is in a disconnected state, the second terminal re-sends a connection request to the first terminal to request to re-establish the first direct call link.

[0040] Step 204: Conduct a voice call with the second terminal based on the first direct call link.

[0041] The first terminal collects the first voice data from the microphone, and sends the collected first voice data to the second terminal through the first direct call link. The second terminal receives the sent first voice data and plays the first voice data through the handset, speaker or earphone; and the second terminal collects the second voice data from the microphone and sends the second voice data to the first terminal through the first direct call link; the first terminal receives the second voice data from the second terminal through the first direct call link, and plays the second voice data through the handset, speaker or earphone. In some embodiments, when the first terminal sends the first voice data to the second terminal, the first terminal will also encode the first voice data and send the encoded first voice data to the second terminal. After the second terminal receives the encoded first voice data, it will decode the encoded first voice data to obtain the first voice data; similarly, when the second terminal sends the second voice data to the first terminal, the second terminal will also encode the second voice data and send the encoded second voice data to the first terminal. After the first terminal receives the encoded second voice data, it will decode the encoded second voice data to obtain the second voice data.

[0042] In an embodiment of the present application, the direct communication capability of the first terminal and the second terminal is utilized (a first direct call link is established) to implement a point-to-point call between the first terminal and the second terminal. Thus, the present application can implement a voice call between the two terminals without relying on a cloud server, thereby saving the deployment cost of the cloud server and, in turn, the cost of the voice call.

[0043] Please refer to Figure 3 , which shows a flow chart of a voice call method shown in an exemplary embodiment of the present application. Figure 3 , the method comprising:

[0044] Step 301: A first terminal runs a first detection program through a first thread.

[0045] In some embodiments, this step is the same as step 201 and will not be repeated here.

[0046] Step 302: The first terminal receives a connection request sent by the second terminal through a first detection program, where the connection request is sent when the second terminal sends a voice call request to the first terminal.

[0047] In some embodiments, this step is the same as step 202 and will not be repeated here.

[0048] Step 303: The first terminal establishes a first direct call link with the second terminal based on the connection request.

[0049] In some embodiments, this step is the same as step 203 and will not be repeated here.

[0050] For example, see Figure 4 , the first terminal is the called terminal, and the second terminal is the calling terminal; the second terminal initiates a connection request; the first terminal starts a first detection program, detects the connection request through the first detection program, and after detecting the connection request, receives the connection request, at this time, a first direct call link is established between the first terminal and the second terminal; the second terminal initiates a voice call request to the first terminal based on the first direct call link, and the first terminal receives the voice call request. When the first terminal answers the voice call request, the first terminal returns an answering response message to the second terminal through the first direct call link; the second terminal receives the answering response message through the first direct call link.

[0051] Step 304: The first terminal calls the Telecom module of the first terminal to display an incoming call interface of the voice call request and play a ring tone.

[0052] The Telecom module is an open source module of the operating system of the first terminal. This step can be implemented by the following steps (1) to (3), including:

[0053] (1) The first terminal receives a voice call request sent by the second terminal based on the first direct call link.

[0054] The voice call request carries a call request message, which includes the terminal identifier of the second terminal, the number of the second terminal and an encryption key, etc. The terminal identifier of the second terminal is used to uniquely identify the second terminal, so as to facilitate the subsequent sending of the first voice data collected by the first terminal to the second terminal based on the terminal identifier of the second terminal; the number of the second terminal is used for user identification of the user corresponding to the second terminal; the encryption key is used to encrypt the collected first voice data, and to decrypt the received second voice data.

[0055] (2) The first terminal creates a call link and a call account based on the voice call request.

[0056] The call link may be a Connection link; the call account may be a PhonAccount call account. In some embodiments, after receiving a voice call request, the first terminal may directly create a call link and a call account based on the voice call request, thereby improving the efficiency of the voice call. In other embodiments, after receiving a voice call request, the first terminal first determines whether to accept the voice call request based on its own status; if accepted, a call link and a call account will be created; accordingly, the first terminal may create a call link and a call account based on the voice call request in the following steps: the first terminal determines the status information of the first terminal; if the status information meets the status conditions for accepting the voice call request, determines to accept the voice call request of the second terminal; based on the voice call request, creates a call link and a call account; if the status information does not meet the status conditions for accepting the voice call request, does not create a call link and a call account, and ends at this time.

[0057] In some embodiments, the step for the first terminal to determine whether the status information of the first terminal satisfies the status condition for accepting a voice call request may be: the status information includes an idle state or a non-idle state (i.e., a busy state); when the status information includes an idle state, that is, the first terminal is in an idle state, it is determined that the status condition for accepting the voice call request is met; when the status information includes a non-idle state, that is, the second terminal is in a non-idle state (i.e., a busy state), it is determined that the status condition for accepting the voice call request is not met.

[0058] (3) The first terminal sends the link information of the call link and the account information of the call account to the Telecom module, so that the Telecom module displays an incoming call interface of the voice call request and plays a ringing tone based on the link information and the account information.

[0059] In some embodiments, after the second terminal sends a voice call request to the first terminal, the second terminal will also call the Telecom module of the second terminal to display the outgoing call interface of the voice call request and play the ringing tone. In the embodiment of the present application, after the first direct call link is established, the display of the incoming call interface is realized by accessing the Android open source Telecom module of the first terminal, so that the developer does not need to develop the incoming call interface, which greatly saves the workload of software development. For example, continue to refer to Figure 4 , the first terminal is connected to the Telecom module, displays the incoming call interface based on the Telecom module and plays the ringing tone; the second terminal is connected to the Telecom module, displays the outgoing call interface based on the Telecom module and plays the ringing tone.

[0060] Step 305: When receiving the voice call response, the first terminal transmits voice data of the voice call request to the second terminal based on the first direct call link.

[0061] When a voice call response is received, it is determined that the voice call request is answered, and the first terminal transmits voice data based on the first direct call link; the voice data includes first voice data and second voice data, the first voice data is the voice data sent by the first terminal to the second terminal, and the second voice data is the voice data sent by the second terminal to the first terminal. In some embodiments, this step can be implemented by the following steps (1) to (2), including:

[0062] (1) When receiving the voice call response, the first terminal displays a call timer interface of the voice call request through the Telecom module.

[0063] In some embodiments, when a voice call response is received, the first terminal sets the call to an active state (ACTIVITY) through the Telecom module of the first terminal, and then displays a call timing interface of the voice call request through the Telecom module. In addition, the first terminal also sends a receiving response message to the second terminal, and the second terminal receives the receiving response message sent by the first terminal, and determines that the voice call is answered based on the receiving response message. At this time, the second terminal sets the call to an active state (ACTIVITY) through the Telecom module of the second terminal, and then displays a call timing interface of the voice call request through the Telecom module.

[0064] In some embodiments, the first terminal sets the call to an operating state (ACTIVITY) through the Telecom module of the first terminal. At this time, other types of calls in the system of the first terminal cannot call the Telecom module of the first terminal, thereby avoiding conflicts with other types of calls in the system of the first terminal; similarly, the first terminal sets the call to an operating state (ACTIVITY) through the Telecom module of the first terminal. At this time, other types of calls in the system of the second terminal cannot call the Telecom module of the second terminal, thereby avoiding conflicts with other types of calls in the system of the second terminal.

[0065] (2) The first terminal collects first voice data of the first terminal based on the call timing interface, sends the first voice data to the second terminal through the first direct call link, and receives second voice data of the second terminal based on the first direct call link.

[0066] The first terminal collects the first voice data through the microphone of the first terminal; and after receiving the second voice data, the first terminal plays the second voice data through the receiver, speaker or earphone. In the embodiment of the present application, the capabilities provided by the Telecom module of the Android system are utilized during the call process, thereby eliminating the development cost of the call timing interface after the call is established, the development cost of the sound routing, and the maintenance cost of the conflict scenarios with other modules in the system, thereby saving the workload of software development and further saving the cost of software development. This allows developers to focus more on the implementation of device interconnection between the first terminal and the second terminal, saving development time and reducing development costs. For example, please continue to refer to Figure 4 When a voice call response is received, the first terminal and the second terminal respectively display a call timing interface, and the first terminal records the first voice data and plays the second voice data; the second terminal records the second voice data and plays the first voice data, and transmits voice data to each other based on the first direct call link.

[0067] In some embodiments, the voice call request carries an encryption key; accordingly, the step in which the first terminal sends the first voice data to the second terminal through the first direct call link may be: the first terminal encrypts the first voice data based on the encryption key; and sends the encrypted first voice data to the second terminal through the first direct call link. Similarly, the second voice data sent by the second terminal to the first terminal is the encrypted second voice data; accordingly, the step in which the first terminal receives the second voice data of the second terminal based on the first direct call link may be: the first terminal receives the encrypted second voice data of the second terminal based on the first direct call link, and decrypts the encrypted second voice data based on the encryption key to obtain the second voice data. In an embodiment of the present application, a more advanced encryption algorithm can be used between the first terminal and the second terminal to encrypt the first voice data and the second voice data, thereby improving the security of the voice call.

[0068] In other embodiments, the voice call request carries multiple encryption keys; the first terminal selects an encryption key from the multiple encryption keys, encrypts the first voice data by the selected encryption key, and sends the encrypted first voice data and identification information such as the serial number of the selected encryption key to the second terminal, so that the second terminal decrypts the encrypted first voice data based on the selected encryption key.

[0069] The step of the first terminal selecting an encryption key from multiple encryption keys can be: the first terminal randomly selects an encryption key from the multiple encryption keys; or, the first terminal selects an encryption key that matches the first direct communication module from multiple encryption keys based on the first direct communication module; or, the first terminal determines the priority level of the second terminal based on the number of the second terminal, and selects an encryption key that matches the priority level from multiple encryption keys based on the priority level of the second terminal, thereby achieving, for important users, using a higher-level (or more secure) encryption key to encrypt the first voice data, thereby achieving a more efficient and secure call experience.

[0070] In an embodiment of the present application, the direct communication capability of the first terminal and the second terminal is utilized (a first direct call link is established) to implement a point-to-point call between the first terminal and the second terminal. Thus, the present application can implement a voice call between the two terminals without relying on a cloud server, thereby saving the deployment cost of the cloud server and, in turn, the cost of the voice call.

[0071] Please refer to Figure 5 , which shows a flow chart of a voice call method shown in an exemplary embodiment of the present application. Figure 5 , the method comprising:

[0072] Step 501: A first terminal runs a first detection program through a first thread.

[0073] In some embodiments, this step is the same as step 201 and will not be repeated here.

[0074] Step 502: The first terminal receives a connection request sent by the second terminal through a first detection program, where the connection request is sent when the second terminal sends a voice call request to the first terminal.

[0075] In some embodiments, this step is the same as step 202 and will not be repeated here.

[0076] Step 503: The first terminal establishes a first direct call link with the second terminal based on the connection request.

[0077] In some embodiments, this step is the same as step 203 and will not be repeated here.

[0078] Step 504: The first terminal conducts a voice call with the second terminal based on the first direct call link.

[0079] In some embodiments, this step is the same as step 204, or this step can be implemented through the above steps 304-305, which will not be repeated here.

[0080] Step 505: The first terminal establishes at least one second direct call link with the second terminal.

[0081] The first terminal also includes at least one second direct communication module; in this step, the first terminal establishes at least one second direct call link with the second terminal based on the at least one second direct communication module of the first terminal. One second direct communication module corresponds to one second direct call link; for example, if the at least one second direct communication module includes WLAN and sidelink, the first terminal establishes a WLAN direct call link with the second terminal based on WLAN, and establishes a sidelink direct call link with the second terminal based on sidelink.

[0082] In some embodiments, before this step, the first terminal first determines at least one second direct communication module; wherein, the step of the first terminal determining at least one second direct communication module may be: the first terminal determines other direct communication modules other than the first direct communication module possessed by the first terminal, and determines the status of the other direct communication modules; based on the status of the other direct communication modules, determines at least one second direct communication module in an on state (or called a connected state) from the other direct communication modules.

[0083] In some embodiments, the timing for the first terminal to establish at least one second direct call link with the second terminal based on at least one second direct communication module of the first terminal may be when the first terminal establishes the first direct call link, or when the call quality of the first direct call link is lower than a preset quality; or when the second direct communication module is turned on, etc. In the embodiments of the present application, there is no specific limitation on the timing for establishing the second direct call link.

[0084] In some embodiments, for each second direct call link, the first terminal starts a fifth thread to detect the connection status of the second direct call link; the second terminal starts a sixth thread to detect the connection status of the second direct call link. The first thread and the fifth thread belong to the same process, and the second thread and the sixth thread belong to the same process.

[0085] In some embodiments, when the fifth thread of the first terminal detects that the connection state of the second direct call link is continuously in a connected state, the fifth thread continues to detect the connection state of the second direct call link; when the fifth thread of the first terminal detects that the connection state of the second direct call link is in a disconnected state, the first terminal re-establishes the second direct call link with the second terminal. Similarly, when the sixth thread of the second terminal detects that the connection state of the second direct call link is continuously in a connected state, the sixth thread continues to detect the connection state of the second direct call link; when the sixth thread of the second terminal detects that the connection state of the second direct call link is in a disconnected state, the second terminal re-sends a connection request to the first terminal to request to re-establish the second direct call link.

[0086] Step 506: The first terminal determines a target second direct communication link from at least one second direct communication link.

[0087] In some embodiments, the first terminal selects a target second direct call link with better quality; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link may be: the first terminal determines the quality of each second direct call link, and based on the quality of each second direct call link, determines a target second direct call link that meets the quality condition from at least one second direct call link; meeting the quality condition means that the quality is the highest or the quality exceeds a preset quality, etc. In the embodiment of the present application, a target second direct call link with better quality is selected based on each second direct call link, so that the call quality of the voice call based on the target second direct call link can be improved.

[0088] In some other embodiments, the link identifier of the second direct call link can be displayed on the call timing interface, and the user can manually select the target second direct call link to be switched; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link can be: the first terminal displays the link identifier of at least one second direct call link on the call timing interface; obtains the link identifier of the selected direct call link, and determines the target second direct call link corresponding to the selected link identifier from at least one second direct call link. In the embodiment of the present application, the link identifier of the second direct call link can be displayed on the call timing interface, and the user can manually select the second direct call link to be switched, thereby not only meeting the user's needs, but also enabling flexible switching of direct communication links.

[0089] In some other embodiments, the module identifier of the second direct communication module can be displayed on the call timing interface, and the user can manually select the second direct communication module to be switched to select the target second direct call link; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link can be: the first terminal displays the module identifier of at least one second direct communication module on the call timing interface; obtains the module identifier of the selected direct communication module, and determines the target second direct call link corresponding to the module identifier of the selected direct communication module from at least one second direct call link. In the embodiment of the present application, the module identifier of the second direct communication module can be displayed on the call timing interface, and the user can manually select the target second direct call link corresponding to the second direct communication module to be switched, thereby not only meeting the user's needs, but also enabling flexible switching of direct communication links.

[0090] In some other embodiments, the user can set different groups to use different direct call links; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link can be: the first terminal determines the number of the second terminal, determines the group where the number of the second terminal belongs, and determines the target second direct call link matching the group from at least one second direct call link. In the embodiment of the present application, the user can set different groups to use different direct call links, thereby realizing flexible switching of direct communication links based on the group.

[0091] In some other embodiments, the user may set different numbers to use different direct call links; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link may be: the first terminal determines the number of the second terminal, and determines the target second direct call link matching the number from at least one second direct call link. Wherein, the first terminal stores a direct communication association table in advance, and the direct communication association table stores the correspondence between the number and the direct communication module corresponding to the number; accordingly, the step of the first terminal determining the target second direct call link matching the number from at least one second direct call link may be: the first terminal searches the number of the second terminal from the direct communication association table; when the number of the second terminal is found in the direct communication association table, the direct communication module stored in the direct communication association table corresponding to the number of the second terminal is obtained, and the target second direct call link corresponding to the direct communication module is determined from at least one second direct call link. When the number of the second terminal is not found in the direct communication association table, the first terminal determines a default target second direct call link from at least one second direct call link. In an embodiment of the present application, users can set different numbers to use different direct call links, thereby achieving flexible switching of direct communication links based on the group.

[0092] In other embodiments, BT can support a support distance of 10 meters, and the transmission is safe and reliable; P2P can support a transmission distance of 200 meters, and the transmission is safe and reliable; the transmission range supported by WLAN is related to the network layout, but in libraries, large shopping malls, offices, and home scenes, the transmission is best, but the transmission is not safe and reliable; sidelink is a D2D transmission protocol of the 3GPP protocol, and the supported distance is about 500 meters. Therefore, the first terminal can select the second direct call link according to business needs; accordingly, the step of the first terminal determining the target second direct call link from at least one second direct call link can be: the first terminal determines the call demand information of the second terminal, determines the direct communication module that matches the call demand information from multiple direct communication modules, and determines the target second direct call link that matches the direct communication module from at least one second direct call link. For example, if the call requirement information is high security, the target second direct call link can be a second direct call link established based on BT or a second direct call link established based on P2P; for another example, if the call requirement information is long distance, the target second direct call link can be a second direct call link established based on sidelink.

[0093] In an embodiment of the present application, in the call control plane, the first terminal and the second terminal can be interconnected through multiple direct communication technologies, and the device can be dynamically adjusted to dynamically switch between different direct call links according to the connection scenario between the first terminal and the second terminal to achieve a better call experience.

[0094] Step 507: The first terminal switches the call link for the voice call with the second terminal from the first direct call link to the target second direct call link.

[0095] In some embodiments, the first terminal disconnects the first direct call link and uses the target second direct call link as the call link for the voice call between the first terminal and the second terminal. In other embodiments, the first terminal may not disconnect the first direct call link, but keep the first direct call link connected so as to switch the call link for the voice call with the second terminal back to the first direct call link later.

[0096] Step 508: The first terminal conducts a voice call with the second terminal based on the target second direct call link.

[0097] In some embodiments, the process of the first terminal conducting a voice call with the second terminal based on the target second direct call link is similar to the process of the first terminal conducting a voice call with the second terminal based on the first direct call link, and is not repeated here.

[0098] In the embodiment of the present application, the direct communication capability of the first terminal and the second terminal is used (the first direct call link is established) to realize a point-to-point call between the first terminal and the second terminal, so that the present application can realize a voice call between the two terminals without relying on the cloud server, saving the deployment cost of the cloud server, and thus saving the cost of the voice call. In addition, the first terminal can also switch the call link for the voice call with the second terminal, thereby realizing dynamic switching between different call links to achieve a better call experience.

[0099] Please refer to Figure 6 , which shows a voice call device shown in an exemplary embodiment of the present application, the device includes:

[0100] An operation module 601 is used to execute a first detection program through a first thread of a first terminal;

[0101] The detection module 602 is used to receive a connection request sent by the second terminal through a first detection program, where the connection request is sent when the second terminal sends a voice call request to the first terminal;

[0102] A first establishing module 603, configured to establish a first direct call link with the second terminal based on the connection request;

[0103] The first call module 604 is configured to conduct a voice call with the second terminal based on the first direct call link.

[0104] In some embodiments, the first call module 604 is used to call the Telecom module of the first terminal to display the incoming call interface of the voice call request and play the ringtone; when a voice call response is received, the voice data of the voice call request is transmitted between the first direct call link and the second terminal.

[0105] In some embodiments, the first call module 604 is used to receive a voice call request sent by the second terminal based on the first direct call link; create a call link and a call account based on the voice call request; and send the link information of the call link and the account information of the call account to the Telecom module, so that the Telecom module displays the incoming call interface of the voice call request and plays a ringtone based on the link information and the account information.

[0106] In some embodiments, the first call module 604 is used to display a call timing interface of the voice call request through the Telecom module when a voice call response is received; based on the call timing interface, collect the first voice data of the first terminal, send the first voice data to the second terminal through the first direct call link, and receive the second voice data of the second terminal based on the first direct call link.

[0107] In some embodiments, the voice call request carries an encryption key;

[0108] The first call module 604 is configured to encrypt the first voice data based on the encryption key and send the encrypted first voice data to the second terminal via the first direct call link.

[0109] In some embodiments, the first call module 604 is used to determine the status information of the first terminal; when the status information meets the status conditions for accepting the voice call request, determine to accept the voice call request of the second terminal; and create a call link and a call account based on the voice call request.

[0110] In some embodiments, the apparatus further comprises:

[0111] An establishing module, configured to establish at least one second direct call link with the second terminal based on at least one second direct communication module of the first terminal;

[0112] A determination module, configured to determine a target second direct call link from at least one second direct call link;

[0113] A switching module, configured to switch a call link for a voice call with a second terminal from a first direct call link to a target second direct call link;

[0114] The second call module is used to conduct a voice call with the second terminal based on the target second direct call link.

[0115] In some embodiments, the determining module is configured to determine the quality of each second direct call link, and based on the quality of each second direct call link, determine a second direct call link that meets the quality condition from at least one second direct call link; or

[0116] The determination module is used to display the module identification of at least one second direct communication module on the call timing interface; obtain the module identification of the selected direct communication module, and determine the second direct call link corresponding to the module identification of the selected direct communication module from the at least one second direct call link.

[0117] In an embodiment of the present application, the direct communication capability of the first terminal and the second terminal is utilized (a first direct call link is established) to implement a point-to-point call between the first terminal and the second terminal. Thus, the present application can implement a voice call between the two terminals without relying on a cloud server, thereby saving the deployment cost of the cloud server and, in turn, the cost of the voice call.

[0118] It should be noted that the voice call device provided in the above embodiment is only illustrated by the division of the above functional modules when making a voice call. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the first terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the voice call device provided in the above embodiment and the voice call method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0119] Please refer to Figure 7 , which shows a block diagram of a terminal 700 according to an exemplary embodiment of the present application. The terminal 700 in the present application may include one or more of the following components: a processor 710 , a memory 720 , and a display screen 730 .

[0120] The processor 710 may include one or more processing cores. The processor 710 uses various interfaces and lines to connect the various parts of the entire terminal 700, and executes various functions and processes data of the terminal 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 710 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen 730; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 710, but may be implemented separately through a computer program product.

[0121] The memory 720 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable storage medium. The memory 720 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book), etc., created according to the use of the terminal 700.

[0122] The display screen 730 is a display component for displaying a user interface. Optionally, the display screen 730 is a display screen with a touch function, through which the user can use any suitable object such as a finger, a touch pen, etc. to perform touch operations on the display screen 730.

[0123] The display screen 730 is usually arranged on the front panel of the terminal 700. The display screen 730 can be designed as a full screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen. The display screen 730 can also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.

[0124] In addition, those skilled in the art can understand that the structure of the terminal 700 shown in the above drawings does not constitute a limitation on the terminal 700, and the terminal 700 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the terminal 700 also includes a Wifi module, an audio acquisition device, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a Bluetooth module, a power supply and other components, which will not be described in detail here.

[0125] An embodiment of the present application also provides a computer-readable medium, which stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the voice call method shown in the above embodiments.

[0126] An embodiment of the present application also provides a chip, which stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the voice call method shown in the above embodiments.

[0127] In some embodiments, the chip involved in the embodiments of the present application may be deployed to be executed on a first terminal, or to be executed on multiple first terminals located at one location, or to be executed on multiple first terminals distributed at multiple locations and interconnected by a communication network. Multiple first terminals distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.

[0128] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0129] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A voice call method, characterized in that: The method comprises: Running a first detection program through a first thread of a first terminal; receiving, through the first detection program, a connection request sent by a second terminal, where the connection request is sent when the second terminal sends a voice call request to the first terminal; Based on the connection request, establishing a first direct call link with the second terminal; Conduct a voice call with the second terminal based on the first direct call link.

2. The method according to claim 1, characterized in that: The performing a voice call with the second terminal based on the first direct call link includes: Invoke the telecommunication module of the first terminal to display the incoming call interface of the voice call request and play a ringing tone; When a voice call response is received, voice data of the voice call request is transmitted to the second terminal based on the first direct call link.

3. The method according to claim 2, characterized in that The calling of the telecommunication module of the first terminal to display the incoming call interface of the voice call request and play the ring tone includes: Based on the first direct call link, receiving a voice call request sent by the second terminal; Based on the voice call request, create a call link and a call account; The link information of the call link and the account information of the call account are sent to the Telecom module, so that the Telecom module displays an incoming call interface of the voice call request and plays a ringing tone based on the link information and the account information.

4. The method according to claim 2, characterized in that: The method of transmitting the voice data of the voice call request between the second terminal based on the first direct call link when the voice call response is received includes: When a voice call response is received, displaying a call timing interface of the voice call request through the Telecom module; Based on the call timing interface, first voice data of the first terminal is collected, the first voice data is sent to the second terminal through the first direct call link, and second voice data of the second terminal is received based on the first direct call link.

5. The method according to claim 4, characterized in that The voice call request carries an encryption key; The sending the first voice data to the second terminal through the first direct call link includes: encrypting the first voice data based on the encryption key; The encrypted first voice data is sent to the second terminal through the first direct call link.

6. The method according to claim 3, characterized in that The creating a call link and a call account based on the voice call request includes: Determining status information of the first terminal; If the state information satisfies the state condition for accepting the voice call request, determining to accept the voice call request of the second terminal; Based on the voice call request, the call link and the call account are created.

7. The method according to claim 1, characterized in that The method further comprises: Establishing at least one second direct call link with the second terminal; Determine a target second direct call link from the at least one second direct call link; Switching the call link for the voice call with the second terminal from the first direct call link to the target second direct call link; Conduct a voice call with the second terminal based on the target second direct call link.

8. The method according to claim 7, characterized in that The determining a target second direct call link from the at least one second direct call link comprises: Determine the quality of each second direct call link, and determine a target second direct call link that meets the quality condition from the at least one second direct call link based on the quality of each second direct call link; or, The link identifier of at least one second direct call link is displayed on the call timing interface; the link identifier of the selected direct call link is acquired, and a target second direct call link corresponding to the selected link identifier is determined from the at least one second direct call link.

9. A voice communication device, characterized in that: The device comprises: An operating module, configured to operate a first detection program through a first thread of a first terminal; a detection module, configured to receive, through the first detection program, a connection request sent by the second terminal, wherein the connection request is sent when the second terminal sends a voice call request to the first terminal; A first establishing module, configured to establish a first direct call link with the second terminal based on the connection request; The first call module is used to conduct a voice call with the second terminal based on the first direct call link.

10. A terminal, characterized in that: The terminal includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the voice call method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the voice call method according to any one of claims 1 to 8.

12. A chip, characterized in that: The chip stores at least one program code, and the at least one program code is used to be executed by a processor to implement the voice call method according to any one of claims 1 to 8.