Data Transmission Method, Device, Electronic Device and Computer Storage Medium
By adding state information to the data of the first protocol layer during data transmission, the problems of poor adaptability and inaccurate acquisition of state information in the prior art are solved, and more efficient and flexible data transmission optimization is achieved.
Patent Information
- Application Number
- CN202010717755.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-23
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2040-07-23
AI Technical Summary
The prior art has poor adaptability in data transmission optimization and lacks accurate and universal state information acquisition methods, resulting in data transmission optimization not being timely and accurate enough.
By acquiring application layer data in the network protocol and state information related to the network, state information is added to the data of the first protocol layer, the second transmission data is formed, and the transmission is transmitted. The receiving end parses the second transmission data to obtain status information and adjusts network parameters according to the status information for data transmission.
This method does not require the analysis and modification of application-level data, and is more adaptable and scalable, and can optimize data transmission and transmission more accurately and timely.
Smart Images

Figure CN113973134B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communication technologies, and in particular, to a data transmission method, apparatus, electronic device, and computer storage medium. Background Art
[0002] With the development of communication technologies, the efficiency of data transmission is getting higher and higher. To further improve the data transmission efficiency, network devices in a communication network can parse application layer data according to the application layer protocol in the network protocol, so as to optimize data transmission. However, in the process of implementing the above data transmission optimization, because there are many types of application layer protocols, the adaptability of this data transmission optimization solution is poor. On the other hand, the application layer protocol can optimize the data transmission protocol according to the network link state information, but there is no more accurate and general state information acquisition method, resulting in the data transmission optimization solution being not timely and accurate enough. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a data transmission method, apparatus, electronic device, and computer storage medium to solve some or all of the above problems.
[0004] According to a first aspect of embodiments of the present invention, there is provided a data transmission method, including: obtaining first transmission data, where the first transmission data includes data of the application layer in a network protocol; obtaining status information related to the network; for the first transmission data, adding the status information to the data in the first protocol layer to obtain second transmission data, where the first transmission data includes data of the first protocol layer in the network protocol, and the first protocol layer is different from the application layer; and sending the second transmission data.
[0005] According to a second aspect of embodiments of the present invention, there is provided a data transmission method, including: receiving second transmission data, where the second transmission data includes data of the application layer and data of the first protocol layer in a network protocol, and the first protocol layer is different from the application layer; parsing the second transmission data, obtaining status information in the data of the first protocol layer, where the status information is used to indicate the state of the network; adjusting network parameters according to the status information, and transmitting data according to the adjusted network parameters.
[0006] According to a third aspect of embodiments of the present invention, there is provided a data transmission apparatus, including: an obtaining module, configured to obtain first transmission data, where the first transmission data includes data of the application layer in a network protocol; a status module, configured to obtain status information related to the network; a processing module, configured to, for the first transmission data, add the status information to the data in the first protocol layer to obtain second transmission data, where the first transmission data includes data of the first protocol layer in the network protocol, and the first protocol layer is different from the application layer; and a sending module, configured to send the second transmission data.
[0007] According to a fourth aspect of an embodiment of the present invention, there is provided a data transmission device, including: a receiving module, configured to receive second transmission data, where the second transmission data includes data of an application layer in a network protocol and data of a first protocol layer, and the first protocol layer is different from the application layer; an analysis module, configured to analyze the second transmission data, and obtain status information from the data of the first protocol layer, where the status information is used to indicate the status of the network; and a transmission module, configured to adjust network parameters according to the status information, and transmit data according to the adjusted network parameters.
[0008] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, including: a processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the data transmission method according to the first aspect or the second aspect.
[0009] According to a sixth aspect of an embodiment of the present invention, there is provided a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the data transmission method according to the first aspect or the second aspect.
[0010] The data transmission method, device, electronic device, and computer storage medium provided by the embodiments of the present invention obtain first transmission data, where the first transmission data includes data of an application layer in a network protocol; obtain status information related to the network; for the first transmission data, add the status information to the data of the first protocol layer to obtain second transmission data, where the first transmission data includes data of a first protocol layer in a network protocol, and the first protocol layer is different from the application layer; and send the second transmission data. Since the status information is added to the data of the first protocol layer, it is not necessary to analyze and modify the application layer data, but to obtain the status information from the data of the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability. Description of the Drawings
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings.
[0012] Figure 1 It is a schematic diagram of a scenario of a data transmission method provided in Embodiment 1 of the present application;
[0013] Figure 2 It is a flowchart of a data transmission method provided in Embodiment 1 of the present application;
[0014] Figure 3 The flowchart of a data transmission method provided in the second embodiment of this application;
[0015] Figure 4 The schematic diagram of the scenario of a data transmission method provided in the third embodiment of this application;
[0016] Figure 5 The interaction diagram of a data transmission method provided in the third embodiment of this application;
[0017] Figure 6 The structural block diagram of a data transmission device provided in the fourth embodiment of this application;
[0018] Figure 7 The structural block diagram of a data transmission device provided in the fifth embodiment of this application;
[0019] Figure 8 The structural schematic diagram of an electronic device provided in the sixth embodiment of this application. Detailed implementation manners
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art shall fall within the protection scope of the embodiments of the present invention.
[0021] The following further illustrates the specific implementation of the embodiments of the present invention with reference to the accompanying drawings of the embodiments of the present invention.
[0022] Embodiment 1
[0023] The first embodiment of this application provides a data transmission method, which is applied to a network device. For the convenience of understanding, the application scenario of the data transmission method provided in the first embodiment of this application is described. Refer to Figure 1 as shown Figure 1 The schematic diagram of the scenario of a data transmission method provided in the first embodiment of this application. Figure 1 The scenario shown includes a network device 101 and a terminal device 102; the network device 101 may be the device that executes the data transmission method provided in the first embodiment of this application.
[0024] The terminal device 102 can be a smart phone, a tablet computer, a laptop computer, a smart speaker, etc. The terminal device 102 can also access the network through the network device 101 and perform data interaction through the network. In this application, the network includes a local area network (English: Local Area Network, LAN), a wide area network (English: Wide Area Network, WAN), and a mobile communication network; such as the World Wide Web (English: World Wide Web, WWW), Long Term Evolution (English: Long Term Evolution, LTE) network, 2G network (English: 2th Generation Mobile Network), 3G network (English: 3th Generation Mobile Network), 5G network (English: 5th Generation Mobile Network), etc. Of course, this is only an exemplary illustration here and does not represent that this application is limited to this. The network device 103 can include various devices connected through the network, for example, servers, relay devices, device-to-device (English: Device-to-Device, D2D) devices, base stations, etc.
[0025] As Figure 1 shown, the network device 101 can receive the data sent by the terminal device, add status information to the data in the first protocol layer, and then send the data after adding the status information through the network. Combining Figure 1 shown scenarios, the data transmission method provided in Embodiment 1 of this application will be described in detail. It should be noted that Figure 1 is only an application scenario of the data transmission method provided in Embodiment 1 of this application and does not represent that the data transmission method must be applied to Figure 1 shown scenarios. Referring to Figure 2 shown, Figure 2 is a flowchart of a data transmission method provided in Embodiment 1 of this application. The method includes the following steps:
[0026] Step 201, obtain the first transmission data.
[0027] The first transmission data includes the data in the application layer of the network protocol. The network protocol can be a seven-layer protocol, a four-layer protocol, etc. For example, the seven-layer protocol includes the application layer, the presentation layer, the session layer, the transport layer, the network layer, the data link layer, and the physical layer; another example is that the four-layer protocol includes the application layer, the network layer, the data link layer, and the physical layer. Of course, this is only an exemplary illustration here and does not represent that this application is limited to this.
[0028] Step 202, obtain the status information related to the network.
[0029] The network can be the network to which the network device that executes the data transmission method belongs, that is, the current network, or it can be other networks. This application does not limit this. The status information can indicate network bandwidth, the location of the terminal device, the cell to which the terminal device belongs, the congestion status of the network, etc. The terminal device can be the device that sends the first transmission data, that is, the source of the first transmission data. Here, five specific examples are listed and described respectively:
[0030] Optionally, in the first example, obtaining status information related to the network includes: obtaining the network bandwidth and generating status information, where the status information includes information about the network bandwidth. The network device can detect the network bandwidth and generate status information based on the detected network bandwidth, or it can be that the network device receives the network bandwidth detected by the detection device and generates status information. This application does not limit the source of the status information. It can be detected by the network device itself or the result received from other detection devices.
[0031] Optionally, in the second example, obtaining status information related to the network includes: obtaining location information and generating status information. The location information is used to indicate the location of the terminal device corresponding to the first transmission data, and the status information includes the location information. The terminal device corresponding to the first transmission data can be the terminal device that sends the first transmission data. The location of the terminal device can be determined by the network device according to the data transmission path, or it can be determined according to the location of the router or base station connected to the terminal device. This application does not limit this.
[0032] Optionally, in the third example, obtaining status information related to the network includes:
[0033] obtaining cell information and generating status information. The cell information is used to indicate the network status of the cell to which the terminal device corresponding to the first transmission data belongs, and the status information includes the cell information. In the third example, the terminal device is communicatively connected to the base station, and the corresponding cell information can be obtained according to the information of the base station.
[0034] Optionally, in the fourth example, obtaining status information related to the network includes: generating status information according to the congestion status of the network. The congestion status of the network can be detected by the network device or sent to the network device by other devices after detection.
[0035] Optionally, in the fifth example, obtaining status information related to the network includes: generating status information according to the transmission delay of the network. The transmission delay of the network can be determined by the network device according to the delay of receiving data, or it can be sent to the network device by other devices after detection.
[0036] The above five examples only illustrate the content that the status information can include, and do not represent that this application is limited thereto. The status information can be used to indicate the status of the network or the status of the devices in the network.
[0037] It should be noted that step 201 and step 202 may not have a sequential order and can be executed simultaneously or not simultaneously. This application does not limit this. After step 201 and step 202, the method further includes:
[0038] Step 203: For the first transmission data, add status information to the data in the first protocol layer to obtain the second transmission data.
[0039] The first transmission data includes the data in the first protocol layer in the network protocol, and the first protocol layer is different from the application layer. The first protocol layer can be a non-application layer, that is, other protocol layers except the application layer; or, it can also be said that the first protocol layer is the lower layer of the application layer, because the application layer is usually the top layer in the network protocol, and the data of the first protocol layer is the lower layer data of the application layer. It should be noted that the network protocol can be a seven-layer protocol, a four-layer protocol, etc. For example, the seven-layer protocol includes the application layer, presentation layer, session layer, transport layer, network layer, data link layer, and physical layer; another example is that the four-layer protocol includes the application layer, network layer, data link layer, and physical layer. Of course, this is only an exemplary illustration here and does not represent that this application is limited thereto. In the seven-layer protocol and the four-layer protocol, the application layer is the top layer, and the first protocol layer can be the presentation layer, session layer, transport layer, network layer, data link layer, or the first protocol layer can also be the network layer, data link layer, physical layer, and these all belong to the lower layer of the application layer. The data of the first protocol layer can include transport layer data, network layer data, data link layer data, physical layer data, etc. Adding status information to the data of the first protocol layer will not change the protocol of the application layer, avoid affecting the data of the application layer, and because it does not involve the protocol of the application layer, it has better adaptability and scalability.
[0040] An extension header can be added to the transport layer data or the data of the second protocol layer. The second protocol layer can be other layers in the network protocol except the application layer and the transport layer. Add the status information to the extension header to obtain the second transmission data. For example, optionally, for the first transmission data, adding status information to the data in the first protocol layer to obtain the second transmission data includes: for the first transmission data, adding an extension header to the transport layer data, and the data of the first protocol layer includes the transport layer data; adding the status information to the extension header of the transport layer to obtain the second transmission data.
[0041] An extension header is added to the data in the transport layer without changing the original fields in the transport layer and without causing major changes to the transport layer protocol, further enhancing adaptability and scalability. It should be noted that the unused free fields in the data of the transport layer can be set as the extension header, or the free data bits in the data of the transport layer can be set as the extension header. Alternatively, if there is already an extension header in the data of the transport layer, only the data bits of the extension header need to be increased and status information can be added to the newly added data bits. Of course, this is only an exemplary illustration here and does not mean that the present application is limited to this.
[0042] Optionally, in one implementation, for the first transmission data, adding status information to the data in the first protocol layer to obtain the second transmission data includes:
[0043] For the first transmission data, adding an extension header to the data in the GTP-U (General Packet Radio Service Tunneling Protocol-User) layer, where the data in the first protocol layer includes the data in the GTP-U layer; adding the status information to the extension header in the GTP-U layer to obtain the second transmission data. Since the GTP-U layer can contain a large amount of information, adding an extension header and status information in the GTP-U layer can carry more information content and does not change the application layer data, not only increasing adaptability and scalability but also ensuring the information capacity.
[0044] Optionally, in another implementation, for the first transmission data, adding status information to the data in the first protocol layer to obtain the second transmission data includes: for the first transmission data, adding an extension header to the data in the second protocol layer, where the data in the first protocol layer includes the data in the transport layer and the data in the second protocol layer, and the second protocol layer is different from the transport layer; adding the status information to the extension header in the data of the second protocol layer to obtain the second transmission data. Adding an extension header and status information in the data of the second protocol layer enables the receiving party to obtain the status information without parsing to the higher layer but only parsing to the second protocol layer after receiving the second transmission data, reducing the parsing complexity.
[0045] It should be noted that adding status information to the data in the first protocol layer can be achieved by re-encapsulating the data. For example, obtaining the first transmission data includes: receiving the first transmission data under the protocol of the first interface through the first interface.
[0046] For the first transmission data, status information is added to the data at the first protocol layer to obtain second transmission data, including: de-encapsulating the first transmission data according to the protocol of the first interface, and encapsulating the de-encapsulated first transmission data according to the protocol of the second interface to obtain second transmission data, where the status information is encapsulated in the data at the first protocol layer.
[0047] The interface protocols of the network device can be different when receiving and sending data. The first transmission data is parsed according to the first interface protocol, and then when encapsulating using the second interface protocol, the status information is encapsulated in the data at the first protocol layer, without changing the original data transmission process, thus improving the data transmission efficiency; if the first interface protocol and the second interface protocol are the same, and the network device only forwards the data, then it only needs to parse the data to the first protocol layer, that is, the layer where the status information is encapsulated, and send it after encapsulating the status information in the first protocol layer. It should be noted that the first interface protocol may not include the first protocol layer, and the first protocol layer can be a protocol layer under the second interface protocol. The first transmission data under the second interface protocol can include data at the application layer and data at the first protocol layer.
[0048] Here, taking the network device as a base station as an example, the first transmission data is received through the first interface, including: receiving the first transmission data under the protocol of the air interface through the air interface, where the first interface includes the air interface.
[0049] For the first transmission data, status information is added to the data at the first protocol layer to obtain second transmission data, including: de-encapsulating the first transmission data according to the protocol of the air interface, and encapsulating the de-encapsulated first transmission data according to the protocol of the Internet Protocol (IP) interface to obtain second transmission data, where the status information is encapsulated in the data at the first protocol layer.
[0050] Generally, data is transmitted between the terminal device and the base station using the air interface, that is, the first interface protocol is the air interface protocol, and data is transmitted between the base station and other network devices (such as relay devices, servers, etc.) using the IP (Internet Protocol) interface, that is, the second interface protocol is the IP protocol. Of course, here it is only illustrated with the base station as an example, and it does not mean that this application is limited thereto.
[0051] Step 204: Transmit the second transmission data.
[0052] The data transmission method provided by the embodiment of the present invention obtains first transmission data, where the first transmission data includes data in the application layer of the network protocol; obtains status information related to the network; for the first transmission data, adds the status information to the data in the first protocol layer to obtain second transmission data, where the first transmission data includes data in the first protocol layer of the network protocol, and the first protocol layer is different from the application layer; and sends the second transmission data. Since the status information is added to the data in the first protocol layer, there is no need to parse and modify the application layer data. Instead, the status information is obtained from the data in the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0053] Embodiment 2
[0054] Combined with the data transmission method described in Embodiment 1 above, Embodiment 2 of the present application provides a data transmission method, which details the execution steps of the data receiver in Embodiment 1, that is, the method of the receiver of the second transmission data in step 204. Refer to Figure 3 as shown in Figure 3 FIG. 10 is a flowchart of a data transmission method provided by Embodiment 2 of the present application. The method includes the following steps:
[0055] Step 301, receive the second transmission data.
[0056] The second transmission data includes data in the application layer and data in the first protocol layer of the network protocol, and the first protocol layer is different from the application layer. The description of the second transmission data can refer to the description in Embodiment 1 and will not be elaborated here.
[0057] Step 302, parse the second transmission data and obtain the status information from the data in the first protocol layer.
[0058] The status information is used to indicate the status of the network. The status information can indicate network bandwidth, the location of the terminal device, the cell to which the terminal device belongs, the congestion status of the network, etc. The terminal device can be the device that sends the first transmission data, that is, the source of the first transmission data. The description of the status information can refer to the description in Embodiment 1 and will not be elaborated here.
[0059] Step 303, adjust the network parameters according to the status information and transmit data according to the adjusted network parameters.
[0060] Adjusting network parameters is a process of optimizing data transmission. Network parameters can include network bandwidth, which can also be said to be the sending window and the receiving window. For example, when the status information indicates that the network status is poor (e.g., the network bandwidth is small or there is network congestion), the network bandwidth can be increased according to the status information. When the status information indicates that the network status is good (e.g., the network bandwidth is large or there is no network congestion), the network bandwidth can be decreased according to the status information. Network parameters can also include routing information. For example, when the status information indicates that the network status is poor, other transmission links with better network status can be selected for data transmission. Of course, this is only an exemplary illustration here and does not mean that this application is limited thereto. The status information can indicate the current network status. Adjust network parameters according to the status information and transmit data according to the adjusted network parameters, including: adjusting the network parameters of the current network according to the status information and transmitting data according to the adjusted network parameters. Because the receiving end can timely obtain the network status of the current network and adjust the network parameters according to the network status of the current network, so that data transmission can adapt to the current network in real time and improve the utilization rate of network resources.
[0061] The data transmission method provided by the embodiment of the present invention receives second transmission data, and the second transmission data includes data in the application layer and data in the first protocol layer in the network protocol; parses the second transmission data, and obtains status information in the data in the first protocol layer, where the status information is used to indicate the network status; adjusts network parameters according to the status information, and transmits data according to the adjusted network parameters. Because status information is added to the data in the first protocol layer, there is no need to parse and modify the application layer data, but to obtain status information from the data in the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0062] Embodiment Three
[0063] Based on the data transmission methods described in the above Embodiment One and Embodiment Two, Embodiment Three of this application provides a data transmission method, taking the network device as a base station as an example for detailed description. Of course, this is only an exemplary illustration here and does not mean that this application is limited thereto. To facilitate understanding of the data transmission method described in this Embodiment Three, the scenario used in this Embodiment Three is described. As Figure 4 shown, Figure 4 is a scenario schematic diagram of a data transmission method provided by Embodiment Three of this application, Figure 4 showing a base station 401, a terminal device 402, and other network devices 403.
[0064] The terminal device sends the first transmission data to the base station. The base station obtains the status information, parses and repackages the first transmission data to obtain the second transmission data, and encapsulates the status information in the data of the first protocol layer during the encapsulation process. The base station transmits the second transmission data to other network devices.
[0065] Combined with Figure 4 the scenario shown in Figure 5 as shown in Figure 5 FIG. is an interaction diagram of a data transmission method provided in Embodiment 3 of the present application. The method includes the following steps:
[0066] Step 501, the terminal device sends the first transmission data to the base station.
[0067] Combined with Figure 4 the scenario shown in
[0068] Step 502, the base station obtains the status information of the network.
[0069] Taking the status information including the network bandwidth of the current network as an example, the base station can detect the network bandwidth of the current network and generate the status information.
[0070] Step 503, the base station adds the status information to the data in the first protocol layer of the first transmission data to obtain the second transmission data.
[0071] The base station can receive the first transmission data through the air interface, parse the first transmission data according to the air interface protocol, and then encapsulate it according to the IP interface protocol to obtain the second transmission data. The status information is encapsulated in the transport layer. The second transmission data can include the application layer, the transport layer, the network layer, the data link layer, and the physical layer.
[0072] Among them, the transport layer may include the GTP-U layer, the status information may be encapsulated in the extension header of the GTP-U layer, the network layer may include the UDP (User Datagram Protocol) layer or the IP layer; the data link layer may include the L2 layer, and the physical layer may include the L1 layer. Of course, this is only an exemplary description here and does not mean that the present application is limited thereto.
[0073] Exemplarily, the data of the GTP-U layer may include information type, information length, source address, destination address, tunnel endpoint identifier, and extension header. Of course, this is only an example to illustrate the fields included in the GTP-U layer, and it does not mean that this application is limited thereto.
[0074] Step 504: The base station sends the second transmission data to other network devices.
[0075] Other devices may include relay devices. For example, UPF (User Plane Function) devices, or may also include servers, etc. This application does not limit this.
[0076] Step 505: Other network devices perform data transmission optimization according to the status information included in the second transmission data.
[0077] It should be noted that other network devices may also continue to send the second transmission data in the same method as the base station. For example, other network devices may obtain the status information, add the status information to the data of the second transmission data in the first protocol layer to obtain the third transmission data, and send the third transmission data.
[0078] Combined with Figure 4 In the shown application scenario, taking the relay device as an example, the intermediate device may send the third transmission data to the server, or may also send it to the base station. This application does not limit this. That is, the data transmission method described in the embodiments of this application may be that the base station transmits data to the relay device, or the terminal device transmits data to the base station; it may be that the relay devices transmit data to each other; it may also be that the relay device transmits data to the server, or the server transmits data to the relay device.
[0079] The data transmission method provided by the embodiments of the present invention includes obtaining first transmission data, where the first transmission data includes data of the application layer in the network protocol; obtaining status information related to the network; for the first transmission data, adding the status information to the data of the first protocol layer to obtain second transmission data, where the first transmission data includes data of the first protocol layer in the network protocol, and the first protocol layer is different from the application layer; and sending the second transmission data. Because the status information is added to the data of the first protocol layer, there is no need to parse and modify the application layer data, but to obtain the status information from the data of the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0080] Embodiment 4
[0081] Based on the methods described in the above Embodiment 1 and Embodiment 3, Embodiment 4 of this application provides a data transmission device for executing the methods described in the above Embodiment 1 and Embodiment 3. Refer to Figure 6As shown, the data transmission device 60 includes:
[0082] An acquisition module 601, configured to acquire first transmission data, where the first transmission data includes data in the application layer of the network protocol;
[0083] A status module 602, configured to acquire status information related to the network;
[0084] A processing module 603, configured to add status information to the data in the first protocol layer for the first transmission data to obtain second transmission data, where the first transmission data includes data in the first protocol layer of the network protocol, and the first protocol layer is different from the application layer;
[0085] A sending module 604, configured to send the second transmission data.
[0086] Optionally, the processing module 603 is configured to add an extension header to the data in the transport layer for the first transmission data, where the data in the first protocol layer includes data in the transport layer; add the status information to the extension header in the transport layer to obtain the second transmission data.
[0087] Optionally, the processing module 603 is configured to add an extension header to the data in the GPRS Tunneling Protocol - User Plane (GTP - U) layer for the first transmission data, where the data in the first protocol layer includes data in the GTP - U layer; add the status information to the extension header in the GTP - U layer to obtain the second transmission data.
[0088] Optionally, the processing module 603 is configured to add an extension header to the data in the second protocol layer for the first transmission data, where the data in the first protocol layer includes data in the transport layer and data in the second protocol layer, and the second protocol layer is different from the transport layer;
[0089] Add the status information to the extension header of the data in the second protocol layer to obtain the second transmission data.
[0090] Optionally, the acquisition module 601 is configured to acquire the network bandwidth and generate status information, where the status information includes the network bandwidth.
[0091] Optionally, the acquisition module 601 is configured to acquire location information and generate status information, where the location information is used to indicate the location of the terminal device corresponding to the first transmission data, and the status information includes the location information.
[0092] Optionally, the acquisition module 601 is configured to acquire cell information and generate status information, where the cell information is used to indicate the network status of the cell to which the terminal device corresponding to the first transmission data belongs, and the status information includes the cell information.
[0093] Optionally, the acquisition module 601 is configured to generate status information according to the congestion status of the network.
[0094] Optionally, an obtaining module 601 is configured to generate status information according to the transmission delay of the network.
[0095] Optionally, an obtaining module 601 is configured to receive first transmission data under the protocol of a first interface through the first interface;
[0096] A processing module 603 is configured to perform de-encapsulation on the first transmission data according to the protocol of the first interface, perform encapsulation on the de-encapsulated first transmission data according to the protocol of a second interface, to obtain second transmission data, and the status information is encapsulated in the data of the first protocol layer.
[0097] Optionally, an obtaining module 601 is configured to receive first transmission data under the protocol of an air interface through the air interface, and the first interface includes the air interface;
[0098] A processing module 603 is configured to perform de-encapsulation on the first transmission data according to the protocol of the air interface, perform encapsulation on the de-encapsulated first transmission data according to the protocol of an Internet Protocol (IP) interface, to obtain second transmission data, and the status information is encapsulated in the data of the first protocol layer.
[0099] The data transmission device provided in an embodiment of the present invention obtains first transmission data, where the first transmission data includes data of an application layer in a network protocol; obtains status information related to the network; for the first transmission data, adds the status information to the data of the first protocol layer to obtain second transmission data, where the first transmission data includes data of a first protocol layer in the network protocol, and the first protocol layer is different from the application layer; and sends the second transmission data. Because the status information is added to the data of the first protocol layer, it is not necessary to parse and modify the application layer data, but to obtain the status information from the data of the first protocol layer to optimize data transmission, which can adapt to more protocols and has better adaptability and scalability.
[0100] Embodiment 5
[0101] Based on the methods described in the above Embodiment 2 and Embodiment 3, Embodiment 4 of the present application provides a data transmission device for performing the methods described in the above Embodiment 2 and Embodiment 3. Referring to Figure 7 as shown, the data transmission device 70 includes:
[0102] A receiving module 701 is configured to receive second transmission data, where the second transmission data includes data of an application layer and data of a first protocol layer in a network protocol, and the first protocol layer is different from the application layer;
[0103] An analysis module 702 is configured to analyze the second transmission data, and obtain status information from the data of the first protocol layer, where the status information is used to indicate the status of the network;
[0104] The transmission module 703 is configured to adjust network parameters according to the status information and transmit data according to the adjusted network parameters.
[0105] In the data transmission method provided by the embodiment of the present invention, second transmission data is received. The second transmission data includes data in the application layer and data in the first protocol layer of the network protocol. The second transmission data is parsed, and status information is obtained from the data in the first protocol layer. The status information is used to indicate the status of the network. Network parameters are adjusted according to the status information, and data is transmitted according to the adjusted network parameters. Since the status information is added to the data in the first protocol layer, it is not necessary to parse and modify the application layer data. Instead, the status information is obtained from the data in the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0106] Embodiment Six
[0107] Based on the methods described in the above Embodiment One to Embodiment Three, Embodiment Five of the present application provides an electronic device for executing the methods described in the above Embodiment One to Embodiment Three. Refer to Figure 8 as shown Figure 8 FIG. is a schematic structural diagram of an electronic device provided by Embodiment Five of the present application. The specific implementation of the electronic device is not limited in the specific embodiments of the present application.
[0108] As Figure 8 shown, the electronic device may include: a processor 802, a communication interface 804, a memory 806, and a communication bus 808.
[0109] Wherein:
[0110] The processor 802, the communication interface 804, and the memory 806 communicate with each other through the communication bus 808.
[0111] to complete mutual communication.
[0112] The communication interface 804 is configured to communicate with other electronic devices such as terminal devices or servers.
[0113] The processor 802 is configured to execute the program 810, and specifically may execute the relevant steps in the above method embodiments.
[0114] Specifically, the program 810 may include program code, and the program code includes computer operation instructions.
[0115] The processor 802 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the electronic device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0116] A memory 806 for storing a program 810. The memory 806 may include a high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
[0117] The program 810 may specifically be used to cause the processor 802 to execute any of the methods in the foregoing Embodiments 1 to 3.
[0118] For the specific implementation of each step in the program 810, reference may be made to the corresponding steps and descriptions in the corresponding units in the foregoing data transmission method embodiments, which will not be elaborated herein. Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working processes of the devices and modules described above may refer to the corresponding process descriptions in the foregoing method embodiments, which will not be repeated herein.
[0119] The electronic device provided in the embodiments of the present invention obtains first transmission data, where the first transmission data includes data at the application layer and data at the first protocol layer in a network protocol; obtains status information related to the network; for the first transmission data, adds the status information to the data at the first protocol layer to obtain second transmission data; and sends the second transmission data. Since the status information is added to the data at the first protocol layer, it is not necessary to parse and modify the application layer data. Instead, the status information is obtained from the data at the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0120] Embodiment 7
[0121] Based on the methods described in the foregoing Embodiments 1 to 3, Embodiment 7 of the present application provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described in Embodiments 1 to 3 is implemented.
[0122] The computer storage medium provided by the embodiment of the present invention obtains first transmission data, where the first transmission data includes data of the application layer and data of the first protocol layer in the network protocol; obtains status information related to the network; for the first transmission data, adds the status information to the data of the first protocol layer to obtain second transmission data; and sends the second transmission data. Since the status information is added to the data of the first protocol layer, there is no need to parse and modify the application layer data. Instead, the status information is obtained from the data of the first protocol layer for data transmission optimization, which can adapt to more protocols and has better adaptability and scalability.
[0123] It should be noted that, according to the needs of implementation, each component / step described in the embodiment of the present invention can be split into more components / steps, or two or more components / steps or partial operations of the components / steps can be combined into new components / steps to achieve the purpose of the embodiment of the present invention.
[0124] The method according to the embodiment of the present invention described above can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or be implemented as computer code that is originally stored in a remote recording medium or a non-transitory machine-readable medium and downloaded through a network and will be stored in a local recording medium. Thus, the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (such as a RAM, a ROM, a flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the data transmission method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the data transmission method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the data transmission method shown herein.
[0125] Those of ordinary skill in the art can realize that the units and method steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.
[0126] The above embodiments are only used to illustrate the embodiments of the present invention, rather than to limit the embodiments of the present invention. Those of ordinary skill in the relevant technical field can also make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention shall be defined by the claims.
Claims
1. A data transmission method, which includes: Obtain first transmission data, where the first transmission data includes data at the application layer in a network protocol; Obtain status information related to the network; For the first transmission data, add the status information to the data at the first protocol layer to obtain second transmission data, where the first transmission data includes data at the first protocol layer in the network protocol, and the first protocol layer is different from the application layer; Send the second transmission data; Among them, for the first transmission data, adding the status information to the data at the first protocol layer to obtain second transmission data includes: For the first transmission data, add an extension header to the data at the user plane General Packet Radio Service Tunneling Protocol (GTP-U) layer, where the data at the first protocol layer includes the data at the GTP-U layer; Add the status information to the extension header of the GTP-U layer to obtain the second transmission data.
2. The method according to claim 1, wherein, for the first transmission data, adding the status information to the data at the first protocol layer to obtain second transmission data includes: For the first transmission data, add an extension header to the data at the transport layer, where the data at the first protocol layer includes the data at the transport layer; Add the status information to the extension header of the transport layer to obtain the second transmission data.
3. The method according to claim 1, wherein, for the first transmission data, adding the status information to the data at the first protocol layer to obtain second transmission data includes: For the first transmission data, add an extension header to the data at the second protocol layer, where the data at the first protocol layer includes the data at the transport layer and the data at the second protocol layer, and the second protocol layer is different from the transport layer; Add the status information to the extension header of the data at the second protocol layer to obtain the second transmission data.
4. The method according to claim 1, wherein, obtaining the status information related to the network includes: Obtain the network bandwidth and generate the status information, where the status information includes the network bandwidth.
5. The method according to claim 1, wherein, obtaining the status information related to the network includes: Obtain location information and generate the status information, where the location information is used to indicate the location of the terminal device corresponding to the first transmission data, and the status information includes the location information.
6. The method according to claim 1, wherein, obtaining the status information related to the network includes: Obtain cell information and generate the status information, where the cell information is used to indicate the network status of the cell to which the terminal device corresponding to the first transmission data belongs, and the status information includes the cell information.
7. The method according to claim 1, wherein, obtaining the status information related to the network includes: Generate the status information according to the congestion status of the network.
8. The method according to claim 1, wherein, obtaining the status information related to the network includes: Generate the status information according to the transmission delay of the network.
9. The method according to any one of claims 1-8, wherein, the obtaining of the first transmission data includes: receiving the first transmission data under the protocol of the first interface through the first interface; for the first transmission data, adding the status information to the data in the first protocol layer to obtain the second transmission data, includes: decapsulating the first transmission data according to the protocol of the first interface, encapsulating the decapsulated first transmission data according to the protocol of the second interface, to obtain the second transmission data, and the status information is encapsulated in the data in the first protocol layer.
10. The method according to claim 9, wherein, the receiving the first transmission data through the first interface includes: receiving the first transmission data under the protocol of the air interface through the air interface, and the first interface includes the air interface; for the first transmission data, adding the status information to the data in the first protocol layer to obtain the second transmission data, includes: decapsulating the first transmission data according to the protocol of the air interface, encapsulating the decapsulated first transmission data according to the protocol of the Internet Protocol (IP) interface, to obtain the second transmission data, and the status information is encapsulated in the data in the first protocol layer.
11. A data transmission method, which includes: receiving second transmission data, the second transmission data includes data in the application layer in the network protocol and data in the first protocol layer, and the first protocol layer is different from the application layer; parsing the second transmission data, obtaining status information in the data in the first protocol layer, and the status information is used to indicate the status of the network; adjusting network parameters according to the status information, and transmitting data according to the adjusted network parameters; wherein, for the first transmission data, an extension header is added to the data in the User Plane General Packet Radio Service Tunneling Protocol (GTP-U) layer, the data in the first protocol layer includes the data in the GTP-U layer, and the first transmission data includes data in the application layer in the network protocol; adding the status information to the extension header in the GTP-U layer to obtain the second transmission data.
12. A data transmission device, including: an obtaining module, configured to obtain first transmission data, and the first transmission data includes data in the application layer in the network protocol; a status module, configured to obtain status information related to the network; a processing module, configured to, for the first transmission data, add the status information to the data in the first protocol layer to obtain second transmission data, the first transmission data includes data in the first protocol layer in the network protocol, and the first protocol layer is different from the application layer; a sending module, configured to send the second transmission data; wherein, the processing module is configured to, for the first transmission data, add an extension header to the data in the User Plane General Packet Radio Service Tunneling Protocol (GTP-U) layer, the data in the first protocol layer includes the data in the GTP-U layer; add the status information to the extension header in the GTP-U layer to obtain the second transmission data.
13. A data transmission device, including: A receiving module, configured to receive second transmission data, where the second transmission data includes data of an application layer in a network protocol and data of a first protocol layer, and the first protocol layer is different from the application layer; A parsing module, configured to parse the second transmission data, and obtain status information from the data of the first protocol layer, where the status information is used to indicate the status of the network; A transmission module, configured to adjust network parameters according to the status information, and transmit data according to the adjusted network parameters; Wherein, the apparatus is further configured to, for first transmission data, add an extension header to data in a user plane general packet radio service tunneling protocol (GTP-U) layer, the data of the first protocol layer includes the data of the GTP-U layer, and the first transmission data includes data of an application layer in a network protocol; Add the status information to the extension header of the GTP-U layer to obtain the second transmission data.
14. An electronic device, including: A processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the data transmission method according to any one of claims 1-11.
15. A computer storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the data transmission method according to any one of claims 1-11.
Citation Information
Patent Citations
Service data transmission method and device
CN106506434A