Network access method and electronic device

The method addresses 5G network access failures by switching to 4G based on retry duration, ensuring continuous network access and reducing device overhead.

CN116744403BActive Publication Date: 2024-12-13HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211403132.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2024-12-13
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

5G network data activation failures prevent mobile terminals from accessing the network normally, leading to Internet connectivity issues.

Method used

An electronic device method that detects activation failure information to shut down the 5G mobile data network mode and switch to 4G, determining the shutdown duration based on retry duration to ensure continuous network access.

Benefits of technology

Ensures uninterrupted network access by promptly switching to 4G when 5G fails, avoiding prolonged network unavailability and reducing device overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116744403B_ABST
    Figure CN116744403B_ABST
Patent Text Reader

Abstract

The present application provides a network access method and electronic device, and relates to the field of communication technology. The network access method of the present application includes: in response to the user's operation of accessing the network, sending a data activation request to a 5G network device; when receiving the activation failure information returned by the 5G network device, detecting whether the electronic device meets the preset shutdown condition according to the activation failure information; when the shutdown condition is met, turning off the 5G mobile data network mode of the electronic device and determining the shutdown duration of the 5G mobile data network mode of the electronic device according to the fallback duration; accessing the 4G mobile data network within the shutdown duration. By adopting the method in the present application, when the electronic device is rejected for data activation by the 5G network device, the 5G mobile data network mode can be turned off in time, and the 4G mobile data network can be accessed, so as to ensure that the electronic device can access the data network normally and ensure that the user can access the Internet normally through the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network access method and electronic device. Background Art

[0002] 5G network refers to the fifth generation of network in the development of mobile communication network. Compared with the previous four generations of mobile network, 5G network has more enhanced functions in actual application, and theoretically its transmission speed can reach tens of GB (Gigabits) per second, which is hundreds of times faster than 4G mobile network.

[0003] However, when the mobile terminal initiates a data activation request to the 5GC (5G Core network), data activation may fail, causing the mobile terminal to be unable to access the network normally, affecting the user's Internet access through the mobile network. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a network access method and electronic device. When the electronic device is denied data activation by the 5G network device, the 5G mobile data network mode can be turned off in time, so that the electronic device can access the 4G mobile data network during the period when the 5G mobile data network mode is turned off, ensuring that the electronic device can access the data network normally and that the user can access the Internet normally through the electronic device.

[0005] In a first aspect, the present application provides a network access method, which is applied to an electronic device, comprising: in response to a user's operation of accessing the network, sending a data activation request to a 5G network device; when receiving activation failure information returned by the 5G network device, detecting whether the electronic device meets a preset shutdown condition based on the activation failure information, the activation failure information including a fallback duration; when it is determined that the electronic device meets the shutdown condition, turning off the 5G mobile data network mode of the electronic device and determining the shutdown duration of the 5G mobile data network mode of the electronic device based on the fallback duration; and accessing a 4G mobile data network within the shutdown duration.

[0006] In this way, the electronic device can be a mobile phone, tablet computer, bracelet and other devices. In response to the user's operation of accessing the network, the electronic device sends a data activation request to the 5G network device. When receiving the activation failure information returned by the 5G network device, if the electronic device determines that the shutdown condition is met, the electronic device turns off the 5G mobile data network mode and connects to the 4G mobile data network during the shutdown time, so that the electronic device is connected to the data network during the shutdown time, so that the user can use the electronic device to surf the Internet. In this example, because the electronic device turns off the 5G mobile data network mode after determining that the electronic device meets the shutdown condition, the problem of the electronic device being unable to access any data network due to waiting for the next request for data activation within the backoff time is promptly avoided.

[0007] According to the first aspect, the shutdown duration of the 5G mobile data network mode of the electronic device is determined according to the backoff duration, including: generating a retry duration according to the backoff duration, the retry duration is used to indicate the interval duration of re-initiating a data activation request to the 5G network device; determining the shutdown duration according to the retry duration. In this way, after receiving the backoff duration, the electronic device can determine the duration of re-requesting data activation according to the backoff duration, thereby avoiding the electronic device from continuously requesting data activation from the 5G network device. At the same time, the shutdown duration determined based on the retry duration makes the shutdown duration not a fixed value, but changes according to the retry duration, thereby improving the flexibility of the duration of the electronic device turning off the 5G mobile data network mode.

[0008] According to the first aspect, determining the shutdown duration according to the retry duration includes: obtaining a duration segment that matches the retry duration; determining the shutdown duration according to the obtained duration segment and a first corresponding relationship, wherein the first corresponding relationship is used to indicate the relationship between the duration segment and the shutdown duration. In this way, each duration segment has its own corresponding shutdown duration, and by obtaining the duration segment that matches the retry duration, the shutdown duration can be quickly determined, thereby increasing the speed of determining the shutdown duration.

[0009] According to the first aspect, the duration segment includes: a first duration segment, a second duration segment, a third duration segment and a fourth duration segment; obtaining a duration segment that matches the retry duration includes: when it is detected that the retry duration is less than the first threshold, the first duration segment is determined to match the retry duration; when it is detected that the retry duration is greater than or equal to the first threshold and less than the second threshold, the second duration segment is determined to match the retry duration; when it is detected that the retry duration is greater than or equal to the second threshold and less than the third threshold, the third duration segment is determined to match the retry duration; when it is detected that the retry duration is greater than or equal to the third threshold, the fourth duration segment is determined to match the retry duration. In this way, through the three pre-set thresholds, the duration segment in which the retry duration is located can be determined, and with four duration segments and 4 shutdown durations, the problem of the shutdown duration being too long or too short can be avoided.

[0010] According to the first aspect, the shutdown duration is determined according to the retry duration, including: when it is detected that the retry duration is less than or equal to the preset lower limit duration, the lower limit duration is used as the shutdown duration; when it is detected that the retry duration is greater than the lower limit duration and less than the preset upper limit duration, the retry duration is used as the shutdown duration; when it is detected that the retry duration is greater than or equal to the upper limit duration, the upper limit duration is used as the shutdown duration. In this way, the retry duration is used as the shutdown duration, so that different retry durations correspond to different shutdown durations, which increases the flexibility of the shutdown duration; at the same time, since the 5G mobile data network mode of the electronic device needs to consume the overhead of the electronic device when turning on and off, the retry duration is compared with the lower limit duration, which can avoid the problem of increased overhead of the electronic device due to the short shutdown duration determined based on the retry duration; comparing the retry duration with the upper limit duration can also avoid the problem of too long time to turn off the 5G mobile data network mode of the electronic device, resulting in the electronic device being unable to access the 5G mobile data network for a long time.

[0011] According to the first aspect, determining the shutdown duration according to the retry duration includes: using the retry duration as the shutdown duration. In this way, using the retry duration as the shutdown duration makes different retry durations correspond to different shutdown durations, increasing the flexibility of the shutdown duration.

[0012] According to the first aspect, detecting whether the electronic device meets the preset shutdown condition according to the activation failure information includes: obtaining the retry time according to the backoff time; detecting whether the retry time is greater than the fourth threshold; when it is detected that the retry time is greater than the fourth threshold, detecting whether the network standard of the electronic device is the 5G new air interface NR standard; when it is detected that the network standard of the electronic device belongs to the 5G NR standard, determining that the shutdown condition is met. In this way, since turning on and off the 5G mobile data network mode of the electronic device requires the consumption of the electronic device's overhead, when the retry time is too short, it is not necessary to turn off the 5G mobile data network mode of the electronic device, avoiding the increase of unnecessary overhead of the electronic device; when the retry time is greater than the fourth threshold and is in the 5G NR standard, it is determined that the shutdown condition is met, avoiding the problem that the electronic device cannot use the data network normally due to turning off the data network mode in other network standards.

[0013] According to the first aspect, the value range of the fourth threshold is 10 seconds to 40 seconds.

[0014] According to the first aspect, detecting whether the electronic device meets the preset shutdown condition according to the activation failure information includes: obtaining the failure reason value in the activation failure information; when the failure reason value is detected to be a first reason value and the number of times the first reason value is received exceeds the number threshold, determining that the shutdown condition is met. In this way, the electronic device can shut down the 5G mobile data network mode of the electronic device for a specific failure reason value, avoiding the problem of frequently shutting down the 5G mobile data network mode of the electronic device.

[0015] According to the first aspect, turning off the 5G mobile data network mode of the electronic device includes: adjusting the first priority of the 5G mobile data network mode in the modem of the electronic device to the second priority, wherein the second priority is lower than the third priority of the 4G mobile data network mode, and the third priority is lower than the first priority. In this way, since the high-priority data network is preferentially searched by the electronic device, the electronic device changes the priority of the 5G mobile data network mode to the second priority, so that the electronic device will preferentially search for the 4G mobile data network, so that the electronic device can preferentially access the 4G mobile data network.

[0016] According to the first aspect, turning off the 5G mobile data network mode of the electronic device includes: turning off the function of the modem of the electronic device to search for the 5G mobile data network. In this way, the electronic device directly turns off the 5G mobile data network function of the electronic device, and the turning off method is simple.

[0017] According to the first aspect, detecting whether the activation failure information satisfies a preset shutdown condition includes: when it is detected that the fallback time is greater than 0, determining that the shutdown condition is met. In this way, the electronic device can promptly shut down the 5G mobile data network mode of the electronic device.

[0018] According to the first aspect, the user's operation of accessing the network includes: a power-on operation, an operation of turning on the mobile data network, or an operation of turning off the flight mode.

[0019] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, enables the electronic device to execute the network access method corresponding to the first aspect and any one of the implementation methods of the first aspect.

[0020] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0021] In a third aspect, the present application provides a computer-readable medium for storing a computer program. When the computer program runs on an electronic device, the electronic device executes the network access method corresponding to the above-mentioned first aspect and any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 is a schematic diagram showing an exemplary scenario of a mobile phone connecting to a 5G network;

[0024] Figure 2 is an interaction diagram showing an exemplary 5G network device rejecting a data activation request of a mobile phone;

[0025] Figure 3 is a schematic diagram of the structure of an electronic device shown exemplarily;

[0026] Figure 4 is a schematic diagram of a software structure of an electronic device shown as an example;

[0027] Figure 5 is a flowchart exemplarily showing a method for network access;

[0028] Figure 6 is a schematic diagram showing exemplary interaction between components in mobile phone A and 5G network equipment;

[0029] Figure 7 is a flowchart exemplarily showing another method of network access;

[0030] Figure 8 The figure is a schematic diagram showing an exemplary scenario of a mobile phone connecting to a 4G network. DETAILED DESCRIPTION

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

[0032] The term "and / or" in this article is merely a description of 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.

[0033] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0034] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0035] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0036] 5G NR (New Radio) is a new wireless access technology developed by the 3rd Generation Partnership Project (3GPP) for 5G mobile communication networks. It is a global standard for the air interface of 5G networks. At present, the networking modes of 5G systems include 5G NSA (Non-Standalone) and 5G SA (Standalone). Among them, the 5G NSA networking mode requires the use of 4G base stations and 4G core networks, with 4G as the anchor point of the control plane, to meet the needs of aggressive operators to use existing LTE network resources to achieve rapid deployment of 5G NR. SA networking is independent of the 4G network and requires the construction of a new network.

[0037] The network architecture of the 5G network includes RAN (Radio Access Network), bearer network and core network. The equipment of the radio access network is generally the base station of the operator (for example, gNB). The bearer network is a network used to carry and aggregate data. The bearer network equipment can be PTN (Packet Transport Network) and OTN (Optical Transport Network). 5GC is used for data processing and routing. 5GC includes: AMF (Access and Mobility Management Function), SMF (Session Management Function), UPF (User Plane Function), PCF (Policy Control Function), UDM (Unified Data Management), DN (Data Network)

[0038] The user equipment (UE) sends a data activation request to the core network through the wireless access network, that is, requests to establish a PDU (Protocol Data Unit) session. The PDU session is a path between the user equipment and the external network, used to implement data interaction with the external data network (DNN). The process of the user equipment requesting data activation from the 5GC may include:

[0039] 1. The UE initiates a PDU session request to the SMF through the base station and AMF.

[0040] 2. After receiving the PDU session request, SMF obtains the subscription data of the UE from UDM.

[0041] 3. After receiving the PDU session request, SMF obtains the policy rules for this type of user from PCF.

[0042] 4. After receiving the PDU session request, SMF establishes a session with UPF for user plane connection.

[0043] 5. SMF initiates a wireless resource request to the base station.

[0044] 6. After receiving the wireless resource request, the base station sets the corresponding wireless resources and feeds back the settings to the SMF.

[0045] 7. After receiving the reply, SMF updates UPF to establish a tunnel from UPF to the base station.

[0046] After the above steps, the UE obtains the tunnel from the UE to the UPF. During the PDU session establishment process, the corresponding user plane connection (UE to DN) will be activated.

[0047] The user equipment sends a data activation request to the 5G core network. When the data activation request sent by the UE is not correctly received by the 5G network, or due to congestion or other network problems in the 5G network, the 5G network will reject the UE's data activation request and return activation failure information to the UE. The activation failure information usually carries a backoff time (i.e., backoff time). The UE will no longer send data activation requests to the 5G network within the backoff time. In other words, within the backoff time, the UE does not request data activation from the 5G network, resulting in the UE being unable to use the network normally.

[0048] Figure 1 FIG. 1 is a schematic diagram showing an exemplary scenario of a mobile phone connecting to a 5G network. Figure 1 As shown in 1a, a data network switch 102 is displayed in the display interface 101. The user clicks the data network switch 102. In response to the user's click operation, the mobile phone requests data activation from the 5G core network, that is, sends a data activation request to the 5G network device. It should be noted that before the user clicks the data network switch 102, the mobile phone has already turned on the 5G mobile data network mode. Figure 1 The signal displayed in the status bar of 1a is 5G. The mobile phone requests data activation from the core network. When the 5G core network processes the data activation request, it detects a network problem and rejects the data activation request of the mobile phone. It returns an activation failure message to the mobile phone, which includes the fallback time (e.g., 8 minutes).

[0049] Figure 2 An interactive diagram showing an exemplary 5G network device rejecting a mobile phone's data activation request.

[0050] Step 201: The mobile phone sends a data activation request to a 5G network device via a modem in the mobile phone. In this example, the 5G network device includes a device in the 5G network architecture.

[0051] Step 202: The 5G network device rejects the data activation request and returns activation failure information to the modem of mobile phone A. The activation failure information includes the fallback duration.

[0052] Step 203, the modem of mobile phone A generates a retry duration according to the backoff duration. The retry duration may be equal to the backoff duration, or greater than the backoff duration. The retry duration is used to indicate the interval duration for the modem to resend the data activation request. For example, if the backoff duration is 8 minutes, the modem generates a retry duration of 12 minutes according to the backoff duration.

[0053] Step 204: The modem of mobile phone A stops sending data activation requests to the 5G network device within the retry time. For example, if the retry time generated by the modem is 12 minutes, the modem will send a data activation request to the 5G network device again after 12 minutes. The user opens the browser at 9:01, and the mobile browser responds to the URL www.XXX.com entered by the user and connects to the network corresponding to the URL. Since the data activation request of the mobile phone fails, the mobile phone does not establish a PDU session and cannot open the web page. Figure 1 As shown in 1b. The mobile phone interface 103 shows that the connection has timed out and the web page cannot be opened.

[0054] Step 205: After the retry time is reached, the modem of mobile phone A sends a data activation request to the 5G network device. If the 5G network device rejects the data activation request sent by mobile phone A again, steps 201 to 205 will be executed again. If the 5G network device accepts the data activation request sent by mobile phone A, a PDU session will be established to complete the data activation.

[0055] It can be seen that when the 5G network equipment rejects the data activation request of the electronic device, it will cause the electronic device to be unable to access the mobile data network within the retry period, reducing the ability of the electronic device to access the data network.

[0056] The embodiment of the present application provides a method for network access, which is performed by an electronic device, and the electronic device detects whether to turn off the 5G mobile data network mode of the electronic device and determines the turn-off time of the 5G mobile data network mode of the electronic device through the fallback time in the activation failure information fed back by the 5G network device. The electronic device accesses the 4G mobile data network during the turn-off time, and accesses the 4G mobile data network during the period when the 5G mobile data network mode is turned off, so that the electronic device can use the data network and access the website, thereby improving the network access function of the user using the electronic device.

[0057] Figure 3 This is a schematic diagram of the structure of an electronic device 100 shown in an embodiment of the present application. It should be understood that: Figure 3 The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 3 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0058] The electronic device 100 may include: a processor 110, 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, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0059] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor (Modem), a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc.

[0060] In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.

[0061] In some embodiments, the modem can send a data activation request to the 5G network device and receive activation failure information fed back by the 5G network device, where the activation failure information includes a backoff duration.

[0062] Figure 4 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0063] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers, from top to bottom, namely, the application layer, the application framework layer, and the kernel layer.

[0064] The application layer can include a series of application packages.

[0065] like Figure 4 As shown, the application package may include applications such as video, music, map, WLAN, calendar, short message, gallery, call, navigation, Bluetooth, camera, etc.

[0066] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0067] like Figure 4 As shown, the application framework layer may include a phone manager, a window manager, a resource manager, a notification manager, a content provider, a view system, and the like.

[0068] The phone manager is used to provide communication functions of the electronic device 100. For example, the management of call status (including connecting, hanging up, etc.). The phone manager can also be used to obtain the retry time from the modem, and determine the time to turn off the 5G mobile data network mode of the electronic device according to the retry time. The phone manager can also obtain the network standard from the modem.

[0069] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0070] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0071] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0072] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0073] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0074] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0075] Understandably, Figure 4 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0076] Figure 5 The flowchart of a method for network access is shown as an example. The method is performed by an electronic device, which may be a device with a 5G mobile data network mode, such as a smart phone, a wristband, a laptop, a tablet computer, etc. In this example, the electronic device takes a mobile phone as an example. The method for network access includes the following steps:

[0077] Step 501: The electronic device sends a data activation request to the 5G network device in response to the user's operation of accessing the network.

[0078] Specifically, the user's operation of accessing the network may include: power-on operation, operation of turning off the flight mode, operation of turning on the data mobile network, etc. For example, when the 5G mobile data network function of the mobile phone is turned on, the mobile phone responds to the user's power-on operation and turns on the mobile phone. The mobile phone starts searching for an available mobile data network through the modem in the mobile phone. Since the priority of the 5G mobile data network mode in the modem is higher than the priority of the 4G mobile data network mode, the modem will prioritize searching for an available 5G network. When the modem searches for an available 5G network, it sends a data activation request to the 5G network device, that is, requests to establish a PDU session.

[0079] In this example, the 5G SA networking mode is adopted, that is, the base station of the 4G mobile data network and the base station of the 5G mobile communication network are independent of each other and do not interfere with each other.

[0080] Step 502: The electronic device detects whether the electronic device meets a preset shutdown condition according to the activation failure information. If the electronic device determines that the shutdown condition is met, step 503 is executed.

[0081] Specifically, the 5G network device receives the data activation request sent by the modem in the mobile phone and detects the current network status, such as whether it is congested. When the 5G network device detects network anomalies, such as congestion, the 5G network device can reject the data activation request and return the activation failure information to the modem of the mobile phone, and the activation failure information includes the fallback duration.

[0082] After the mobile phone obtains the activation failure information, it can detect whether the electronic device meets the preset shutdown condition according to the activation failure information.

[0083] In one example, the process of a mobile phone detecting whether activation failure information meets a preset shutdown condition may include: the modem of the mobile phone receives the activation failure information and can generate a retry time; the modem of the mobile phone reports the retry time to the phone manager, and the phone manager detects whether the activation failure information meets the preset shutdown condition based on the retry time.

[0084] Optionally, the modem of the mobile phone can determine the retry duration according to the characteristics of the chip manufacturer and the received backoff duration. For example, the backoff duration reported by the 5G network device is 12 minutes. The modem determines the retry duration to be 12 minutes according to the characteristics of the chip manufacturer and the received backoff duration. Optionally, the retry duration can be the same as the backoff duration or greater than the backoff duration.

[0085] The modem of the mobile phone can report the retry time to the phone manager, and the phone manager can detect whether the retry time is greater than a preset fourth threshold. If it is greater than the fourth threshold, the phone manager can obtain the network standard of the mobile phone; the phone manager determines whether the network standard of the mobile phone is the 5G NR standard. If the phone manager determines that the network standard of the mobile phone is the 5G NR standard, it is determined that the preset shutdown condition is met. The fourth threshold can be less than or equal to 1 minute, for example, the fourth threshold is 50 seconds, 40 seconds, 30 seconds, 20 seconds, 10 seconds, 5 seconds, etc.

[0086] In another example, after the phone manager obtains the retry time and the retry time is greater than 0, it determines that the electronic device meets the shutdown condition.

[0087] Optionally, after receiving the backoff duration, the modem of the mobile phone can also detect whether the backoff duration is greater than the fourth threshold and detect whether the mobile phone is currently in the 5G NR standard. If the modem detects that the backoff duration is greater than the fourth threshold and the mobile phone is in the 5G NR standard, it is determined that the shutdown condition is met. The modem can report the detection result to the phone manager.

[0088] Step 503: The electronic device turns off the 5G mobile data network mode of the electronic device.

[0089] Specifically, if the phone manager of the mobile phone determines that the electronic device meets the shutdown conditions, it can instruct the modem of the mobile phone to shut down the 5G mobile data network mode of the mobile phone.

[0090] In one example, when the modem receives an instruction to turn off the 5G mobile data network mode, the priority of the 5G mobile data network mode in the modem can be lowered. Optionally, the priority of the 5G mobile data network mode in the modem of the mobile phone is the first priority; when the modem receives an instruction to turn off the 5G mobile data network mode, the modem changes the first priority of the 5G mobile data network mode to the second priority, which is lower than the first priority. The modem preferentially searches for mobile data network modes with higher priorities. Optionally, the second priority can be lower than the third priority of the 4G mobile data network mode.

[0091] Optionally, the modem may also directly increase the priority of the 4G mobile data network mode so that the priority of the 4G mobile data network mode is higher than the priority of the 5G mobile data network mode. For example, the modem changes the third priority of the 4G mobile data network to the fourth priority, and the fourth priority is higher than the first priority.

[0092] When the priority of the 5G mobile data network mode is changed, the priority of the 5G mobile data network mode in the modem is lower than that of the 4G mobile data network mode. The modem will search for the 4G mobile data network first, thereby turning off the 5G mobile data network mode.

[0093] In some embodiments, the modem may directly turn off the function of searching for the 5G mobile data network, so that the modem no longer searches for the 5G mobile data network.

[0094] It is understandable that when the modem turns off the 5G mobile data network mode of the mobile phone, a timer or timer can be started so that when the timer / timer reaches the off time, the 5G mobile data network mode of the electronic device is turned on. Optionally, when the phone manager instructs the modem to turn off the 5G mobile data network mode of the mobile phone, the timer or timer is started, and after the off time is reached, the modem is instructed to turn on the 5G mobile data network mode of the mobile phone.

[0095] Step 504: The electronic device determines the shutdown duration for shutting down the 5G mobile data network mode of the electronic device according to the backoff duration.

[0096] Specifically, the modem of the mobile phone can generate a retry duration according to the backoff duration, and report the retry duration to the phone manager. The phone manager receives the retry duration reported by the modem, and can determine the shutdown duration according to the retry duration.

[0097] Optionally, the mobile phone stores different duration segments and a first correspondence between each duration segment and the shutdown duration. The stored duration segments may be 2, 3, 4, etc. In this example, 4 duration segments are used as an example for illustration, and the duration segments include: a first duration segment, a second duration segment, a third duration segment, and a fourth duration segment. The first duration segment is a duration greater than the fourth threshold and less than the first threshold, the second duration segment is a duration greater than or equal to the first threshold and less than the second threshold; the third duration segment is a duration greater than or equal to the second threshold and less than the third threshold; the fourth duration segment is a duration greater than or equal to the third threshold. The fourth threshold is less than the first threshold, the first threshold is less than the second threshold, and the second threshold is less than the third threshold. For example, the fourth threshold is 30 seconds, the first threshold is 2 minutes, the second threshold is 6 minutes, and the third threshold is 12 minutes.

[0098] The closing duration corresponding to the first duration segment may be any value in the first duration segment. For example, if the first duration segment is (30s, 2min), the closing duration corresponding to the first duration segment may be 50s, 60s, 90s, etc. Similarly, the closing duration corresponding to the second short duration segment may also be any value in the second duration segment. For example, if the second duration segment is [2min, 6min), the closing duration corresponding to the second duration segment may be 3min, 4min, 5min, etc. The closing duration corresponding to the third short duration segment may also be any value in the third duration segment. For example, if the third duration segment is [6min, 12min), the closing duration corresponding to the third duration segment may be 6min, 7min, 8min, etc. The closing duration corresponding to the fourth duration segment may also be any value in the fourth duration segment. For example, if the fourth duration segment is [12min, +∞), the closing duration corresponding to the fourth duration segment may be 12min, 13min, 14min, 16min, etc.

[0099] Optionally, the shutdown duration corresponding to the first duration segment may also be the first threshold value, the shutdown duration corresponding to the second duration segment may be the second threshold value, the shutdown duration corresponding to the third duration segment may be the third threshold value, and the shutdown duration corresponding to the fourth duration segment may be a duration greater than the third threshold value. For example, the first duration segment is (30s, 2min), the first threshold value is 2min, and the shutdown duration corresponding to the first duration segment is 2min. The second duration segment is [2min, 6min), the first threshold value is 6min, and the shutdown duration corresponding to the second duration segment is 6min. The third duration segment is [6min, 12min), the third threshold value is 12min; the shutdown duration corresponding to the third duration segment is 12min. The fourth duration segment is [12min, +∞), and the shutdown duration corresponding to the fourth duration segment may be a duration greater than the third threshold value, such as the shutdown duration corresponding to the fourth duration segment is 16min.

[0100] The phone manager can detect the duration segment that matches the retry duration, and according to the duration segment that matches the retry duration and the first corresponding relationship, it can determine the shutdown duration of the electronic device to shut down the 5G mobile data network mode. For example, the first duration segment is (30s, 2min), the second duration segment is [2min, 6min), the third duration segment is [6min, 12min) and the fourth duration segment is [12min, +∞). The phone manager obtains that the retry duration is 150s. The phone manager detects that the duration segment that matches the retry duration is the first duration segment, and the corresponding relationship of the first duration segment indicates the shutdown between the first duration segment and the shutdown duration of 2min. Based on the first duration segment and the first corresponding relationship, the phone manager can determine that the current shutdown duration is 2min.

[0101] It should be noted that the mobile phone stores the correspondence between each time segment and the shutdown time, and the correspondence between the time segment matching the retry time can be used as the first correspondence. For example, the phone manager obtains the time segment matching the retry time as the second time segment, and the correspondence between the second time segment is the first correspondence.

[0102] In some embodiments, the phone manager can use the retry duration as the shutdown duration. For example, if the retry duration is 8 minutes, the phone manager can determine that the shutdown duration is 8 minutes.

[0103] In some embodiments, the mobile phone also stores a lower limit value (also called the lower limit time) and an upper limit value (also called the upper limit time) of the shutdown time. When the phone manager detects that the retry time is less than or equal to the lower limit, the lower limit is used as the shutdown time; when the phone manager detects that the retry time is greater than or equal to the upper limit, the upper limit is used as the shutdown time; when the phone manager detects that the retry time is greater than the lower limit and less than the upper limit, the retry time is used as the shutdown time.

[0104] For example, the lower limit is 2 minutes and the upper limit is 12 minutes. The retry time reported by the modem of the mobile phone is 45 seconds. The phone manager detects that the retry time is less than the lower limit, and determines the shutdown time to be 2 minutes. The retry time reported by the modem of the mobile phone is 30 minutes. The phone manager detects that the retry time is greater than the upper limit, and determines the shutdown time to be 12 minutes. The retry time reported by the modem of the mobile phone is 9 minutes. The phone manager detects that the retry time is greater than the lower limit and less than the upper limit, and determines the shutdown time to be 9 minutes.

[0105] In this example, setting a lower limit time can avoid frequent opening and closing of the 5G mobile data network mode due to too short a retry time, and frequent opening and closing of the 5G mobile data network mode will increase the cost of the electronic device. Setting an upper limit time can avoid the problem that the retry time is too long, causing the electronic device to shut down the 5G mobile data network mode for too long. In some scenarios, while the electronic device is turning off the 5G mobile data network mode, if the user restarts the electronic device, or turns on the flight mode for a period of time and then turns it off, the abnormal modem may return to normal and access the 5G mobile data network. Therefore, setting an upper limit value for the electronic device to turn off the 5G mobile data network mode can reduce the length of time that the electronic device cannot access the 5G mobile data network.

[0106] Step 505: The electronic device uses the 4G mobile data network during the shutdown time.

[0107] Specifically, since the electronic device has turned off the 5G mobile data network mode, the modem in the mobile phone can search for an available 4G mobile data network and access the 4G mobile data network, so that the mobile phone can use the data network during the shutdown time to avoid network disconnection. Optionally, when the phone manager detects that the duration of turning off the 5G mobile data network reaches the shutdown duration, it can instruct the modem of the mobile phone to turn on the 5G mobile data network mode of the mobile phone. The modem of the mobile phone can resend a data activation request to the 5G network device.

[0108] Optionally, when the modem of the mobile phone receives an instruction from the phone manager to turn on the 5G mobile data network mode of the mobile phone, the priority of the 5G mobile data network mode in the modem can be restored to the original priority, such as updating from the second priority to the first priority, wherein the second priority is lower than the first priority.

[0109] Optionally, when the modem of the mobile phone receives an instruction from the phone manager to turn on the 5G mobile data network mode of the mobile phone, the 5G mobile data network mode in the modem can be enabled.

[0110] In this example, if the 5G network device rejects the data activation request of the electronic device, the electronic device may receive activation failure information, which includes a back-off duration. When the electronic device meets the requirements for shutting down the 5G mobile data network, the shutdown duration is determined based on the back-off duration, so that the electronic device can access the 4G mobile data network within the shutdown duration, thereby avoiding the electronic device being unable to connect to the network and improving the ability of the electronic device to access the data network.

[0111] Figure 6 FIG. 1 is a schematic diagram showing an exemplary interaction between components in a mobile phone A and a 5G network device. Figure 6 As shown, the electronic device takes mobile phone A as an example, and the network access method includes the following steps:

[0112] Step 601: In response to the user's operation of accessing the network, the telephone manager instructs the modem to send a data activation request.

[0113] Specifically, the user's operation of accessing the network may include: power-on operation, operation of turning off the flight mode, operation of turning on the data mobile network, etc. For example, when the 5G mobile data network function of the mobile phone is turned on, the mobile phone responds to the user's power-on operation and turns on the mobile phone. When the phone manager of the mobile phone receives the power-on instruction, it instructs the modem of the mobile phone to send a data activation request.

[0114] Step 602: The modem of mobile phone A sends a data activation request to the 5G network device.

[0115] Specifically, the modem searches for a 5G mobile data network and sends a data activation request to a network device of the 5G mobile data network. The process of the data activation request can be understood as the process of establishing a PDU session. The process of establishing a PDU session will not be repeated in this example.

[0116] Step 603: The 5G network device returns activation failure information to the modem of mobile phone A.

[0117] Specifically, if the 5G network equipment detects an abnormality, such as network congestion, N1 mode not allowed, etc., it can reject the data activation request of the mobile phone and return activation failure information to the mobile phone. The activation failure information may include the fallback duration and the reason value for rejection, such as "#31 (Redirection to EPC required) Redirection to EPC required", "#27 (N1 mode not allowed) N1 mode not allowed", etc.

[0118] Step 604: The modem of mobile phone A generates a retry duration according to the backoff duration.

[0119] Specifically, the modem of mobile phone A can generate a retry duration based on the backoff duration and the characteristics of the chip manufacturer. The retry duration can be greater than or equal to the backoff duration. The retry duration is used to indicate the interval duration for re-initiating a data activation request to the 5G network device.

[0120] It should be noted that the modem can also obtain the network standard of the current mobile phone and report it to the phone manager.

[0121] Step 605: The modem of mobile phone A reports the retry duration to the phone manager.

[0122] Step 606: The phone manager detects whether the retry duration is greater than the fourth threshold and is in the 5G NR standard. If so, execute step 607; otherwise, end the entire process.

[0123] Specifically, if the phone manager detects that the retry time is greater than the fourth threshold, it can obtain the network standard of the mobile phone; detect whether the network standard of the mobile phone is the 5G NR standard. If the phone manager determines that the mobile phone is in the 5G NR standard, it determines to turn off the 5G mobile data network mode of the mobile phone and determines the shutdown time.

[0124] Step 607: The phone manager instructs the modem to lower the priority of the 5G mobile data network mode.

[0125] Specifically, the instruction information sent by the phone manager may also include information for instructing the modem to adjust the first priority of the 5G mobile data network mode to the second priority. The first priority is higher than the second priority, and the modem will preferentially search for the mobile data network mode with a higher priority. Optionally, the second priority is lower than the priority of the 4G mobile data network mode.

[0126] Step 608: The modem of mobile phone A adjusts the first priority of the 5G mobile data network mode to the second priority.

[0127] Step 609: If the phone manager detects that the retry time is longer than 12 minutes, it determines that the shutdown time is 12 minutes.

[0128] In this example, the upper limit duration (such as 2 minutes) and the lower limit duration (such as 12 minutes) are stored in the mobile phone. When the phone manager detects that the retry duration is less than the lower limit duration, the shutdown duration is determined to be 2 minutes; when the phone manager detects that the retry duration is greater than the lower limit duration and less than the upper limit duration, the shutdown duration is determined to be the retry duration; when the phone manager detects that the retry duration is greater than the upper limit duration, the shutdown duration is determined to be 12 minutes. In this example, the retry duration is greater than the upper limit duration as an example for explanation.

[0129] Step 610: The modem of mobile phone A searches for a 4G mobile data network and accesses the 4G mobile data network.

[0130] Specifically, after the modem of mobile phone A turns off the 5G mobile data network mode, the modem can search for available 4G mobile data networks nearby and connect to the available 4G mobile data networks.

[0131] Step 611: When the phone manager detects that the shutdown duration reaches 12 minutes, it instructs the modem to restore the priority of the 5G mobile data network.

[0132] Specifically, the phone manager can start a timer when instructing the modem to turn off the 5G mobile data network. When it is detected that the duration reaches 12 minutes, the modem can be instructed to restore the priority of the 5G mobile data network mode.

[0133] Step 612: The modem restores the priority of the 5G mobile data network mode to the first priority.

[0134] Step 613: The modem sends a data activation request to the 5G network device.

[0135] Since the modem has re-enabled the 5G mobile data network mode, the modem can restart searching for the 5G mobile network and re-send a data activation request to the 5G network device.

[0136] Step 614: The 5G network device returns activation success information to the modem of mobile phone A.

[0137] In this example, if the abnormality in the modem of mobile phone A is restored to normal, or the 5G network is restored to normal, the 5G network device will normally receive the data activation request sent by the modem of the mobile phone and establish a PDU session. When the mobile phone obtains the tunnel between the mobile phone and the UPF, the corresponding mobile phone to data network connection is activated, and the 5G network device can return activation success information to the modem of mobile phone A.

[0138] In some embodiments, the mobile phone can determine whether the mobile phone meets the shutdown condition based on the reason value in the activation failure information. The network access process can be as follows: Figure 7 As shown:

[0139] Step 701: The mobile phone obtains the failure reason value in the activation failure information.

[0140] Specifically, the mobile phone sends a data activation request to the 5G network device in response to the user's operation of accessing the network. After receiving the data activation request, the 5G network device detects the current network device. When the 5G network device detects network anomalies, such as congestion, etc., the 5G network device can reject the data activation request and return the activation failure information to the modem of the mobile phone. The activation failure information includes the fallback duration and the failure reason value. The failure reason value is used to indicate the reason for the activation failure, such as "#31, #27".

[0141] Step 702: When the mobile phone detects that the failure reason value is the first reason value and detects that the number of times the first reason value is received exceeds the number threshold, it determines that the shutdown condition is met.

[0142] Specifically, the mobile phone can store different first cause values ​​in advance, for example, the mobile phone can store "#31" and "#27" as the first cause values. After the modem of the mobile phone receives the failure cause value, it can report the failure cause value to the phone manager, and the phone manager determines whether there is a first cause value that is the same as the received failure cause value. If the phone manager determines that there is, it detects whether the number of times the first cause value is received exceeds the number threshold. If it exceeds, it is determined that the shutdown condition is met; if it is detected that the number of times the first cause value is received does not exceed the number threshold, it is determined that the current mobile phone does not meet the shutdown condition.

[0143] For example, the mobile phone stores three first reason values, namely, first reason value A (such as: #31), first reason value B (such as: #27), and first reason value C (such as: #22). The failure reason value contained in the activation failure information received by the modem of the mobile phone is "#31"; the modem of the mobile phone reports the failure reason value "#31" to the phone manager. The phone manager detects that "#31" matches the stored first reason value A, and determines that the first reason value A is received; the phone manager detects that the number of times the first reason value A reported by the modem is 4 times (such as the number threshold is 3 times). The phone manager detects that the number of times the first reason value A is received is greater than the number threshold, and determines that the mobile phone meets the shutdown condition.

[0144] Optionally, the modem may determine whether there is a first reason value that is the same as the received failure reason value. If the modem determines that there is, it detects whether the number of times the first reason value is received exceeds a number threshold. If so, it determines that the shutdown condition is met; if the modem detects that the number of times the first reason value is received does not exceed the number threshold, it determines that the current mobile phone does not meet the shutdown condition.

[0145] Step 703: The mobile phone detects whether the modem has reported the retry time. If it is determined that the modem has reported the retry time, step 704 is executed. If the modem has not reported the retry time, step 709 is executed.

[0146] Specifically, when the modem of the mobile phone receives the activation failure information, if there is a fallback time in the activation failure information, the modem will generate a retry time according to the fallback time and report the retry time to the phone manager. If the activation failure information does not contain the fallback time, the modem will not generate a retry time and will not report the retry time to the phone manager.

[0147] If the telephone manager detects that the modem has not received the retry time duration within a preset time duration (eg, 20 seconds), it determines that the modem has not reported the retry time duration, and executes step 709 .

[0148] Step 704: The mobile phone detects whether the retry time is less than 2 minutes. If it is determined to be less than 2 minutes, step 705 is executed; if it is determined to be greater than or equal to 2 minutes, step 706 is executed.

[0149] Step 705: The mobile phone turns off the 5G mobile data network mode and determines that the shutdown duration is 2 minutes.

[0150] The process of turning off the 5G mobile data network mode on the mobile phone in this step is similar to the process in step 503. Please refer to the relevant description in step 503 and will not be repeated here.

[0151] It should be noted that step 710 can be executed after the mobile phone modem turns off the 5G mobile data network mode.

[0152] Step 706: The mobile phone detects whether the retry time is greater than 12 minutes. If it is determined to be greater than or equal to 12 minutes, step 707 is executed; if it is determined to be less than 12 minutes, step 708 is executed.

[0153] Step 707: The mobile phone turns off the 5G mobile data network mode and determines that the shutdown duration is 12 minutes.

[0154] The process of turning off the 5G mobile data network mode on the mobile phone in this step is similar to the process in step 503. Please refer to the relevant description in step 503 and will not be repeated here.

[0155] It should be noted that step 710 can be executed after the mobile phone modem turns off the 5G mobile data network mode.

[0156] Step 708: The mobile phone turns off the 5G mobile data network mode and determines the shutdown duration as the retry duration.

[0157] The process of turning off the 5G mobile data network mode on the mobile phone in this step is similar to the process in step 503. Please refer to the relevant description in step 503 and will not be repeated here.

[0158] It should be noted that step 710 can be executed after the mobile phone modem turns off the 5G mobile data network mode.

[0159] Step 709: The mobile phone turns off the 5G mobile data network mode, and the turning off duration is the duration corresponding to the first reason value.

[0160] Specifically, the phone manager of the mobile phone may store the duration corresponding to each first reason value, for example, the duration corresponding to "#31" is 3 minutes. The phone manager of the mobile phone obtains the duration corresponding to the first reason value as the shutdown duration.

[0161] After the mobile phone modem turns off the 5G mobile data network mode, step 710 can be executed.

[0162] Step 710: The mobile phone attempts to access the 4G mobile data network.

[0163] The process of a mobile phone trying to access a 4G mobile data network is similar to the existing method, and can refer to the process of an existing mobile phone trying to access a 4G mobile data network, which will not be repeated here.

[0164] Step 711: The mobile phone detects whether it has successfully accessed the 4G mobile data network. If so, execute step 712; otherwise, execute step 713.

[0165] Step 712: The mobile phone is on 4G mobile data network.

[0166] Step 713: The mobile phone retries to connect to the 4G mobile data network until the maximum number of retries is reached.

[0167] Specifically, if the mobile phone fails to reconnect to the 4G mobile data network, it can retry at preset intervals until the maximum number of retries is reached.

[0168] In this example, the mobile phone determines whether the shutdown conditions are met by using the failure reason value in the activation failure information. After receiving the preset first reason value multiple times, it determines that the shutdown conditions for the electronic device to shut down the 5G mobile data network mode are met. The shutdown duration is determined based on the backoff duration, so that the shutdown duration changes with the backoff duration to avoid the mobile phone being shut down for too long, affecting the user's use of the mobile phone's data network function.

[0169] Figure 8 The figure is a schematic diagram showing an exemplary scenario of a mobile phone accessing a 4G mobile data network after its data activation request is rejected by a 5G network device.

[0170] In one example, if Figure 8 As shown, a data network switch 802 is displayed in the display interface 801. In response to the user clicking the data network switch 802, the mobile phone requests data activation from the 5G core network. When processing the data activation request, the 5G core network detects a network problem and rejects the data activation request of the mobile phone. The mobile phone is asked to return the activation failure information, which includes the fallback time (such as 8 minutes). The modem of the mobile phone receives the fallback time and generates a retry time (such as the retry time is 8 minutes). The modem of the mobile phone reports the retry time and the current network standard to the phone manager. The phone manager detects that the retry time is greater than the fourth threshold (such as 20 seconds) and the current mobile phone is in the 5G NR standard, then determines that the mobile phone meets the 5G mobile data network shutdown mode. The phone manager detects that the retry time is greater than the lower limit time (such as the lower limit time is 2 minutes) and less than the upper limit time (such as 12 minutes), then determines that the shutdown time is 8 minutes. The phone manager instructs the modem to turn off the 5G mobile data network mode. The modem turns off the 5G mobile data network mode, searches for an available 4G mobile data network, and connects to the 4G mobile data network. The mobile phone is connected to the mobile communication network for 8 minutes. Figure 8 As shown, the status bar of the display interface 801 indicates that the mobile phone has been connected to the 4G mobile data network. When the phone manager detects that the 5G mobile data network mode has been turned off for 8 minutes, it instructs the modem to turn on the 5G mobile data network. The modem of the mobile phone will resend a data activation request to the 5G network device. If the 5G network device detects that the network is normal, it can return activation success information to the modem of the mobile phone.

[0171] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0172] This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the network access method in the above-mentioned embodiment. The storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0173] This embodiment further provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above-mentioned related steps to implement the network access method in the above-mentioned embodiment.

[0174] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0175] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.

[0176] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A network access method, characterized in that: Used in electronic equipment, including: In response to the user's operation of accessing the network, sending a data activation request to the 5G network device; When receiving activation failure information returned by the 5G network device, detecting whether the electronic device meets a preset shutdown condition according to the activation failure information, wherein the activation failure information includes a fallback duration; When it is determined that the electronic device meets the shutdown condition, shut down the 5G mobile data network mode of the electronic device and determine the shutdown duration of shutting down the 5G mobile data network mode of the electronic device according to the fallback duration; Access to 4G mobile data network during the shutdown period; The step of determining the shutdown duration of the 5G mobile data network mode of the electronic device according to the fallback duration includes: Generate a retry duration according to the backoff duration, where the retry duration is used to indicate the interval duration for re-initiating a data activation request to the 5G network device; When it is detected that the retry duration is less than a first threshold, it is determined that the first duration segment matches the retry duration; when it is detected that the retry duration is greater than or equal to the first threshold and less than a second threshold, it is determined that the second duration segment matches the retry duration; when it is detected that the retry duration is greater than or equal to the second threshold and less than a third threshold, it is determined that the third duration segment matches the retry duration; when it is detected that the retry duration is greater than or equal to the third threshold, it is determined that the fourth duration segment matches the retry duration; the shutdown duration is determined based on the acquired duration segment and the first corresponding relationship, the first corresponding relationship being used to indicate the relationship between the duration segment and the shutdown duration; wherein the first duration segment is a duration less than the first threshold and greater than the fourth threshold, and the second duration segment is a duration greater than or equal to the first threshold and less than the second threshold, the third duration segment is a duration greater than or equal to the second threshold and less than the third threshold, and the fourth duration segment is a duration greater than or equal to the third threshold; the first corresponding relationship indicates that the closing duration corresponding to the first duration segment is any value within the first duration segment or the first threshold, the first corresponding relationship indicates that the closing duration corresponding to the second duration segment is any value within the second duration segment or the second threshold, the first corresponding relationship indicates that the closing duration corresponding to the third duration segment is any value within the third duration segment or the third threshold, and the first corresponding relationship indicates that the closing duration corresponding to the fourth duration segment is any value within the fourth duration segment or greater than the third threshold; Alternatively, when it is detected that the retry duration is less than or equal to a preset lower limit duration, the lower limit duration is used as the shutdown duration; when it is detected that the retry duration is greater than the lower limit duration and less than a preset upper limit duration, the retry duration is used as the shutdown duration; when it is detected that the retry duration is greater than or equal to the upper limit duration, the upper limit duration is used as the shutdown duration.

2. The method according to claim 1, characterized in that The detecting, according to the activation failure information, whether the electronic device meets a preset shutdown condition includes: According to the backoff duration, obtain the retry duration; Detecting whether the retry duration is greater than a fourth threshold; When it is detected that the retry duration is greater than a fourth threshold, detecting whether the network standard of the electronic device is a 5G new air interface NR standard; When it is detected that the network standard of the electronic device belongs to the 5G NR standard, it is determined that the shutdown condition is met.

3. The method according to claim 2, characterized in that The fourth threshold value ranges from 10 seconds to 40 seconds.

4. The method according to claim 1, characterized in that: The detecting, according to the activation failure information, whether the electronic device meets a preset shutdown condition includes: Obtaining a failure reason value in the activation failure information; When it is detected that the failure cause value is a first cause value and it is detected that the number of times the first cause value is received exceeds a number threshold, it is determined that the closing condition is met.

5. The method according to claim 1, characterized in that The step of shutting down the 5G mobile data network mode of the electronic device includes: Adjust the first priority of the 5G mobile data network mode in the modem of the electronic device to a second priority, wherein the second priority is lower than the third priority of the 4G mobile data network mode, and the third priority is lower than the first priority.

6. The method according to claim 1, characterized in that The step of shutting down the 5G mobile data network mode of the electronic device includes: Disabling the function of the electronic device's modem to search for a 5G mobile data network.

7. The method according to claim 1, characterized in that The detecting whether the activation failure information satisfies a preset shutdown condition includes: When it is detected that the backoff time is greater than 0, it is determined that the closing condition is met.

8. The method according to claim 1, characterized in that The user's operation of accessing the network includes: turning on the phone, turning on the mobile data network, or turning off the flight mode.

9. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the network access method according to any one of claims 1 to 8.

10. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device executes the network access method executed by the electronic device as claimed in any one of claims 1 to 8.