Patent Description:
Currently, with development of terminal technologies, to improve device security, facilitate user operations, and the like, an embedded universal integrated circuit card (eUICC) technology is introduced. An eUICC is formed by embedding a universal integrated circuit card (UICC) into an electronic device through packaging, soldering, or the like. Therefore, it is inconvenient to insert the eUICC or remove the eUICC, and the eUICC cannot be randomly replaced like the UICC, to avoid a risk of being stolen or misappropriated. The eUICC may also be referred to as an embedded subscriber identification module (eSIM). According to an eSIM technology, the electronic device may usually store a plurality of profiles (profiles). The profile is used to access an operator network, and can be stored in the electronic device based on a user requirement. Specifically, the profile may include parameters such as an integrate circuit card identity (ICCID), an international mobile subscriber identity (IMSI), a key identifier (KI), an authentication algorithm, a network configuration-related parameter, a personal identification number (PIN), a PIN unlocking key (PUK), and a telephone number. Therefore, when the electronic device stores a plurality of profiles, the electronic device may implement flexible switching between operator networks by switching between the plurality of profiles. However, in the conventional technology, when the electronic device implements switching between the operator networks by switching between the plurality of profiles, a user's manual operation is required, and user experience is poor.

<CIT> describes an electronic device that comprises: at least one processor; an eUICC including a plurality of profiles; an RF circuit and a GPS circuit, for communicating with a network by using an activated first profile among the plurality of profiles; and a memory for storing a profile list database including information on the plurality of profiles. The at least one processor may implement a management module for managing the plurality of profiles, and the management module may deactivate the first profile and activate a second profile on the basis of location information acquired by the RF circuit or the GPS circuit.

<CIT> describes a method that allows a device to migrate wireless service across multiple wireless networks, and that enables storing and switching between multiple Electronic Subscriber Identity Modules (eSIM), where each eSIM is specific to a different carrier network. By loading the appropriate eSIM, the user device can authenticate itself with the selected carrier, rather than roaming. During roaming operation, the user equipment can load one or more of the previously stored eSIMs. Selection of the eSIM can be done manually by the user or can be driven by the user equipment based on desired context; for example, based on carrier signal strength, cost-effectiveness, etc. Support for multiple radio technologies also allows universal connectivity for wireless devices, even spanning previously incompatible technologies such as GSM (Global Standard for Mobile Communications), CDMA (Code Division Multiple Access), etc..

<CIT> relates to a data connection establishment method and a terminal device. The method includes: receiving, by an application processor AP, a switch-on instruction; sending, by the AP, a network searching instruction to a communications processor CP, where the network searching instruction is used to instruct the CP to search for a network; receiving, by the AP, SIM card status change information and network status change information that are sent by the CP; and sending, by the AP, a data connection establishment instruction to the CP based on the SIM card status change information and the network status change information, where the data connection establishment instruction is used to instruct the CP to establish a data connection to the found network.

<CIT> describes a profile switching method and a terminal, where the method includes sending, by a terminal, an enable instruction to an embedded universal integrated circuit card (eUICC), where the eUICC includes at least a first profile and a second profile, the terminal has accessed a network using the first profile, data of the first profile is stored in a cache of the terminal, and the enable instruction instructs the eUICC to disable the first profile and enable the second profile, and send a first instruction to the terminal, where the first instruction instructs the terminal not to restart the eUICC, and after receiving the first instruction, retaining, by the terminal, the data of the first profile in the cache, storing data of the second profile in the cache, and accessing a network using the second profile.

This application provides an operator network switching method and an electronic device, so that when the electronic device stores two or more profiles, when a network connection is restored after the network connection is disconnected, the electronic device can automatically switch an activated profile to access a corresponding operator network, so as to help improve user experience.

According to a first aspect, an embodiment of this application provides an operator network switching method, performed by an electronic device. The electronic device stores a first profile and a second profile, and the first profile is a currently activated profile. The electronic device accesses a first operator network based on the first profile. If a first operation is detected, the electronic device disconnects a connection to the first operator network in response to the first operation, where the first operation is used to disconnect a network connection. After disconnecting a connection to the first operator network, the electronic device detects a second operation, where the second operation is used to restore a network connection. The electronic device searches for a network based on the first profile and the second profile in response to the second operation, to obtain a network search result corresponding to the first profile and a network search result corresponding to the second profile. Then, the electronic device activates the second profile based on the network search result corresponding to the first profile and the network search result corresponding to the second profile. Finally, the electronic device accesses a second operator network based on the second profile. In this way, operator network switching is implemented.

In this embodiment of this application, after disconnecting a connection to a network, the electronic device can search for a network based on at least two profiles when detecting an operation used to restore a network connection. Then, a profile that needs to be activated is determined based on a network search result, so that an operator network accessed by the electronic device can meet a user requirement. In addition, a corresponding profile is activated without a user's manual operation, to help improve user experience.

In a possible design, the electronic device sends a request to subscribe to a call transfer service to the first operator network, where the request to subscribe to the call transfer service is used to transfer an incoming call for a first telephone number to a second telephone number, the first telephone number is a telephone number included in the first profile, and the second telephone number is a telephone number included in the second profile. Then, when receiving a first response for subscribing to the call transfer service, the electronic device notifies the user that an incoming call for the first telephone number is to be transferred to the second telephone number, where the first response is used to indicate that the call transfer service is successfully subscribed to, and the first response is returned for the request to subscribe to the call transfer service.

According to the foregoing solution, the electronic device can send the request to subscribe to the call transfer service to the first operator network, so that the incoming call for the first telephone number is transferred to the second telephone number. Therefore, after accessing the second operator network, the electronic device does not miss an incoming call for the first telephone number.

In a possible design, the electronic device sends, to the first operator network, a request to stop charging for a service package corresponding to the first profile, and after receiving a second response for stopping charging for the service package corresponding to the first profile, notifies the user that the first operator network stops charging for the service package corresponding to the first profile.

The second response is used to indicate that stopping of charging for the service package corresponding to the first profile fails, and the second response is returned for the request to stop charging for the service package corresponding to the first profile.

According to the foregoing technical solution, the electronic device can send, to the first operator network, the request to stop charging for the service package corresponding to the first profile, so that charging for the service package corresponding to the first profile can be stopped when the electronic device uses a service provided by the second operator network, to help reduce user costs. In addition, after the first operator network stops charging for the service package corresponding to the first profile, the electronic device may further inform the user that charging for the service package corresponding to the first profile is stopped. This helps the user to learn of a current consumption status of the service package.

In a possible design, when a validity period of a service package corresponding to the second profile is longer than or equal to first duration, the electronic device sends, to the first operator network, the request to stop charging for the service package corresponding to the first profile. When the validity period corresponding to the second profile is relatively short, the electronic device may activate the first profile again. In the foregoing solution, the electronic device sends, to the first operator network, the request to stop charging for the service package corresponding to the first profile only when the validity period corresponding to the second profile is relatively long. This helps further reduce user costs.

In a possible design, the electronic device notifies the user of the service package corresponding to the second profile. In this way, the user can learn of the service package that is subscribed to after the electronic device accesses the second operator network.

In a possible design, the electronic device deactivates the first profile.

In a possible design, the electronic device searches for a network based on the first profile, the second profile, and a radio frequency capability of the electronic device, to obtain the network search result corresponding to the first profile and the network search result corresponding to the second profile. This helps improve reliability of the network search results.

In a possible design, the electronic device obtains a first geographic location in response to the second operation, where the first geographic location is used to indicate a current geographic location of the user. The electronic device determines whether a distance between the first geographic location and a second geographic location is greater than or equal to a first threshold, where the second geographic location is obtained before the electronic device disconnects a connection to the first operator network in response to the first operation. When the distance between the first geographic location and the second geographic location is greater than or equal to the first threshold, the electronic device searches for a network based on the first profile and the second profile, to obtain the network search result corresponding to the first profile and the network search result corresponding to the second profile. When the distance between the first geographic location and the second geographic location is greater than or equal to the first threshold, the electronic device is triggered to search for a network based on the first profile and the second profile, and switches an activated profile to the second profile, so that an operator network accessed by the electronic device at the first geographic location can meet a user requirement.

In a possible design, when the distance between the first geographic location and the second geographic location is less than the first threshold and greater than or equal to a second threshold, the electronic device searches for a network based on the first profile, to obtain a first public land mobile network PLMN, where the first threshold is greater than the second threshold. The electronic device further determines whether the first PLMN is the same as a second PLMN, where the second PLMN is a PLMN used when the electronic device accesses the first operator network. When the first PLMN is different from the second PLMN, the electronic device searches for a network based on the first profile and the second profile, to obtain the network search result corresponding to the first profile and the network search result corresponding to the second profile. When the distance between the first geographic location and the second geographic location is less than the first threshold and greater than or equal to the second threshold, and when the first PLMN is different from the second PLMN, the electronic device can be triggered to search for a network based on the first profile and the second profile, and switches an activated profile to the second profile, so that an operator network accessed by the electronic device at the first geographic location can meet a user requirement.

In a possible design, the electronic device searches for a network based on the first profile in response to the second operation, to obtain a first PLMN, and determines whether the first PLMN is the same as a second PLMN, where the second PLMN is a PLMN used when the electronic device accesses the first operator network. When the first PLMN is different from the second PLMN, the electronic device searches for a network based on the first profile and the second profile, to obtain the network search result corresponding to the first profile and the network search result corresponding to the second profile. When the first PLMN is different from the second PLMN, the electronic device can be triggered to search for a network based on the first profile and the second profile, and switches an activated profile to the second profile, so that an operator network accessed by the electronic device can meet a user requirement.

In a possible design, the electronic device activates the second profile based on the network search result corresponding to the first profile, the network search result corresponding to the second profile, service package information corresponding to the first profile, and service package information corresponding to the second profile; and/or
the electronic device activates the second profile based on the network search result corresponding to the first profile, the network search result corresponding to the second profile, and a preconfigured network blacklist.

In the foregoing solution, when determining to activate the second profile, the electronic device may further refer to the service package information and/or the network blacklist in addition to the network search results, to help improve accuracy of the activated second profile, to further meet a requirement of the user.

In a possible design, the first operation is an operation of enabling an airplane mode, and the second operation is an operation of disabling the airplane mode; or the first operation is a power-off operation, and the second operation is a power-on operation.

According to a second aspect, an embodiment of this application provides an operator network switching method, performed by an electronic device. The electronic device stores a first profile and a second profile, and the first profile is a currently activated profile. The electronic device accesses a first operator network based on the first profile, and detects a first operation, where the first operation is used to disconnect a network connection. The electronic device disconnects a connection to the first operator network in response to the first operation. The electronic device detects a second operation after disconnecting a connection to the first operator network, where the second operation is used to restore a network connection. The electronic device obtains a first geographic location in response to the second operation, where the first geographic location is used to indicate a current geographic location of a user. When a distance between the first geographic location and a second geographic location is greater than or equal to a first threshold, the electronic device activates the second profile, and accesses a second operator network based on the second profile, where the second geographic location is obtained before the electronic device disconnects a connection to the first operator network in response to the first operation.

In this embodiment of this application, when detecting the operation used to restore a network connection after the electronic device disconnects a connection to a network, the electronic device can activate the second profile when the distance between the first geographic location and the second geographic location is greater than or equal to the first threshold, so that an operator network accessed by the electronic device at the first geographic location can meet a user requirement. In addition, a corresponding profile is activated without the user's manual operation, to help improve user experience.

In a possible design, the electronic device further stores a third profile. When the distance between the first geographic location and the second geographic location is greater than or equal to the first threshold, the electronic device searches for a network based on the second profile and the third profile, to obtain a network search result corresponding to the second profile and a network search result corresponding to the third profile, determines, based on the network search result corresponding to the second profile and the network search result corresponding to the third profile, to activate the second profile in the second profile and the third profile, and then activates the second profile. This helps further improve accuracy of an activated profile, to meet a user requirement.

According to a third aspect, an embodiment of this application provides an electronic device, including a processor and a memory. The processor is coupled to the memory, the memory is configured to store program instructions, and the processor is configured to read the program instructions stored in the memory, to implement the method according to any one of the foregoing aspects or the possible designs of the foregoing aspects in the embodiments of this application.

According to a fourth aspect, an embodiment of this application provides a computer-readable storage medium. The computer-readable storage medium stores program instructions, and when the program instructions are run on an electronic device, the electronic device is enabled to perform the method according to any one of the foregoing aspects or the possible designs of the foregoing aspects in the embodiments of this application.

According to a fifth aspect, an embodiment of this application provides a computer program product. When the computer program product is run on an electronic device, the electronic device is enabled to perform the method according to any one of the foregoing aspects or the possible designs of the foregoing aspects in the embodiments of this application.

According to a sixth aspect, an embodiment of this application provides a chip. The chip is coupled to a memory in an electronic device, and controls the electronic device to perform the method according to any one of the foregoing aspects or the possible designs of the foregoing aspects in the embodiments of this application.

In addition, for technical effects brought by the third aspect to the fifth aspect, refer to the related descriptions in the foregoing methods in the designs.

It should be noted that "coupling" in the embodiments of this application indicates a direct combination or an indirect combination between two components.

It should be understood that, unless otherwise indicated in this application, "/" means "or". For example, A/B may represent A or B. In this application, the term "and/or" describes only an association relationship for describing associated objects and represents that three relationships may exist. "At least one" means one or more, and "a plurality of" means two or more. For example, at least one of a, b, or c may represent seven cases a, b, c, a and b, a and c, b and c, and a, b and c.

In this application, the term "example", "in some embodiments", "in some other embodiments", or the like is used to represent an example, an illustration, or a description. Any embodiment or design scheme described as an "example" in this application should not be explained as being more preferential or having more advantages than another embodiment or design scheme. Exactly, the word "example" is used to present a concept in a specific manner.

In addition, terms such as "first" and "second" in this application are used only for distinguishing. The terms cannot be understood as indicating or implying relative importance or implicitly indicating a quantity of indicated technical features. The terms also cannot be understood as indicating or implying a sequence.

The term "exceeding" in this application may be understood as being greater than or not less than. For example, if a distance between a geographic location A and a geographic location B exceeds a threshold <NUM>, it may be understood that the distance between the geographic location A and the geographic location B is greater than or equal to the threshold <NUM>, or the distance between the geographic location A and the geographic location B is greater than the threshold <NUM>. The term "not exceeding" in this application may be understood as being less than or not greater than. For example, if a distance between a geographic location A and a geographic location B does not exceed a threshold <NUM>, it may be understood that the distance between the geographic location A and the geographic location B is less than or equal to the threshold <NUM>, or the distance between the geographic location A and the geographic location B is less than the threshold <NUM>.

It should be understood that a profile in the embodiments of this application is a profile used to access an operator network. For example, the profile may include an ICCID, an IMSI, a KI, an authentication algorithm, a network configuration-related parameter, a PIN, a PUK, and a telephone number. An electronic device supporting an eSIM technology may store one or more profiles. The profile stored in the electronic device may be delivered by an operator or a third party (for example, a card vendor) to the electronic device after a user subscribes to a service package. For example, after the user subscribes to a Tencent King card service package of China Unicom, China Unicom or a third party delivers a profile used to access a network of China Unicom to the electronic device. For another example, after the user subscribes to a <NUM> service package of the UK operator EE, the UK operator EE or a third party delivers a profile used to access a network of the UK operator EE to the electronic device. It should be noted that in the embodiments of this application, the user may subscribe to service packages of one or more operators based on a requirement of the user.

For a user who frequently travels abroad or travels on a business trip, the electronic device usually stores two or more profiles. For example, the user subscribes to a service package of an operator in a country in which the user resides, and subscribes to a service package of an operator in a country in which the user is in a business trip or on a journey, so that when the user is in the country in which the user resides, the electronic device may access an operator network in the country in which the user resides, to provide a service for the user; and when the user arrives in the country in which the user is in a business trip or on a journey, the electronic device may access an operator network in the country in which the user is in a business trip or on a journey, to provide a service for the user. In this way, the user can access a network when arriving in the country in which the user is in a business trip or on a journey, user communication is not affected, and this further helps save user costs.

However, the electronic device accesses an operator network based on an activated profile in the stored profiles, and provides services such as Internet access and voice communication for the user. Currently, the activated profile in the electronic device is not changed without a manual operation. Therefore, if the user arrives in the country in which the user is in a business trip or on a journey from the country in which the user resides, the user needs to manually operate the electronic device to activate a corresponding profile, so as to access a corresponding operator network, and implement operator network switching on the electronic device. For example, the user may activate a profile by performing an operation in an eSIM management interface.

For example, when the electronic device stores a profile <NUM>, a profile <NUM>, and a profile <NUM>, the eSIM management interface may be shown in an interface C in <FIG>. The interface C includes an eSIM <NUM> option, an eSIM <NUM> option, and an eSIM <NUM> option. The eSIM <NUM> option is used to indicate the profile <NUM>, the eSIM <NUM> option is used to indicate the profile <NUM>, and the eSIM <NUM> option is used to indicate the profile <NUM>. For example, the profile <NUM> indicated by the eSIM <NUM> option is a currently activated profile. If the user wants to activate the profile <NUM>, the user needs to tap the eSIM <NUM> option, and the electronic device displays an interface related to the eSIM <NUM> on a display in response to tapping the eSIM <NUM> option by the user. The interface related to the eSIM <NUM> may be shown in an interface D in <FIG>. The user may set a virtual button used to control activation of a profile to ON, so that the electronic device activates the profile <NUM> in response to the foregoing operation. Further, when the electronic device supports access to only one operator network, when the profile <NUM> is activated, the electronic device may automatically stop activating the profile <NUM>. Alternatively, the user may first perform an operation on the eSIM <NUM> option to stop activating the profile <NUM> or deactivate the profile <NUM>, and then activate the profile <NUM>. When the electronic device supports access to two or more operator networks, the electronic device may activate both the profile <NUM> and the profile <NUM>. After activating the profile <NUM>, the electronic device may access a corresponding operator network based on the profile <NUM>, to provide a service for the user.

The user may tap a setting icon in an interface A in <FIG>, so that the electronic device displays a system setting interface. For example, the system setting interface may be shown in an interface B in <FIG>. The user may tap an eSIM management option, so that the electronic device displays the eSIM management interface C. Alternatively, the user may use a voice instruction, a shortcut gesture operation, or the like to enable the electronic device to display the eSIM management interface, so that the user may activate or stop activating a corresponding profile based on a requirement of the user.

Therefore, an existing manner of manually activating a profile to implement operator network switching is complex and user experience is poor. Particularly, when a plurality of profiles are stored in the electronic device, the user further needs to determine a profile that is more appropriate to be activated. In addition, an activated profile determined by the user based on experience or knowledge of the user may not be a most appropriate profile for the user. In view of this, the embodiments of this application provide an operator network switching method, so that after the electronic device is powered on or an airplane mode is disabled, the electronic device can search for a network based on two or more stored profiles, then automatically select a profile based on a network search result, and activate the profile. In this way, the electronic device can automatically implement operator network switching, and this helps improve user experience.

The following describes the electronic device, and the embodiments for using such an electronic device. The electronic device in the embodiments of this application may be a tablet computer, a mobile phone, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device, a vehicle-mounted terminal, a smart home device, and the like. In addition, the electronic device in the embodiments of this application may alternatively be an animal tracking and positioning apparatus, or the like.

For example, <FIG> is a schematic diagram of a hardware structure of the electronic device according to an embodiment of this application. As shown in <FIG>, the electronic device includes a processor <NUM>, an internal memory <NUM>, an external memory interface <NUM>, a camera <NUM>, a display <NUM>, a sensor module <NUM>, an audio module <NUM>, a speaker <NUM>, a receiver <NUM>, a microphone <NUM>, a headset jack <NUM>, an eSIM module <NUM>, a universal serial bus (USB) interface <NUM>, a charging management module <NUM>, a power management module <NUM>, a battery <NUM>, a mobile communications module <NUM>, and a wireless communications module <NUM>. In addition, in some other embodiments, the electronic device may further include a motor, an indicator, buttons, and the like.

It should be understood that the hardware structure shown in <FIG> is only an example. The electronic device in the embodiments of this application may have more or fewer components than the electronic device shown in the figure, two or more components may be combined, or there may be a different component configuration. Various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software that includes one or more signal processing and/or application-specific integrated circuits.

The processor <NUM> may include one or more processing units. For example, the processor <NUM> may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU). In specific implementation, different processing units may be independent components, or may be integrated into one or more components.

In some embodiments, a cache may be further disposed in the processor <NUM>, and is configured to store a program and data. It should be noted that the program in the embodiments of this application may also be referred to as a program instruction, a computer program, a code instruction, or the like. This is not limited. For example, the cache in the processor <NUM> may be a cache memory. The cache may be configured to store a program and/or data that has been used, generated, or cyclically used by the processor <NUM>. If the processor <NUM> needs to use the program and/or the data, the processor may directly invoke the program or the data from the cache. This helps reduce time used by the processor <NUM> to obtain a program or data, to improve system efficiency.

The internal memory <NUM> may be configured to store a program and/or data. In some embodiments, the internal memory <NUM> includes a program storage area and a data storage area. The program storage area may be configured to store an operating system (for example, an operating system such as Android or iOS), a program required by at least one function (for example, a network switching function or a communications function), and the like. The data storage area may be configured to store data (for example, a profile, a network signal strength, a network standard, and a network identifier blacklist) created, obtained, and/or preset in a use process of the electronic device. For example, the processor <NUM> may invoke the program and/or data stored in the internal memory <NUM>, so that the electronic device performs a corresponding method, to implement one or more functions. For example, the processor <NUM> invokes some programs and/or data in the internal memory, so that the electronic device performs the operator network switching method provided in the embodiments of this application, to implement a function of automatically switching the operator network without a user's manual operation, and help improve user experience. The internal memory <NUM> may be a high-speed random access memory, a non-volatile memory, and/or the like. For example, the non-volatile memory may include at least one of one or more disk storage devices, a flash memory device, and/or a universal flash storage (UFS).

The external memory interface <NUM> may be configured to connect to an external memory card (for example, a micro SD card), to extend a storage capability of the electronic device. The external memory card communicates with the processor <NUM> through the external memory interface <NUM>, to implement a data storage function. For example, the electronic device may store content such as an image, music, a video, or a document in the external memory card through the external memory interface <NUM>.

The camera <NUM> may be configured to capture dynamic and static images and the like. Usually, the camera <NUM> includes a lens and an image sensor. An object is projected onto the image sensor by using an optical image generated by the lens, and then the optical image is converted into an electrical signal for subsequent processing. For example, the image sensor may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) photoelectric transistor. The image sensor converts an optical signal into an electrical signal, and then transmits the electrical signal to the ISP, to convert the electrical signal into a digital image signal. It should be noted that in the embodiments of this application, the electronic device may include one or more cameras <NUM>. This is not limited. For example, the electronic device includes five cameras <NUM>, for example, three rear-facing cameras and two front-facing cameras. For another example, the electronic device includes three cameras <NUM>, for example, two rear-facing cameras and one front-facing camera.

The display <NUM> may include a display panel. The user may enable different user interfaces to be displayed on the display <NUM> based on a requirement of the user, to meet the requirement of the user. Specifically, the display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-LED, a micro-OLED, quantum dot light emitting diodes (QLED), or the like. For example, the electronic device may implement a display function by using the GPU, the display <NUM>, the application processor, and the like. It should be noted that in the embodiments of this application, the electronic device may include one or more displays <NUM>. This is not limited.

The sensor module <NUM> may include one or more sensors, for example, a touch sensor 250A and a pressure sensor 250B. In some other embodiments, the sensor module <NUM> may further include one or more of a gyroscope, an acceleration sensor, a fingerprint sensor, an ambient optical sensor, a distance sensor, an optical proximity sensor, a bone conduction sensor, a temperature sensor, a positioning sensor (for example, a global positioning system (GPS) sensor), and the like. This is not limited.

The touch sensor 250A may also be referred to as a "touch panel". The touch sensor 250A may be disposed on the display <NUM>. When the touch sensor 250A is disposed on the display <NUM>, the touch sensor 250A and the display <NUM> constitute a touchscreen, which may be also referred to as a "touch screen". The touch sensor 250A is configured to detect a touch operation on or near the touch sensor 250A. The touch sensor 250A may transfer the detected touch operation to the application processor, to determine a type of a touch event. The electronic device may provide a visual output and the like related to the touch operation by using the display <NUM>. For example, the electronic device may perform interface switching in response to detecting the touch operation performed on or near the touch sensor 250A, and display a switched user interface on the display <NUM>. In some other embodiments, the touch sensor 250A may also be disposed on a surface of the electronic device in a position different from that of the display <NUM>.

The pressure sensor 250B is configured to sense a pressure signal, and may convert the pressure signal into an electrical signal. For example, the pressure sensor 250B may be disposed on the display <NUM>. Touch operations that are performed at a same touch location but have different touch operation intensity may correspond to different operation instructions.

The electronic device may implement audio functions such as an audio play function, a recording function, and a voice wakeup function by using the audio module <NUM>, the speaker <NUM>, the receiver <NUM>, the microphone <NUM>, the headset jack <NUM>, the application processor, and the like.

The audio module <NUM> may be configured to perform digital-to-analog conversion and/or analog-to-digital conversion on audio data, and may be further configured to encode and/or decode the audio data. For example, the audio module <NUM> may be disposed in the processor <NUM>, or some function modules of the audio module <NUM> are disposed in the processor <NUM>.

The speaker <NUM>, also referred to as a "loudspeaker", is configured to convert audio data into sound and play the sound. For example, the electronic device may be used to listen to music, answer a hands-free call, or send a voice prompt by using the speaker <NUM>.

The receiver <NUM>, also referred to as an "earpiece", is configured to convert audio data into sound and play the sound. For example, when a call is answered by using the electronic device, the receiver <NUM> may be put close to a human ear to answer the call.

The microphone <NUM>, also referred to as "mike" or a "mic", is configured to collect sound (for example, ambient sound, including sound made by a human being and sound made by a device) and convert the sound into audio electrical data. When making a call or sending a voice, the user may make a sound by approaching the microphone <NUM> through the mouth, and the microphone <NUM> collects the sound made by the user. It should be noted that at least one microphone <NUM> may be disposed on the electronic device. For example, two microphones <NUM> are disposed on the electronic device, to collect a sound signal and implement a noise reduction function. For another example, three, four, or more microphones <NUM> may alternatively be disposed on the electronic device, to collect a sound signal, implement noise reduction, and identify a sound source or implement a directional recording function and the like.

The headset jack <NUM> is configured to connect to a wired headset. The headset jack <NUM> may be the USB interface <NUM>, a <NUM> open mobile terminal platform (OMTP) standard interface, a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface, or the like.

The eSIM module <NUM> is embedded in the electronic device, and cannot be separated from the electronic device. Specifically, the electronic device accesses an operator network by using the eSIM module <NUM>, to implement functions such as conversation, data communication, and Internet access. For example, the eSIM module <NUM> may support a Global System for Mobile Communications Association (GSMA) remote SIM provisioning (RSP) communications protocol, and support profile downloading, installation, activation, deactivation, deletion, and the like. Therefore, the electronic device implements flexible switching between different operator networks by activating different profiles. For example, the eSIM module <NUM> may obtain a plurality of profiles based on a user requirement. The plurality of profiles may include profiles used to access a same operator network, or may include profiles used to access different operator networks. This is not limited. In some embodiments, the eSIM module <NUM> may further include a cache. The eSIM module <NUM> may store a profile obtained from an operator or a third party in the cache, or store a profile obtained from an operator or a third party in the internal memory <NUM>. For example, the electronic device stores a profile <NUM> and a profile <NUM>. The profile <NUM> is obtained by the electronic device from a first operator network by using the eSIM module <NUM>, and the profile <NUM> is obtained by the electronic device from a second operator network by using the eSIM module <NUM>. For example, the first operator network is a network of China Unicom, and the second operator network is a network of China Mobile. When the profile <NUM> is activated but the profile <NUM> is not activated, the electronic device accesses the network of China Unicom based on the profile <NUM>.

In some other embodiments, the eSIM module <NUM> may store a maximum of N profiles. Different profiles in the N profiles may be used to access a same operator network, or different profiles may be used to access different operator networks. This is not limited. For example, a value of N may be a positive integer greater than or equal to <NUM>, for example, <NUM>, <NUM>, or <NUM>, and the value of N may be preset in the electronic device based on an actual situation.

The USB interface <NUM> is an interface that conforms to a USB standard specification, and may be specifically a mini USB interface, a micro USB interface, a USB Type-C interface, or the like. The USB interface <NUM> may be configured to connect to a charger to charge the electronic device, or may be configured to transmit data between the electronic device and a peripheral device, or may be used to connect to a headset for playing audio by using the headset. For example, the USB interface <NUM> may be the headset jack <NUM>, and the USB interface <NUM> may be further configured to connect to another electronic device, for example, an AR device or a computer.

The charging management module <NUM> is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments in which wired charging is used, the charging management module <NUM> may receive a charging input from the wired charger through the USB interface <NUM>. In some embodiments in which wireless charging is used, the charging management module <NUM> may receive a wireless charging input through a wireless charging coil of the electronic device. The charging management module <NUM> may further supply power to the electronic device by using the power management module <NUM> while charging the battery <NUM>.

The power management module <NUM> is configured to connect to the battery <NUM> and the charging management module <NUM> to the processor <NUM>. The power management module <NUM> receives an input of the battery <NUM> and/or an input of the charging management module <NUM>, and supplies power to the processor <NUM>, the internal memory <NUM>, the camera <NUM>, the display <NUM>, and the like. The power management module <NUM> may be further configured to monitor parameters such as a battery capacity, a quantity of battery cycles, and a battery health status (electric leakage or impedance). In some other embodiments, the power management module <NUM> may alternatively be disposed in the processor <NUM>. In some other embodiments, the power management module <NUM> and the charging management module <NUM> may alternatively be disposed in a same component.

The mobile communications module <NUM> may provide a solution that is for wireless communication including <NUM>/<NUM>/<NUM>/<NUM> and the like and that is applied to the electronic device. The mobile communications module <NUM> may include a filter, a switch, a power amplifier, a low noise amplifier (low noise amplifier, LNA), and the like.

The wireless communications module <NUM> may provide a wireless communications solution that is applied to the electronic device and that includes wireless local area networks (WLAN) (for example, a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), a near field communication (NFC) technology, and an infrared (IR) technology. The wireless communications module <NUM> may be one or more components integrating at least one communications processor module.

In some embodiments, an antenna <NUM> of the electronic device is coupled to the mobile communications module <NUM>, and an antenna <NUM> is coupled to the wireless communications module <NUM>, so that the electronic device can communicate with another device. Specifically, the mobile communications module <NUM> may communicate with another device through the antenna <NUM>, and the wireless communications module <NUM> may communicate with another device through the antenna <NUM>.

For example, <FIG> is a schematic diagram of a software architecture of an electronic device according to an embodiment of this application. The electronic device specifically includes a decision module <NUM> and a network search module <NUM>. In some other embodiments, the electronic device further includes one or more of a location detection module <NUM>, a network blacklist management module <NUM>, a subscription module <NUM>, and a notification module <NUM>.

It should be noted that the decision module <NUM>, the location detection module <NUM>, the network search module <NUM>, the network blacklist management module <NUM>, the subscription module <NUM>, and the notification module <NUM> shown in <FIG> may be integrated in one or more processing units in the processor <NUM> shown in <FIG>. For example, some or all of the decision module <NUM>, the location detection module <NUM>, the network search module <NUM>, the network blacklist management module <NUM>, the subscription module <NUM>, and the notification module <NUM> may be integrated in one or more processors such as an application processor or a dedicated processor. For example, the dedicated processor in the embodiments of this application may be a DSP, an application specific integrated circuit (ASIC) chip, or the like. In some other embodiments, the decision module <NUM>, the location detection module <NUM>, the network search module <NUM>, the network blacklist management module <NUM>, the subscription module <NUM>, and the notification module <NUM> may be separately integrated in different modules, some of the modules may be integrated in a same module, or the like. This is not limited. For example, the network blacklist management module <NUM> is integrated in the eSIM module <NUM> shown in <FIG>, and the decision module <NUM>, the location detection module <NUM>, the network search module <NUM>, the subscription module <NUM>, and the notification module <NUM> are integrated in the processor <NUM> shown in <FIG>. For another example, the location detection module <NUM> is integrated in the positioning sensor (for example, a GPS sensor) shown in <FIG>, the network search module <NUM> and the notification module <NUM> are integrated in the mobile communications module <NUM> shown in <FIG>, the network blacklist management module <NUM> is integrated in the eSIM module <NUM> shown in <FIG>, and the decision module <NUM>, the subscription module <NUM>, and the notification module <NUM> are integrated in the processor <NUM> shown in <FIG>.

It should be understood that the software structure shown in <FIG> is only an example. The electronic device in the embodiments of this application may have more or fewer modules than the electronic device shown in the figure, or two or more modules may be combined. Various modules shown in the figure may be implemented in hardware, software, or a combination of hardware and software that includes one or more signal processing and/or application-specific integrated circuits.

The decision module <NUM> is configured to: when a first trigger event is detected, (for example, the electronic device is powered on, an airplane mode is disabled, or the electronic device disconnects from a network), trigger the network search module <NUM> to search for a network based on at least two stored profiles, to obtain network search results corresponding to the at least two profiles, and then the network search module <NUM> returns the obtained network search results corresponding to the at least two profiles to the decision module <NUM>. Then, the decision module <NUM> selects one profile from the at least two profiles based on the at least two network search results (for ease of description, the following uses an example in which the profile selected by the decision module <NUM> is a first profile, and the first profile is used to access a first operator network), and notifies the eSIM module <NUM> of the first profile. When a currently activated profile (for ease of description, the following uses an example in which the currently activated profile in the profiles stored in the electronic device is a second profile, and the second profile is used to access a second operator network) is not the first profile, the eSIM module <NUM> deactivates the second profile or stops activation of the second profile, automatically activates the first profile, then sends a profile activation notification to the decision module <NUM>, and initiates a procedure of accessing the first operator network based on the first profile.

The at least two profiles may be obtained by the network search module <NUM> from the eSIM module <NUM>, or the at least two profiles may be sent by the decision module <NUM> to the network search module <NUM>. For example, when detecting the first trigger event, the decision module <NUM> may send the at least two profiles to the network search module <NUM>, or send, to the network search module <NUM>, information (for example, at least two profile indexes) used to indicate the at least two profiles. The network search module <NUM> may obtain the at least two profiles from the eSIM module <NUM> based on the information used to indicate the at least two profiles.

It should be noted that the network search module <NUM> may search for a network based on all the stored profiles, or may search for a network based on some of all the stored profiles. A specific profile that is in the stored profiles and based on which the network search module <NUM> searches for a network may be related to a specific preset policy. For example, the network search module <NUM> searches for a network based on a profile that is in all the stored profiles and that is used to access an operator network in a country to which a geographic location of the user belongs. For example, the electronic device already stores a profile <NUM>, a profile <NUM>, and a profile <NUM>. The profile <NUM> is used to access a network of a Chinese operator, and the profile <NUM> and the profile <NUM> are used to access networks of UK operators. When the country to which the geographic location of the user belongs is the UK, the network search module <NUM> searches for a network based on the profile <NUM> and the profile <NUM>. For example, a profile based on which the electronic device searches for a network may be determined by the decision module <NUM>, or may be determined by the network search module <NUM>.

In some other embodiments, when detecting the first trigger event, the decision module <NUM> may first trigger the network search module <NUM> to search for a network based on the second profile, and determine whether a PLMN obtained in current network search is the same as a PLMN obtained in previous network search. If the PLMNs are different, a network search notification is sent to the decision module <NUM>. After receiving the network search notification, the decision module <NUM> triggers the network search module <NUM> to search for a network based on the at least two stored profiles. Alternatively, in some other embodiments, when detecting the first trigger event, the decision module <NUM> may first send a location detection notification to the location detection module <NUM>. After receiving the location detection notification, the location detection module <NUM> obtains a current geographic location of the user, and determines whether a distance between the obtained current geographic location of the user and a previously obtained geographic location of the user exceeds a first threshold. If the distance exceeds the first threshold, a network search notification is sent to the decision module <NUM>. After receiving the network search notification, the decision module <NUM> triggers the network search module <NUM> to search for a network based on the at least two stored profiles. Further, in some other embodiments, if the distance between the obtained current geographic location of the user and the previously obtained geographic location of the user does not exceed the first threshold but exceeds a second threshold, the network search module <NUM> is triggered to search for a network based on an activated profile. The network search module <NUM> searches for a network based on the second profile, and determines whether a PLMN obtained in current network search is the same as a PLMN obtained based on the second profile in previous network search. If the PLMNs are different, the location detection module <NUM> is triggered to send a network search notification to the decision module <NUM>. It should be noted that the first threshold and the second threshold may be preconfigured. The first threshold is greater than the second threshold. For example, the first threshold is <NUM>, and the second threshold may be <NUM>.

In some other embodiments, the decision module <NUM> is configured to: when detecting the first trigger event, or when receiving the network search notification sent by the location detection module <NUM> or the network search module <NUM>, trigger the subscription module <NUM> to obtain service package information of operators corresponding to the at least two profiles. The subscription module <NUM> obtains the service package information corresponding to the at least two profiles and sends the service package information to the decision module <NUM>. The decision module <NUM> may select one profile from the at least two profiles based on the service package information corresponding to the at least two profiles and/or the network search results corresponding to the at least two profiles.

In some other embodiments, the decision module <NUM> is further configured to: when detecting the first trigger event, or when receiving the network search notification sent by the location detection module <NUM> or the network search module <NUM>, obtain a network blacklist from the network blacklist management module <NUM>. The decision module <NUM> selects the first profile from the at least two profiles with reference to the network blacklist, to avoid accessing a network in the network blacklist.

In addition, when the second profile is different from the first profile, the eSIM module <NUM> sends an operator network switching notification to the decision module <NUM>. After receiving the operator network switching notification, the decision module <NUM> sends, to the second operator network, a request to subscribe to a call transfer service and/or a request to stop charging a service package corresponding to the second profile. After receiving, by using the subscription module <NUM>, a response for subscribing to the call transfer service and/or a response for stopping charging for the service package corresponding to the second profile, the decision module <NUM> triggers the eSIM module <NUM> to activate the first profile and deactivate the second profile. The eSIM module <NUM> sends, to the decision module <NUM>, a notification indicating that the first profile has been activated, and the decision module <NUM> initiates, based on the first profile, a procedure of accessing the first operator network.

Further, after receiving, by using the subscription module <NUM>, the response for subscribing to the call transfer service and/or the response for stopping charging for the service package corresponding to the second profile, the decision module <NUM> further triggers the notification module <NUM> to indicate an operator to stop charging for the service package corresponding to the second profile, and/or to transfer an incoming call for a telephone number included in the second profile to a telephone number included in the first profile.

In some other embodiments, after accessing the first operator network based on the first profile, the decision module <NUM> triggers the subscription module <NUM> to obtain the service package information corresponding to the first profile, and after receiving the service package information corresponding to the first profile sent by the subscription module <NUM>, triggers the notification module <NUM> to notify the user of the service package information corresponding to the first profile. In this way, the user can learn of a service package of an operator network.

The following embodiments may be implemented in an electronic device having the foregoing hardware structure and/or software structure.

The following describes an operator network switching method in the embodiments of this application by using an example in which the electronic device stores at least two profiles, and the first profile is a currently activated profile in the stored profiles.

For example, a scenario of enabling and disabling an airplane mode is used as an example. <FIG> is a schematic flowchart of an operator network switching method according to an embodiment of this application. The method specifically includes the following steps.

<NUM>: An electronic device accesses a first operator network based on a first profile.

In some embodiments, after accessing the first operator network, the electronic device may notify the user that the electronic device has accessed the first operator network. For example, the electronic device may notify the user of an identifier of a first operator, to notify the user that the electronic device has accessed the first operator network. For example, the identifier of the first operator is China Mobile. After accessing the first operator network, the electronic device may display an identifier of China Mobile to the user on a display, to notify the user that the electronic device has accessed a network of China Mobile. For example, the electronic device displays the identifier of China Mobile in a status bar of a user interface shown in <FIG>.

<NUM>: The electronic device detects an operation of enabling an airplane mode.

For example, the operation of enabling the airplane mode may be an operation performed by the user on a virtual button used to control enabling or disabling of the airplane mode. The virtual button used to control enabling or disabling of the airplane mode may be located in a system setting interface, or may be located in a pull-up interface, a drop-down interface, or the like. For example, the system setting interface may be displayed by the electronic device in response to an operation of tapping a setting icon. For example, the pull-up interface may be displayed by the electronic device in response to an operation of swiping up on the display by the user. For example, the drop-down interface may be displayed by the electronic device in response to an operation of swiping down on the display by the user.

For example, the electronic device displays the user interface shown in <FIG> on the display, detects an operation of swiping down on the display by the user, and displays a control interface on the display in response to the operation of swiping down by the user, where the control interface includes the virtual button used to control enabling or disabling of the airplane mode. For example, the control interface may be a user interface shown in <FIG>.

For another example, the operation of enabling the airplane mode may alternatively be a shortcut gesture operation, for example, an operation of swiping up with three fingers, or a voice instruction.

<NUM>: The electronic device disconnects a connection to the first operator network in response to the operation of enabling the airplane mode.

In some other embodiments, in response to the operation of enabling the airplane mode, the electronic device may further notify the user that the airplane mode is enabled. For example, the electronic device may further replace the identifier of the first operator with an identifier of the airplane mode in the user interface, to notify the user that the airplane mode is enabled. For example, in response to an operation of tapping the virtual button used to control enabling or disabling of the airplane mode, the electronic device displays the identifier of the airplane mode in the status bar of the user interface, and no longer displays the identifier of the first operator, to notify the user that the airplane mode is enabled and the connection to the first operator network is disconnected.

<NUM>: The electronic device detects an operation of disabling the airplane mode.

For example, after the electronic device enables the airplane mode, the operation of disabling the airplane mode may be an operation on the virtual button used to control enabling or disabling of the airplane mode, a shortcut gesture operation, or a voice instruction.

<NUM>: The electronic device searches for a network based on at least two profiles in stored profiles in response to the operation of disabling the airplane mode, to obtain network search results corresponding to the at least two profiles.

In some embodiments, in response to the operation of disabling the airplane mode, the electronic device further notifies the user that the electronic device is searching for a network. For example, the electronic device displays prompt information on the display in response to an operation of tapping the virtual button used to control enabling or disabling of the airplane mode by the user. The prompt information is used to notify that the electronic device is searching for a network. For example, the prompt information may be "searching for a network". For example, as shown in <FIG>, the electronic device replaces the identifier of the airplane mode with "searching for a network" in the status bar, to notify the user that the electronic device disables the airplane mode and is searching for a network.

For example, the at least two profiles stored in the electronic device include a profile <NUM> and a profile <NUM>. In this case, one of the profile <NUM> and the profile <NUM> is a first profile. The electronic device searches for a network based on the profile <NUM> and the profile <NUM> in response to the operation of disabling the airplane mode, to obtain a network search result corresponding to the profile <NUM> and a network search result corresponding to the profile <NUM>. For another example, the at least two profiles stored in the electronic device include a profile <NUM>, a profile <NUM>, and a profile <NUM>. In this case, one of the profile <NUM>, the profile <NUM>, and the profile <NUM> is a first profile in the profiles stored in the electronic device. In response to the operation of disabling the airplane mode, the electronic device may search for a network based on the profile <NUM>, the profile <NUM>, and the profile <NUM>, or may search for a network based on the profile <NUM> and the profile <NUM>, or may search for a network based on the profile <NUM> and the profile <NUM>, or may search for a network based on the profile <NUM> and the profile <NUM>. In this case, a profile that is in the profile <NUM>, the profile <NUM>, and the profile <NUM> and based on which the electronic device searches for a network is related to a specific preset policy. For details, refer to the foregoing related description about the specific preset policy in the software architecture in <FIG>.

For example, the electronic device may search for a network based on the at least two profiles in the stored profiles with reference to a device hardware capability (for example, a radio frequency capability and a modulation and demodulation capability) of the electronic device, to obtain network search results corresponding to the at least two profiles. This helps improve network search efficiency.

For example, the electronic device searches for a network based on the profile <NUM>. The profile <NUM> may be the first profile in the profiles stored in the electronic device, or may be another profile. This is not limited. For example, the radio frequency capability of the electronic device does not support a network standard <NUM>, and supports network standards <NUM>, <NUM>, and <NUM>. The electronic device may search for a network based on the profile <NUM> in <NUM>, <NUM>, and <NUM> networks, and may not search for a network in a <NUM> network. For another example, when searching for a network based on the profile <NUM>, the electronic device finds both the <NUM> network and the <NUM> network. If the modulation and demodulation capability of the electronic device in <NUM> is better than that in <NUM>, when a network signal strength of the <NUM> network is slightly weaker than that of the <NUM> network, the electronic device may use found information related to the <NUM> network as the network search result corresponding to the profile <NUM>. However, when a difference between the network signal strength of the <NUM> network and the network signal strength of the <NUM> network exceeds a threshold, that is, when the network signal strength of the <NUM> network is much stronger than that of the <NUM> network, the electronic device uses found information related to the <NUM> network as the network search result corresponding to the profile <NUM>.

The network search result may include one or more of a network identifier, a network standard, a network signal strength, information used to indicate whether the device of the eSIM profile is roaming, and the like. For example, the network identifier may be a PLMN of an operator or a customized identifier. The network standard may include <NUM>, <NUM>, <NUM>, <NUM>, a higher network standard (for example, <NUM>), or the like. The network signal strength may include related parameters such as a received signal code power (RSCP) and/or a received signal strength indication (RSSI). For example, in this embodiment of this application, information of one or more bits may be used to indicate whether the profile is roaming. For example, a bit value <NUM> indicates that the profile is roaming, and a bit value <NUM> indicates that the profile is not roaming.

In addition, in some embodiments, when the electronic device does not find any network based on a profile, a network search result corresponding to the profile is null.

For example, the electronic device searches for a network based on N stored profiles, where N is a positive integer greater than or equal to <NUM>. Network search results corresponding to the N profiles may be shown in Table <NUM>.

The electronic device in <FIG> is used as an example. In response to the operation of disabling the airplane mode, the decision module <NUM> triggers the network search module <NUM> to search for a network based on the at least two profiles in the stored profiles with reference to the device hardware capability, to obtain network search results corresponding to the at least two profiles.

In some embodiments, the electronic device may further search for a network based on the at least two profiles in the stored profiles with reference to a network blacklist. The network blacklist may include one or more network identifiers. In this way, the electronic device avoids a network in the network blacklist when searching for a network. For example, the network blacklist may be preconfigured. For example, the network blacklist is preconfigured before delivery of the electronic device. For another example, different geographic locations correspond to different network blacklists. In response to the operation of disabling the airplane mode, the electronic device may obtain a network blacklist corresponding to a current geographic location of the user from a server or another device based on the geographic location. This helps improve network search reliability and network blacklist configuration flexibility. For example, the current geographic location of the user may be obtained by the electronic device based on information obtained by a GPS sensor, or may be determined based on a location based service (LBS). A manner of obtaining the geographic location information is not limited in this embodiment of this application.

Further, in some embodiments, in response to the operation of disabling the airplane mode, the electronic device obtains a current geographic location (the geographic location is referred to as a geographic location <NUM>) of the user, and determines whether a distance between the geographic location <NUM> and a geographic location <NUM> exceeds a first threshold. The geographic location <NUM> may be obtained by the electronic device in response to the operation of enabling the airplane mode by the user, or the geographic location <NUM> is a geographic location obtained last time before the geographic location <NUM> is obtained. It should be noted that the geographic location obtained last time before the geographic location <NUM> is obtained may be referred to as a geographic location obtained last time, and the geographic location obtained last time before the electronic device obtains the geographic location <NUM> may be obtained in response to the operation of enabling the airplane mode by the user, or may be obtained in response to another trigger event. This is not limited. If the distance between the geographic location <NUM> and the geographic location <NUM> exceeds the first threshold, the electronic device searches for a network based on the at least two profiles in the stored profiles. For example, if the distance between the geographic location <NUM> and the geographic location <NUM> does not exceed the first threshold, the electronic device may search for a network based on the first profile, to access the first operator network. For another example, when the distance between the geographic location <NUM> and the geographic location <NUM> does not exceed the first threshold but exceeds a second threshold, the electronic device searches for a network based on the first profile to obtain a PLMN of an operator (the following uses an example in which the PLMN of the operator is a PLMN <NUM>). The electronic device determines whether the PLMN <NUM> is the same as a PLMN <NUM>. The PLMN <NUM> may be a PLMN of the operator of the first operator network that the electronic device accesses before the airplane mode is enabled, or the PLMN <NUM> may be a PLMN obtained last time before the electronic device obtains the PLMN <NUM>. The PLMN obtained last time before the PLMN <NUM> is obtained may also be referred to as a PLMN obtained last time. It should be noted that the PLMN obtained last time before the PLMN <NUM> is obtained may be obtained before the electronic device responds to enabling the airplane mode by the user, or may be obtained in response to another trigger event. This is not limited. If the PLMN <NUM> is different from the PLMN <NUM>, the electronic device searches for a network based on the at least two profiles in the stored profiles. If the PLMN <NUM> is the same as the PLMN <NUM>, the electronic device may search for a network based on the first profile, to access the first operator network. This helps to reduce a quantity of times of network searching by the electronic device, and reduce power consumption of the electronic device.

In some other embodiments, in response to the operation of disabling the airplane mode, the electronic device may further first search for a network based on the first profile to obtain a PLMN A of an operator, and determine whether the PLMN A is the same as a PLMN B. For the PLMN B, refer to related descriptions of the PLMN <NUM> in the foregoing example. If the PLMN A is the same as the PLMN B, the electronic device may access the operator network based on the first profile. If the PLMN A is different from the PLMN B, the electronic device performs step <NUM>.

For example, the at least two profiles that are in the stored profiles and based on which the electronic device searches for a network may be some or all of the stored profiles.

<NUM>: The electronic device selects a second profile from the at least two profiles based on the network search results corresponding to the at least two profiles.

For example, the electronic device may select, from the at least two profiles, a profile whose network search result meets a preset condition as the second profile. For example, the network search result includes a network identifier, a network signal strength, a network standard, and indication information used to indicate whether the profile is roaming. The electronic device may select, from the at least two profiles, a profile that indicates a non-roaming state and a network signal strength greater than a preset threshold as the second profile. The preset threshold may be set based on an actual requirement. Network search results corresponding to profiles whose profile indexes are <NUM>, <NUM>, <NUM>, <NUM>, and <NUM> in Table <NUM> are used as an example. In the network search results of the profiles whose profile indexes are <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, a profile that indicates a non-roaming state and a network signal strength greater than a preset threshold (for example, -<NUM> dbm) is a profile whose profile index is <NUM>. In this case, the profile whose profile index is <NUM> is a profile selected by the electronic device from the five profiles.

For another example, the electronic device may separately score, according to a preset algorithm based on a network search result corresponding to each of the at least two profiles, operator networks found based on the profiles. The score is used to comprehensively evaluate the operator network found based on the profile. The electronic device selects one profile from the at least two profiles as the second profile based on scores corresponding to the at least two profiles. For example, the electronic device may select a profile corresponding to a largest score in the scores corresponding to the at least two profiles as the second profile. The preset algorithm may be set based on an actual situation. For example, parameters included in the network search result are a network identifier, a network signal strength, information used to indicate whether the profile is roaming, and a network standard. Different parameters may correspond to different weights. A specific weight may be set based on an actual situation. For example, weights of different parameters may be shown in Table <NUM>.

For another example, the electronic device may further select one profile from the at least two profiles as the profile <NUM> based on the network search results corresponding to the at least two profiles with reference to the device hardware capability (for example, the radio frequency capability and the modulation and demodulation capability). For example, the network search results corresponding to the at least two profiles are network search results corresponding to profiles whose profile indexes are <NUM> and N in Table <NUM>. When a modulation and demodulation capability of the electronic device in <NUM> is better than that in <NUM>, although a network signal strength in the network standard <NUM> is slightly weaker than a network signal strength in the network standard <NUM>, the electronic device selects a profile whose profile index is N as the second profile.

For another example, the electronic device may further select one profile from the at least two profiles as the second profile based on the network search results corresponding to the at least two profiles with reference to service package information corresponding to the at least two profiles. This helps an operator network to be accessed based on the selected profile to meet requirements of users for Internet access and voice communication, and saves costs to some extent.

The service package information includes package information in a roaming scenario and package information in a non-roaming scenario. For example, the service package information may include data traffic information, voice call duration, and a quantity of SMS messages in the non-roaming scenario, and data traffic information, voice call duration, and a quantity of SMS messages in the roaming scenario. The service package information may further include tariff information of the service package. For example, the tariff information of the service package includes package tariff information in the non-roaming scenario and package tariff information in the roaming scenario. The service package information may be sent by an operator or a third party to the electronic device when the electronic device subscribes to or provisions the service package, or may be obtained by the electronic device from service package information stored in the electronic device based on a profile in response to the operation of disabling the airplane mode, or may be obtained by the electronic device from an operator or a third party based on a profile. A manner of obtaining service package information based on a profile is not limited in this embodiment of this application.

For example, for details about a process in which the electronic device selects one profile from the at least two profiles as the second profile with reference to the service package information, refer to the schematic flowchart of a profile selection method shown in <FIG>. The method specifically includes the following steps.

<NUM>: The electronic device determines whether the network search results corresponding to the at least two profiles include a valid network search result. If yes, step <NUM> is performed. Otherwise, this procedure ends. When a network search result is not null, the network search result is a valid network search result. For example, when searching for a network based on the profile <NUM>, the electronic device finds no network, a network search result corresponding to the profile <NUM> is null, and the network search result corresponding to the profile <NUM> is an invalid network search result. For another example, when searching for a network based on the profile <NUM>, the electronic device finds an operator network, a network search result corresponding to the profile <NUM> is not null, and the network search result may include information such as a network identifier, a network signal strength, and a network standard. Therefore, the network search result corresponding to the profile <NUM> is a valid network search result.

<NUM>: The electronic device obtains service package information corresponding to the at least two profiles. For a manner of obtaining the service package information, refer to the foregoing related descriptions.

<NUM>: The electronic device determines a profile in a roaming state and a profile in a non-roaming state in the at least two profiles based on the network search results corresponding to the at least two profiles.

<NUM>: The electronic device determines a preferential service package corresponding to any profile in the roaming state based on a tariff in the roaming scenario in service package information corresponding to the profile, and determines a preferential service package corresponding to any profile in the non-roaming state based on a tariff in the non-roaming scenario in service package information corresponding to the profile.

<NUM>: The electronic device selects one profile from the at least two profiles as the second profile based on the preferential service packages determined in step <NUM>.

It should be noted that a sequence of step <NUM> and step <NUM> is not limited in this embodiment of this application, provided that step <NUM> and step <NUM> are before step <NUM>.

For example, the at least two profiles are profiles whose profile indexes are <NUM>, <NUM>, <NUM>, and <NUM> in Table <NUM>. Service package information corresponding to the profile whose profile index is <NUM> is used to indicate a service package whose monthly rental is <NUM> yuan, specifically including <NUM> (MB) traffic, <NUM> SMS messages, and <NUM> minutes of voice calls in the non-roaming scenario, and services are charged separately based on actual usage in the roaming scenario. Service package information corresponding to the profile whose profile index is <NUM> is used to indicate a service package whose monthly rental is <NUM> yuan, specifically including <NUM> traffic, <NUM> SMS messages, and <NUM> minutes of voice calls in the non-roaming scenario. Service package information corresponding to the profile whose profile index is <NUM> is used to indicate a service package whose monthly rental is <NUM> yuan, specifically including <NUM> traffic, <NUM> SMS messages, and <NUM> minutes of voice calls, and services are separately charged based on actual usage in the roaming scenario. Service package information corresponding to the profile whose profile index is <NUM> is used to indicate a service package whose monthly rental is <NUM> yuan, specifically including <NUM> traffic, <NUM> SMS messages, and <NUM> minutes of voice calls in the non-roaming scenario. It can be learned from Table <NUM> that the profiles whose profile indexes are <NUM> and <NUM> correspond to information indicating that the profiles are roaming, and are profiles in roaming. Therefore, the electronic device determines, based on tariffs in the roaming scenario in the service package information corresponding to the profile indexes <NUM> and <NUM>, preferential service packages corresponding to the profiles whose profile indexes are <NUM> and <NUM>. The profiles whose profile indexes are <NUM> and <NUM> correspond to information indicating that the profiles are not roaming, and the electronic device determines, based on tariffs in the non-roaming scenario in the service package information corresponding to the profile indexes <NUM> and <NUM>, preferential service packages corresponding to the profiles whose profile indexes are <NUM> and <NUM>. The electronic device may select, based on the determined preferential service packages, one profile from the profiles whose profile indexes are <NUM>, <NUM>, <NUM>, and <NUM>. A specific profile to be selected is related to a specific implementation policy. For example, when the user requires relatively long voice call duration, if a tariff of the preferential service package corresponding to the profile <NUM> is cheaper, the electronic device may select the profile whose profile index is <NUM>. For another example, when the user requires relatively large traffic, the electronic device may select the profile whose profile index is <NUM>.

In addition, in some other embodiments, the electronic device may score, based on network search results and the service package information corresponding to the at least two profiles, an operator network found based on the profiles, where the score is used to comprehensively evaluate the operator network found based on the profiles. The electronic device selects one profile from the at least two profiles as the second profile based on scores corresponding to the at least two profiles. For example, the electronic device may select a profile corresponding to a largest score in the scores corresponding to the at least two profiles as the second profile. The preset algorithm may be set based on an actual situation. For example, different weights may be set for different parameters in different network search results and different service package information. A specific weight may be set based on an actual situation. For example, weights of different parameters may be shown in Table <NUM>.

The foregoing merely describes an example in which the electronic device selects one profile from the at least two profiles. In this embodiment of this application, the electronic device may alternatively select one profile from the at least two profiles in another manner. For example, when selecting a profile from the at least two profiles, the electronic device may consider only the service package information. In this case, for example, in response to the operation of disabling the airplane mode, the electronic device may select one profile from the at least two profiles as the second profile based on the service package information corresponding to the at least two profiles. Then, the electronic device searches for a network based on the second profile.

<NUM>: When the second profile is different from the first profile, the electronic device activates the second profile, and accesses a second operator network based on the second profile. In some embodiments, when the electronic device supports access to only one operator network, the electronic device may further deactivate the first profile.

For example, after accessing the second operator network, the electronic device may further notify the user that the electronic device has accessed the second operator network. For example, the electronic device may display an identifier of a second operator in the status bar, to notify the user that the electronic device has accessed the second operator network. For example, the identifier of the second operator is EE. After accessing a network of the operator EE, the electronic device may replace "searching for a network" in the status bar with EE, for example, a user interface shown in <FIG>.

It should be noted that the second operator network may be different from or the same as the first operator network.

In this embodiment of this application, because the electronic device can automatically select a profile, the electronic device can switch profiles based on an actual situation without the user's manual operation in the conventional technology, to access a corresponding operator network. This meets a requirement of the user and improves user experience.

In addition, this embodiment of this application may be further used in a power-on and power-off scenario. In the power-on and power-off scenario, step <NUM> to step <NUM> may be replaced with the following steps.

<NUM>': The electronic device detects a power-off operation. For example, the power-off operation may be an operation of pressing a power button, or may be a shortcut gesture operation, or may be a voice instruction.

<NUM>': The electronic device powers off in response to the power-off operation, and disconnects a connection to the first operator network.

<NUM>': The electronic device detects a power-on operation. For example, the power-on operation may be an operation of pressing the power button.

<NUM>': The electronic device searches for a network based on at least two profiles in stored profiles in response to the power-on operation, to obtain network search results corresponding to the at least two profiles.

In addition, this embodiment of this application may be further used in another network disconnection scenario. This is not limited.

In some embodiments, when an automatic network switching function is enabled, the electronic device detects the operation of disabling the airplane mode, the power-on operation, or the like, and initiates a network search process based on the at least two profiles in the stored profiles. This helps improve interaction between the user and the device. For example, when the automatic network switching function of the electronic device is disabled, the electronic device detects the operation of disabling the airplane mode, and may search for a network based on the last activated first profile. For details, refer to a related implementation in the conventional technology. For example, the user may enable or disable the automatic network switching function by operating a virtual button used to control enabling or disabling of the automatic network switching function. For another example, the user may further enable or disable the automatic network switching function in another manner, for example, a shortcut gesture operation or a voice instruction. For example, the virtual button used to control enabling or disabling of the automatic network switching function may be located in a user interface shown in <FIG>, or may be located in a system setting interface. This is not limited.

Further, in some embodiments, when the first profile is different from the second profile, the electronic device may further notify the user of a service package corresponding to the second profile, so that the user learns of the used service package after accessing the second operator network. For example, the electronic device may notify the user by using an SMS message. The SMS message includes information used to indicate the service package corresponding to the second profile. The SMS message may be sent by the operator or a third party to the electronic device after the electronic device accesses the second operator network. For example, the service package corresponding to the second profile is a Tencent King card package of China Unicom, and the electronic device may notify the user of the service package corresponding to the second profile by using a user interface shown in <FIG>. For another example, the electronic device may further notify the user of the service package corresponding to the second profile by displaying a prompt box on the display. For example, the service package corresponding to the second profile is the Tencent King card package of China Unicom, and the electronic device may notify the user of the service package corresponding to the second profile by displaying a prompt box A shown in <FIG> on the display. In some embodiments, when notifying the user of the service package corresponding to the second profile by using the SMS message or the prompt box, the electronic device may further play a ring or vibrate.

In addition, the electronic device may further prompt the user in another manner, for example, voice. After accessing the second operator network, the electronic device receives a call request of the second operator network, and broadcasts, to the user in response to an operation of answering the call request by the user, a service package used by the user after the second operator network is accessed.

It should be noted that when the first profile is different from the second profile, the electronic device may actively obtain the service package corresponding to the profile from the second operator network, or the second operator network may actively deliver, to the electronic device, the service package corresponding to the profile after the electronic device successfully accesses the second operator network. This is not limited.

Further, when the first profile is different from the second profile, the electronic device further sends, to the first operator network, a request to stop charging for the service package corresponding to the first profile. This helps save user costs. After receiving the request sent by the electronic device to stop charging for the service package corresponding to the first profile, the first operator network stops charging for the service package corresponding to the first profile, and returns, to the electronic device, a response for stopping charging for the service package corresponding to the first profile. After receiving the response for stopping charging for the service package corresponding to the first profile, the electronic device notifies the user that charging for the service package corresponding to the first profile has stopped. For a manner of notifying the user that charging for the service package corresponding to the first profile is stopped, refer to the foregoing manner of notifying the user of the service package corresponding to the second profile.

In some actual scenarios, for example, the user is in a short business trip or on a short journey, for example, <NUM> days or <NUM> days, and a validity period of the enabled service package corresponding to the second profile is relatively short. In this case, the electronic device may not send, to the first operator, request information for stopping charging for the service package corresponding to the first profile. For example, when the first profile is different from the second profile, the electronic device determines whether a validity period of the service package corresponding to the second profile exceeds a preset period, and when the validity period of the service package corresponding to the second profile exceeds the preset period, the electronic device sends, to the first operator network, the request to stop charging for the service package corresponding to the first profile. When the validity period of the service package corresponding to the second profile does not exceed the preset period, the electronic device does not send, to the first operator network, the request to stop charging for the service package corresponding to the first profile. The preset period may be set based on an actual situation. For example, in China, a service package is usually paid by month. Therefore, the preset period may be set to one month.

For example, in this embodiment of this application, the stopping charging for the service package corresponding to the first profile may be understood as: the first operator no longer charges the user for the service package corresponding to the first profile, that is, the first operator changes a state of the service package corresponding to the first profile to a suspended state. Further, the first operator may change the service package corresponding to the first profile to a suspension and number reservation service.

In some other embodiments, when the first profile is different from the second profile, the electronic device further sends a request to subscribe to a call transfer service to the first operator network. The call transfer service request is used to transfer an incoming call for a telephone number A to a telephone number B, where the telephone number A is a telephone number included in the first profile, and the telephone number B is a telephone number included in the second profile. After receiving the request to subscribe to the call transfer service that is sent by the electronic device, the first operator network enables the call transfer service, transfers an incoming call for the telephone number A to the telephone number B, and then sends a response for subscribing to the call transfer service to the electronic device. The response for subscribing to the call transfer service is used to indicate that the call transfer service is successfully subscribed to. After the call transfer service is successfully subscribed to, when the electronic device uses the telephone number B, the electronic device can receive an incoming call for the telephone number A. In this way, the user does not miss calls. It should be noted that, for example, after receiving the response for subscribing to the call transfer service, the electronic device may activate the second profile.

In some other embodiments, after receiving the response for subscribing to the call transfer service, the electronic device may further notify the user that an incoming call for the telephone number A is to be transferred to the telephone number B. In this way, the user learns that an incoming call for the telephone number A is transferred to the telephone number B.

For example, the first operator network may send the response for subscribing to the call transfer service to the user by using an SMS message. In this case, the electronic device may notify the user, by using an SMS message, that the call transfer service is subscribed to. For example, the first operator network is China Unicom, the telephone number A is <NUM>, and the telephone number B is <NUM>. The electronic device may notify, by using a user interface shown in <FIG>, the user that the call transfer service is subscribed to. For another example, the electronic device may further notify, by using a prompt box, the user that the call transfer service is subscribed to, and an incoming call for the telephone number A is to be transferred to the telephone number B.

Further, when reactivating the first profile or accessing the first operator network based on the first profile, the electronic device may further send a request to cancel the call transfer service to the first operator network.

It should be noted that, in an example of prompting the user by using a prompt box, the electronic device may notify, by using one prompt box, the user of one or more of to stopping charging for the service package corresponding to the first profile, the service package corresponding to the second profile, and subscribing to the call transfer service. A quantity of prompt boxes used to prompt the user may be set based on an actual requirement.

In addition, in this embodiment of this application, the electronic device may obtain service package information, a request to subscribe to the call transfer service, a request to disable a service package, or the like from an operator network. To improve security of interaction between the electronic device and the operator network, each time the electronic device sends a message (for example, a service request) to the operator network, that is, before the operator network provides a service for the electronic device, validity of the electronic device needs to be authenticated or authorized. After the authentication succeeds, a corresponding service is provided for the electronic device. The structure of the electronic device shown in <FIG> is used as an example. The electronic device sends a service request (for example, a request to obtain a service package, a request to subscribe to or cancel a call transfer service, or a request to disable a service package) to the operator network by using the subscription module <NUM>. To facilitate authentication on the electronic device by the operator network, an entitlement service (ES) protocol stack may be integrated in the subscription module. The ES protocol stack may include a private authentication standard specified by an operator or an international standard.

For example, the operator network may implement authentication or authorization on the electronic device by using an ES server and a WS server. For example, a procedure of an authentication or authorization method may be shown in <FIG>, and specifically includes the following steps:.

It should be noted that, in some embodiments, the foregoing authentication process is completed when the profile is activated. In this case, when the electronic device sends a message (for example, a service request) to the operator network, validity of the electronic device may no longer be authenticated or authorized. For example, the electronic device performs the foregoing authentication process when the first profile is activated. When the electronic device needs to send a request to subscribe to the call transfer service to the first operator network, the electronic device may not perform the foregoing authentication process, but perform the procedure of subscribing to the call transfer service.

The following describes the method in the embodiments of this application with reference to a specific scenario. For example, a user resides in China and is to be on the business trip to the UK for one month. The user is currently in China and plans to be on the business trip to the UK for one month from July <NUM>, <NUM> to July <NUM>, <NUM> (Beijing time). A profile currently activated on the user's electronic device is a profile <NUM>, and the electronic device currently accesses a network of China Mobile based on the profile <NUM>, to provide a service for the user. However, to save costs, the user subscribes to an eSIM service package of the UK operator EE in China in advance. A validity period is one month. After detecting that the user subscribes to the eSIM service package, the UK operator EE or a third party (for example, a card vendor) sends a profile <NUM> to the electronic device. Profiles stored in the electronic device include the profile <NUM> and the profile <NUM>. The user enables the airplane mode on the electronic device after boarding the plane on June <NUM>, <NUM> (Beijing time), and disables the airplane mode after arriving in the UK on July <NUM>, <NUM> (Beijing time). The electronic device automatically searches for a network based on the profile <NUM> and the profile <NUM>, and activates the profile <NUM> and then deactivates the profile <NUM> based on network search results, so that the electronic device can access a network of the UK operator EE based on the profile <NUM>. In this way, the electronic device can find a network based on the profile <NUM>, and perform communication. In addition, because the electronic device automatically activates the profile <NUM> without the user's manual operation, user experience is further improved.

In addition, an embodiment of this application further provides an operator network switching method. The following describes an operator network switching method by using an example in which the electronic device stores at least two profiles, and a first profile is a currently activated profile in the stored profiles.

For example, <FIG> is a schematic flowchart of an operator network switching method according to an embodiment of this application. The method specifically includes the following steps.

<NUM>: The electronic device detects a first operation, where the first operation is used to disconnect a connection to the first operator network.

For example, the first operation is an operation of enabling an airplane mode. For another example, the first operation is a power-off operation.

<NUM>: Disconnect the connection to the first operator network in response to the first operation.

<NUM>: The electronic device detects a second operation, where the second operation is used to restore a network connection.

For example, the second operation is an operation of disabling the airplane mode. For another example, the second operation is a power-on operation.

<NUM>: The electronic device obtains a first parameter in response to the second operation.

<NUM>: When the first parameter meets a first condition, the electronic device activates a second profile in the stored profiles, where the second profile is different from the first profile.

For example, the first parameter is a first geographic location, and the first geographic location is used to indicate a current geographic location of the electronic device. The meeting a first condition by the first parameter may be understood as: A distance between the first geographic location and a second geographic location is greater than or equal to a first threshold. The second geographic location is obtained before the electronic device disconnects a connection to the first operator network in response to the corresponding operation.

For another example, the first parameter is a first PLMN. For example, the electronic device obtains the first PLMN by searching for a network based on the first profile. The meeting the first condition by the first parameter may be understood as: The first PLMN is different from the second PLMN. The second PLMN is a PLMN used when the electronic device accesses the first operator network.

The foregoing describes examples in which the first parameter is a geographic location and a PLMN. In this embodiment of this application, the first parameter may alternatively be another parameter. This is not limited.

Specifically, the second profile is a profile different from the first profile in the stored profiles. For example, the second profile may be determined based on network search results corresponding to some profiles in the stored profiles. For a manner of determining the some profiles, refer to related descriptions in <FIG>. For example, the second profile is determined based on a network search result corresponding to the second profile and a network search result corresponding to a third profile. In addition, in some other embodiments, the electronic device may further determine the second profile by referring to a network blacklist, service package information, or the like. This is not limited.

<NUM>: The electronic device accesses a second operator network based on the second profile.

In the operator network switching method shown in <FIG>, a call transfer service may also be enabled, charging for a service package corresponding to the first profile may be stopped, the first profile may be deactivated, or the like. For specific implementations, refer to related descriptions in <FIG>.

The foregoing embodiments may be used separately, or may be used in combination to achieve different technical effects.

In the foregoing embodiments provided in this application, the method provided in the embodiments of this application is described from the perspective in which the electronic device serves as the execution body. To implement functions in the methods provided in the embodiments of this application, the electronic device may include a hardware structure and/or a software module, and implement the functions in a form of the hardware structure, the software module, or a combination of the hardware structure and the software module. Whether a function in the foregoing functions is performed by using the hardware structure, the software module, or the combination of the hardware structure and the software module depends on particular applications and design constraint conditions of the technical solutions.

Based on a same concept, <FIG> shows an electronic device <NUM> according to this application. For example, the electronic device <NUM> includes at least one processor <NUM> and a memory <NUM>. The processor <NUM> is coupled to the memory <NUM> and a display <NUM>. Couplings in the embodiments of this application are indirect couplings or communication connections between apparatuses, units, or modules, and may be implemented in electronic, mechanical, or other forms, and are used for information exchange between the apparatuses, the units, or the modules.

Specifically, the memory <NUM> is configured to store program instructions. When the processor <NUM> invokes the program instructions stored in the memory <NUM>, the electronic device <NUM> is enabled to perform the operator network switching method in the embodiments of this application. For example, when the processor <NUM> invokes the program instructions stored in the memory <NUM>, the electronic device <NUM> is enabled to perform the operator network switching method shown in <FIG>.

In some embodiments, the electronic device <NUM> further includes the display <NUM>. The display <NUM> is configured to notify the user that a call transfer service is enabled, or notify the user of a service package corresponding to a second profile or the like.

Claim 1:
An operator network switching method, wherein the method is performed by an electronic device, the electronic device stores a plurality of profiles including a first profile, the first profile is a currently activated profile, and the method comprises:
accessing (<NUM>), by the electronic device, a first operator network based on the first profile;
detecting (<NUM>), by the electronic device, a first operation, wherein the first operation is used to disconnect a network connection;
disconnecting (<NUM>), by the electronic device, a connection to the first operator network in response to the first operation;
detecting (<NUM>), by the electronic device, a second operation, wherein the second operation is used to restore a network connection;
searching (<NUM>), by the electronic device, for a network based on at least two profiles in the plurality of stored profiles in response to the second operation, to obtain a network search result corresponding to the at least two profiles;
selecting (<NUM>) a second profile from the at least two profiles based on the network search results corresponding to the at least two profiles; and
when the second profile is different from the first profile, activating (<NUM>), by the electronic device, the second profile, and accessing a second operator network based on the second profile;
wherein the method further comprises:
sending, by the electronic device, a request to subscribe to a call transfer service to the first operator network, wherein the request to subscribe to the call transfer service is used to transfer an incoming call for a first telephone number to a second telephone number, the first telephone number is a telephone number comprised in the first profile, and the second telephone number is a telephone number comprised in the second profile; and
notifying, by the electronic device, a user that an incoming call for the first telephone number is to be transferred to the second telephone number when receiving a first response for subscribing to the call transfer service, wherein
the first response is used to indicate that the call transfer service is successfully subscribed to, and the first response is returned for the request to subscribe to the call transfer service.