Data processing method and device and electronic equipment

By negotiating a second MTU larger than the negotiated MTU between the user terminal and the network server, the packet drop problem caused by MTU restrictions is solved, and the effective transmission of packets larger than the first MTU is achieved.

CN119729637APending Publication Date: 2025-03-28VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411866782.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

When a user terminal establishes a TCP connection with the network server, the negotiated maximum transmission unit (MTU) limit causes packets larger than the negotiated MTU to be discarded by the terminal and the transmission cannot be completed.

Method used

After receiving the packet greater than the first MTU, the terminal sends a negotiation message to the network side device to negotiate a second MTU greater than the first MTU, and saves a packet less than or equal to the second MTU according to the negotiation reply message.

Benefits of technology

By negotiating the second MTU, the terminal can effectively receive and save data packets larger than the first MTU, avoid packet loss and ensure the integrity of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729637A_ABST
    Figure CN119729637A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device and electronic equipment, and belongs to the technical field of communication. The method is executed by a terminal, and comprises the following steps: when a first data packet sent by network side equipment is received and the size of the first data packet is greater than a first maximum transmission unit (MTU), sending a negotiation message to the network side equipment; receiving a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used for indicating a second MTU, and the second MTU is larger than the first MTU; and when a second data packet sent by the network side device is received and the size of the second data packet is smaller than or equal to the second MTU, storing the second data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a data processing method, device and electronic equipment. Background Art

[0002] Currently, when a user terminal establishes a Transmission Control Protocol (TCP) connection with a network server, a Maximum Transmission Unit (MTU) used for network data transmission after the link connection is successful is negotiated.

[0003] However, in certain scenarios, a data packet larger than the negotiated MTU needs to be sent to the terminal. However, due to the negotiated MTU limit, when the data packet reaches the user terminal, it is discarded by the user terminal because it does not meet the specifications, resulting in the inability to complete data transmission. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a data processing method, device and electronic device, which can solve the problem that the required large data packets cannot be transmitted.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, which is executed by a terminal and includes:

[0006] Upon receiving a first data packet sent by a network side device, and the size of the first data packet is greater than a first maximum transmission unit MTU, sending a negotiation message to the network side device;

[0007] Receiving a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0008] When a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU, the second data packet is saved.

[0009] In a second aspect, an embodiment of the present application provides a data processing method, which is executed by a network side device, including:

[0010] The receiving terminal sends a negotiation message when receiving a first data packet sent by the network side device and the size of the first data packet is greater than the first MTU;

[0011] Sending a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0012] According to the second MTU, a second data packet is sent to the terminal; wherein the size of the second data packet is less than or equal to the second MTU.

[0013] In a third aspect, an embodiment of the present application provides a data processing device, including:

[0014] A first sending module, configured to send a negotiation message to the network side device when a first data packet sent by the network side device is received and the size of the first data packet is greater than a first maximum transmission unit MTU;

[0015] A first receiving module, configured to receive a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0016] The first processing module is used to save the second data packet when a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU.

[0017] In a fourth aspect, an embodiment of the present application provides a data processing device, including:

[0018] A second receiving module, configured to receive a negotiation message sent by the terminal when the terminal receives a first data packet sent by the network side device and the size of the first data packet is greater than the first MTU;

[0019] A second sending module, configured to send a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0020] A third sending module is used to send a second data packet to the terminal according to the second MTU; wherein the size of the second data packet is less than or equal to the second MTU.

[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0022] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0023] In the seventh aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect or the second aspect.

[0024] In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the second aspect.

[0025] In an embodiment of the present application, after receiving a first data packet larger than the first MTU, the terminal sends a negotiation message to the network side device, and then receives a negotiation response message including a second MTU sent by the network side device based on the negotiation message. When receiving a second data packet sent by the network side device, the second data packet is saved. That is to say, the terminal can save the second data packet sent by the network side device that is less than or equal to the second MTU based on the negotiated second MTU, thereby ensuring the transmission of data packets larger than the first MTU between the network side device and the terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is one of the method flow diagrams of the embodiment of the present application;

[0027] Figure 2 It is a schematic diagram of the application of the method of the embodiment of the present application;

[0028] Figure 3 This is the second schematic diagram of the method flow of the embodiment of the present application;

[0029] Figure 4 yes Figure 1 Schematic diagram of the corresponding device module;

[0030] Figure 5 yes Figure 3 Schematic diagram of the corresponding device module;

[0031] Figure 6 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0032] Figure 7 It is a schematic diagram of the structure of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0035] For ease of understanding, some contents involved in the embodiments of the present application are described below:

[0036] MTU refers to the maximum data packet size that can be passed on a certain layer of a communication protocol.

[0037] When the user terminal establishes a TCP connection with the network server, it sends its own MTU to the other party through the TCP three-way handshake message, and selects the smaller MTU from the terminal MTU and the network server MTU as the MTU used for network data transmission after the link connection is successful. The size of the data packet sent by the user terminal and the network server will not exceed the negotiated MTU, that is, when the size of the data to be sent by the user terminal and the network server exceeds the negotiated MTU, the data will be sent in fragments to ensure that the data packet sent will not exceed the negotiated MTU. On the other hand, after the terminal and the network server negotiate the MTU, if the data packet received from the other end is larger than the MTU, the data packet will be discarded.

[0038] In addition, after the terminal and the network server negotiate the MTU, if the network server needs to send a data packet larger than the negotiated MTU to the terminal in a specific scenario, the network server will send the data packet to the terminal, but the terminal will discard the data packet based on the negotiated MTU.

[0039] The data processing method, device and electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0040] like Figure 1 As shown, a data processing method in an embodiment of the present application, which is executed by a terminal, includes:

[0041] Step 101: upon receiving a first data packet sent by a network side device, and the size of the first data packet is larger than a first maximum transmission unit MTU, a negotiation message is sent to the network side device.

[0042] Here, the first MTU is the MTU negotiated by the terminal and the network side device through the TCP three-way handshake. The terminal sends and receives data packets according to the first MTU, and the network side device also sends and receives data packets according to the first MTU. The first data packet is sent by the network side device when a large data packet (abnormal data packet) needs to be sent in a specific scenario. The specific scenario can be understood as an abnormal data packet sending scenario. At this time, the size of the data packet sent by the network side device is not limited by the first MTU.

[0043] When the terminal receives the first data packet and learns that there is a need to transmit a large data packet, it sends a negotiation message to the network-side device to negotiate an MTU that can complete the transmission of the large data packet based on the abnormal data packet.

[0044] Step 102: Receive a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU.

[0045] After step 101, after receiving the negotiation information sent by the terminal, the network side device can determine a second MTU larger than the first MTU according to the indication of the negotiation message, and inform the terminal of the second MTU through a negotiation response message. The terminal can then receive the negotiation response message according to step 102 and obtain the second MTU.

[0046] Step 103: When a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU, save the second data packet.

[0047] In this step, the terminal can save the second data packet sent by the network side device based on the second MTU learned in step 102. Of course, the terminal can discard the data packet larger than the second MTU.

[0048] In this way, according to the above steps 101-103, after receiving the first data packet larger than the first MTU, the terminal will send a negotiation message to the network side device, and then receive the negotiation response message including the second MTU sent by the network side device according to the negotiation message, and when receiving the second data packet sent by the network side device, the second data packet is saved. That is to say, the terminal can save the second data packet sent by the network side device that is less than or equal to the second MTU based on the negotiated second MTU, thereby ensuring the transmission of data packets larger than the first MTU between the network side device and the terminal.

[0049] The network side device may be a network server. At this time, the first data packet is a data packet received by the network server from a third-party server that is larger than the first MTU, or a data packet of the network server itself that is larger than the first MTU.

[0050] It should be understood that, in this embodiment, the process of the terminal and the network side device negotiating the first MTU through the TCP three-way handshake includes steps 1-2:

[0051] 1. The terminal initiates a data connection establishment to the network side device.

[0052] That is, the terminal sends a synchronization sequence number (SYN) to the network side device for the first TCP handshake, which carries the size of the MTU supported by itself. This MTU is the maximum data packet size that the terminal can handle, so as to establish a data connection with the network side device.

[0053] 2. The network-side device responds to the data connection and negotiates the MTU size.

[0054] That is, after the network server receives the SYN from the terminal, it will parse out the MTU size carried by the SYN sent by the terminal, and set this value as its upstream MTU size (also called the sending MTU size), that is, the size of the data packet sent by the network side device to the terminal will not exceed the terminal's processing capacity. At the same time, the network side device sends [SYN, ACK] to the terminal for the second TCP handshake, which carries the downstream MTU size supported by the network side device (also called the receiving MTU size). When the terminal receives the downstream MTU size of the network side device, it also sets this value as its upstream MTU size, and replies ACK to the network side device for the third TCP handshake. Finally, a TCP connection is established between the terminal and the network server, and the upstream and downstream MTU sizes, that is, the first MTU, are negotiated.

[0055] Optionally, in this embodiment, the negotiation message includes at least one of the following:

[0056] the first data packet;

[0057] A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

[0058] That is, after receiving the first data packet sent by the network side device, the terminal can send the first data packet to the network side device so that the network side device can determine the size of the first data packet by parsing and further determine the second MTU. After receiving the first data packet sent by the network side device, the terminal can also determine the size of the first data packet by parsing the data packet and determine the third MTU based on the determined size of the first data packet, such as using the determined size of the first data packet as the third MTU so that the network side device can determine the second MTU based on the third MTU.

[0059] Among them, after the terminal sends a negotiation message (such as the negotiation message includes a first data packet), the terminal may not save the first data packet and wait for the network side device to send the first data packet again as a second data packet; or, after the terminal sends a negotiation message (such as the negotiation message includes a third MTU), the terminal may directly save the first data packet, and the second data packet sent by the network side device is different from the first data packet.

[0060] Optionally, after obtaining the third MTU, the terminal sets the third MTU as the reverse MTU size of the terminal. Afterwards, the terminal sends a negotiation message to the network side device.

[0061] Optionally, in this embodiment, the second MTU is one of the third MTU and the fourth MTU;

[0062] The fourth MTU is determined by the size of the first data packet determined by the network side device.

[0063] Optionally, after receiving the first data packet sent by the terminal, the network side device determines the size of the first data packet, that is, the fourth MTU, by parsing, and uses the fourth MTU as the second MTU.

[0064] Optionally, after receiving the third MTU sent by the terminal, the network side device directly uses the third MTU as the second MTU.

[0065] Optionally, the network side device selects one of the third MTU and the fourth MTU as the second MTU. For example, the minimum value or the maximum value of the third MTU and the fourth MTU is selected as the second MTU.

[0066] Optionally, after obtaining the second MTU, the network side device sets the second MTU as the reverse MTUsize of the network side device. Afterwards, the network side device sends the second data packet to the terminal.

[0067] In addition, to prevent the network side device from setting the reverse MTU size too frequently, optionally, in this embodiment, the network side device determines the second MTU based on the maximum third MTU or the first data packet received in the set time length t or number of times n. The values ​​of t and n can be predefined or configured.

[0068] Of course, if the network side device cannot process the first data packet, the reverse MTU size is not set.

[0069] Optionally, in this embodiment, after receiving the negotiation response message, the terminal sets the reverse MTU size of the terminal based on the second MTU indicated by the negotiation response message. The second MTU is the reverse MTU size recognized by the network side device.

[0070] Optionally, in this embodiment, the second data packet is transmitted within a valid time of the second MTU.

[0071] That is, the second MTU has a specific validity period. The terminal compares the size of the data packet received within the validity period with the second MTU, and saves the data packet whose size is less than or equal to the second MTU.

[0072] Optionally, in this embodiment, the method further includes:

[0073] In the case where the first field of the negotiation response message is set to be empty or 0, and / or a third data packet is received outside the valid time of the second MTU,

[0074] If the size of the third data packet is larger than the first MTU, discarding the third data packet;

[0075] The first field is used to indicate the second MTU.

[0076] Here, the first field of the negotiation response message is used to indicate the second MTU. When the first field is set to empty or 0, and / or the valid time of the second MTU times out, the terminal no longer applies the second MTU to the received third data packet, but resumes comparing its size with the first MTU, discarding data packets whose size is larger than the first MTU, and retaining data packets whose size is less than or equal to the first MTU.

[0077] That is, when the first field is set to empty or 0, and / or the valid time of the second MTU times out, the terminal and the network side device do not set or cancel the reverse MTU size, and the MTU size set based on the first MTU is used for data packet transmission processing.

[0078] Of course, the terminal may also use the third data packet as the first data packet, restart the above steps, and negotiate a new second MTU.

[0079] Optionally, the first data packet and the third data packet belong to the same application, or belong to different applications, which is not limited in this embodiment.

[0080] Next, combine Figure 2 The application of the method of the embodiment of the present application is described as follows:

[0081] Step 201: The network server sends a data packet larger than a first MTU to a terminal.

[0082] That is, the network server receives a first data packet from a third-party server or the network server itself that is larger than the first MTU, and the network server sends the first data packet to the terminal.

[0083] Step 202: The terminal parses the data packet and sets the reverse MTU size.

[0084] That is, when the terminal receives the first data packet sent by the network server, it will parse the size of the first data packet, compare the size of the first data packet (the third MTU) with the first MTU, and if the third MTU exceeds the first MTU, set the third MTU as the reverse MTU size of the terminal.

[0085] Step 203: The terminal sends a negotiation message to the network server, carrying the first data packet and the third MTU.

[0086] That is, after the terminal sets the reverse MTU size in step 202, it will immediately establish a data connection with the network server, send a negotiation message, and send the first data packet and the third MTU to the network server.

[0087] Step 204: The network server responds to the negotiation message and parses the size and the first MTU of the first data packet.

[0088] That is, when the network server receives the first data packet sent by the terminal, the network server will parse out the size and the third MTU of the first data packet. At this time, if the network server can process the first data packet normally, the second MTU is determined by the size of the first data packet (the fourth MTU) and one of the third MTU, and it is set as the reverse MTU size of the network server, and a negotiation response message is sent to the terminal, such as data packet feedback signaling, indicating the second MTU. Here, in order to avoid setting the reverse MTU size too frequently, the largest third MTU or the size of the first data packet received from the terminal within the set time length t or the number of times n can be used as the reverse MTU size. If the network server cannot process the first data packet, the reverse MTU size is not set.

[0089] Step 205: The network server sends a negotiation response message to the terminal, indicating the second MTU.

[0090] That is, after setting the reverse MTU size, the network server will send a negotiation response message to the terminal, carrying the reverse MTU size recognized by the network server, that is, the second MTU.

[0091] Step 206: The terminal sets the MTU size and receives the data packet.

[0092] That is, when the terminal receives the negotiation response message sent by the network server, it will parse the second MTU and use the second MTU as the reverse MTU size of the terminal; if the field indicating the second MTU in the negotiation response message is empty or 0, the terminal does not set the reverse MTU size. The terminal receives the data packet from the network server according to the reverse MTU size and updates the reverse MTU size in real time.

[0093] However, when the application to which the first data packet belongs is disconnected or exits the application, the terminal and the network server set the reverse MTU size to empty or cancel the reverse MTU size. When the application is started again, the second MTU is renegotiated and the reverse MTU size is set.

[0094] It should also be known that, in this embodiment, the reverse MTU size newly set by the terminal is the receiving MTU size of the terminal, and the reverse MTU size newly set by the network side device is the sending MTU size of the network side device.

[0095] The first MTU, the second MTU, the third MTU, and the fourth MTU are actually the size values ​​of the MTU.

[0096] In summary, the method of the embodiment of the present application negotiates a second MTU for abnormal data packets between the terminal and the network side device, which can avoid the problem of only setting a first MTU, and when the first MTU is smaller than its own processing capacity, it cannot process the received data packets larger than the first MTU, thereby reducing the probability of packet loss. For data packets of the same application, it can prevent problems such as the application being unable to open halfway or the call being disconnected.

[0097] Moreover, the reverse MTU size temporarily set by the second MTU is based on the application setting. Different applications set different reverse MTU sizes. After the application exits, it is restored to the first MTU, which expands the flexibility of MTU application. The size of the data packet sent by the terminal or network side device depends on the processing capability of the other end, and is not limited by its own data packet processing capability, so that unnecessary data packet fragmentation can be reduced when sending data, thereby reducing packet loss and packet disorder problems.

[0098] like Figure 3 As shown, a data processing method in an embodiment of the present application is executed by a network side device, including:

[0099] Step 301: A negotiation message sent by a receiving terminal when a first data packet sent by the network side device is received and the size of the first data packet is greater than a first MTU;

[0100] Step 302: Send a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0101] Step 303: Send a second data packet to the terminal according to the second MTU; wherein the size of the second data packet is less than or equal to the second MTU.

[0102] In this way, according to the above steps 301-303, after the network side device sends the first data packet larger than the first MTU, the terminal can send a negotiation message to the network side device, and then the network side device sends a negotiation response message indicating the second MTU in response to the negotiation message. In this way, when sending the second data packet, the terminal can save the second data packet less than or equal to the second MTU to ensure the transmission of data packets larger than the first MTU between the network side device and the terminal.

[0103] Optionally, the negotiation message includes at least one of the following:

[0104] the first data packet;

[0105] A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

[0106] Optionally, the sending a negotiation response message according to the negotiation message includes:

[0107] In a case where the negotiation message includes the first data packet, obtaining a fourth MTU by parsing the first data packet;

[0108] The fourth MTU is used as the second MTU, and the negotiation response message is generated and sent.

[0109] That is, after receiving the first data packet sent by the terminal, the network side device determines the size of the first data packet, that is, the fourth MTU, through analysis, and uses the fourth MTU as the second MTU.

[0110] Optionally, the sending a negotiation response message according to the negotiation message includes:

[0111] In a case where the negotiation message includes the third MTU, the third MTU is used as the second MTU, and the negotiation response message is generated and sent.

[0112] That is to say, after the network side device receives the third MTU sent by the terminal, it directly uses the third MTU as the second MTU.

[0113] Optionally, the sending a negotiation response message according to the negotiation message includes:

[0114] In a case where the negotiation message includes the first data packet and the third MTU, obtaining a fourth MTU by parsing the first data packet;

[0115] Select one of the fourth MTU and the third MTU as the second MTU, and generate and send the negotiation response message.

[0116] That is, after receiving the first data packet sent by the terminal, the network side device determines the size of the first data packet, that is, the fourth MTU, by parsing. Since the network side device also receives the third MTU, the network side device selects one of the third MTU and the fourth MTU as the second MTU. For example, the minimum or maximum value of the third MTU and the fourth MTU is selected as the second MTU.

[0117] Optionally, the second data packet is transmitted within a valid time of the second MTU.

[0118] That is, the terminal will compare the size of the data packet received within the valid time with the second MTU, and save the data packet whose size is less than or equal to the second MTU.

[0119] Optionally, the method further comprises:

[0120] When the first field of the negotiation response message is set to be empty or 0, and / or when a third data packet needs to be transmitted outside the valid time of the second MTU, sending a third data packet to the terminal;

[0121] The size of the third data packet is larger than the first MTU.

[0122] Here, the first field is used to indicate the second MTU. The first field is set to empty or 0, and / or the validity period of the second MTU times out, which can be understood as the failure of the second MTU, that is, the terminal and the network side device do not set or cancel the reverse MTUsize. The third data packet is an abnormal data packet, that is, the network side device can send a data packet larger than the first MTU to the terminal in a specific scenario based on the first MTU. When the terminal receives the third data packet, it will resume comparing its size with the first MTU and retain data packets whose size is less than or equal to the first MTU.

[0123] Optionally, the third data packet and the first data packet originate from the same application.

[0124] It should be noted that this method is implemented in conjunction with the above-mentioned method executed by the terminal, and the implementation method of the above-mentioned method embodiment is applicable to this method and can achieve the same technical effect.

[0125] The data processing method provided in the embodiment of the present application can be executed by a data processing device. In the embodiment of the present application, the data processing device provided in the embodiment of the present application is described by taking the data processing method executed by the data processing device as an example.

[0126] like Figure 4 As shown, a data processing device according to an embodiment of the present application includes:

[0127] A first sending module 410 is configured to send a negotiation message to the network side device when a first data packet sent by the network side device is received and the size of the first data packet is greater than a first maximum transmission unit MTU;

[0128] A first receiving module 420 is configured to receive a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0129] The first processing module 430 is configured to save the second data packet when a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU.

[0130] After receiving a first data packet larger than the first MTU, the device sends a negotiation message to the network side device, and then receives a negotiation response message including a second MTU sent by the network side device based on the negotiation message. When receiving a second data packet sent by the network side device, the device saves the second data packet. That is, the terminal can save the second data packet sent by the network side device that is less than or equal to the second MTU based on the negotiated second MTU, thereby ensuring the transmission of data packets larger than the first MTU between the network side device and the terminal.

[0131] Optionally, the negotiation message includes at least one of the following:

[0132] the first data packet;

[0133] A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

[0134] Optionally, the second MTU is one of the third MTU and the fourth MTU;

[0135] The fourth MTU is determined by the size of the first data packet determined by the network side device.

[0136] Optionally, the second data packet is transmitted within a valid time of the second MTU.

[0137] Optionally, the device further comprises:

[0138] The second processing module is configured to, when the first field of the negotiation response message is set to be empty or 0 and / or, when a third data packet is received outside the valid time of the second MTU,

[0139] If the size of the third data packet is larger than the first MTU, discarding the third data packet;

[0140] The first field is used to indicate the second MTU.

[0141] The data processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0142] The data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0143] The data processing device provided in the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0144] like Figure 5 As shown, a data processing device according to an embodiment of the present application includes:

[0145] The second receiving module 510 is used to receive a negotiation message sent by the terminal when the terminal receives a first data packet sent by the network side device and the size of the first data packet is greater than the first MTU;

[0146] A second sending module 520 is used to send a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0147] The third sending module 530 is used to send a second data packet to the terminal according to the second MTU; wherein the size of the second data packet is less than or equal to the second MTU.

[0148] Optionally, the negotiation message includes at least one of the following:

[0149] the first data packet;

[0150] A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

[0151] Optionally, the second sending module further includes:

[0152] A first processing unit, configured to obtain a fourth MTU by parsing the first data packet when the negotiation message includes the first data packet;

[0153] The first sending unit is configured to use the fourth MTU as the second MTU to generate and send the negotiation response message.

[0154] Optionally, the second sending module further includes:

[0155] The second sending unit is configured to, when the negotiation message includes the third MTU, use the third MTU as the second MTU to generate and send the negotiation response message.

[0156] Optionally, the second sending module further includes:

[0157] a second processing unit, configured to obtain a fourth MTU by parsing the first data packet when the negotiation message includes the first data packet and the third MTU;

[0158] A third sending unit is configured to select one of the fourth MTU and the third MTU as the second MTU, and generate and send the negotiation response message

[0159] Optionally, the second data packet is transmitted within a valid time of the second MTU.

[0160] The data processing device in the embodiment of the present application may be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a server.

[0161] The data processing device provided in the embodiment of the present application can realize Figure 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0162] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores programs or instructions that can be executed on the processor 601, and when the program or instructions are executed by the processor 601, the various steps of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0163] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0164] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0165] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

[0166] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0167] The radio frequency unit 701 is configured to send a negotiation message to the network side device when a first data packet sent by the network side device is received and the size of the first data packet is greater than the first maximum transmission unit MTU;

[0168] The radio frequency unit 701 is further configured to receive a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU;

[0169] The processor 710 is configured to save the second data packet when a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU.

[0170] After receiving the first data packet larger than the first MTU, the electronic device will send a negotiation message to the network side device, and then, by receiving the negotiation response message indicating the second MTU sent by the network side device according to the negotiation message, the second data packet sent by the network side device can be saved. That is to say, the terminal can save the second data packet sent by the network side device that is less than or equal to the second MTU based on the negotiated second MTU to ensure the transmission of data packets larger than the first MTU between the network side device and the terminal, and meet the need to send large data packets (abnormal data packets) in specific scenarios.

[0171] Optionally, the negotiation message includes at least one of the following:

[0172] the first data packet;

[0173] A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

[0174] Optionally, the second MTU is one of the third MTU and the fourth MTU;

[0175] The fourth MTU is determined by the size of the first data packet determined by the network side device.

[0176] Optionally, the second data packet is transmitted within a valid time of the second MTU.

[0177] Optionally, the processor 710 is further configured to:

[0178] In the case where the first field of the negotiation response message is set to be empty or 0, and / or a third data packet is received outside the valid time of the second MTU,

[0179] If the size of the third data packet is larger than the first MTU, discarding the third data packet;

[0180] The first field is used to indicate the second MTU.

[0181] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0182] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0183] The processor 710 may include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.

[0184] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0185] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0186] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0187] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0188] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned data processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0189] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0190] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0191] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data processing method, characterized in that: Executed by the terminal, including: When a first data packet sent by a network side device is received and the size of the first data packet is greater than a first maximum transmission unit MTU, a negotiation message is sent to the network side device; Receiving a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU; When a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU, the second data packet is saved.

2. The method according to claim 1, characterized in that The negotiation message includes at least one of the following: the first data packet; A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

3. The method according to claim 2, characterized in that The second MTU is one of the third MTU and the fourth MTU; The fourth MTU is determined by the size of the first data packet determined by the network side device.

4. The method according to claim 1, characterized in that: The second data packet is transmitted within the valid time of the second MTU.

5. The method according to claim 1, characterized in that: Also includes: In the case where the first field of the negotiation response message is set to be empty or 0, and / or a third data packet is received outside the valid time of the second MTU, If the size of the third data packet is larger than the first MTU, discarding the third data packet; The first field is used to indicate the second MTU.

6. A data processing method, characterized in that: Executed by network-side devices, including: A negotiation message sent by a receiving terminal when a first data packet sent by the network side device is received and a size of the first data packet is greater than a first MTU; Sending a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU; According to the second MTU, a second data packet is sent to the terminal; wherein the size of the second data packet is less than or equal to the second MTU.

7. The method according to claim 6, characterized in that The negotiation message includes at least one of the following: the first data packet; A third MTU, where the third MTU is determined by the size of the first data packet determined by the terminal.

8. The method according to claim 7, characterized in that The sending of the negotiation response message according to the negotiation message includes: obtaining a fourth MTU by parsing the first data packet when the negotiation message includes the first data packet; The fourth MTU is used as the second MTU, and the negotiation response message is generated and sent.

9. The method according to claim 7, characterized in that: The sending a negotiation response message according to the negotiation message includes: In a case where the negotiation message includes the third MTU, the third MTU is used as the second MTU, and the negotiation response message is generated and sent.

10. The method according to claim 7, characterized in that The sending a negotiation response message according to the negotiation message includes: In a case where the negotiation message includes the first data packet and the third MTU, obtaining a fourth MTU by parsing the first data packet; Select one of the fourth MTU and the third MTU as the second MTU, and generate and send the negotiation response message.

11. The method according to claim 6, characterized in that The second data packet is transmitted within the valid time of the second MTU.

12. A data processing device, characterized in that: include: A first sending module, configured to send a negotiation message to the network side device when a first data packet sent by the network side device is received and the size of the first data packet is greater than a first MTU; A first receiving module, configured to receive a negotiation response message sent by the network side device according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU; The first processing module is used to save the second data packet when a second data packet sent by the network side device is received and the size of the second data packet is less than or equal to the second MTU.

13. A data processing device, characterized in that: include: A second receiving module, configured to receive a negotiation message sent by the terminal when receiving a first data packet sent by the network side device and the size of the first data packet is greater than the first MTU; A second sending module, configured to send a negotiation response message according to the negotiation message; wherein the negotiation response message is used to indicate a second MTU, and the second MTU is greater than the first MTU; A third sending module is used to send a second data packet to the terminal according to the second MTU; wherein the size of the second data packet is less than or equal to the second MTU.

14. An electronic device, characterized in that: It includes a processor and a memory, the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the data processing method as described in any one of claims 1 to 5, or the steps of the data processing method as described in any one of claims 6 to 11.

15. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 5, or the steps of the data processing method according to any one of claims 6 to 11 are implemented.