CN112398754A - Data transmission method, device, medium, electronic equipment and network access equipment - Google Patents

Data transmission method, device, medium, electronic equipment and network access equipment Download PDF

Info

Publication number
CN112398754A
CN112398754A CN202011272675.3A CN202011272675A CN112398754A CN 112398754 A CN112398754 A CN 112398754A CN 202011272675 A CN202011272675 A CN 202011272675A CN 112398754 A CN112398754 A CN 112398754A
Authority
CN
China
Prior art keywords
data packet
network access
target data
electronic device
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011272675.3A
Other languages
Chinese (zh)
Other versions
CN112398754B (en
Inventor
刘伟
彭昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011272675.3A priority Critical patent/CN112398754B/en
Publication of CN112398754A publication Critical patent/CN112398754A/en
Priority to PCT/CN2021/114345 priority patent/WO2022100199A1/en
Application granted granted Critical
Publication of CN112398754B publication Critical patent/CN112398754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2475Traffic characterised by specific attributes, e.g. priority or QoS for supporting traffic characterised by the type of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a data transmission method, a data transmission device, a data transmission medium, electronic equipment and network access equipment, wherein a data packet to be transmitted is obtained through the electronic equipment, when the data packet to be transmitted is a data packet of a preset application, a priority transmission identifier is added to the data packet to be transmitted to obtain a target data packet, the priority transmission identifier comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment, and finally the target data packet is transmitted to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the priority transmission identifier. Therefore, the electronic equipment negotiates a random value with the network access equipment in advance to serve as a priority sending identifier, and the electronic equipment adds the priority sending identifier to the data packet of the preset application, so that the network access equipment can preferentially send the data packet added with the priority sending identifier according to the indication of the priority sending identifier, and the purpose of guaranteeing the data transmission quality of the specific application is achieved.

Description

Data transmission method, device, medium, electronic equipment and network access equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, apparatus, medium, electronic device, and network access device.
Background
Electronic devices such as smart phones and tablet computers can establish network connection with network access devices (such as Wi-Fi routers), and access networks (such as the internet, intranet networks and the like) by using network access services provided by the network access devices, so as to listen to songs, watch videos, play games and the like online. At present, network quality is more and more emphasized by users, for example, when a smart phone accesses the internet through a Wi-Fi router to play games, data transmission quality of applications requiring low transmission delay, such as game applications, cannot be guaranteed because Wi-Fi connection between the smart phone and the Wi-Fi router is easily interfered and faces preemptive competition of other devices under the same Wi-Fi router.
Disclosure of Invention
The application provides a data transmission method, a data transmission device, a data transmission medium, electronic equipment and network access equipment, which can guarantee the data transmission quality of preset application.
In a first aspect, the present application provides a data transmission method, applied to an electronic device, where the electronic device provides a network access service through a network access device, and the data transmission method includes:
acquiring a data packet to be sent;
when the data packet to be sent is a data packet of a preset application, adding a priority sending identifier to the data packet to be sent to obtain a target data packet, wherein the priority sending identifier comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment;
and transmitting the target data packet to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the preferential transmission identifier.
In a second aspect, the present application provides a data transmission method, which is applied to a network access device, where the network access device provides a network access service for an electronic device, and the data transmission method includes:
acquiring a target data packet transmitted by the electronic equipment;
when the target data packet carries a priority sending identifier, preferentially sending the target data packet;
the priority sending identifier includes a random value obtained by pre-negotiating between the network access device and the electronic device.
In a third aspect, the present application provides a data processing apparatus applied to an electronic device, where the electronic device provides a network access service through a network access device, and the data processing apparatus includes:
the acquisition module is used for acquiring a data packet to be sent;
the identification module is used for adding a priority sending identification to the data packet to be sent to obtain a target data packet when the data packet to be sent is a data packet of a preset application, wherein the priority sending identification comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment;
and the transmission module is used for transmitting the target data packet to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the preferential transmission identifier.
In a fourth aspect, the present application provides a data processing apparatus, which is applied to a network access device, where the network access device provides a network access service for an electronic device, and the data processing apparatus includes:
the acquisition module is used for acquiring a target data packet transmitted by the electronic equipment;
the forwarding module is used for preferentially sending the data packet to be sent when the data packet to be sent carries a preferential sending identifier;
the priority sending identifier includes a random value obtained by pre-negotiating between the network access device and the electronic device.
In a fifth aspect, the present application provides a storage medium having stored thereon a computer program for executing a data transmission method applied to a network access device as provided herein when the computer program is loaded by a processor of the network access device, or for executing a data transmission method applied to an electronic device as provided herein when the computer program is loaded by a processor of the electronic device.
In a sixth aspect, the present application provides a network access device, which includes a processor and a memory, where the memory stores a computer program, and the processor executes a data transmission method applied to the network access device as provided in the present application by loading the computer program.
In a seventh aspect, the present application provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the processor executes the data transmission method applied to the electronic device as provided in the present application by loading the computer program.
By adopting the technical scheme provided by the application, the electronic equipment negotiates a random value with the network access equipment in advance to serve as the prior sending identifier, and the electronic equipment adds the prior sending identifier for the data packet of the preset application, so that the network access equipment can preferentially send the data packet added with the prior sending identifier according to the indication of the prior sending identifier, and the purpose of ensuring the data transmission quality of the specific application is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a data transmission system according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application.
Fig. 3 is an exemplary diagram of an electronic device acquiring a data packet to be transmitted from another electronic device in the embodiment of the present application.
Fig. 4 is a schematic diagram of an electronic device adding a priority transmission identifier to a data packet to be transmitted to obtain a target data packet in an embodiment of the present application.
Fig. 5 is an exemplary diagram of an electronic device redundancy transmission target packet in an embodiment of the present application.
Fig. 6 is an exemplary diagram illustrating that an electronic device adds a priority transmission identifier to a data packet to be transmitted in this embodiment of the application.
Fig. 7 is another schematic flow chart of a data transmission method according to an embodiment of the present application.
Fig. 8 is a schematic flowchart of another data transmission method according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
Fig. 10 is another schematic structural diagram of a data transmission device according to an embodiment of the present application.
Fig. 11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 12 is a schematic structural diagram of a network access device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
It should be noted that the relational terms such as first and second, and the like, referred to in the following embodiments of the present application, are only used for distinguishing one entity or operation from another entity or operation, and are not used for limiting an actual sequential relationship between the entities or operations.
Referring to fig. 1, the data transmission system provided in the present application includes an electronic device and a network access device. It should be noted that, in the embodiment of the present application, no particular limitation is imposed on the entity presentation form of the electronic device and the network access device, for example, the entity presentation form of the electronic device may be a smartphone shown in fig. 1, and the entity presentation form of the network access device may be a router shown in fig. 1.
The electronic device and the network access device perform data interaction through network connection between the electronic device and the network access device, and the network connection may be wired network connection (for example, the electronic device and the network access device are directly connected through a data line, so as to establish wired network connection between the electronic device and the network access device), may also be wireless network connection (including but not limited to wireless communication modes such as bluetooth, infrared, and wireless fidelity), and may also establish wired network connection and wireless network connection at the same time. Through the network connection between the two, the network access equipment provides network access service for the electronic equipment. For example, when a data packet is to be transmitted, if the data packet to be transmitted is a data packet of a preset application, the electronic device adds a priority transmission identifier to the data packet to be transmitted to obtain a target data packet, transmits the target data packet to the network access device, and then the network access device preferentially transmits the target data packet according to the priority transmission identifier and transmits the target data packet to the opposite-end device through the network, so as to ensure the data transmission quality of the specific application.
It should be noted that fig. 1 described above only shows an example of a system architecture for implementing the embodiment of the present application, and the embodiment of the present application is not limited to the system architecture shown in fig. 1 described above. Various embodiments of the present application are presented below, taking the system architecture shown in fig. 1 as an example.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application. The data transmission method is applied to the electronic device in the data transmission system provided by the present application, and as shown in fig. 2, the flow of the data transmission method provided by the embodiment of the present application may be as follows:
at 110, a data packet to be transmitted is obtained.
The data transmission method provided by the present application will be described below from the perspective of an electronic device.
The network access device provides a network access service for the electronic device, so that the electronic device can access a network (such as the internet, an internal network of an organization, and the like) through the network access device, and thus perform data interaction with other devices through the network. For example, a game application executed by the electronic device enables the user to play normally online by performing data interaction with a game server at the other end of the network.
In the embodiment of the application, the electronic device obtains a data packet to be sent in real time, where the data packet to be sent may be generated by a local application of the electronic device, or may be forwarded to the electronic device by other electronic devices when the electronic device shares a network with other electronic devices.
For example, when the electronic device runs a game application, the game application generates a data packet that needs to be sent to the game server, and the electronic device takes the data packet as a data packet to be sent.
For another example, referring to fig. 3, the network access device provides a network access service for the electronic device, the electronic device shares a network with other electronic devices, at a certain time, a certain instant messaging application run by other electronic devices generates a data packet that needs to be sent to the instant messaging server, and correspondingly transmits the data packet to the electronic device, and at this time, the electronic device takes the data packet as a data packet to be sent.
Of course, as can be understood by those skilled in the art, how to acquire a data packet to be transmitted by an electronic device may also be other situations not listed in the embodiments of the present application.
In 120, when the data packet to be sent is a data packet of a preset application, a priority sending identifier is added to the data packet to be sent to obtain a target data packet, where the priority sending identifier includes a random value obtained by pre-negotiation between the electronic device and the network access device.
It should be noted that, in the embodiment of the present application, only the data transmission quality of the preset application is guaranteed.
The preset application can be configured by the default of the electronic equipment, and can also be configured correspondingly by the electronic equipment according to the input of a user. For example, the electronic device configures, by default, an application having a high requirement on data transmission quality, such as a game application and a live broadcast application, as a preset application that needs to guarantee the transmission quality.
Correspondingly, after the electronic device obtains the data packet to be sent, the electronic device further parses the data packet to be sent to determine the application to which the data packet to be sent belongs, or to determine which application the data packet to be sent is generated by. And then, the electronic equipment further identifies whether the application to which the data packet to be sent belongs is a preset application, and if so, determines that the transmission quality of the data packet to be sent needs to be guaranteed.
In order to guarantee the transmission quality of the preset application, a priority sending identifier is provided in the embodiment of the present application, and the priority sending identifier is configured to instruct the network access device to send the corresponding data packet preferentially. In addition, in order to ensure the stability of data transmission, the preferential transmission identifier is a random value obtained by pre-negotiation between the electronic device and the network access device. The negotiation on how to send the identifier preferentially between the electronic device and the network access device is not specifically limited here, and may be configured by a person of ordinary skill in the art according to actual needs.
For example, when the electronic device establishes a network connection with the network access device, a negotiation request is generated according to a message format agreed with the network access device and transmitted to the network access device; the network access equipment generates a random value through a configured random number generation algorithm according to a negotiation request from the electronic equipment, takes the random value as a priority sending identifier, and then generates a negotiation response carrying the priority sending identifier with a message format agreed in advance with the electronic equipment to transmit to the electronic equipment; and if the electronic equipment receives the priority sending identifier returned by the network access equipment, returning a confirmation response to the network access equipment. And the electronic equipment and the network access equipment finish the negotiation of the prior sending identifier.
As described above, referring to fig. 4, when it is recognized that the data packet to be sent is a data packet of the preset application, the electronic device adds the preferential sending identifier to the data packet to be sent, and records the data packet to be sent with the preferential sending identifier as the target data packet. In this embodiment, no specific limitation is imposed on how to add the preferential transmission identifier to the data packet to be sent, and a person skilled in the art may configure the preferential transmission identifier according to actual needs, for example, the preferential transmission identifier may be added to a header field of the data packet to be sent, and the preferential transmission identifier may also be added to a trailer field of the data packet to be sent.
In 130, the target data packet is transmitted to the network access device, so that the network access device preferentially transmits the target data packet according to the preferential transmission identifier.
In the embodiment of the application, after the target data packet is obtained by adding the priority sending identifier to the data packet to be sent, the electronic device transmits the target data packet to the network access device.
On the other hand, after receiving the target data packet from the electronic device, the network access device determines that the target data packet needs to be preferentially sent according to the preferential sending identifier carried in the target data packet, so that the target data packet is preferentially sent according to a pre-configured preferential sending strategy, and the target data packet is transmitted to the corresponding opposite terminal device through the network. The specific configuration of the preferential transmission strategy is not limited herein, and can be configured by those skilled in the art according to actual needs.
For example, the network access device is configured with a priority transmission queue and a normal transmission queue, and the network access device is configured to transmit the data packets in the normal transmission queue after all the data packets in the priority transmission queue are completely transmitted. Therefore, when the network access equipment preferentially sends the target data packet, the target data packet is inserted into the preferential sending queue, and if other data packets are in front of the target data packet in the preferential sending queue, the network access equipment sends the target data packet after completing sending the other data packets in sequence; and if no other data packet is in the priority sending queue before the target data packet, the network access equipment directly sends the target data packet.
According to the method, the electronic device obtains the data packet to be sent, and when the data packet to be sent is the data packet of the preset application, the priority sending identifier is added to the data packet to be sent to obtain the target data packet, wherein the priority sending identifier comprises a random value obtained by pre-negotiation between the electronic device and the network access device, and finally the target data packet is transmitted to the network access device, so that the network access device sends the target data packet preferentially according to the priority sending identifier. Therefore, the electronic equipment negotiates a random value with the network access equipment in advance to serve as a priority sending identifier, and the electronic equipment adds the priority sending identifier for a data packet of a preset application needing to guarantee data transmission quality, so that the network access equipment can preferentially send the data packet added with the priority sending identifier according to the indication of the priority sending identifier, and the purpose of guaranteeing the data transmission quality of the specific application is achieved.
Optionally, in an embodiment, transmitting the target data packet to the network access device includes:
and the target data packet is copied at least once to obtain at least two target data packets, and the at least two target data packets are transmitted to the network access equipment.
In order to ensure that the network access device can receive the target data packet transmitted by the electronic device, the electronic device performs redundant transmission on the target data packet in the embodiment of the application.
When the electronic device transmits the target data packet to the network access device, the electronic device copies the target data packet at least once, so as to obtain at least two target data packets, wherein the at least two target data packets include an original target data packet and at least one copied target data.
It should be noted that, in the embodiment of the present application, the number of times of copying the target data packet is not particularly limited, and may be configured by a person having ordinary skill in the art according to actual needs.
After the target data packets are copied and at least two target data packets are obtained, the electronic equipment transmits the obtained at least two target data packets to the network access equipment. Therefore, even in the case of packet loss, the network access device can receive the target data packet transmitted by the electronic device to the greatest extent.
It can be understood that, since the electronic device transmits at least two target data packets to the network access device, regardless of the situation that the network access device does not receive the target data packets transmitted by the electronic device, the network access device may receive one target data packet transmitted by the electronic device, and may also receive at least two target data packets transmitted by the electronic device. Accordingly, the network access device may preferentially send only one received target data packet, and may preferentially send all received target data packets, and the like, which is not specifically limited in the embodiment of the present application and may be configured by a person of ordinary skill in the art according to actual needs.
Optionally, in an embodiment, the electronic device and the network access device establish N-way network connection, where N is a positive integer greater than or equal to 2, copy the target data packet at least once to obtain at least two target data packets, and transmit the at least two target data packets to the network access device, where the method includes:
(1) copying the target data packets for N-1 times to obtain N target data packets;
(2) and distributing the N target data packets to the N network connections one by one for transmission to the network access equipment.
In the embodiment of the application, in order to ensure the data transmission quality between the electronic device and the network access device, N-way network connection is established between the electronic device and the network access device, where N is a positive integer greater than or equal to 2. Accordingly, the electronic device may transmit the target data packet to the network access device through the multi-path network connection established between the electronic device and the network access device.
The electronic equipment copies the target data packet for N-1 times to obtain N-1 copied target data packets, wherein the N copied target data packets comprise N original target data packets. Then, the electronic device allocates the N target data packets to the N network connections one by one for transmission to the network access device, that is, allocates each target data packet of the N target data packets to one network connection for transmission to the network access device.
For example, referring to fig. 5, two network connections are established between the electronic device and the network access device, which are a first network connection based on a 2.4G frequency point and a second network connection based on a 5G frequency point, respectively, and accordingly, when the electronic device copies the target data packet, the electronic device copies the target data packet 2-1 times to 1 time to obtain two target data packets including the original target data packet, and then allocates one of the target data packets to the first network connection for transmission to the network access device, and allocates the other target data packet to the second network connection for transmission to the network access device.
Optionally, in an embodiment, adding a priority sending identifier to a data packet to be sent to obtain a target data packet, where the priority sending identifier includes:
and writing a priority sending identifier in the service type field of the data packet to be sent, and setting the data packet to be sent with the written priority sending identifier as a target data packet.
The embodiment of the present application provides an optional implementation manner for adding a priority sending identifier to a data packet to be sent.
It should be noted that a data packet can be divided into 3 parts, respectively, a header, a body and a trailer, wherein the body is used to fill in the data that needs to be transmitted actually, and the header and trailer are used to fill in some data related to auxiliary transmission, for example, the header includes a source IP address field and a destination IP address field, wherein the destination IP address field is used to fill in a destination IP address, the destination IP address is used to characterize to which the data packet is to be sent, the source IP address field is used to fill in a source IP address, and the source IP address is used to where the data packet is sent.
In addition, in order to ensure the transmission quality of the data packet, the packet header further includes a service type field, the service type field has 8 bits, the service type field includes a priority sub-field with 3 bits (the value can be from 000 and 111 all values), a service type sub-field with 4 bits and a reserved bit with 1 bit having to be set to 0.
Where the definition of 8 priorities of 3 bits is as follows:
111-network control;
110-internetwork control;
101-key;
100-fast speed;
011-flash;
010-fast;
001-first;
000-normal.
Wherein the priorities "111" and "110" are generally reserved for use by network control data (e.g., routing data). Priority "101" is recommended for voice data use, priority "100" is recommended for video conferencing and video streaming use, priority "011" is recommended for voice control data use, priorities "010" and "001" are recommended for data traffic use, and priority "000" is a default flag value.
However, while there is a definition of the priority subfield as above, the technical field has already discarded the priority subfield, typically populating "000" in the priority subfield by default. Therefore, in the embodiment of the present application, the priority subfield in the service type field can be directly multiplexed for filling the priority transmission identifier.
Correspondingly, referring to fig. 6, when adding the preferential transmission identifier to the data packet to be transmitted, the electronic device may write the preferential transmission identifier into the priority subfield in the service type field of the data packet to be transmitted. With this as a constraint, the data length negotiated by the electronic device and the network access device for the random value as the preferential transmission identifier is at most 3 bits.
Optionally, in an embodiment, after transmitting the target data packet to the network access device, the method further includes:
and receiving a response data packet which is preferentially sent by the network access equipment and corresponds to the target data packet.
In this embodiment, the network access device preferentially forwards a response packet returned by the peer device of the target packet to the electronic device, in addition to preferentially sending out the target packet from the electronic device.
After receiving a target data packet from the electronic device, the network access device records five-tuple data of the target data packet, including a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol, in addition to preferentially sending the target data packet.
And then, if the received data packet is matched with the recorded quintuple data of the target data packet, taking the data packet as a response data packet of the target data packet, and preferentially sending the response data packet to the electronic equipment.
For example, the five-tuple data of the target packet is recorded as: "192.168.1.1, 10000, TCP, 121.14.88.76, 80" form a five-tuple, where 192.168.1.1 is the source IP address of the destination packet, 10000 is the source port of the destination packet, TCP is the transport layer protocol of the destination packet, 121.14.88.76 is the destination IP address of the destination packet (indicating the peer device of the destination packet), and 80 is the destination port of the destination packet. If the five-tuple data of a packet is "121.14.88.76, 80, TCP, 192.168.1.1, 10000", where 121.14.88.76 is the source IP address of the packet, 80 is the source port of the packet, TCP is the transport layer protocol of the packet, 192.168.1.1 is the destination IP address of the packet, and 10000 is the destination port of the packet. Obviously, the quintuple data of the data packet matches the quintuple data of the target data packet, and the network access device preferentially sends the data packet to the electronic device as a response data packet of the target data packet.
On the other hand, the electronic device receives a response packet corresponding to the target packet preferentially sent by the network access device.
Optionally, in an embodiment, the method further includes:
when the electronic equipment disconnects the network connection with the network access equipment and establishes the network connection again, a new random value is negotiated with the network access equipment to be used as a priority sending identifier.
In the embodiment of the application, in order to prevent possible network attacks, the electronic device and the network access device perform negotiation of preferentially sending the identifier each time network connection is established.
When the network connection with the network access device is disconnected and the network connection is established again, the electronic device negotiates a new random value with the network access device as a priority sending identifier, which may specifically refer to the related description in the above embodiments, and details are not described here again.
Referring to fig. 7, fig. 7 is another schematic flow chart of a data transmission method provided in the present application. The data transmission method is applied to the network access device in the data transmission system provided by the present application, as shown in fig. 7, the flow of the data transmission method may be as follows:
in 210, a target data packet transmitted by the electronic device is obtained.
The data transmission method provided by the present application will be described below from the perspective of a network access device.
The network access device provides a network access service for the electronic device, so that the electronic device can access a network (such as the internet, an internal network of an organization, and the like) through the network access device, and thus perform data interaction with other devices through the network. For example, a game application executed by the electronic device enables the user to play normally online by performing data interaction with a game server at the other end of the network.
In the embodiment of the application, the electronic device obtains a data packet to be sent in real time, where the data packet to be sent may be generated by a local application of the electronic device, or may be forwarded to the electronic device by other electronic devices when the electronic device shares a network with other electronic devices.
For example, when the electronic device runs a game application, the game application generates a data packet that needs to be sent to the game server, and the electronic device takes the data packet as a data packet to be sent.
For another example, referring to fig. 3, the network access device provides a network access service for the electronic device, the electronic device shares a network with other electronic devices, at a certain time, a certain instant messaging application run by other electronic devices generates a data packet that needs to be sent to the instant messaging server, and correspondingly transmits the data packet to the electronic device, and at this time, the electronic device takes the data packet as a data packet to be sent.
Of course, as can be understood by those skilled in the art, how to acquire a data packet to be transmitted by an electronic device may also be other situations not listed in the embodiments of the present application.
It should be noted that, in the embodiment of the present application, only the data transmission quality of the preset application is guaranteed.
The preset application can be configured by the default of the electronic equipment, and can also be configured correspondingly by the electronic equipment according to the input of a user. For example, the electronic device configures, by default, an application having a high requirement on data transmission quality, such as a game application and a live broadcast application, as a preset application that needs to guarantee the transmission quality.
Correspondingly, after the electronic device obtains the data packet to be sent, the electronic device further parses the data packet to be sent to determine the application to which the data packet to be sent belongs, or to determine which application the data packet to be sent is generated by. And then, the electronic equipment further identifies whether the application to which the data packet to be sent belongs is a preset application, and if so, determines that the transmission quality of the data packet to be sent needs to be guaranteed.
In order to guarantee the transmission quality of the preset application, a priority sending identifier is provided in the embodiment of the present application, and the priority sending identifier is configured to instruct the network access device to send the corresponding data packet preferentially. In addition, in order to ensure the stability of data transmission, the preferential transmission identifier is a random value obtained by pre-negotiation between the electronic device and the network access device. The negotiation on how to send the identifier preferentially between the electronic device and the network access device is not specifically limited here, and may be configured by a person of ordinary skill in the art according to actual needs.
For example, when the electronic device establishes a network connection with the network access device, a negotiation request is generated according to a message format agreed with the network access device and transmitted to the network access device; the network access equipment generates a random value through a configured random number generation algorithm according to a negotiation request from the electronic equipment, takes the random value as a priority sending identifier, and then generates a negotiation response carrying the priority sending identifier with a message format agreed in advance with the electronic equipment to transmit to the electronic equipment; and if the electronic equipment receives the priority sending identifier returned by the network access equipment, returning a confirmation response to the network access equipment. And the electronic equipment and the network access equipment finish the negotiation of the prior sending identifier.
As described above, referring to fig. 4, when it is recognized that the data packet to be sent is a data packet of the preset application, the electronic device adds the preferential sending identifier to the data packet to be sent, and records the data packet to be sent with the preferential sending identifier as the target data packet. In this embodiment, no specific limitation is imposed on how to add the preferential transmission identifier to the data packet to be sent, and a person skilled in the art may configure the preferential transmission identifier according to actual needs, for example, the preferential transmission identifier may be added to a header field of the data packet to be sent, and the preferential transmission identifier may also be added to a trailer field of the data packet to be sent.
In the embodiment of the application, after the target data packet is obtained by adding the priority sending identifier to the data packet to be sent, the electronic device transmits the target data packet to the network access device.
Accordingly, the network access device will receive the target data packet transmitted by the electronic device.
In 220, when the target data packet carries a priority sending identifier, the target data packet is preferentially sent, where the priority sending identifier includes a random value obtained by pre-negotiation between the network access device and the electronic device.
As described above, the target data packet transmitted to the network access device by the electronic device is added with the priority sending identifier, at this time, the network access device recognizes that the target data packet carries the priority sending identifier, and correspondingly determines that the target data packet needs to be sent preferentially according to the indication of the priority sending identifier, so that the target data packet is sent preferentially according to the pre-configured priority sending policy, and the target data packet is transmitted to the corresponding opposite terminal device via the network. The specific configuration of the preferential transmission strategy is not limited herein, and can be configured by those skilled in the art according to actual needs.
For example, the network access device is configured with a priority transmission queue and a normal transmission queue, and the network access device is configured to transmit the data packets in the normal transmission queue after all the data packets in the priority transmission queue are completely transmitted. Therefore, when the network access equipment preferentially sends the target data packet, the target data packet is inserted into the preferential sending queue, and if other data packets are in front of the target data packet in the preferential sending queue, the network access equipment sends the target data packet after completing sending the other data packets in sequence; and if no other data packet is in the priority sending queue before the target data packet, the network access equipment directly sends the target data packet.
Optionally, in an embodiment, the obtaining the target data packet transmitted by the electronic device includes:
receiving a plurality of identical target data packets from the electronic device;
preferentially sending the target data packet, comprising:
when a first target data packet from the electronic device is received, if a network transmission protocol required by the first target data packet is a first preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are discarded.
In order to ensure that the network access device can receive the target data packet transmitted by the electronic device, the electronic device performs redundant transmission on the target data packet in the embodiment of the application.
When the electronic device transmits the target data packet to the network access device, the electronic device copies the target data packet at least once, so as to obtain at least two target data packets, wherein the at least two target data packets include an original target data packet and at least one copied target data.
It should be noted that, in the embodiment of the present application, the number of times of copying the target data packet is not particularly limited, and may be configured by a person having ordinary skill in the art according to actual needs.
After the target data packets are copied and at least two target data packets are obtained, the electronic equipment transmits the obtained at least two target data packets to the network access equipment. Therefore, even in the case of packet loss, the network access device can receive the target data packet transmitted by the electronic device to the greatest extent.
It can be understood that, since the electronic device transmits at least two target data packets to the network access device, regardless of the situation that the network access device does not receive the target data packets transmitted by the electronic device, the network access device may receive one target data packet transmitted by the electronic device, and may also receive at least two target data packets transmitted by the electronic device.
The network access equipment identifies a transmission layer network transmission protocol required by a first target data packet when receiving the first target data packet from the electronic equipment, preferentially sends the first target data packet if the network transmission protocol required by the first target data packet is a first preset network transmission protocol, and discards other subsequently received target data packets. The first predetermined network transport protocol may be any network transport protocol without a packet deduplication function, and may be configured by a person of ordinary skill in the art according to actual needs.
Optionally, in an embodiment, the preferentially sending the target packet further includes:
when a first target data packet from the electronic device is received, if the network transmission protocol required by the first target data packet is a second preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are preferentially sent.
In the embodiment of the application, if the network access device identifies that the network transmission protocol required by the received first target data packet is the second preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are preferentially sent. The second predetermined network transmission protocol may be any network transmission protocol without a data packet deduplication function, and may be configured by a person of ordinary skill in the art according to actual needs.
Optionally, in an embodiment, the network access device establishes a multi-path network connection with the electronic device, and receives a plurality of identical target packets from the electronic device, including:
one of a plurality of identical destination packets is received over each network connection.
In the embodiment of the application, in order to ensure the data transmission quality between the electronic device and the network access device, N-way network connection is established between the electronic device and the network access device, where N is a positive integer greater than or equal to 2. Accordingly, the electronic device may transmit the target data packet to the network access device through the multi-path network connection established between the electronic device and the network access device.
The electronic equipment copies the target data packet for N-1 times to obtain N-1 copied target data packets, wherein the N copied target data packets comprise N original target data packets. Then, the electronic device allocates the N target data packets to the N network connections one by one for transmission to the network access device, that is, allocates each target data packet of the N target data packets to one network connection for transmission to the network access device.
For example, referring to fig. 5, two network connections are established between the electronic device and the network access device, which are a first network connection based on a 2.4G frequency point and a second network connection based on a 5G frequency point, respectively, and accordingly, when the electronic device copies the target data packet, the electronic device copies the target data packet 2-1 times to 1 time to obtain two target data packets including the original target data packet, and then allocates one of the target data packets to the first network connection for transmission to the network access device, and allocates the other target data packet to the second network connection for transmission to the network access device.
As above, the network access device will receive one of a plurality of identical destination data packets over each network connection between it and the electronic device.
Referring to fig. 8, fig. 8 is a schematic flow chart of a data transmission method provided in the present application, and as shown in fig. 8, the flow of the data transmission method may be as follows:
in 310, when the electronic device establishes a network connection with the network access device, a random value is obtained through negotiation and is used as a preferential sending identifier.
The electronic device may establish a network connection with the network access device for the first time, or may perform a negotiation with the network access device for preferentially sending the identifier when establishing a connection with the network access device again.
The negotiation on how to send the identifier preferentially between the electronic device and the network access device is not specifically limited here, and may be configured by a person of ordinary skill in the art according to actual needs.
For example, when the electronic device establishes a network connection with the network access device, a negotiation request is generated according to a message format agreed with the network access device and transmitted to the network access device; the network access equipment generates a random value through a configured random number generation algorithm according to a negotiation request from the electronic equipment, takes the random value as a priority sending identifier, and then generates a negotiation response carrying the priority sending identifier with a message format agreed in advance with the electronic equipment to transmit to the electronic equipment; and if the electronic equipment receives the priority sending identifier returned by the network access equipment, returning a confirmation response to the network access equipment. And the electronic equipment and the network access equipment finish the negotiation of the prior sending identifier.
At 320, the electronic device obtains a data packet to be transmitted.
In the embodiment of the application, the electronic device obtains a data packet to be sent in real time, where the data packet to be sent may be generated by a local application of the electronic device, or may be forwarded to the electronic device by other electronic devices when the electronic device shares a network with other electronic devices.
For example, when the electronic device runs a game application, the game application generates a data packet that needs to be sent to the game server, and the electronic device takes the data packet as a data packet to be sent.
For another example, referring to fig. 3, the network access device provides a network access service for the electronic device, the electronic device shares a network with other electronic devices, at a certain time, a certain instant messaging application run by other electronic devices generates a data packet that needs to be sent to the instant messaging server, and correspondingly transmits the data packet to the electronic device, and at this time, the electronic device takes the data packet as a data packet to be sent.
Of course, as can be understood by those skilled in the art, how to acquire a data packet to be transmitted by an electronic device may also be other situations not listed in the embodiments of the present application.
In 330, when the data packet to be sent is a data packet of a preset application, the electronic device adds a priority sending identifier to the data packet to be sent to obtain a target data packet.
It should be noted that, in the embodiment of the present application, only the data transmission quality of the preset application is guaranteed.
The preset application can be configured by the default of the electronic equipment, and can also be configured correspondingly by the electronic equipment according to the input of a user. For example, the electronic device configures, by default, an application having a high requirement on data transmission quality, such as a game application and a live broadcast application, as a preset application that needs to guarantee the transmission quality.
Correspondingly, after the electronic device obtains the data packet to be sent, the electronic device further parses the data packet to be sent to determine the application to which the data packet to be sent belongs, or to determine which application the data packet to be sent is generated by. And then, the electronic equipment further identifies whether the application to which the data packet to be sent belongs is a preset application, and if so, determines that the transmission quality of the data packet to be sent needs to be guaranteed.
In order to guarantee the transmission quality of the preset application, a priority sending identifier is provided in the embodiment of the present application, and the priority sending identifier is configured to instruct the network access device to send the corresponding data packet preferentially. In addition, in order to ensure the stability of data transmission, the preferential transmission identifier is a random value obtained by pre-negotiation between the electronic device and the network access device. The negotiation on how to send the identifier preferentially between the electronic device and the network access device is not specifically limited here, and may be configured by a person of ordinary skill in the art according to actual needs.
For example, when the electronic device establishes a network connection with the network access device, a negotiation request is generated according to a message format agreed with the network access device and transmitted to the network access device; the network access equipment generates a random value through a configured random number generation algorithm according to a negotiation request from the electronic equipment, takes the random value as a priority sending identifier, and then generates a negotiation response carrying the priority sending identifier with a message format agreed in advance with the electronic equipment to transmit to the electronic equipment; and if the electronic equipment receives the priority sending identifier returned by the network access equipment, returning a confirmation response to the network access equipment. And the electronic equipment and the network access equipment finish the negotiation of the prior sending identifier.
As described above, referring to fig. 4, when it is recognized that the data packet to be sent is a data packet of the preset application, the electronic device adds the preferential sending identifier to the data packet to be sent, and records the data packet to be sent with the preferential sending identifier as the target data packet. In this embodiment, no specific limitation is imposed on how to add the preferential transmission identifier to the data packet to be sent, and a person skilled in the art may configure the preferential transmission identifier according to actual needs, for example, the preferential transmission identifier may be added to a header field of the data packet to be sent, and the preferential transmission identifier may also be added to a trailer field of the data packet to be sent.
In 340, the electronic device transmits the target data packet to the network access device.
In the embodiment of the application, after the target data packet is obtained by adding the priority sending identifier to the data packet to be sent, the electronic device transmits the target data packet to the network access device.
In 350, the network access device preferentially transmits the target data packet according to the preferential transmission identifier.
After receiving the target data packet from the electronic device, the network access device determines that the target data packet needs to be preferentially sent according to a preferential sending identifier carried in the target data packet, so that the target data packet is preferentially sent according to a pre-configured preferential sending strategy, and the target data packet is transmitted to the corresponding opposite terminal device through the network. The specific configuration of the preferential transmission strategy is not limited herein, and can be configured by those skilled in the art according to actual needs.
For example, the network access device is configured with a priority transmission queue and a normal transmission queue, and the network access device is configured to transmit the data packets in the normal transmission queue after all the data packets in the priority transmission queue are completely transmitted. Therefore, when the network access equipment preferentially sends the target data packet, the target data packet is inserted into the preferential sending queue, and if other data packets are in front of the target data packet in the preferential sending queue, the network access equipment sends the target data packet after completing sending the other data packets in sequence; and if no other data packet is in the priority sending queue before the target data packet, the network access equipment directly sends the target data packet.
At 360, upon receiving the response packet corresponding to the destination packet, the network access device preferentially sends the response packet to the electronic device.
In this embodiment, the network access device preferentially forwards a response packet returned by the peer device of the target packet to the electronic device, in addition to preferentially sending out the target packet from the electronic device.
After receiving a target data packet from the electronic device, the network access device records five-tuple data of the target data packet, including a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol, in addition to preferentially sending the target data packet.
And then, if the received data packet is matched with the recorded quintuple data of the target data packet, taking the data packet as a response data packet of the target data packet, and preferentially sending the response data packet to the electronic equipment.
For example, the five-tuple data of the target packet is recorded as: "192.168.1.1, 10000, TCP, 121.14.88.76, 80" form a five-tuple, where 192.168.1.1 is the source IP address of the destination packet, 10000 is the source port of the destination packet, TCP is the transport layer protocol of the destination packet, 121.14.88.76 is the destination IP address of the destination packet (indicating the peer device of the destination packet), and 80 is the destination port of the destination packet. If the five-tuple data of a packet is "121.14.88.76, 80, TCP, 192.168.1.1, 10000", where 121.14.88.76 is the source IP address of the packet, 80 is the source port of the packet, TCP is the transport layer protocol of the packet, 192.168.1.1 is the destination IP address of the packet, and 10000 is the destination port of the packet. Obviously, the quintuple data of the data packet matches the quintuple data of the target data packet, and the network access device preferentially sends the data packet to the electronic device as a response data packet of the target data packet.
Referring to fig. 9, in order to better perform the data transmission method applied to the electronic device provided by the present application, the present application further provides a data transmission apparatus applied to an electronic device, where the electronic device provides a network access service through a network access device, as shown in fig. 9, the data transmission apparatus may include:
an obtaining module 410, configured to obtain a data packet to be sent;
the identifier module 420 is configured to, when a data packet to be sent is a data packet of a preset application, add a priority sending identifier to the data packet to be sent to obtain a target data packet, where the priority sending identifier includes a random value obtained by pre-negotiation between the electronic device and the network access device;
the transmission module 430 is configured to transmit the target data packet to the network access device, so that the network access device preferentially sends the target data packet according to the preferential sending identifier.
Optionally, in an embodiment, the transmission module 430 is configured to:
and the target data packet is copied at least once to obtain at least two target data packets, and the at least two target data packets are transmitted to the network access equipment.
Optionally, in an embodiment, the electronic device and the network access device establish N-way network connection, where N is a positive integer greater than or equal to 2, and the transmission module 430 is configured to:
copying the target data packets for N-1 times to obtain N target data packets;
and distributing the N target data packets to the N network connections one by one for transmission to the network access equipment.
Optionally, in an embodiment, the identification module 420 is configured to:
and writing a priority sending identifier in the service type field of the data packet to be sent, and setting the data packet to be sent with the written priority sending identifier as a target data packet.
Optionally, in an embodiment, the transmission module 430 is further configured to receive a response packet corresponding to the target packet and preferentially sent by the network access device.
Optionally, in an embodiment, the data transmission apparatus provided in the present application further includes a negotiation module, configured to negotiate a new random value with the network access device as a preferential transmission identifier when the electronic device disconnects the network connection with the network access device and reestablishes the network connection.
It should be noted that the data transmission device provided in the embodiment of the present application and the data transmission method applied to the electronic device in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the foregoing related embodiments and are not described herein again.
Referring to fig. 10, in order to better perform the data transmission method applied to the network access device provided in the present application, the present application further provides a data transmission apparatus, where the data transmission apparatus is applied to a network access device, and the network access device provides a network access service for an electronic device, as shown in fig. 10, the data transmission apparatus may include:
an obtaining module 510, configured to obtain a target data packet transmitted by an electronic device;
a forwarding module 520, configured to preferentially send a data packet to be sent when the data packet to be sent carries a preferential sending identifier;
the priority sending identifier comprises a random value obtained by pre-negotiation between the network access equipment and the electronic equipment.
Optionally, in an embodiment, the obtaining module 510 is configured to receive a plurality of identical target data packets from the electronic device;
the forwarding module 520 is configured to, when receiving a first target data packet from the electronic device, preferentially send the first target data packet and discard other subsequently received target data packets if a network transmission protocol required by the first target data packet is a first preset network transmission protocol.
Optionally, in an embodiment, the forwarding module 520 is further configured to:
when a first target data packet from the electronic device is received, if the network transmission protocol required by the first target data packet is a second preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are preferentially sent.
Optionally, in an embodiment, the network access device and the electronic device establish multiple network connections, and the obtaining module 510 is configured to receive one of multiple identical target packets through each network connection.
It should be noted that the data transmission apparatus provided in this embodiment of the present application and the data transmission method applied to the network access device in the foregoing embodiments belong to the same concept, and the specific implementation process thereof is described in the foregoing related embodiments, and is not described herein again.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the data transmission method applied to the electronic device, which is provided by the present embodiment, by calling the computer program stored in the memory.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device may include a network interface 610, a memory 620, a processor 630, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The network interface 610 may be used to make network connections between devices.
Memory 620 may be used to store computer programs and data. The memory 620 stores computer programs containing executable code. The computer program may be divided into various functional modules. The processor 630 executes various functional applications and data processing by executing computer programs stored in the memory 620.
The processor 630 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing a computer program stored in the memory 620 and calling data stored in the memory 620, thereby performing overall control of the electronic device.
In the embodiment of the present application, the processor 630 in the electronic device loads the executable code corresponding to one or more computer programs into the memory 620 according to the following instructions, and the processor 630 executes the executable code, thereby performing the following steps:
acquiring a data packet to be sent;
when the data packet to be sent is a data packet of a preset application, adding a priority sending identifier to the data packet to be sent to obtain a target data packet, wherein the priority sending identifier comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment;
and transmitting the target data packet to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the preferential transmission identifier.
Optionally, in an embodiment, when transmitting the target data packet to the network access device, the processor 630 is configured to perform:
and the target data packet is copied at least once to obtain at least two target data packets, and the at least two target data packets are transmitted to the network access equipment.
Optionally, in an embodiment, the electronic device and the network access device establish N-way network connection, where N is a positive integer greater than or equal to 2, and when the target data packet is copied at least once to obtain at least two target data packets, and the at least two target data packets are transmitted to the network access device, the processor 630 is configured to perform:
copying the target data packets for N-1 times to obtain N target data packets;
and distributing the N target data packets to the N network connections one by one for transmission to the network access equipment.
Optionally, in an embodiment, when adding a preferential transmission identifier to a packet to be transmitted to obtain a target packet, the processor 630 is configured to:
and writing a priority sending identifier in the service type field of the data packet to be sent, and setting the data packet to be sent with the written priority sending identifier as a target data packet.
Optionally, in an embodiment, the processor 630 is further configured to perform:
and receiving a response data packet which is preferentially sent by the network access equipment and corresponds to the target data packet.
Optionally, in an embodiment, the processor 630 is further configured to perform:
when the electronic equipment disconnects the network connection with the network access equipment and establishes the network connection again, a new random value is negotiated with the network access equipment to be used as a priority sending identifier.
It should be noted that the electronic device provided in the embodiment of the present application and the data transmission method applied to the electronic device in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the foregoing related embodiments and are not described herein again.
The embodiment of the present application further provides a network access device, which includes a memory and a processor, where the processor is configured to execute the steps in the data transmission method applied to the network access device, which is provided by this embodiment, by calling a computer program stored in the memory.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a network access device according to an embodiment of the present application.
The network access device may include a network interface 710, memory 720, processor 730, and the like. Those skilled in the art will appreciate that the network access device configuration shown in fig. 8 does not constitute a limitation of network access devices and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The network interface 710 may be used to make network connections between devices.
Memory 720 may be used to store computer programs and data. Memory 720 stores computer programs having executable code embodied therein. The computer program may be divided into various functional modules. The processor 730 executes various functional applications and data processing by executing computer programs stored in the memory 720.
The processor 730 is a control center of the network access device, connects various parts of the entire network access device using various interfaces and lines, and performs various functions of the network access device and processes data by running or executing computer programs stored in the memory 720 and calling data stored in the memory 720, thereby performing overall control of the network access device.
In the embodiment of the present application, the processor 730 in the network access device loads the executable code corresponding to one or more computer programs into the memory 720 according to the following instructions, and the processor 730 executes the instructions to perform the following steps:
acquiring a target data packet transmitted by electronic equipment;
when the data packet to be sent carries the preferential sending identifier, preferentially sending the data packet to be sent;
the priority sending identifier comprises a random value obtained by pre-negotiation between the network access equipment and the electronic equipment.
Optionally, in an embodiment, when acquiring the target data packet transmitted by the electronic device, the processor 730 is configured to perform:
receiving a plurality of identical target data packets from the electronic device;
when the data packet to be sent is preferentially sent, the processor 730 is configured to perform:
when a first target data packet from the electronic device is received, if a network transmission protocol required by the first target data packet is a first preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are discarded.
Optionally, in an embodiment, the processor 730 is further configured to perform:
when a first target data packet from the electronic device is received, if the network transmission protocol required by the first target data packet is a second preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are preferentially sent.
Optionally, in an embodiment, the network access device establishes multiple network connections with the electronic device, and when receiving multiple identical target packets from the electronic device, the processor 730 is further configured to:
one of a plurality of identical destination packets is received over each network connection.
It should be noted that the network access device provided in the embodiment of the present application and the data transmission method applied to the network access device in the foregoing embodiments belong to the same concept, and the specific implementation process thereof is detailed in the foregoing related embodiments, and is not described herein again.
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the stored computer program is executed on a processor of an electronic device provided in the embodiment of the present application, the processor of the electronic device is caused to execute any of the steps in the data transmission method applied to the electronic device; alternatively, when the stored computer program is executed on a processor of the network access device provided in the embodiment of the present application, the processor of the network access device is caused to execute any of the steps in the data transmission method applied to the network access device. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
The data transmission method, the data transmission device, the storage medium, and the electronic device provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (15)

1. A data transmission method is applied to electronic equipment, and the electronic equipment provides network access service by network access equipment, and is characterized in that the data transmission method comprises the following steps:
acquiring a data packet to be sent;
when the data packet to be sent is a data packet of a preset application, adding a priority sending identifier to the data packet to be sent to obtain a target data packet, wherein the priority sending identifier comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment;
and transmitting the target data packet to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the preferential transmission identifier.
2. The data transmission method according to claim 1, wherein the transmitting the target data packet to the network access device includes:
and copying the target data packet at least once to obtain at least two target data packets, and transmitting the at least two target data packets to the network access equipment.
3. The data transmission method according to claim 2, wherein the electronic device establishes N network connections with the network access device, where N is a positive integer greater than or equal to 2, copies the target data packet at least once to obtain at least two target data packets, and transmits the at least two target data packets to the network access device, including:
copying the target data packet for N-1 times to obtain N target data packets;
and distributing the N target data packets to the N network connections one by one for transmission to the network access equipment.
4. The data transmission method according to claim 1, wherein the adding a priority transmission identifier to the data packet to be transmitted to obtain a target data packet includes:
and writing the preferential transmission identifier in the service type field of the data packet to be transmitted, and setting the data packet to be transmitted with the preferential transmission identifier as the target data packet.
5. The data transmission method according to any one of claims 1 to 4, wherein after the transmitting the target data packet to the network access device, further comprising:
and receiving a response data packet which is preferentially sent by the network access equipment and corresponds to the target data packet.
6. The data transmission method according to any one of claims 1 to 4, further comprising:
and when the electronic equipment disconnects the network connection with the network access equipment and reestablishes the network connection, negotiating a new random value with the network access equipment as the preferential sending identifier.
7. A data transmission method is applied to network access equipment, and the network access equipment provides network access service for electronic equipment, and is characterized in that the data transmission method comprises the following steps:
acquiring a target data packet transmitted by the electronic equipment;
when the target data packet carries a priority sending identifier, preferentially sending the target data packet;
the priority sending identifier includes a random value obtained by pre-negotiating between the network access device and the electronic device.
8. The data transmission method according to claim 7, wherein the obtaining of the target data packet transmitted by the electronic device comprises:
receiving a plurality of identical target data packets from the electronic device;
the preferentially sending the target data packet includes:
when a first target data packet from the electronic device is received, if a network transmission protocol required by the first target data packet is a first preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are discarded.
9. The data transmission method according to claim 8, wherein the preferentially sending the target packet further comprises:
when a first target data packet from the electronic device is received, if the network transmission protocol required by the first target data packet is a second preset network transmission protocol, the first target data packet is preferentially sent, and other subsequently received target data packets are preferentially sent.
10. The data transmission method according to claim 8, wherein the network access device establishes a multi-path network connection with the electronic device, and the receiving a plurality of identical target packets from the electronic device includes:
receiving one of the plurality of identical destination packets over each network connection.
11. A data transmission apparatus, applied to an electronic device, where the electronic device provides a network access service through a network access device, the data transmission apparatus comprising:
the acquisition module is used for acquiring a data packet to be sent;
the identification module is used for adding a priority sending identification to the data packet to be sent to obtain a target data packet when the data packet to be sent is a data packet of a preset application, wherein the priority sending identification comprises a random value obtained by pre-negotiation between the electronic equipment and the network access equipment;
and the transmission module is used for transmitting the target data packet to the network access equipment, so that the network access equipment preferentially transmits the target data packet according to the preferential transmission identifier.
12. A data transmission device is applied to network access equipment, and the network access equipment provides network access service for electronic equipment, and is characterized in that the data transmission device comprises:
the acquisition module is used for acquiring a target data packet transmitted by the electronic equipment;
the forwarding module is used for preferentially sending the data packet to be sent when the data packet to be sent carries a preferential sending identifier;
the priority sending identifier includes a random value obtained by pre-negotiating between the network access device and the electronic device.
13. An electronic device, the electronic device being provided with a network access service by a network access device, the electronic device comprising a processor and a memory, the memory storing a computer program, wherein the processor executes the data transmission method according to any one of claims 1 to 6 by loading the computer program.
14. A network access device providing network access services for an electronic device, the network access device comprising a processor and a memory, the memory storing a computer program, wherein the processor executes the data transmission method according to any one of claims 7 to 10 by loading the computer program.
15. A storage medium having stored thereon a computer program for performing the data transmission method according to any of claims 1-6, when the computer program is loaded by a processor of an electronic device, or for performing the data transmission method according to any of claims 7-10, when the computer program is loaded by a processor of a network access device.
CN202011272675.3A 2020-11-13 2020-11-13 Data transmission method, device, medium, electronic equipment and network access equipment Active CN112398754B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011272675.3A CN112398754B (en) 2020-11-13 2020-11-13 Data transmission method, device, medium, electronic equipment and network access equipment
PCT/CN2021/114345 WO2022100199A1 (en) 2020-11-13 2021-08-24 Data transmission method and apparatus, and medium, electronic device and network access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011272675.3A CN112398754B (en) 2020-11-13 2020-11-13 Data transmission method, device, medium, electronic equipment and network access equipment

Publications (2)

Publication Number Publication Date
CN112398754A true CN112398754A (en) 2021-02-23
CN112398754B CN112398754B (en) 2022-09-13

Family

ID=74599371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011272675.3A Active CN112398754B (en) 2020-11-13 2020-11-13 Data transmission method, device, medium, electronic equipment and network access equipment

Country Status (2)

Country Link
CN (1) CN112398754B (en)
WO (1) WO2022100199A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923722A (en) * 2021-10-11 2022-01-11 中国联合网络通信集团有限公司 Data transmission method, device and storage medium
WO2022100199A1 (en) * 2020-11-13 2022-05-19 Oppo广东移动通信有限公司 Data transmission method and apparatus, and medium, electronic device and network access device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087723A1 (en) * 2001-01-03 2002-07-04 Robert Williams Method and apparatus for performing priority-based flow control
US20100312892A1 (en) * 2009-06-08 2010-12-09 Comcast Cable Communications, Llc Management of Shared Access Network
US20120063402A1 (en) * 2009-05-20 2012-03-15 Telefonaktiebolaget L M Ericsson (Publ) Systems and Method for Communicating Priority Information for Use in Scheduling the Transmission of Data
US20130046863A1 (en) * 2011-08-16 2013-02-21 Comcast Cable Communications, Llc Prioritizing Local and Network Traffic
US20140341109A1 (en) * 2011-06-02 2014-11-20 Interdigital Patent Holdings, Inc. Methods, Apparatus and Systems for Managing Converged Gateway Communications
CN104486244A (en) * 2014-12-03 2015-04-01 中国联合网络通信集团有限公司 QoS (quality of service) strategy executing method and device
CN105245469A (en) * 2015-08-27 2016-01-13 北京金山安全软件有限公司 Data transmission method, device and system
CN105450550A (en) * 2015-11-10 2016-03-30 北京奇虎科技有限公司 Channel priority adjustment method and device for router
CN108259383A (en) * 2016-12-29 2018-07-06 北京华为数字技术有限公司 The transmission method and the network equipment of a kind of data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540936B (en) * 2003-04-26 2010-04-28 华为技术有限公司 Method for controlling priority for transmitting message based on virtual local area network
US20150098390A1 (en) * 2013-10-04 2015-04-09 Vonage Network Llc Prioritization of data traffic between a mobile device and a network access point
CN108768860B (en) * 2018-05-25 2020-12-25 新华三技术有限公司 Portal system message sending method and device
CN112398754B (en) * 2020-11-13 2022-09-13 Oppo广东移动通信有限公司 Data transmission method, device, medium, electronic equipment and network access equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087723A1 (en) * 2001-01-03 2002-07-04 Robert Williams Method and apparatus for performing priority-based flow control
US20120063402A1 (en) * 2009-05-20 2012-03-15 Telefonaktiebolaget L M Ericsson (Publ) Systems and Method for Communicating Priority Information for Use in Scheduling the Transmission of Data
US20100312892A1 (en) * 2009-06-08 2010-12-09 Comcast Cable Communications, Llc Management of Shared Access Network
US20140341109A1 (en) * 2011-06-02 2014-11-20 Interdigital Patent Holdings, Inc. Methods, Apparatus and Systems for Managing Converged Gateway Communications
US20130046863A1 (en) * 2011-08-16 2013-02-21 Comcast Cable Communications, Llc Prioritizing Local and Network Traffic
CN104486244A (en) * 2014-12-03 2015-04-01 中国联合网络通信集团有限公司 QoS (quality of service) strategy executing method and device
CN105245469A (en) * 2015-08-27 2016-01-13 北京金山安全软件有限公司 Data transmission method, device and system
CN105450550A (en) * 2015-11-10 2016-03-30 北京奇虎科技有限公司 Channel priority adjustment method and device for router
CN108259383A (en) * 2016-12-29 2018-07-06 北京华为数字技术有限公司 The transmission method and the network equipment of a kind of data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022100199A1 (en) * 2020-11-13 2022-05-19 Oppo广东移动通信有限公司 Data transmission method and apparatus, and medium, electronic device and network access device
CN113923722A (en) * 2021-10-11 2022-01-11 中国联合网络通信集团有限公司 Data transmission method, device and storage medium
CN113923722B (en) * 2021-10-11 2023-06-13 中国联合网络通信集团有限公司 Data transmission method, device and storage medium

Also Published As

Publication number Publication date
CN112398754B (en) 2022-09-13
WO2022100199A1 (en) 2022-05-19

Similar Documents

Publication Publication Date Title
CN110086578B (en) Data transmission method, device and system
US11277313B2 (en) Data transmission method and corresponding device
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN110445723B (en) Network data scheduling method and edge node
CN112398754B (en) Data transmission method, device, medium, electronic equipment and network access equipment
WO2014023003A1 (en) Method, apparatus, and system for controlling data transmission
JP2010140124A (en) Data distribution communication apparatus and data distribution system
CN110169030B (en) Method for transmitting content over heterogeneous network and apparatus therefor
CN109196842B (en) Session keeping method, device and storage medium
WO2023000894A1 (en) Data transmission method and apparatus, and server, storage medium and program product
WO2021008591A1 (en) Data transmission method, device, and system
CN109391522B (en) RDMA-based network traffic determination method, forwarding device, analysis server, and storage medium
US6735220B1 (en) Using a centralized server to coordinate assignment of identifiers in a distributed system
CN107483628B (en) DPDK-based one-way proxy method and system
US20050141531A1 (en) Communication relay method and relay device
JP2003069640A (en) Method and apparatus for explicit multicast service on ethernet (r)
CN112333690B (en) Data transmission method, device, storage medium, terminal and network access point equipment
CN112383801B (en) Media stream distribution method, device, distribution server and storage medium
CN111064673B (en) User plane data integrity protection method and device, electronic equipment and medium
US11172053B2 (en) Transfer apparatus, transfer method, and program for transporting data from a single source to sinks with different communication requirements
JP4413121B2 (en) Data communication apparatus and data communication method using TCP / IP socket
CN113114565B (en) Data message forwarding method and device, storage medium and electronic equipment
US20230362856A1 (en) Data transmission method, data transmission apparatus, computer-readable medium, and electronic device
US20230353285A1 (en) Data transmission method, data transmission apparatus, computer-readable medium, electronic device, and computer program product
WO2022044226A1 (en) Communication system, communication method, communication device, and program

Legal Events

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