Data transmission method and device, electronic equipment and storage medium
By introducing an asynchronous transmission mechanism between the transmission network element and the session creation network element, the problem of the transmission network element encapsulating data packets before receiving session information is solved, and the packet transmission delay is reduced and efficiency is improved, avoiding the need for Internet congestion.
Patent Information
- Application Number
- CN202310576190.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2024-11-22
AI Technical Summary
When transmitting data packets between the two parties in the communication, the session creation and transmission functions in the prior art are separated, resulting in the transmission network element encapsulating the data packet before receiving the session information, increasing the packet transmission delay and reducing the transmission efficiency.
By introducing an asynchronous transmission mechanism between the transmission network element and the session creation network element, if the amount of data to be transmitted is greater than the set threshold, the session creation network element will asynchronously send the target session information and the encapsulated data packets, and the transmission network element will store the session information. And transmit data packets, decouple session information reception and data packet encapsulation, and reduce transmission delay.
It effectively reduces the delay in data packet transmission, improves transmission efficiency, and avoids network congestion, especially in the case of large amount of data to be transmitted, which significantly improves data transmission performance.
Smart Images

Figure CN119011509A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data transmission method and device, an electronic device, a storage medium, and a program product. Background Art
[0002] In the process of transmitting data packets between communicating parties, it is usually necessary to create a session between the two parties, and encapsulate the data packets based on the session information before transmitting them to the receiving party. In order to improve data transmission performance, etc., the transmission function and the session creation function are usually deployed in different network elements. After creating a session, the session creation network element sends the session information to the transmission network element, and the transmission network element stores the session information and encapsulates the data packets based on the session information before forwarding them to the data receiving party.
[0003] In the related technology, after receiving a data packet for which a session has not been established between the corresponding communicating parties, the transmission network element will send the data packet to the session creation network element. The session creation network element will create session information corresponding to the data packet and send the created session information to the transmission network element, so that the transmission network element will encapsulate and transmit the data packet based on the received session information after receiving the session information, thereby increasing the data packet transmission delay and reducing the transmission efficiency. Summary of the invention
[0004] The embodiments of the present application provide a data transmission method and device, an electronic device, a storage medium, and a program product, which can reduce the data packet transmission delay, improve data transmission efficiency, and avoid network congestion.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, the method comprising:
[0006] receiving a target data packet sent by a transmission network element, wherein the target data packet is sent when the transmission network element fails to find session information corresponding to the target data packet in stored session information;
[0007] Creating target session information corresponding to the target data packet according to the target data packet, and obtaining the amount of data to be transmitted received within a specified historical time period;
[0008] If the amount of data to be transmitted is greater than a set data amount threshold, encapsulating the target data packet according to the target session information to obtain an encapsulated data packet;
[0009] The target session information and the encapsulated data packet are transmitted to the transmission network element in an asynchronous transmission manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to a data receiver.
[0010] In a second aspect, an embodiment of the present application provides a data transmission method, the method comprising:
[0011] Receive a target data packet from a data sender, and search for session information corresponding to the target data packet from the stored session information;
[0012] If the session information corresponding to the target data packet is not found, the target data packet is sent to a session creation network element, so that the session creation network element creates target session information corresponding to the target data packet according to the target data packet;
[0013] receiving the target session information transmitted by the session creation network element in an asynchronous transmission manner and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold;
[0014] The target session information is stored, and the encapsulated target data packet is transmitted to a data receiver.
[0015] In a third aspect, an embodiment of the present application provides a data transmission device, the device comprising:
[0016] A receiving module, configured to receive a target data packet sent by a transmission network element, wherein the target data packet is sent when the transmission network element fails to find the session information corresponding to the target data packet in the stored session information;
[0017] A processing module, configured to create target session information corresponding to the target data packet according to the target data packet, and obtain the amount of data to be transmitted received within a specified historical time period;
[0018] an encapsulation module, configured to encapsulate the target data packet according to the target session information to obtain an encapsulated data packet if the amount of data to be transmitted is greater than a set data amount threshold;
[0019] The sending module is configured to transmit the target session information and the encapsulated data packet to the transmission network element in an asynchronous sending manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to a data receiver.
[0020] In a fourth aspect, an embodiment of the present application provides a data transmission device, the device comprising:
[0021] A search module, configured to receive a target data packet from a data sender, and search for session information corresponding to the target data packet from the stored session information;
[0022] a sending module, configured to send the target data packet to a session creation network element if the session information corresponding to the target data packet is not found, so that the session creation network element creates target session information corresponding to the target data packet according to the target data packet;
[0023] a receiving module, configured to receive the target session information transmitted by the session creation network element in an asynchronous transmission manner and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold;
[0024] The transmission module is configured to store the target session information and transmit the encapsulated target data packet to a data receiver.
[0025] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0026] one or more processors;
[0027] The memory is used to store one or more computer programs. When the one or more computer programs are executed by the one or more processors, the electronic device implements the data transmission method as described above.
[0028] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of an electronic device, the electronic device implements the data transmission method as described above.
[0029] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the data transmission method as described above when executed by a processor.
[0030] In the technical solution provided by the embodiment of the present application, when the transmission network element fails to find the session information corresponding to the target data packet from the stored session information, the session information is sent to the session creation network element; the session creation network element creates the target session information corresponding to the target data packet according to the target data packet, and obtains the amount of data to be transmitted received in the specified historical time period; if the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated according to the target session information, and the target session information and the encapsulated data packet are transmitted to the transmission network element through asynchronous transmission, so that the transmission network element stores the target session information and transmits the encapsulated data packet to the data recipient; compared with the related art, for the target data packet whose corresponding session information does not exist in the session information stored by the transmission network element (that is, the corresponding data packet for which a session has not been established between the two communicating parties), the session creation network element The target session information is encapsulated by the session creation element, and the target session information and the encapsulated target data packet are transmitted to the transmission network element in an asynchronous sending manner, so that the transmission network element stores the received target session information and transmits the received encapsulated target data packet to the data receiver, so that the reception of the target session information in the transmission network element is decoupled from the encapsulation and transmission of the target data packet, thereby reducing the transmission delay of the data packet and improving the transmission efficiency; and, before encapsulating the target data packet, the session creation network element will also compare the amount of data to be transmitted corresponding to the specified historical time period with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated, and the target session information and the encapsulated target data packet are transmitted to the transmission network element in an asynchronous sending manner, thereby reducing the data packet transmission delay under the condition that the amount of data to be transmitted is relatively large, thereby avoiding network congestion.
[0031] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;
[0033] Figure 2 is a flow chart of a data transmission method shown in an exemplary embodiment of the present application;
[0034] Figure 3 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0035] Figure 4 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0036] Figure 5 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0037] Figure 6 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0038] Figure 7 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0039] Figure 8 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0040] Fig. 9 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0041] Fig.10 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0042] Fig.11 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0043] Fig.12 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0044] Fig.13 is a flow chart of a data transmission method shown in another exemplary embodiment of the present application;
[0045] Fig.14 is a block diagram of a data transmission process shown in another exemplary embodiment of the present application;
[0046] Fig.15 is a structural schematic diagram of a data transmission device shown in an exemplary embodiment of the present application;
[0047] Fig.16 is a structural schematic diagram of a data transmission device shown in another exemplary embodiment of the present application;
[0048] Fig.17 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0049] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0050] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0051] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0052] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0053] The following is a detailed introduction to the technical solutions of the embodiments of the present application:
[0054] In the related technology, after receiving a data packet for which a session has not been established between the corresponding communicating parties, the transmission network element will send the data packet to the session creation network element, and the session creation network element will create session information corresponding to the data packet, and send the created session information to the transmission network element, so that the transmission network element will encapsulate and transmit the data packet based on the received session information after receiving the session information, thereby increasing the data packet transmission delay and reducing the transmission efficiency. Based on this, the embodiments of the present application provide a data transmission method and device, an electronic device, a storage medium, and a program product, which can reduce the data packet transmission delay, improve the data transmission efficiency, and avoid network congestion.
[0055] See also Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment involved in the present application, which includes a data sender 110, a transmission network element 120, a session creation network element 130, and a data receiver 140. Among them, the data sender 110 and the transmission network element 120, the transmission network element 120 and the session creation network element 130, and the transmission network element 120 and the data receiver 140 can communicate in a wired or wireless manner. In order to improve the data transmission efficiency between the transmission network element 120 and the session creation network element 130, the transmission network element 120 and the session creation network element 130 can transmit data through high-speed Ethernet (Ethernet with a rate of or above 100Mb / s).
[0056] The data sender 110 and the data receiver 140 refer to the two parties that need to communicate. For the target data packet that needs to be sent this time, the data sender 110 refers to the party that sends the target data packet outward, and the data receiver 140 refers to the party that receives the target data packet. It should be noted that the data sender 110 and the data receiver 140 refer to the target data packet that needs to be sent this time, and are not used to limit the data sender 110 to only send data packets and the data receiver 140 to only receive data packets. In other words, the data sender 110 can also serve as the data receiver of other data packets to receive other data packets; the data receiver 140 can also serve as the data sender of other data packets to send other data packets.
[0057] The data sender 110 and the data receiver 140 can be any device with communication capabilities, such as terminal devices, servers, etc., wherein the terminal devices may include but are not limited to smart phones, tablets, laptops, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, remote driving terminals, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network) and big data and artificial intelligence platforms. The specific forms of terminal devices and servers are not restricted here.
[0058] The session creation network element 130 is used for session management, such as session creation, disconnection, logout, and closing, and the session creation network element 130 can also send session information corresponding to the created session to the transmission network element 120. The session creation network element 130 can be any network element that has the function of managing a session, such as a server, a terminal device, etc.
[0059] The transmission network element 120 is used to store the session information from the session creation network element 130, and encapsulate the data packet from the data sender 110 according to the stored session information, so as to transmit the encapsulated data packet to the data receiver 140. The transmission network element 120 can be any network element with a data packet encapsulation function, for example, including but not limited to at least one of a switch, a router, a gateway, etc. In order to realize functions such as setting the content of the session information, the transmission network element 120 can also have a programmable capability.
[0060] In an exemplary embodiment, the data processing method provided by the embodiment of the present application can be jointly executed by the data sender 110, the transmission network element 120, the session creation network element 130 and the data receiver 140. Exemplarily, after receiving the target data packet from the data sender 110, the transmission network element 120 first searches for the session information corresponding to the target data packet from the stored session information. If the key finds the session information corresponding to the target data packet, the target data packet is sent to the session creation network element 130; after receiving the target data packet, the session creation network element 130 creates the target session information corresponding to the target data packet, obtains the amount of data to be transmitted received in the specified historical time period, and compares the amount of data to be transmitted with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated according to the target session information, and the target session information and the encapsulated target data packet are transmitted to the transmission network element 120 through asynchronous transmission; after receiving the target session information, the transmission network element 120 stores the target session information, and after receiving the encapsulated target data packet, transmits the encapsulated target data packet to the data receiver 140. That is to say, for a target data packet whose corresponding session information does not exist in the session information stored in the transmission network element, the session creation network element encapsulates it, and transmits the target session information and the encapsulated target data packet to the transmission network element through asynchronous sending, so that after receiving the encapsulated target data packet, the transmission network element will transmit the encapsulated target data packet to the data receiver regardless of whether the target session information is received, so that the reception of the target session information in the transmission network element is decoupled from the encapsulation and transmission of the target data packet, thereby reducing the transmission delay of the data packet and improving the transmission efficiency; and before encapsulating the target data packet, the session creation network element will also compare the amount of data to be transmitted corresponding to the specified historical time period with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated, and the target session information and the encapsulated target data packet are transmitted to the transmission network element through asynchronous sending, thereby avoiding network congestion by reducing the data packet transmission delay under the condition that the amount of data to be transmitted is relatively large.
[0061] It should be noted that Figure 1 The number of data senders 110, transmission network elements 120, session creation network elements 130 and data receivers 140 is merely illustrative, and any number of data senders 110, transmission network elements 120, session creation network elements 130 and data receivers 140 may be provided according to actual needs.
[0062] The data transmission method provided in the embodiment of the present application can be applied to any communication scenario, for example, it can be used for data transmission between a client and a server, wherein the data sender 110 can be one of the client and the server, and the data receiver 140 is the other of the client and the server. In one example, the data sender 110 can be the client, and the data receiver 140 can be the server.
[0063] This application involves user-related data such as target data packets. When the methods of this application are applied to specific products or technologies, the user's permission or consent must be obtained, and the extraction, use and processing of relevant data must comply with local safety standards and local laws and regulations.
[0064] See also Figure 2 , Figure 2 is a flowchart of a data transmission method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0065] like Figure 2 As shown, in an exemplary embodiment, the data transmission method may include: S210-S240, which are described in detail as follows:
[0066] S210, receiving a target data packet sent by a transmission network element, where the target data packet is sent when the transmission network element fails to find session information corresponding to the target data packet in stored session information.
[0067] It should be noted that, in the process of transmitting data packets between communicating parties, a session between the communicating parties needs to be created to encapsulate and forward the data packets based on the session information.
[0068] The session creation network element is used to create a session and send the session information corresponding to the created session to the transmission network element. Optionally, the session creation network element can also store the created session information, and the session creation network element can also have session-related functions such as disconnecting the session, closing the session, and logging off the session. The session creation network element can be a terminal device, a server, etc.
[0069] The transmission network element is used to store session information and encapsulate and forward data packets according to the stored session information. It can be any network element with data packet encapsulation and forwarding functions, for example, including but not limited to at least one of a switch, a router, a gateway, etc. In order to realize functions such as setting the content of session information and adjusting the encapsulation method, the transmission network element can also have programmable capabilities.
[0070] The session information is the attribute information corresponding to the session, which includes the encapsulation method of the data packet corresponding to the session, which is used to indicate how to encapsulate the data packet, so as to forward the encapsulated data packet to the next node, and then forward the data packet to the receiver. The encapsulation method can be embodied in the form of functions, tables, etc. The specific encapsulation content can be determined according to the type of transmission network element and the transmission protocol corresponding to the session, including but not limited to adding packet header information, modifying the next hop address (for example, at least one of the next hop IP address, the next hop MAC address, etc.), etc., wherein IP refers to Internet Protocol, and MAC address refers to Physical Address, physical address. Optionally, the session information may also include at least one of the five-tuple information corresponding to the session, session identification information, etc., wherein the five-tuple information includes source IP address, source port, destination IP address, destination port and transport layer protocol; the session identification information is used to uniquely identify the session, which may be a session name, session ID, etc. In an optional example, the session information may be in the form of a table. Correspondingly, a session table may be set in the transmission network element. The session table includes multiple session table items. Each session table item corresponds to the session information of a session. Optionally, each session table item may include the encapsulation method of the data packet of the corresponding session, five-tuple information, and table item name (used to uniquely identify the session). It should be understood that the session information may also be in the form of textual description, graphics, etc.
[0071] When data needs to be transmitted, the data sender can send the target data packet to the transmission network element. The target data packet can include five-tuple information and data to be transmitted. The data sender can be any device with communication capabilities, such as a terminal device, a server, etc.
[0072] After receiving the target data packet, the transmission network element first searches for the session information corresponding to the target data packet from the stored session information, that is, searches for the session information of the session to which the target data packet belongs. If the session information corresponding to the target data packet is not found, it indicates that a session has not been created between the data sender and the data receiver corresponding to the target data packet, and the transmission network element cannot encapsulate the target data packet. Therefore, in order to obtain the session information corresponding to the target data packet, the transmission network element can send the target data packet to the session creation network element, so that the session creation network element creates the session corresponding to the target data packet. The data receiver can be any device with communication capabilities, such as a terminal device, a server, etc.
[0073] S220, creating target session information corresponding to the target data packet according to the target data packet, and obtaining the amount of data to be transmitted received within a specified historical time period.
[0074] After receiving the target data packet sent by the transmission network element, the session creation network element can create a session between the data sender and the data receiver (i.e., create a session corresponding to the target data packet), thereby obtaining the target session information corresponding to the target data packet, that is, the target session information is the session information of the session corresponding to the target data packet. Among them, the specific process of creating a session can be flexibly set according to actual needs. In an optional embodiment, the five-tuple information of the target data packet can be obtained, so as to create the session to which the target data packet belongs according to the five-tuple information of the target data packet.
[0075] The amount of data to be transmitted is used to characterize the amount of data to be transmitted received in a specified historical time period, which can be the amount of data to be transmitted received by a transmission network element in a specified historical time period, or the amount of data to be transmitted received by a session creation network element in a specified historical time period. The specific calculation method of the amount of data to be transmitted can be flexibly set according to actual needs. Optionally, since the number of data packets to be transmitted and the number of sessions created can characterize the amount of data to be transmitted, at least one of the number of data packets to be transmitted received in a specified historical time period, the number of sessions created in a specified historical time period, etc. can be used as the amount of data to be transmitted.
[0076] The designated historical time period is a period of time earlier than the current moment, and the specific duration and the time difference between it and the current moment can be flexibly set according to actual needs. In an optional example, in order to improve the real-time performance of the amount of data to be transmitted, the end time of the designated historical time period can be the current moment, that is, the designated historical time period is the period from the historical moment earlier than the current moment to the current moment. For example, assuming that the current moment is 12:00:00 and the duration of the designated historical time period is 10 minutes, the designated historical time period is the period of 11:50:00-12:00:00. In another optional example, the amount of data to be transmitted received in each period can be periodically detected. Under this condition, the designated historical time period can be a period earlier than the current moment and with the smallest time difference with the current moment.
[0077] It should be noted that in Figure 1 In the illustrated embodiment, the order of executing the creation of the target session information and the acquisition of the amount of data to be transmitted is not limited. In actual application, the target session information may be created first and then the amount of data to be transmitted may be acquired. Alternatively, the amount of data to be transmitted may be acquired first and then the target session information may be created. Alternatively, the acquisition of the amount of data to be transmitted and the creation of the target session information may be executed simultaneously.
[0078] S230: If the amount of data to be transmitted is greater than the set data amount threshold, encapsulate the target data packet according to the target session information to obtain an encapsulated data packet.
[0079] The data volume threshold is set to measure whether a traffic burst occurs, thereby determining the probability of sending network congestion. The specific value can be flexibly set according to actual needs.
[0080] After obtaining the amount of data to be transmitted, the session creation network element can compare the amount of data to be transmitted with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, it indicates that a traffic burst is currently occurring, and the probability of causing network congestion is high. Therefore, in order to reduce the transmission delay of the target data packet and thus avoid network congestion, the session creation network element can encapsulate the target data packet according to the target session information to obtain an encapsulated target data packet.
[0081] S240, transmitting the target session information and the encapsulated data packet to the transmission network element in an asynchronous transmission manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to the data receiver.
[0082] When the amount of data to be transmitted is greater than the set data volume threshold, in order to reduce the transmission delay of the target data packet and thus avoid network congestion, the session creation network element can send the target session information and the encapsulated target data packet to the transmission network element via asynchronous sending.
[0083] It should be understood that the asynchronous transmission mode means that data can be transmitted independently, and the interval between different data can be arbitrary. That is to say, under the condition that the amount of data to be transmitted is greater than the set data amount threshold, the session creation network element can transmit the target session information and the encapsulated target data packet to the transmission network element separately and independently. In this way, after receiving the encapsulated target data packet, the transmission network element can forward the encapsulated target data packet to the data recipient regardless of whether the target session information is received at this time, thereby reducing the transmission delay of the target data packet and reducing the probability of network congestion.
[0084] In the process of transmitting the target session information and the encapsulated data packet to the transmission network element via asynchronous sending, the session creation network element may first send the encapsulated target data packet and then send the target session information, or may first send the target session information and then send the encapsulated target data packet, or, in order to further reduce the transmission delay of the target data packet, the session creation network element may send the target session information and the encapsulated data packet at the same time.
[0085] exist Figure 2In the illustrated embodiment, for a target data packet for which the corresponding session information does not exist in the session information stored in the transmission network element (i.e., a data packet for which a session has not been established between the corresponding communication parties), the session creation network element encapsulates the target data packet, and transmits the target session information and the encapsulated target data packet to the transmission network element in an asynchronous transmission mode, so that the transmission network element stores the received target session information. Moreover, after receiving the encapsulated target data packet, the transmission network element can transmit the encapsulated target data packet to the data receiving party regardless of whether the target session information is received, so that the reception of the target session information in the transmission network element is decoupled from the encapsulation and transmission of the target data packet, thereby reducing the transmission delay of the data packet and improving the transmission efficiency. Moreover, before encapsulating the target data packet, the session creation network element will also compare the amount of data to be transmitted corresponding to the specified historical time period with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated, and the target session information and the encapsulated target data packet are transmitted to the transmission network element in an asynchronous transmission mode, thereby reducing the data packet transmission delay under the condition that the amount of data to be transmitted is relatively large, thereby avoiding network congestion.
[0086] In an exemplary embodiment, see Figure 3 , Figure 3 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0087] like Figure 3 As shown, the data transmission method may include: S210, S310-S330, and S230-S240, wherein S310-S330 are described in detail as follows:
[0088] S310: Create target session information corresponding to the target data packet according to the target data packet.
[0089] The specific process of creating the target session information can be found in the introduction of S220 above, which will not be described again here.
[0090] S320, obtaining multiple sessions created according to the received data packets to be transmitted within a specified historical time period, and filtering out sessions that meet set conditions from the multiple sessions.
[0091] Since the number of sessions created in the specified historical time period can also represent the amount of data to be transmitted received in the specified historical time period, multiple sessions created in the specified historical time period can be obtained. In the specified historical time period, when the transmission network element fails to find the session information corresponding to the data packet to be transmitted from the stored session information, it will also send the data packet to be transmitted to the session creation network element, and the session creation network element will create a session corresponding to the data packet to be transmitted. Therefore, the session created in the specified historical time period is created based on the received data packet to be transmitted.
[0092] In order to improve the accuracy of the amount of data to be transmitted, the session creation network element can filter out sessions that meet the set conditions from the multiple acquired sessions, where the set conditions can be flexibly set according to actual needs. For example, it can be set to filter out sessions that have not been closed within a specified historical time period, or to filter out sessions with a longer life cycle (for example, exceeding a set duration threshold).
[0093] S330: Use the number of screened sessions as the amount of data to be transmitted.
[0094] The number of filtered sessions is used as the amount of data to be transmitted. For example, if 3 sessions are filtered out, the amount of data to be transmitted is 3.
[0095] It should be noted that Figure 3 The specific implementation details of S210, S230-S240 shown can be referred to Figure 2 The S210, S230-S240 shown are not described in detail here.
[0096] exist Figure 3 In the illustrated embodiment, the number of sessions created within a specified historical time period and satisfying set conditions is used as the amount of data to be transmitted received within the specified historical time period. Whether a traffic burst occurs is determined based on the amount of data to be transmitted, thereby improving the accuracy of the determination.
[0097] In an exemplary embodiment, see Figure 4 , Figure 4 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0098] like Figure 4 As shown, the data transmission method may include: S210, S310, S410-S430, S330, and S230-S240, wherein S410-S430 are described in detail as follows:
[0099] S410, obtaining multiple sessions created according to received data packets to be transmitted within a specified historical time period.
[0100] The specific method for obtaining multiple sessions created within a specified historical time period can be found in the above-mentioned S320, which will not be repeated here.
[0101] S420, calculating the data packet receiving frequencies respectively corresponding to the plurality of sessions in the specified historical time period.
[0102] exist Figure 4 In the illustrated embodiment, the setting condition is: filter out sessions whose corresponding data packet reception frequencies within the specified historical time period are greater than the set threshold. Therefore, the session creation network element needs to first calculate the data packet reception frequencies corresponding to the multiple created sessions within the specified historical time period. The data packet reception frequency corresponding to the session is used to characterize the number of data packets received by the session within the specified historical time period, that is, to characterize the number of data packets matching the session within the specified historical time period. Therefore, the session creation network element can first calculate the number of data packets received by each session within the specified historical time period, and then calculate the data packet reception frequency corresponding to each session within the specified historical time period based on the number of data packets and the specified historical time period. The number of data packets received by each session within the specified historical time period can be used as the data packet reception frequency of each session, or the ratio between the number of data packets received by each session within the specified historical time period and the specified historical time period can be used as the data packet reception frequency of each session.
[0103] Optionally, in order to improve the calculation accuracy, the session creation network element may obtain the data packets to be transmitted received from the transmission network element within the specified historical time period (or, may also obtain the data packets to be transmitted received by the transmission network element within the specified historical time period), and search for the session corresponding to the obtained data packets to be transmitted from multiple sessions, thereby determining the number of data packets received by multiple sessions within the specified historical time period. For example, assuming that multiple data packets to be transmitted are obtained, for each data packet to be transmitted, if its corresponding session is found from multiple sessions, the number of data packets corresponding to the found session is increased by 1, until the sessions corresponding to the multiple data packets to be transmitted are found.
[0104] S430, filtering out from the multiple sessions the sessions corresponding to which the data packet receiving frequency is greater than the set frequency threshold.
[0105] The frequency threshold can be flexibly set according to actual needs. For example, the frequency threshold can be set to 0, that is, the filtered sessions are the sessions that received data packets within the specified historical time period, or the frequency threshold can be set to 1, 2, 3, etc.
[0106] It should be noted that Figure 4 The specific implementation details of S210, S230-S240 shown can be referred to Figure 2 The S210, S230-S240 shown, Figure 4 The specific implementation details of S310 and S330 shown can be referred to Figure 3 S310 and S330 shown are not described in detail here.
[0107] exist Figure 4 In the illustrated embodiment, the number of sessions created within a specified historical time period and having a data packet receiving frequency greater than a set frequency threshold is used as the amount of data to be transmitted received within the specified historical time period. Since sessions with a lower data packet receiving frequency are less likely to cause traffic bursts and network congestion, the number of sessions with a higher data packet receiving frequency is used as the amount of data to be transmitted. Based on the amount of data to be transmitted, it is possible to more accurately determine whether a traffic burst or network congestion occurs.
[0108] In an exemplary embodiment, see Figure 5 , Figure 5 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0109] like Figure 5 As shown, the data transmission method may include: S210, S510-S530, and S230-S240, wherein S510-S530 are described in detail as follows:
[0110] S510: Create target session information corresponding to the target data packet according to the target data packet.
[0111] The specific process of creating the target session information can be found in the introduction of S220 above, which will not be described again here.
[0112] S520: Acquire data packets received from a transmission network element within a specified historical time period.
[0113] The session creation network element may first search for a data packet received from the transmission network element, and determine whether the reception time of the data packet is within a specified historical time period. If so, the data packet is obtained.
[0114] S530: Use the number of acquired data packets as the amount of data to be transmitted.
[0115] The session creation network element uses the number of data packets received from the transmission network element within the specified historical time period as the amount of data to be transmitted. Since the data packets received from the transmission network element are data packets for which no corresponding sessions have been created, the number of data packets received from the transmission network element within the specified historical time period can represent the number of sessions that need to be created within the specified historical time period. Therefore, using this number as the amount of data to be transmitted allows the probability of congestion occurring in the session creation network element to be determined through the amount of data to be transmitted. When the amount of data to be transmitted is greater than the set data volume threshold, it is determined that the probability of congestion occurring in the session creation network element is high. Therefore, the session creation network element transmits the target session information and the encapsulated target data packet to the transmission network element via asynchronous sending, so as to reduce the transmission delay of the target data packet, thereby reducing the probability of congestion occurring in the session creation network element.
[0116] It should be noted that Figure 5 The specific implementation details of S210, S230-S240 shown can be referred to Figure 2 The S210, S230-S240 shown are not described in detail here.
[0117] exist Figure 5 In the illustrated embodiment, the number of data packets received by the session creation network element from the transmission network element within a specified historical time period is used as the amount of data to be transmitted. Since the number of data packets received by the session creation network element from the transmission network element can represent the number of newly created sessions within the specified historical time period, and the more newly created sessions there are, the higher the probability of traffic bursts and network congestion. Therefore, based on the amount of data to be transmitted, it is possible to more accurately determine whether a traffic burst or network congestion occurs.
[0118] In an exemplary embodiment, see Figure 6 , Figure 6 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0119] like Figure 6 As shown, the data transmission method may include: S210-S240, and S610-S620, wherein S610-S620 are described in detail as follows:
[0120] S610: If the amount of data to be transmitted is less than or equal to the set data amount threshold, encapsulate the target data packet according to the target session information to obtain an encapsulated data packet.
[0121] If the amount of data to be transmitted is less than or equal to the set data amount threshold, the session creation network element may also encapsulate the target data packet according to the target session information to obtain an encapsulated target data packet.
[0122] S620: Transmit the target session information and the encapsulated data packet to the transmission network element in a synchronous transmission manner, wherein the transmission time of the encapsulated data packet is later than the transmission time of the target session information.
[0123] If the amount of data to be transmitted is less than or equal to the set data volume threshold, it indicates that there is no traffic burst at present and the probability of network congestion is low. Therefore, in order to ensure that the transmission network element can encapsulate other data packets according to the target session information after subsequently receiving other data packets belonging to the same session as the target data packet, thereby reducing the data packet transmission delay, the session creation network element can transmit the target session information and the encapsulated target data packet to the transmission network element in a synchronous sending manner, wherein the sending time of the encapsulated target data packet is later than the sending time of the target session information.
[0124] It should be understood that the synchronous sending mode means that the next data is sent after the sending of one data is completed. Therefore, under the condition that the amount of data to be transmitted is less than or equal to the set data amount threshold, the session creation network element successfully sends the target session information to the transmission network element, and then sends the encapsulated target session information to the transmission network element. Correspondingly, the transmission network element will receive the encapsulated target session information only after receiving the target session information, and transmit the encapsulated target session information to the data receiver, so that when the response data packet sent by the data receiver for the target data packet is received, the transmission network element has stored the target session information, and can encapsulate the response data packet according to the target session information and transmit it to the data sender, thereby improving the transmission success rate of the data packet and reducing the packet loss rate and transmission delay.
[0125] In an optional embodiment, if the amount of data to be transmitted is less than or equal to the set data amount threshold, the session creation network element may also transmit the target session information and the target data packet to the transmission network element by synchronous transmission, wherein the transmission time of the target data packet is later than the transmission time of the target session information. Thus, the transmission network element first receives the target session information, stores the target session information, and then receives the target data packet, so as to encapsulate and forward the target data packet according to the stored target session information.
[0126] It should be noted that Figure 6 The specific implementation details of S210-S240 shown can be referred to Figure 2 S210-S240 shown are not described in detail here.
[0127] exist Figure 6In the illustrated embodiment, if the amount of data to be transmitted is less than or equal to the set data amount threshold, the session creation network element encapsulates the target data packet according to the target session information to obtain an encapsulated data packet; the target session information and the encapsulated data packet are transmitted to the transmission network element in a synchronous manner, wherein the sending time of the encapsulated data packet is later than the sending time of the target session information, that is, when the transmission network element sends the encapsulated target data packet to the data recipient, the target session information has been stored, so that after the transmission network element receives the response data packet of the target data packet and the data packet sent by the data sender later than the target data packet, it can encapsulate and forward it according to the target session information, thereby reducing the data packet transmission delay, improving the data packet transmission success rate, and reducing the packet loss rate.
[0128] In an exemplary embodiment, see Figure 7 , Figure 7 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0129] like Figure 7 As shown, the data transmission method may include: S210-S240, S610, and S710-S730, wherein S710-S730 are described in detail as follows:
[0130] S710: Send target session information to a transmission network element, so that the transmission network element stores the target session information.
[0131] If the amount of data to be transmitted is less than or equal to the set data amount threshold, the session creation network element may first send the target session information to the transmission network element so that the transmission network element stores the target session information.
[0132] S720: Receive a confirmation message sent by the transmission network element indicating that the target session information has been received.
[0133] After receiving the target session information, the transmission network element may send a confirmation message to the session creation network element. The session creation network element may determine that the transmission network element has received the target session information according to the confirmation message.
[0134] S730: Send the encapsulated data packet to the transmission network element according to the confirmation message, so that the transmission network element transmits the encapsulated data packet to the data receiver.
[0135] After the session creation network element determines that the transmission network element has received the target session information based on the confirmation message from the transmission network element, it can send the encapsulated target data packet to the transmission network element, thereby ensuring that after the transmission network element subsequently receives other data packets belonging to the same session as the target data packet, it can encapsulate other data packets according to the target session information, thereby reducing the data packet transmission delay and improving the data packet transmission success rate.
[0136] It should be noted that Figure 7 The specific implementation details of S210-S240 shown can be referred to Figure 2 S210-S240 shown, Figure 7 The specific implementation details of S610 shown can be referred to Figure 6 The S610 shown is not described in detail here.
[0137] exist Figure 7 In the illustrated embodiment, if the amount of data to be transmitted is less than or equal to the set data amount threshold, it indicates that the probability of network congestion is low. Therefore, the session creation network element first sends the target session information to the transmission network element, and after receiving the confirmation message sent by the transmission network element indicating the receipt of the target session information, the encapsulated data packet is sent to the transmission network element, so that the transmission network element transmits the encapsulated data packet to the data recipient, thereby ensuring that after the transmission network element subsequently receives other data packets belonging to the same session as the target data packet, it can encapsulate the other data packets according to the target session information, thereby reducing the data packet transmission delay and improving the data packet transmission success rate.
[0138] In an exemplary embodiment, see Figure 8 , Figure 8 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The session creation network element 130 in the illustrated implementation environment is executed.
[0139] like Figure 8 As shown, the data transmission method may include: S210-S240, and S810, wherein S810 is described in detail as follows:
[0140] S810, if the amount of data to be transmitted is less than or equal to the set data amount threshold, the target session information is sent to the transmission network element, so that the transmission network element stores the target session information, and encapsulates the target data packet according to the stored target session information and transmits it to the data receiver.
[0141] Under the condition that the amount of data to be transmitted is less than or equal to the set data amount threshold, in order to ensure that the transmission network element can encapsulate other data packets according to the target session information after receiving other data packets belonging to the same session as the target data packet, thereby reducing the data packet transmission delay, and reducing the data transmission volume between the session creation network element and the transmission network element, the session creation network element can only send the target session information to the transmission network element. After receiving the target session information, the transmission network element stores the target session information, encapsulates the target data packet according to the stored target session information, and transmits the encapsulated target data packet to the data recipient.
[0142] Optionally, since the transmission network element will also receive the target session information when the amount of data to be transmitted is greater than the set data volume threshold, and there is no need to encapsulate the target data packet according to the target session information, in order to enable the transmission network element to distinguish different processing methods after receiving the target session information, under the condition that the amount of data to be transmitted is less than or equal to the set data volume threshold, the session creation network element may add an identifier for instructing the transmission network element to encapsulate in the target session information, so that after receiving the target session information, the transmission network element encapsulates and forwards the target data packet according to the identifier; alternatively, the session creation network element may package the target session information and the instruction for instructing the transmission network element to encapsulate into the same message, and send it to the transmission network element, so that after parsing the message, the transmission network element encapsulates and forwards the target data packet according to the instruction and the target session information.
[0143] It should be noted that Figure 8 The specific implementation details of S210-S240 shown can be referred to Figure 2 S210-S240 shown are not described in detail here.
[0144] exist Figure 8 In the illustrated embodiment, if the amount of data to be transmitted is less than or equal to the set data amount threshold, it indicates that the probability of network congestion is low. Therefore, the session creation network element can only send the target session information to the transmission network element, so that the transmission network element stores the target session information, and encapsulates the target data packet according to the stored target session information and transmits it to the data recipient, thereby reducing the amount of data transmitted between the session creation network element and the transmission network element, and ensuring that after the transmission network element subsequently receives other data packets belonging to the same session as the target data packet, it can encapsulate other data packets according to the target session information, thereby reducing the data packet transmission delay, improving the data transmission success rate, and reducing the packet loss rate.
[0145] See also Fig. 9 , Fig. 9 is a flowchart of a data transmission method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1The implementation environment shown, which can be Figure 1 The transport network element 120 in the illustrated implementation environment executes.
[0146] like Fig. 9 As shown, in an exemplary embodiment, the data transmission method may include: S910-S940, which are described in detail as follows:
[0147] S910, receiving a target data packet from a data sender, and searching for session information corresponding to the target data packet from stored session information.
[0148] The transmission network element is used to store session information and encapsulate and forward data packets according to the stored session information. It can be any network element with data packet encapsulation and forwarding functions, for example, including but not limited to at least one of a switch, a router, and a gateway. In order to implement functions such as setting the content of session information, the transmission network element can also have programmable capabilities. For the specific introduction of session information, please refer to the records of the aforementioned embodiment, which will not be repeated here.
[0149] The data sender and the data receiver refer to the two parties that need to communicate. For the target data packet, the data sender refers to the party that sends the target data packet outward, and the data receiver refers to the party that receives the target data packet. The data sender and the data receiver can be any device with communication capabilities, such as a terminal device, a server, etc. In one example, the data sender can be one of the client and the server, and the data receiver is the other of the client and the server.
[0150] When the target data packet is transmitted from the data sender to the data receiver, it needs to be forwarded and encapsulated by the transmission network element. Therefore, after receiving the target data packet from the data sender, the transmission network element needs to first search for the session information corresponding to the target data packet from the stored session information.
[0151] S920: If the session information corresponding to the target data packet is not found, the target data packet is sent to a session creation network element, so that the session creation network element creates target session information corresponding to the target data packet according to the target data packet.
[0152] The session creation network element is used to create a session and send the session information corresponding to the created session to the transmission network element. Therefore, if the session information corresponding to the target data packet is not found from the session information stored in the transmission network element, it means that the transmission network element cannot encapsulate the target data packet. Therefore, the transmission network element needs to send the target data packet to the session creation network element. After receiving the target data packet, the session creation network element creates the target session information corresponding to the target data packet. For the specific creation process, please refer to the records of the aforementioned embodiment, which will not be repeated here.
[0153] S930, receiving target session information transmitted by the session creation network element in an asynchronous manner and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold.
[0154] The session creation network element can obtain the amount of data to be transmitted received in the specified historical time period, and compare the amount of data to be transmitted with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated according to the created target session information, and the target session information and the encapsulated target data packet are transmitted to the transmission network element through asynchronous transmission. For the specific process, please refer to the records of the aforementioned embodiment, which will not be repeated here.
[0155] Therefore, under the condition that the amount of data to be transmitted is greater than the set data amount threshold, the transmission network element receives the target session information transmitted by the session creation network element in an asynchronous transmission manner and the target data packet encapsulated according to the target session information. Correspondingly, the transmission network element may receive the target session information first and then the encapsulated target data packet, or may receive the encapsulated target data packet first and then the target session information, or may receive the encapsulated target data packet and the target session information at the same time.
[0156] S940, store the target session information, and transmit the encapsulated target data packet to the data receiver.
[0157] Since the session creation network element sends the target session information and the encapsulated target data packet in an asynchronous manner, the transmission network element may receive the target session information first and then the encapsulated target data packet, or may receive the encapsulated target data packet first and then the target session information, or may receive the encapsulated target data packet and the target session information at the same time.
[0158] Correspondingly, after receiving the target session information, the transmission network element stores the target session information; after receiving the encapsulated target data packet, the transmission network element transmits the encapsulated target data packet to the data receiver. In other words, after receiving the encapsulated target data packet, the transmission network element can transmit the encapsulated target data packet to the data receiver regardless of whether the target session information is received at this time, thereby decoupling the reception of the target session information from the encapsulation and transmission of the target data packet.
[0159] Among them, the specific way in which the transmission network element transmits the encapsulated target data packet to the data recipient can be flexibly set according to actual needs. Optionally, the transmission network element can forward the encapsulated target data packet to the next network element, and then send the target data packet to the data recipient through the next network element.
[0160] exist Fig. 9 In the illustrated embodiment, for a target data packet for which the corresponding session information does not exist in the session information stored in the transmission network element (i.e., a data packet for which a session has not been established between the corresponding communication parties), the session creation network element encapsulates the target data packet, and transmits the target session information and the encapsulated target data packet to the transmission network element in an asynchronous transmission mode, so that the transmission network element stores the received target session information. Moreover, after receiving the encapsulated target data packet, the transmission network element can transmit the encapsulated target data packet to the data receiving party regardless of whether the target session information is received, so that the reception of the target session information in the transmission network element is decoupled from the encapsulation and transmission of the target data packet, thereby reducing the transmission delay of the data packet and improving the transmission efficiency. Moreover, before encapsulating the target data packet, the session creation network element will also compare the amount of data to be transmitted corresponding to the specified historical time period with the set data amount threshold. If the amount of data to be transmitted is greater than the set data amount threshold, the target data packet is encapsulated, and the target session information and the encapsulated target data packet are transmitted to the transmission network element in an asynchronous transmission mode, thereby reducing the data packet transmission delay under the condition that the amount of data to be transmitted is relatively large, thereby avoiding network congestion.
[0161] In an exemplary embodiment, see Fig.10 , Fig.10 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The transport network element 120 in the illustrated implementation environment executes.
[0162] like Fig.10 As shown, the data transmission method may include: S910-S940, and S1010-S1020, wherein S1010-S1020 are described in detail as follows:
[0163] S1010: If the session information corresponding to the target data packet is found, the target data packet is encapsulated according to the found session information.
[0164] If the session information corresponding to the target data packet is found from the session information stored in the transmission network element, the transmission network element may encapsulate the target data packet according to the session information corresponding to the target data packet.
[0165] S1020, transmitting the target data packet encapsulated according to the found session information to a data receiver.
[0166] After encapsulating the target data packet according to the found session information, the transmission network element may transmit the encapsulated target data packet to the data receiver.
[0167] It should be noted that Fig.10 The specific implementation details of S910-S940 shown can be referred to Fig. 9 S910-S940 shown are not described in detail here.
[0168] exist Fig.10 In the illustrated embodiment, if the session information corresponding to the target data packet is found, it indicates that a session between the data sender and the data receiver has been created. Therefore, the transmission network element can directly encapsulate and forward the target data packet according to the session information, thereby improving the transmission efficiency of the target data packet.
[0169] In an exemplary embodiment, see Fig.11 , Fig.11 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The transport network element 120 in the illustrated implementation environment executes.
[0170] like Fig.11 As shown, under the condition that the transmission network element is a switch, the session creation network element is a server, and each session information contains five-tuple information corresponding to the session and the encapsulation method of the data packet, the data transmission method may include: S1110-S1120, and S920-S940, wherein S1111-S1120 are described in detail as follows:
[0171] S1110, receiving a target data packet from a data sender, and parsing the target data packet to obtain quintuple information of the target data packet.
[0172] The transmission network element can be a switch, and the session creation network element can be a server. That is to say, the switch implements data packet encapsulation and forwarding, and the server implements session creation. In this way, the high-performance forwarding advantage of the switch can be used to improve data forwarding performance, and the high flexibility and strong processing power of the server can be used to improve session creation efficiency and flexibility of session information processing.
[0173] Each session information may include the five-tuple information corresponding to the session and the encapsulation method of the data packet. Therefore, after receiving the target data packet from the data sender, the transmission network element can parse the five-tuple information of the target data packet to find the session information corresponding to the target data packet based on the five-tuple information.
[0174] S1120, searching the stored session information for session information including quintuple information that matches the quintuple information of the target data packet.
[0175] After obtaining the five-tuple information of the target data packet, the transmission network element can compare the five-tuple information of the target data packet with the five-tuple information contained in the stored session information to find out the session information whose five-tuple information matches the five-tuple information of the target data packet, thereby finding out the session information corresponding to the target data packet. It should be noted that, since the session is created for both communicating parties, the five-tuple information contained in the session information matches the five-tuple information of the target data packet, which may mean that the five-tuple information contained in the session information is the same as the five-tuple information of the target data packet, or the source IP address contained in the session information is the same as the destination IP address of the target data packet, the destination source IP address contained in the session information is the same as the source IP address of the target data packet, the source port contained in the session information is the same as the destination port of the target data packet, the destination port contained in the session information is the same as the source port of the target data packet, and the transport layer protocol contained in the session information is the same as the transport layer protocol of the target data packet.
[0176] It should be noted that Fig.11 The specific implementation details of S920-S940 shown can be referred to Fig. 9 S920-S940 shown are not described in detail here.
[0177] exist Fig.11 In the illustrated embodiment, the transmission network element is a switch and the session creation network element is a server, which can not only improve the data packet forwarding performance, but also improve the session creation efficiency and the flexibility of session information processing; and, based on the quintuple information of the target data packet to find its corresponding session information, the efficiency and accuracy of session information search can be improved.
[0178] In an exemplary embodiment, see Fig.12 , Fig.12 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 The transport network element 120 in the illustrated implementation environment executes.
[0179] like Fig.12 As shown, the data transmission method may include: S910-S940, and S1210-S1230, wherein S1210-S1230 are described in detail as follows:
[0180] S1210, receiving a response data packet sent by the data receiver based on the encapsulated data packet, and obtaining target session information from the stored session information.
[0181] After the transmission network element transmits the encapsulated target data packet to the data receiver, the data receiver can send a response data packet to the data sender based on the encapsulated data packet. The response data packet will be transmitted to the transmission network element, encapsulated by the transmission network element and forwarded to the data sender.
[0182] After receiving the response data packet, the transmission network element needs to obtain the session information corresponding to the response data packet. Since the response data packet corresponds to the target data packet, the response data packet and the target data packet belong to the same session. Obtaining the session information corresponding to the response data packet is equivalent to obtaining the session information corresponding to the target data packet (i.e., the target session information).
[0183] S1220: If the target session information is obtained, encapsulate the response data packet according to the target session information, and transmit the encapsulated response data packet to the data sender.
[0184] If the target session information is obtained, the transmission network element may encapsulate the response data packet according to the target session information, and transmit the encapsulated response data packet to the data sender.
[0185] S1230: If the target session information is not obtained, the response data packet is discarded.
[0186] Since, under the condition that the amount of data to be transmitted is greater than the set data amount threshold, the session creation network element transmits the target session information and the encapsulated data packet to the transmission network element through asynchronous transmission, therefore, when the transmission network element receives the response data packet, the transmission network element may not have received the target session information sent by the session creation network element, therefore, the transmission network element cannot obtain the target session information and cannot encapsulate the response data packet, therefore, the response data packet can be discarded. Since the target data packet will be discarded if the session information corresponding to the response data packet is not found in the session information stored in the transmission network element, therefore, under the condition that the amount to be transmitted is relatively small, the session creation network element transmits the target session information and the encapsulated target data packet to the transmission network element through synchronous transmission, and first sends the target session information and then sends the encapsulated target data packet; or, after the session creation network element sends the target session information to the transmission network element, the transmission network element encapsulates the target data packet according to the target session information, thereby ensuring that after receiving the response data packet corresponding to the target data packet, the target session information has been stored in the transmission network element, thereby reducing the packet loss rate of the response data packet.
[0187] In an optional embodiment, in S920, if the session information corresponding to the target data packet is not found, the transmission network element may first obtain the transmission direction of the target data packet, and if the transmission direction is the specified transmission direction, the target data packet is sent to the session creation network element to create the target session information corresponding to the target data packet; if the transmission direction is not the specified transmission direction, the target data packet may be discarded. Correspondingly, in step S1230, if the target session information is not obtained (that is, the session information corresponding to the response data packet is not obtained), the transmission direction of the response data packet may be first obtained, and if the transmission direction is the specified transmission direction, the response data packet is sent to the session creation network element to create the session information corresponding to the response data packet; if the transmission direction is not the specified transmission direction, the response data packet may be discarded. That is, for each data packet, if the session information corresponding to the data packet is not found in the session information stored in the transmission network element, it can be determined whether the transmission direction of the data packet is the specified transmission direction, and if the transmission direction of the data packet is the specified transmission direction, the data packet is sent to the session creation network element to create the session information corresponding to the data packet, and if the transmission direction of the data packet is not the specified transmission direction, the data packet is discarded. The designated transmission direction may be flexibly set according to the actual business scenario. For example, under the condition that the data transmission method is applied to data transmission between a client and a server, the designated transmission direction may be from the client to the server.
[0188] It should be noted that Fig.12 The specific implementation details of S910-S940 shown can be referred to Fig. 9 S910-S940 shown are not described in detail here.
[0189] exist Fig.12 In the illustrated embodiment, after receiving a response data packet corresponding to a target data packet, the transmission network element obtains the target session information from the stored session information. If the target session information is obtained, the response data packet is encapsulated according to the target session information, and the encapsulated response data packet is transmitted to the data sender, thereby improving the data packet transmission efficiency. If the target session information is not obtained, the response data packet is discarded, thereby improving the data packet processing efficiency and avoiding network congestion.
[0190] In an exemplary embodiment, see Fig.13 , Fig.13 is a flowchart of a data transmission method shown in another exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 In the implementation environment shown, the data sender 110, the transmission network element 120, the session creation network element 130 and the data receiver jointly execute, wherein: Fig.13The transmission network element 120 is a switch and the session creation network element 130 is a server. Fig.13 As shown, the data transmission method includes S1301-S1314, which are described in detail as follows:
[0191] S1301, the switch receives a target data packet from a data sender.
[0192] The transmission of data packets needs to pass through the switch. Therefore, the data sender can send the target data packet to the switch.
[0193] S1302: The switch searches for a session table entry corresponding to the target data packet from a stored session table.
[0194] The switch stores a session table, which contains session table entries corresponding to different sessions. The session table entry of each session contains a table entry name table_name, a key structure, and an action function. The key structure contains five-tuple information corresponding to the session, and the action function is used to indicate the encapsulation method of the data packet.
[0195] After receiving the target data packet, the switch can search the session table for a session entry whose five-tuple information matches the five-tuple information of the target data packet. The found session entry is the session entry corresponding to the target data packet.
[0196] S1303: If the session table entry corresponding to the target data packet is found, the switch encapsulates the target data packet according to the found session table entry, and forwards the encapsulated target data packet to the data receiver.
[0197] The specific packaging method can be found in the description of the aforementioned embodiment and will not be described in detail here.
[0198] The switch can forward the encapsulated target data packet to the next network element, and then transmit the target data packet to the data receiver through the next network element.
[0199] S1304: If the session table entry corresponding to the target data packet is not found, the switch sends the target data packet to the server.
[0200] If the session table entry corresponding to the target data packet is not found, the switch sends the target data packet to the server, so that the server creates a session table entry corresponding to the target data packet.
[0201] S1305: The server creates a target session table entry corresponding to the target data packet, and encapsulates the target data packet according to the target session table entry.
[0202] The server creates a session corresponding to the target data packet, thereby obtaining a target session table entry corresponding to the target data packet, and encapsulates the target data packet according to the target session table entry.
[0203] S1306: The server obtains data packet receiving frequencies corresponding to multiple sessions created in a specified historical time period, and selects a session whose data packet receiving frequency is greater than a set frequency threshold from the multiple sessions.
[0204] The specified historical time period includes a start time and an end time, and the end time is the current time.
[0205] In the process of obtaining the data packet receiving frequency, the server can obtain N data packets received from the switch and obtain the attribute information corresponding to the N data packets, wherein N is an integer greater than or equal to 1, and the attribute information session_statis of each data packet includes the five-tuple information five_tuple of the data packet and the receiving time time_point of the data packet; then, the server obtains multiple sessions created in the specified historical time period, and creates a data packet receiving frequency array session_freq corresponding to the multiple sessions, wherein the data packet receiving frequency array session_freq[L] contains elements corresponding to each session, each element contains the five-tuple information of the corresponding session and the data packet receiving frequency, and the initial value of the data packet receiving frequency is 0; then, the initial value of i is set to 1, and the data packet receiving frequency is calculated through the following steps ac:
[0206] Step a, obtain session_statis[i], and compare time_point in session_statis[i] with first_time, where session_statis[i] is the attribute information of the i-th data packet, and first_time is the start time of the specified historical time period.
[0207] Step b: If the time_point in session_statis[i] is later than first_time, find the element corresponding to five_tuple in session_statis[i] in the session_freq array, add 1 to the packet receiving frequency corresponding to the element, and jump to step d;.
[0208] Step c: If time_point in session_statis[i] is earlier than first_time, jump to step d;
[0209] Step d, determine whether i is equal to N, if so, end; if not, set i=i+1 and jump to step a.
[0210] After obtaining the data packet receiving frequencies corresponding to the multiple sessions created in the specified historical time period, the server may filter out the sessions whose data packet receiving frequencies are greater than a set frequency threshold from the multiple sessions. Optionally, the set frequency threshold may be 1.
[0211] S1307: The server uses the number of screened sessions as the amount of data to be transmitted, and compares the amount of data to be transmitted with a set data amount threshold.
[0212] The server compares the number M of screened sessions with a set data volume threshold B_th.
[0213] S1308: If the amount of data to be transmitted is greater than the set data amount threshold, the server sends the target session table entry and the encapsulated target data packet to the switch at the same time.
[0214] If M is greater than B_th, it indicates that the number of newly created sessions is large recently, which is a sudden increase in traffic and a sudden burst of new sessions. Therefore, the target session table entry and the encapsulated target data packet are sent to the switch at the same time to improve the transmission efficiency of the target data packet.
[0215] S1309: The switch stores the received target session entry in the session table.
[0216] After receiving the target session table entry, the switch stores it in the session table.
[0217] S1310, the switch forwards the received encapsulated target data packet to a data receiver.
[0218] After receiving the encapsulated target data packet, the switch forwards it to the data receiver.
[0219] S1311: If the amount of data to be transmitted is less than or equal to the set data amount threshold, the server sends the target session table entry to the switch.
[0220] If M is greater than B_th, it indicates that the number of newly created sessions is small, and there is no sudden increase in traffic or sudden creation of new sessions. Therefore, the target session entry is first sent to the switch.
[0221] S1312: The switch sends a confirmation message to the server.
[0222] After receiving the target session table entry, the switch stores the session table entry and sends a confirmation message sent by the server indicating that the target session table entry has been received.
[0223] S1313, the server sends the encapsulated target data packet to the switch according to the confirmation message.
[0224] After receiving the confirmation message, the server sends the encapsulated target data packet to the switch.
[0225] S1314, the switch sends the encapsulated target data packet to the data receiver.
[0226] After receiving the encapsulated target data packet, the switch forwards it.
[0227] In one example, see Fig.14 As shown, the switch includes a search unit and a forwarding unit, wherein a session table is stored in the switch; the server includes a transmission volume statistics unit, a policy selection unit, a stop-wait unit, and an asynchronous sending unit, wherein a session table is also stored in the server. After receiving a target data packet from a data sender, the switch searches for a session table entry corresponding to the target data packet from the session table stored in the switch. If the session table entry corresponding to the target data packet is found, the target data packet is sent to the forwarding unit. The forwarding unit encapsulates the target data packet according to the found session table entry and forwards it to the data receiver. If the session table entry corresponding to the target data packet is not found, the target data packet is sent to the server. The server creates a target session table entry corresponding to the target data packet, stores the target session table entry in the session table, and encapsulates the target data packet according to the target session table entry. The transmission volume statistics unit obtains the amount of data to be transmitted corresponding to a specified historical time period, and sends the amount of data to be transmitted to the policy selection unit. The policy selection unit compares the amount of data to be transmitted with a set data volume threshold. If the amount of data to be transmitted is less than the set data volume threshold, the policy selection unit compares the amount of data to be transmitted with a set data volume threshold. If the data volume is greater than the set data volume threshold, the policy selection unit transmits the target session table item and the encapsulated target data packet to the asynchronous sending unit, and the asynchronous sending unit sends the target session table item to the switch, so that the switch stores the target session table item in the session table. At the same time, the asynchronous sending unit sends the encapsulated target data packet to the forwarding unit, so that the forwarding unit forwards the encapsulated target data packet. If the data volume to be transmitted is greater than the set data volume threshold, the policy selection unit transmits the target session table item and the encapsulated target data packet to the stop-wait unit, and the stop-wait unit sends the target session table item to the switch, so that the switch stores the target session table item in the session table. Then, after receiving the confirmation message, the stop-wait unit sends the encapsulated target data packet to the forwarding unit, so that the forwarding unit forwards the encapsulated target data packet.
[0228] in, Fig.13 The specific process of S1301-S1314 shown has been described in detail in the above embodiments and will not be repeated here.
[0229] It should be noted that Fig.13The data transmission method shown can improve the data transmission delay in the scenario of high-concurrency new sessions, improve data transmission efficiency, enable massive users to quickly access corresponding network services (for example, quick user login in cloud gaming scenarios, etc.), and achieve high-performance forwarding; and, can identify the scenario, and adjust the transmission method between the server and the switch according to the scenario, to achieve refined control.
[0230] exist Fig.13 In the illustrated embodiment, when the amount of data to be transmitted is large, that is, the traffic surges and the session creation is sudden, the server sends the target session table entry and the encapsulated target data packet to the switch at the same time, so that the switch forwards the encapsulated target data packet after receiving it, thereby improving the data packet transmission efficiency and avoiding network congestion; when the amount of data to be transmitted is small, that is, there is no traffic surge and the session creation is sudden, the server first sends the target session table entry to the switch, and after confirming that the target session table entry is successfully sent to the switch, the encapsulated target data packet is sent to the switch, so that the switch forwards the encapsulated target data packet after receiving it, thereby ensuring that when a response data packet corresponding to the target data packet is received, the switch has stored the target session table entry, so as to encapsulate and forward the response data packet according to the target session table entry, thereby improving the data packet transmission efficiency and reducing the packet loss rate.
[0231] See also Fig.15 , Fig.15 FIG. 1 is a block diagram of a data transmission device shown in an exemplary embodiment of the present application, which is deployed in a session creation network element. Fig.15 As shown, the device comprises:
[0232] The receiving module 1501 is configured to receive a target data packet sent by a transmission network element, where the target data packet is sent when the transmission network element does not find the session information corresponding to the target data packet in the stored session information;
[0233] The processing module 1502 is configured to create target session information corresponding to the target data packet according to the target data packet, and obtain the amount of data to be transmitted received in a specified historical time period;
[0234] The encapsulation module 1503 is configured to encapsulate the target data packet according to the target session information to obtain an encapsulated data packet if the amount of data to be transmitted is greater than a set data amount threshold;
[0235] The sending module 1504 is configured to transmit the target session information and the encapsulated data packet to the transmission network element in an asynchronous transmission manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to the data receiver.
[0236] In an optional embodiment, based on the aforementioned scheme, the processing module 1502 is specifically configured to: obtain multiple sessions created according to the received data packets to be transmitted within a specified historical time period, and filter out sessions that meet the set conditions from the multiple sessions; and use the number of filtered sessions as the amount of data to be transmitted.
[0237] In an optional embodiment, based on the aforementioned scheme, the processing module 1502 is specifically configured to: calculate the data packet reception frequencies corresponding to multiple sessions in a specified historical time period; and filter out from the multiple sessions the sessions whose corresponding data packet reception frequencies are greater than a set frequency threshold.
[0238] In an optional embodiment, based on the above-mentioned solution, the processing module 1502 is specifically configured to: obtain data packets received from the transmission network element within a specified historical time period; and use the number of obtained data packets as the amount of data to be transmitted.
[0239] In an optional embodiment, based on the aforementioned scheme, the encapsulation module 1503 is further configured to: if the amount of data to be transmitted is less than or equal to the set data amount threshold, encapsulate the target data packet according to the target session information to obtain an encapsulated data packet; the sending module 1504 is further configured to: transmit the target session information and the encapsulated data packet to the transmission network element in a synchronous sending manner, wherein the sending time of the encapsulated data packet is later than the sending time of the target session information.
[0240] In an optional embodiment, based on the aforementioned scheme, the sending module 1504 is further specifically configured to: send the target session information to the transmission network element so that the transmission network element stores the target session information; receive a confirmation message sent by the transmission network element indicating that the target session information has been received; and send the encapsulated data packet to the transmission network element according to the confirmation message so that the transmission network element transmits the encapsulated data packet to the data recipient.
[0241] In an optional embodiment, based on the aforementioned scheme, the sending module 1504 is also configured to: if the amount of data to be transmitted is less than or equal to the set data amount threshold, the target session information is sent to the transmission network element, so that the transmission network element stores the target session information, and encapsulates the target data packet according to the stored target session information and transmits it to the data recipient.
[0242] It should be noted that the data transmission device deployed in the session creation network element provided in the above embodiment and the execution steps of the session creation network element in the data transmission method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0243] See also Fig.16 , Fig.16FIG. 1 is a block diagram of a data transmission device shown in an exemplary embodiment of the present application, which is deployed in a transmission network element. Fig.16 As shown, the device comprises:
[0244] The search module 1601 is configured to receive a target data packet from a data sender, and search for session information corresponding to the target data packet from the stored session information;
[0245] The sending module 1602 is configured to send the target data packet to the session creation network element if the session information corresponding to the target data packet is not found, so that the session creation network element creates the target session information corresponding to the target data packet according to the target data packet;
[0246] The receiving module 1603 is configured to receive target session information transmitted by the session creation network element in an asynchronous transmission mode and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold;
[0247] The transmission module 1604 is configured to store the target session information and transmit the encapsulated target data packet to the data receiver.
[0248] In an optional embodiment, based on the aforementioned scheme, the device also includes a control module configured to: if the session information corresponding to the target data packet is found, encapsulate the target data packet according to the found session information; and transmit the target data packet encapsulated according to the found session information to the data recipient.
[0249] In an optional embodiment, based on the aforementioned scheme, when the transmission network element is a switch, the session creation network element is a server, and each session information contains the five-tuple information corresponding to the session and the encapsulation method of the data packet, the search module 1601 is specifically configured as follows: parsing the target data packet to obtain the five-tuple information of the target data packet; searching for session information whose contained five-tuple information matches the five-tuple information of the target data packet from the stored session information.
[0250] In an optional embodiment, based on the aforementioned scheme, the device also includes a processing module, configured to: receive a response data packet sent by the data recipient based on the encapsulated data packet, and obtain target session information from the stored session information; if the target session information is obtained, encapsulate the response data packet according to the target session information, and transmit the encapsulated response data packet to the data sender; if the target session information is not obtained, discard the response data packet.
[0251] It should be noted that the data transmission device deployed in the transmission network element provided in the above embodiment and the execution steps of the transmission network element in the data transmission method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0252] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, when the one or more computer programs are executed by one or more processors, the electronic device implements the data transmission method provided in the above-mentioned embodiments.
[0253] Fig.17 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0254] It should be noted that Fig.17 The computer system 1700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0255] like Fig.17 As shown, the computer system 1700 includes a central processing unit (CPU) 1701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1702 or a computer program loaded from a storage part 1708 to a random access memory (RAM) 1703, such as executing the data transmission method in the above embodiment. Various computer programs and data required for system operation are also stored in RAM 1703. CPU 1701, ROM 1702 and RAM 1703 are connected to each other through a bus 1704. An input / output (I / O) interface 1705 is also connected to the bus 1704.
[0256] In some embodiments, the following components are connected to the I / O interface 1705: an input section 1706 including a keyboard, a mouse, etc.; an output section 1707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1708 including a hard disk, etc.; and a communication section 1709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1709 performs communication processing via a network such as the Internet. A drive 1710 is also connected to the I / O interface 1705 as needed. A removable medium 1711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1710 as needed, so that a computer program read therefrom is installed into the storage section 1708 as needed.
[0257] In particular, according to an embodiment of the present application, a computer program implementing the data transmission method may be carried on a computer-readable medium, and the computer program may be downloaded and installed from a network through the communication part 1709 , and / or installed from a removable medium 1711 .
[0258] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a computer program, which may be used by an instruction execution system, device or device or used in combination with it. The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried, and the propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer program contained in the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.
[0259] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0260] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0261] Another aspect of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of an electronic device, the electronic device implements the above data transmission method. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0262] Another aspect of the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the data transmission method provided in each of the above embodiments is implemented. The computer program may be stored in a computer-readable storage medium.
[0263] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A data transmission method, characterized in that: The method comprises: receiving a target data packet sent by a transmission network element, wherein the target data packet is sent when the transmission network element fails to find session information corresponding to the target data packet in stored session information; Creating target session information corresponding to the target data packet according to the target data packet, and obtaining the amount of data to be transmitted received within a specified historical time period; If the amount of data to be transmitted is greater than a set data amount threshold, encapsulating the target data packet according to the target session information to obtain an encapsulated data packet; The target session information and the encapsulated data packet are transmitted to the transmission network element in an asynchronous transmission manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to a data receiver.
2. The method according to claim 1, characterized in that The obtaining of the amount of data to be transmitted received within a specified historical time period includes: Acquire multiple sessions created according to the received data packets to be transmitted within the specified historical time period, and filter out sessions that meet the set conditions from the multiple sessions; The number of screened sessions is used as the amount of data to be transmitted.
3. The method according to claim 2, characterized in that The step of screening out a session satisfying a set condition from the plurality of sessions includes: Calculate the data packet reception frequencies respectively corresponding to the plurality of sessions in the specified historical time period; The sessions whose corresponding data packet receiving frequencies are greater than a set frequency threshold are screened out from the multiple sessions.
4. The method according to claim 1, characterized in that The obtaining of the amount of data to be transmitted received within a specified historical time period includes: Acquire data packets received from the transmission network element within the specified historical time period; The number of data packets obtained is used as the amount of data to be transmitted.
5. The method according to claim 1, characterized in that The method further comprises: If the amount of data to be transmitted is less than or equal to the set data amount threshold, encapsulating the target data packet according to the target session information to obtain an encapsulated data packet; The target session information and the encapsulated data packet are transmitted to the transmission network element in a synchronous transmission manner, wherein the transmission time of the encapsulated data packet is later than the transmission time of the target session information.
6. The method according to claim 5, characterized in that The transmitting the target session information and the encapsulated data packet to the transmission network element in a synchronous sending manner includes: sending the target session information to the transmission network element so that the transmission network element stores the target session information; receiving a confirmation message sent by the transmission network element indicating that the target session information has been received; The encapsulated data packet is sent to the transmission network element according to the confirmation message, so that the transmission network element transmits the encapsulated data packet to the data receiver.
7. The method according to claim 1, characterized in that The method further comprises: If the amount of data to be transmitted is less than or equal to the set data amount threshold, the target session information is sent to the transmission network element so that the transmission network element stores the target session information and encapsulates the target data packet according to the stored target session information and transmits it to the data recipient.
8. A data transmission method, characterized in that: The method comprises: Receive a target data packet from a data sender, and search for session information corresponding to the target data packet from the stored session information; If the session information corresponding to the target data packet is not found, the target data packet is sent to a session creation network element, so that the session creation network element creates target session information corresponding to the target data packet according to the target data packet; receiving the target session information transmitted by the session creation network element in an asynchronous transmission manner and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold; The target session information is stored, and the encapsulated target data packet is transmitted to a data receiver.
9. The method according to claim 8, characterized in that The method further comprises: If the session information corresponding to the target data packet is found, encapsulating the target data packet according to the found session information; The target data packet encapsulated according to the found session information is transmitted to the data receiver.
10. The method according to claim 8, characterized in that The method is applied to a switch, the session creation network element is a server, and each session information contains five-tuple information corresponding to the session and a data packet encapsulation method; The step of searching the stored session information for the session information corresponding to the target data packet includes: Parsing the target data packet to obtain five-tuple information of the target data packet; The stored session information is searched for session information including five-tuple information that matches the five-tuple information of the target data packet.
11. The method according to any one of claims 8 to 10, characterized in that After transmitting the encapsulated target data packet to a data receiver, the method further includes: receiving a response data packet sent by the data recipient based on the encapsulated data packet, and acquiring the target session information from the stored session information; If the target session information is obtained, encapsulating the response data packet according to the target session information, and transmitting the encapsulated response data packet to the data sender; If the target session information is not obtained, the response data packet is discarded.
12. A data transmission device, characterized in that: The device comprises: A receiving module, configured to receive a target data packet sent by a transmission network element, wherein the target data packet is sent when the transmission network element fails to find the session information corresponding to the target data packet in the stored session information; A processing module, configured to create target session information corresponding to the target data packet according to the target data packet, and obtain the amount of data to be transmitted received within a specified historical time period; an encapsulation module, configured to encapsulate the target data packet according to the target session information to obtain an encapsulated data packet if the amount of data to be transmitted is greater than a set data amount threshold; The sending module is configured to transmit the target session information and the encapsulated data packet to the transmission network element in an asynchronous sending manner, so that the transmission network element stores the target session information and transmits the encapsulated data packet to a data receiver.
13. A data transmission device, characterized in that: The device comprises: A search module, configured to receive a target data packet from a data sender, and search for session information corresponding to the target data packet from the stored session information; a sending module, configured to send the target data packet to a session creation network element if the session information corresponding to the target data packet is not found, so that the session creation network element creates target session information corresponding to the target data packet according to the target data packet; a receiving module, configured to receive the target session information transmitted by the session creation network element in an asynchronous transmission manner and a target data packet encapsulated according to the target session information; wherein the target session information and the encapsulated target data packet are sent when the amount of data to be transmitted received by the session creation network element within a specified historical time period is greater than a set data amount threshold; The transmission module is configured to store the target session information and transmit the encapsulated target data packet to a data receiver.
14. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the data transmission method described in any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of an electronic device, the electronic device implements the data transmission method according to any one of claims 1 to 11.
