Network connection methods, devices, electronic devices and readable storage media
By sending a registration request to the second mobile communication network and disconnecting the PDN connection while the data network is off, the problem of unexpected data and power consumption of electronic devices after the user turns off the data network is solved, and data and power saving is achieved when the data network is off.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-04-03
AI Technical Summary
Even after a user turns off their data network, electronic devices can still consume unexpected amounts of data and power, especially during the 4G to 5G transition, when network devices frequently paging each other, leading to increased power consumption and data usage.
By sending a registration request to the second mobile communication network while the data network is off, and disconnecting the first PDN connection when the PDN connection is transferred to the second mobile communication network, the connection is completely disconnected when the data network is off, thus avoiding frequent paging by network devices.
It effectively saves data traffic and power consumption of electronic devices, improves user experience, and avoids power consumption problems caused by unnecessary network connections and paging.
Smart Images

Figure CN115580942B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, and specifically relates to a network connection method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] With the development of information technology, people are accustomed to using electronic devices for online social interaction, work, and study. In environments without wireless networks, they can only use mobile communication networks, i.e., data networks, to access the internet. Since data networks are charged based on data usage, most users choose to turn off data networks when they don't need them to reduce data consumption.
[0003] Currently, in some cases, even after a user turns off their data network, they can still receive information sent by the network device, resulting in unexpected data consumption. Summary of the Invention
[0004] The purpose of this application is to provide a network connection method, apparatus, electronic device, and readable storage medium that can solve the problem of traffic consumption that does not meet user expectations in the prior art.
[0005] In a first aspect, embodiments of this application provide a network connection method, the method comprising:
[0006] A first packet data network (PDN) connection is established through a first mobile communication network;
[0007] When the data network of the electronic device is turned off, a registration request message is sent to the second mobile communication network;
[0008] When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, the first PDN connection is disconnected.
[0009] Secondly, embodiments of this application provide a network connection device, the method comprising:
[0010] A module is established to establish a first packet data network (PDN) connection through a first mobile communication network.
[0011] The sending module is used to send registration request information to the second mobile communication network when the data network of the electronic device is turned off;
[0012] The disconnect module is used to disconnect the first PDN connection when the first PDN connection is transferred from the first mobile communication network to the second mobile communication network.
[0013] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0016] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0017] In the embodiments of this application, a first packet data network (PDN) connection is established through a first mobile communication network. If the data network is off, it indicates that the user does not need to use the data network. Therefore, when the electronic device's data network is off, a registration request is sent to the second mobile communication network. When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, the first PDN connection is disconnected. Here, during the registration and internet access process on the second mobile communication network, the first PDN connection can be completely disconnected, ensuring that the electronic device will not receive any information from the network device side when the data network is off. Furthermore, the first PDN connection is disconnected when it is transferred to the second mobile communication network, which complies with the operator's requirements. This saves data traffic and power consumption of the electronic device. Attached Figure Description
[0018] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0019] Figure 2 This is a flowchart of a network connection method provided in an embodiment of this application;
[0020] Figure 3 This is a structural diagram of a network connection device provided in an embodiment of this application;
[0021] Figure 4 This is one of the hardware structure diagrams of the electronic device according to an embodiment of this application;
[0022] Figure 5 This is the second schematic diagram of the hardware structure of the electronic device according to an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0025] A Packet Data Network (PDN) is a data connection between electronic devices and network devices, used by users to access the network.
[0026] A modem (modem) is a type of computer hardware that translates a computer's digital signals into analog signals that can be transmitted over ordinary telephone lines. These analog signals can then be received by another modem at the other end of the line and translated into a language that the computer can understand. This simple process enables communication between two computers.
[0027] An application processor (AP) is a very large-scale integrated circuit that extends audio and video functions and dedicated interfaces on the basis of a low-power central processing unit.
[0028] Fourth-generation mobile communication technology (4G) is capable of transmitting high-quality video images, with image transmission quality comparable to high-definition television. 4G mobile communication technology can find the fastest and most efficient communication path among multiple different network systems, platforms, and wireless communication interfaces to perform the most real-time transmission, reception, and location actions.
[0029] The 5th generation mobile communication technology (5G) is a new generation of broadband mobile communication technology characterized by high speed, low latency and massive connectivity. 5G communication facilities are the network infrastructure for realizing the interconnection of people, machines and things.
[0030] The primary card is the Subscriber Identity Module (SIM) in an electronic device that provides data services.
[0031] A secondary SIM card is a SIM card in an electronic device that does not provide data services.
[0032] Sleep mode intelligently determines the user's sleep period and disables data network function when the user is in a preset time period, supporting only necessary functions such as phone calls and text messages.
[0033] The network connection method provided in this application embodiment can be applied to at least the following application scenarios, which will be described below.
[0034] like Figure 1 As shown, electronic devices utilize data networks by interacting with network devices, where the network device can be the core network. Currently, most electronic devices support dual SIM cards. The primary SIM card provides both voice and data services, while the secondary SIM card only provides voice services. To facilitate rapid switching between primary and secondary SIM cards, a PDN connection is also established on the secondary SIM card. This ensures that when the secondary SIM card switches to the primary SIM card, a new PDN connection does not need to be established, guaranteeing switching speed and user convenience.
[0035] When the primary SIM card is running on 5G, data usage is also rapid. To save power and data, users sometimes actively turn off the data network. Users expect their electronic devices to operate in a state where turning off the data network eliminates data consumption and saves power. To improve battery life, many electronic devices also offer a sleep mode. When a preset time period is reached and the user turns off the screen, the device automatically enters sleep mode, turning off the data network and disconnecting the data connection between the access point (AP) and the modem. If the device is currently registered on 5G, it will immediately disconnect the PDN connection, thus disconnecting the data connection between the modem and network devices. This prevents the AP and network from sending data to the modem, eliminating data paging and allowing the modem more time to sleep, thus saving power.
[0036] However, in certain scenarios, when an electronic device is in a 4G network environment, if the data network is turned off, the PDN connection cannot be disconnected, that is, the data connection between the modem and the network device cannot be disconnected. In this case, the network device can still page the primary or secondary card at any time.
[0037] Statistical results based on big data indicate that when an electronic device is in an area with weak 5G signal, if the data network is turned off, the primary SIM card is highly likely to remain on the 4G network. In other words, the aforementioned specific scenario is highly probable.
[0038] In this specific scenario, after the data network is turned off, the primary SIM card does not disconnect from the PDN connection, and the modem maintains its data connection with the network device. When the primary SIM card switches from 4G to 5G, the PDN connection will seamlessly switch from 4G to 5G.
[0039] In other words, even though the electronic device's data network is turned off, the primary SIM card still maintains a data connection with the network device. The network device can continue to send data to the modem. The specific process includes: the network device sends the first data to the modem; after the modem establishes a Radio Resource Control (RRC) link, because the data connection between the access point (AP) and the modem is broken, the first data received by the modem cannot be sent to the AP. Therefore, the AP cannot receive and process the first data, resulting in the network device not receiving confirmation from the AP's application software. The network device may repeatedly send the first data to the electronic device, causing the modem to have very short sleep times, resulting in significant power consumption and, without the user's knowledge, a large amount of mobile data usage.
[0040] Furthermore, disabling the primary SIM card's data network will not affect the secondary SIM card. When the secondary SIM card switches from 4G to 5G, the PDN connection also seamlessly switches to 5G. Statistical results based on big data indicate that the power consumption of frequent paging on the secondary SIM card under 5G is greater than that under 4G. Frequent paging on the secondary SIM card not only causes power consumption issues, but also, as the secondary SIM card responds to paging and establishes an air interface connection, it also preempts radio frequency (RF) resources, thus affecting the smoothness of the primary SIM card's services.
[0041] In response to the problems in related technologies, embodiments of this application provide a network connection method, apparatus, electronic device, and storage medium, which can solve the problem of traffic consumption that does not meet user expectations in related technologies.
[0042] The network connection method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0043] Figure 2This is a flowchart illustrating a network connection method provided in an embodiment of this application.
[0044] like Figure 2 As shown, the network connection method may include steps 210-230. This method is applied to a network connection device, as detailed below:
[0045] Step 210: Establish a first packet data network (PDN) connection through the first mobile communication network.
[0046] For example, the first mobile communication network is 4G.
[0047] Step 220: Send registration request information to the second mobile communication network while the data network of the electronic device is turned off.
[0048] The second mobile communication network consumes more network resources than the first mobile communication network. For example, the first mobile communication network is 4G, and the second mobile communication network is 5G.
[0049] Once an electronic device is transferred from the first mobile communication network to the second mobile communication network, if it is detected that the data network was previously turned off (i.e., the data network is in a closed state), it sends a registration request to the second mobile communication network.
[0050] Since registration is required every time a network is connected, i.e., a registration request for the second mobile communication network needs to be sent to the network device, the first PDN connection can be disconnected by taking advantage of the opportunity to register with the second mobile communication network.
[0051] If the signal is weak at 5G and the network switches back to 4G, there will be no first PDN connection under 4G. This ensures that the network will not frequently page the modem under either 4G or 5G network conditions.
[0052] In one possible embodiment, the following steps may be included prior to step 220:
[0053] When the network switching conditions are met, the information is converted according to a preset protocol, and the first PDN connection is transferred from the first mobile communication network to the second mobile communication network.
[0054] Specifically, transferring the first PDN connection from the first mobile communication network to the second mobile communication network means that after switching to the second mobile communication network, the Internet Protocol (IP) address used by the electronic device when using the first mobile communication network can still be used, that is, the IP address does not change.
[0055] The network handover conditions include at least one of the following:
[0056] The signal strength of the second mobile communication network is greater than a preset threshold.
[0057] Upon receiving a first instruction from the user, the first instruction is used to instruct switching to the second mobile communication network;
[0058] The system receives a second instruction from a network device, which instructs the user to switch to a second mobile communication network.
[0059] If the signal strength of the second mobile communication network is greater than a preset threshold, the information can be converted according to a preset protocol to transfer the first PDN connection from 4G to 5G.
[0060] In accordance with network protocol requirements, the first PDN connection can seamlessly switch between 4G and 5G for smooth service transitions, whether switching from 4G to 5G or vice versa.
[0061] Upon receiving the first instruction input by the user, the system can convert information according to a preset protocol to transfer the first PDN connection from 4G to 5G. The first instruction can be a user's configuration command for the data network from the settings list.
[0062] Upon receiving a second instruction from the network device, the information can be converted according to a preset protocol to transfer the first PDN connection from 4G to 5G. The second instruction can be a configuration command from the network device for the data network.
[0063] In one possible embodiment, the following steps may be included prior to step 220:
[0064] Upon receiving user input indicating that the data network should be turned off, the data network will be switched to the off state; or,
[0065] When the electronic device is in the target operating state, switch the data network to the off state.
[0066] If a user does not need to use the data network, they can enable the data network to be turned off by submitting a shutdown input.
[0067] When the system is in a preset operating state, the data network can be switched to a shutdown state. Specifically, this can include switching the data network to a shutdown state when a preset time period has passed and no user operation has been received.
[0068] The preset operating state can be a sleep mode pre-set for the electronic device. The preset time period can be a preset sleep period, such as 12:00 AM to 6:00 AM. If the device is within the preset time period and no user operation is received, it means that the user does not need to use the data network at this time.
[0069] Specifically, switching the data network to the off state can include: the AP sending a data network disconnect command to the MODEM to switch the data network to the off state.
[0070] Step 230: When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, disconnect the first PDN connection.
[0071] Big data shows that because 5G signal strength is weak, electronic devices will establish the first PDN connection through 4G. However, electronic devices have been trying to prioritize 5G services, so the probability of switching from 4G to 5G is very high. After switching from 4G to 5G, the first PDN connection under 4G will be seamlessly transferred to 5G, and there is no need to establish an additional first PDN connection under 5G.
[0072] Similarly, when switching from 5G to 4G, the PDN connection under 5G will be transferred to 4G, and there is no need to establish a PDN connection under 4G. The PDN connection can include the user's IP address and network access information. Network access information refers to a network access technology, a parameter that must be configured when an electronic device accesses the internet, determining which access method the electronic device uses to access the network.
[0073] In one possible embodiment, step 230 may specifically include the following steps:
[0074] When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, a disconnection request message is sent to the network device to request the network device to disconnect the first PDN connection.
[0075] Upon receiving the registration acceptance information corresponding to the registration request, it indicates that the first PDN connection has been transferred from the first mobile communication network to the second mobile communication network. That is, after the electronic device switches to 5G, if the modem detects that the electronic device's data network is off, it notifies the network device to disconnect the first PDN connection.
[0076] Once the network device disconnects the first PDN connection, it no longer knows the IP address of the electronic device and therefore cannot continue to send data to the IP address of the electronic device. In other words, the electronic device is completely disconnected from the data network and will not generate traffic data.
[0077] This implementation complies with the operator's protocol and does not disconnect the first PDN connection under 4G. The first PDN connection is disconnected under 5G.
[0078] This prevents the primary and secondary SIM cards from maintaining the first PDN connection after switching from 4G to 5G, thus avoiding power consumption and data usage issues caused by frequent network paging of the terminal. This improves the user experience.
[0079] In one possible embodiment, the above steps 210-230 are performed based on a first user identity SIM card, and the method may further include:
[0080] When a second SIM card establishes a second PDN connection through the first mobile communication network, a registration request is sent to the second mobile communication network.
[0081] In the case where the second PDN connection is transferred from the first mobile communication network to the second mobile communication network based on the second SIM card, the second PDN connection is disconnected.
[0082] Wherein, the first SIM card is the primary card, and steps 210-230 above are performed based on the first SIM card, which may specifically include:
[0083] When the data network is off, the first SIM card is controlled to send a registration request to the second mobile communication network to the network device. This is used to send a disconnection request to the network device upon receiving a registration acceptance message corresponding to the registration request. This allows the modem more time to sleep and does not consume the electronic device's data.
[0084] The second SIM card is a secondary SIM card. After switching from 4G to 5G, there's no need to check if the data network is disabled. The secondary SIM card can directly send a registration request to the network device for the second mobile communication network, which is used for subsequent requests to disconnect the second PDN connection. This direct request to disconnect the second PDN connection conserves network resources.
[0085] Here, based on the second SIM card establishing a second PDN connection through the first mobile communication network, there is no need to determine whether the data network is closed. The second SIM card can be directly controlled to send registration request information to the network device for the second mobile communication network. Since the secondary card does not provide data services, disconnecting the second PDN connection will not affect the user experience and can avoid frequent data paging under the second mobile communication network, thus preventing the second SIM card from occupying the resources and consuming traffic of the first SIM card.
[0086] In one possible embodiment, steps 210-230 above are performed based on a third SIM card, and the method may further include:
[0087] When the fourth SIM card is in the network environment of the second mobile communication network, the fourth SIM card is prohibited from establishing a PDN connection.
[0088] The third SIM card is the primary card, and the fourth SIM card is the secondary card. If the fourth SIM card is in the network environment of the second mobile communication network, the fourth SIM card is prohibited from establishing a PDN connection.
[0089] Here, since the secondary SIM card does not provide data services, the fourth SIM card is prohibited from establishing a PDN connection. This will not affect the user experience and can avoid frequent data paging under the second mobile communication network, thus preventing the fourth SIM card from taking up the resources and consuming data of the third SIM card.
[0090] In one possible embodiment, upon receiving user input to enable the data network, the AP sends a PDN connection request to the MODEM to immediately resume establishing the PDN connection.
[0091] In the embodiments of this application, a first packet data network (PDN) connection is established through a first mobile communication network. If the data network is off, it indicates that the user does not need to use the data network. Therefore, when the electronic device's data network is off, a registration request is sent to the second mobile communication network. When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, the first PDN connection is disconnected. Here, during the registration and internet access process on the second mobile communication network, the first PDN connection can be completely disconnected, ensuring that the electronic device will not receive any information from the network device side when the data network is off. Furthermore, the first PDN connection is disconnected when it is transferred to the second mobile communication network, which complies with the operator's requirements. This saves data traffic and power consumption of the electronic device.
[0092] The network connection method provided in this application can be executed by a network connection device. This application uses a network connection device executing the network connection method as an example to illustrate the network connection device provided in this application.
[0093] Figure 3 This is a block diagram of a network connection device provided in an embodiment of this application. The device 300 includes:
[0094] Module 310 is used to establish a first packet data network (PDN) connection through a first mobile communication network.
[0095] The sending module 320 is used to send registration request information to the second mobile communication network when the data network of the electronic device is turned off.
[0096] The disconnect module 330 is used to disconnect the first PDN connection when the first PDN connection is transferred from the first mobile communication network to the second mobile communication network.
[0097] In one possible embodiment, the device 300 may further include: a transfer module, configured to transfer the first PDN connection from the first mobile communication network to the second mobile communication network according to a preset protocol, provided that network switching conditions are met.
[0098] In one possible embodiment, disconnecting module 330 is specifically used for:
[0099] When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, a disconnection request message is sent to the network device to request the network device to disconnect the first PDN connection.
[0100] In one possible embodiment, the device 300 may further include:
[0101] The first switching module is used to switch the data network to the off state when it receives a user's input to turn off the data network.
[0102] The second transfer module is used to switch the data network to the off state when the electronic device is in the target operating state.
[0103] In one possible embodiment, the network handover condition includes at least one of the following:
[0104] The signal strength of the second mobile communication network is greater than a preset threshold.
[0105] Upon receiving a first instruction from the user, the first instruction is used to instruct switching to the second mobile communication network;
[0106] The system receives a second instruction from a network device, which instructs the user to switch to a second mobile communication network.
[0107] In one possible embodiment, the device 300 may further include the following steps, such as those in the establishment module 310, the transmission module 320, and the disconnection module 330, performed based on a first user identity SIM card:
[0108] The first sending module is used to send registration request information to the second mobile communication network when a second PDN connection is established through the first mobile communication network based on the second SIM card;
[0109] In the case where the second PDN connection is transferred from the first mobile communication network to the second mobile communication network based on the second SIM card, the second PDN connection is disconnected.
[0110] In one possible embodiment, the device 300 may further include the following steps, performed based on a third SIM card, such as the establishment module 310, the transmission module 320, and the disconnection module 330:
[0111] The blocking module is used to prevent the fourth SIM card from establishing a PDN connection when the fourth SIM card is in the network environment of the second mobile communication network.
[0112] In summary, a first packet data network (PDN) connection is established through the first mobile communication network. If the data network is off, it indicates that the user does not need to use the data network. Therefore, when the electronic device's data network is off, a registration request is sent to the second mobile communication network. The first PDN connection is then disconnected when the connection is transferred from the first to the second mobile communication network. This ensures that the first PDN connection is completely disconnected during the registration process on the second mobile communication network, guaranteeing that the electronic device will not receive any further information from the network device when the data network is off. Furthermore, the first PDN connection is disconnected only when it is transferred to the second mobile communication network, complying with operator requirements. This conserves data traffic and battery power generated by the electronic device.
[0113] The network connection device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0114] The network connection device in this application embodiment can be a device with an action system. The action system can be an Android action system, an iOS action system, or other possible action systems; this application embodiment does not specifically limit it.
[0115] The network connection device provided in this application embodiment can implement the various processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0116] Optionally, such as Figure 4 As shown, this application embodiment also provides an electronic device 410, including a processor 411, a memory 412, and a program or instructions stored in the memory 412 and executable on the processor 411. When the program or instructions are executed by the processor 411, they implement the various steps of any of the above network connection method embodiments and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0117] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0118] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0119] The electronic device 500 includes, but is not limited to, components such as: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, and processor 510.
[0120] Those skilled in the art will understand that the electronic device 500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0121] The processor 510 is used to establish a first packet data network (PDN) connection through the first mobile communication network.
[0122] Network module 502 is used to send registration request information to a second mobile communication network when the data network of the electronic device is turned off.
[0123] The processor 510 is also configured to disconnect the first PDN connection when the first PDN connection is transferred from the first mobile communication network to the second mobile communication network.
[0124] Optionally, the processor 510 is further configured to, when network switching conditions are met, convert information according to a preset protocol to transfer the first PDN connection from the first mobile communication network to the second mobile communication network.
[0125] Optionally, network module 502 is further configured to send a disconnection request message to the network device when the first PDN connection is transferred from the first mobile communication network to the second mobile communication network. The disconnection request message is used to request the network device to disconnect the first PDN connection.
[0126] Optionally, the processor 510 is also configured to switch the data network to a closed state upon receiving user input indicating that the data network is closed.
[0127] The processor 510 is also used to switch the data network to a shutdown state when the electronic device is in the target operating state.
[0128] Optionally, network module 502 is further configured to send registration request information to the second mobile communication network when a second PDN connection is established through the first mobile communication network based on the second SIM card;
[0129] The processor 510 is also configured to disconnect the second PDN connection when the second PDN connection is transferred from the first mobile communication network to the second mobile communication network based on the second SIM card.
[0130] Optionally, the processor 510 is also configured to prevent the fourth SIM card from establishing a PDN connection when the fourth SIM card is in the network environment of the second mobile communication network.
[0131] In the embodiments of this application, a first packet data network (PDN) connection is established through a first mobile communication network. If the data network is in a closed state, it indicates that the user does not need to use the data network. Therefore, when the electronic device's data network is closed, a registration request is sent to the second mobile communication network. When the first PDN connection is transferred from the first mobile communication network to the second mobile communication network, the first PDN connection is disconnected. Here, during the registration and internet access process on the second mobile communication network, the first PDN connection can be completely disconnected, ensuring that the electronic device will not receive any information from the network device side when the data network is closed. Furthermore, the first PDN connection is disconnected when it is transferred to the second mobile communication network, which complies with the operator's requirements. This saves data traffic and power consumption of the electronic device. It should be understood that in the embodiments of this application, the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The GPU 5041 processes image data of still images or video images obtained by an image capture device (such as a camera) in video image capture mode or image capture mode. The display unit 506 may include a display panel 5061, which may be configured using a liquid crystal display, an organic light-emitting diode, or other similar means. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touchscreen. The touch panel 5071 may include a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be elaborated further here. The memory 509 can be used to store software programs and various data, including but not limited to applications and motion systems. The processor 510 may integrate an application processor and a modem processor. The application processor mainly handles the motion system, user page, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 510.
[0132] The memory 509 can be used to store software programs and various data. The memory 509 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 509 may include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0133] Processor 510 may include one or more processing units; optionally, processor 510 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 510.
[0134] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described network connection method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0135] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0136] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above network connection method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0137] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0138] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the network connection method embodiments described above, and can achieve the same technical effects. To avoid repetition, it will not be described again here.
[0139] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0141] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A network connection method, characterized in that, Applied to electronic devices, the method includes: A first packet data network (PDN) connection is established through a first mobile communication network; When the data network of the electronic device is turned off, a registration request message is sent to the second mobile communication network, the registration request message being used to register with the second mobile communication network; Upon receiving the registration acceptance information corresponding to the registration request information, it is determined that the first PDN connection has been transferred from the first mobile communication network to the second mobile communication network, and a disconnection request information is sent to the network device, the disconnection request information being used to request the network device to disconnect the first PDN connection; The first mobile communication network is 4G, and the second mobile communication network is 5G.
2. The method according to claim 1, characterized in that, Before sending the registration request information to the second mobile communication network, the method further includes: When the network switching conditions are met, the first PDN connection is transferred from the first mobile communication network to the second mobile communication network according to the preset protocol conversion information.
3. The method according to claim 1, characterized in that, Before sending the registration request information to the second mobile communication network, the method further includes: Upon receiving user input indicating that the data network should be turned off, the data network will be switched to the off state; or, When the electronic device is in the target operating state, the data network is switched to the off state.
4. The method according to claim 2, characterized in that, The network switching conditions include at least one of the following: The signal strength of the second mobile communication network is greater than a preset threshold; Upon receiving a first instruction input by the user, the first instruction is used to instruct switching to the second mobile communication network; The system receives a second instruction from a network device, which instructs the user to switch to the second mobile communication network.
5. The method according to claim 1, characterized in that, Performing the steps of the method as described in claim 1 based on the first user identification SIM card, the method further includes: When the second SIM card establishes a second PDN connection through the first mobile communication network, the registration request information is sent to the second mobile communication network; In the case where the second PDN connection is transferred from the first mobile communication network to the second mobile communication network based on the second SIM card, the second PDN connection is disconnected.
6. The method according to claim 1, characterized in that, Performing the steps of the method as described in claim 1 based on a third SIM card, the method further includes: When the fourth SIM card is in the network environment of the second mobile communication network, the establishment of a PDN connection by the fourth SIM card is prohibited.
7. A network connection device, characterized in that, Applied to electronic devices, the device includes: A module is established to establish a first packet data network (PDN) connection through a first mobile communication network. The sending module is configured to send registration request information to the second mobile communication network when the data network of the electronic device is in a closed state, the registration request information being used to register with the second mobile communication network; The disconnect module is used to determine, upon receiving the registration acceptance information corresponding to the registration request information, that the first PDN connection has been transferred from the first mobile communication network to the second mobile communication network, and to send a disconnect request information to the network device, wherein the disconnect request information is used to request the network device to disconnect the first PDN connection; The first mobile communication network is 4G, and the second mobile communication network is 5G.
8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Network switching method, device, terminal and storage medium
CN108834203A
Data network switching method and device, mobile terminal and storage medium
CN110996361A
Session management method and device, terminal equipment and computer readable storage medium
CN112492704A