patents.google.com

CN113365234B - Calling method and device and electronic equipment - Google Patents

  • ️Tue Dec 13 2022

Detailed Description

The technical solutions in the embodiments of the present application will be described below clearly with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.

The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be implemented in sequences other than those illustrated or described herein. The objects distinguished by "first", "second", and the like are usually a class, and the number of the objects is not limited, and for example, the first object may be one or a plurality of objects. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/", and generally means that the former and latter related objects are in an "or" relationship.

The following describes the call method provided by the embodiment of the present application in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.

As shown in fig. 1, an embodiment of the present application provides a calling method, which may include steps 101 to 103 described below. Wherein, step 102 and step 103 are alternatively executed.

Step 101, in a case where a first electronic device establishes a connection with a second electronic device through a device-to-device D2D technology, the first electronic device detects a service state of a first SIM card in the first electronic device based on an IMS of a network of the second electronic device.

It should be noted that the D2D technology (device to device communication, referred to as device-to-device communication technology for short, or D2D technology) refers to a communication method for directly performing communication between two peer user nodes. In a distributed network consisting of D2D communication users, each user node can send and receive signals and has an automatic routing (message forwarding) function. Participants of the network share a portion of the hardware resources they own, including information processing, storage, and network connectivity capabilities. These shared resources provide services and resources to the network that can be accessed directly by other users without going through intermediate entities. In a D2D communication network, user nodes play the role of both server and client.

Specifically, the following D2D communication scenario may be applied in the embodiment of the present application. Assuming that a user needs to use the first electronic device and the third electronic device for communication, and neither the first electronic device nor the second electronic device can directly establish a connection based on the base station, the user may establish a connection between the first electronic device and the second electronic device based on the D2D technology, and then the user may use the first electronic device to initiate a call or send a short message to the third electronic device through the second electronic device. Wherein the second electronic device functions as a router and the user transfers calls or forwards messages.

It should be noted that, in the embodiment of the present application, reference may be made to related technologies for implementing connection establishment between the first electronic device and the second electronic device based on a D2D technology, which is not described in detail herein.

Optionally, a Subscriber Identity Module (SIM) is a network access certificate of the user of the electronic device, which is referred to as a SIM card for short. A network system (e.g., global system for mobile communications (GSM), code Division Multiple Access (CDMA), and Wideband Code Division Multiple Access (WCDMA)) identifies a subscriber identity through a SIM card, the same SIM card can be used in different electronic devices, and one electronic device can use multiple SIM cards if a hardware function is provided.

Optionally, in this embodiment of the present application, an IP Multimedia System (IMS) is a network architecture in a new multimedia service form. Abbreviated IMS. IMS can be used by a variety of networks based on registration. The registration information of the IMS includes the SIM card having IMS capability and allowed services. For example, voice over long term evolution (VoLTE), voice over wireless fidelity (VoWiFi), and the like. When the SIM card is inserted into the electronic device, the electronic device may initiate an IMS network registration procedure. Specifically, in the case that the SIM card inserted into the electronic device is an IMS-capable SIM card (e.g., voLTE or VoWiFi), the call module in the electronic device may initiate an IMS network attach and registration procedure.

It should be noted that, in the embodiment of the present application, the detecting the registration information of the IMS of the first SIM card is mainly used to detect whether the first SIM card is allowed to use the VoLTE or VoWiFi service based on the network of the second electronic device. That is, the network of the second electronic device is the network on which the second electronic device originally resides before the first electronic device establishes the D2D connection with the second electronic device. The selection of the network is determined by the previous protocol of the second electronic device and the network selection method.

For example, it is assumed that before the first electronic device establishes the D2D connection with the second electronic device, the second electronic device is on the GSM, and when the first electronic device establishes the D2D connection with the second electronic device, the first electronic device directly detects whether the first SIM card can perform IMS registration based on the GSM on which the second electronic device is on the home network, that is, detects whether the GSM on the home network can use the VoLTE or VoWiFi service.

It should be noted that, in the present embodiment, the service status of one SIM card (e.g., the first SIM card) includes: there are two states, IMS service and no IMS service. Specifically, IMS services indicate that the SIM card is capable of initiating a call request based on IMS, e.g., allowed to initiate a call request using VoLTE or VoWiFi services. No IMS service means that the SIM card cannot initiate a call request based on IMS. In the case of good network signals, voLTE or VoWiFi can set up a call more quickly.

It should be noted that, as for the detection method for detecting the service state of the first SIM card by the first electronic device, reference may be made to related technologies, and the embodiment of the present application is not limited in particular.

In addition, in this embodiment of the application, the first SIM card is a SIM card used by the current first electronic device and the current second electronic device to establish a connection based on D2D.

And 102, under the condition that the first SIM card has the IMS service, the first electronic equipment uses the first SIM card to initiate a call request through the second electronic equipment.

Optionally, in this embodiment of the present application, the initiating of the call request means that the first electronic device may initiate a call to the third electronic device by using the first SIM card through the IMS. Wherein the call number of the third electronic device is an emergency call number, for example, 110, 120, 119, etc. The user may seek assistance by calling the emergency number.

It should be noted that, the above-mentioned that the first electronic device uses the first SIM card to initiate the call request through the second electronic device means that the first electronic device and the second electronic device establish a connection based on D2D, so that the call information of the first SIM card of the first electronic device can be forwarded through the second electronic device. That is, the second electronic device acts as an intermediate route for forwarding the call information of the first SIM card to the third electronic device through the communication network of the second electronic device.

Step 103, under the condition that the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, the first electronic device detects the service state of the data service of the second electronic device, and initiates the call request or sends a short message through the second electronic device.

Optionally, in this embodiment of the present application, one possible implementation manner is: under the condition that the second electronic equipment establishes the data service, the first electronic equipment uses the data service of the second electronic equipment to initiate a call request and/or send information (the information is information sent based on the data service); and under the condition that the second electronic equipment does not establish the data service, the first electronic equipment uses the first SIM card to send a short message (the short message is sent based on the non-data service) through the second electronic equipment. Another possible implementation is: under the condition that the second electronic equipment establishes the data service, the first electronic equipment initiates a call request by using the data service of the second electronic equipment; and under the condition that the second electronic equipment does not establish the data service, the first electronic equipment uses the first SIM card to send a short message (the short message is sent based on the non-data service) through the second electronic equipment.

The following examples are specifically described by taking the second embodiment as an example.

Optionally, in this embodiment of the application, "initiate a call request or send a short message through the second electronic device" in step 103 may be specifically implemented through step 103a and step 103b described below.

Step 103a, if the second electronic device has established the data service, the first electronic device initiates a call request using the data service of the second electronic device.

It should be noted that, in this embodiment of the application, if the second electronic device already establishes the data service, it is indicated that the second electronic device can access the internet, so that the second electronic device can use the internet for communication.

Optionally, in this embodiment of the application, the second electronic device may initiate the call request based on a voice over IP transmission technology. Among them, voice over internet protocol (VoIP) is a voice call technology, and a voice call and a multimedia conference are achieved through Internet Protocol (IP), that is, communication is performed through the internet. VoIP can be used in many internet access devices including VoIP phones, smart phones, personal computers, and to communicate and send messages via cellular networks and WiFi.

It should be noted that, when the first electronic device initiates a call by using the data service of the second electronic device, the first electronic device accesses the network based on the IP address of the second electronic device, so that the third electronic device receives a call request of the second electronic device, that is, the call request of the first electronic device is transferred to the call by the fact that the data service of the second electronic device is used.

Optionally, in this embodiment of the present application, when the second electronic device has established the data service, the second electronic device may further send a short message to the third electronic device based on the VoIP, where the short message may include address information of the first electronic device, address information of the second electronic device, help-seeking information of the user, and the like.

Step 103b, if the second electronic device does not establish the data service, or the second electronic device using the established data service fails to initiate the call request, the first electronic device uses the first SIM card to send the short message through the second electronic device.

It should be noted that, the step 103a and the step 103b are alternatively executed, and the determination is specifically performed according to whether the second electronic device establishes the data service.

Optionally, in this embodiment of the application, because the second electronic device does not establish the data service, the second electronic device detects another short message channel (for example, a short message channel provided by an operator corresponding to the SIM card of the second electronic device, that is, a network on which the second electronic device resides), and when the other short message channel is allowed to be used, the first electronic device uses the first SIM card to send the short message through the network on which the second electronic device resides.

It can be understood that, in the case that the second electronic device has established the data service, the first electronic device may initiate a call request through the data service; in the case that the second electronic device does not establish the data service, or the second electronic device using the established data service fails to initiate the call request, the first electronic device may use the first SIM card to send the short message through the second electronic device. Therefore, the first electronic equipment can flexibly select to initiate a call request through the Internet or send a short message through a short message channel according to whether the second electronic equipment establishes a data service. Therefore, the help seeking modes are enriched, the probability of successful calling is increased, the rescue probability of the user is further improved, and the risk of the user is reduced.

It should be noted that the short message channel for sending the short message in step 103b is a channel of a non-data service, that is, the short message in step 103b is sent in a non-internet manner.

The embodiment of the application provides a calling method, which includes that under the condition that first electronic equipment establishes connection with second electronic equipment through a device-to-device (D2D) technology, the service state of a first Subscriber Identity Module (SIM) card in the first electronic equipment based on an internet protocol multimedia subsystem (IMS) of a network of the second electronic equipment is detected; under the condition that the first SIM card has IMS service, initiating a call request through the second electronic equipment by using the first SIM card; and under the condition that the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, detecting the service state of the data service of the second electronic equipment, and initiating the call request or sending a short message through the second electronic equipment. Through the method, the first electronic equipment can establish connection with the second electronic equipment through a D2D technology, and when the first SIM card has an IMS service, the first SIM card is used for initiating a call request through the second electronic equipment; and when the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, initiating the call request or sending a short message through the network of the second electronic equipment. That is, when the first electronic device cannot be connected to the network, the second electronic device may be connected through D2D and indirectly transmit a call request or a short message using the second electronic device as an intermediate route. Therefore, the phenomenon that the user cannot be rescued in time due to the communication failure caused by network abnormality can be effectively avoided, and the rescue probability of the user is improved.

Optionally, with reference to fig. 1, as shown in fig. 2, the first electronic device may further include: a second SIM card, the second SIM card being different from the first SIM card. After step 103, the calling method provided in the embodiment of the present application further includes the following steps 104 to 106.

And 104, under the condition that the first SIM card fails to initiate a call and send a short message through the second electronic equipment, displaying first prompt information on an interface of the first electronic equipment.

The first prompt message is used for prompting the user to switch the first SIM card into the second SIM card.

Optionally, in this embodiment of the application, the first prompt message is used to prompt the user to switch the first SIM card to the second SIM card. The first prompting message is not limited to characters, pictures, videos and combinations thereof. In an actual use process, the electronic device may display the first prompt information while accompanying other special effects or prompts, and is not limited to vibration of the electronic device, flashing of a breathing light, display of special-effect animation or pictures on a screen, and the like, and may be determined according to actual use requirements, and the embodiment of the present application is not particularly limited.

It should be noted that, in the case that the first electronic device includes multiple SIM cards, the first prompt information is used to prompt the user to determine a second SIM card in the multiple SIM cards, and switch the current first SIM card to the second SIM card.

In addition, the display position, the display size and the specific display mode of the first prompt message are not specifically limited in the embodiment of the application, and can be determined according to actual use requirements.

Optionally, in this embodiment of the application, the difference between the first SIM card and the second SIM card means that operators of the first SIM card and the second SIM card are different. Therefore, when the call request of the first electronic device fails due to the fact that the network coverage of one operator is not enough, the user can trigger the first electronic device to switch the networks of other operators different from the operator to perform the call attempt again, and the rescue probability of the user is improved.

Optionally, in this embodiment of the application, that initiating a call and sending a short message by using the first SIM card through the second electronic device both fail means that, within the target threshold duration, the second electronic device does not establish an emergency call through the IMS service, the data service, and the short message channel. The target threshold duration may be set according to actual usage requirements, for example, 20 seconds, 30 seconds, 40 seconds, and the like.

Step 105, the first electronic device receives a first input of the first prompt message.

Optionally, in this embodiment of the application, the first input is used to trigger the first electronic device to reestablish the D2D connection between the second SIM card after the first SIM card is replaced with the second SIM card and the second electronic device. Specifically, the first input may be a touch input (e.g., a click, a double click, a long press, a drag along a preset trajectory, etc.) to the prompt message, a voice input to the electronic device, or a preset physical key input to the electronic device. The determination may be specifically performed according to actual use requirements, and the present application is not particularly limited.

And 106, the first electronic equipment responds to the first input, reestablishes the D2D connection with the second electronic equipment through the switched second SIM card, and reinitiates a call request or sends a short message through the second electronic equipment.

It should be noted that, when the first electronic device reestablishes the D2D connection with the second electronic device using the switched second SIM card, the first electronic device may replace the first SIM card with the second SIM card, and repeatedly perform the above step 102 and step 103 (including step 103a and step 103 b). That is, the step of initiating a call after the first electronic device reestablishes the D2D connection with the second electronic device through the second SIM card is the same as the case of reestablishing the D2D connection between the first SIM card and the second electronic device.

Optionally, in this embodiment of the application, in an actual use process, the foregoing step 104 and step 105 may also be omitted, so that user input is not required, and the electronic device may automatically switch the first SIM card to the second SIM card and call again when the electronic device directly determines that both of the electronic devices fail (that is, directly execute step 106). The specific implementation mode is as follows: under the condition that the first SIM card fails to initiate a call and send a short message through the second electronic device, the first electronic device can reestablish a D2D connection with the second electronic device through the second SIM card, and reinitiate a call request or send a short message through the second electronic device.

For example, assuming that a user establishes a D2D connection with a second electronic device using a first SIM card of a first electronic device, the user makes 120 a call with the first SIM card through the second electronic device. If the call is not connected within 40 seconds (i.e., the target threshold duration), a first prompt message "please confirm that the first SIM card is switched to the second SIM card and continue to call" may be displayed in the call interface of the first electronic device. The user can click the 'confirm' virtual key in the first prompt message, further trigger the first electronic device to establish a D2D connection with the second electronic device again through the switched second SIM card, and initiate a call request or send a short message through an IMS service, a data service and the like of the second electronic device.

It can be understood that, when the call initiation or the short message sending by using the first SIM card through the second electronic device fails, the electronic device may display the first prompt information, and according to the operation of the user on the first prompt information, trigger the electronic device to switch the first SIM card of the first electronic device to the second SIM card, and establish a connection with the second electronic device based on D2D again, and initiate a call request or send a short message through the newly established D2D connection using the IMS service, the data service, and the like of the second electronic device. Therefore, the user can manually control the switching of the SIM cards to continue calling according to the calling result feedback of the first electronic device, so that the probability of successful calling is increased by trying different SIM cards to call, the rescue probability of the user is further improved, and the risk of the user is reduced.

Optionally, in conjunction with fig. 1, as shown in fig. 3, the second electronic device includes a third SIM card; and the first SIM card and the third SIM card establish D2D connection. Before the step 103 of "detecting the service state of the data service of the second electronic device", the calling method provided in the embodiment of the present application further includes the following step 107, and accordingly, the step 103 of "detecting the service state of the data service of the second electronic device, and initiating a call request or sending a short message through the second electronic device" may be specifically implemented through the following steps 103c to 103e, where the step 103d and the step 103e are selected to be executed.

And step 107, under the condition that the first SIM card does not have the IMS service, the first electronic equipment determines a first access network according to the wireless access type of the third SIM card, and initiates a call request through the first access network by using the first SIM card.

Optionally, in this embodiment of the application, the first access network is a network corresponding to a wireless access type of the third SIM card. That is, the first electronic device may fall back to the 2G or 3G network for calling when the first SIM card does not have the IMS service.

For example, assuming that the third SIM card is a mobile network, the first access network is GSM. Assuming that the third SIM card is a connected network, the first access network is WCDMA.

And 103c, under the condition that the call request initiated through the first access network fails, the second electronic equipment detects the service state of the data service of the third SIM card.

Optionally, in this embodiment of the application, the specific matter manner for detecting the service state of the data service of the third SIM card may be: under the condition that the call requests initiated through the first access network fail, the first electronic equipment sends first information (the first information is used for indicating the second electronic equipment to detect the service state of the data service of the SIM card) to the second electronic equipment, the second electronic equipment receives the first information, self-checks the service state of the data service of the third SIM card according to the target information, and sends the detection result to the first electronic equipment in the form of second information. Wherein the first information and the second information are both sent over a D2D connection. The second information includes: the third SIM card establishes data service and the third SIM card does not establish data service.

Step 103d, if the data service is established by the third SIM card, the first electronic device initiates a call request through the data service of the third SIM card.

It should be noted that, the "data service call initiation request through the third SIM card" in step 103d may specifically refer to the specific description in step 103a, for example, the call initiation request is based on VoIP

Optionally, in this embodiment of the application, the first electronic device initiates the call request through the data service of the third SIM card by using a VoIP phone, where the VoIP phone may be implemented based on a cellular network of the third SIM card.

It should be noted that, when the first electronic device initiates a call by using the data service of the third SIM card, the call is accessed based on the address (i.e., IP address) of the third SIM card, so that the third electronic device receives a call request of the third SIM card of the second electronic device, that is, the call request of the first electronic device is forwarded to the call by using the data service fact of the third SIM card.

And 103e, if the second electronic equipment does not establish the data service or the call request initiated by the data service based on the third SIM card fails, the first electronic equipment sends the short message through the third SIM card.

It should be noted that, in this embodiment of the application, reference may be made to the specific description in the step 103b for the specific implementation process of the first electronic device sending the short message through the third SIM card, which is not described herein again.

In addition, the step 103d and the step 103e are alternatively executed, and the determination is specifically performed according to whether the third SIM card establishes the data service.

Optionally, in this embodiment of the application, the third SIM card may send a short message to a third electronic device through a short message channel corresponding to the third SIM card. The determination of the short message channel may refer to the specific description in step 103b, which is not described herein again.

It should be noted that the short message channel for sending the short message in step 103b is a channel of a non-data service, that is, the short message in step 103b is sent in a non-internet manner.

It can be understood that, in the case that the first SIM card does not have the IMS service, the first electronic device determines the first access network according to the wireless access type of the third SIM card, and initiates a call request through the first access network using the first SIM card; then, under the condition that the call request initiated through the first access network fails, the first electronic device determines to initiate the call request by using the data service of the third SIM card or send a short message through a short message channel of the third SIM card according to the service state of the data service of the third SIM card and the call request initiation failure based on the data service of the third SIM card. Therefore, the first electronic device can flexibly select to initiate a call request through the internet or send a short message through a short message channel according to whether the third SIM card establishes a data service. Therefore, the help seeking mode is enriched, the situation that the calling is stopped after the calling request initiated by the first SIM card through the first access network fails is avoided, the successful calling probability is increased, the rescue probability of the user is improved, and the risk of the user is reduced.

Optionally, in this embodiment of the application, the second electronic device may further include a fourth SIM card. In the case that both initiating a call and sending a short message through the third SIM card fail, the call method provided in the embodiment of the present application may further include the following step 108.

And step 108, the first electronic device controls the first SIM card and the fourth SIM card to reestablish the D2D connection, and reinitiates a call request or sends a short message through the fourth SIM card.

Optionally, in this embodiment of the present application, the second electronic device may also include a third SIM card and a fourth SIM card, and in a case that the first SIM card of the first electronic device is connected to the third SIM card of the second electronic device in a D2D manner, and initiating a call or sending a short message through the third SIM card fails, the first electronic device may control the first SIM card to disconnect from the D2D connection with the third SIM card, and reestablish the D2D connection with the fourth SIM card. Then, the first SIM card may reinitiate the call request or send the short message through the fourth SIM card that reestablishes the connection.

It should be noted that, in this embodiment of the application, the specific step of reinitiating the call request or sending the short message through the fourth SIM card may refer to the specific implementation of initiating the call request or sending the short message through the first SIM card, that is, refer to the steps 103c to 103e.

It can be understood that, in the case that the second electronic device includes a plurality of SIM cards, when the SIM card of the second electronic device connected to the first electronic device D2D fails to initiate a call and send a short message, the first electronic device may reestablish a D2D connection with another SIM card of the second electronic device, and reinitiate a call request or send a short message through the another SIM card. Therefore, the SIM card in the D2D connected second electronic equipment is changed by trying to change the calling channel, so that the successful calling probability is increased, the rescue probability of the user is improved, and the risk of the user is reduced.

It should be noted that, in the calling method provided in the embodiment of the present application, the execution subject may be a calling device, or a control module in the calling device for executing the calling method. In the embodiment of the present application, a method for a calling device to execute a call is taken as an example, and the device provided in the embodiment of the present application is described.

As shown in fig. 4, the present embodiment provides a

calling device

400. The calling

device

400 may include: a

detection module

401 and a

processing module

402. The detecting

module

401 may be configured to detect, when a first electronic device establishes a connection with a second electronic device through a device-to-device D2D technology, a service state of an IMS of a network of the second electronic device based on a first SIM card in the first electronic device. The

processing module

402 may be configured to initiate a call request by using the first SIM card through the second electronic device in a case where the first SIM card has an IMS service. The

processing module

402 may be further configured to detect a service status of the data service of the second electronic device and initiate a call request or send a short message through the second electronic device when the first SIM card does not have the IMS service or the first SIM card having the IMS service fails to initiate the call request.

Optionally, in this embodiment of the application, the

processing module

402 may be specifically configured to initiate a call request by using a data service of the second electronic device if the second electronic device has established the data service; and if the second electronic equipment does not establish the data service or the second electronic equipment using the established data service fails to initiate the call request, the first SIM card is used for sending the short message through the second electronic equipment.

Optionally, with reference to fig. 4, as shown in fig. 5, the first electronic device further includes a second SIM card, where the second SIM card is different from the first SIM card; the

calling device

400 further includes: a

display module

403 and a

receiving module

404. The

display module

403 may be configured to display first prompt information on an interface of the first electronic device when the first SIM card fails to initiate a call and send a short message through the second electronic device, where the first prompt information is used to prompt a user to switch the first SIM card to the second SIM card. The receiving

module

404 may be configured to receive a first input of first prompt information. The

processing module

402 may be further configured to, in response to the first input, reestablish a D2D connection with the second electronic device through the switched second SIM card, and reinitiate a call request or send a short message through the second electronic device.

Optionally, in this embodiment of the application, the second electronic device includes a third SIM card; and the first SIM card and the third SIM card establish D2D connection. The

processing module

402 may be further configured to determine a first access network according to the wireless access type of the third SIM card before detecting the service status of the data service of the second electronic device, and initiate a call request through the first access network using the first SIM card. The detecting

module

401 may be specifically configured to detect a service state of the data service of the third SIM card when the call request initiated by the first access network fails. The

processing module

402 may be specifically configured to initiate a call request through the data service of the third SIM card if the data service is already established by the third SIM card; and if the third SIM card does not establish the data service or the call request initiated based on the data service of the third SIM card fails, sending the short message through the third SIM card.

Optionally, in this embodiment of the application, the second electronic device further includes a fourth SIM card. The

processing module

402 may be further configured to control the first SIM card and the fourth SIM card to reestablish the D2D connection, and reinitiate the call request or send the short message through the fourth SIM card, under the condition that initiating the call and sending the short message through the third SIM card both fail.

The calling device in the embodiment of the present application may be a functional entity and/or a functional module in an electronic device, which executes a calling method, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiment of the present application is not particularly limited.

The calling device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.

The calling device provided in the embodiment of the present application can implement each process implemented by the calling device in the method embodiments of fig. 1 to fig. 5, and is not described herein again to avoid repetition.

The embodiment of the application provides a calling device, which detects the service state of a first SIM card in first electronic equipment based on an IMS (IP multimedia subsystem) of a network of second electronic equipment under the condition that the first electronic equipment establishes connection with the second electronic equipment through a device-to-device (D2D) technology; under the condition that the first SIM card has IMS service, initiating a call request through the second electronic equipment by using the first SIM card; and under the condition that the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, detecting the service state of the data service of the second electronic equipment, and initiating the call request or sending a short message through the second electronic equipment. Through the method, the first electronic equipment can be connected with the second electronic equipment through a D2D technology, and when the first SIM card has IMS service, the first SIM card is used for initiating a call request through the second electronic equipment; and when the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, initiating the call request or sending a short message through the network of the second electronic equipment. That is, when the calling device cannot be connected to the network, it is possible to connect the second electronic device through D2D and indirectly transmit a call request or a short message using the second electronic device as an intermediate route. Therefore, the phenomenon that the user cannot be rescued in time due to the call failure caused by network abnormity can be effectively avoided, and the rescue probability of the user is improved.

Optionally, as shown in fig. 6, an

electronic device

600 is further provided in this embodiment of the present application, and includes a

processor

601, a

memory

602, and a program or an instruction stored in the

memory

602 and executable on the

processor

601, where the program or the instruction is executed by the

processor

601 to implement each process of the foregoing calling method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.

It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.

Fig. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

The

electronic device

2000 includes, but is not limited to: a

radio frequency unit

2001, a

network module

2002, an

audio output unit

2003, an

input unit

2004, a

sensor

2005, a

display unit

2006, a user input unit 2007, an

interface unit

2008, a

memory

2009, and a

processor

2010.

Among them, the

input unit

2004 may include a

graphic processor

20041 and a

microphone

20042, the

display unit

2006 may include a

display panel

20061, the user input unit 2007 may include a

touch panel

20071 and

other input devices

20072, and the

memory

2009 may be used to store software programs (e.g., an operating system, an application program required for at least one function), and various data.

Those skilled in the art will appreciate that the

electronic device

2000 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the

processor

2010 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 7 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.

The

radio frequency unit

2001 may be configured to detect a service state of a first SIM card in a first electronic device based on an IMS of a network of a second electronic device when the first electronic device establishes a connection with the second electronic device through a device-to-device D2D technology. The

processor

2010 may be configured to initiate a call request using the first SIM card through the second electronic device in a case where the first SIM card has the IMS service. The

processor

2010 may be further configured to detect a service status of a data service of the second electronic device and initiate a call request or send a short message through the second electronic device when the first SIM card does not have the IMS service or has the IMS service.

The embodiment of the application provides an electronic device, which detects a service state of a first SIM card in a first electronic device based on an IMS of a network of a second electronic device, when the first electronic device establishes a connection with the second electronic device through a device-to-device D2D technology; under the condition that the first SIM card has the IMS service, initiating a call request through the second electronic equipment by using the first SIM card; and under the condition that the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, detecting the service state of the data service of the second electronic equipment, and initiating the call request or sending a short message through the second electronic equipment. Through the method, the first electronic equipment can be connected with the second electronic equipment through a D2D technology, and when the first SIM card has IMS service, the first SIM card is used for initiating a call request through the second electronic equipment; and when the first SIM card does not have the IMS service or the first SIM card with the IMS service fails to initiate the call request, initiating the call request or sending a short message through the network of the second electronic equipment. That is, when the first electronic device cannot be connected to the network, the second electronic device may be connected through D2D and indirectly transmit a call request or a short message using the second electronic device as an intermediate route. Therefore, the phenomenon that the user cannot be rescued in time due to the call failure caused by network abnormity can be effectively avoided, and the rescue probability of the user is improved.

Optionally, in this embodiment of the application, the

processor

2010 may be specifically configured to initiate a call request by using the data service of the second electronic device if the second electronic device has established the data service; and if the second electronic equipment does not establish the data service, the first SIM card is used for sending the short message through the second electronic equipment.

It can be understood that, in a case where the second electronic device has established the data service, the first electronic device may initiate a call request through the data service; under the condition that the second electronic device does not establish the data service or the second electronic device using the established data service fails to initiate the call request, the first electronic device may use the first SIM card to send the short message through the second electronic device. Therefore, the first electronic equipment can flexibly select to initiate a call request through the Internet or send a short message through a short message channel according to whether the second electronic equipment establishes a data service. Therefore, help seeking modes are enriched, the probability of successful calling is increased, the rescue probability of the user is further improved, and the risk of the user is reduced.

Optionally, in this embodiment of the application, the first electronic device further includes a second SIM card, where the second SIM card is different from the first SIM card. The

display unit

2006 may be configured to display first prompt information on an interface of the first electronic device when the first SIM card fails to initiate a call and send a short message through the second electronic device, where the first prompt information is used to prompt a user to switch the first SIM card to the second SIM card. The user input unit 2007 may be configured to receive a first input of the first prompt message. The

processor

2010 may be further configured to re-establish a D2D connection with the second electronic device through the switched second SIM card in response to the first input, and re-initiate a call request or send a short message through the second electronic device.

It can be understood that, under the condition that the second electronic device fails to initiate a call or send a short message by using the first SIM card, the electronic device may display the first prompt information, and trigger the electronic device to switch the first SIM card of the first electronic device to the second SIM card according to the operation of the user on the first prompt information, and re-establish a connection with the second electronic device based on D2D, and initiate a call request or send a short message by using an IMS service, a data service, and the like of the second electronic device through the newly established D2D connection. Therefore, the user can manually control the switching of the SIM cards to continue calling according to the calling result feedback of the first electronic device, so that the probability of successful calling is increased by trying different SIM cards to call, the rescue probability of the user is further improved, and the risk of the user is reduced.

Optionally, in this embodiment of the application, the second electronic device includes a third SIM card; and the first SIM card and the third SIM card establish D2D connection. The

processor

2010 may be further configured to determine a first access network according to the wireless access type of the third SIM card before detecting the service status of the data service of the second electronic device, and initiate a call request through the first access network using the first SIM card. The

radio frequency unit

2001 may be specifically configured to detect a service state of the data service of the third SIM card when the call request initiated by the first access network fails. The

processor

2010 may be specifically configured to initiate a call request through the data service of the third SIM card if the third SIM card has already established the data service; and if the third SIM card does not establish the data service or the call request initiated based on the data service of the third SIM card fails, sending the short message through the third SIM card.

It can be understood that, in the case that the first SIM card does not have the IMS service, the first electronic device determines the first access network according to the wireless access type of the third SIM card, and initiates a call request through the first access network using the first SIM card; then, under the condition that the call request initiated through the first access network fails, the first electronic device determines to initiate the call request by using the data service of the third SIM card or send a short message through a short message channel of the third SIM card according to the service state of the data service of the third SIM card and the call request initiation failure based on the data service of the third SIM card. Therefore, the first electronic equipment can flexibly select to initiate a call request through the Internet or send a short message through a short message channel according to whether the third SIM card establishes the data service. Therefore, the help seeking mode is enriched, the situation that the calling is stopped after the calling request initiated by the first SIM card through the first access network fails is avoided, the successful calling probability is increased, the rescue probability of the user is improved, and the risk of the user is reduced.

Optionally, in this embodiment of the application, the second electronic device further includes a fourth SIM card. The

processor

2010 may be further configured to control the first SIM card and the fourth SIM card to reestablish the D2D connection when initiating the call and sending the short message through the third SIM card both fail, and reinitiate the call request or send the short message through the fourth SIM card.

It can be understood that, in a case where the second electronic device includes a plurality of SIM cards, when the SIM card of the second electronic device connected to the first electronic device D2D fails to initiate a call and send a short message, the first electronic device may reestablish a D2D connection with another SIM card of the second electronic device, and reinitiate a call request or send a short message through the another SIM card. Therefore, the SIM card in the D2D connected second electronic equipment is changed by trying to change the calling channel, so that the successful calling probability is increased, the rescue probability of the user is improved, and the risk of the user is reduced.

The beneficial effects of the various implementation manners in this embodiment may specifically refer to the beneficial effects of the corresponding implementation manners in the above method embodiments, and are not described herein again to avoid repetition.

The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the foregoing call method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.

The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.

The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above-mentioned call method embodiment, and can achieve the same technical effect, and details are not repeated here to avoid repetition.

It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatuses in the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions recited, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.

While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.