Communication method and device, electronic equipment and storage medium

By establishing a data channel through a second communication card, obtaining the gateway address, and connecting to the target server, the limitations of VoWiFi technology within WiFi coverage area are resolved, enabling voice calls and SMS services in areas without WiFi coverage.

CN121968073APending Publication Date: 2026-05-01BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

VoWiFi technology requires WiFi coverage to enable voice calls and SMS services, which has limitations.

Method used

By establishing a target data channel through the second communication card, obtaining the target gateway address of the first communication card, and connecting to the target server to achieve communication, the reliance on WiFi coverage is avoided.

Benefits of technology

Enabling voice calls and SMS services in the absence of WiFi coverage improves communication flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968073A_ABST
    Figure CN121968073A_ABST
Patent Text Reader

Abstract

The invention relates to a communication method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to a communication request based on a first communication card, establishing a target data channel through a second communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used for enabling the electronic equipment to be connected with the Internet; acquiring a target gateway address of the first communication card based on the target data channel; and based on the target gateway address, connecting a target server corresponding to the first communication card, so that the electronic equipment performs a call based on the first communication card. According to the method, the target number of channels are established through the second call card to assist the first call card in call, voice call and short message service can be realized without being in a WiFi coverage range, the limitation of needing to be in the WiFi coverage range is avoided, and the communication flexibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a communication method, apparatus, electronic device and storage medium. Background Technology

[0002] VoWiFi (Voice over WiFi) is a technology that provides voice calls and text messaging services via WiFi (Wireless Fidelity) networks instead of traditional cellular networks. VoWiFi allows users to initiate and receive voice calls and send text messages even without a cellular signal, provided their electronic devices are within WiFi coverage. However, VoWiFi technology has limitations; it requires WiFi coverage to access the IMS (Internet Protocol Multimedia Subsystem) network for voice calls and text messaging, which presents a limitation. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a communication method, apparatus, electronic device, and storage medium.

[0004] According to a first aspect of the present disclosure, a communication method is provided, the method comprising:

[0005] In response to a communication request based on a first communication card, a target data channel is established through a second communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable the electronic device to connect to the Internet.

[0006] Based on the target data channel, obtain the target gateway address of the first communication card;

[0007] Based on the target gateway address, the electronic device connects to the target server corresponding to the first communication card, so that the electronic device can communicate based on the first communication card.

[0008] In some embodiments, establishing a target data channel via a second communication card in response to a communication request based on a first communication card includes:

[0009] Upon entering the target communication mode, in response to the communication request, the target data channel is established through the second communication card;

[0010] The target communication mode refers to the mode in which the first communication card is allowed to use communication assistance functions in the target scenario corresponding to the target communication mode, and the communication assistance function refers to the function of assisting non-data cards to communicate based on the data card.

[0011] In some embodiments, before establishing the target data channel via the second communication card in response to the communication request upon entering the target communication mode, the method further includes:

[0012] When the communication assistance function is enabled, the target communication mode is set to the first communication mode; the target scenario corresponding to the first communication mode is a no-service scenario.

[0013] When the first communication card and the second communication card meet the preset conditions, the target communication mode is updated from the first communication mode to the second communication mode; the target scenario corresponding to the second communication mode includes at least one of the following: no service scenario, weak network scenario, roaming scenario, and dual-SIM dual-pass service concurrent scenario.

[0014] In some embodiments, the preset conditions include at least one of the following:

[0015] The first communication card is in a roaming scenario, while the second communication card is not in a roaming scenario;

[0016] The first preset service is performed using the mobile data of the second communication card, but the smart dual-card function is not enabled. The smart dual-card function refers to the function of automatically switching between the two communication cards as a data card and a non-data card.

[0017] The second preset service is performed using the mobile data of the second communication card, and dual-SIM dual-pass is not supported;

[0018] The signal quality of the first communication card is less than a preset threshold.

[0019] In some embodiments, the method further includes:

[0020] When the first communication card and the second communication card do not meet the preset conditions, the target communication mode remains unchanged as the first communication mode.

[0021] In some embodiments, before updating the target communication mode from the first communication mode to the second communication mode when the first communication card and the second communication card meet preset conditions, the method further includes:

[0022] When the electronic device is in a screen-on state, determine whether the first communication card and the second communication card meet the preset conditions.

[0023] In some embodiments, after connecting to the target server corresponding to the first communication card based on the target gateway address, so that the electronic device can communicate based on the first communication card, the method further includes:

[0024] When the electronic device is in a screen-off state, if communication based on the first communication card has ended, the target communication mode is set to the first communication mode.

[0025] According to a second aspect of the present disclosure, a communication device is provided, the device comprising:

[0026] A channel establishment module is configured to establish a target data channel via a second communication card in response to a communication request based on a first communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable an electronic device to connect to the Internet.

[0027] The address acquisition module is configured to acquire the target gateway address of the first communication card based on the target data channel;

[0028] The communication module is configured to connect to the target server corresponding to the first communication card based on the target gateway address, so that the electronic device can communicate based on the first communication card.

[0029] In some embodiments, the channel establishment module is configured to:

[0030] Upon entering the target communication mode, in response to the communication request, the target data channel is established through the second communication card;

[0031] The target communication mode refers to the mode in which the first communication card is allowed to use communication assistance functions in the target scenario corresponding to the target communication mode, and the communication assistance function refers to the function of assisting non-data cards to communicate based on the data card.

[0032] In some embodiments, the apparatus further includes:

[0033] The mode setting module is configured to set the target communication mode to a first communication mode when the communication assistance function is enabled; the target scenario corresponding to the first communication mode is a no-service scenario.

[0034] The mode setting module is further configured to update the target communication mode from the first communication mode to the second communication mode when the first communication card and the second communication card meet preset conditions; the target scenario corresponding to the second communication mode includes at least one of the following: no-service scenario, weak network scenario, roaming scenario, and dual-SIM dual-pass service concurrent scenario.

[0035] In some embodiments, the preset conditions include at least one of the following:

[0036] The first communication card is in a roaming scenario, while the second communication card is not in a roaming scenario;

[0037] The first preset service is performed using the mobile data of the second communication card, but the smart dual-card function is not enabled. The smart dual-card function refers to the function of automatically switching between the two communication cards as a data card and a non-data card.

[0038] The second preset service is performed using the mobile data of the second communication card, and dual-SIM dual-pass is not supported;

[0039] The signal quality of the first communication card is less than a preset threshold.

[0040] In some embodiments, the mode setting module is further configured to keep the target communication mode unchanged as the first communication mode when the first communication card and the second communication card do not meet the preset conditions.

[0041] In some embodiments, the apparatus further includes:

[0042] The judgment module is configured to determine whether the first communication card and the second communication card meet the preset conditions when the electronic device is in a screen-on state.

[0043] In some embodiments, the mode setting module is configured to set the target communication mode to the first communication mode when the electronic device is in a screen-off state and communication with the first communication card has ended.

[0044] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0045] processor;

[0046] Memory used to store processor-executable instructions;

[0047] The processor is configured to perform the communication method as described in the first aspect of the embodiments of this disclosure.

[0048] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the communication method as described in the first aspect of the present disclosure.

[0049] The method described above, as disclosed in this invention, has the following beneficial effects:

[0050] The method provided in this disclosure, when a call needs to be made based on a first communication card, can establish a target data channel based on a second communication card, and obtain the target gateway address of the first communication card based on this target data channel to connect to the target server corresponding to the first communication card, enabling the electronic device to make calls based on the first communication card. Compared with VoWiFi in related technologies, this method of establishing a target data channel through a second communication card to assist the first communication card in making calls can realize voice calls and SMS services without being within WiFi coverage, avoiding the limitation of needing WiFi coverage and improving communication flexibility.

[0051] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0053] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment;

[0054] Figure 2 This is a schematic diagram illustrating a communication process according to an exemplary embodiment;

[0055] Figure 3 This is a flowchart illustrating a communication method according to an exemplary embodiment;

[0056] Figure 4 This is a flowchart illustrating a setting process for a target communication mode according to an exemplary embodiment;

[0057] Figure 5 This is a flowchart illustrating a setting process for a target communication mode according to an exemplary embodiment;

[0058] Figure 6 This is a block diagram illustrating a communication device according to an exemplary embodiment;

[0059] Figure 7 This is a block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0061] The communication method provided in this disclosure is executed by an electronic device, which can be a mobile phone, tablet computer, wearable device, or other device that can install two communication cards.

[0062] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment, performed by an electronic device, see [link to flowchart]. Figure 1 The method includes the following steps:

[0063] Step S101: In response to a communication request based on the first communication card, a target data channel is established through the second communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable the electronic device to connect to the Internet.

[0064] In this system, both the first and second communication cards can be SIM (Subscriber Identification Module) cards. The second communication card is a data card, and users can connect to the network via mobile data using the second communication card. This second communication card can also be called the primary card. The first communication card is a non-data card and can also be called the secondary card.

[0065] In this embodiment of the disclosure, since the first communication card is a non-data card and the second communication card is a data card, in response to a communication request based on the first communication card, if the first communication card cannot directly access the IMS network, a target data channel can be established through the second communication card. This target data channel refers to the DDS (Distributed Database System) data channel to enable the electronic device to connect to the Internet.

[0066] Step S102: Based on the target data channel, obtain the target gateway address of the first communication card.

[0067] After the target data channel is established, the electronic device connects to the Internet and can obtain the target gateway address of the first communication card from the Internet. This target gateway address refers to the target ePDG (Evolved Packet Data Gateway) address.

[0068] Optionally, a list of ePDG addresses usable by the electronic device can be obtained, and then, according to the priority of each ePDG address, the ePDG address with the highest priority is selected as the target ePDG address. Of course, other methods can also be used to obtain the target ePDG address, and the embodiments of this disclosure do not limit the implementation method of obtaining the target gateway address.

[0069] Step S103: Based on the target gateway address, connect to the target server corresponding to the first communication card so that the electronic device can communicate based on the first communication card.

[0070] After obtaining the target gateway address, the electronic device can connect to the target server corresponding to the first communication card based on that target network address. This target server refers to the IMS server corresponding to the first communication card. Connecting to the target server means enabling the first communication card to access the IMS network. After connecting to the target server corresponding to the first communication card, the electronic device can communicate based on the first communication card. This communication includes enabling voice calls and SMS services using the first communication card.

[0071] The method provided in this disclosure, when a call needs to be made based on a first communication card, can establish a target data channel based on a second communication card, and obtain the target gateway address of the first communication card based on this target data channel to connect to the target server corresponding to the first communication card, enabling the electronic device to make calls based on the first communication card. Compared with VoWiFi in related technologies, this method of establishing a target data channel through a second communication card to assist the first communication card in making calls can realize voice calls and SMS services without being within WiFi coverage, avoiding the limitation of needing WiFi coverage and improving communication flexibility.

[0072] See one example. Figure 2 The diagram shown illustrates the communication flow. Figure 2 Figure (a) in the figure is a schematic diagram of the communication process of VoLTE (Voice over Long-Term Evolution) in related technologies. Figure 2 Figure (b) in the diagram is a schematic diagram of the communication process of VoWiFi in related technologies. Figure 2 Figure (c) is a schematic diagram of the communication process of Voice-Link provided in an embodiment of this disclosure.

[0073] As shown in Figure (a), in the VoLTE communication process, the SIM1 card in the electronic device connects to the IMS server (i.e., SIM1 IMS Server) corresponding to the SIM1 card in the core network through the 3GPP ACCESS (i.e., base station) and the PGW (Packet Data Network Gateway) corresponding to the SIM1 card, thereby enabling communication based on the SIM1 card.

[0074] As shown in Figure (b), in the VoWiFi communication process, the SIM1 card in the electronic device connects to the Internet (i.e., External Network) through WiFi ACCESS (i.e., router), and then obtains the ePDG address of the SIM1 card from the ePDG / N3IWF (Non-3GPP InterWorking Function) corresponding to the SIM1 card through the Internet. Then, based on the ePDG address, it connects to the IMS server corresponding to the SIM1 card in the core network through the PGW corresponding to the SIM1 card, thereby enabling communication based on the SIM1 card.

[0075] As shown in Figure (c), in the Voice-Link communication process, SIM1 (data card) connects to the Internet through 3GPP ACCESS to establish a DDS data channel (the link represented by the dashed line in Figure (c)). Then, SIM2 (non-data card) obtains the target ePDG address of SIM2 from the ePDG / N3IWF corresponding to SIM2 based on this channel. Then, based on the target ePDG address, it connects to the IMS server (i.e., SIM2 IMSServer) corresponding to SIM2 in the core network through the PGW corresponding to SIM2. Unlike the 3GPP ACCESS in Figure (a), the 3GPP ACCESS in Figure (c) also includes the Internet PGW.

[0076] Figure 3 This is a flowchart illustrating a communication method according to an exemplary embodiment, see [link to flowchart]. Figure 3 Performed by electronic devices, see [link / reference] Figure 3 The method includes the following steps:

[0077] Step S301: When the communication assistance function is enabled, the target communication mode is set to the first communication mode.

[0078] The communication assistance function refers to the function of assisting a non-data card in communication based on a data card. In this embodiment, the communication assistance function is the function of assisting the first communication card in communication based on a second communication card. The target communication mode refers to the mode in which the first communication card is allowed to use the communication assistance function in the target scenario corresponding to the target communication mode. The target scenario corresponding to the first communication mode is a no-service scenario, that is, when the first communication card is in a no-service scenario, it can communicate based on the communication assistance function. A no-service scenario refers to a scenario without signal. This first communication mode can also be called OOS (Out of service) mode or other modes.

[0079] In this embodiment of the disclosure, when a user first enables the communication assistance function, the default target communication mode is the first communication mode. Subsequently, the target communication mode can be updated according to the actual situation.

[0080] In some embodiments, a switch corresponding to the communication assistance function is displayed in the settings interface, and the communication assistance function is enabled in response to the operation of turning on the switch.

[0081] In some embodiments, when updating the target communication mode according to the actual situation, it is necessary to consider whether the electronic device is in a screen-on state or a screen-off state. When the electronic device is in a screen-on state, it is determined whether the first communication card and the second communication card meet the preset conditions. Then, if the first communication card and the second communication card meet the preset conditions, step S302 is executed; if the first communication card and the second communication card do not meet the preset conditions, step S303 is executed. When the electronic device is in a screen-off state, if communication with the second communication card has ended, the target communication mode is set to the first communication mode. That is, regardless of the target communication mode of the electronic device during communication, the target communication mode will be reset to the first communication mode after communication ends. When the electronic device is in a screen-off state, if the electronic device has not made a call or sent / received SMS messages since the communication assistance function was enabled, the target communication mode remains the first communication mode.

[0082] In some embodiments, the preset conditions include at least one of the following: the first communication card is in a roaming scenario, and the second communication card is not in a roaming scenario; the first preset service is performed using the mobile data of the second communication card, and the smart dual-SIM function is not enabled, whereby the smart dual-SIM function refers to the function of automatically switching between the two communication cards as a data card and a non-data card; the second preset service is performed using the mobile data of the second communication card, and dual-SIM dual-pass is not supported; the signal quality of the first communication card is less than a preset threshold. The first preset service and the second preset service can be the same or different. For example, both the first and second preset services can be game services, or the first preset service can be a game and the second preset service can be a voice call service. Of course, the first and second preset services can also be other services, and this embodiment does not limit this. The preset threshold is a pre-set value; the signal quality of the first communication card being less than the preset threshold indicates that the current signal of the first communication card is weak, and the first communication card is in a weak network scenario.

[0083] If both the first and second communication cards meet the aforementioned preset conditions, it indicates that the first communication card is not currently in a no-service scenario, but rather in a weak network scenario, a roaming scenario, or a dual-SIM dual-standby concurrent service scenario. In this case, setting the target communication mode to the first communication mode will not meet the user's needs. If neither the first nor the second communication card meets the aforementioned preset conditions, it indicates that the first communication card is not currently in a weak network scenario, a roaming scenario, or a dual-SIM dual-standby concurrent service scenario. In this case, the first communication mode can meet the user's needs.

[0084] Specifically, when the first communication card and the second communication card meet the condition that the first communication card is in a roaming scenario and the second communication card is not in a roaming scenario, it means that the first communication card is currently in a roaming scenario, while the second communication card is not. In this case, if communication is to be conducted based on the first data card, the mobile data from the second communication card is needed to assist the first communication card in communication. When the first and second communication cards meet the condition of using the mobile data from the second communication card to execute a first preset service and the smart dual-SIM function is not enabled, it means that the electronic device cannot automatically switch between the first and second communication cards as data cards and non-data cards. At this time, the mobile data from the second communication card is being used to execute the preset service. If communication is to be conducted based on the first data card, the second communication card is needed to assist the first communication card in communication. If the first communication card needs to communicate using mobile data from the second communication card, then the first communication card needs to be assisted by mobile data from the second communication card. If the first and second communication cards meet the condition of using mobile data from the second communication card to execute the second preset service and do not support dual-SIM dual-pass, it means that the electronic device cannot currently support the first and second communication cards to execute services simultaneously. In this case, if communication is to be performed based on the first data card, then the first communication card needs to be assisted by mobile data from the second communication card. If the first and second communication cards meet the condition that the signal quality of the first communication card is less than a preset threshold, it means that the first communication card is currently in a weak network scenario. In this case, if communication is to be performed based on the first data card, then the first communication card needs to be assisted by mobile data from the second communication card.

[0085] Step S302: When the first communication card and the second communication card meet the preset conditions, the target communication mode is updated from the first communication mode to the second communication mode.

[0086] The target scenarios corresponding to the second communication mode include at least one of the following: no-service scenario, weak network scenario, roaming scenario, and dual-SIM dual-standby concurrent service scenario. In other words, under the second communication mode, the second communication card can assist in communication even when the first communication card is in any of these scenarios. A weak network scenario refers to a scenario where the signal quality of the communication card is below a preset threshold. A dual-SIM dual-standby concurrent service scenario refers to a scenario where the non-data card needs to communicate while the data card is performing a service. For example, playing games or watching live video on the second communication card while simultaneously making a voice call on the first communication card; or making a voice call on both the second and first communication cards. Updating the target communication mode from the first to the second communication mode means entering the second communication mode. The second communication mode can also be called the no-limit mode or other modes.

[0087] In some embodiments, when updating the target communication mode from a first communication mode to a second communication mode, a protection mechanism is set. If the protection mechanism determines that the update is possible, the target communication mode is updated from the first communication mode to the second communication mode. If the protection mechanism determines that the update is not possible, the first communication mode is maintained until the protection mechanism determines that the update is possible. For example, the protection mechanism can be a ping-pong protection mechanism or other protection mechanisms, and this disclosure does not limit this.

[0088] Step S303: When the first communication card and the second communication card do not meet the preset conditions, the target communication mode remains unchanged as the first communication mode.

[0089] Maintaining the target communication mode unchanged means entering the first communication mode.

[0090] Step S304: When entering the target communication mode, in response to the communication request, a target data channel is established through the second communication card.

[0091] When the target communication mode is entered, it indicates that the first communication card is allowed to use communication assistance functions in the target scenario corresponding to the target communication mode. Therefore, in response to a communication request, a target data channel is established through the second communication card. For example, if the target communication mode is the first communication mode and the first communication card is in a no-service scenario, then in response to a communication request, a target data channel is established through the second communication card; or, if the target communication mode is the second communication mode and the first communication card is in any of the following scenarios: no-service scenario, weak network scenario, roaming scenario, and dual-SIM dual-pass concurrent service scenario, then in response to a communication request, a target data channel is established through the second communication card.

[0092] Step S305: Based on the target data channel, obtain the target gateway address of the first communication card.

[0093] Step S306: Based on the target gateway address, connect to the target server corresponding to the first communication card so that the electronic device can communicate based on the first communication card.

[0094] The implementation methods for steps S305-S306 are the same as those in the above embodiments, and will not be repeated here.

[0095] In some embodiments, when determining whether the first communication card and the second communication card meet preset conditions, the determination process for each preset condition may or may not have a specific order. The following describes... Figure 4 and Figure 5 The illustrated embodiment uses the example of sequential judgment to explain the process of setting the target communication mode.

[0096] Figure 4This is a flowchart illustrating a setting process for a target communication mode according to an exemplary embodiment, performed by an electronic device. See also... Figure 4 The method includes the following steps:

[0097] Step S401: Power on the electronic device or exit flight mode.

[0098] Step S402: Check whether the communication assistance function is enabled. If the communication assistance function is enabled, proceed to step S403; if the communication assistance function is not enabled, proceed to step S402 again.

[0099] Step S403: Enter the first communication mode.

[0100] Step S404: Determine whether the screen is off. If the screen is off, proceed to step S404; if the screen is on, proceed to step S409.

[0101] Step S405: Determine if a Voice-Link call is currently in progress. If a Voice-Link call is currently in progress, proceed to step S406; otherwise, proceed to step S407.

[0102] Voice-Link call refers to a call made using the call method provided in the embodiments of this disclosure.

[0103] Step S406: Determine whether the Voice-Link call has ended. If the Voice-Link call has ended, proceed to step S404; if the Voice-Link call has not ended, proceed to step S406 again.

[0104] Step S407: Determine whether the communication assistance function is enabled. If the communication assistance function is enabled, proceed to step S408; if the communication assistance function is not enabled, proceed to step S404 again.

[0105] Step S408: Enter the first communication mode.

[0106] Step S409: Determine whether the primary card is not in a roaming scenario and whether the secondary card is in a roaming scenario. If the primary card is not in a roaming scenario and the secondary card is in a roaming scenario, proceed to step S417. If the primary card is in a roaming scenario and / or the secondary card is not in a roaming scenario, proceed to step S410.

[0107] Step S410: Determine whether the game is being played using the primary SIM card's mobile data and whether the Smart Dual SIM function is not enabled. If the game is being played using the primary SIM card's mobile data and the Smart Dual SIM function is not enabled, proceed to step S417. If the game is not being played using the primary SIM card's mobile data and / or the Smart Dual SIM function is enabled, proceed to step S411.

[0108] Step S411: Determine whether the primary SIM card is being used for voice calls and whether dual SIM dual pass is not supported. If the primary SIM card is being used for voice calls and dual SIM dual pass is not supported, proceed to step S417. If the primary SIM card is not being used for voice calls and / or dual SIM dual pass is supported, proceed to step S412.

[0109] Step S412: Determine whether the main card is being used for the game and dual-card dual-pass is not supported. If the main card is being used for the game and dual-card dual-pass is not supported, proceed to step S417. If the main card is not being used for the game and / or dual-card dual-head is supported, proceed to step S413.

[0110] Step S413: Determine whether the signal quality of the secondary card is less than the first threshold. If the signal quality of the secondary card is less than the first threshold, proceed to step S417; if the signal quality of the secondary card is greater than or equal to the first threshold, proceed to step S414.

[0111] The first preset threshold is the same as the preset threshold in the above embodiments.

[0112] Step S414: Determine whether the signal quality of the secondary card is greater than the second threshold. If the signal quality of the secondary card is greater than the second threshold, proceed to step S416; if the signal quality of the secondary card is less than or equal to the first threshold, proceed to step S415.

[0113] The second threshold is greater than the first threshold.

[0114] Step S415: Determine if the secondary SIM card has no service. If the secondary SIM card has no service, proceed to step S416; if the secondary SIM card has service, proceed to step S409.

[0115] Step S416: Enter the first communication mode, and then execute step S418.

[0116] Step S417: Enter the second communication mode, and then execute step S418.

[0117] Step S418: Determine whether the communication assistance function is enabled. If the communication assistance function is enabled, exit the above process; if the communication assistance function is not enabled, execute step S404 again.

[0118] It should be noted that the judgment process for each condition in steps S409-S412 above... Figure 4 The embodiments shown are merely examples of the above-described judgment order. In another embodiment, the conditions can be judged in other orders or simultaneously. This disclosure does not restrict the judgment order of the conditions.

[0119] Figure 5 This is a flowchart illustrating a setting process for a target communication mode according to an exemplary embodiment, performed by an electronic device. See also... Figure 5 The method includes the following steps:

[0120] Step S1: When the system is in service mode, monitor changes in call activity, signal strength, service performance, game loading / unloading, and screen on / off states, and make a decision based on the monitored information. If the screen is off, proceed to step S2; if the screen is on, proceed to step S3.

[0121] In this context, call change corresponds to whether a call is made based on a communication card in the above embodiments; signal change corresponds to the judgment of the signal quality of the first communication card in the above embodiments; service change corresponds to the judgment of whether the first communication card has no service in the above embodiments; game entry / exit corresponds to the judgment of the preset service executed by the second communication card in the above embodiments; and screen on / off corresponds to the judgment of the screen on and screen off states of the electronic device in the above embodiments.

[0122] Step S2: Determine if a Voice-Link call is currently in progress. If a Voice-Link call is currently in progress, trigger the abnormal call protection mechanism and execute Step 2 again. If a Voice-Link call is not currently in progress, execute the step to trigger the ping-pong protection mechanism. Then, when the ping-pong protection mechanism passes the judgment, enter the first communication mode.

[0123] Step S3: Determine if the signal quality of the secondary card is less than a preset threshold. If the signal quality of the secondary card is less than the preset threshold, proceed to step S7; otherwise, proceed to step S4.

[0124] Step S4: Determine if the primary SIM card is currently in a call and does not support dual SIM dual active. If the primary SIM card is currently in a call and does not support dual SIM dual active, proceed to step S8; otherwise, proceed to step S5.

[0125] Step S5: Determine whether the primary SIM card is not in a roaming scenario and whether the secondary SIM card is in a roaming scenario. If the primary SIM card is not in a roaming scenario but the secondary SIM card is, proceed to step S8; otherwise, proceed to step S6.

[0126] Step S6: Determine whether the game is being played based on the master card. If the game is being played based on the master card, proceed to step S7; otherwise, maintain the first communication mode.

[0127] Step S7: Trigger the ping-pong protection mechanism. When the ping-pong protection mechanism passes the judgment, enter the second communication mode.

[0128] Figure 6 This is a block diagram illustrating a communication device according to an exemplary embodiment, configured in an electronic device, see [link to relevant documentation]. Figure 6 The device includes:

[0129] The channel establishment module 601 is configured to establish a target data channel via a second communication card in response to a communication request based on a first communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable electronic devices to connect to the Internet.

[0130] The address acquisition module 602 is configured to acquire the target gateway address of the first communication card based on the target data channel;

[0131] The communication module 603 is configured to connect to the target server corresponding to the first communication card based on the target gateway address, so that the electronic device can communicate based on the first communication card.

[0132] In some embodiments, the channel establishment module 601 is configured to:

[0133] Upon entering the target communication mode, in response to a communication request, a target data channel is established via the second communication card;

[0134] Among them, the target communication mode refers to the mode in which the first communication card is allowed to use the communication auxiliary function in the target scenario corresponding to the target communication mode, and the communication auxiliary function refers to the function of assisting the non-data card to communicate based on the data card.

[0135] In some embodiments, the apparatus further includes:

[0136] The mode setting module is configured to set the target communication mode to the first communication mode when the communication assistance function is enabled; the target scenario corresponding to the first communication mode is the no-service scenario.

[0137] The mode setting module is also configured to update the target communication mode from the first communication mode to the second communication mode when the first communication card and the second communication card meet the preset conditions; the target scenario corresponding to the second communication mode includes at least one of the following: no service scenario, weak network scenario, roaming scenario, and dual-card dual-pass service concurrent scenario.

[0138] In some embodiments, the preset conditions include at least one of the following:

[0139] The first communication card is in a roaming scenario, while the second communication card is not in a roaming scenario;

[0140] The first preset service is performed using mobile data from the second communication card. The smart dual-card function is not enabled. The smart dual-card function refers to the function of automatically switching between the two communication cards as a data card and a non-data card.

[0141] The second preset service is performed using mobile data from the second communication card, and dual-SIM dual-pass is not supported;

[0142] The signal quality of the first communication card is less than a preset threshold.

[0143] In some embodiments, the mode setting module is further configured to keep the target communication mode unchanged as the first communication mode when the first communication card and the second communication card do not meet the preset conditions.

[0144] In some embodiments, the apparatus further includes:

[0145] The judgment module is configured to determine whether the first communication card and the second communication card meet preset conditions when the electronic device is in a screen-on state.

[0146] In some embodiments, the mode setting module is further configured to set the target communication mode to the first communication mode when the electronic device is in a screen-off state and communication based on the first communication card has ended.

[0147] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0148] This disclosure also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the communication method described in the above embodiments.

[0149] Figure 7 This is a block diagram of an electronic device 700 according to an exemplary embodiment.

[0150] Reference Figure 7 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0151] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0152] Memory 704 is configured to store various types of data to support the operation of electronic device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0153] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0154] Multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0155] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0156] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0157] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or a component of electronic device 700, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0158] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0159] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0160] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of an electronic device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0161] This disclosure also provides a non-transitory computer-readable storage medium, wherein when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is able to perform the communication method described in the above embodiments.

[0162] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0163] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A communication method, characterized in that, The method includes: In response to a communication request based on a first communication card, a target data channel is established through a second communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable the electronic device to connect to the Internet. Based on the target data channel, obtain the target gateway address of the first communication card; Based on the target gateway address, the electronic device connects to the target server corresponding to the first communication card, so that the electronic device can communicate based on the first communication card.

2. The communication method according to claim 1, characterized in that, The step of establishing a target data channel via a second communication card in response to a communication request based on the first communication card includes: Upon entering the target communication mode, in response to the communication request, the target data channel is established through the second communication card; The target communication mode refers to the mode in which the first communication card is allowed to use communication assistance functions in the target scenario corresponding to the target communication mode, and the communication assistance function refers to the function of assisting non-data cards to communicate based on the data card.

3. The communication method according to claim 2, characterized in that, Before establishing the target data channel via the second communication card in response to the communication request when entering the target communication mode, the method further includes: When the communication assistance function is enabled, the target communication mode is set to the first communication mode; the target scenario corresponding to the first communication mode is a no-service scenario. When the first communication card and the second communication card meet the preset conditions, the target communication mode is updated from the first communication mode to the second communication mode; the target scenario corresponding to the second communication mode includes at least one of the following: no service scenario, weak network scenario, roaming scenario, and dual-SIM dual-pass service concurrent scenario.

4. The communication method according to claim 3, characterized in that, The preset conditions include at least one of the following: The first communication card is in a roaming scenario, while the second communication card is not in a roaming scenario; The first preset service is performed using the mobile data of the second communication card, but the smart dual-card function is not enabled. The smart dual-card function refers to the function of automatically switching between the two communication cards as a data card and a non-data card. The second preset service is performed using the mobile data of the second communication card, and dual-SIM dual-pass is not supported; The signal quality of the first communication card is less than a preset threshold.

5. The communication method according to claim 3, characterized in that, The method further includes: When the first communication card and the second communication card do not meet the preset conditions, the target communication mode remains unchanged as the first communication mode.

6. The communication method according to claim 3, characterized in that, Before updating the target communication mode from the first communication mode to the second communication mode when the first communication card and the second communication card meet the preset conditions, the method further includes: When the electronic device is in a screen-on state, determine whether the first communication card and the second communication card meet the preset conditions.

7. The communication method according to claim 6, characterized in that, After connecting to the target server corresponding to the first communication card based on the target gateway address, so that the electronic device can communicate based on the first communication card, the method further includes: When the electronic device is in a screen-off state, if communication based on the first communication card has ended, the target communication mode is set to the first communication mode.

8. A communication device, characterized in that, The device includes: A channel establishment module is configured to establish a target data channel via a second communication card in response to a communication request based on a first communication card; the first communication card is a non-data card, the second communication card is a data card, and the target data channel is used to enable an electronic device to connect to the Internet. The address acquisition module is configured to acquire the target gateway address of the first communication card based on the target data channel; The communication module is configured to connect to the target server corresponding to the first communication card based on the target gateway address, so that the electronic device can communicate based on the first communication card.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the communication method as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the communication method as described in any one of claims 1-7.