Data switching methods, equipment, devices and storage media

By setting different data transmission strategies and encapsulating repeated reading methods on the source base station side, the packet loss problem during data switching was solved, and the stability and efficiency of data transmission were improved.

CN122093879APending Publication Date: 2026-05-26DATANG MOBILE COMM EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411695750.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

When a terminal device switches from the current base station to another base station, packet loss is likely to occur during the data handover process, leading to active disconnection of the core network and a drop in data transmission rate to zero, which is difficult to solve effectively with existing technologies.

Method used

On the source base station side, by setting different data transmission strategies, data that has been sent to the terminal device but not acknowledged is sent to the target base station once, and data that has not been sent to the terminal device is sent to the target base station twice. The unsent data is also encapsulated and repeatedly read and sent to reduce data loss and resource consumption.

Benefits of technology

It effectively prevents data loss and link interruption, improves the stability and efficiency of data transmission rate, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093879A_ABST
    Figure CN122093879A_ABST
Patent Text Reader

Abstract

This disclosure relates to a data switching method, apparatus, device, and storage medium. In response to a terminal device switching from a source base station to a target base station, the method involves sending a first set of data (data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station) to the target base station. Then, a second set of data (data less than the first set of data, cached in the Transmission Control Protocol (TCP) proxy of the source base station but not sent to the PDCP entity) is sent to the target base station. This method prevents data loss, improves the security and efficiency of data switching, reduces the resources consumed during data switching, and avoids data loss leading to connection drops and zero-rate drops.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a data switching method, device, apparatus, and storage medium. Background Technology

[0002] Transmission Control Protocol (TCP) proxy is a technology that improves the speed and stability of TCP transmission. During data transmission, the core network sends data destined for the terminal device to a TCP proxy in the base station where the terminal device is located for buffering, and then the data is sent to the terminal device through the TCP proxy. When packet loss occurs, the buffered data is used to retransmit the data, ensuring successful transmission. When the terminal device switches from the current base station (source base station) to another base station (target base station), the buffered data in the source base station's TCP proxy needs to be transferred to the target base station, so that the target base station can continue to transmit data from the terminal device to the terminal device.

[0003] However, in practice, once the data is cached in the TCP proxy, the core network no longer holds that data. If packet loss occurs during the data handover process, the terminal will repeatedly request the lost data from the core network on the target base station side, thereby triggering the core network to actively disconnect the connection and the data transmission rate drops to zero. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a data switching method, apparatus, device, and storage medium.

[0005] A first aspect of this disclosure provides a data switching method, the method comprising:

[0006] In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station. The terminal device sends the second data to the target base station. The first data is less than the second data. The second data refers to the data cached in the Transmission Control Protocol (TCP) proxy of the source base station that has not been sent to the PDCP entity.

[0007] Since data cached in the TCP proxy needs to be transparently transmitted to the PDCP entity, which then sends it to the terminal device, the PDCP entity will also send the data cached in the source base station's data cached in the source base station to the terminal device. By sending the data cached in the PDCP entity to the target base station a first time, and then sending the data cached in the TCP proxy but not yet sent to the PDCP entity a second time, with the first number of transmissions being less than the second, the number of transmissions of the data cached in the PDCP entity is reduced. This prevents data loss that could prevent data from reaching the terminal device, as well as link interruptions and zero-rate drops caused by data loss. It also improves data failover efficiency and reduces resource consumption during data failover within the PDCP entity. Furthermore, sending the second batch of data to the target base station a second time, with a larger number of transmissions than the first, prevents packet loss of data not yet sent to the PDCP entity, thus ensuring secure data failover, improving data transmission rate stability, and preventing zero-rate drops.

[0008] In some implementations, sending the first data from the terminal device to the target base station includes:

[0009] The first message contained in the first data is sent to the target base station once. The first message refers to the message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device.

[0010] The terminal device sends a second set of data to the target base station, including:

[0011] The second data is sent to the target base station twice.

[0012] Since the first packet cached in the PDCP entity has already been sent to the terminal device, but the terminal device has not yet acknowledged it, sending the first packet to the target base station once can prevent the terminal device from not receiving the first packet, allowing the target base station to resend the first packet to the terminal device based on the switchover data. It also reduces the number of times the first packet is sent, thereby reducing the resource consumption of data switchover. Furthermore, sending the first packet once and the second packet twice can effectively balance the resource consumption of data switchover with the probability of data loss.

[0013] In some implementations, the method of the first aspect may further include:

[0014] For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, wherein the sending method includes repeatedly sending the second message according to the number of times it is sent.

[0015] In some implementations, for a second message contained in the first data and / or the second data, the number of times the second message is sent and the sending method of the second message are configured, including:

[0016] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0017] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0018] By configuring the number of times and the sending method of messages, different messages can be sent with different numbers of times and methods. For example, messages that have been sent to the terminal device but have not been acknowledged by the terminal device can be sent to the target base station a few times, while messages that have not been sent to the terminal device can be sent to the target base station a relatively large number of times. This can prevent packet loss, improve the efficiency of data switching, and reduce the consumption of resources by data switching.

[0019] In some implementations, the method provided in the first aspect may further include:

[0020] The second message is encapsulated to obtain encapsulated data;

[0021] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0022] By repeatedly reading the encapsulated data obtained from the second message encapsulation according to the transmission count and sequentially sending the read encapsulated data to the target base station, instead of copying, the consumption of storage resources caused by data copying can be avoided. In addition, encapsulating the second message only once and achieving repeated transmission of the second message by repeatedly reading the encapsulated data, rather than repeatedly encapsulating the second message, can prevent header inconsistencies caused by repeated encapsulation, as well as repeated transmission failures caused by header inconsistencies.

[0023] In some implementations, the method provided in the first aspect may further include:

[0024] Receive a preprocessing message for cell handover, which includes information about the target cell. The target cell refers to the cell that the terminal device will access after performing a cell handover.

[0025] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0026] After receiving the preprocessing message for cell handover, the terminal device is compared with the target cell to which it is to be switched to by the PDCP entity. If the target cell is not included in the PDCP entity's service object, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs, and the data switching method disclosed herein is executed. If the target cell to which the terminal device is to be switched is the service object of the PDCP entity, that is, the target cell to which the terminal device is to be switched is still the cell of the source base station, no data switching is performed, which can reduce unnecessary data switching and save resources.

[0027] A second aspect of this disclosure provides a PDCP entity, including: a memory, a transceiver, and a processor; the memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and execute any of the methods described in the first aspect.

[0028] A third aspect of this disclosure provides a base station, including: a memory, a transceiver, and a processor; the memory is used to store a computer program; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer program in the memory and execute the following method:

[0029] In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station.

[0030] The terminal device sends the second data to the target base station a second time, where the first number of times is less than the second number of times. The second data refers to data that is cached in the TCP proxy of the source base station and has not been sent to the PDCP entity.

[0031] In some implementations, the processor is specifically used for:

[0032] The first message contained in the first data is sent to the target base station once. The first message refers to the message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device.

[0033] The second data is sent to the target base station twice.

[0034] In some implementations, the processor is also used for:

[0035] For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, including repeatedly sending the second message according to the number of times it is sent.

[0036] In some implementations, the processor is also used for:

[0037] The second message is encapsulated to obtain encapsulated data;

[0038] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0039] In some implementations, the processor is specifically used for:

[0040] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0041] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0042] In some implementations, the processor is also used for:

[0043] Receive a preprocessing message for cell handover, which includes information about the target cell. The target cell refers to the cell that the terminal device will access after performing a cell handover.

[0044] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0045] A fourth aspect of this disclosure provides a data switching apparatus, comprising:

[0046] The first sending module is used to send the first data of the terminal device to the target base station in response to the terminal device switching from the source base station to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station.

[0047] The second sending module is used to send the second data of the terminal device to the target base station a second time, wherein the first number of times is less than the second number of times, and the second data refers to the data cached in the transmission control protocol TCP proxy of the source base station and not sent to the PDCP entity.

[0048] Since data cached in the TCP proxy needs to be transparently transmitted to the PDCP entity, which then sends it to the terminal device, the PDCP entity sends the cached data from the source base station to the terminal device. By sending the cached data from the PDCP entity to the target base station a first time, and then sending the cached data from the TCP proxy (but not yet sent to the PDCP entity) a second time, the number of transmissions of the cached data in the PDCP entity is less than the number of transmissions in the first time. This prevents data loss that could prevent data from reaching the terminal device, as well as link drops and zero-rate drops caused by data loss. It also improves data switching efficiency and reduces resource consumption during data switching within the PDCP entity. Furthermore, sending the second batch of data to the target base station a second time (more than the first batch) prevents packet loss of data not yet sent to the PDCP entity, thus ensuring secure data switching, improving data transmission rate stability, and preventing zero-rate drops.

[0049] In some implementations, the first sending module is configured to: send a first message contained in the first data to the target base station once, wherein the first message refers to a message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device;

[0050] The second sending module is used to send the second data to the target base station twice.

[0051] Since the first packet cached in the PDCP entity has already been sent to the terminal device, but the terminal device has not yet acknowledged it, sending the first packet to the target base station once can prevent the terminal device from missing the first packet. The target base station can then resend the first packet to the terminal device based on the switchover data, while also reducing the number of times the first packet is sent, thus reducing the resource consumption of data switchover. Furthermore, sending the first packet once and the second packet twice can effectively balance the resource consumption of data switchover with the probability of data loss.

[0052] In some embodiments, the data switching apparatus further includes:

[0053] The configuration module is used to configure the number of times and the sending method of the second message contained in the first data and / or the second data. The sending method includes repeatedly sending the second message according to the number of times.

[0054] By configuring the number of times and the sending method of messages, different messages can be repeatedly sent with different numbers of times and methods. For example, messages that have been sent to the terminal device but have not been acknowledged by the terminal device can be repeatedly sent to the target base station with fewer times, while messages that have not been sent to the terminal device can be repeatedly sent to the target base station with relatively more times. This can prevent packet loss, improve the efficiency of data switching, and reduce the consumption of resources by data switching.

[0055] In some embodiments, the data switching device may further include:

[0056] The encapsulation module is used to encapsulate the second message to obtain encapsulated data;

[0057] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0058] By repeatedly reading the encapsulated data obtained from the second message encapsulation according to the transmission count and sequentially sending the read encapsulated data to the target base station, instead of copying, the consumption of storage resources caused by data copying can be avoided. In addition, encapsulating the second message only once and achieving repeated transmission of the second message by repeatedly reading the encapsulated data, rather than repeatedly encapsulating the second message, can prevent header inconsistencies caused by repeated encapsulation, as well as repeated transmission failures caused by header inconsistencies.

[0059] In some implementations, the configuration module is used for:

[0060] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0061] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0062] In some embodiments, the data switching device may further include:

[0063] The receiving module is used to receive preprocessing messages for cell handover. The preprocessing messages include information about the target cell, which refers to the cell that the terminal device will access after performing cell handover.

[0064] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0065] After receiving the preprocessing message for cell handover, the terminal device is compared with the target cell to which it is to be switched to by the PDCP entity. If the target cell is not included in the PDCP entity's service object, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs, and the data switching method disclosed herein is executed. If the target cell to which the terminal device is to be switched is the service object of the PDCP entity, that is, the target cell to which the terminal device is to be switched is still the cell of the source base station, no data switching is performed, which can reduce unnecessary data switching and save resources.

[0066] A fifth aspect of this disclosure provides a processor-readable storage medium storing a program for causing a processor to perform any of the methods described in the first aspect above. Attached Figure Description

[0067] 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.

[0068] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0069] Figure 1 This is a schematic diagram of a data switching scenario provided in an embodiment of this disclosure;

[0070] Figure 2 This is a flowchart of a data switching method provided in an embodiment of this disclosure;

[0071] Figure 3 This is a schematic diagram of TCP proxy cached data provided in an embodiment of this disclosure;

[0072] Figure 4 This is a flowchart of another data switching method provided in this embodiment of the disclosure;

[0073] Figure 5 This is a schematic diagram of a data structure provided in an embodiment of this disclosure;

[0074] Figure 6 This is a schematic diagram of a data switching method based on the TWINS mechanism;

[0075] Figure 7 This is a schematic diagram of yet another data switching method provided in this disclosure embodiment;

[0076] Figure 8This is a schematic diagram of yet another data switching method provided in this disclosure embodiment;

[0077] Figure 9 This is a schematic diagram of the structure of a PDCP entity provided in an embodiment of this disclosure;

[0078] Figure 10 This is a schematic diagram of the structure of a base station provided in an embodiment of this disclosure;

[0079] Figure 11 This is a schematic diagram of the structure of a data switching device provided in an embodiment of this disclosure. Detailed Implementation

[0080] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0081] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0082] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0083] Example, Figure 1 This is a schematic diagram illustrating a data switching scenario provided in an embodiment of this disclosure. Figure 1 In this context, base station 11 can be understood as the base station currently where terminal device 12 is camped, i.e., the source base station. Terminal device 12 can be understood, for example, as any device that can access the base station and transmit data via a wireless network, such as a mobile phone, wearable device, or tablet. Data sent from the core network to terminal device 12 is buffered in the TCP proxy of base station 11. Data from terminal device 12 is then transparently transmitted through the TCP proxy to the Packet Data Convergence Protocol (PDCP) entity, which then sends it to terminal device 12.

[0084] Base station 13 can be understood as the base station to which terminal device 12 is targeted for handover, i.e., the target base station. Server 14 can be understood as a core network server, used to perform relevant core network functions, including sending data from the terminal device to the base station accessed by the terminal device.

[0085] See Figure 1 In related technologies, in a scenario where terminal device 12 is switched from base station 11 to base station 13, server 14 marks the last packet of terminal device 12 sent to base station 11 with an EndMark. After receiving the packet with the EndMark, base station 11 uses the PDCP entity to switch the data of terminal device 12 cached in the TCP proxy to base station 13. After completing the data switchover, it releases the user plane resources of terminal device 12 in base station 11, and base station 13 continues to send data of terminal device 12 to terminal device 12. The PDCP entity can be understood as a functional entity capable of performing data caching and transmission based on the PDCP protocol. The PDCP entity can be specifically a program module or a hardware entity; no limitation is made here.

[0086] However, after the data is cached in the TCP proxy, the core network server 14 no longer holds that part of the data. If the data is lost during the handover process to the base station 13, the terminal device 12 will repeatedly request the lost data from the server 14 on the base station 13 side, thereby causing the server 14 to actively disconnect the connection and the data transmission rate to drop to zero.

[0087] To address the aforementioned problems in related technologies, this disclosure provides a data switching method, device, apparatus, and storage medium to reduce data loss during the data switching process, improve the stability of data transmission rates, increase the efficiency of data switching, and reduce resource consumption during data switching.

[0088] The technical solutions provided in this disclosure can be applied to a variety of systems. For example, applicable systems may include Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunications System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems and their evolved communication systems, and 6G (sixth generation mobile communication technology) systems. These systems may include terminal equipment and network equipment. The systems may also include a core network component, such as the Evolved Packet Core (EPC) and the 5G Core Network (5GC).

[0089] The solutions of the present disclosure embodiments are described below with reference to exemplary embodiments.

[0090] Figure 2 This is a flowchart illustrating a data switching method provided in an embodiment of this disclosure. This method can be executed, for example, by a source base station or a PDCP entity on the source base station side. Figure 2 As shown, in some embodiments, the data switching method provided by this disclosure may include steps 201-202.

[0091] Step 201: In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the PDCP entity of the source base station.

[0092] The terminal devices involved in the embodiments of this disclosure can be devices that provide video, voice, and / or data connectivity to users, handheld devices with wireless connectivity, or other processing devices connected to a wireless modem. The names of the terminal devices may differ in different systems; for example, in 5G or 6G systems, the terminal device may be called User Equipment (UE). Wireless terminal devices can be USB storage devices, other personal computer memory devices, and dongles. They can also communicate with one or more core networks (CNs) via a Radio Access Network (RAN). Wireless terminal devices can be mobile terminal devices, such as mobile phones (or "cellular" phones) and computers with mobile terminal devices. For example, they can be portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices that exchange voice and / or data with the radio access network. Examples of such devices include Personal Communication Service (PCS) telephones, cordless phones, Session Initiated Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), personal computers, tablets, and Machine-type Communication (MTC) terminal devices. Wireless terminal devices can also be referred to as systems, subscriber units, subscriber stations, mobile stations, mobile terminals, remote stations, access points, remote terminals, access terminals, user terminals, user agents, user devices, and wireless access devices and routers / modems that meet the limitations of this definition, but are not limited to these specific embodiments in this disclosure.

[0093] The source base station referred to in this disclosure can be understood, for example, as the base station where the terminal device camped before the cell handover, or the base station to which the cell where the terminal device is currently camped belongs.

[0094] The target base station referred to in this disclosure can be understood, for example, as the base station to which the terminal device is targeted for handover, or the base station accessed after cell handover.

[0095] The base stations (including source base stations and target base stations) involved in the embodiments of this disclosure may include multiple cells providing services to terminal devices. Depending on the specific application, a base station may also be called an access point, or a device in the access network that communicates with wireless terminal devices through one or more sectors on the air interface, or other names. The base stations involved in the embodiments of this disclosure can be used to exchange received air frames with Internet Protocol (IP) packets, acting as a router between the wireless terminal device and the rest of the access network, where the rest of the access network may include an Internet Protocol (IP) communication network. The base stations involved in the embodiments of this disclosure can also coordinate the attribute management of the air interface. For example, the base stations involved in the embodiments of this disclosure may be evolved network devices (eNBs or e-NodeBs) in long-term evolution (LTE) systems, 5G base stations (gNBs) in next-generation 5G network architectures, or home-evolved NodeBs (HeNBs), relay nodes, femtos, picos, network testing equipment, etc., and are not limited in the embodiments of this disclosure. In some network architectures, base stations may include centralized unit (CU) nodes and distributed unit (DU) nodes, and the centralized unit and distributed unit may also be geographically separated.

[0096] In this embodiment of the disclosure, the first data refers to the data cached in the PDCP entity on the source base station side. The term "first" is only used to distinguish the different data involved in this embodiment of the disclosure and has no other meaning.

[0097] The first data is data that is transparently transmitted from the source base station's TCP proxy to the PCDP entity. This first data includes data that the TCP proxy has transparently transmitted to the PDCP entity, and that the PDCP entity has already sent to the terminal device, but the terminal device has not yet acknowledged; and data that the TCP proxy has transparently transmitted to the PDCP entity awaiting transmission to the terminal device, but has not yet been sent. Because the data cached in the PDCP entity has not received an acknowledgment message from the terminal device, or has not yet been sent to the terminal device, after this data is transparently transmitted to the PDCP entity, the PDCP entity will not send an acknowledgment message back to the TCP proxy; this data remains cached in both the TCP proxy and the PDCP entity. For example... Figure 3 This is a schematic diagram of TCP proxy cached data provided in an embodiment of this disclosure. For example... Figure 3 As shown, the TCP proxy caches data with consecutive ordered numbers. Figure 3 This portion of data is exemplified as data from sequence numbers proxy_min_tsn to proxy_max_tsn. The TCP proxy cache includes data that has been passed through to the PDCP entity but for which no acknowledgment message has been received from the PDCP entity; this is the first data segment. Figure 3 The example shown is data from sequence numbers pdcp_min_tsn to pdcp_max_tsn. The data cached by the TCP proxy also includes data not yet sent to the PDCP entity, i.e., the second data, which is... Figure 3 The example is represented as data from sequence number pdcp_max_tsn to proxy_max_tsn.

[0098] In some embodiments, since the first data has already been transparently transmitted to the PDCP entity, the PDCP entity will retransmit any data that has been sent to the terminal device but for which no acknowledgment message has been received, to ensure that this data is received by the terminal device. For any data cached by the PDCP entity but not yet sent to the terminal device, the PDCP entity will also arrange for its transmission to the terminal device. In other words, all data cached in the PDCP entity will be sent to the terminal device. In this scenario, by setting a relatively small number of retransmissions (i.e., the initial retransmission count), repeatedly sending the first data to the target base station can reduce packet loss, prevent link drops and zero-rate drops, and also improve the handover efficiency of the first data, reducing the resource consumption during handover.

[0099] In different implementations, the first count can be set to any value greater than zero as needed. For example, in one example, the first count can be set to 1, meaning that during data handover, the first data is sent to the target base station only once. This greatly reduces the number of times the first data is sent while ensuring no packet loss, thus improving the handover efficiency of the first data and reducing resource consumption.

[0100] It is worth noting that in some implementations, for the portions of the PDCP entity that have already been sent to the terminal device and those that have not yet been sent, redundant transmission can be achieved during data handover by using the same or different number of transmissions. For example, for the first message that has been sent to the terminal device but for which no acknowledgment message has been received, the first message can be sent to the target base station once during data handover to reduce resource consumption. For the third message that has not yet been sent to the terminal device, it can be sent to the target base station once or multiple times to prevent data loss.

[0101] In this embodiment of the disclosure, since the first message cached in the PDCP entity has been sent to the terminal device but the terminal device has not acknowledged it, by sending the first message to the target base station once, it is possible to prevent the terminal device from not receiving the first message, and the target base station can resend the first message to the terminal device based on the data switching, and also reduce the number of times the first message is sent, thereby reducing the resource consumption of data switching.

[0102] Step 202: Send the second data from the terminal device to the target base station. The first data is less than the second data. The second data refers to the data that is cached in the TCP proxy of the source base station and has not been sent to the PDCP entity.

[0103] Since the second data has not yet been transparently transmitted to the PDCP entity or transmitted to the terminal device, in order to prevent the second data from being lost and unable to reach the terminal device due to data switching, this embodiment of the disclosure repeatedly sends the second data to the target base station a second time, greater than the first time. This can prevent the loss of the second data and the resulting link interruption and rate drop to zero. The second number can be set as needed and is not limited to a specific value. For example, in one example, the first number can be set to once, and the second number can be set to twice. By sending the first data, especially the data in the first data that has been sent to the terminal device but for which no confirmation message has been received, to the target base station once, and then sending the second data to the target base station twice, the resource consumption of data switching and the probability of data loss can be effectively balanced.

[0104] In this embodiment, since the data cached in the TCP proxy needs to be transparently transmitted to the PDCP entity and then sent to the terminal device by the PDCP entity, the PDCP entity will send the data cached in the source base station to the terminal device. By sending the data cached in the PDCP entity to the target base station a first time, and then sending the data cached in the TCP proxy but not yet sent to the PDCP entity a second time, with the first number of transmissions being less than the second, the number of transmissions of the data cached in the PDCP entity is reduced. This prevents data loss that could prevent data from reaching the terminal device, as well as link interruptions and zero-rate drops due to data loss. Simultaneously, it improves data switching efficiency and reduces resource consumption during data switching within the PDCP entity. Furthermore, by sending the second data to the target base station a second time (more than the first number), packet loss of data not yet sent to the PDCP entity can be prevented, thus ensuring secure data switching, improving the stability of the data transmission rate, and avoiding zero-rate drops.

[0105] Figure 4 This is a flowchart of another data switching method provided in this disclosure embodiment, such as... Figure 4 As shown, in some embodiments, the above-mentioned method for switching the second data may include steps 401-402.

[0106] Step 401: For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method.

[0107] Step 402: Send the second message to the target base station according to the number of times and the sending method of the second message.

[0108] In some implementations, the second message can be understood as either the first data or the second data.

[0109] In some implementations, when the second message is specifically a message within the first data, the message is stored in the PDCP entity's cache. When the second message is specifically a message within the second data, the message is stored in the TCP broker's cache. The PDCP entity can retrieve the second message from the TCP broker through a pre-defined request message. Alternatively, in other implementations, the TCP broker can proactively send the second message to the PDCP entity. For example, in... Figure 3 In the example shown, the TCP proxy can proactively or upon request from the PDCP entity send data with sequence numbers from pdcp_max_tsn to proxy_max_tsn to the PDCP entity, so that the PDCP entity can switch this data to the target base station.

[0110] In some implementations, embodiments of this disclosure can configure the number of times and the transmission method of one or more messages in the first data and / or second data to improve the flexibility and controllability of data switching.

[0111] For example, Figure 5 This is a schematic diagram of a data structure provided in an embodiment of this disclosure. See also... Figure 5 In some embodiments, the data structure provided in this disclosure may include a control area and a data area. The control area may include a reference count bit (also simply called a count bit) and a flag bit for the transmission mode. The data area is used to store data (such as any packet in the first data, or any packet in the second data obtained from the TCP proxy). The value on the reference count bit is used to indicate the number of times the data is transmitted. The value on the flag bit for the transmission mode is used to indicate the transmission mode of the data. For example, in some embodiments, the transmission mode in this disclosure may include repeatedly transmitting the data in the data area according to the number of times marked on the count bit. The ways of repeatedly transmitting the data in the data area include, but are not limited to, the following:

[0112] Method 1: Data (such as messages) in the data area can be encapsulated to form encapsulated data. This encapsulated data is then repeatedly read according to the number of times marked on the counter bits, and the read encapsulated data is sequentially sent to the target base station. In other words, in some implementations, data in the data area is encapsulated only once, and repeated transmission of data in the data area is achieved by repeatedly reading the encapsulated data. This disclosure refers to this data transmission mechanism as the TWINS transmission mechanism.

[0113] For example, Figure 6 This is a schematic diagram of a data switching method based on the TWINS mechanism. For example... Figure 6 As shown, in some implementations, the flag bit of the transmission mode can be set to the identifier corresponding to the TWINS transmission mechanism through a preset configuration interface, and the value of the reference count bit can be set. For example, to achieve N (N is an integer greater than or equal to 1) redundant transmissions, the value of the reference count bit is set to N. For instance, if a packet in the first data is transmitted once using the TWINS transmission mechanism, the reference count bit corresponding to that packet can be marked as 1, and the flag bit of the transmission mode can be marked to the identifier corresponding to the TWINS transmission mechanism. If a packet in the second data is transmitted twice using the TWINS transmission mechanism, the reference count bit corresponding to that packet can be marked as 2, and the flag bit of the transmission mode can be marked to the identifier corresponding to the TWINS transmission mechanism.

[0114] After setting the reference count bit and transmission mode flag, the data in the data area is encapsulated to form encapsulated data. During data switching, the reference count bit and transmission mode flag can be read from the control area corresponding to the data area through a preset encapsulation interface. Based on the transmission count indicated by the reference count bit and the transmission mode indicated by the transmission mode flag, the encapsulated data is repeatedly transmitted. For example, if the transmission mode flag indicates TWINS and the reference count bit indicates two transmissions, the preset transmission interface is called twice to read the encapsulated data, and the read encapsulated data is sequentially sent to the target base station. Each time it is transmitted, the value on the reference count bit is decremented by one until the value on the reference count bit reaches 0, at which point the data in the data area is deleted.

[0115] By encapsulating the data in the data area once, repeatedly reading the encapsulated data according to the number of transmissions, and then sequentially sending the read encapsulated data to the target base station, instead of copying, the consumption of storage resources caused by data copying can be avoided. Furthermore, encapsulating the data in the data area only once and repeatedly reading the encapsulated data to achieve repeated transmission of the data, rather than repeatedly encapsulating it, can prevent inconsistencies in the encapsulated packet headers caused by repeated encapsulation, as well as data transmission failures due to inconsistent encapsulated packet headers.

[0116] Method 2: Data (such as packets) in the data area can be encapsulated to form encapsulated data. This encapsulated data is then copied according to the number of times marked on the counter bits, and the copied encapsulated data is sent sequentially to the target base station. In other words, in some implementations, data in the data area can also be encapsulated once, but by copying the encapsulated data, the repeated transmission of data in the data area is achieved. Copying the encapsulated data also prevents inconsistencies in the encapsulated packet headers caused by repeated encapsulation, and also prevents data retransmission failures due to inconsistent encapsulated packet headers.

[0117] It should be noted that the reference count bit and / or the transmission mode flag bit mentioned in the embodiments of this disclosure can be configured to be empty.

[0118] For example, in some implementations, when the reference count bit is not empty and the sending mode flag bit is empty, the encapsulated data can be repeatedly sent using the default sending mode based on the number of times the reference count bit is configured.

[0119] For example, in some other implementations, when the reference count bit is configured to be empty, if the send mode flag is not empty, the encapsulated data in the data area can be repeatedly sent a default number of times according to the identifier on the send mode flag. If the send mode flag is also empty, the encapsulated data can be sent a default number of times using the default send mode.

[0120] For example, in some implementations, if the reference count bit is empty and the sending mode flag corresponds to a preset sending mode (such as the TWINS sending mechanism, but not limited to the TWINS sending mechanism), then data is repeatedly sent based on a first preset number of times. If the reference count bit is empty and the sending mode flag does not correspond to a preset sending mode, then data is repeatedly sent based on a second preset number of times. Taking the TWINS sending mechanism as an example... Figure 7 This is a schematic diagram of yet another data switching method provided in this disclosure. For example... Figure 7As shown, in some implementations, the reference count bit and the transmission mode flag bit corresponding to the data area can be configured, and the data in the data area can be encapsulated to obtain encapsulated data. Figure 7 In this example, the reference count bit is configured to be empty. During data swapping, the flag of the sending method is used to determine if the configured sending method is the TWINS sending mechanism. If so, the encapsulated data is sent twice using the TWINS sending mechanism; otherwise, it is sent only once. Figure 7 This is merely an example and not a unique qualifier.

[0121] By adding a configuration method where the reference count bit and / or the transmission mode flag is empty, along with the corresponding data transmission method, the configuration efficiency and flexibility of the reference count bit and / or the transmission mode flag can be improved.

[0122] In this embodiment of the disclosure, by configuring the number of times and the sending method of the message, different messages can be repeatedly sent with different numbers of times and methods. For example, messages that have been sent to the terminal device but have not been acknowledged by the terminal device are repeatedly sent to the target base station with fewer times, while messages that have not been sent to the terminal device are repeatedly sent to the target base station with relatively more times. This can prevent packet loss, improve the efficiency of data switching, and reduce the consumption of resources by data switching.

[0123] Figure 8 This is a schematic diagram of another data switching method provided in this disclosure embodiment, as shown below. Figure 8 As shown. In some implementations, when a terminal device switches from a source base station to a target base station, the higher layers send a cell handover preprocessing message to the PDCP entity on the source side (i.e., the PDCP entity on the source base station side). This preprocessing message includes information about the cell the terminal device is targeting to switch to (i.e., the target cell). After receiving the preprocessing message, the PDCP entity compares the target cell with its own service object. If the PDCP entity's service object includes the cell, it means that the cell is also a cell of the source base station, and no data handover is needed. Other handover processing procedures are then executed (the handover process here is the same as in the prior art and will not be described in detail here). If the PDCP entity's service object does not include the cell, it means that the base station of the cell is not the source base station, but another base station (i.e., the target base station), and data handover from the source base station to the target base station is required. At this time, the PDCP entity calls the TCP proxy interface to notify the TCP proxy to stop proxying the data of the terminal device and sends a zero window to the core network server so that the core network stops sending the data of the terminal device to the source base station. At the same time, the TCP proxy will not establish a new TCP connection for the terminal device.

[0124] At the start of data handover, the PDCP entity first sends its cached data to the target base station once. Then, the PDCP entity retrieves the data (i.e., the aforementioned second data) from the TCP broker that is not present in the PDCP entity and sets the reference count bit and the transmission mode flag. Assuming the transmission mode identified during data transmission is TWINS, the preset transmission interface is called, and the encapsulated message is sent twice to the target base station. After the second data cached by the TCP broker is successfully handed over, the TCP broker sends an acknowledgment message to the server and updates the receive window length, so that the server can promptly send data packets to the target base station.

[0125] After receiving the preprocessing message for cell handover, the terminal device is compared with the service object of the PDCP entity. If the service object of the PDCP entity does not include the cell, the terminal device is determined to hand over from the source base station to the target base station to which the cell belongs, and the data handover method disclosed herein is executed. If the target cell to be handed over is the service object of the PDCP entity, that is, the target cell to be handed over is still the cell of the source base station, no data handover is performed, which can reduce unnecessary data handover and save resources.

[0126] Example, Figure 9 This is a schematic diagram of the structure of a PDCP entity provided in an embodiment of this disclosure. Figure 9 As shown, the PDCP entity includes:

[0127] The system includes a memory 1501, a transceiver 1502, and a processor 1503; wherein the memory 1501, transceiver 1502, and processor 1503 are respectively connected to a bus interface.

[0128] Memory 1501 is used to store computer programs; transceiver 1502 is used to send and receive data under the control of processor 1503; processor 1503 is used to read the computer program in memory 1501 and perform the following operations: in response to the terminal device switching from a source base station to a target base station, sending the terminal device's first data to the target base station, the first data referring to data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station; sending the terminal device's second data to the target base station, the first data being less than the second data, the second data referring to data cached in the Transmission Control Protocol (TCP) proxy of the source base station and not sent to the PDCP entity.

[0129] In some implementations, the processor 1503 is specifically used for:

[0130] The first message contained in the first data is sent to the target base station once. The first message refers to the message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device.

[0131] The second data is sent to the target base station twice.

[0132] In some implementations, the processor 1503 is further configured to:

[0133] For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, including repeatedly sending the second message according to the number of times it is sent.

[0134] In some implementations, the processor 1503 is further configured to:

[0135] The second message is encapsulated to obtain encapsulated data;

[0136] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0137] In some implementations, the processor 1503 is specifically used for:

[0138] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0139] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0140] In some implementations, the processor 1503 is further configured to:

[0141] Receive a preprocessing message for cell handover, which includes information about the target cell. The target cell refers to the cell that the terminal device will access after performing a cell handover.

[0142] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0143] The PDCP entity provided in this disclosure can execute the methods of any of the above method embodiments, and its execution method and beneficial effects are similar and will not be repeated here.

[0144] Example, Figure 10 This is a schematic diagram of a base station structure provided in an embodiment of this disclosure. The base station includes a memory 1120, a transceiver 1110, and a processor 1100; the memory 1120, transceiver 1110, and processor 1100 are respectively connected to a bus interface. The transceiver 1110 is used to transmit and receive data under the control of the processor 1100; the memory 1120 is used to store computer programs; the processor 1100 is used to read the computer program in the memory 1120 and execute the following method:

[0145] In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station.

[0146] The terminal device sends the second data to the target base station a second time, where the first number of times is less than the second number of times. The second data refers to data that is cached in the TCP proxy of the source base station and has not been sent to the PDCP entity.

[0147] In some implementations, the processor 1100 is specifically used for:

[0148] The first message contained in the first data is sent to the target base station once. The first message refers to the message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device.

[0149] The second data is sent to the target base station twice.

[0150] In some implementations, the processor 1100 is also used for:

[0151] For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, including repeatedly sending the second message according to the number of times it is sent.

[0152] In some implementations, the processor 1100 is also used for:

[0153] The second message is encapsulated to obtain encapsulated data;

[0154] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0155] In some implementations, the processor 1100 is specifically used for:

[0156] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0157] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0158] In some implementations, the processor 1100 is also used for:

[0159] Receive a preprocessing message for cell handover, which includes information about the target cell. The target cell refers to the cell that the terminal device will access after performing a cell handover.

[0160] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0161] Example, Figure 11 This is a schematic diagram of the structure of a data switching device provided in an embodiment of this disclosure, as shown below. Figure 11 As shown, in some embodiments, the data switching device 1111 includes:

[0162] The first sending module 1112 is used to send the first data of the terminal device to the target base station in response to the terminal device switching from the source base station to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station.

[0163] The second sending module 1113 is used to send the second data of the terminal device to the target base station a second time, wherein the first number of times is less than the second number of times, and the second data refers to the data cached in the transmission control protocol TCP proxy of the source base station and not sent to the PDCP entity.

[0164] Since data cached in the TCP proxy needs to be transparently transmitted to the PDCP entity, which then sends it to the terminal device, the PDCP entity sends the cached data from the source base station to the terminal device. By sending the cached data from the PDCP entity to the target base station a first time, and then sending the cached data from the TCP proxy (but not yet sent to the PDCP entity) a second time, with the first number of transmissions being less than the second, the number of transmissions of the cached data in the PDCP entity is reduced. This prevents data loss that could prevent data from reaching the terminal device, as well as link drops and zero-rate drops caused by data loss. It also improves data switching efficiency and reduces resource consumption during data switching within the PDCP entity. Furthermore, sending the second batch of data to the target base station a second time (more than the first batch) prevents packet loss of data not yet sent to the PDCP entity, thus ensuring secure data switching, improving data transmission rate stability, and preventing zero-rate drops.

[0165] In some implementations, the first sending module 1112 is configured to: send a first message contained in the first data to the target base station once, wherein the first message refers to a message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device;

[0166] The second sending module 1113 is used to send the second data to the target base station twice.

[0167] Since the first packet cached in the PDCP entity has already been sent to the terminal device, but the terminal device has not yet acknowledged it, sending the first packet to the target base station once can prevent the terminal device from missing the first packet. The target base station can then resend the first packet to the terminal device based on the switchover data, while also reducing the number of times the first packet is sent, thus reducing the resource consumption of data switchover. Furthermore, sending the second data twice while sending the first packet only once effectively balances the resource consumption of data switchover with the probability of data loss.

[0168] In some embodiments, the data switching device 1111 further includes:

[0169] The configuration module is used to configure the number of times and the sending method of the second message contained in the first data and / or the second data. The sending method includes repeatedly sending the second message according to the number of times.

[0170] By configuring the number of times and the sending method of messages, different messages can be repeatedly sent with different numbers of times and methods. For example, messages that have been sent to the terminal device but have not been acknowledged by the terminal device can be repeatedly sent to the target base station with fewer times, while messages that have not been sent to the terminal device can be repeatedly sent to the target base station with relatively more times. This can prevent packet loss, improve the efficiency of data switching, and reduce the consumption of resources by data switching.

[0171] In some embodiments, the data switching device may further include:

[0172] The encapsulation module is used to encapsulate the second message to obtain encapsulated data;

[0173] The transmission method configured for the second message includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

[0174] The encapsulated data obtained from the second packet encapsulation is repeatedly read according to the number of transmissions, and the read encapsulated data is sent sequentially to the target base station, instead of being copied. This avoids the consumption of storage resources by data copying. In addition, encapsulating the second packet only once and repeatedly reading the encapsulated data to achieve repeated transmission of the second packet, rather than repeatedly encapsulating the second packet, can prevent header inconsistencies caused by repeated encapsulation, as well as repeated transmission failures caused by inconsistencies in the header of the same data packet.

[0175] In some implementations, the configuration module is used for:

[0176] Configure the number of times the second message is sent in the counter bit corresponding to the second message;

[0177] Configure the sending method of the second message in the flag bit corresponding to the sending method of the second message.

[0178] In some embodiments, the data switching device 1111 may further include:

[0179] The receiving module is used to receive preprocessing messages for cell handover. The preprocessing messages include information about the target cell, which refers to the cell that the terminal device will access after performing cell handover.

[0180] If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

[0181] After receiving the preprocessing message for cell handover, the terminal device is compared with the target cell to which it is to be switched to by the PDCP entity. If the target cell is not included in the PDCP entity's service object, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs, and the data switching method disclosed herein is executed. If the target cell to which the terminal device is to be switched is the service object of the PDCP entity, that is, the target cell to which the terminal device is to be switched is still the cell of the source base station, no data switching is performed, which can reduce unnecessary data switching and save resources.

[0182] It should be noted that the data switching device provided in this embodiment can implement all the method steps implemented in the above method embodiment and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.

[0183] It should also be noted that the division of units in the data switching device described in this embodiment is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0184] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this disclosure.

[0185] This disclosure also provides a processor-readable storage medium storing a program for causing a processor to perform the method of any of the above method embodiments.

[0186] In this embodiment of the disclosure, the processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0187] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0188] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0189] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0190] Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.

Claims

1. A data switching method, characterized in that, The method includes: In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station. The terminal device sends the second data to the target base station a second time, where the first number of times is less than the second number of times. The second data refers to data that is cached in the TCP proxy of the source base station and has not been sent to the PDCP entity.

2. The method according to claim 1, characterized in that, The step of sending the first data from the terminal device to the target base station includes: The first message contained in the first data is sent to the target base station once. The first message refers to a message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device. The step of sending the second data from the terminal device to the target base station includes: The second data is sent to the target base station twice.

3. The method according to claim 1 or 2, characterized in that, The method further includes: For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, wherein the sending method includes repeatedly sending the second message according to the number of times it is sent.

4. The method according to claim 3, characterized in that, The method further includes: The second message is encapsulated to obtain encapsulated data; The transmission method includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

5. The method according to claim 3, characterized in that, The step of configuring the number of times and the sending method of the second message contained in the first data and / or the second data includes: Configure the number of times the second message is sent on the counter bit corresponding to the second message; Configure the sending method of the second message on the flag bit corresponding to the sending method of the second message.

6. The method according to claim 1, characterized in that, The method further includes: The terminal device receives a preprocessing message for cell handover, the preprocessing message including information about the target cell, the target cell being the cell the terminal device will access after performing the cell handover; If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

7. A PDCP entity, characterized in that, Includes memory, transceiver, and processor; The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and execute the method as described in any one of claims 1-6.

8. A base station, characterized in that, Includes memory, transceiver, and processor; The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and execute the following method: In response to the terminal device switching from the source base station to the target base station, the terminal device sends the first data to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station. The terminal device sends the second data to the target base station a second time, where the first number of times is less than the second number of times. The second data refers to data that is cached in the TCP proxy of the source base station and has not been sent to the PDCP entity.

9. The base station according to claim 8, characterized in that, The processor is specifically used for: The first message contained in the first data is sent to the target base station once. The first message refers to a message that has been sent to the terminal device but has not received an acknowledgment message from the terminal device. The second data is sent to the target base station twice.

10. The base station according to claim 8 or 9, characterized in that, The processor is also used for: For the second message contained in the first data and / or the second data, configure the number of times the second message is sent and the sending method, wherein the sending method includes repeatedly sending the second message according to the number of times it is sent.

11. The base station according to claim 10, characterized in that, The processor is also used for: The second message is encapsulated to obtain encapsulated data; The transmission method includes repeatedly reading the encapsulated data according to the number of transmissions, and sequentially sending the read encapsulated data to the target base station.

12. The base station according to claim 10, characterized in that, The processor is specifically used for: Configure the number of times the second message is sent on the counter bit corresponding to the second message; Configure the sending method of the second message on the flag bit corresponding to the sending method of the second message.

13. The base station according to claim 8, characterized in that, The processor is also used for: The terminal device receives a preprocessing message for cell handover, the preprocessing message including information about the target cell, the target cell being the cell the terminal device will access after performing the cell handover; If the service object of the PDCP entity does not include the target cell, the terminal device is determined to switch from the source base station to the target base station to which the target cell belongs.

14. A data switching device, characterized in that, include: The first sending module is used to send the first data of the terminal device to the target base station in response to the terminal device switching from the source base station to the target base station. The first data refers to the data cached in the Packet Data Convergence Protocol (PDCP) entity of the source base station. The second sending module is used to send the second data of the terminal device to the target base station a second time, wherein the first number of times is less than the second number of times, and the second data refers to the data cached in the transmission control protocol TCP proxy of the source base station and not sent to the PDCP entity.

15. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a program for causing the processor to perform the method as described in any one of claims 1-6.