Network switching methods, devices, mobile terminals, readable storage media, and chips
By encapsulating data in the source and target network formats in the mobile terminal device and switching networks when the response data meets the similarity condition, the problems of data packet loss and lag during network switching are solved, and a stable network switching process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2026-04-03
AI Technical Summary
When mobile terminal devices switch networks, packet loss and re-encapsulation due to differences in data packet encapsulation formats can cause network lag, which is particularly noticeable in real-time applications.
Upon receiving a network switching command, the mobile terminal encapsulates the unsent data in the source network and target network formats respectively, sends it to the server, and receives the corresponding response data. When the response data meets the similarity condition, the terminal controls the network switching to avoid data packet loss and re-encapsulation.
It effectively avoids data packet loss and re-encapsulation during network switching, reduces network latency, and prevents network lag.
Smart Images

Figure CN115942414B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communications, and more particularly to a network switching method, apparatus, mobile terminal, readable storage medium, and chip. Background Technology
[0002] In related technologies, network switching in mobile terminal devices typically occurs suddenly while the source network is still transmitting data, causing lag. This is because data packets being encapsulated in the source network's format may be lost, and then re-encapsulated in the target network before being transmitted. This process causes delays in the transmission and reception of some data, which is the main cause of network lag. Therefore, there is an urgent need for a network switching method to avoid lag during network switching. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a network switching method, apparatus, mobile terminal, readable storage medium, and chip.
[0004] According to a first aspect of the present disclosure, a network switching method is provided, applied to a mobile terminal, comprising: upon receiving a network switching instruction, encapsulating unsent data from data to be sent in a source network format to obtain a source network data packet, and encapsulating the unsent data in a target network format to obtain a target network data packet; sending the source network data packet and the target network data packet to a server; receiving first response data returned by the server based on the source network data packet, and second response data returned by the server based on the target network data packet; and controlling the mobile terminal to switch from the source network to the target network when the first response data and the second response data satisfy network switching conditions.
[0005] Optionally, the network switching condition is that the similarity between the first response data and the second response data is greater than or equal to a preset similarity.
[0006] Optionally, the method further includes: receiving a plurality of first sub-data packets and / or a plurality of second sub-data packets, until the similarity between the response data obtained based on the plurality of first sub-data packets and the response data obtained based on the plurality of second sub-data packets is greater than or equal to the preset similarity, and determining that the first response data is consistent with the second response data; wherein the first sub-data packet is the response data corresponding to the source network data packet, and the second sub-data packet is the response data corresponding to the target network data packet.
[0007] Optionally, after controlling the mobile terminal to switch from the source network to the target network, the process includes: stopping the encapsulation of data in the source network format, encapsulating data in the target network format, and sending the encapsulated data to the server through the target network.
[0008] Optionally, the method further includes: during the time period between receiving the network switching instruction and switching to the target network, reporting the data in the data packet encapsulated and transmitted in the source network format to the application layer for use.
[0009] According to a second aspect of the present disclosure, a network switching apparatus is provided, applied to a mobile terminal, comprising: a processing module configured to, upon receiving a network switching instruction, encapsulate unsent data from data to be sent in a source network format to obtain a source network data packet, and encapsulate the unsent data in a target network format to obtain a target network data packet; a sending module configured to send the source network data packet and the target network data packet to a server; a receiving module configured to receive first response data returned by the server based on the source network data packet, and second response data returned by the server based on the target network data packet; and a switching module configured to control the mobile terminal to switch from the source network to the target network when the first response data and the second response data satisfy network switching conditions.
[0010] According to a third aspect of the present disclosure, a mobile terminal is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the aforementioned network switching method.
[0011] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the network switching method provided in the first aspect of the present disclosure.
[0012] According to a fifth aspect of the present disclosure, a chip is provided, including a processor and an interface; the processor is configured to read instructions to perform the steps of the aforementioned network switching method.
[0013] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: After receiving a network switching command, the mobile terminal encapsulates the unsent data in the data to be sent in the source network format to obtain a source network data packet, and encapsulates the unsent data in the target network format to obtain a target network data packet. The source network data packet and the target network data packet are sent to the server, and the server returns a first response data based on the source network data packet and a second response data based on the target network data packet. If the first response data and the second response data meet the network switching conditions, the mobile terminal is controlled to switch from the source network to the target network. After receiving the network switching command, the unsent portion of the data to be sent is encapsulated in the source network format and the target network format respectively to obtain data packets in two network formats. The two network format data packets are sent out to receive response data in two network formats. If the response data in the two network formats meet the predetermined network switching conditions, the mobile terminal is controlled to switch from the source network to the target network. This avoids packet loss of the source network data packet and re-encapsulation of the target network data packet during the network switching process, thereby avoiding network latency caused by re-encapsulation of data and effectively preventing network lag.
[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0016] Figure 1 A flowchart illustrating a network switching method as an exemplary embodiment of this disclosure.
[0017] Figure 2 This is a schematic diagram illustrating an IP packet as an exemplary embodiment of the present disclosure.
[0018] Figure 3 This is a block diagram illustrating a network switching device according to an exemplary embodiment.
[0019] Figure 4 This is a block diagram illustrating an apparatus according to an exemplary embodiment. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0021] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0022] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first response data can also be referred to as second response data, and similarly, second response data can also be referred to as first response data.
[0023] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.
[0024] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0025] Typically, the network before a mobile terminal device switches networks is the source network, and the network after the switch is the target network. While the data packets from the source network (encapsulated in the source network format) and the data packets from the target network (encapsulated in the target network format) are identical in their data portions, their encapsulation formats differ significantly. When a mobile terminal switches networks, data packets already sent from the mobile terminal may be retransmitted after processing in the cloud. At the moment of the switch, due to the differences between the source and target network data packets, packets being encapsulated in the source network format may be lost. The lost data is then recapsulated in the target network format. This recapsulation causes network lag, a phenomenon particularly noticeable in real-time applications. For example, in games with high real-time requirements, switching networks during gameplay can cause significant network fluctuations, leading to noticeable lag.
[0026] For the reasons mentioned above, this disclosure provides a method that can significantly reduce the probability of data retransmission and data loss during network switching, thereby effectively reducing network lag.
[0027] Figure 1 A flowchart illustrating a network handover method as an exemplary embodiment of this disclosure is shown below. Figure 1 As shown, this network switching method is used in mobile terminal devices such as mobile phones and tablets, and includes the following steps.
[0028] In step S101, after receiving the network switching instruction, the unsent data in the data to be sent is encapsulated in the source network format to obtain the source network data packet, and the unsent data is encapsulated in the target network format to obtain the target network data packet.
[0029] In computer networks, data is typically transmitted in multiple packets. One part of the data has already been transmitted to the destination address or is in the transmission path, while another part is being encapsulated. This data is the data to be sent, and the part being encapsulated is the unsent data within the data to be sent.
[0030] The network switching command instructs the mobile terminal to switch from a source network to a target network. The network before the network switch occurs is the source network, and the network after the switch is the target network. For example, when the mobile terminal switches from a 4G network to a WiFi network, 4G is the source network and WiFi is the target network. Similarly, when the mobile terminal switches from a first WiFi network to a second WiFi network, the first WiFi network is the source network and the second WiFi network is the target network. The network switching command can be triggered by user operation of the mobile terminal or automatically triggered by the mobile terminal detecting that the current network signal strength is lower than a first threshold. The first threshold can be determined based on empirical data or other feasible methods; this disclosure does not impose any restrictions on this.
[0031] Source network data packets are obtained by the mobile terminal encapsulating the unsent portion of the data to be sent in the source network format, and destination network data packets are obtained by the mobile terminal encapsulating the unsent portion of the data to be sent in the destination network format. For example, when a mobile terminal switches from a 4G network to a WiFi network and encapsulates and transmits data packets using the IP protocol, before receiving the network switching instruction, the mobile terminal encapsulates the unsent portion of the data to be sent in the 4G network format based on the IP protocol to obtain a 4G network data packet; after switching networks, the mobile terminal encapsulates the unsent portion of the data to be sent in the WiFi network format based on the IP protocol to obtain a WiFi network data packet.
[0032] Upon receiving a network switching command, the system encapsulates the unsent portion of the data to be sent in the source network format to obtain a source network data packet, and encapsulates the unsent portion in the target network format to obtain a target network data packet. For example, if the mobile terminal is currently connected to a 4G network and is encapsulating and transmitting data packets in the 4G network format, and a portion of the data to be sent has already been sent out while the remaining portion is still being encapsulated, and a network switching command is received at this time, such as a command to switch to a WiFi network, the system does not immediately switch networks upon receiving the command. Instead, it encapsulates the unsent portion of the data to be sent in the 4G network format to obtain a 4G network data packet, and encapsulates the unsent portion of the data to be sent in the WiFi network format to obtain a WiFi network data packet. The 4G network data packet is the source network data packet, and the WiFi network data packet is the target network data packet.
[0033] In step S102, the source network data packet and the target network data packet are sent to the server.
[0034] The source and destination network data packets obtained in the above steps are sent to the server, that is, the 4G network data packets and WiFi network data packets are sent to the server. It should be noted that the source and destination network data packets here will be sent to the same server. For example, when a mobile terminal is running a game application and receives a network switching command, regardless of whether the mobile terminal encapsulates and transmits data packets using the source network or the destination network, the backend server that interacts with it is the server of that game application.
[0035] In step S103, the first response data of the source network data packet and the second response data of the target network data packet are received from the server.
[0036] The first response data is the server's response data to the source network data packet, and the second response data is the server's response data to the target network data packet. The source network data packet or the target network data packet is equivalent to the request data of the mobile terminal, which is used to request the required data from the server. The server responds with data packets in the source network format and the target network format, respectively. Therefore, the first response data contains the server's response data to the source network data packet, and the second response data contains the server's response data to the target network data packet.
[0037] In step S104, if the first response data and the second response data meet the network switching conditions, the mobile terminal is controlled to switch from the source network to the target network.
[0038] If the first response data and the second response data meet the network switching conditions, control the mobile terminal to switch from the source network to the target network.
[0039] In one implementation, the network switching condition is that the similarity between the first response data and the second response data is greater than or equal to a preset similarity. If the similarity between the first response data and the second response data is greater than or equal to the preset similarity, then the first response data and the second response data can be considered identical. As mentioned above, the source network data packet and the target network data packet differ in their encapsulation format, but their data portions are identical. Figure 2 As shown, Figure 2 This is a schematic diagram illustrating an exemplary embodiment of the present disclosure of an IP packet. The encapsulation format includes version, header length, differentiated services, total length, identifier, flags, source address, destination address, and data, wherein the version is the version field of the transport protocol, the header length is the header length of the packet, differentiated services are the priority and application type of the IP packet, and the data is the payload data. Figure 2 For encapsulation formats not specifically described in this document, please refer to the data packet format of the IP protocol in computer networks; they will not be elaborated upon here.
[0040] based on Figure 2 It is known that the mobile terminal encapsulates the unsent portion of the data to be sent in both the source network format and the target network format. Ideally, after a certain period, the response data for these two network format data packets should be identical. Therefore, when the first and second response data are identical, and the mobile terminal is switched from the source network to the target network, the mobile terminal will not immediately stop encapsulating in the source network format upon receiving the network switching command, discarding the data packets being encapsulated in the source network format, and instead recapsulate the lost data in the target network format. This avoids network congestion caused by data recapsulation. It should be noted that the aforementioned timeframe needs to be determined based on the current network congestion and data packet size, etc., and will not be elaborated upon here.
[0041] In one implementation, the server divides the response data into multiple sub-data packets for transmission. That is, the first and second response data are divided into multiple sub-data packets for transmission, corresponding to the packet concept in computer networks. The server divides the first response data into multiple first sub-data packets and the second response data into multiple second sub-data packets. However, due to uncertainties such as network congestion and packet size, the arrival times of all the first and second sub-data packets at the mobile terminal may differ. Therefore, in practical applications, it is necessary to save the sub-data packets that arrive at the mobile terminal first, and then wait for a period of time for subsequent sub-data packets to arrive at the mobile terminal until no more first or second sub-data packets arrive. At this point, all the first sub-data packets are parsed, and the parsed data is concatenated to obtain the first response data. All the second sub-data packets are then parsed and the data is... The first response data is obtained by concatenating all the data obtained from the analysis. Then, the first response data and the second response data are compared. If the first response data and the second response data are consistent, it means that the target network has been able to replace the source network for packet encapsulation and transmission. At this time, the mobile terminal can be controlled to switch from the source network to the target network without causing packet loss or lag. If the first response data and the second response data are inconsistent, it means that there is packet loss in the source network or the target network has not completely encapsulated the remaining part of the data to be sent. Then, wait to receive the next sub-data packet of the two different network formats to be sent, and repeat the above parsing and concatenation steps to compare the consistency of the response data of the two network formats.
[0042] It should be noted that the network handover method provided in this disclosure, during the time period between receiving the network handover command and handover to the target network, uses data packets encapsulated and transmitted in the source network format. Although data packets encapsulated and transmitted in the target network format can also be received during this period, the data transmitted in the target network format is not used. That is, the data transmitted in the target network format is only used at the transport layer and is not reported to the application layer. Both the transport layer and the application layer are layers in the five-layer protocol of computer networks. After controlling the mobile terminal to handover from the source network to the target network, the encapsulation and transmission of data packets in the source network format is stopped, and the encapsulation and transmission of data packets in the target network format are performed. At this time, the data encapsulated and transmitted in the target network format is reported to the application layer for use.
[0043] In summary, the network switching method provided in this disclosure includes: after receiving a network switching command, the mobile terminal encapsulates the unsent data in the data to be sent in the source network format to obtain a source network data packet, and encapsulates the unsent data in the target network format to obtain a target network data packet; sends the source network data packet and the target network data packet to a server; receives first response data returned by the server based on the source network data packet and second response data returned based on the target network data packet; and controls the mobile terminal to switch from the source network to the target network if the first response data and the second response data meet the network switching conditions. Upon receiving the network switching command, the mobile terminal encapsulates the unsent portion of the data to be sent in the source network format and the target network format respectively to obtain data packets in two network formats; sends the data packets in both network formats to receive response data in both network formats; and controls the mobile terminal to switch from the source network to the target network if the response data in both network formats meet the predetermined network switching conditions. This avoids packet loss of the source network data packet and re-encapsulation of the target network data packet during the network switching process, thereby avoiding network latency caused by re-encapsulation and effectively preventing network lag.
[0044] Figure 3 This is a block diagram illustrating a network switching device as an exemplary embodiment of the present disclosure. (Refer to...) Figure 3 The network switching device 20 includes a processing module 201, a sending module 202, a receiving module 203, and a switching module 204.
[0045] The processing module 201 is configured to, upon receiving a network switching instruction, encapsulate the unsent data in the data to be sent in the source network format to obtain a source network data packet, and encapsulate the unsent data in the target network format to obtain a target network data packet.
[0046] The sending module 202 is configured to send the source network data packet and the target network data packet to the server;
[0047] The receiving module 203 is configured to receive first response data returned by the server based on the source network data packet, and second response data returned based on the target network data packet;
[0048] The switching module 204 is configured to control the mobile terminal to switch from the source network to the target network when the first response data and the second response data meet the network switching conditions.
[0049] Optionally, the network switching condition is that the similarity between the first response data and the second response data is greater than or equal to a preset similarity.
[0050] Optionally, the receiving module 203 is further configured to receive a plurality of first sub-data packets and / or a plurality of second sub-data packets, until the similarity between the response data obtained from the plurality of first sub-data packets and the response data obtained from the plurality of second sub-data packets is greater than or equal to the preset similarity, and then determine that the first response data and the second response data are consistent.
[0051] The first sub-data packet is the response data corresponding to the source network data packet, and the second sub-data packet is the response data corresponding to the target network data packet.
[0052] Optionally, the processing module 201 is further configured to stop encapsulating data in the source network format, encapsulate data in the target network format, and send the encapsulated data to the server via the target network.
[0053] Optionally, the processing module 201 is further configured to report data in the data packets encapsulated and transmitted in the source network format to the application layer for use during the time period between receiving the network switching instruction and switching to the target network.
[0054] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0055] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the network switching method provided in this disclosure.
[0056] Figure 4 This is a block diagram illustrating an apparatus for network switching according to an exemplary embodiment. For example, apparatus 800 may be... Figure 1 The mobile phones and tablets shown can also be computers, digital broadcasting terminals, messaging devices, game consoles, medical devices, fitness equipment, personal digital assistants, and other mobile terminal devices.
[0057] Reference Figure 4 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output interface 812, a sensor component 814, and a communication component 816.
[0058] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the network switching method described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0059] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0060] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.
[0061] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0062] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0063] Input / output interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0064] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0065] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0066] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the network switching method described above.
[0067] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to complete the network switching method described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0068] The aforementioned device can be a standalone electronic device or a part of a standalone electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be a single IC or a collection of multiple ICs. The chip can include, but is not limited to, the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), and SoC (System on Chip). The aforementioned integrated circuit or chip can be used to execute executable instructions (or code) to implement the aforementioned network switching method. The executable instructions can be stored in the integrated circuit or chip or obtained from other devices or equipment. For example, the integrated circuit or chip includes a processor, memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, it implements the network switching method described above; or, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution to implement the network switching method described above.
[0069] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the network switching method described above when executed by the programmable device.
[0070] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0071] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A network handover method, characterized in that, Applied to mobile terminals, including: Upon receiving a network switching instruction, the unsent data in the data to be sent is encapsulated in the source network format to obtain a source network data packet, and the unsent data is encapsulated in the target network format to obtain a target network data packet. Send the source network data packet and the target network data packet to the server; Receive first response data returned by the server based on the source network data packet, and second response data returned based on the target network data packet; If the first response data and the second response data meet the network switching conditions, the mobile terminal is controlled to switch from the source network to the target network. The network switching condition is that the similarity between the first response data and the second response data is greater than or equal to a preset similarity.
2. The method according to claim 1, characterized in that, Also includes: Receive multiple first sub-data packets and multiple second sub-data packets, and determine that the first response data and the second response data are consistent until the similarity between the response data obtained from the multiple first sub-data packets and the response data obtained from the multiple second sub-data packets is greater than or equal to the preset similarity. The first sub-data packet is the response data corresponding to the source network data packet, and the second sub-data packet is the response data corresponding to the target network data packet.
3. The method according to claim 1, characterized in that, After controlling the mobile terminal to switch from the source network to the target network, the following steps are included: Stop encapsulating data in the source network format, encapsulate data in the target network format, and send the encapsulated data to the server through the target network.
4. The method according to claim 1, characterized in that, Also includes: During the time period between receiving the network switching instruction and switching to the target network, the data in the data packets encapsulated and transmitted in the source network format is reported to the application layer for use.
5. A network switching device, characterized in that, Applied to mobile terminals, including: The processing module is configured to, upon receiving a network switching instruction, encapsulate the unsent data in the data to be sent in the source network format to obtain a source network data packet, and encapsulate the unsent data in the target network format to obtain a target network data packet. The sending module is configured to send the source network data packet and the target network data packet to the server; The receiving module is configured to receive first response data returned by the server based on the source network data packet, and second response data returned based on the target network data packet; The switching module is configured to control the mobile terminal to switch from the source network to the target network when the first response data and the second response data meet the network switching conditions, wherein the network switching conditions are that the similarity between the first response data and the second response data is greater than or equal to a preset similarity.
6. A mobile terminal, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1 to 4.
8. A chip, characterized in that, It includes a processor and an interface; the processor is used to read instructions to execute the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Data processing method, transmitting end equipment and receiving end equipment
CN111491333A
Providing secure data transfer between networks
US20170093884A1