Data transmission method and device, electronic equipment and storage medium

By establishing a virtual connection between the client and the server and using authentication tokens for connectionless protocol transmission, the problem of multi-channel data transmission occupying system resources and bandwidth is solved, more efficient network data interaction is achieved, and the user experience is improved.

CN120835084APending Publication Date: 2025-10-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410497261.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

In online games, multi-channel data transmission between the client and the server takes up too many system resources, resulting in a decrease in the server's carrying capacity and increased network bandwidth consumption, which may cause network congestion especially during peak hours.

Method used

By establishing a virtual connection between the client and the server and using authentication tokens for connectionless protocol transmission, it avoids establishing a long connection for each network channel, uses multiple network channels to share the connection status, and quickly switches network channels to deal with abnormalities.

Benefits of technology

It reduces system resource usage and network bandwidth consumption, improves user experience, and reduces the impact of network fluctuations on data interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835084A_ABST
    Figure CN120835084A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, equipment and a storage medium, which can be applied to a network communication scene. The data transmission method comprises the steps that virtual connection between a client side and a server is established through a plurality of available network channels of terminal equipment, and the virtual connection corresponds to an authentication token of the client side; the virtual network connection adopts a connectionless protocol for data transmission, and the connectionless protocol does not need to establish connection before sending data; acquiring a first data packet according to first to-be-sent data of the client and the authentication token; and selecting a target network channel from a plurality of available network channels, and sending the first data packet to a server by using the target network channel. According to the embodiment of the invention, each network channel of the terminal can be fully utilized to obtain better network experience, and additional system resources and network bandwidth messages are not increased, so that the network experience of a user is improved under the condition that the cost is not increased.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and in particular, to a data transmission method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the continuous development of Internet technology and smart terminals, online games are booming and increasingly favored by players. In the process of online game running, the game client needs to frequently interact with the game server. Online games are very dependent on the network. In the game process, any network fluctuation may affect the data interaction between the game client and the game server, which may cause game delay or even disconnection, affecting the user's game control, and thus causing the user experience to be damaged.

[0003] In order to improve the user's network experience, the current general method is to establish and maintain multiple connections through multiple channels to realize multi-channel data transmission. However, establishing and maintaining multiple long connections at the client and server side will occupy a large amount of system resources such as storage and calculation of the client and server, especially at the server side, which will greatly reduce the server's carrying capacity, and more servers need to be deployed to support the same number of users. In addition, the consumption of network bandwidth, the establishment and maintenance of multiple network connections, require a lot of additional data transmission, such as data transmission in the main channel, in order to ensure the reliability of transmission, other same also has some heartbeat new or even repeated transmission of data, greatly increasing the consumption of network bandwidth, especially in peak period, even because of the multiple transmission of data, the network congestion of the server side. SUMMARY

[0004] The embodiments of the present application provide a data transmission method, device, equipment and storage medium, which can improve the user's network experience without increasing the cost.

[0005] In a first aspect, a data transmission method is provided, applied to a terminal device, comprising:

[0006] A virtual connection between a client and a server is established using multiple available network channels of the terminal device, the virtual connection corresponding to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data;

[0007] According to the first to-be-sent data of the client and the authentication token, a first data packet is obtained;

[0008] A target network channel is selected from the multiple available network channels, and the first data packet is sent to the server using the target network channel.

[0009] In a second aspect, a data transmission method is provided, applied to a server, comprising:

[0010] A virtual network connection between a client and a server is established by using multiple available network channels of a terminal device, the virtual network connection corresponds to an authentication token of the client, and the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data.

[0011] A first data packet from the client is obtained through a target network channel, wherein the first data packet is obtained according to first to-be-sent data of the client and the authentication token.

[0012] According to the authentication token, a processing thread corresponding to the client is determined, and logical processing is performed on the first data packet.

[0013] In a third aspect, a data transmission device is provided, applied to a terminal device, comprising:

[0014] An establishing unit is configured to establish a virtual connection between a client and a server by using multiple available network channels of the terminal device, the virtual connection corresponds to an authentication token of the client, and the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data.

[0015] An obtaining unit is configured to obtain a first data packet according to first to-be-sent data of the client and the authentication token.

[0016] A sending unit is configured to select a target network channel from the multiple available network channels, and send the first data packet to the server using the target network channel.

[0017] In a fourth aspect, a data transmission device is provided, applied to a server, comprising:

[0018] An establishing unit is configured to establish a virtual network connection between a client and a server by using multiple available network channels of a terminal device, the virtual network connection corresponds to an authentication token of the client, and the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data.

[0019] A receiving unit is configured to obtain a first data packet from the client through a target network channel, wherein the first data packet is obtained according to first to-be-sent data of the client and the authentication token.

[0020] A processing unit is configured to determine a processing thread corresponding to the client according to the authentication token, and perform logical processing on the first data packet.

[0021] In a fifth aspect, an electronic device is provided, comprising:

[0022] a processor adapted to implement computer instructions; and

[0023] a memory storing computer instructions adapted to be loaded by the processor and to implement the method of the first aspect or the method of the second aspect.

[0024] In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being read and executed by a processor of a computer device to cause the computer device to implement the method of the first aspect or the method of the second aspect.

[0025] In a seventh aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device, and the processor executes the computer instructions to cause the computer device to implement the method of the first aspect or the method of the second aspect.

[0026] By the above technical solution, a virtual connection between a client and a server is established using multiple available network channels of a terminal device, the virtual connection corresponding to an authentication token (token) of the client, so that a terminal-oriented virtual connection is established, and the virtual connection uses a connectionless protocol for data transmission, i.e., a connection does not need to be established before data is sent. Since the virtual connection uses the token authenticated by both the client and the server for authentication and state maintenance, when the client and the server switch network channels, the client can quickly establish network communication with the server by using the authenticated token, and can also reuse the state information of the network connection of the client cached by the server, without the need to establish and maintain a long connection with the server for each network channel, which is beneficial to reducing the occupation of system resources and does not increase additional bandwidth occupation. In addition, when network anomalies such as packet loss or congestion occur in the current network channel, the embodiments of the present application can quickly switch to other available network channels, reduce the influence of network fluctuations on data interaction between the client and the server, and improve user experience. Therefore, the embodiments of the present application can be beneficial to fully utilizing each network channel of the terminal to obtain better network experience, and will not increase additional system resources and network bandwidth messages, so that the network experience of users is improved without increasing costs. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 A schematic diagram of a system to which embodiments of the present application can be applied;

[0028] Figure 2A An optional structural diagram of a distributed system according to an embodiment of the present application;

[0029] Figure 2B An optional diagram of a block structure according to an embodiment of the present application;

[0030] Figure 3 An optional diagram of another system architecture according to an embodiment of the present application;

[0031] Figure 4 An optional flowchart of a data transmission method according to an embodiment of the present application;

[0032] Figure 5 An optional flowchart of a method for sending a probe data packet according to an embodiment of the present application;

[0033] Figure 6 An optional flowchart of a network connection establishment flow according to an embodiment of the present application;

[0034] Figure 7 An optional flowchart of a network data sending flow according to an embodiment of the present application;

[0035] Figure 8 An optional flowchart of a network quality detection flow according to an embodiment of the present application;

[0036] Figure 9 An optional block diagram of a data transmission apparatus according to an embodiment of the present application;

[0037] Figure 10 An optional block diagram of another data transmission apparatus according to an embodiment of the present application;

[0038] Figure 11 An optional block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0040] It should be understood that, in the embodiments of the present application, "B corresponding to A" means that B is associated with A. In an implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0041] In the description of the present application, unless otherwise specified, "at least one" means one or more, "multiple" means two or more than two. In addition, "and / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, B exists alone, where A, B can be singular or plural. The character " / " generally represents the "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c, can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.

[0042] It should also be understood that the first, second, and the like descriptions appearing in the embodiments of the present application are only for illustration and differentiation of the described objects, and do not have order and do not represent a special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0043] It should also be understood that the specific features, structures or characteristics related to the embodiments in the description are included in at least one embodiment of the present application. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0044] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or units does not have to be limited to those clearly listed steps or units, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0045] The data transmission method provided by the embodiments of the present application can be applied to various scenarios of data transmission using multiple available network channels, including but not limited to network game battle scenarios, instant messaging video scenarios, remote video conference video scenarios, real-time road navigation scenarios, etc. The present application does not limit this.

[0046] The application scenarios to which the technical solutions of the embodiments of the present application can be applied will be briefly introduced below. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and not to limit. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0047] In some embodiments, the system related to the embodiments of the present application can be a system formed by the server and the client in the form of network communication.

[0048] For example,Figure 1 An example of a system to which embodiments of the present application can be applied. Referring to Figure 1 The system includes a terminal device 102 and a server 104. The terminal device 102 can communicate data with the server 104 through a communication network. The server 104 can be a background server for the terminal device 102.

[0049] For example, the terminal device 102 can refer to a type of device with rich human-computer interaction mode, access to the Internet, usually with various operating systems, and strong processing capability. The terminal device 102 can also be referred to as a user terminal, a terminal, a user equipment, etc., and can be a smart phone, a tablet computer, a portable notebook computer, a desktop computer, a wearable device, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc., but is not limited thereto.

[0050] The server 104 can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. The server can also be a node of a blockchain.

[0051] The server can be one or more. When the server is multiple, at least two servers are used to provide different services, and / or at least two servers are used to provide the same service, such as providing the same service in a load balancing manner, and the embodiments of the present application do not limit this.

[0052] Optionally, a client can be installed in the terminal device 102, which can provide local services for the client. The client can cooperate with the corresponding server 104 in the network to run. The terminal device 102 and the server 104 can be connected through wired or wireless communication technology to ensure the normal operation of the client on the terminal device. For example, the client can be various clients that provide local services, such as game clients, instant messaging clients, video conference clients, email clients, live broadcast clients, web browsers, etc. The server can provide corresponding services for the client, such as game services, database services, email services, voice services, video services, etc., without limitation.

[0053] Optionally, the application scenario can also include a data storage system. The data storage system can store data required by the server 104. The data storage system can be separately provided, integrated on the server 104, or deployed on the cloud or other servers, without limitation.

[0054] It should be understood that Figure 1 are merely illustrative and do not specifically limit the application scenarios of the embodiments of the present application. For example, Figure 1 The terminal device and the server are exemplarily shown, and in fact, other numbers of terminal devices and servers can be included, or a data storage system and the like can also be included, which are not limited by the present application.

[0055] In some embodiments, the system involved in the embodiments of the present application can be a distributed system formed by a client, a plurality of nodes (for example, any form of computing device such as a server, a user terminal) connected through network communication.

[0056] Taking the distributed system as a blockchain system, see Figure 2A , Figure 2A is an optional structural schematic diagram of the distributed system 100 provided by the embodiments of the present application applied to the blockchain system, which is formed by a plurality of nodes (for example, any form of computing device such as a server, a user terminal) 200 and a client 300. In the distributed system, any machine such as a server, a terminal device can join to become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer and an application layer.

[0057] Referring to Figure 2A the functions of each node in the blockchain system, the functions involved include:

[0058] 1) Routing, a basic function of the node, used to support communication between nodes.

[0059] In addition to the routing function, the node can also have the following functions:

[0060] 2) Application, used to be deployed in the blockchain, to implement specific businesses according to actual business needs, to record data related to the implementation function to form record data, to carry a digital signature in the record data to represent the source of the task data, to send the record data to other nodes in the blockchain system, and to add the record data to the temporary block when the other nodes successfully verify the source and integrity of the record data.

[0061] For example, the businesses implemented by the application include:

[0062] 2.1) Wallet, used to provide the function of conducting transactions of electronic currency (for example, game virtual assets), including initiating a transaction (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system, and after the other nodes verify successfully, as a response to acknowledging the validity of the transaction, storing the record data of the transaction in the temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;

[0063] 2.2) Shared Ledger, which provides the function of storing, querying and modifying the account data, sends the record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify the validity, as a response to acknowledging the validity of the account data, stores the record data in the temporary block, and can also send a confirmation to the node that initiated the operation.

[0064] 2.3) Smart Contract, a computerized protocol that can execute the terms of a certain contract, implemented by code deployed on the shared ledger for execution when certain conditions are met, and the code is used to complete the automated business function according to the actual business needs. For example, game developers or manufacturers can implement the rules of a set of games on the blockchain through a smart contract.

[0065] 3) Blockchain, which includes a series of blocks connected in chronological order, once a new block is added to the blockchain, it cannot be removed, and the block records the record data submitted by the nodes in the blockchain system.

[0066] Referring to Figure 2B , Figure 2B is an optional schematic diagram of the block structure provided by the embodiments of the present application, each block includes the hash value of the transaction record stored in the block (the hash value of the block) and the hash value of the previous block, and the blocks are connected by the hash values to form a blockchain. In addition, the block can also include information such as the time stamp when the block is generated. The blockchain is essentially a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block contains relevant information for verifying the validity of the information (anti-fake) and generating the next block.

[0067] In the related art, multiple connections between the client and the server are established and maintained through multiple channels to realize multi-channel data transmission. However, the establishment and maintenance of multiple long connections between the client and the server will occupy a large amount of system resources such as storage and calculation of the client and the server, especially on the server side, which will greatly reduce the carrying capacity of the server, and more servers need to be deployed to support the same number of users. In addition, the consumption of network bandwidth, the establishment and maintenance of multiple network connections require a lot of additional data transmission, such as data transmission on the main channel, in order to ensure the reliability of transmission, other same will also have some heartbeat new or even repeated transmission of data, which greatly increases the consumption of network bandwidth, especially during peak period, even the multiple transmission of data may cause network congestion on the server side.

[0068] To solve the above problems, the embodiments of the present application utilize multiple available network channels of a terminal device to establish a virtual connection between a client and a server, the virtual connection corresponding to an authentication token of the client, thereby realizing the establishment of a terminal-oriented virtual connection, which uses a connectionless protocol for data transmission, i.e., a connection does not need to be established before data is sent. Since the virtual connection uses the token authenticated by both the client and the server for authentication and state maintenance, when the client and the server switch network channels, the client only needs to follow the authenticated token to quickly establish network communication with the server, and can also reuse the state information of the network connection of the client cached by the server, without the need to establish and maintain a long connection with the server for each network channel, which is beneficial to reduce the occupation of system resources and does not increase the additional bandwidth occupation. In addition, when the current network channel has network anomalies such as packet loss or congestion, the embodiments of the present application can quickly switch to other available network channels, reduce the influence of network fluctuations on data interaction between the client and the server, and improve user experience.

[0069] For example, in the embodiments of the present application, the client can include but is not limited to a game client, an instant messaging client, a video conference client, a mail client, a live broadcast client, a web browser client, etc.

[0070] In some embodiments, the game client establishes a corresponding network processing thread on the server through a unique identifier at game initialization, and all data packets of all network channels of the same client can be sent to the same processing thread, ensuring the consistency of multi-channel data communication. At the same time, during the game process, the real-time network quality of each network channel is detected regularly to ensure that each data transmission can go through the optimal network channel, thereby guaranteeing the network experience of users. The specific function module implementation is as follows Figure 3 as shown.

[0071] Figure 3 A schematic diagram of a system architecture provided by the embodiments of the present application is shown. The system architecture takes the client as a game client and the server as a game server as an example to describe each function module. Referring to Figure 3 , the game client 310 includes a network component control module 311, a communication process control module 312, and a network quality detection module 313, and the game server 320 includes a network connection management module 321 and a network request processing module 322.

[0072] The network component control module 311 provides a network connection service for the game client 310, and establishes and maintains a network connection between the game client 310 and the game server 320 through a plurality of network channels available to the terminal device. Optionally, the network component control module 311 can also detect and save the real-time network quality of each network channel through the network quality detection module. Exemplarily, the plurality of network channels include, but are not limited to, a wireless network channel, a mobile data channel, an Ethernet channel, and the like. The wireless network channel includes, for example, a WIFI network channel, a Bluetooth network channel, and the like. The mobile data channel includes, for example, a 3G, 4G, 5G, and the like cellular channel.

[0073] The communication process control module 312 receives a network communication request of the game client, and selects an optimal network channel to send to the game server 320 according to the real-time network state of each network channel. The communication process control module 312 can also receive information returned by the game server 320. The network quality detection module 313 detects and records the network quality of each network channel through the transmission and reception of data packets in a timely manner during the game running process, for use by the network component control module 311.

[0074] The network connection management module 321 is responsible for receiving the connection establishment request of the game client 310, and establishing an independent processing thread for each game client 310 after corresponding processing. The network request processing module 322 receives a network request of the game client, calls a corresponding logic module for corresponding processing, and returns the processing result to the game client 310.

[0075] It should be understood that the embodiments of the present application are described by taking the implementation process of a game client as an example, and other types of clients are also applicable to the scheme provided by the embodiments of the present application. It should be understood that the actual application scenarios of other types of clients may be different from the application scenarios of game clients, but this does not affect the specific implementation of the scheme of the embodiments of the present application.

[0076] Figure 4 A schematic flowchart of a data transmission method 400 according to an embodiment of the present application is shown in FIG. 4. The method 400 can be applied to a system including a server and a terminal device, for example, a system as shown in FIG. 1, or a distributed system in FIG. 2, and the like, which is not limited in the present application. As shown in FIG. 4, the method 400 can include steps 410 to 440. Figure 1 or Figure 3 The method 400 can include steps 410 to 440. Figure 2A Figure 4 410, a plurality of available network channels of a terminal device are used to establish a virtual connection between a client and a server, the virtual connection corresponds to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data.

[0077] 410, a plurality of available network channels of a terminal device are used to establish a virtual connection between a client and a server, the virtual connection corresponds to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data. ​

[0078] Specifically, since the network quality itself is affected by various factors, there is no way to fundamentally solve the network quality problem, therefore, the embodiments of the present application mainly use multi-channel technology for network connection to ensure that the client can send data in time through another network channel when an abnormality occurs in a certain network channel. Based on this, the embodiments of the present application use multiple available network channels of a terminal device to establish a virtual connection between a client and a server. The virtual connection corresponds to an authentication token token of the client, and uses an authentication token agreed by the client and the server side for authentication and state maintenance, so that when switching network channels, the client only needs to follow the authenticated token to quickly establish network communication with the server side. At the same time, the virtual connection uses a connectionless protocol for data transmission, and does not need to establish a connection before sending data, which is conducive to quickly establishing network communication. Therefore, through the optimization of the communication protocol and the token corresponding to the virtual connection corresponding to the client, multiple network channels can share the same connection state through the virtual connection, so that there is no need to establish an actual long connection, and more, each network channel does not need to establish and maintain a network connection with the server, but can achieve the same effect of a stateful long connection through the way of sharing a virtual connection by multiple network channels. At the same time, multiple network channels can reuse the state information of the network connection cached by the server.

[0079] In some embodiments, the connectionless protocol includes a User Datagram Protocol (UDP), which can provide an application program, such as a client, with a method of sending encapsulated data packets without establishing a connection. The connection established based on UDP can be referred to as a short connection.

[0080] In some embodiments, the connection established based on Transmission Control Protocol (TCP) can be referred to as a long connection, which is an actual connection established for sending data.

[0081] In some embodiments, before step 410, the terminal device needs to identify available network channels. Specifically, the terminal device can have multiple network channels, such as a WIFI network channel, 3G, 4G, 5G, etc. cellular network, the WIFI network channel can have two frequency bands of 2.4G and 5G, and the cellular network can have multiple SIM cards connected to multiple operators. In order to fully utilize the network capabilities of the terminal and ensure network communication instructions, all available network channels on the local can be identified when the client is started, and all network channels are registered with the server, so that when actual network transmission is performed, the optimal network channel can be selected for data transmission according to the actual network quality of each channel.

[0082] In some embodiments, the string can also be obtained according to a unique device identification ID of the terminal device and a time of virtual connection establishment, and the string is encrypted by using the public key of the client to obtain the authentication token.

[0083] Specifically, since no actual connection is established between the client and the server, and each network packet is independent, when the server receives a new network request, it needs to distinguish which client sends it, so that the server can perform normal logical processing. Therefore, a token needs to be carried in each network packet to identify the client sending the packet. The token needs to uniquely distinguish the terminal and the current network connection, so a string is obtained by using the unique device identification ID of the terminal and the time of connection establishment, and the string is encrypted by using the public key of the client to obtain the token of the current network connection.

[0084] Therefore, the token obtained by encrypting the unique device ID of the terminal device and the time of virtual connection establishment by using the public key of the client can ensure that different clients have different tokens, so that the server can allocate different processing threads to the clients to save intermediate state data, or allocate the same processing thread to multiple clients but different clients save the intermediate state data. At the same time, the token generated by the same client at different times is also different, so that the server can find the network connection that has not been completed before for abnormal processing according to the device ID of the terminal, ensure that the intermediate state data of the last connection on the server is normally processed, and then establish a new connection with a new token.

[0085] In this way, different network channels of the same client use the same token when performing network communication, and the server also establishes a processing thread identified by the token, and stores the intermediate state data corresponding to the client, or establishes multiple token corresponding processing threads, and stores the corresponding intermediate state data for each client. In this way, all network data using the token is allocated to the corresponding thread for processing, so that the same network long connection effect can be achieved without establishing an actual network connection.

[0086] In some embodiments, the unique device identification ID of the terminal device can also be encrypted by using the public key of the client to obtain the authentication token, which is not limited in the embodiments of the present application.

[0087] 420, obtain a first data packet according to the first to-be-sent data of the client and the authentication token. The first data packet includes the authentication token.

[0088] Specifically, when the client has a new data sending requirement, the client can pack the to-be-sent data according to the to-be-sent data and the token of the client to obtain a first data packet, so that the first data packet includes the token.

[0089] 430, selecting a target network channel from the plurality of available network channels, and sending the first data packet to the server using the target network channel.

[0090] Specifically, when the to-be-sent data packet is packed to obtain the first data packet, a network channel can be selected from the plurality of available network channels of the terminal device as a target network channel for data sending. Optionally, the target network channel can be an optimal network channel.

[0091] In some embodiments, the target network channel can be selected from the plurality of available network channels according to network qualities of the plurality of available network channels.

[0092] For example, the quality of the network channel can be detected, so that when there is a data sending requirement, an optimal network channel with an optimal network quality can be selected from the plurality of available network channels as a target network channel for data sending according to network qualities of the plurality of available network channels.

[0093] In some embodiments, the client can send a probe data packet to the server through each of the plurality of available network channels; and determine network qualities of the plurality of available network channels according to transmission situations of the probe data packets of the plurality of available network channels.

[0094] Correspondingly, the server can obtain the probe data packet from the client through each of the plurality of available network channels; and determine network qualities of the plurality of available network channels according to transmission situations of the probe data packets of the plurality of available network channels.

[0095] Specifically, due to the characteristics of the network connection, the actual network quality of the current network channel can be determined only by the actual sending and receiving of the data packet. Since the client can send data through a plurality of network channels, it is necessary to probe the network qualities of the plurality of network channels. Specifically, the client can send a probe data packet to the server through each of the plurality of available network channels. For example, the probe data packet can be a data packet for notifying the other party of its own state at a regular time between the client and the server, and the regular sending of the probe data packet can inform the other party that it is still online and ensure the effectiveness of the connection. As an example, the probe data packet can include the identification of the sender, the timestamp and other information, so that the receiver can confirm the identity of the sender and the effectiveness of the heartbeat packet. Optionally, the probe data packet can also include a token.

[0096] For example, the response time can be measured according to the transmission of the probe data packet, i.e., the delay measurement. For example, the response time of the current network channel can be calculated by measuring the time difference between the sending and receiving of the probe data packet. A shorter response time usually indicates a better network quality, while a longer response time may indicate that the network channel is delayed or congested.

[0097] For example, the packet loss rate can also be detected according to the transmission of the probe data packet. For example, if no response to the probe data packet is received from the other party within a specified time period, it can be judged that a packet loss has occurred. The packet loss rate is one of the important indicators of network quality, and a high packet loss rate usually means that the network is unstable or has a fault.

[0098] For example, the bandwidth can also be evaluated according to the transmission of the probe data packet. For example, by adjusting the sending frequency and size of the probe data packet, the processing capacity of the network for the data packet can be observed. If the network can successfully process high-frequency or large-size probe data packets, it is considered that the bandwidth of the network channel is relatively abundant.

[0099] Meanwhile, after receiving the probe data packet from the client, the server can count the quality data of each network channel of the client according to the response packet information. In this way, when the server needs to respond to the client asynchronously, the optimal network channel can also be selected according to the quality of the network channel.

[0100] In some embodiments, referring to Figure 5 The probe data packet can be sent to the server through the first available network channel according to the following steps 501 to 503. The first available network channel is one of the plurality of available network channels of the terminal device.

[0101] 501, determining a first time for sending a probe data packet to a server through a first available network channel; the plurality of available network channels of the terminal device includes the first available network channel.

[0102] For example, the quality of the first available network channel can be detected at regular intervals, for example, the quality of the first available network channel can be detected every 5 seconds. The first time can be each time interval or multiple time points in the same time interval, and the embodiments of the present application do not limit this.

[0103] 502, if the client has second to-be-sent data at the first time, obtaining the probe data packet according to the second to-be-sent data and the authentication token, and sending the probe data packet to the server through the first available network channel at the first time.

[0104] Specifically, when there is actual data transmission at the first time, the network quality of the current network channel can be obtained according to the result of data transmission (such as the time consumption, packet loss rate or bandwidth, etc.).

[0105] In some embodiments, the second to-be-sent data comprises non-real-time reporting data.

[0106] Specifically, when the actual transmission data is used to detect the network quality, if the current network quality is not good, the data packet can be delayed or lost, thereby affecting the user experience. Based on this, the core data can be placed on the network channel with good network quality, and only the non-core data (such as non-real-time reporting data) is used to detect the network quality of each network channel, that is, only the non-core data is used as the second to-be-sent data.

[0107] As an implementation manner, the data packet of the client can be classified, for example, into L1 type core data packet and L2 type data packet, wherein the L1 type core data packet can include data directly affecting the core application experience, such as user operation information; and the L2 type data packet includes data having little effect on the core application experience of the user, such as non-real-time reporting data.

[0108] 503, if there is no to-be-sent data of the client at the first time, obtaining a heartbeat data packet as the detection data packet, and sending the detection data packet to the server through the first available network channel at the first time.

[0109] Specifically, if there is no actual data transmission at the first time, the heartbeat data packet can be sent to detect the network quality, and the network quality of the current network channel can be obtained.

[0110] In some embodiments, since sending the heartbeat data packet can increase the consumption of system resources and network bandwidth, the actual data packet can be used as the detection data packet as much as possible to detect the network quality. That is, if there is to-be-sent data of the client at the first time, the detection data packet is obtained according to the to-be-sent data to detect the network quality, and if there is no to-be-sent data of the client at the first time, the heartbeat data packet is used to detect the network quality.

[0111] It should be understood that, Figure 5 The process of sending the detection data packet to the server is described by taking the first available network channel as an example. The process of sending the detection data packet to the server through each available network channel of the terminal device is similar to the process of sending the detection data packet to the server through the first available network channel, and the description in Figure 5 can be referred to, and will not be described in detail.

[0112] As a specific example, the client can perform quality detection on all network channels at a regular time interval (e.g., every 5 seconds), and the required data packets can be L2 type data packets. If there is no L2 type data packet at the detection time point, a new heartbeat data packet is generated for network quality detection.

[0113] In some embodiments, after the detection is completed, the network channels can be classified according to the network quality of the network channels. For example, the network channels can be classified according to the network delay size as follows:

[0114] T1: 0-20 ms;

[0115] T2: 20-50 ms;

[0116] T3: 50-100 ms;

[0117] T4: 100-300 ms;

[0118] T5: greater than 300 ms.

[0119] It should be understood that because the requirements of the clients of different applications for network quality are different, the above classification intervals can also be different for different applications. Generally, the T1 and T2 intervals are the optimal network experience intervals for users, the network experience of users is affected to a certain extent in the T3-T4 interval, and the network experience of users is severely affected in the T5 interval. Therefore, after the detection of the multiple available network channels is completed, the quality of each network channel can be marked. For example, the network quality of each network channel can be saved according to the fields shown in Table 1:

[0120] Table 1

[0121]

[0122] When the client has a new data sending requirement, an optimal network channel can be selected for data sending. For example, the selection can be performed according to the following logic:

[0123] First, the level state of the main network channel (e.g., the current network channel) is checked. If the level state is T1 or T2, the current main network channel is directly selected as the target network channel for sending the first data packet. Optionally, the main network channel can be kept unchanged. If the current main network channel is neither T1 nor T2, the network channel with the best network quality is selected from the other network channels. If there are multiple selected network channels, the network channel with the smallest fluctuation rate is selected as the data sending channel. If the fluctuation rates are still the same, a network channel is randomly selected.

[0124] Optionally, after the sending of the first data packet through the target network channel is completed, the level of the currently selected network channel becomes T3 or below, the currently selected network channel is set as a non-main network channel, and the network channel with the best network quality (i.e., the highest level) is selected from all available network channels and set as the main network channel.

[0125] In some embodiments, if the first data to be sent is non-real-time reporting data, a network channel that needs to send a probe data packet can be determined as the target network channel from the plurality of available network channels. Correspondingly, the server can determine the network quality of the target network channel according to the transmission of the first data packet.

[0126] For example, when the client has a data sending requirement, there is an available network channel that needs to send a probe data packet to the server at this time, the first data packet can be sent as a probe data packet, which can realize the transmission of the data packet and the detection of the network quality of the available network channel, and reduce the additional system resource consumption and network bandwidth caused by the heartbeat data packet.

[0127] 440, according to the authentication token in the first data packet, determining the corresponding processing thread of the client and performing logical processing on the first data packet

[0128] For example, the server can normally detect a specified port, check the corresponding token when there is a new network request, and then distribute the network request to the processing thread corresponding to the token for processing. If the corresponding thread is not found, the client is notified to reestablish a virtual connection.

[0129] In some embodiments, the server can also determine the network quality of the target network channel according to the transmission of the first data packet.

[0130] In some embodiments, the server can also send a response message for the first data packet to the client through the target network channel, or send the response message for the first data packet to the client through other network channels in the plurality of available network channels when the network quality of the target network channel is abnormal. The response message includes the operation result of the server on the first data packet.

[0131] Correspondingly, the client can receive the response message (i.e., the returned data) for the first data packet returned by the server. Optionally, the client can use at least one of the plurality of available network channels to receive the response message for the first data packet from the server.

[0132] Exemplarily, since the terminal device has multiple available network channels, and the network channel for sending data (i.e., the target network channel) can have network abnormalities, the response message returned by the server can be returned from other network channels, and thus the terminal device needs to receive and process data of all network channels.

[0133] Optionally, during the existence of the application client, if there is no actual data packet received, the client can periodically send a heartbeat data packet to the server, so that the corresponding processing of the server can continue to exist. Optionally, if the server does not receive the data packet of the client for a long time, the server can enter a sleep state to save system resources. Optionally, the server can also send a reverse heartbeat data packet to the client to detect the survival state of the client. Optionally, if the client does not respond, the running of the thread corresponding to the client is ended.

[0134] Therefore, the embodiment of the application utilizes multiple available network channels of the terminal device to establish a virtual connection between the client and the server, the virtual connection corresponds to an authentication token (token) of the client, so that a terminal-oriented virtual connection is established, and the virtual connection uses a connectionless protocol for data transmission, i.e., a connection does not need to be established before data is sent. Since the virtual connection uses the token authenticated by the client and the server to perform authentication and state maintenance, when the client and the server switch network channels, the client only needs to follow the authenticated token to quickly establish network communication with the server, and the state information of the network connection of the client cached by the server can be reused, so that a long connection does not need to be established and maintained for each network channel, which is beneficial to reduce the occupation of system resources and does not increase additional bandwidth occupation. In addition, when the current network channel has network abnormalities such as packet loss or congestion, the embodiment of the application can quickly switch to other available network channels, reduce the influence of network fluctuations on data interaction between the client and the server, and improve user experience.

[0135] Hereinafter, the overall interaction process of data transmission is described in combination with Figure 6 to Figure 8 Exemplarily, Figure 6 to Figure 8 In the embodiment, the client can be a game client, and the server can be a game server, or the client is another application client, and the server is another application server, without limitation.

[0136] Figure 6 An example of a network connection establishment process is shown. As Figure 6 shown, the network connection establishment process can include steps 601 to 606.

[0137] 601, the client is started.

[0138] Specifically, when the game client is started, the present procedure is started to establish a multi-channel virtual network connection.

[0139] 602, generating a token.

[0140] Specifically, the token can be generated according to the method in the above embodiment.

[0141] 603, checking network channels.

[0142] Specifically, all available network channels on the terminal can be checked.

[0143] 604, establishing a virtual connection.

[0144] Specifically, one of the network channels can be selected from all available network channels to initiate a request for establishing a network connection to the server. Optionally, the network connection underlying protocol can use UDP protocol for data transmission.

[0145] 605, starting a processing thread.

[0146] Specifically, after the server receives the request for establishing a network connection and confirms that the connection can be normally established, a corresponding processing thread is started.

[0147] 606, starting detection.

[0148] Specifically, the client can start a timing task after the network connection is formally established to detect the actual network quality of each network channel. Specifically, the process of detecting the network channel can refer to the related description in Figure 4 and Figure 5 .

[0149] Figure 7 An exemplary diagram of a network data sending procedure is shown. As shown in Figure 7 , the network data sending procedure can include steps 701 to 708.

[0150] 701, obtaining data to be sent.

[0151] Specifically, when the current client has a data sending requirement, the present procedure is started.

[0152] 702, selecting a network channel.

[0153] Specifically, one of all available network channels on the terminal can be selected as an optimal network channel, which is an example of the target network channel in Figure 4 . Specifically, the process of selecting a network channel can refer to the related description in the above Figure 4 and Figure 5 , which will not be repeated here.

[0154] 703, data packaging.

[0155] Specifically, the network channel determined in step 702 can be woken up, and the data can be packaged according to the corresponding format, and the corresponding token can be encapsulated into the data packet. Then, the data packet is sent to the server through the network channel.

[0156] 704, selecting a processing thread.

[0157] Specifically, after the server receives the corresponding data packet, the corresponding processing thread can be selected according to the token carried therein.

[0158] 705, logical processing.

[0159] Specifically, after the processing thread of the server receives the data packet, the logical data therein is parsed and normal logical processing is performed. For example, when the server is a game server, the processing thread can parse the game logic data therein and perform normal game logic processing. For example, when the data packet includes a moving instruction, the game object can be moved according to the corresponding logic and the corresponding logical processing.

[0160] 706, updating the state.

[0161] Specifically, the server updates the network state of the current network channel according to the data transmission of the current network channel, such as the delay condition, the packet loss rate condition, the network bandwidth, etc. Specifically, the rule for updating the network state of the network channel can refer to the related description above.

[0162] 707, selecting a network channel.

[0163] For example, the server can use the uplink network channel that receives the data to return the processing result obtained in step 705 to the client by default. Alternatively, if the uplink network channel has network anomalies, the network channel with the best network quality can be selected according to the network quality of the current network channel to return the processing result.

[0164] 708, whether the sending is successful?

[0165] Specifically, if the data sending fails or the sending result is obtained, another network channel is selected in step 702 to continue sending data. If the sending is successful, the process ends.

[0166] Figure 8 An example of a network quality detection process is shown. As shown in Figure 8 The network quality detection process can include steps 801 to 810.

[0167] 801, timing start.

[0168] Specifically, the client initiates the present procedure to detect the actual network quality of each network channel.

[0169] 802, poll each network channel.

[0170] Specifically, all available network channels on the terminal can be polled, i.e. network quality detection is performed for all network channels available to the current terminal.

[0171] 803, is it idle?

[0172] Specifically, the state of the current network channel is checked. If the current network channel has already received an actual network packet in the present cycle, the state of the current network channel is directly updated with the network detection data of the actual network packet, such as time delay, packet loss rate or bandwidth, etc. and the procedure jumps to step 810. If the current network channel has not received an actual network packet in the present cycle, the procedure jumps to step 804.

[0173] 804, is there an L2 packet?

[0174] If the current network channel has been idle, an L2 packet can be obtained from normal L2 packets as a detection packet.

[0175] 805, send the packet.

[0176] If an L2 packet is obtained in step 804, the packet is directly sent through the current network channel.

[0177] 806, generate a heartbeat packet.

[0178] If no L2 packet is obtained in step 804, a heartbeat packet can be constructed.

[0179] 807, send the heartbeat packet.

[0180] Specifically, the heartbeat packet constructed in step 806 can be sent to the server.

[0181] 808, logical processing.

[0182] Specifically, the server receives the packet sent by the client and performs normal logical processing. Specifically, the process of logical processing can refer to the relevant description of step 705 in Figure 7 .

[0183] 809, the server updates the state.

[0184] Specifically, the server updates the network channel state according to the transmission of the received data packet or heartbeat data packet, such as time delay, packet loss rate, and bandwidth.

[0185] 810, the client updates the state.

[0186] Specifically, the client can update the network channel state according to the transmission request of the current data packet or heartbeat data packet, such as time delay, packet loss rate, and bandwidth.

[0187] 811, whether all channels are completed?

[0188] Specifically, the client can check whether all network channels are polled. If not, it jumps to step 802 to continue polling the next network channel. When all network channels are polled, the current network quality detection period ends.

[0189] Therefore, the embodiments of the present application can realize fast switching of multiple network channels, and periodically detect the connectivity of multiple network channels. When network anomalies (such as packet loss and congestion) occur in the current channel, the client can quickly switch to other available network channels. In addition, the embodiments of the present application do not rely on a stateful network connection of a long connection. By establishing a virtual network connection between the client and the server, the authentication token agreed by both parties is used for authentication and state maintenance. Therefore, when switching to another network channel, the client only needs to follow the authentication token to quickly establish network communication with the server, and can reuse the state information of the network connection cached by the server, without the need to establish and maintain a network connection with the server for each network channel. Therefore, the embodiments of the present application can use multi-channel technology for network connection, ensure that the client can send data through another network channel in time when an anomaly occurs in a network channel, optimize the network communication process, reduce the resource consumption of multiple channels, and ensure that the system resources and network bandwidth overhead can be saved to the greatest extent while using multiple channel connections. That is, the embodiments of the present application can fully utilize each network channel of the terminal. As long as any network channel is smooth, the client can obtain the best network experience. Compared with the traditional scheme, the present application does not increase the consumption of additional system resources and network bandwidth, thereby greatly improving the network experience of users without increasing costs.

[0190] The specific embodiments of the present application are described in detail above with reference to the drawings, but the present application is not limited to the specific details in the above-described embodiments. Within the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application, and these simple modifications all belong to the protection scope of the present application. For example, in the above-described specific embodiments, various specific technical features are described, and in the case of no contradiction, any suitable combination can be made. In order to avoid unnecessary repetition, various possible combination manners are not described again in the present application. For another example, various different embodiments of the present application can also be combined arbitrarily, as long as it does not deviate from the idea of the present application, and it should also be considered as the disclosed content of the present application.

[0191] It should also be understood that, in various method embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. It should be understood that these sequence numbers can be interchanged under appropriate circumstances, so that the described embodiments of the present application can be implemented in an order other than those illustrated or described.

[0192] The method embodiments of the present application are described in detail above with reference to the drawings, and the device embodiments of the present application are described in detail below with reference to the drawings.

[0193] Figure 9 is a schematic block diagram of a data transmission device 10 of an embodiment of the present application. As shown in Figure 9 , the device 10 can include an establishing unit 11, an obtaining unit 12 and a sending unit 13.

[0194] The establishing unit 11 is configured to establish a virtual connection between a client and a server by using a plurality of available network channels of the terminal device, the virtual connection corresponding to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data;

[0195] The obtaining unit 12 is configured to obtain a first data packet according to first to-be-sent data of the client and the authentication token.

[0196] The sending unit 13 is configured to select a target network channel from the plurality of available network channels, and send the first data packet to the server using the target network channel.

[0197] In some embodiments, the sending unit 13 is specifically configured to:

[0198] select the target network channel from the plurality of available network channels according to network quality of the plurality of available network channels.

[0199] In some embodiments, the sending unit 13 is further configured to send the probe data packet to the server through each of the plurality of available network channels.

[0200] The apparatus 10 further comprises a processing unit configured to determine network quality of the plurality of available network channels according to transmission of the probe data packet.

[0201] In some embodiments, the sending unit 13 is specifically configured to: determine a first time when the probe data packet is sent to the server through a first available network channel; the plurality of available network channels comprises the first available network channel; if there is second to-be-sent data in the client at the first time, obtain the probe data packet according to the second to-be-sent data and the authentication token; and send the probe data packet to the server through the first available network channel at the first time.

[0202] In some embodiments, the second to-be-sent data comprises non-real-time reporting data.

[0203] In some embodiments, the sending unit 13 is further configured to: if there is no to-be-sent data in the client at the first time, obtain a heartbeat data packet as the probe heartbeat packet; and send the probe data packet to the server through the first available network channel at the first time.

[0204] In some embodiments, the apparatus 10 further comprises a receiving unit configured to:

[0205] receive a response message from the server for the first data packet using at least one of the plurality of available network channels, the response message comprising an operation result of the server on the first data packet.

[0206] In some embodiments, the sending unit 13 is specifically configured to:

[0207] If the first to-be-sent data is non-real-time reporting data, determine a network channel that needs to send a probe data packet from the plurality of available network channels as the target network channel.

[0208] In some embodiments, the connectionless protocol comprises a user datagram protocol (UDP).

[0209] In some embodiments, the apparatus 10 further comprises a processing unit configured to:

[0210] obtain a string according to a unique device identifier (ID) of the terminal device and a third time when the virtual connection is established; and encrypt the string using a public key of the client to obtain the authentication token.

[0211] It should be understood that the apparatus embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, no further description is given here. Specifically, when the data transmission apparatus 10 in this embodiment can correspond to the operation of the terminal device in the data transmission method 400 of performing the embodiments of the present application, the foregoing and other operations and / or functions of each module in the apparatus 10 are respectively to realize the corresponding process of the terminal device in each method in the present application, and for the sake of brevity, no further description is given here. Figure 4

[0212] Figure 10 is a schematic block diagram of the data transmission apparatus 20 of the embodiments of the present application. As shown in Figure 10 , the apparatus 20 can include an establishment unit 21, a receiving unit 22 and a processing unit 23.

[0213] The establishment unit 21 is configured to establish a virtual network connection between a client and a server by using a plurality of available network channels of a terminal device, the virtual network connection corresponding to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before sending data.

[0214] The receiving unit 22 is configured to obtain a first data packet from the client through a target network channel; wherein the first data packet is obtained according to first to-be-sent data of the client and the authentication token.

[0215] The processing unit 23 is configured to determine a processing thread corresponding to the client according to the authentication token and perform logical processing on the first data packet.

[0216] In some embodiments, the receiving unit 22 is further configured to obtain a plurality of probe data packets from the client through the plurality of available network channels respectively.

[0217] The processing unit 23 is further configured to determine network quality of the plurality of available network channels according to transmission conditions of the probe data packets of the plurality of available network channels.

[0218] In some embodiments, the probe data packets are obtained according to second to-be-sent data of the client, or the probe data packets are obtained according to heartbeat data packets.

[0219] In some embodiments, the processing unit 23 is further configured to:

[0220] determine network quality of the target network channel according to a transmission condition of the first data packet.

[0221] In some embodiments, the apparatus 20 further includes a sending unit configured to:

[0222] ​send a response message for the first data packet to the client through the target network channel; or send the response message for the first data packet to the client through other network channels of the plurality of available network channels when network quality of the target network channel is abnormal; wherein the response message comprises an operation result of the server on the first data packet.

[0223] It should be understood that the device embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, the foregoing and other operations and / or functions of each module in the device 20 are not described here again. Specifically, when the data transmission device 20 in this embodiment can correspond to the operation of the server in the data transmission method 400 of the embodiments of the present application, the foregoing and other operations and / or functions of each module in the device 20 are respectively to realize the corresponding process of the server in each method in the Figure 4

[0224] The device and system of the embodiments of the present application are described above from the perspective of functional modules in combination with the drawings. It should be understood that the functional modules can be realized by hardware, instructions in the form of software, or a combination of hardware and software modules. Specifically, each step of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in the processor and / or instructions in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware code processing and executed by the processor, or executed by a combination of hardware and software modules in the code processing. Alternatively, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps in the above method embodiments.

[0225] As shown in Figure 11 is a schematic block diagram of an electronic device 30 provided by the embodiments of the present application. The electronic device can be the terminal device or the server described above, without limitation. As shown in Figure 11 The electronic device 30 can include a memory 31 and a processor 32, the memory 31 is used to store computer programs and transmit the program codes to the processor 32. In other words, the processor 32 can call and run the computer programs from the memory 31 to realize the method in the embodiments of the present application.

[0226] In some embodiments of the present application, the processor 32 can include but is not limited to:

[0227] ​A general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.

[0228] In some embodiments of the present application, the memory 31 includes, but is not limited to:

[0229] volatile memory and / or non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a synch link DRAM (SLDRAM), and a Direct Rambus RAM (DR RAM).

[0230] In some embodiments of the present application, the computer program can be divided into one or more modules, which are stored in the memory 31 and executed by the processor 32 to complete the method provided by the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 30.

[0231] Optionally, as shown in Figure 11 the electronic device 30 can further include:

[0232] A communication interface 33, which can be connected to the processor 32 or the memory 31.

[0233] The processor 32 can control the communication interface 33 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. For example, the communication interface 33 can include a transmitter and a receiver. The communication interface 33 can further include an antenna, and the number of antennas can be one or more.

[0234] It should be understood that the various components in the electronic device 30 are connected through a bus system, which includes a data bus, a power supply bus, a control bus, and a status signal bus, in addition to a data bus.

[0235] According to an aspect of the present application, a computer storage medium is provided, which stores a computer program. When the computer program is executed by a computer, the computer is enabled to perform the method of the above method embodiments. Alternatively, the embodiments of the present application further provide a computer program product containing instructions. When the instructions are executed by a computer, the computer performs the method of the above method embodiments.

[0236] According to another aspect of the present application, a computer program product or a computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method of the above method embodiments.

[0237] In other words, when implemented using software, the embodiments of the present application can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the flow or function according to the embodiments of the present application is generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, digital video disc (DVD)), or a semiconductor medium (for example, solid state disk (SSD)), etc.

[0238] It can be understood that in the specific embodiments of the present application, when the above embodiments of the present application are applied to specific products or technologies and related data such as user information, the user's permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards.

[0239] It can also be understood that several embodiments provided by the embodiments of the present application can be combined with each other, and the same or similar concepts or processes can refer to the description in some embodiments.

[0240] Those skilled in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0241] In several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, for example, the division of the modules is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0242] The modules described as separate components can or can not be physically separate, and the components shown as modules can or can not be physical modules, i.e. can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. For example, the functional modules in each embodiment of the present application can be integrated in one processing module, or each module can be physically present separately, or two or more modules can be integrated in one module.

[0243] The above is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A data transmission method, characterized by, The method is applied to a terminal device and includes the following steps: A virtual connection between a client and a server is established by using multiple available network channels of the terminal device, the virtual connection corresponding to an authentication token of the client; the virtual network connection adopts a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before transmitting data; A first data packet is obtained according to first to-be-transmitted data of the client and the authentication token; A target network channel is selected from the multiple available network channels, and the first data packet is transmitted to the server by using the target network channel.

2. The method of claim 1, wherein, The target network channel is selected from the multiple available network channels according to network quality of the multiple available network channels. Before the target network channel is selected from the multiple available network channels according to network quality of the multiple available network channels, the following steps are further included:

3. The method of claim 2, wherein, The server is transmitted with a probe data packet through the multiple available network channels respectively; The network quality of the multiple available network channels is determined according to transmission conditions of the probe data packets of the multiple available network channels. The probe data packet is transmitted to the server through a first available network channel at a first time, and the multiple available network channels include the first available network channel.

4. The method of claim 3, wherein, If the client has second to-be-transmitted data at the first time, the probe data packet is obtained according to the second to-be-transmitted data and the authentication token. The probe data packet is transmitted to the server through the first available network channel at the first time. The second to-be-transmitted data includes non-real-time reporting data. Further included are:

5. The method of claim 4, wherein, If the client has no to-be-transmitted data at the first time, a heartbeat data packet is obtained as the probe heartbeat packet.

6. The method of claim 4, wherein, The probe data packet is transmitted to the server through the first available network channel at the first time. The method is applied to a server and includes the following steps: A virtual network connection between a client and a server is established by using multiple available network channels of a terminal device, the virtual network connection corresponding to an authentication token of the client; the virtual network connection adopts a connectionless protocol for data transmission, and the connectionless protocol does not need to establish a connection before transmitting data; 7. A data transmission method, characterized by, A first data packet from the client is obtained through a target network channel, wherein the first data packet is obtained according to first to-be-transmitted data of the client and the authentication token; According to the authentication token, a processing thread corresponding to the client is determined, and logical processing is performed on the first data packet. Further included are: The server is transmitted with a probe data packet through the multiple available network channels respectively; 8. The method of claim 7, wherein, The network quality of the multiple available network channels is determined according to transmission conditions of the probe data packets of the multiple available network channels. The probe data packet is obtained according to second to-be-transmitted data of the client, or the probe data packet is obtained according to a heartbeat data packet. Applied to a terminal device, including:

9. The method of claim 8, wherein, ​ 10. A data transmission apparatus, characterized by comprising: ​ an establishing unit, configured to establish a virtual connection between a client and a server using a plurality of available network channels of the terminal device, wherein the virtual connection corresponds to an authentication token of the client; the virtual network connection uses a connectionless protocol for data transmission, and the connectionless protocol does not require a connection to be established before sending data; an acquiring unit, configured to acquire a first data packet according to the first data to be sent by the client and the authentication token; the first data packet includes the authentication token; A sending unit is configured to select a target network channel from the multiple available network channels, and use the target network channel to send the first data packet to the server.

11. A data transmission apparatus, characterized by comprising: Applicable to servers, including: an establishing unit, configured to establish a virtual network connection between a client and a server using a plurality of available network channels of a terminal device, wherein the virtual network connection corresponds to an authentication token of the client; the virtual network connection adopts a connectionless protocol for data transmission, wherein the connectionless protocol does not require a connection to be established before sending data; A receiving unit, configured to obtain a first data packet from the client through a target network channel; wherein the first data packet is obtained according to the first data to be sent by the client and the authentication token; A processing unit is configured to determine, based on the authentication token, a processing thread corresponding to the client and perform logical processing on the first data packet.

12. An electronic device, comprising: The method comprises a processor and a memory, wherein the memory stores instructions, and when the processor runs the instructions, the processor executes the method according to any one of claims 1 to 6, or executes the method according to any one of claims 7 to 9.

13. A computer storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 9.

14. A computer program product, characterised in that, The method comprises a computer program code, which, when executed by an electronic device, enables the electronic device to execute the method according to any one of claims 1 to 6, or execute the method according to any one of claims 7 to 9.