CN116667875B - Switching method and device of internet access and terminal equipment - Google Patents

Switching method and device of internet access and terminal equipment Download PDF

Info

Publication number
CN116667875B
CN116667875B CN202211204134.6A CN202211204134A CN116667875B CN 116667875 B CN116667875 B CN 116667875B CN 202211204134 A CN202211204134 A CN 202211204134A CN 116667875 B CN116667875 B CN 116667875B
Authority
CN
China
Prior art keywords
connection
network channel
unprocessed
network
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211204134.6A
Other languages
Chinese (zh)
Other versions
CN116667875A (en
Inventor
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211204134.6A priority Critical patent/CN116667875B/en
Publication of CN116667875A publication Critical patent/CN116667875A/en
Application granted granted Critical
Publication of CN116667875B publication Critical patent/CN116667875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits
    • H04B1/401Circuits for selecting or indicating operating mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a method, a device and a terminal device for switching a network access, wherein in the method for switching the network access, after a second network channel is detected to be switched from a disconnected state to a connected state, a timer is started, a connection currently established by the terminal device 100 is traversed before the timing duration of the timer is reached, and if a first unprocessed connection exists in the currently established connection, connection state information of the first unprocessed connection is acquired. If the first untreated connection is in an idle state according to the connection state information of the first untreated connection, reestablishing the first untreated connection on the second network channel, and recording the network channel currently used by the first untreated connection as the second network channel, so that the time consumption from the next data request to the response can be reduced after the internet surfing channels of small-sized terminal equipment such as wearable equipment are switched.

Description

Switching method and device of internet access and terminal equipment
Technical Field
The embodiment of the application relates to the technical field of intelligent terminals, in particular to a switching method and device of a network access and terminal equipment.
Background
If the small-sized terminal equipment such as the wearable equipment has the networking capability of a Modem (Modem) and the networking capability of a Bluetooth proxy, the small-sized terminal equipment can power down the Modem when the Bluetooth connection is adopted and power up the Modem when the Bluetooth connection is disconnected due to the consideration of power consumption. The process involves switching between two internet surfing modules, which may cause failure in data transmission and reception, and this problem is more pronounced due to the lower processing performance of the small terminal device.
Specifically, the switching process occurs in two internet channels of Modem and bluetooth, the time consumption from the next data request to the response increases, and in particular, under an application scenario, for example, probability jamming may occur due to the switching of the internet channels in the music playing process, and the time consumption for data loading is increased when the network scenario such as music song list is acquired again.
Disclosure of Invention
The embodiment of the application provides a method, a device and a terminal device for switching a surfing access, and also provides a computer readable storage medium so as to reduce time consumption from next data request to response after switching surfing channels of small terminal devices such as wearable devices.
In a first aspect, an embodiment of the present application provides a method for switching a network access, which is applied to a terminal device, where the terminal device includes a wireless communication module and a mobile communication module, the terminal device establishes a first network channel through the mobile communication module, and the terminal device establishes a second network channel through the wireless communication module; the network channel currently adopted by the terminal equipment is a first network channel, the second network channel is currently in a disconnected state, and the method comprises the following steps: starting a timer after detecting that the second network channel is switched from the disconnected state to the connected state; traversing the connection currently established by the terminal equipment before the timing duration of the timer arrives; if a first unprocessed connection exists in the currently established connection, acquiring connection state information of the first unprocessed connection; and if the first unprocessed connection is determined to be in an idle state according to the connection state information of the first unprocessed connection, reconstructing the first unprocessed connection on the second network channel, and recording the network channel currently used by the first unprocessed connection as the second network channel.
In one possible implementation manner, after traversing the connection currently established by the terminal device, the method further includes: and if the first unprocessed connection does not exist in the currently established connection and the delay switching list stored in the terminal equipment is empty, performing power-down processing on the mobile communication module.
In one possible implementation manner, after the starting the timer, the method further includes: and after the timing duration of the timer is up, powering down the mobile communication module.
In one possible implementation manner, after the obtaining the connection status information of the first unprocessed connection, the method further includes: and if the first unprocessed connection is determined to be in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection, inserting the first unprocessed connection into a delay switching list stored by the terminal equipment.
In one possible implementation manner, after the inserting the first unprocessed connection into the delay switch list stored by the terminal device, the method further includes: receiving a response returned by the network side through the first unprocessed connection; the response is a response of the network side to a network request sent by the terminal equipment through the first unprocessed connection; judging whether the network request is successful or not according to the response returned by the network side; if the network request is successful, judging whether the first unprocessed connection is in the delay switching list; reconstructing the first unprocessed connection on the second network channel if the first unprocessed connection is in the delay switching list, and recording the network channel currently used by the first unprocessed connection as the second network channel; and deleting the first unprocessed connection from the delay switching list.
In one possible implementation manner, after the determining whether the network request is successful according to the response returned by the network side, the method further includes: if the network request is unsuccessful, judging whether a network channel currently adopted by the terminal equipment is switched to the second network channel; if the network channel currently adopted by the terminal equipment is switched to the second network channel, reconnecting the first unprocessed connection with the network side by using the second network channel; and retransmitting the network request through the first unprocessed connection after the first unprocessed connection is successfully reconnected with the network side.
In one possible implementation manner, after the reconstructing the first unprocessed connection on the second network channel and recording the network channel currently used by the first unprocessed connection as the second network channel, the method further includes: after detecting that the second network channel is switched from a connection state to a disconnection state and the mobile communication module is in a normal working state, traversing the connection which is currently established by the terminal equipment; if a second unprocessed connection exists in the currently established connection, judging whether a network channel used by the second unprocessed connection is a first network channel or not; and if the network channel used by the second unprocessed connection is not the first network channel, reconstructing the second unprocessed connection on the first network channel, and recording the network channel currently used by the second unprocessed connection as the first network channel.
In a second aspect, an embodiment of the present application provides a switching device for a network access, where the device is included in a terminal device, and the device has a function of implementing the behavior of the terminal device in the first aspect and possible implementations of the first aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. For example, a start module, a traverse module, an acquisition module, a reconstruction module, and a recording module.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a wireless communication module and a mobile communication module, the terminal device establishes a first network channel through the mobile communication module, and the terminal device establishes a second network channel through the wireless communication module; the network channel currently adopted by the terminal equipment is a first network channel, the second network channel is currently in a disconnected state, and the terminal equipment comprises: one or more processors; a memory; a plurality of applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions, which when executed by the terminal device, cause the terminal device to perform the steps of: starting a timer after detecting that the second network channel is switched from the disconnected state to the connected state; traversing the connection currently established by the terminal equipment before the timing duration of the timer arrives; if a first unprocessed connection exists in the currently established connection, acquiring connection state information of the first unprocessed connection; and if the first unprocessed connection is determined to be in an idle state according to the connection state information of the first unprocessed connection, reconstructing the first unprocessed connection on the second network channel, and recording the network channel currently used by the first unprocessed connection as the second network channel.
In one possible implementation manner, the instructions, when executed by the terminal device, cause the terminal device to perform the step of traversing the connection currently established by the terminal device, further perform the following steps: and if the first unprocessed connection does not exist in the currently established connection and the delay switching list stored in the terminal equipment is empty, performing power-down processing on the mobile communication module.
In one possible implementation, the instructions, when executed by the terminal device, cause the terminal device to perform the step of starting the timer, further perform the following steps: and after the timing duration of the timer is up, powering down the mobile communication module.
In one possible implementation manner, after the instructions, when executed by the terminal device, cause the terminal device to perform the step of obtaining the connection status information of the first unprocessed connection, the following steps are further performed: and if the first unprocessed connection is determined to be in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection, inserting the first unprocessed connection into a delay switching list stored by the terminal equipment.
In one possible implementation manner, the instructions, when executed by the terminal device, cause the terminal device to perform the step of inserting the first unprocessed connection into the delayed handover list stored by the terminal device, further perform the following steps: receiving a response returned by the network side through the first unprocessed connection; the response is a response of the network side to a network request sent by the terminal equipment through the first unprocessed connection; judging whether the network request is successful or not according to the response returned by the network side; if the network request is successful, judging whether the first unprocessed connection is in the delay switching list; reconstructing the first unprocessed connection on the second network channel if the first unprocessed connection is in the delay switching list, and recording the network channel currently used by the first unprocessed connection as the second network channel; and deleting the first unprocessed connection from the delay switching list.
In one possible implementation manner, after the instructions, when executed by the terminal device, cause the terminal device to perform the step of determining whether the network request is successful according to the response returned by the network side, the following steps are further performed: if the network request is unsuccessful, judging whether a network channel currently adopted by the terminal equipment is switched to the second network channel; if the network channel currently adopted by the terminal equipment is switched to the second network channel, reconnecting the first unprocessed connection with the network side by using the second network channel; and retransmitting the network request through the first unprocessed connection after the first unprocessed connection is successfully reconnected with the network side.
In one possible implementation manner, after the step of causing the terminal device to execute the step of reestablishing the first unprocessed connection on the second network channel and recording the network channel currently used by the first unprocessed connection as the second network channel, the following steps are further executed: after detecting that the second network channel is switched from a connection state to a disconnection state and the mobile communication module is in a normal working state, traversing the connection which is currently established by the terminal equipment; if a second unprocessed connection exists in the currently established connection, judging whether a network channel used by the second unprocessed connection is a first network channel or not; and if the network channel used by the second unprocessed connection is not the first network channel, reconstructing the second unprocessed connection on the first network channel, and recording the network channel currently used by the second unprocessed connection as the first network channel.
It should be understood that, the second aspect and the third aspect of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding possible implementation manner are similar, and are not repeated.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having a computer program stored therein, which when run on a computer, causes the computer to perform the method provided in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program for performing the method provided in the first aspect, when the computer program is executed by a computer.
In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 2 is a schematic diagram of state switching of two internet access paths of bluetooth and Modem according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a linked list according to one embodiment of the present application;
fig. 4 is a flowchart of a method for switching a network access according to an embodiment of the present application;
fig. 5 is a flowchart of a method for switching a network access according to another embodiment of the present application;
fig. 6 is a flowchart of a method for switching a network access according to still another embodiment of the present disclosure;
Fig. 7 is a schematic structural diagram of a terminal device according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to still another embodiment of the present application.
Detailed Description
The terminology used in the description section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
In the prior art, in small terminal devices such as wearable devices, after two internet surfing channels of a Modem and a bluetooth are switched, the time consumption from next data request to response is increased. This is because at the time of a network channel switch, some transmission control protocol (transmission control protocol, TCP) connections may already be established, and the state of these connections may be in an inactive state during the data transceiving and connection-maintaining phases. These connections are equivalent to having been disconnected after the network channel is switched, but because there is no transmission and reception of the data packet at present, no connection interruption is perceived, and the connection interruption is not perceived until the next time of re-transmitting and receiving data, at this time, the reconnection process is performed, which has a problem of increasing the time consumption.
The embodiment of the application provides a switching method of a surfing access, which is used for carrying out the following processing:
1) After Bluetooth connection, the Modem is powered down to perform delayed power-down processing, and switching of a network connection channel is performed in a delay process;
2) And in the process of powering on the Modem after the Bluetooth disconnection, after the Modem is powered on normally, the connection adopting the Bluetooth channel is reconnected immediately so as to reduce the time consumption from the next data request to the response.
The method for switching the internet access provided by the embodiment of the application can be applied to terminal equipment, wherein the terminal equipment can be small-sized terminal equipment such as wearable equipment or personal digital assistants (personal digital assistant, PDA) and the like; for example, the wearable device may be a smart watch, glasses, or a bracelet.
For example, fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application, and as shown in fig. 1, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, DCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the terminal device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the terminal device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of terminal device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal device 100 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the terminal device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record video in various encoding formats, for example: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the terminal device 100 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (such as audio data, phonebook, etc.) created during use of the terminal device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or to handsfree talk through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal device 100 receives a call or voice message, it is possible to receive voice by approaching the receiver 170B to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may be further provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, implement directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The terminal device 100 determines the intensity of the pressure according to the change of the capacitance. When a touch operation is applied to the display 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects the angle of the shake of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shake of the terminal device 100 by the reverse motion, thereby realizing anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the terminal device 100 is a folder, the terminal device 100 may detect opening and closing of the folder according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the terminal device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The terminal device 100 may measure the distance by infrared or laser. In some embodiments, the terminal device 100 may range using the distance sensor 180F to achieve fast focusing.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object in the vicinity of the terminal device 100. When insufficient reflected light is detected, the terminal device 100 may determine that there is no object in the vicinity of the terminal device 100. The terminal device 100 can detect that the user holds the terminal device 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The terminal device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The terminal device 100 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, the terminal device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 performs a reduction in the performance of a processor located near the temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the terminal device 100 heats the battery 142 to avoid the low temperature causing the terminal device 100 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the terminal device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The terminal device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the terminal device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
For easy understanding, the following embodiments of the present application will take a terminal device having a structure shown in fig. 1 as an example, and specifically describe a method for switching a network access provided in the embodiments of the present application in conjunction with a drawing and an application scenario.
The method for switching the internet access provided by the embodiment of the application may include the following two processes in states:
1) Bluetooth disconnection state: in this state, the terminal device 100 uses the Modem path to access the internet. After bluetooth connection, the Modem cannot immediately power down, and needs to delay power down, and in the delay power down process, the terminal device 100 needs to switch the network path of the current connection.
2) Bluetooth connection state: in this state, the terminal device 100 uses the bluetooth to access the internet, and the Modem is in the powered-down state. When the Bluetooth is disconnected, the Modem is powered on immediately, and in the process of powering on the Modem, the terminal equipment 100 does not have a network for use, but once the Modem works normally, the terminal equipment 100 immediately switches the current existing connection, so that the time window that no network is available at present is reduced, and the probability of failure of the subsequent request is reduced.
Fig. 2 is a schematic diagram of state switching of two internet access paths of bluetooth and Modem according to an embodiment of the present application, fig. 2 shows all states of the two internet access paths in the terminal device 100, and the state switching shown in fig. 2 is triggered by different events respectively.
1) State 1- > state 2.
In this case, after the bluetooth connection, the Modem needs to be powered down to reduce power consumption, in order to avoid all failures of the currently processed request caused by sudden power down, the terminal device 100 adopts a delayed power down policy, sets a 30 second timeout timer, and switches the network access channel to the established connection in the delayed power down process, thereby ensuring that the current connection request is established from the bluetooth channel after the Modem is actually powered down. After all established connections are successfully switched, the terminal device 100 notifies the Modem to power down immediately.
2) State 2- > state 3.
If after the 30 second timer times out, there is still some connection not established, which indicates that there is a problem in the current network state or server state, the probability of this scenario itself is low, and in order to avoid the power consumption of the power-up process of the Modem, the terminal device 100 also notifies the Modem to power down immediately.
3) State 3- > State 4- > State 5
The switch from state 3 to state 4 is triggered by the bluetooth disconnection, in which state the Modem needs to be powered on immediately, and in this state, the terminal device 100 does not have the network connection capability at present, and the period of time from the Modem power-on to the normal operation will definitely fail if there is data transmission, but from the aspect of probability, the data transmission and reception will not always exist, and at this time, the method for reducing the probability of data transmission and reception errors is to shorten the time window without the network connection capability as much as possible. After the state 4 is switched to the state 5, when the Modem has the internet surfing capability, the terminal device 100 immediately switches all the connections currently established through the bluetooth channel to the Modem channel.
In the embodiment of the present application, the connection status information (ConnectionInfo) of each connection established by the terminal device 100 may include the attributes shown in table 1.
TABLE 1
For established connections, the terminal device 100 may use a linked list to manage, and facilitate traversing the state of each connection when switching network channels. FIG. 3 is a schematic diagram of a linked list according to one embodiment of the present application.
The following describes a method for switching a network access according to an embodiment of the present application with reference to a flowchart.
Fig. 4 is a flowchart of a method for switching a network access according to an embodiment of the present application, where the method for switching a network access according to the embodiment may be applied to a terminal device 100, and as described above, the terminal device 100 may include a wireless communication module 160 and a mobile communication module 150, the terminal device 100 establishes a first network channel through the mobile communication module 150, and the terminal device 100 establishes a second network channel through the wireless communication module 160; the network channel currently adopted by the terminal device 100 is a first network channel, and the second network channel is currently in a disconnected state. In this embodiment, the mobile communication module 150 may be connected to the network through a Modem, and the wireless communication module 160 may be connected to the network through bluetooth.
As shown in fig. 4, the method for switching the internet access may include:
step 401, starting a timer after detecting that the second network channel is switched from the disconnected state to the connected state.
Step 402, traversing the connection currently established by the terminal device 100 before the timing duration of the timer arrives. Step 403 or step 405 is then performed.
The timing duration of the timer may be set automatically according to system performance and/or implementation requirements during specific implementation, and in this embodiment, the length of the timing duration of the timer is not limited, for example, the timing duration of the timer may be 30 seconds.
In step 403, if there is a first unprocessed connection in the currently established connection, connection status information of the first unprocessed connection is obtained.
If it is determined that the first unprocessed connection is in the idle state according to the connection state information of the first unprocessed connection, the first unprocessed connection is rebuilt on the second network channel, and the network channel currently used by the first unprocessed connection is recorded as the second network channel.
The connection status information of the first unprocessed connection may be as shown in table 1. As can be seen from table 1, the connection status information includes currentStatus, and the terminal device 100 may determine whether the first unprocessed connection is in the idle state according to the currentStatus in the connection status information, specifically, when the value of currentStatus is "0", the terminal device 100 may determine that the first unprocessed connection is in the idle state.
In this embodiment, recording the network channel currently used by the first unprocessed connection as the second network channel may be: the value of useChannel in the connection status information of the first unprocessed connection is set to "0".
In step 405, if there is no first unprocessed connection in the currently established connection and the delay switching list stored in the terminal device 100 is empty, the mobile communication module is subjected to power-down processing.
Specifically, the powering-down processing of the mobile communication module may be: and powering down the Modem.
In addition, in this embodiment, after step 401, after the timing duration of the timer arrives, the terminal device 100 may also perform power-down processing on the mobile communication module.
In the above-mentioned switching method of the internet access, after detecting that the second network channel is switched from the disconnected state to the connected state, starting a timer, traversing the connection currently established by the terminal device 100 before the timing duration of the timer is reached, and if a first unprocessed connection exists in the currently established connection, acquiring connection state information of the first unprocessed connection. If the first untreated connection is in an idle state according to the connection state information of the first untreated connection, reestablishing the first untreated connection on the second network channel, and recording the network channel currently used by the first untreated connection as the second network channel, so that the time consumption from the next data request to the response can be reduced after the internet surfing channels of small-sized terminal equipment such as wearable equipment are switched.
Fig. 5 is a flowchart of a method for switching a network access according to another embodiment of the present application, as shown in fig. 5, in the embodiment shown in fig. 4 of the present application, after step 403, the method may further include:
in step 501, if it is determined that the first unprocessed connection is in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection, the first unprocessed connection is inserted into the delay switching list stored in the terminal device 100. Step 502 is then performed.
Specifically, referring to table 1, when the value of currentStatus in the connection state information of the first unprocessed connection is "1" or "2", the terminal device 100 may determine that the first unprocessed connection is in a state of transmitting or receiving data, and thereafter, the terminal device 100 may insert the first unprocessed connection into the delay switching list held by the terminal device 100.
Step 502, a response returned by the network side is received over the first unprocessed connection.
Wherein the above-mentioned response is a response of the network side to the network request sent by the terminal device 100 through the first unprocessed connection. The network request may be, for example, a hypertext transfer protocol (hyper text transfer protocol, HTTP) network request.
Step 503, determining whether the network request is successful according to the response returned by the network side. Step 504 or step 507 is then performed.
Step 504, if the network request is successful, determining whether the first unprocessed connection is in the delay switch list.
In step 505, if the first unprocessed connection is in the delay switch list, the first unprocessed connection is rebuilt on the second network channel, and the network channel currently used by the first unprocessed connection is recorded as the second network channel.
Specifically, recording the network channel currently used by the first unprocessed connection as the second network channel may be: the value of useChannel in the connection status information of the first unprocessed connection is set to "0".
Step 506, deleting the first unprocessed connection from the delay switch list.
In step 507, if the network request is unsuccessful, it is determined whether the network channel currently adopted by the terminal device 100 has been switched to the second network channel.
In step 508, if the network channel currently adopted by the terminal device 100 has been switched to the second network channel, the first unprocessed connection is reconnected to the network side using the second network channel.
Specifically, reconnecting the first unprocessed connection with the network side using the second network channel may be: reconstructing the first unprocessed connection on the second network channel.
Step 509, after the first unprocessed connection is successfully reconnected to the network side, retransmitting the network request through the first unprocessed connection.
That is, when the network is transmitting or receiving data, connection switching cannot be performed, and judgment needs to be started again after an error occurs in response to return or timeout.
1) If the network request is successful, in addition to returning the result to the application layer, the terminal device 100 also synchronously triggers a detection to see if the current connection is in the delayed switching list, if so, the direct start switching logic switches the connection on the bluetooth path, and after the switching is completed, the current connection is removed from the delayed switching list.
2) If the network request fails, whether the current network channel is switched or not needs to be detected, the scene mainly occurs in the situation that the current connection is not switched in time when the timer is overtime, the Modem is powered down, the current request failure is probably caused by switching, the bottom layer needs to be reconnected once, and the network request is repeated once, so that the influence of the powering down of the Modem on the upper layer application is minimized.
In the embodiments shown in fig. 4 to 5, the processing flow of the terminal device 100 in the state 1- > state 2- > state 3 shown in fig. 2 is described, and in the embodiment shown in fig. 6, the processing flow of the terminal device 100 in the state 3- > state 4 shown in fig. 2 is described.
Fig. 6 is a flowchart of a method for switching a network access according to still another embodiment of the present disclosure, as shown in fig. 6, in the embodiment shown in fig. 4 of the present disclosure, after step 404, the method may further include:
in step 601, after detecting that the second network channel is switched from the connected state to the disconnected state and the mobile communication module is in the normal working state, traversing the connection currently established by the terminal device 100.
In step 602, if there is a second unprocessed connection in the currently established connection, it is determined whether the network channel used by the second unprocessed connection is the first network channel.
If the network channel used by the second unprocessed connection is not the first network channel, step 603, reestablishing the second unprocessed connection on the first network channel and recording the network channel currently used by the second unprocessed connection as the first network channel.
Specifically, recording the network channel currently used by the second unprocessed connection as the first network channel may be: the value of useChannel in the connection status information of the second unprocessed connection is set to "1".
The present embodiment describes the processing flow of the terminal device 100 from state 3 to state 4, which is required to switch from traversal to traversal because all connections need to be reconnected. Thus, all reestablishing this time window from bluetooth disconnected to all connections is the network unavailable time window, and the smaller this window, the shorter the network unavailable time, and the higher the availability of the overall system.
It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and embodiments of the present application may also perform other operations or variations of various operations. Furthermore, the various steps may be performed in a different order presented in the above embodiments, and it is possible that not all of the operations in the above embodiments are performed.
It will be appreciated that the terminal device, in order to achieve the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
In this embodiment, the terminal device may be divided into functional modules according to the above embodiment of the method, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
Fig. 7 is a schematic structural diagram of a terminal device according to another embodiment of the present application, where each functional module is divided by corresponding each function, fig. 7 shows a possible schematic structural diagram of a terminal device 700 related to the foregoing embodiment, where the terminal device 700 includes a wireless communication module and a mobile communication module, and the terminal device 700 establishes a first network channel through the mobile communication module and establishes a second network channel through the wireless communication module; the network channel currently adopted by the terminal device 700 is a first network channel, and the second network channel is currently in a disconnected state. Note that the wireless communication module and the mobile communication module are not shown in fig. 7.
As shown in fig. 7, the terminal device 700 may include: a starting module 701, a traversing module 702, an acquiring module 703, a reconstructing module 704 and a recording module 705;
wherein, the starting module 701 is configured to start a timer after detecting that the second network channel is switched from the disconnected state to the connected state;
a traversing module 702, configured to traverse the connection currently established by the terminal device 700 before the timing duration of the timer arrives;
an obtaining module 703, configured to obtain connection status information of a first unprocessed connection when the first unprocessed connection exists in the currently established connection;
A reestablishing module 704, configured to reestablish the first unprocessed connection on the second network channel when it is determined that the first unprocessed connection is in the idle state according to the connection state information of the first unprocessed connection;
a recording module 705, configured to record a currently used network channel of the first unprocessed connection as the second network channel.
It should be noted that, all relevant contents of each step related to the method embodiment shown in fig. 4 in the present specification may be referred to the functional description of the corresponding functional module, which is not repeated herein.
The terminal device 700 provided in this embodiment is configured to perform the method for switching the internet access provided in the embodiment shown in fig. 4 of this specification, so that the same effects as those of the method described above can be achieved.
Fig. 8 is a schematic structural diagram of a terminal device according to still another embodiment of the present application, and compared to the terminal device 700 shown in fig. 7, the terminal device 700 shown in fig. 8 may further include:
a power-down module 706, configured to perform power-down processing on the mobile communication module after the traversing module 702 traverses the connection currently established by the terminal device, if there is no first unprocessed connection in the connection currently established, and the delay switching list stored in the terminal device is empty.
Further, the power-down module 706 is further configured to perform a power-down process on the mobile communication module after the timing duration of the timer reaches after the starting module 701 starts the timer.
In this embodiment, the terminal device 700 may further include: an insert module 707;
an inserting module 707, configured to insert the first unprocessed connection into the delay switching list stored in the terminal device when it is determined that the first unprocessed connection is in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection after the obtaining module 703 obtains the connection state information of the first unprocessed connection.
Further, the terminal device 700 may further include: a receiving module 708, a judging module 709, and a deleting module 710;
a receiving module 708, configured to receive, after the inserting module 707 inserts the first unprocessed connection into the delay switching list stored in the terminal device, a response returned by the network side through the first unprocessed connection; the response is a response of the network side to a network request sent by the terminal equipment through the first unprocessed connection;
a judging module 709, configured to judge whether the network request is successful according to a response returned by the network side; when the network request is successful, judging whether the first unprocessed connection is in the delay switching list or not;
A rebuilding module 704, configured to rebuild the first unprocessed connection on the second network channel when the first unprocessed connection is in the delay switching list;
the recording module 705 is further configured to record a network channel currently used by the first unprocessed connection as a second network channel;
a deleting module 710, configured to delete the first unprocessed connection from the delay switching list.
Further, the terminal device 700 may further include: reconnection module 711;
a judging module 709, configured to judge whether a network channel currently adopted by the terminal device has been switched to the second network channel if the network request is unsuccessful after judging whether the network request is successful according to the response returned by the network side;
a reconnection module 711, configured to reconnect the first unprocessed connection to the network side using the second network channel when the network channel currently adopted by the terminal device has been switched to the second network channel; and retransmitting the network request through the first unprocessed connection after the first unprocessed connection is successfully reconnected with the network side.
Further, the terminal device 700 may further include: a judgment module 709;
the traversing module 702 is further configured to, after the recording module 705 records that the network channel currently used by the first unprocessed connection is the second network channel, detect that the second network channel is changed from the connected state to the disconnected state, and after the mobile communication module is in the normal working state, traverse the connection currently established by the terminal device;
A judging module 709, configured to judge whether a network channel used by the second unprocessed connection is the first network channel when the second unprocessed connection exists in the currently established connection;
a reestablishing module 704, configured to reestablish the second unprocessed connection on the first network channel when the network channel used by the second unprocessed connection is not the first network channel;
a recording module 705, configured to record a currently used network channel of the second unprocessed connection as the first network channel.
It should be noted that, all relevant contents of each step related to the method embodiments shown in fig. 4 to fig. 6 in the present specification may be referred to the functional descriptions of the corresponding functional modules, which are not repeated herein.
The terminal device 700 provided in this embodiment is configured to perform the method for switching the internet access provided in the embodiments shown in fig. 4 to 6 of this specification, so that the same effects as those of the above method can be achieved.
It should be understood that the terminal device 700 may correspond to the terminal device 100 shown in fig. 1. The functions of the starting module 701, the traversing module 702, the acquiring module 703, the reconstructing module 704, the recording module 705, the powering-down module 706, the inserting module 707, the judging module 709, the deleting module 710 and the reconnecting module 711 may be implemented by the processor 110 in the terminal device 100 shown in fig. 1; the functions of the receiving module 708 may be implemented by the processor 110, the antenna 1 and the mobile communication module 150 in the terminal device 100 shown in fig. 1, and/or by the processor 110, the antenna 2 and the wireless communication module 160.
In case of employing an integrated unit, the terminal device 700 may include a processing module, a storage module, and a communication module.
The processing module may be configured to control and manage the actions of the terminal device 700, for example, may be configured to support the terminal device 700 to perform the steps performed by the starting module 701, the traversing module 702, the obtaining module 703, the rebuilding module 704, the recording module 705, the powering-down module 706, the inserting module 707, the receiving module 708, the judging module 709, the deleting module 710, and the reconnecting module 711. The memory module may be used to support the terminal device 700 to store program codes, data, and the like. And a communication module, which may be used to support communication between the terminal device 700 and other devices.
Wherein the processing module may be a processor or controller that may implement or execute the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
In an embodiment, when the processing module is a processor and the storage module is a memory, the terminal device 700 according to this embodiment may be a device having the structure shown in fig. 1.
Embodiments of the present application also provide a computer-readable storage medium having a computer program stored therein, which when run on a computer, causes the computer to perform the methods provided by the embodiments shown in fig. 4-6 of the present application.
Embodiments of the present application also provide a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the methods provided by the embodiments shown in fig. 4-6 of the present application.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided herein, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, and any person skilled in the art may easily conceive of changes or substitutions within the technical scope of the present application, which should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. The switching method of the Internet access is characterized by being applied to terminal equipment, wherein the terminal equipment comprises a wireless communication module and a mobile communication module, the terminal equipment establishes a first network channel through the mobile communication module, and the terminal equipment establishes a second network channel through the wireless communication module; the network channel currently adopted by the terminal equipment is a first network channel, the second network channel is currently in a disconnected state, and the method comprises the following steps:
starting a timer after detecting that the second network channel is switched from the disconnected state to the connected state;
traversing the connection currently established by the terminal equipment before the timing duration of the timer arrives;
if a first unprocessed connection exists in the currently established connection, acquiring connection state information of the first unprocessed connection;
And if the first unprocessed connection is determined to be in an idle state according to the connection state information of the first unprocessed connection, reconstructing the first unprocessed connection on the second network channel, and recording the network channel currently used by the first unprocessed connection as the second network channel.
2. The method of claim 1, wherein after traversing the connection currently established by the terminal device, further comprising:
and if the first unprocessed connection does not exist in the currently established connection and the delay switching list stored in the terminal equipment is empty, performing power-down processing on the mobile communication module.
3. The method of claim 1, further comprising, after the starting the timer:
and after the timing duration of the timer is up, powering down the mobile communication module.
4. The method of claim 1, wherein after the obtaining the connection state information of the first unprocessed connection, further comprising:
and if the first unprocessed connection is determined to be in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection, inserting the first unprocessed connection into a delay switching list stored by the terminal equipment.
5. The method of claim 4, wherein after inserting the first unprocessed connection into the delayed handoff list maintained by the terminal device, further comprising:
receiving a response returned by the network side through the first unprocessed connection; the response is a response of the network side to a network request sent by the terminal equipment through the first unprocessed connection;
judging whether the network request is successful or not according to the response returned by the network side;
if the network request is successful, judging whether the first unprocessed connection is in the delay switching list;
reconstructing the first unprocessed connection on the second network channel if the first unprocessed connection is in the delay switching list, and recording the network channel currently used by the first unprocessed connection as the second network channel;
and deleting the first unprocessed connection from the delay switching list.
6. The method according to claim 5, wherein after the determining whether the network request is successful according to the response returned by the network side, further comprises:
if the network request is unsuccessful, judging whether a network channel currently adopted by the terminal equipment is switched to the second network channel;
If the network channel currently adopted by the terminal equipment is switched to the second network channel, reconnecting the first unprocessed connection with the network side by using the second network channel;
and retransmitting the network request through the first unprocessed connection after the first unprocessed connection is successfully reconnected with the network side.
7. The method according to any of claims 1-6, wherein after reestablishing the first unprocessed connection on the second network channel and recording the network channel currently used by the first unprocessed connection as the second network channel, further comprising:
after detecting that the second network channel is switched from a connection state to a disconnection state and the mobile communication module is in a normal working state, traversing the connection which is currently established by the terminal equipment;
if a second unprocessed connection exists in the currently established connection, judging whether a network channel used by the second unprocessed connection is a first network channel or not;
and if the network channel used by the second unprocessed connection is not the first network channel, reconstructing the second unprocessed connection on the first network channel, and recording the network channel currently used by the second unprocessed connection as the first network channel.
8. The switching device of the internet access is characterized by being arranged in terminal equipment, wherein the terminal equipment comprises a wireless communication module and a mobile communication module, a first network channel is established by the terminal equipment through the mobile communication module, and a second network channel is established by the terminal equipment through the wireless communication module; the network channel currently adopted by the terminal equipment is a first network channel, the second network channel is currently in a disconnected state, and the switching device comprises:
the starting module is used for starting a timer after detecting that the second network channel is switched from the disconnection state to the connection state;
the traversing module is used for traversing the connection currently established by the terminal equipment before the timing duration of the timer is reached;
the acquisition module is used for acquiring the connection state information of the first unprocessed connection when the first unprocessed connection exists in the currently established connection;
a reestablishing module, configured to reestablish the first unprocessed connection on the second network channel when it is determined that the first unprocessed connection is in an idle state according to the connection state information of the first unprocessed connection;
And the recording module is used for recording the network channel currently used by the first unprocessed connection as the second network channel.
9. The terminal equipment is characterized by comprising a wireless communication module and a mobile communication module, wherein the terminal equipment establishes a first network channel through the mobile communication module, and the terminal equipment establishes a second network channel through the wireless communication module; the network channel currently adopted by the terminal equipment is a first network channel, the second network channel is currently in a disconnected state, and the terminal equipment comprises: one or more processors; a memory; a plurality of applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions, which when executed by the terminal device, cause the terminal device to perform the steps of:
starting a timer after detecting that the second network channel is switched from the disconnected state to the connected state;
traversing the connection currently established by the terminal equipment before the timing duration of the timer arrives;
If a first unprocessed connection exists in the currently established connection, acquiring connection state information of the first unprocessed connection;
and if the first unprocessed connection is determined to be in an idle state according to the connection state information of the first unprocessed connection, reconstructing the first unprocessed connection on the second network channel, and recording the network channel currently used by the first unprocessed connection as the second network channel.
10. The terminal device of claim 9, wherein the instructions, when executed by the terminal device, cause the terminal device to perform the step of traversing the connection currently established by the terminal device, further comprising:
and if the first unprocessed connection does not exist in the currently established connection and the delay switching list stored in the terminal equipment is empty, performing power-down processing on the mobile communication module.
11. The terminal device of claim 9, wherein the instructions, when executed by the terminal device, cause the terminal device to perform the step of starting a timer, further comprising:
And after the timing duration of the timer is up, powering down the mobile communication module.
12. The terminal device of claim 9, wherein the instructions, when executed by the terminal device, cause the terminal device to perform the step of obtaining connection state information for the first unprocessed connection, further comprise:
and if the first unprocessed connection is determined to be in a state of transmitting or receiving data according to the connection state information of the first unprocessed connection, inserting the first unprocessed connection into a delay switching list stored by the terminal equipment.
13. The terminal device of claim 12, wherein the instructions, when executed by the terminal device, cause the terminal device to perform the step of inserting the first unprocessed connection into the delayed handoff list maintained by the terminal device, further comprise:
receiving a response returned by the network side through the first unprocessed connection; the response is a response of the network side to a network request sent by the terminal equipment through the first unprocessed connection;
judging whether the network request is successful or not according to the response returned by the network side;
If the network request is successful, judging whether the first unprocessed connection is in the delay switching list;
reconstructing the first unprocessed connection on the second network channel if the first unprocessed connection is in the delay switching list, and recording the network channel currently used by the first unprocessed connection as the second network channel;
and deleting the first unprocessed connection from the delay switching list.
14. The terminal device of claim 13, wherein the instructions, when executed by the terminal device, cause the terminal device to perform the step of determining whether the network request was successful based on the response returned by the network side, further comprise:
if the network request is unsuccessful, judging whether a network channel currently adopted by the terminal equipment is switched to the second network channel;
if the network channel currently adopted by the terminal equipment is switched to the second network channel, reconnecting the first unprocessed connection with the network side by using the second network channel;
and retransmitting the network request through the first unprocessed connection after the first unprocessed connection is successfully reconnected with the network side.
15. The terminal device according to any of the claims 9-14, characterized in that after the step of causing the terminal device to perform said re-establishing said first unprocessed connection on said second network channel and recording the network channel currently used by said first unprocessed connection as said second network channel, the following steps are further performed:
after detecting that the second network channel is switched from a connection state to a disconnection state and the mobile communication module is in a normal working state, traversing the connection which is currently established by the terminal equipment;
if a second unprocessed connection exists in the currently established connection, judging whether a network channel used by the second unprocessed connection is a first network channel or not;
and if the network channel used by the second unprocessed connection is not the first network channel, reconstructing the second unprocessed connection on the first network channel, and recording the network channel currently used by the second unprocessed connection as the first network channel.
16. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the method according to any of claims 1-7.
CN202211204134.6A 2022-09-29 2022-09-29 Switching method and device of internet access and terminal equipment Active CN116667875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211204134.6A CN116667875B (en) 2022-09-29 2022-09-29 Switching method and device of internet access and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211204134.6A CN116667875B (en) 2022-09-29 2022-09-29 Switching method and device of internet access and terminal equipment

Publications (2)

Publication Number Publication Date
CN116667875A CN116667875A (en) 2023-08-29
CN116667875B true CN116667875B (en) 2024-03-08

Family

ID=87717688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211204134.6A Active CN116667875B (en) 2022-09-29 2022-09-29 Switching method and device of internet access and terminal equipment

Country Status (1)

Country Link
CN (1) CN116667875B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020118498A1 (en) * 2018-12-10 2020-06-18 华为技术有限公司 Service control method and electronic device
CN111372329A (en) * 2018-12-25 2020-07-03 华为技术有限公司 Connection establishing method and terminal equipment
WO2020224486A1 (en) * 2019-05-07 2020-11-12 华为技术有限公司 Calling method, device and system
CN112954749A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Network switching method and electronic equipment
CN112954823A (en) * 2021-01-29 2021-06-11 Oppo广东移动通信有限公司 Method for reestablishing data connection, terminal device and storage medium
CN113810965A (en) * 2021-06-15 2021-12-17 荣耀终端有限公司 Channel switching method, electronic device and storage medium
CN114125973A (en) * 2021-12-01 2022-03-01 Oppo广东移动通信有限公司 Condition switching deconfiguration method and device
CN114828126A (en) * 2022-06-23 2022-07-29 荣耀终端有限公司 Method and device for called paging

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9100944B2 (en) * 2013-08-28 2015-08-04 Qualcomm Incorporated Wireless connecting mobile devices and wearable devices
US11258570B2 (en) * 2018-12-13 2022-02-22 Apple Inc. Joint optimization of bandwidth part, search space and connected mode discontinuous reception operation in 5G New Radio
CN111757368A (en) * 2019-03-28 2020-10-09 苹果公司 Early measurement reporting for configuration of carrier aggregation or dual connectivity

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020118498A1 (en) * 2018-12-10 2020-06-18 华为技术有限公司 Service control method and electronic device
CN111372329A (en) * 2018-12-25 2020-07-03 华为技术有限公司 Connection establishing method and terminal equipment
WO2020224486A1 (en) * 2019-05-07 2020-11-12 华为技术有限公司 Calling method, device and system
CN112954749A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Network switching method and electronic equipment
CN112954823A (en) * 2021-01-29 2021-06-11 Oppo广东移动通信有限公司 Method for reestablishing data connection, terminal device and storage medium
CN113810965A (en) * 2021-06-15 2021-12-17 荣耀终端有限公司 Channel switching method, electronic device and storage medium
CN114125973A (en) * 2021-12-01 2022-03-01 Oppo广东移动通信有限公司 Condition switching deconfiguration method and device
CN114828126A (en) * 2022-06-23 2022-07-29 荣耀终端有限公司 Method and device for called paging

Also Published As

Publication number Publication date
CN116667875A (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN111262975B (en) Bright screen control method, electronic device, computer-readable storage medium, and program product
CN115396964A (en) Network switching method and electronic equipment
CN112806092B (en) Microphone MIC switching method and device
CN113490291B (en) Data downloading method and device and terminal equipment
WO2022089000A1 (en) File system check method, electronic device, and computer readable storage medium
CN114915747B (en) Video call method, electronic device and readable storage medium
CN112738794B (en) Network residing method, chip, mobile terminal and storage medium
CN115665632B (en) Audio circuit, related device and control method
CN110806994B (en) Signal transmission method and device
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
CN115550892B (en) Method and device for synchronizing system information
CN112996066B (en) Network residing method and related equipment
CN116667875B (en) Switching method and device of internet access and terminal equipment
CN117093068A (en) Vibration feedback method and system based on wearable device, wearable device and electronic device
CN116708317B (en) Data packet MTU adjustment method and device and terminal equipment
CN114258044B (en) Standby method, standby system and terminal equipment
CN117135683B (en) Data communication method, electronic device, and computer-readable storage medium
CN114125144B (en) Method, terminal and storage medium for preventing false touch
CN114520870B (en) Display method and terminal
CN115580541B (en) Information synchronization method and electronic equipment
CN111801931B (en) Method for switching on and hanging up telephone when call occurs SRVCC switch
CN116546596A (en) Communication method, device and terminal equipment
CN116489684A (en) Method, device and terminal equipment for determining radio link failure of side link
CN117793861A (en) Mode switching method and device for near field communication and terminal equipment
CN117014377A (en) Congestion control negotiation method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant