Network switching method and electronic device
By acquiring and correcting the priority of network faults and selecting the optimal network switching scheme, the network switching conflict problem was resolved, and the network communication effect and stability were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-01-10
- Publication Date
- 2026-06-23
AI Technical Summary
With the common occurrence of 4G and 5G networks operating in parallel, when mobile terminals encounter network experience problems, the existing technology may cause network switching conflicts due to multiple services triggering network switching, resulting in network switching failure or reduced communication performance.
By acquiring the fault priority of network faults and adjusting the fault priority based on penalty information, the optimal network handover scheme can be selected to improve the network handover effect.
It improves communication performance after network switching, avoids unnecessary network switching operations, saves power consumption of electronic devices, and optimizes the stability and efficiency of network communication.
Smart Images

Figure CN120343651B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a network switching method and electronic device. Background Technology
[0002] With the development of mobile communication networks, 5G (5th generation mobile communication technology) networks have also been rapidly popularized. However, the coexistence of 4G and 5G networks is still quite common, and for most commonly used mobile services, there is no significant difference in user experience between the two. Therefore, when mobile terminals encounter network experience-related problems, the terminal side usually attempts to self-heal and repair the fault by actively switching the network standard it hosts.
[0003] In related technologies, to improve network communication, user terminals use a variety of network switching methods to switch between their current network (such as switching from a 5G network to a 4G network). However, when multiple services trigger network switching and the switching actions conflict, problems may occur such as network switching failure, failure to improve network communication after switching, or failure to immediately roll back after a decline in network communication.
[0004] Therefore, the existing multi-service-triggered network switching, which leads to network switching conflicts, is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, this application provides a network switching method and electronic device that can select the optimal network switching scheme when multiple services trigger network switching, thereby improving the communication effect after network switching.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, this application provides a network switching method, which includes: an electronic device obtaining the fault priority of each network fault among multiple current network faults based on reference information, the reference information including the fault type of the network fault, penalty information, and one or more of the motion state or application scenario of the electronic device; for the first network fault among multiple network faults, the penalty information is obtained after the failure of the network switching operation corresponding to the previous first network fault; the penalty information is used to reduce the fault priority of the first network fault within a preset time period; based on the fault priority of each network fault, a target network fault is determined from multiple network faults; and according to the network switching operation corresponding to the target network fault, the device switches from the first network to the second network; the network switching operation is used to repair the target network fault; the first network is the network currently connected to the electronic device; and the first network and the second network correspond to different mobile network standards.
[0008] In this method, since the severity and urgency of different types of network faults in electronic devices vary, fault priority can characterize the severity and urgency of network faults. Fault priority is not fixed under different scenarios. Therefore, the electronic device can combine various information in the reference information to determine the fault priority of each network fault in the current application scenario or motion state of the electronic device. It can also correct the fault priority according to the penalty information, thus improving the accuracy of fault priority. This allows the electronic device to select the target network fault to be repaired from multiple network faults based on the fault priority of each network fault, and switch from the currently connected first network to a second network of a different standard according to the network switching operation corresponding to the target network fault, so as to repair the target network fault and improve the communication effect after network switching.
[0009] In conjunction with the first aspect, in one possible implementation, the electronic device obtains the fault priority of each network fault among multiple current network faults based on reference information, including: detecting a second network fault; if the electronic device has not repaired other network faults of the same fault type as the second network fault, obtaining the fault priority of the second network fault; if the fault priority of the second network fault is greater than a preset fault priority, obtaining the fault priority of a third network fault, wherein the third network fault is a network fault currently existing in the electronic device, and the fault type of the third network fault is different from that of the second network fault, and the multiple network faults include the second network fault and the third network fault; the electronic device determines a target network fault from the multiple network faults according to the fault priority of each network fault, including: if the fault priority of the second network fault is greater than the fault priority of the third network fault, deleting the third network fault and determining the second network fault as the target network fault, wherein the network switching operation corresponding to the third network fault is the opposite of the network switching operation corresponding to the second network fault, and the fault priority of the third network fault is greater than the preset fault priority.
[0010] In this method, when an electronic device detects a network fault, it first obtains the fault priority of the network fault if it is determined that no identical network fault is being processed. Then, if it is determined that the fault priority of the network fault is greater than a preset fault priority, it obtains the priorities of other network faults in the electronic device. This avoids invalid fault priority acquisition operations and saves power consumption of the electronic device. At the same time, after obtaining the fault priorities of all network faults, if it is determined that there is a network fault in the electronic device that conflicts with the network fault, and the fault priority of the conflicting network fault is greater than the fault priority of the conflicting network fault, the network fault is identified as the target network fault. This ensures the effectiveness of the network switching operation corresponding to the identified target network fault, thereby indirectly optimizing the communication effect after network switching.
[0011] In conjunction with the first aspect, in one possible implementation, the network switching method provided in this application further includes: when the electronic device detects a third network fault before the second network fault, and the fault priority of the second network fault is greater than the fault priority of the third network fault, and the third network fault is a network fault that the electronic device is repairing, the network switching operation already performed corresponding to the third network fault is rolled back.
[0012] In this method, if an electronic device is repairing a third network fault that conflicts with the second network fault, and the fault priority of the third network fault is lower than that of the second network fault, the device can roll back the network switching operation already performed for the third network fault to avoid affecting the subsequent network switching operations.
[0013] In conjunction with the first aspect, in one possible implementation, the network switching method provided in this application further includes: the electronic device deleting the second network fault when a first preset condition is met; the first preset condition includes any one of the following: the electronic device is repairing other network faults with the same fault type as the second network fault; the fault priority of the second network fault is greater than a preset fault priority, and the fault priority of the second network fault is less than or equal to the fault priority of the fourth network fault; the fault priority of the second network fault is less than or equal to the preset fault priority.
[0014] In this method, the electronic device can also delete the second network fault when the first preset condition is met, thereby reducing the impact of the network fault on the mobile phone's decision on the target network fault and speeding up the efficiency of determining the target network fault.
[0015] In conjunction with the first aspect, in one possible implementation, the electronic device obtains the fault priority of each network fault among multiple network faults, including: for each network fault among multiple network faults, determining the initial fault priority of the network fault in a default scenario based on the fault type and penalty information of the network fault, and determining the fault priority of the network fault according to the motion state of the electronic device, the application scenario, and the initial fault priority.
[0016] In this method, for each network fault, the fault priority under the default scenario is first determined according to the fault type of the network fault. Then, with the penalty information of the network fault recorded, the initial fault priority of the network fault is obtained by combining the penalty information. Finally, the current fault priority of the network fault is obtained according to the actual motion state and application scenario of the electronic device, so as to ensure the accuracy of the fault priority of each network fault.
[0017] In conjunction with the first aspect, in one possible implementation, the electronic device obtains the fault priority of each network fault among multiple network faults based on reference information, including: for each network fault among multiple network faults, calculating the fault priority of the network fault according to the fault parameters corresponding to each type of information in the reference information of the network fault; or, inputting the fault parameters corresponding to each type of information in the reference information of the network fault into a decision model and outputting the fault priority of the network fault; wherein the fault parameters are preset parameters, or the fault parameters are parameters obtained by machine learning training.
[0018] In this method, electronic devices can obtain reference information corresponding to fault parameters through manual setting or machine learning training, and then obtain the fault priority of network faults through calculation or model output, thus enriching the ways to obtain fault priority.
[0019] In conjunction with the first aspect, in one possible implementation, after the electronic device switches from the first network to the second network according to the network switching operation corresponding to the target network failure, it can also adjust the connection duration between the electronic device and the second network based on the environmental information of the electronic device. The environmental information includes one or more of the following: signal quality, location information of the electronic device, and application scenario of the electronic device.
[0020] In this method, after the electronic device switches to the second network, the network communication of the mobile phone may be affected by environmental information such as different signal quality, location information, and application scenarios. Therefore, by flexibly adjusting the connection duration with the second network according to this environmental information, better network communication can be provided for the electronic device as much as possible.
[0021] In conjunction with the first aspect, in one possible implementation, the electronic device adjusts the connection duration between the electronic device and the second network based on environmental change information of the electronic device, including: switching from the second network to the first network when the signal quality of the first network is greater than or equal to a preset signal quality; and maintaining connection with the second network for a first suppression duration when the signal quality of the first network is less than the preset signal quality, wherein the suppression duration is used to indicate preventing the electronic device from switching from the second network to the first network.
[0022] In this method, after switching networks, if the electronic device detects that the signal quality of the first network is poor, it maintains the connection with the switched network to ensure the stability of the current network communication; conversely, if the signal quality of the first network is good, it switches back to the first network to optimize the network communication of the electronic device.
[0023] In conjunction with the first aspect, in one possible implementation, if the signal quality of the first network is less than the preset signal quality, the electronic device can also periodically measure the signal quality of a target neighboring cell, where the target neighboring cell is a neighboring cell of the serving cell of the electronic device. If the signal quality of the target neighboring cell is greater than or equal to the preset signal quality, the first suppression duration is deleted, and the device switches from the second network to the first network; if the signal quality of the target neighboring cell is less than the preset signal quality, the first suppression duration is increased to obtain a second suppression duration.
[0024] In this method, since the electronic device is moving, and may move across regions (i.e., across the coverage area of different base stations), the electronic device will measure the signal quality of the target neighboring cell of the current serving cell during the movement. When the signal quality of the target neighboring cell is good, it will switch back to the 5G network in a timely manner to stay in the target neighboring cell with good signal quality and optimize the network communication of the electronic device. When the signal quality of the target neighboring cell is also poor, it will continue to maintain the connection with the switched network and increase the suppression time to ensure the stability of the current network communication.
[0025] In conjunction with the first aspect, in one possible implementation, if the signal quality of the target neighboring cell is less than the preset signal quality, the electronic device can also acquire the location information of the electronic device. If the duration of the change in the location information of the electronic device is greater than or equal to the preset change, the second suppression duration is deleted, and the device switches from the second network to the first network. If the duration of the change in the location information of the electronic device is less than or equal to the preset change, the second suppression duration is increased, resulting in a third suppression duration.
[0026] In this method, when the 5G signal in the neighboring cell of the serving cell is weak, but the electronic device is in a state of slight movement or stationary state, the environmental conditions of the electronic device change little, and the various information in the electronic device is updated slowly. Maintaining a 4G network connection can meet the network needs of the electronic device. Therefore, the 4G network connection is maintained and the duration is increased to ensure the stability of the current network communication. When the 5G signal in the neighboring cell of the serving cell is weak, but the electronic device is in a state of high-speed movement, the environmental conditions of the electronic device change greatly, and the various information in the electronic device is updated quickly. A connection to a higher-speed network is required to support the update. Therefore, it is necessary to immediately switch back to a 5G network connection to improve the network communication effect of the electronic device.
[0027] In conjunction with the first aspect, in one possible implementation, the electronic device acquires its location information by: acquiring the location information of the electronic device when the connection between the electronic device and the second network is maintained for a duration less than a second suppression duration.
[0028] In this method, if the total connection time with the second network is less than the calculated total suppression time after the electronic device switches to the second network, the mobile phone location information continues to be acquired to ensure the effectiveness of the acquired location information.
[0029] In conjunction with the first aspect, in one possible implementation, when the change in the electronic device's location information is less than or equal to the preset change duration is greater than or equal to the first preset duration, the electronic device can also obtain the application scenario of the electronic device. If the application scenario of the electronic device is a time-delay sensitive scenario, a third suppression duration is added to obtain a fourth suppression duration. If the application scenario of the electronic device is a bandwidth sensitive scenario, the third suppression duration is reduced to obtain a fifth suppression duration.
[0030] In this method, when the signal quality of the first network in the neighboring cell of the serving cell is weak and the electronic device is in a state of slight movement or stationary state, the duration of the connection with the second network is flexibly adjusted according to the latency and bandwidth requirements by detecting the application scenario of the mobile phone, so as to ensure the current network communication as much as possible.
[0031] In conjunction with the first aspect, in one possible implementation, the electronic device acquires the application scenario of the electronic device, including: acquiring the application scenario of the electronic device when the connection between the electronic device and the second network is maintained for a duration less than the third suppression duration.
[0032] In this method, if the total connection time with the second network is less than the calculated total suppression time after the electronic device switches to the second network, the application scenario of the mobile phone continues to be acquired to ensure the effectiveness of the acquisition of the application scenario.
[0033] In conjunction with the first aspect, in one possible implementation, after the electronic device switches from the first network to the second network according to the network switching operation corresponding to the target network fault, it can also switch from the second network to the first network if the electronic device meets a second preset condition, and generate penalty information for the target network fault; the second preset condition includes at least one of the following: the electronic device has a target network fault; the communication quality of the electronic device is lower than the preset communication quality.
[0034] In this method, the effectiveness of the network switching operation is determined by checking whether there is still a communication anomaly in the electronic device or whether the target network fault still exists. If the fault is determined to be invalid, the device switches back to the first network and generates penalty information to reduce the fault priority of the target network fault if the target network fault occurs again in the future. This avoids invalid network switching operations and saves power consumption of the electronic device.
[0035] Secondly, an electronic device is provided, which has the function of implementing the method of the first aspect described above. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.
[0036] Thirdly, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, wherein when the electronic device is in operation, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform the method as described in any of the first aspects above.
[0037] Fourthly, an electronic device is provided, comprising: a processor; the processor being configured to be coupled to a memory and, after reading instructions from the memory, to execute, according to the instructions, a method as described in any of the first aspects above.
[0038] Fifthly, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, enable the computer to perform the methods of any one of the first aspects described above.
[0039] In a sixth aspect, a computer program product containing instructions is provided, which, when run on a computer, enables the computer to perform any of the methods described in the first aspect above.
[0040] In a seventh aspect, an apparatus (e.g., a system-on-a-chip) is provided, comprising a processor for supporting an electronic device in performing the functions described in the first aspect above. In one possible design, the apparatus further comprises a memory for storing program instructions and data necessary for the electronic device. When the apparatus is a system-on-a-chip, it may be composed of chips or may include chips and other discrete devices.
[0041] The technical effects of any of the design methods in aspects two through seven can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description
[0042] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0043] Figure 2 A flowchart illustrating a network handover method provided in an embodiment of this application;
[0044] Figure 3 A flowchart illustrating another network switching method provided in this application embodiment;
[0045] Figure 4 A schematic diagram of the interface of an electronic device to which a network switching method is applied, as provided in an embodiment of this application;
[0046] Figure 5 A flowchart illustrating another network switching method provided in this application embodiment;
[0047] Figure 6 A flowchart illustrating another network switching method provided in this application embodiment;
[0048] Figure 7 This is a schematic diagram of the structural composition of an electronic device provided in an embodiment of this application;
[0049] Figure 8 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0050] In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "a plurality of" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0051] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0052] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0053] Currently, it is common for 4G and 5G mobile cellular networks to coexist, and there is no significant difference in the experience between the two for most commonly used mobile services.
[0054] In related technologies, when mobile terminals encounter network experience issues, the terminal side typically attempts to self-heal by actively switching the network standard it hosts. Specifically, the most common self-healing method is to actively switch from a 5G network to a 4G network. However, when user terminals use numerous network switching methods to improve network communication performance, if multiple services trigger network switching simultaneously, network switching conflicts may occur, leading to network switching failure or a decrease in network communication performance after switching.
[0055] To address the aforementioned issues, this application provides a network switching method. Based on reference information, the method first obtains the fault priority of each network fault in the current application scenario or motion state of the electronic device, and then corrects the fault priority according to penalty information. This improves the accuracy of the fault priority, enabling the electronic device to select the target network fault to be repaired from multiple network faults based on the fault priority of each fault. Following the network switching operation corresponding to the target network fault, the method switches from the currently connected first network to a second network of a different standard to repair the target network fault, thereby improving the communication effect after network switching.
[0056] The network switching method provided in this application can be applied to any electronic device with network switching capabilities. For example, the electronic device can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, in-vehicle device (such as in-vehicle navigation system), and other devices with positioning functions. This application does not impose any special limitations on the specific form of the electronic device.
[0057] For example, please refer to Figure 1 The diagram illustrates the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an audio module 130, a speaker 130A, a microphone 130B, a display screen 140, a communication module 150, a power module 160, an input device 170, etc.
[0058] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0059] Processor 110 may include one or more processing units. For example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 100 may also include one or more processors 110.
[0060] The controller is the nerve center and command center of the electronic device 100. It can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0061] An operating system for the electronic device 100 can run on the application processor to manage the hardware and software resources of the electronic device 100. This includes managing and configuring memory, determining the priority of system resource allocation, controlling input and output devices, operating the network, managing the file system, and managing drivers. The operating system can also provide a user interface for interacting with the system. Various types of software can be installed within the operating system, such as drivers and applications (Apps).
[0062] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable applications such as intelligent cognition in electronic devices.
[0063] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0064] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.
[0065] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0066] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0067] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby causing electronic device 100 to perform the application running methods, various applications, and data management provided in some embodiments of this application. Internal memory 121 may include a code storage area and a data storage area. The data storage area may store data created during the use of electronic device 100. In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110 to cause electronic device 100 to perform the application running methods, other applications, and data management provided in embodiments of this application.
[0068] Electronic device 100 can implement audio functions through audio module 130, speaker 130A, microphone 130B, and application processor, such as music playback and recording. Audio module 130 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. Audio module 130 can also be used for encoding and decoding audio signals. In some embodiments, audio module 130 can be located in processor 110, or some functional modules of audio module 130 can be located in processor 110.
[0069] The loudspeaker 130A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.
[0070] Microphone 130B, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. Users can speak by bringing their mouth close to microphone 130B, inputting sound signals into microphone 130B.
[0071] The communication function of electronic device 100 can be realized through antenna 1, antenna 2 and communication module 150, etc.
[0072] Communication module 150 can provide solutions for wireless communication applications on electronic device 100, including cellular, Wi-Fi, Bluetooth (BT), and wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz). Communication module 150 can be one or more devices integrating at least one communication processing module. Communication module 150 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency-modulates the electromagnetic wave signals, and sends the processed signal to processor 110. Communication module 150 can also receive signals to be transmitted from processor 110, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 1 or antenna 2. For example, electronic device 100 can obtain a source database and a destination database through communication module 150; the source database is the database before data integration, and the destination database is the database after data integration. Extracting and integrating data from the source database forms the destination database.
[0073] Electronic device 100 implements display functions through a GPU, display screen 140, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0074] The display screen 140 is used to display images, videos, etc. The display screen 140 includes a display panel. The display panel can 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 minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 140, where N is a positive integer greater than 1. In this embodiment, the display screen 140 can be used to display a user interface (UI) and receive user operations on the UI. For example, the display screen 140 can display difference data between a source database and a destination database obtained according to the method provided in this embodiment.
[0075] In some embodiments, the display screen 140 is provided with a pressure sensor, a touch sensor, etc. The pressure sensor senses pressure signals and converts them into electrical signals. When a touch operation is applied to the display screen 140, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor. The electronic device 100 can also calculate the touch location based on the detection signal from the pressure sensor. The touch sensor, also called a "touch panel," can form a touchscreen, also called a "touch screen," with the display screen 140. The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can also be provided through the display screen 140.
[0076] The power module 160 can be used to supply power to the various components included in the electronic device 100. In some embodiments, the power module 160 can be a battery, such as a rechargeable battery.
[0077] Input device 170 may include a keyboard, mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc., into electronic device 100, thereby issuing commands and inputting data to electronic device 100. The mouse is an indicator for the horizontal and vertical coordinate positioning of the display system on electronic device 100, used to input instructions to electronic device 100. Input device 170 can be connected to electronic device 100 via a wired connection, such as through a GPIO interface or USB interface. Input device 170 can also be connected to electronic device 100 wirelessly, such as through Bluetooth or infrared.
[0078] The methods described in the following embodiments can all be implemented in the electronic device 100 having the above-described hardware structure. The following embodiments use a mobile phone as an example to illustrate the methods of this application.
[0079] The network switching method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0080] The network switching method described in this application can be applied to scenarios involving switching between 4G and 5G networks. For example... Figure 2 As shown, the network switching method may include the following steps S201 to S203.
[0081] S201. The mobile phone obtains the fault priority of each network fault among multiple current network faults based on reference information.
[0082] The reference information is used to indicate the various communication scenarios in which the mobile phone is located. For example, the reference information may include one or more of the following: the type of network failure, penalty information, and the mobile phone's motion status or application scenario.
[0083] In this embodiment of the application, the aforementioned penalty information refers to: for the first network fault among multiple network faults, the penalty information obtained after the previous network switching operation corresponding to the first network fault failed; the penalty information is used to reduce the fault priority of the first network fault within a preset time period.
[0084] The aforementioned preset time period can be a manually set time period, which can be flexibly adjusted according to the actual scenario.
[0085] For example, taking the aforementioned preset time period of 30 minutes as an example. If the mobile phone fails to perform a network switching operation for the first network failure, it will obtain the penalty information corresponding to the first network failure. If the mobile phone experiences the first network failure again within the next 30 minutes (e.g., at the 20th minute), the failure priority of the first network failure will be reduced according to the penalty information. If the mobile phone experiences the first network failure again after the next 30 minutes (e.g., at the 40th minute), the penalty information will become invalid because the preset time period of 30 minutes has been exceeded, and the failure priority of the first network failure will not be reduced.
[0086] In this embodiment, the network fault types mentioned above may include: data lag, poor voice quality, weak 5G or 4G signal, data activation failure, abnormal scheduling request (SR) process, evolved packet system fallback (EPSFB) failure, and overheating of the entire device. It is understood that in actual use, there may be more or fewer fault types, and this embodiment does not limit this.
[0087] In one example, let's take a weak 5G signal as an example of the network fault type mentioned above. During a 5G call, the mobile phone can monitor the strength of the 5G signal in real time. When the 5G signal weakens and affects the call quality, it can accurately detect the network fault of weak 5G signal.
[0088] In another example, let's take the aforementioned network fault type as overheating. During use, the phone can monitor its body temperature in real time. When the temperature reaches the set temperature control limit, the network fault of overheating can be accurately detected.
[0089] In this application embodiment, the fault priority of the same network fault is different under each piece of information included in the reference information. Therefore, for each network fault, the mobile phone needs to determine the fault priority of the actual situation of the mobile phone (such as the motion state and application scenario included in the reference information) based on the fault priority corresponding to each piece of reference information. Then, the fault priority is corrected according to the penalty information included in the reference information to obtain a more accurate fault priority.
[0090] Further optionally, in this embodiment of the application, the mobile phone obtaining the fault priority of each network fault among multiple network faults may include: for each network fault among multiple network faults, determining the initial fault priority of the network fault in the default scenario based on the fault type and penalty information of the network fault, and determining the fault priority of the network fault according to the motion state of the electronic device, the application scenario and the initial fault priority.
[0091] The aforementioned penalty information is pre-stored in the phone. If the network failure is the first time it has occurred, the phone does not store the penalty information for that network failure.
[0092] In the embodiments of this application, fault priority is used to characterize the severity or urgency of network faults. The higher the priority, the higher the severity or urgency of the network fault, and the lower the priority, the lower the severity or urgency of the network fault.
[0093] In this application embodiment, the above-mentioned default scenario is a scenario preset by the mobile phone, and the above-mentioned application scenario can be the actual usage scenario of the mobile phone.
[0094] For example, the above motion states may include: high speed, stationary, micro-motion, etc.; the above application scenarios may include: elevator scenarios, game scenarios, download scenarios, etc.
[0095] It should be noted that different motion states correspond to different fault priorities, and different application scenarios also correspond to different fault priorities.
[0096] In this embodiment, the fault parameters of the above-mentioned multiple network faults in various scenarios are shown in Table 1 below. It should be noted that Table 1 only shows the fault parameters of some network faults in some scenarios. In actual use, more network faults in more scenarios may be included. This embodiment does not provide examples of each one.
[0097] Table 1
[0098] Fault type Default Scenario Elevator scene High-speed scenarios Game Scene Punishment scenario 5G / 4G weak signal 1 -2 -3 1 -1 Data internet lag 3 0 -1 4 0 Poor voice quality 3 0 -1 3 0 Data activation failed 4 1 0 5 -2 SR process abnormality 4 1 0 5 -2 EPSFB failed. 5 2 1 5 -4 Overall overheating 6 6 6 6 -6
[0099] Among them, the high-speed scenario mentioned above refers to a scenario where the mobile phone is moving at high speed, and the penalty scenario mentioned above refers to a scenario where the mobile phone stores penalty information for various network failures.
[0100] Thus, for each network fault, the fault priority under the default scenario is first determined based on the fault type. Then, with the penalty information for the network fault recorded in the phone, the initial fault priority of the network fault is obtained by combining the penalty information. Finally, the current fault priority of the network fault is obtained based on the actual motion state of the phone and the application scenario, ensuring the accuracy of the fault priority of each network fault.
[0101] In one alternative implementation, for each of a plurality of network faults, the mobile phone can calculate the fault priority of the network fault based on the fault parameters corresponding to the reference information.
[0102] In this embodiment of the application, the fault parameters can be preset parameters, such as the various fault parameters preset in Table 1 above; the fault parameters can also be obtained by continuously training and adjusting through built-in machine learning.
[0103] For example, the parameters in Table 1 above can be substituted into Formula (1) to calculate the fault priority of the network fault. Formula (1) is as follows:
[0104] priority = P default +F movement +F scene +F punihsment Formula (1)
[0105] Where priority is the calculated network fault priority; P default F represents the fault parameters for network failures in the default scenario; movement This refers to the fault parameters of the network when the phone is in this motion state; F punihsment Fault parameters that provide penalty information for network failures.
[0106] It should be noted that since the fault parameter value corresponding to the above penalty information is negative, substituting this value into formula (1) will make the final calculated value smaller. Therefore, when there is a corresponding penalty information for the network fault, the fault priority of the network fault will be reduced.
[0107] In another alternative implementation, for each of the multiple network faults, the mobile phone inputs the fault parameters corresponding to the reference information into the decision model and outputs the fault priority of the network fault.
[0108] In this way, by manually setting or training machine learning to obtain reference information corresponding to fault parameters, and then by calculating or by model output, the fault priority of the network fault is obtained, thus enriching the ways to obtain fault priority.
[0109] S202. The mobile phone determines the target network fault from multiple network faults based on the fault priority of each network fault.
[0110] The following provides examples of the three implementation methods included in steps S201 and S202 above. In actual use, there may be more implementation methods, and this application embodiment does not specifically limit them.
[0111] In one alternative implementation, the mobile phone first obtains the fault priorities of multiple network faults, and then determines the target network fault priority based on the fault priorities of the multiple network faults.
[0112] For example, the mobile phone periodically handles network faults. Taking the aforementioned multiple network faults as examples of network faults that exist in the current period and have not been handled (such as network fault 1 and network fault 2), the mobile phone can sequentially obtain the fault priority of each of network fault 1 and network fault 2. When the fault priority of all network faults is greater than zero, all fault priorities are sorted in descending order to obtain a descending sequence (such as the fault priority of network fault 2 > the fault priority of network fault 1). Then, the network fault with the highest fault priority in the sorted sequence (such as network fault 2) is determined as the target network fault.
[0113] Specifically, taking network fault 1 as poor voice quality and network fault 2 as data lag as examples. If the phone is in a game scenario, according to Table 1 and Formula (1) above, the fault priority of data lag is calculated to be 7, which is greater than 0. In this case, it is necessary to switch to the 5G network to ensure the low latency requirement in the game scenario. The fault priority of poor voice quality is calculated to be 6, which is greater than 0. In this case, it is necessary to switch to the 4G network to maintain the voice call quality. At this time, since 7 is greater than 6, it is necessary to prioritize the processing of data lag and switch to the 5G network.
[0114] In another alternative implementation, after the mobile phone detects a network fault, it directly obtains the priority of the network fault and processes it. Then, if a new network fault is received before the network fault has been repaired, the fault priority of the new network fault is obtained. Finally, the fault priorities are compared, and the network fault with the higher fault priority is determined as the target network fault.
[0115] For example, consider the aforementioned multiple network faults, including network faults being processed (e.g., network fault 1) and unprocessed network faults (e.g., network fault 2). After detecting network fault 1, the mobile phone directly obtains the fault priority of network fault 1 and begins processing it. At this time, after receiving network fault 2, the mobile phone obtains the fault priority of network fault 2, and then determines whether the fault priority of network fault 2 is greater than that of network fault 1. If it is greater, network fault 2 is identified as the target network fault.
[0116] In another alternative implementation, after the mobile phone detects a second network fault, if the mobile phone has not repaired other network faults of the same fault type as the second network fault, it obtains the fault priority of the second network fault, and if the fault priority of the second network fault is greater than the preset fault priority, it obtains the fault priority of the third network fault currently existing on the mobile phone. Finally, if the fault priority of the second network fault is greater than the fault priority of the third network fault, the third network fault is deleted, and the second network fault is identified as the target network fault.
[0117] Among them, the third network fault corresponds to a different type of fault than the second network fault. Both the third network fault and the second network fault are network faults among the aforementioned multiple network faults.
[0118] For example, consider the aforementioned multiple network faults, including a network fault currently being processed (e.g., network fault 1), an existing third network fault (e.g., network fault 2), and a currently received second network fault (e.g., network fault 3). Figure 3 As shown, after the mobile phone receives network fault 3, it first checks if there is a network fault 1 of the same fault type being processed. If so, the process for network fault 3 ends. If not, it reads the initial fault priority of network fault 3 (such as the fault priority in the default scenario and the penalty scenario) and the fault priority in the current application scenario of the mobile phone (such as the elevator scenario, game scenario, and high-speed scenario), and calculates the fault priority 3 of network fault 3 as priority 3. Then, it checks if priority 3 is greater than 0. If not, the process for network fault 3 ends. If so, it checks if there is another conflicting network fault 2, whose fault priority 2 is priority 2. If not, it executes the network switching operation corresponding to network fault 3. If so, it checks if priority 3 is greater than priority 2. If not, the process for network fault 3 ends. If so, it terminates the network switching operation corresponding to network fault 2 and executes the network switching operation corresponding to network fault 3.
[0119] In this way, when the phone detects a network fault, it first determines that no other network fault is being processed, then continues to acquire the fault priority of that network fault. If the fault priority of that network fault is determined to be greater than the preset fault priority, it acquires the priorities of other network faults on the phone. This avoids ineffective acquisition of fault priorities and saves the phone's power consumption. At the same time, after acquiring the fault priorities of all network faults, if it is determined that there is a conflicting network fault on the phone and the fault priority of that conflicting network fault is greater than the fault priority of the conflicting network fault, then that network fault is identified as the target network fault. This ensures the effectiveness of the network switching operation corresponding to the identified target network fault, thereby indirectly optimizing the communication effect after the network switch.
[0120] In addition, if the third network failure is a network failure detected before the second network failure, and the failure priority of the second network failure is higher than that of the third network failure, and the third network failure is a network failure that the phone is currently repairing, the phone will roll back the network switching operation that was already performed for the third network failure.
[0121] In this embodiment of the application, after the above-mentioned rollback of the network switching operation corresponding to the third network failure is completed, the mobile phone will be restored to the state before the network switching operation corresponding to the third network failure was performed.
[0122] Thus, if a mobile phone is repairing a third network fault that conflicts with the second network fault, and the fault priority of the third network fault is lower than that of the second network fault, the network switching operation already performed for the third network fault can be rolled back to avoid affecting subsequent network switching operations.
[0123] S203. The mobile phone switches from the first network to the second network according to the network switching operation corresponding to the target network failure.
[0124] The first network mentioned above is the network currently connected to the mobile phone, and the first network and the second network correspond to different mobile network standards.
[0125] In this embodiment, the network switching operation described above is used to repair target network faults.
[0126] It should be noted that the first network and the second network mentioned above can be any of 4G networks, 5G networks, or 6th generation mobile networks (or 6th generation wireless systems, 6G). For example, if the first network is a 4G network, the second network can be a 5G network or a 6G network; if the first network is a 5G network, the second network can be a 4G network or a 6G network. This application does not limit the specific type of network standard.
[0127] Further, optionally, in the embodiments of this application, see Figure 3 If the first preset condition is met, the phone will delete the second network fault.
[0128] The first preset condition may include any of the following: there is another network fault with the same fault type as the second network fault being processed in the electronic device; the fault priority of the second network fault is greater than the preset fault priority, and the fault priority of the second network fault is less than or equal to the fault priority of the third network fault; or the fault priority of the second network fault is less than or equal to the preset fault priority.
[0129] In this way, the mobile phone can also delete the second network fault when the first preset condition is met, reducing the impact of network faults on the mobile phone's decision on the target network fault and speeding up the efficiency of identifying the target network fault.
[0130] In the above technical solution, since the severity and urgency of different types of network faults in mobile phones vary, fault priority can characterize the severity and urgency of network faults. Fault priority is not fixed in different scenarios. Therefore, the mobile phone can combine the various information in the reference information to determine the fault priority of each network fault in the current application scenario or motion state of the electronic device. It can also correct the fault priority according to the penalty information, thereby improving the accuracy of fault priority. This allows the mobile phone to select the target network fault that needs to be repaired from multiple network faults based on the fault priority of each network fault, and switch from the currently connected first network to a second network of a different standard according to the network switching operation corresponding to the target network fault, so as to repair the target network fault and improve the communication effect after the network switching.
[0131] Optionally, in this embodiment of the application, if there is only one network fault, the fault priority of the network fault is directly calculated. If the fault priority of the network fault is greater than 0, it indicates that the network fault needs to be handled; if the calculated fault priority is less than or equal to 0, it indicates that the network fault does not need to be handled.
[0132] For example, consider a network fault as a weak 5G or 4G signal. If the electronic device is in a game scenario, according to Table 1 and Formula (1) above, the fault priority of the network fault is calculated to be 1, which is greater than 0. In this case, the network fault needs to be processed to optimize network communication. If the electronic device is in an elevator scenario, according to Table 1 and Formula (1) above, the fault priority of the network fault is calculated to be -2, which is less than 0. In this case, the network fault does not need to be processed, ensuring the stability of the current network.
[0133] Thus, by introducing a priority strategy, network handover operations are performed when the priority is greater than 0, and not when the priority is less than 0, thus avoiding invalid network handover operations and saving power consumption.
[0134] Optionally, in this embodiment of the application, after the mobile phone switches from the first network to the second network, the connection duration between the mobile phone and the second network can be adjusted according to the mobile phone's environmental information.
[0135] The environmental information includes one or more of the following: signal quality, location information of electronic devices, and application scenarios of electronic devices.
[0136] In this embodiment of the application, the aforementioned signal quality can be new radio (NR) signal quality.
[0137] In the embodiments of this application, the network conditions encountered by the mobile phone under different environmental information, and the suppression duration strategy adopted under these network conditions, may be different. As shown in Table 2 below, the network conditions encountered by the mobile phone under some environmental information, and the suppression duration strategy adopted under these network conditions, are illustrated.
[0138] Table 2
[0139]
[0140]
[0141] It should be noted that in actual use, more environmental information may be included, such as the network conditions of the mobile phone and the suppression duration strategy adopted under the network conditions. This application embodiment will not provide examples of each of these.
[0142] In this embodiment, the degree of change in environmental information is related to the duration of the connection between the mobile phone and the second network. Specifically, the greater the degree of change in environmental information, the shorter the duration of the connection between the mobile phone and the second network; the smaller the degree of change in environmental information, the longer the duration of the connection between the mobile phone and the second network.
[0143] For example, the degree of change in the aforementioned environmental information may include: the degree of change in the NR signal quality of the serving cell where the mobile phone is located, the degree of change in the NR signal quality of the neighboring cells of the serving cell where the mobile phone is located, the degree of change in the location information of the mobile phone, and the degree of change in the application scenario of the mobile phone.
[0144] Thus, after a mobile phone switches to a second network, the network communication may be affected by environmental information such as different signal quality, location information, and application scenarios. Therefore, by flexibly adjusting the connection duration with the second network based on this environmental information, better network communication can be provided for the mobile phone as much as possible.
[0145] The following describes another network switching method provided in this application embodiment, taking the first network as a 5G network and the second network as a 4G network as an example.
[0146] In one alternative implementation, the mobile phone switches from a 4G network to a 5G network when the signal quality of the first network is greater than or equal to a preset signal quality.
[0147] In this embodiment of the application, the mobile phone can determine the signal quality by the reference signal receiving power (RSRP) or the reference signal receiving quality (RSRQ).
[0148] Among them, RSRP refers to the average signal power received on all resource particles carrying the reference signal within a certain symbol. This average value is negative. The smaller the value, the worse the signal, and the larger the value, the stronger the signal. RSRQ refers to the proportion of the received effective signal in all signals. The larger the value, the stronger the signal, and the smaller the value, the weaker the signal.
[0149] Example 1, taking the preset signal quality of 5 as an example. If the phone switches from a 5G network to a 4G network and the measured 5G signal quality of the first network is 8, since 8 is greater than 5, the phone will directly switch back from the 4G network to the 5G network.
[0150] In another alternative implementation, if the signal quality of the first network is lower than the preset signal quality, the mobile phone maintains a connection with the 4G network for a first suppression period.
[0151] The suppression duration is used to indicate how to prevent a mobile phone from switching from a 4G network to a 5G network.
[0152] In this application embodiment, the first suppression duration can be a preset duration, which can be flexibly adjusted according to the actual use scenario; similarly, the preset signal quality can also be a preset value, which can also be flexibly adjusted according to the actual use scenario.
[0153] Example 2, combined with Example 1, takes the first suppression duration of 3 minutes as an example. If the phone switches from a 5G network to a 4G network and the measured 5G signal quality of the first network is 3, since 3 is less than 5, the phone will suppress the switch back from the 4G network to the 5G network within the next 3 minutes.
[0154] Thus, when the signal quality of the first network is poor, the connection to the switched 4G network is maintained to ensure the stability of the current network communication; conversely, when the signal quality of the first network is good, the connection is switched back to the 5G network to optimize the phone's network communication.
[0155] Furthermore, when the signal quality of the 5G network is lower than the preset signal quality, the mobile phone can also periodically measure the signal quality of the target neighboring cell.
[0156] Among them, the target neighboring cell is the neighboring cell of the mobile phone's service cell.
[0157] In one alternative implementation, if the signal quality of the target neighboring cell is greater than or equal to a preset signal quality, the mobile phone deletes the first suppression duration and switches from the 5G network to the 4G network.
[0158] Example 3, combined with Example 2. If the measured 5G signal quality of a neighboring cell of the current serving cell is 8, since 8 is greater than 5, the mobile phone will immediately terminate the suppression period and switch from the 4G network to the 5G network.
[0159] In another alternative implementation, if the signal quality of the target neighboring cell is less than the preset signal quality, the mobile phone increases the first suppression duration to obtain the second suppression duration.
[0160] In this embodiment of the application, the first suppression duration can be increased by adding a preset duration, which can be flexibly adjusted according to the actual use scenario.
[0161] Specifically, the signal quality of the target neighboring cell is related to the duration of the increase. For example, the higher the signal quality, the shorter the increase time, and the lower the signal quality, the longer the increase time.
[0162] Example 4, combined with Example 2, takes the example of increasing the first suppression duration by 5 minutes. If the measured 5G signal quality of the neighboring cell of the current serving cell is 3, since 3 is less than 5, the phone will increase the first suppression duration of 3 minutes by 5 minutes, resulting in a second suppression duration of 8 minutes.
[0163] Thus, since the mobile phone may be moving, and may move across regions (i.e., across the coverage area of different base stations), the mobile phone will measure the signal quality of the target neighboring cell of the current serving cell during the movement. When the signal quality of the target neighboring cell is good, it will switch back to the 5G network in a timely manner to stay in the target neighboring cell with good signal quality and optimize the mobile phone's network communication. When the signal quality of the target neighboring cell is also poor, it will continue to maintain the connection with the switched 4G network and increase the suppression time to ensure the stability of the current network communication.
[0164] Furthermore, even when the signal quality in the target neighboring cell is lower than the preset signal quality, the mobile phone can still obtain the location information of the electronic device.
[0165] In this embodiment of the application, the mobile phone can obtain location information through the location function of the built-in application. Of course, it can also obtain location information through any other feasible means. This embodiment of the application does not make any specific limitations on this.
[0166] For example, a mobile phone can obtain its current location information through an installed map application.
[0167] Optionally, in this embodiment of the application, the mobile phone can also obtain the location information of the mobile phone if the connection duration with the 4G network is less than the second suppression duration.
[0168] Thus, after the phone switches to the 4G network, if the total connection time with the 4G network is less than the calculated total suppression time, the phone's location information will continue to be acquired, ensuring the effectiveness of the acquired location information.
[0169] In one alternative implementation, the mobile phone switches from a 4G network to a 5G network when the duration of a change in location information greater than a preset change is greater than or equal to a first preset duration.
[0170] In this embodiment, the preset degree of change can be a preset value, which can be flexibly adjusted according to the actual use scenario; similarly, the first preset duration can also be a preset duration, which can also be flexibly adjusted according to the actual use scenario.
[0171] It should be noted that if the change in the phone's location information is greater than the preset change level, it indicates that the phone is in a high-speed movement state.
[0172] Example 5, combined with Example 4, takes a preset change level of 5 and a first preset duration of 30 seconds as an example. If the change level of the phone's location information is 7 and the duration is 40 seconds, then since 7 is greater than 5 and 40 is greater than 30, the phone will immediately terminate the suppression time and switch from the 4G network to the 5G network.
[0173] In another optional implementation, if the duration of the change in location information is less than or equal to a preset change is greater than or equal to a first preset duration, the mobile phone increases the second suppression duration to obtain a third suppression duration.
[0174] In this embodiment of the application, the above-mentioned increase in the second suppression duration can be an increase in a preset duration, which can be flexibly adjusted according to the actual use scenario.
[0175] Specifically, when the degree of change in the phone's location information is less than or equal to a preset degree of change, the increase in duration is related to the duration of the change. For example, the longer the duration of the change, the longer the increase in duration; the shorter the duration of the change, the shorter the increase in duration.
[0176] It should be noted that if the change in the phone's location information is less than or equal to the preset change level, it indicates that the phone is in a state of slight movement or stationary state.
[0177] Example 6, combined with Example 5, takes the example of increasing the second suppression duration by 10 minutes. If the change in the phone's location information is 3 and the duration is 40 seconds, then since 3 is less than 5 and 40 is greater than 30, the phone will increase the second suppression duration by 10 minutes based on the second suppression duration of 8 minutes, resulting in a third suppression duration of 18 minutes.
[0178] Thus, when the 5G signal in a neighboring cell is weak, but the phone is in a slightly moving or stationary state, the environmental conditions change little, and information updates on the phone are slow. Maintaining a 4G network connection is sufficient to meet the phone's network needs. Therefore, the 4G network connection is maintained and its duration is increased to ensure the stability of the current network communication. Conversely, when the 5G signal in a neighboring cell is weak, but the phone is moving at high speed, the environmental conditions change significantly, and information updates on the phone are rapid. A higher-speed network connection is needed to support these updates. Therefore, it is necessary to immediately switch back to a 5G network connection to improve the phone's network communication.
[0179] Furthermore, if the duration of a change in location information that is less than or equal to a preset change is greater than or equal to a first preset duration, the mobile phone can also obtain the application scenario of the electronic device.
[0180] The aforementioned application scenarios can include latency-sensitive scenarios and bandwidth-sensitive scenarios.
[0181] For example, such as Figure 4 As shown in (a) above, the latency-sensitive scenarios mentioned above can be online game scenarios; such as Figure 4 As shown in (b) above, the bandwidth-sensitive scenario mentioned above can be a video download scenario.
[0182] In this embodiment of the application, the mobile phone can obtain the current user scenario through the built-in application. Of course, it can also obtain the user scenario through any other feasible means. This embodiment of the application does not make any specific limitations on this.
[0183] For example, a mobile phone can use an installed network speed test application to determine whether the phone is currently in a latency-sensitive or bandwidth-sensitive scenario.
[0184] Optionally, in this embodiment of the application, the mobile phone can also obtain the application scenario of the mobile phone if the connection duration with the 4G network is less than the third suppression duration.
[0185] Thus, after the phone switches to the 4G network, if the total connection time with the 4G network is less than the calculated total suppression time, the phone's application scenarios can continue to be acquired, ensuring the effectiveness of the acquired application scenarios.
[0186] In one alternative implementation, when the application scenario is a latency-sensitive scenario, the mobile phone adds a third suppression duration to obtain a fourth suppression duration.
[0187] Among them, latency-sensitive scenarios refer to situations where the mobile phone currently requires a low-latency network connection.
[0188] In this embodiment of the application, the third suppression duration can be increased by adding a preset duration, which can be flexibly adjusted according to the actual use scenario.
[0189] Specifically, different latency requirements are related to the increased duration. For example, the lower the required latency, the longer the increased duration; the higher the required latency, the shorter the increased duration.
[0190] Example 7, combined with Example 6, takes increasing the third suppression duration by 15 minutes as an example. If the current application scenario of the mobile phone is a latency-sensitive scenario, then the mobile phone will increase the third suppression duration of 18 minutes by 15 minutes, resulting in a fourth suppression duration of 33 minutes.
[0191] In another alternative implementation, when the application scenario is bandwidth-sensitive, the mobile phone reduces the third suppression duration to obtain the fifth suppression duration.
[0192] Among them, bandwidth-sensitive scenarios refer to network connections that require high download speeds for the mobile phone.
[0193] In this embodiment of the application, reducing the third suppression duration can be done by reducing a preset duration, which can be flexibly adjusted according to the actual use scenario.
[0194] Specifically, different bandwidth requirements are related to the reduction in time. For example, the greater the bandwidth required, the longer the time reduction; the smaller the bandwidth required, the shorter the time reduction.
[0195] Example 8, combined with Example 6, takes reducing the third suppression duration by 5 minutes as an example. If the current application scenario of the mobile phone is a bandwidth-sensitive scenario, then the mobile phone reduces the third suppression duration of 18 minutes by 5 minutes, resulting in a fifth suppression duration of 13 minutes.
[0196] In this way, when the 5G signal in the neighboring cell of the serving cell is weak and the mobile phone is in a slightly moving or stationary state, the duration of the connection with the 4G network can be flexibly adjusted according to the latency and bandwidth requirements by detecting the application scenario of the mobile phone, so as to ensure the current network communication as much as possible.
[0197] Optionally, in the embodiments of this application, after calculating the fourth suppression duration or the fifth suppression duration, the mobile phone may also repeatedly execute the relevant steps of Examples 3 to 8 above if the fourth suppression duration is greater than the target duration or the fifth suppression duration is greater than the target duration, until the calculated suppression duration is less than or equal to the target duration.
[0198] The target duration is the connection time between the mobile phone and the 4G network after the phone switches from the 5G network to the 4G network.
[0199] For example, if the fourth or fifth suppression duration calculated by the mobile phone is 10 minutes, and the connection duration between the mobile phone and the 4G network is 5 minutes, the mobile phone will again execute the relevant steps of Examples 3 to 8 above in sequence, and calculate a new suppression duration. If the new suppression duration is 20 minutes, and the connection duration between the mobile phone and the 4G network is 25 minutes, the mobile phone will terminate the suppression duration and switch from the 4G network back to the 5G network.
[0200] In this embodiment of the application, the mobile phone can use a built-in dynamic calculation model to calculate the duration for which the mobile phone needs to remain on the 4G network based on signal quality, the mobile phone's location information, and the application scenario.
[0201] For example, the duration of a mobile phone's stay on a 4G network can be calculated using formula (2). Formula (2) is as follows:
[0202] T duration =T network +T movement +T scene Formula (2)
[0203] Among them, T duration T is the calculated duration of the phone's operation on a 4G network. network The adjustment time corresponding to the signal quality of neighboring cells; T movement The adjustment duration corresponding to the phone being in this motion state; T scene The adjustment duration corresponding to the current application scenario.
[0204] In this way, when the mobile phone is within the suppression period, it calculates the suppression period that needs to be maintained by cyclically monitoring the signal quality of neighboring cells, the location information of the mobile phone, and the application scenario of the mobile phone, so as to determine whether to terminate the suppression and provide better network communication in a timely manner.
[0205] The following is an overview of another network switching method provided in the embodiments of this application.
[0206] like Figure 5 As shown, after the mobile phone switches to the 4G network, if the signal quality of the serving cell is lower than the preset signal quality, the switch to the 5G network is suppressed (e.g., the switch to the 5G network is suppressed within the suppression duration 1 and timed). Then, a periodic detection timer is started to determine whether the periodic detection timer has exceeded the preset duration 1. If so, the suppression duration 1 is calculated and updated according to the signal quality of neighboring cells to obtain suppression duration 2. Then, it is determined whether suppression duration 2 has reached the timed duration. If so, the suppression is terminated. If not, the suppression duration 2 is calculated and updated according to the mobile phone's motion state to obtain suppression duration 3. Then, it is determined whether suppression duration 3 has reached the timed duration. If so, the suppression is terminated. If not, the suppression duration 3 is calculated and updated according to the mobile phone's usage scenario to obtain suppression duration 4. Then, it is determined whether suppression duration 4 has reached the timed duration. If so, the suppression is terminated. If not, the periodic detection timer is started again, and the above steps are repeated until the suppression duration reaches the timed duration.
[0207] Optionally, in this embodiment of the application, after the mobile phone switches from the first network to the second network, it can also switch from the second network to the first network if the second preset condition is met, and generate penalty information for the target network failure.
[0208] The second preset condition includes at least one of the following: the electronic device has a target network fault, or the communication quality of the electronic device is lower than the preset communication quality.
[0209] In this embodiment, the preset communication quality can be a preset value, which can be flexibly adjusted according to the actual usage scenario.
[0210] Furthermore, the mobile phone can switch from the second network to the first network and generate penalty information for the target network failure in cases such as network drop, network degradation, abnormal service functions, or abnormal call status.
[0211] It should be noted that if the mobile phone meets any of the second preset conditions, or if the mobile phone experiences network drop or low network speed, or if the service function is abnormal, or if the call status is abnormal, then the network switching operation from the first network to the second network is invalid.
[0212] The following describes another network switching method provided in this application embodiment, taking the first network as a 4G network and the second network as a 5G network as an example.
[0213] In this embodiment of the application, the aforementioned mobile phone switching mode refers to the mobile phone switching back to the 4G network from the 5G network.
[0214] Example 9, taking poor voice quality as an example of a target network fault. If the phone detects that the poor voice quality network fault still exists after switching from a 4G network to a 5G network, or if the phone automatically switches back to a 4G network from a 5G network, it indicates that the network switching operation corresponding to the poor voice quality network fault is invalid. In this case, the phone needs to switch back to a 4G network from a 5G network and generate penalty information for poor voice quality.
[0215] It should be noted that the above penalty information is only valid within the preset time period.
[0216] Example 10, combined with Example 9, takes a preset time period of 30 minutes and a fault priority of 5 for poor voice quality. If the network fault with poor voice quality persists after the phone switches from 4G to 5G, a penalty message of -3 will be generated for the poor voice quality. Then, if the network fault with poor voice quality occurs again within the next 30 minutes, the penalty message -3 will be added to the fault priority of 5, resulting in a new fault priority of 2, thus reducing the fault priority of poor voice quality.
[0217] In this way, by checking whether there are still communication abnormalities in the mobile phone or whether the target network failure still exists, the effectiveness of the network switching operation can be determined. If the failure is determined to be invalid, the phone switches back to the first network and generates penalty information to reduce the fault priority of the target network failure if it occurs again in the future. This avoids invalid network switching operations and saves the power consumption of the mobile phone.
[0218] The following is an overview of another network switching method provided in the embodiments of this application.
[0219] like Figure 6 As shown, after the mobile phone performs a network switching operation from 4G to 5G, it evaluates the network communication performance of the mobile phone and determines whether the network switching operation is effective. If it is, it returns success and terminates the process; if not, it determines whether to perform a rollback operation (such as switching back to 4G network). If it is, it performs the rollback operation and then generates penalty information; if not, it directly generates penalty information.
[0220] Other embodiments of this application provide a possible structural schematic diagram of an electronic device. For example... Figure 7 As shown, the electronic device 700 includes a processing unit 710 and a storage unit 720.
[0221] The processing unit 710 is used to control and manage the operation of the electronic device 700. The storage unit 720 is used to store the program code and data of the electronic device 700. The processing unit 710 calls the program code stored in the storage unit 720 to execute the various steps in the above method embodiments.
[0222] Of course, the unit modules in the aforementioned electronic device 700 include, but are not limited to, the processing unit 710 and the storage unit 720. For example, the electronic device 700 may also include a display unit, a communication unit, a power supply unit, etc. The display unit is used to display the user interface of the electronic device 700. The communication unit is used for the electronic device 700 to communicate with other electronic devices; for example, the electronic device 700 receives path trajectory information and motion information from other devices through the communication unit. The power supply unit is used to supply power to the electronic device 700.
[0223] The processing unit 710 can be a processor or controller, such as a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The storage unit 720 can be a memory. The display unit can be a display screen, etc.
[0224] For example, processing unit 710 is a processor (such as...) Figure 1 The processor 110 shown can be a memory (such as a storage unit 720). Figure 1 The internal memory 121 shown can be a display screen (such as...). Figure 1 The display screen 140 shown is an example of an electronic device 700 provided in this application embodiment. Figure 1 The electronic device 100 shown above. The processor, memory, display screen, etc., can be connected together, for example, via a bus. The processor calls program code stored in the memory to execute the various steps in the above method embodiments.
[0225] This application also provides a chip system that can be applied to the electronic devices described in the foregoing embodiments. For example... Figure 8As shown, the chip system includes multiple processors 801 and multiple interface circuits 802. The processors 801 can be the processors in the aforementioned electronic device. The processors 801 and interface circuits 802 are interconnected via lines. The processors 801 can receive and execute computer instructions from the memory of the aforementioned electronic device through the interface circuits 802. When the computer instructions are executed by the processors 801, the electronic device can perform the various steps in the above embodiments. Of course, the chip system may also include other discrete components, and this application embodiment does not specifically limit this.
[0226] This application also provides a computer-readable storage medium for storing computer instructions for operation of the aforementioned electronic device (such as a mobile phone).
[0227] This application also provides a computer program product, including computer instructions for running the aforementioned electronic device (such as a mobile phone).
[0228] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0229] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0230] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0231] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0232] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0233] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A network handover method, characterized in that, Applied to electronic devices, the method includes: The fault priority of each network fault among multiple network faults is obtained based on reference information, which includes the fault type of the network fault, penalty information, and one or more of the motion state or application scenario of the electronic device; for the first network fault among the multiple network faults, the penalty information is obtained after the previous network switching operation corresponding to the first network fault failed, and the penalty information is used to reduce the fault priority of the first network fault within a preset time period. Based on the fault priority of each network fault, the target network fault is determined from the plurality of network faults; According to the network switching operation corresponding to the target network failure, the device switches from the first network to the second network. The network switching operation is used to repair the target network failure. The first network is the network currently connected to the electronic device. The first network and the second network correspond to different mobile network standards.
2. The method according to claim 1, characterized in that, The step of obtaining the fault priority of each network fault among multiple current network faults based on reference information includes: A second network failure was detected; If the electronic device fails to repair other network faults of the same fault type as the second network fault, the fault priority of the second network fault is obtained; If the fault priority of the second network fault is greater than the preset fault priority, the fault priority of the third network fault is obtained. The third network fault is the network fault currently existing in the electronic device. The fault type of the third network fault is different from that of the second network fault. The multiple network faults include the second network fault and the third network fault. The step of determining the target network fault from the plurality of network faults based on the fault priority of each network fault includes: If the fault priority of the second network fault is greater than that of the third network fault, the third network fault is deleted, and the second network fault is identified as the target network fault. The network switching operation corresponding to the third network fault is the opposite of the network switching operation corresponding to the second network fault, and the fault priority of the third network fault is greater than the preset fault priority.
3. The method according to claim 2, characterized in that, The third network fault is a network fault detected prior to the second network fault, and the method further includes: If the fault priority of the second network fault is greater than that of the third network fault, and the third network fault is a network fault that the electronic device is currently repairing, roll back the network switching operation that has already been performed corresponding to the third network fault.
4. The method according to claim 3, characterized in that, The method further includes: If the electronic device meets the first preset condition, the second network fault is deleted; The first preset condition includes any one of the following: The electronic device is repairing other network faults of the same type as the second network fault; The fault priority of the second network fault is greater than the preset fault priority, and the fault priority of the second network fault is less than or equal to the fault priority of the third network fault. The fault priority of the second network fault is less than or equal to the preset fault priority.
5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the fault priority of each network fault among multiple current network faults based on reference information includes: For each of the multiple network faults, the initial fault priority of the network fault in the default scenario is determined based on the fault type and penalty information of the network fault. The fault priority of the network fault is determined based on the motion state of the electronic device, the application scenario, and the initial fault priority.
6. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the fault priority of each network fault among multiple current network faults based on reference information includes: For each of the plurality of network faults, the fault priority of the network fault is calculated based on the fault parameters corresponding to each type of information in the reference information of the network fault. Alternatively, the fault parameters corresponding to each type of information in the network fault reference information can be input into the decision model to output the fault priority of the network fault. The fault parameters are either preset parameters or parameters obtained through machine learning training.
7. The method according to claim 1, characterized in that, After switching from the first network to the second network according to the network switching operation corresponding to the target network failure, the method further includes: Based on the environmental information of the electronic device, the connection duration between the electronic device and the second network is adjusted. The environmental information includes one or more of the following: signal quality, location information of the electronic device, and application scenario of the electronic device.
8. The method according to claim 7, characterized in that, The step of adjusting the connection duration between the electronic device and the second network based on environmental change information of the electronic device includes: If the signal quality of the first network is greater than or equal to a preset signal quality, switch from the second network to the first network; If the signal quality of the first network is less than the preset signal quality, the connection with the second network is maintained for a first suppression duration, which is used to indicate the period during which the electronic device is prevented from switching from the second network to the first network.
9. The method according to claim 8, characterized in that, When the signal quality of the first network is less than a preset signal quality, the method further includes: Periodically measure the signal quality of the target neighboring cell, where the target neighboring cell is a neighboring cell of the serving cell of the electronic device; If the signal quality of the target neighboring cell is greater than or equal to the preset signal quality, the first suppression duration is deleted, and the network is switched from the second network to the first network. If the signal quality of the target neighboring cell is less than the preset signal quality, the first suppression duration is increased to obtain a second suppression duration.
10. The method according to claim 9, characterized in that, If the signal quality of the target neighboring cell is less than the preset signal quality, the method further includes: The location information of the electronic device is obtained. If the duration of the change in the location information of the electronic device is greater than or equal to the first preset duration, the second suppression duration is deleted, and the device is switched from the second network to the first network. If the duration of the change in the location information of the electronic device being less than or equal to the preset change is greater than or equal to the first preset duration, the second suppression duration is increased to obtain a third suppression duration.
11. The method according to claim 10, characterized in that, When the duration of the change in the location information of the electronic device being less than or equal to the preset change duration is greater than or equal to the first preset duration, the method further includes: The application scenario of the electronic device is obtained. If the application scenario of the electronic device is a time-delay sensitive scenario, the third suppression duration is increased to obtain the fourth suppression duration. When the application scenario of the electronic device is a bandwidth-sensitive scenario, the third suppression duration is reduced to obtain the fifth suppression duration.
12. The method according to claim 1, characterized in that, After switching from the first network to the second network according to the network switching operation corresponding to the target network failure, the method further includes: When the electronic device meets the second preset condition, it switches from the second network to the first network and generates penalty information for the target network failure. The second preset condition includes at least one of the following: The electronic device has the target network fault; The communication quality of the electronic device is lower than the preset communication quality.
13. An electronic device, characterized in that, include: Processor, display, and memory; The memory stores one or more computer programs, the one or more computer programs including instructions that, when executed by the electronic device, cause the electronic device to perform the network switching method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed on an electronic device, cause the electronic device to perform the network switching method as described in any one of claims 1-12.
15. A computer program product, characterized in that, Includes computer instructions that, when executed on an electronic device, implement the network switching method as described in any one of claims 1-12.