Communication method, electronic device, and computer readable storage medium

By generating a keep-alive message in the electronic device and setting the PDU session to always online, the problem of PDU session establishment failure when the electronic device switches from the wireless communication network to the cellular network is solved, and a more stable data connection is achieved.

WO2025066487A1PCT designated stage expired Publication Date: 2025-04-03HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106984
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-26
Filing Date
2024-07-23
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

When electronic devices switch from wireless communication network to cellular network, PDU session establishment may fail, resulting in the cellular network being unusable and affecting the stability of data connection.

Method used

By generating a keep-alive message, setting the PDU session to always be online, allowing electronic devices to quickly connect to the cellular network even if they leave the coverage area of ​​the wireless communication network, avoiding re-establishing the PDU session.

Benefits of technology

This reduces the probability of failure of cellular network connections, improves the stability of data connections, and ensures fast connections when switching from wireless communication networks to cellular networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106984_03042025_PF_FP_ABST
    Figure CN2024106984_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a communication method, an electronic device, and a computer readable storage medium. The method comprises: in response to the fact that an electronic device camps on a target standard network and a mobile data switch of the target standard network is in an on state, establishing a first PDU session and generating a keepalive message; in response to the keepalive message, setting the first PDU session to always be online; and in response to a received wireless communication network enabling instruction and the fact that the first PDU session is set to always be online, controlling the wireless communication network to be enabled and controlling the first PDU session not to be released. By using the present application, when the electronic device is connected to the wireless communication network, a PDU session can be controlled not to be released, so that when the connection is switched from the wireless communication network to a cellular network, it is unnecessary to re-establish a PDU session, thereby reducing the probability of failure to connect to the cellular network, and improving the stability of data connection.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method, electronic device, and computer-readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 26, 2023, with application number 202311252601.7 and application name “Communication Method, Electronic Device and Computer-readable Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communications, and in particular to a communication method, electronic equipment, and computer-readable storage medium. Background Art

[0003] With the development of electronic device technology, most electronic devices support establishing data connections through wireless communication networks (such as wireless fidelity (Wi-Fi)) and / or cellular networks. If the electronic device leaves the coverage area of ​​the wireless communication network, the data connection of the electronic device can be switched from the wireless communication network to the cellular network. Among them, in the scenario where the electronic device is stationed on the fifth generation mobile communication technology (5G) network, the electronic device switches from the wireless communication network to the cellular network, activates the cellular data service, and establishes a protocol data unit (PDU) session. However, in the process of establishing the PDU session, the PDU session establishment may fail, resulting in the unusable cellular network, thereby affecting the stability of the data connection.

[0004] Summary of the Invention

[0005] An embodiment of the present application provides a communication method, an electronic device, and a computer-readable storage medium. When the electronic device turns on a wireless communication network, the PDU session may not be released. Even if the electronic device leaves the coverage area of ​​the wireless communication network, it can quickly connect to the cellular network, thereby reducing the probability of cellular network connection failure and improving data connection stability.

[0006] In a first aspect, the present application provides a communication method, applied to an electronic device, the method comprising: in response to the electronic device being stationed on a target network and the mobile data switch of the target network being in the on state, establishing a first PDU session and generating a keep-alive message; in response to the keep-alive message, setting the first PDU session to always be online; in response to a received wireless communication network start-up instruction and the first PDU session being set to always be online, controlling the wireless communication network to start and controlling the first PDU session not to be released.

[0007] In the above embodiment, the electronic device generates a keep-alive message to set the PDU session to always be online. This allows the PDU session to be maintained without releasing it upon receiving a wireless communication network activation instruction. This allows the device to quickly switch from connecting to the wireless communication network to the cellular network even if it leaves the coverage area of ​​the wireless communication network, without having to re-establish the PDU session. This reduces the probability of cellular network connection failure and helps improve the stability of the data connection.

[0008] In conjunction with the first aspect, in one possible embodiment, the electronic device includes a first data card, which is a data card stationed on a target network and is the currently used data card; the aforementioned setting of the PDU session as always-online includes: the electronic device setting the first PDU session corresponding to the first data card as always-online. Thus, by setting the first PDU session corresponding to the first data card as always-online, when switching from connecting to a wireless communication network to connecting to a cellular network using the first data card, there is no need to reestablish the PDU session, thereby improving cellular network connection efficiency.

[0009] In combination with the first aspect, in one possible manner, the electronic device also includes a second data card. The above-mentioned response to the electronic device being stationed on the target network and the mobile data switch of the target network being in the on state, before establishing the first PDU session and generating a keep-alive message, also includes: in response to the received card-cutting operation for the second data card, switching the used data card from the second data card to the first data card; in response to the second PDU session corresponding to the second data card being always online, updating the second PDU session from always online to not always online. It can be seen that when the electronic device supports dual cards, the PDU session corresponding to the main card can be set to always online, and the PDU session corresponding to the secondary card can be set to not always online, so that when switching from connecting to a wireless communication network to using the main card to connect to a cellular network, there is no need to re-establish the PDU session, thereby reducing the probability of cellular network connection failure and helping to improve the stability of the data connection.

[0010] In combination with the first aspect, in one possible manner, the electronic device also includes a second data card, and the above-mentioned response to the electronic device being stationed on the target network and the mobile data switch of the target network being in the on state, before establishing the first PDU session and generating a keep-alive message, also includes: in response to the received card-cutting operation for the second data card, switching the used data card from the second data card to the first data card; in response to the second PDU session corresponding to the second data card being always online, keeping the second PDU session always online. It can be seen that when the electronic device supports dual cards, the PDU session corresponding to the main card can be set to always online, and the PDU session corresponding to the secondary card can also be kept always online. In this way, when switching from using the main card to connect to the cellular network to using the secondary card to connect to the cellular network, there is no need to re-establish the PDU session, so that a fast connection to the cellular network is achieved, which is conducive to improving network connection efficiency.

[0011] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to the cellular network switching from the first network standard to the target network standard, determining whether the electronic device is stationed on the target network standard. Thus, when the network standard of the cellular network changes, it is possible to determine whether the electronic device is stationed on the target network standard, so that when the electronic device is stationed on the target network standard and the mobile data switch is turned on, a PDU session can be established and the PDU session can be set to always online.

[0012] In combination with the first aspect, in one possible manner, the electronic device includes an application processor, an application framework layer, a wireless communication interface layer, and a modem processor; the electronic device generates a keep-alive message, including: the application processor generates a keep-alive message and sends the keep-alive message to the application framework layer; the application framework layer receives the keep-alive message and sends the keep-alive message to the wireless communication interface layer; the wireless communication interface layer receives the keep-alive message and sends the keep-alive message to the modem processor; the electronic device sets the first PDU session to always online, including: the modem processor responds to the keep-alive message and sets the first PDU session to always online. It can be seen that the application processor of the electronic device can send a keep-alive message to the modem processor through the application framework layer and the wireless communication interface layer. Then, the modem processor responds to the keep-alive message and can set the PDU session to always online. This is conducive to setting the PDU session online more efficiently.

[0013] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to receiving a wireless communication network start instruction and the first PDU session being set to always-on, disconnecting a data link of the target network between the application processor and the modem processor. Disconnecting the data link of the target network between the application processor and the modem processor can help save system power consumption.

[0014] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to receiving a wireless communication network start instruction and the first PDU session being set to always online, displaying a usage indicator corresponding to the wireless communication network in the status bar, and not displaying a usage indicator corresponding to the target network. Not displaying the usage indicator corresponding to the target network indicates that data traffic is not being used, which facilitates a more intuitive display of network usage.

[0015] In a second aspect, an embodiment of the present application provides an electronic device, which includes: one or more processors, a display screen and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: in response to the electronic device being stationed in a target network and the mobile data switch of the target network being in the on state, establishing a first PDU session and generating a keep-alive message; in response to the keep-alive message, setting the first PDU session to always be online; in response to a received wireless communication network start-up instruction and the first PDU session being set to always be online, controlling the wireless communication network to start and controlling the first PDU session not to be released.

[0016] In combination with the second aspect, in one possible implementation, the electronic device includes a first data card, which is a data card that is stationed in the target network and is currently in use; the one or more processors call the computer instruction to enable the electronic device to execute: setting the first PDU session corresponding to the first data card to always be online.

[0017] In combination with the second aspect, in one possible implementation, the electronic device also includes a second data card, and the one or more processors call the computer instructions to cause the electronic device to execute: in response to a received card-cutting operation for the second data card, switching the used data card from the second data card to the first data card; in response to the second PDU session corresponding to the second data card being always online, updating the second PDU session from always online to not always online.

[0018] In combination with the second aspect, in one possible manner, the electronic device also includes a second data card, and the one or more processors call the computer instructions to cause the electronic device to execute: in response to a received card-cutting operation for the second data card, switching the used data card from the second data card to the first data card; in response to the second PDU session corresponding to the second data card being always online, keeping the second PDU session always online.

[0019] In combination with the second aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: in response to the cellular network switching from the first standard network to the target standard network, determine whether the electronic device is stationed in the target standard network.

[0020] In combination with the second aspect, in one possible manner, an electronic device includes an application processor, an application framework layer, a wireless communication interface layer, and a modem processor; the one or more processors call the computer instructions to cause the electronic device to execute: the application processor generates a keep-alive message and sends the keep-alive message to the application framework layer; the application framework layer receives the keep-alive message and sends the keep-alive message to the wireless communication interface layer; the wireless communication interface layer receives the keep-alive message and sends the keep-alive message to the modem processor; the modem processor sets the first PDU session to always online in response to the keep-alive message.

[0021] In combination with the second aspect, in one possible manner, the one or more processors call the computer instructions to cause the electronic device to execute: in response to the received wireless communication network start instruction and the first PDU session is set to always be online, disconnect the data link of the target network between the application processor and the modem processor.

[0022] In combination with the second aspect, in one possible manner, the one or more processors call the computer instructions to cause the electronic device to execute: in response to the received wireless communication network start instruction and the first PDU session is set to always be online, the usage identifier corresponding to the wireless communication network is displayed in the status bar, and the usage identifier corresponding to the target network is not displayed.

[0023] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute the method described in the first aspect or any possible implementation method of the first aspect.

[0024] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any possible implementation of the first aspect.

[0025] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] FIG1 is a schematic diagram of the architecture of a communication system used in an embodiment of the present application;

[0027] FIG2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0028] FIG3 is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0029] FIG4 is a flow chart of a communication method provided in an embodiment of the present application;

[0030] FIG5A is a schematic diagram of an electronic device displaying data arrows of a cellular network provided by an embodiment of the present application;

[0031] FIG5B is a schematic diagram of an electronic device provided by an embodiment of the present application that does not display a data arrow of a cellular network;

[0032] FIG6 is a schematic diagram of a dual-SIM card management interface provided in an embodiment of the present application;

[0033] FIG7 is a flow chart of another communication method provided in an embodiment of the present application;

[0034] FIG8 is a flow chart of another communication method provided in an embodiment of the present application;

[0035] FIG9 is a flow chart of another communication method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] The terms "first," "second," "third," and the like in the embodiments of the present application are used to distinguish between different objects, rather than to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a list of steps or units may be included, or alternatively, steps or units not listed may be included, or other steps or units inherent to the process, method, product, or device may be included.

[0038] In addition, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0039] Currently, electronic devices can support connection to wireless communication networks and / or cellular networks. In the scenario where the electronic device is stationed on a 5G network, when the electronic device switches from a wireless communication network to a cellular network, the cellular data service will be activated and a PDU session will be established. Correspondingly, when the electronic device switches from a cellular network to a wireless communication network, the cellular data service will be deactivated and the PDU session will be released. Due to the 5G network environment, when an electronic device switches from a wireless communication network to a cellular network, a PDU session establishment failure may occur during the process of establishing a PDU session, resulting in the cellular network being unusable, thereby affecting the stability of the data connection.

[0040] Based on this, an embodiment of the present application provides a communication method. When an electronic device leaves the coverage area of ​​a wireless communication network, it can quickly switch from connecting to the wireless communication network to connecting to a cellular network without re-establishing a PDU session, thereby reducing the probability of failure to connect to the cellular network and improving the stability of the data connection.

[0041] In order to more clearly describe the contents of the embodiments of the present application, the communication system applied to the embodiments of the present application is introduced below.

[0042] Please refer to Figure 1, which is a schematic diagram of the architecture of a communication system using an embodiment of the present application. As shown in Figure 1, the communication system may include an electronic device 100, a base station 102, and a router 101. The electronic device 100 may establish a cellular network data connection with the base station 102, and / or the electronic device 100 may establish a wireless communication network (such as Wi-Fi) data connection with the router 101.

[0043] In some embodiments, when the electronic device 100 is using a wireless communication network for data communication, if the electronic device 100 leaves the coverage area of ​​the wireless communication network, the data connection of the electronic device 100 can be automatically switched from the wireless communication network to the cellular network. For example, if the data switch of the cellular network of the electronic device 100 is turned on, after the electronic device 100 leaves the coverage area of ​​the wireless communication network, its data connection can be automatically switched from the wireless communication network to the cellular network.

[0044] In other embodiments, when the electronic device 100 is using a wireless communication network for data communication, in response to a received first network switching instruction, its data connection can be switched from the wireless communication network to the cellular network. For example, when the data switch of the cellular network of the electronic device 100 is on, in response to a received instruction to turn off the wireless communication network, the electronic device 100 can turn off the wireless communication network and switch the data connection from the wireless communication network to the cellular network. For another example, when the electronic device 100 is using a wireless communication network for data communication, in response to a received instruction to turn off the wireless communication network and an instruction to turn on the cellular network, the electronic device 100 can turn off the wireless communication network and turn on the cellular network, and switch the data connection from the wireless communication network to the cellular network.

[0045] In yet other embodiments, when the electronic device 100 is using a cellular network for data communication, in response to a received second network switching instruction, its data connection may be switched from the cellular network to the wireless communication network. For example, when the data switch of the cellular network of the electronic device 100 is on, in response to a received instruction to turn off the cellular network and an instruction to turn on the wireless communication network, the electronic device 100 may turn off the cellular network and turn on the wireless communication network, and switch the data connection from the cellular network to the wireless communication network.

[0046] It should be noted that the electronic device 100 may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.

[0047] The electronic device provided in the embodiments of the present application is introduced below.

[0048] Please refer to FIG. 2 , which is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application.

[0049] As shown in Figure 2, the electronic device 100 includes: a processor 110, an application processor 110A, a modem processor 110B, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0050] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP) 110A, a modem processor 110B, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. In an embodiment of the present application, the application processor 110A can send a request message to the modem processor 110B to request that the PDU session be set to always online.

[0051] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0052] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic devices. In an embodiment of the present application, the mobile communication module 150 provides a mobile communication network (such as a 5G network) for the electronic device. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), infrared technology (IR), etc. applied to electronic devices.

[0053] The modem processor (Modem) runs on the baseband chip and the coprocessor. For example, the Modem may be provided with a SIM card module, which can be used to provide network registration, authentication and other functions related to SIM information. For example, when a user uses an electronic device with a Modem, he or she can trigger a local application to implement a series of SIM card functions. The SIM card mentioned above can be a physical card or a hard card, or a virtual SIM card (or a soft card), and can include an embedded chip-type user identity card (embedded-SIM, eSIM), etc. The specific form of the SIM card is not limited in the embodiments of the present application.

[0054] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem can be an independent device. In other embodiments, the modem can be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules. In an embodiment of the present application, the modem can keep the PDU session always online based on the request message from the application processor.

[0055] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0056] Please refer to FIG3 , which is a schematic diagram of the software architecture of an electronic device 100 provided in an embodiment of the present application.

[0057] As shown in Figure 3, the software structure adopts a layered architecture, which divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, taking the Android system running on an application processor (AP) as an example, the Android system is divided into four layers: from top to bottom: the application layer, the application framework layer (Framework), the Android runtime (Android runtime), the system library, and the system kernel layer (Kernel).

[0058] The application layer can include a series of application packages. Application packages may include camera applications, gallery, calendar, call, map, WLAN, Bluetooth, music, video, short message applications, etc. The application layer may also include system UI (system UI), which can be used to display the interface of the electronic device, such as the signal icon corresponding to the SIM card and the call interface.

[0059] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 3, for example, the application framework layer may include a window manager, a telephony manager, a resource manager, and a notification manager. In an embodiment of the present application, the telephony manager can be used to provide management functions for cellular-related services of the electronic device 100. For example, the telephony manager is used to provide management of cellular network data connection status (including connected to the cellular network, disconnected from the cellular network, establishing a connection to the cellular network, disconnecting from the cellular network, etc.). In an embodiment of the present application, the application framework layer may also include a network management module, which can provide network switching functions for the electronic device. For example, when the electronic device leaves the coverage area of ​​the wireless communication network, the network management module can switch the electronic device's wireless communication network to the cellular network. In addition, the application framework layer may also include a RIL (Radio Interface Layer), and the modem processor (modem) can exchange information with the telephony through the RIL.

[0060] The modem may include a NAS (Non-Access Stratum) layer, an RRC (Radio Resource Control) layer, a Packet Data Convergence Protocol (PDCP) layer, a Radio Link Control (RLC) layer, a Medium Access Control (MAC) layer, and a Physical (PHY) layer. The aforementioned layers may be software modules. The modem may interact with a base station via an antenna. The modem may also interact with a router via an antenna. In an embodiment of the present application, the modem may set a PDU session to always be online in response to a received message for triggering the setting of a PDU session to always be online.

[0061] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0062] The Android runtime is responsible for scheduling and management of the Android system. It includes core libraries and a virtual machine. The core library consists of two parts: one for Java (a programming language) function calls, and the other for Android's core libraries. The virtual machine performs functions such as object security and exception management, lifecycle management, stack management, thread management, and garbage collection. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files.

[0063] The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, sensor drivers, etc.

[0064] It should be noted that the functional modules included in the above software architecture are merely exemplary and do not constitute a specific limitation on the software architecture of the mobile phone of this application. In other embodiments, the functional modules included in the above software architecture may be more or less, and this application does not impose any limitation on this. Although the embodiments of this application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.

[0065] The following is an introduction to the communication method provided in the embodiments of the present application.

[0066] Please refer to Figure 4, which is a flow chart of a communication method provided in an embodiment of the present application. The communication method provided in an embodiment of the present application can be performed by an electronic device, which may include an application processor, an application framework layer, a wireless communication interface layer, and a modem processor. As shown in Figure 4, the communication method may include, but is not limited to, the following steps:

[0067] S401: The application processor determines whether the mobile data switch of the target network is in an on state.

[0068] Among them, the target standard network can be a target standard cellular network, for example, it can be a 5G network, and the target standard network is also described as a cellular network in this application. The electronic device can be stationed on a 5G network, and being stationed on a 5G network can be understood as having the conditions for connecting to a 5G network. The conditions for connecting to a 5G network include but are not limited to being in the coverage area of ​​the 5G network and the signal strength of the 5G network being higher than a threshold. In an embodiment of the present application, the application processor can know whether the mobile data switch of the 5G network is in an on state or an off state. If the data switch for the 5G network is in an on state, it means that the cellular network data service will be activated and a PDU session will be established; if the data switch for the 5G network is in an off state, it means that the cellular network data service will be deactivated and the PDU session will be released. Among them, the process of establishing a PDU session and the process of releasing a PDU session The process of establishing a PDU session can refer to the existing process and will not be described in detail here.

[0069] S402: In response to the mobile data switch of the target network being turned on, the application processor sends a first message to the application framework layer. Correspondingly, the application framework layer receives the first message from the application processor.

[0070] In an embodiment of the present application, the application processor may send a first message to the application framework layer in response to the mobile data switch of the target network being in the on state. The first message may be used to trigger setting the PDU session to always be online (always-on). Here, setting the PDU session to always be online may also be described as keeping the PDU session alive, that is, setting the PDU session to always be online. In the case of switching from connecting to a cellular network to connecting to a wireless communication network, the PDU session may continue to be kept online without releasing the PDU session.

[0071] Optionally, the application processor sends the first message to the application framework layer at any time when the PDU session has been established, at any time during the PDU session establishment process, or at any time when the PDU session has not started to be established.

[0072] In some embodiments, the application processor may be configured with a switch parameter, which may be used to set the PDU session to always be online or not always be online. Exemplarily, the application processor sets the switch parameter to the first parameter, which may indicate triggering the setting of the PDU session to always be online, and sets the switch parameter to the second parameter, which may indicate that there is no need to trigger the setting of the PDU session to always be online. Not triggering the setting of the PDU session to always be online may also be understood as triggering the setting of the PDU session to not always be online. When the PDU session is set to not always be online, for the case of switching from connecting to a cellular network to connecting to a wireless communication network, the PDU session will be released according to the normal process. Optionally, the first parameter may be 1, for example, and the second parameter may be 0, for example. When the application processor determines that the mobile data switch of the target network is in the on state, the above-mentioned switch parameter may be set to the first parameter, and then the application processor may send a first message to the application framework layer. When the application processor determines that the mobile data switch of the target network is in the off state, the switch parameter may be set to the second parameter, and the application processor may send a message to the application layer to trigger the setting of the PDU session to not always be online.

[0073] In some embodiments, the application processor can send a first message to the application framework layer by calling the sendcommRequest interface. It can be understood that, in the case where the application processor determines that the mobile data switch of the target network is in the off state, the application processor can set the switch parameter of the always-online PDU session to the second parameter, that is, trigger the setting of the PDU session as non-always online. In this case, the application processor can also send a message for triggering the setting of the PDU session as non-always online to the application framework layer by calling the sendcommRequest interface. In the case where the data switch of the cellular network is switched from the on state to the off state, the application processing sending a message to trigger the setting of the PDU session as non-always online can also be understood as the application processor sending a message to trigger the cancellation of the setting of the PDU session as always online, that is, triggering the PDU session to switch from always online to non-always online.

[0074] S403: The application framework layer sends a second message to the wireless communication interface layer in response to the received first message. Accordingly, the wireless communication interface layer receives the second message from the application framework layer.

[0075] In an embodiment of the present application, the application framework layer may send a second message to the wireless communication interface layer in response to receiving the first message. The second message may be used to trigger setting the PDU session to always-on. Here, the wireless communication interface layer may serve as a communication bridge between the application processor and the modem processor, providing the application processor with an interface for controlling the modem processor.

[0076] In some embodiments, the application framework layer may send the second message to the wireless communication interface layer by calling an HnRilHandleSetAlwaysOnPdu (a service interface used to trigger setting a PDU session as an always-online session).

[0077] S404: The wireless communication interface layer sends a third message to the modem processor. Correspondingly, the modem processor receives the third message from the wireless communication interface layer.

[0078] In an embodiment of the present application, the wireless communication interface layer may send a third message to the modem processor in response to the received second message. The third message may be used to trigger setting the PDU session to always online.

[0079] In some embodiments, the wireless communication interface layer may send the third message to the modem processor via a Qualcomm messaging interface (QMI).

[0080] In the embodiment of the present application, step S402, step S403 and step S404 can also be understood as the application processor sending a keep-alive message to the modem processor through the application framework layer and the wireless communication interface layer, and the keep-alive message is used to request triggering the setting of the PDU session to always be online.

[0081] S405: The modem processor sets the PDU session to always-on in response to the third message. Setting the PDU session to always-on can also be described as setting the PDU session to an always-on type, or keeping the PDU session alive, or maintaining the PDU session, or keeping the PDU session online.

[0082] In one implementation, when a PDU session has been established, setting the PDU session to always-online may include updating the PDU session from non-always-online to always-online, or re-establishing an always-online PDU session.

[0083] In another implementation, when the PDU session is not established, setting the PDU session to always-on may include establishing an always-online PDU session.

[0084] In some embodiments, the electronic device may include a data card (such as a SIM card), and the modem processor may set a PDU session corresponding to the data card to always be online in response to the received third message. For example, the electronic device may include a data card A, and data card A may be stationed on a 5G network. When the mobile data switch of the 5G network is on, the modem processor may set the PDU session corresponding to data card A to always be online in response to the received third message. Wherein, the PDU session corresponding to data card A is set to always be online, and when the electronic device switches the 5G network to Wi-Fi, the PDU session corresponding to data card A may not be released, that is, the PDU session corresponding to data card A may continue to be kept online, so that when switching from Wi-Fi to 5G network, there is no need to re-establish the PDU session, and the 5G network can be quickly connected, saving network connection time.

[0085] In some embodiments, the electronic device may also support dual SIM cards, that is, it may include two data cards. In response to a received third message, the modem processor may set the PDU sessions corresponding to both data cards to always-on. For example, the electronic device may include data card B and data card C. Assuming data card B is currently the primary card and is deployed on a 5G network, and upon determining that the mobile data switch of the 5G network is on, the modem processor may set the PDU session corresponding to data card B to always-on in response to the received third message. When the electronic device receives a card-switching operation to switch the primary card, i.e., switching the primary card to data card A, it may still maintain data card B as always-on. If data card A is also deployed on a 5G network, and the mobile data switch of the 5G network is on, the modem processor may set the PDU session corresponding to data card A as always-on in response to the received third message. In this way, both the PDU session corresponding to data card A and the PDU session corresponding to data card B are set to always-on. Even if the electronic device performs a card-switching operation while using a cellular network, it can quickly establish a cellular network data connection without having to re-establish a PDU session.

[0086] In some embodiments, the modem processor may also set the PDU session corresponding to the main card of the two data cards to always online in response to the received third message. For example, assuming that data card B is currently the main card, and the PDU session corresponding to data card B is set to always online, when the electronic device receives a card switching operation to switch the main card, that is, switching the main card to data card A, it may set the PDU session corresponding to data card B to not always online, or it may be described as canceling the setting of the PDU session corresponding to data card B as always online, or it may also be described as releasing the PDU session corresponding to data card B. If data card A is also stationed on the 5G network, when the mobile data switch of the 5G network is in the on state, the modem processor may set the PDU session corresponding to data card A to always online in response to the received third message. In this way, after the main card is switched from data card B to data card A, only the PDU session corresponding to data card A is set to always online, which is conducive to saving resources.

[0087] In some embodiments, the modem processor may set a flag value in response to the third message, and then set a PDU session corresponding to a data card to always online by setting the flag value. The flag value may be used to indicate whether the PDU session is set to always online or not always online. Optionally, the flag value is set to a first value, which may indicate that the PDU session is set to always online, and the flag value is set to a second value, which may indicate that the PDU session is configured to not always online. For example, the first value may be 1, and the second value may be 0. When the modem processor receives the third message, it may set the flag value to 1. Then, when the electronic device is connected to Wi-Fi, the modem processor may intercept the request message from the application processor to release the PDU session, thereby realizing that the PDU session corresponding to the data card is always online.

[0088] The communication method shown in Figure 4 sets the PDU session to always be online, so that when the electronic device switches from connecting to a wireless communication network to connecting to a cellular network, there is no need to re-establish the PDU session, thereby reducing the probability of cellular network connection failure and improving the stability of the data connection.

[0089] Regarding how electronic devices can quickly switch from connecting to a wireless communication network to a cellular network, there is currently a solution that always turns on the cellular network by default. The electronic device can be provided with a switch that always turns on the cellular network. In response to an instruction to turn on the switch that always turns on the cellular network, the electronic device can initiate a background network request for the cellular network through the connectivity service (CS). This operation is similar to initiating a dual-stream network request for both the wireless communication network and the cellular network through a third-party application. In this way, when connected to the wireless communication network, the cellular network link will also exist, and the electronic device can also quickly switch to the cellular network after leaving the coverage area of ​​the wireless communication network. In this solution, since the cellular network link still exists when the electronic device is connected to the wireless communication network, the existence of the cellular network link here includes the existence of the link between the application processor and the modem processor, and the maintenance of the PDU session online. Therefore, after the electronic device is connected to the wireless communication network, the status bar still displays the cellular network usage indicator (such as a data arrow). The display of this data arrow can easily cause confusion to the user about the data usage. For example, as shown in Figure 5A, an electronic device according to an embodiment of the present application displays a data arrow for the cellular network. As shown in Figure 5A, when the cellular network is always enabled by default, the data arrow for the cellular network is still displayed even after the device is connected to Wi-Fi. This can misleadingly indicate that data traffic is still being used. Furthermore, the dual-stream network of wireless communication and cellular networks increases the power consumption of the device and poses the risk of third-party applications stealing data traffic.

[0090] Compared to the solution of always turning on the cellular network by default, the communication method provided by the present application only sets the PDU session to be always online. When connected to wifi, the data link of the cellular network between the application processor and the modem processor is disconnected to avoid the data link of the cellular network always existing, and then there will be no identification display for the existence of the data link of the cellular network. At the same time, fast network switching can be achieved without the existence of a dual-stream network of a wireless communication network and a cellular network, which is beneficial to reducing the power consumption of electronic devices. For example, as shown in Figure 5B, a schematic diagram of an electronic device provided in an embodiment of the present application that does not display a data arrow for a cellular network is shown. As can be seen from Figure 5B, using an embodiment of the present application, after the electronic device is connected to Wi-Fi, the usage identification for the cellular network (i.e., the identification of the existence of the data link of the cellular network) will not be displayed in the status bar, which is beneficial to improving the user experience.

[0091] In some implementation scenarios, electronic devices can support dual SIM cards. Taking a mobile phone as an example, a mobile phone can be equipped with two SIM cards, and the user can select one of the SIM cards as the default data service card (data default sub, DDS) according to needs. Among them, the default data service card can be called the primary card, and the non-default data service card can be called the secondary card. In different usage scenarios, the user can switch the primary card and select any one as the primary card. For example, please refer to Figure 6, which is a schematic diagram of a dual-card management interface provided in an embodiment of the present application. As shown in Figure 6, the dual-card management interface 61 is provided with a switch option 611 for SIM card 1 and a switch option 612 for SIM card 2. The electronic device can trigger the activation of the two SIM cards in response to the activation instructions for the switch option 611 and the switch option 612. In addition, the dual-card management interface 61 is also provided with a selection option for the default data service card. The selection options for the default data service card include option 6131 for SIM card 1 and option 6132 for SIM card 2. In response to the selection operation for option 6131 for SIM card 1, the electronic device can use SIM card 1 as the primary card and SIM card 2 as the secondary card. Similarly, in response to the selection operation for option 6132 for SIM card 2, the electronic device can use SIM card 2 as the primary card and SIM card 1 as the secondary card.

[0092] The following describes the communication method provided in the embodiment of the present application from the perspective of an electronic device supporting dual SIM cards.

[0093] For example, please refer to Figure 7, which is a flowchart of another communication method provided in an embodiment of the present application. The method can be performed by an electronic device, which can include a first data card and a second data card, where the second data card can be a data card of the target network standard and currently in use. As shown in Figure 7, the method can include but is not limited to the following steps:

[0094] S701: Receive a card switching operation for a second data card, and switch the used data card from the second data card to the first data card. The second data card may be the current default data service card (i.e., the primary card). Receive the card switching operation to switch the default data service card from the second data card to the first data card.

[0095] S702: In response to the card switching operation, detect whether the second PDU session corresponding to the second data card is always online.

[0096] Among them, the second data card can be the default data service card of the electronic device before receiving the card cutting operation. When the electronic device receives the card cutting operation for the second data card, it can detect whether the second PDU session corresponding to the second data card is set to always online. In the process of using the second data card as the default data service card, the electronic device can use the communication method introduced in the embodiment of Figure 4 to set the second PDU session corresponding to the second data card to always online. If the second PDU session is always online, then when connecting to Wi-Fi, the second PDU session may not be released, so that when switching from Wi-Fi to a cellular network data connection, there is no need to establish a PDU session again, thereby achieving a fast connection to the cellular network.

[0097] In some embodiments, in response to the second PDU session being always online, the electronic device may process the second PDU session in two ways: the first way is described in step S702 , and the second way is described in step S703 .

[0098] S703 : In response to the second PDU session being always online, update the second PDU session from always online to not always online.

[0099] Method 1, the electronic device can update the second PDU session from always online to not always online, which can also be described as canceling the second PDU session from always online. In one implementation method, the application processor of the electronic device can send a cancel keep-alive message to the modem processor through the application framework layer and the wireless communication interface layer, and the cancel keep-alive message can be used to trigger the setting of the second session as not always online. The process of setting the second PDU session as not always online is similar to the process of setting the second PDU session as always online, the difference is that the content of the message sent by the application processor to the modem processor through the application framework layer and the wireless communication interface is different. When the second PDU session is updated from always online to not always online, if the electronic device switches the data card used from the first data card back to the second data card, and uses the second data card to connect to the cellular network, it needs to re-establish the PDU session according to the normal process.

[0100] S704 : In response to the second PDU session being always online, keep the second PDU session always online.

[0101] In the second method, the electronic device can also keep the second PDU session always online. In this method, if the electronic device switches the data card used from the first data card to the second data card and uses the second data card to connect to the cellular network, it can achieve a quick connection to the cellular network without having to establish a PDU session again.

[0102] S705: Determine whether the 5G network is successfully established.

[0103] In an embodiment of the present application, after the electronic device switches the data card used from the second data card to the first data card, it can determine whether it has successfully stationed on the 5G network.

[0104] S706: Set the first PDU session corresponding to the first data card to non-always online.

[0105] In an embodiment of the present application, in response to an unsuccessful stationing on the 5G network, the electronic device may set the first PDU session corresponding to the first data card to be non-always online. In this way, the electronic device will release the PDU session after connecting to Wi-Fi. Among them, the reasons why the electronic device failed to successfully station on the 5G network may include, for example, any of the following: the data card used by the electronic device (currently the first data card) does not support 5G, the electronic device is not in the 5G network coverage area, or the strength of the 5G network signal is less than a threshold.

[0106] S707: Check whether the mobile data switch of the 5G network is turned on.

[0107] In an embodiment of the present application, in response to successfully stationing on the 5G network, the electronic device can further determine through the application processor whether the mobile data switch of the 5G network is in the on state. The conditions for the electronic device to successfully station on the 5G network may include, for example: the data card used by the electronic device supports 5G, the electronic device is in the 5G network coverage area and the 5G network signal strength is greater than a threshold. Among them, if the state of the mobile data switch of the 5G network changes, for example, from being in an off state to being in an on state, the application processor of the electronic device can obtain a notification message, and then judge the state of the mobile data switch of the 5G network according to the content of the notification message.

[0108] S708: Set the first PDU session corresponding to the first data card to always be online.

[0109] In an embodiment of the present application, when the electronic device successfully connects to the 5G network, the electronic device can set the first PDU session corresponding to the first data card to always be online in response to the mobile data switch of the 5G network being in the on state. After setting the first PDU session to always be online, the electronic device can control the wireless communication network to be turned on and control the first PDU session not to be released in response to the received wireless communication network start instruction. That is to say, when the electronic device is connected to Wi-Fi, the first PDU session can be kept online without releasing it. In this way, after the electronic device leaves the Wi-Fi area, when the mobile data switch of the 5G network is in the on state, it can be authenticated through the identity identification information of the first data card. After passing, there is no need to rebuild the PDU session, and the 5G network service can be quickly activated.

[0110] In some embodiments, when the electronic device detects that the mobile data switch of the 5G network changes from an on state to an off state, it can update the first PDU session from always online to not always online, that is, cancel the first PDU session from always online.

[0111] The communication method shown in Figure 7 can adopt the same or different processing methods for the PDU sessions of the main card (the data card currently in use) and the secondary card when the electronic device supports dual cards. One processing method is that the PDU session corresponding to the main card and the PDU session corresponding to the secondary card can be set to always online. Another processing method is that the PDU session corresponding to the main card is set to always online, and the PDU session corresponding to the secondary card is set to not always online. Among them, setting the PDU session corresponding to the main card to always online can avoid the need to re-establish the PDU session when switching from connecting to a Wi-Fi network to connecting to a 5G network, reducing the probability of 5G network connection failure and helping to improve the stability of the data connection.

[0112] Please refer to Figure 8, which is a flow chart of another communication method provided by an embodiment of the present application. The method can be executed by an electronic device, as shown in Figure 8, and the method may include but is not limited to the following steps:

[0113] S801: The cellular network is switched from a first-standard network to a target-standard network.

[0114] The first network standard is lower than the target network standard. The electronic device can first reside on the network with the lower standard and then switch from the network with the lower standard to the network with the higher standard. The first network standard can be, for example, a 4G network, and the target network standard can be, for example, a 5G network.

[0115] S802: Determine whether the target network is successfully established.

[0116] In some embodiments, when the network standard of the network on which the electronic device resides switches from the first standard to the target standard, the application processor of the electronic device can obtain a notification message. The electronic device can then further detect whether it has successfully settled on the target standard network. The conditions for the electronic device to successfully settle on the target standard network include but are not limited to: the data card used by the electronic device supports the target standard network, the electronic device is within the coverage area of ​​the target standard network, and the signal strength of the target standard network is greater than a threshold.

[0117] S803: Set the PDU session corresponding to the data card to non-always online.

[0118] In an embodiment of the present application, in response to an electronic device failing to successfully establish a connection to a target network, the electronic device may set the PDU session corresponding to the data card to non-always online. The data card refers to the data card currently used by the electronic device. For electronic devices that support dual SIM cards, the data card here refers to the primary SIM card.

[0119] S804: Check whether the mobile data switch is on.

[0120] In an embodiment of the present application, in response to successfully stationing on a target network, the electronic device may detect whether a mobile data switch is in an on state.

[0121] S805: Set the PDU session corresponding to the data card to always online.

[0122] In an embodiment of the present application, in response to the mobile data switch being in the on state, the electronic device can set the PDU session corresponding to the data card to always be online.

[0123] It should be noted that the implementation process and implementation principle of steps S803 to S805 are similar to those of steps S706 to S708 and will not be repeated here.

[0124] The communication method shown in Figure 8 can set the PDU session corresponding to the currently used data card to always be online when the network standard of the electronic device is switched from a lower network standard (first network standard) to a higher network standard (target network standard), so that when switching from connecting to a Wi-Fi network to connecting to a network with a higher network standard, there is no need to re-establish the PDU session, thereby achieving fast network connection.

[0125] Please refer to Figure 9, which is a flow chart of another communication method provided in an embodiment of the present application. The method can be executed by an electronic device, as shown in Figure 9, and may include but is not limited to the following steps:

[0126] S901: In response to an electronic device being stationed on a target network and a mobile data switch of the target network being on, establishing a first PDU session and generating a keep-alive message.

[0127] In an embodiment of the present application, when the electronic device successfully stations on the target network and the mobile data switch of the target network is in the on state, it can establish a first PDU session and generate a keep-alive message. The first PDU session may correspond to the data card currently in use. The process of establishing the first PDU session can refer to the existing process of establishing a PDU session and will not be described in detail here. The keep-alive message can be used to trigger the setting of the first PDU session to always be online. In one implementation, the electronic device can generate a keep-alive message through an application processor.

[0128] S902: In response to the keep-alive message, set the first PDU session to always be online.

[0129] In an embodiment of the present application, the electronic device may set the first PDU session to always be online in response to a keep-alive message. In one implementation, the electronic device may include a first data card, the first data card may support a target network, and the first data card may be a currently used data card, and the electronic device may set the first PDU session corresponding to the first data card to always be online. In another implementation, the electronic device may further include a second data card, and before step S901, the electronic device may switch the data card in use from the second data card to the first data card. For the specific process of how to set the first PDU session to always be online when the electronic device supports dual cards, please refer to the relevant description of the embodiment of Figure 7.

[0130] It should be noted that the implementation process and implementation principle of step S901 and step S902 correspond to the embodiment shown in FIG4 , and reference may be made to the description of the embodiment shown in FIG4 , which will not be repeated here.

[0131] S903: Receive a wireless communication network activation instruction.

[0132] S904 : In response to the received wireless communication network start instruction and the first PDU session being set to always be online, control the wireless communication network to start and control the first PDU session not to be released.

[0133] In an embodiment of the present application, when the first PDU session is set to always be online, the electronic device can control the first PDU session not to be released even if it receives a wireless network startup instruction, continue to maintain the first PDU session, and start the wireless communication network.

[0134] S905 , in response to the received wireless communication network start instruction and the first PDU session being set to always be online, the usage identifier corresponding to the wireless communication network is displayed in the status bar, and the usage identifier corresponding to the target network is not displayed.

[0135] In an embodiment of the present application, the electronic device can disconnect the data link of the target network between the application processor and the modem processor in response to the received wireless communication network startup instruction, so that only the usage identifier corresponding to the wireless communication network is displayed in the status bar, and the usage identifier corresponding to the target network is not displayed (as shown in Figure 5B).

[0136] It should be noted that step S904 and step S905 may be performed simultaneously or sequentially. For example, step S904 may be performed first and then step S905. This embodiment of the present application does not limit this.

[0137] By implementing the embodiments of the present application, the electronic device generates a keep-alive message and sets the PDU session to always be online, so that when receiving a wireless communication network start instruction, the PDU session can be maintained without releasing the PDU session. In this way, even if you leave the coverage area of ​​the wireless communication network, you can quickly switch from connecting to the wireless communication network to connecting to the cellular network without having to re-establish the PDU session, reducing the probability of failure to connect to the cellular network and helping to improve the stability of the data connection.

[0138] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0139] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0140] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0141] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0142] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0143] The above disclosure is only a preferred embodiment of the present application and is only a part of the embodiments of the present application. It cannot be used to limit the scope of rights of the present application.

Claims

1. A communication method, characterized in that: The method is applied to an electronic device, and the method comprises: In response to the electronic device being stationed in a target network and the mobile data switch of the target network being in an on state, establishing a first protocol data unit (PDU) session and generating a keep-alive message; In response to the keep-alive message, setting the first protocol data unit (PDU) session to always be online; In response to a received wireless communication network start instruction and the first protocol data unit (PDU) session being set to always be online, the wireless communication network is controlled to be started and the first protocol data unit (PDU) session is controlled not to be released.

2. The method according to claim 1, characterized in that The electronic device comprises a first data card, wherein the first data card is a data card stationed in the target network and is a currently used data card; The step of setting the first protocol data unit (PDU) session to be always online includes: The electronic device sets a first protocol data unit (PDU) session corresponding to the first data card to always be online.

3. The method according to claim 2, characterized in that The electronic device further comprises a second data card; Before the step of establishing a first protocol data unit (PDU) session and generating a keep-alive message in response to the electronic device being stationed in a target network and the mobile data switch of the target network being in an on state, the step further includes: In response to a received card switching operation for the second data card, switching the used data card from the second data card to the first data card; In response to the second protocol data unit (PDU) session corresponding to the second data card being always online, the second protocol data unit (PDU) session is updated from always online to not always online.

4. The method according to claim 2, characterized in that The electronic device further comprises a second data card; Before the step of establishing a first protocol data unit (PDU) session and generating a keep-alive message in response to the electronic device being stationed in a target network and the mobile data switch of the target network being in an on state, the step further includes: In response to a received card switching operation for the second data card, switching the used data card from the second data card to the first data card; In response to the second protocol data unit (PDU) session corresponding to the second data card being always online, the second protocol data unit (PDU) session is kept always online.

5. The method according to claim 1, characterized in that The method further comprises: In response to the cellular network switching from the first standard network to the target standard network, it is determined whether the electronic device is stationed on the target standard network.

6. The method according to any one of claims 1 to 5, characterized in that: The electronic device comprises an application processor, an application framework layer, a wireless communication interface layer and a modem processor; The electronic device generates a keep-alive message, including: The application processor generates a keep-alive message and sends the keep-alive message to the application framework layer; The application framework layer receives the keep-alive message and sends the keep-alive message to the wireless communication interface layer; The wireless communication interface layer receives the keep-alive message and sends the keep-alive message to the modem processor; The step of setting the first protocol data unit (PDU) session to be always online includes: The modem processor sets the first protocol data unit (PDU) session to always be online in response to the keep-alive message.

7. The method according to claim 6, characterized in that The method further comprises: In response to the received wireless communication network start instruction and the first protocol data unit (PDU) session being set to always be online, disconnecting the data link of the target network between the application processor and the modem processor.

8. The method according to claim 7, characterized in that The method further comprises: In response to the received wireless communication network start instruction and the first protocol data unit PDU session being set to always be online, the usage identifier corresponding to the wireless communication network is displayed in the status bar, and the usage identifier corresponding to the target standard network is not displayed.

9. An electronic device, characterized in that: It comprises a memory and one or more processors; the memory is coupled to the one or more processors and is used to store a computer program, the computer program comprises program instructions; the one or more processors call the program instructions so that the electronic device executes the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer program product comprising instructions, characterized in that When the computer program product runs on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and system for handling service request procedure in communication network

    CN111903178A

  • Communication method and device

    CN111917806A

  • Communication method, electronic equipment and computer readable storage medium

    CN117014984A

  • Apparatuses and methods of signaling enhancement for always-on protocol data unit (PDU) session

    US20230048935A1

  • Controlling voice communications over a data network

    US6934279B1