Data transmission method, terminal device, and computer-readable storage medium

By determining the service type and utilizing the network of the second terminal device with the communication connection, the optimal transmission path is selected, which solves the data transmission problem of the terminal device when the network quality is poor, improves the speed and latency, and enhances the user experience.

CN116419362BActive Publication Date: 2026-04-07HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

When the network quality of the terminal device is poor, the data transmission rate is low and/or the latency is long, resulting in a poor user experience.

Method used

The terminal device determines the service type of the data to be transmitted, utilizes the communication network of the second terminal device with which it is connected to assist in data transmission, and selects the optimal transmission path to improve data transmission rate and/or reduce latency.

Benefits of technology

It improves data transmission rate and/or reduces data transmission latency, thereby enhancing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116419362B_ABST
    Figure CN116419362B_ABST
Patent Text Reader

Abstract

The application is suitable for the terminal technical field, and particularly relates to a data transmission method, a terminal device and a computer readable storage medium. In the method, when a first terminal device needs to perform data transmission with a target device, the first terminal device can acquire a data transmission request, determine a service type corresponding to to-be-transmitted data according to the data transmission request, and determine a target transmission path according to the service type, so as to perform transmission of the to-be-transmitted data with the target device through the target transmission path. The target transmission path can include at least one second terminal device, the second terminal device is in communication connection with the first terminal device, and the second terminal device is in communication connection with the target device, so as to assist the first terminal device in data transmission by using a communication network of the second terminal device, improve the data transmission rate of the first terminal device, and / or reduce the data transmission delay of the first terminal device, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of terminal technology, and in particular relates to data transmission methods, terminal devices and computer-readable storage media. Background Technology

[0002] Currently, terminal devices can transmit data with servers via cellular networks or wireless local area networks (WLANs). When a terminal device is connected to WLAN, it can transmit data with the server through WLAN. When poor WLAN signal quality is detected, the terminal device can switch to cellular network to transmit data with the server. However, when both WLAN and cellular network signal quality are poor, current data transmission methods suffer from low speeds and / or high latency, resulting in a poor user experience. Summary of the Invention

[0003] This application provides a data transmission method, a terminal device, and a computer-readable storage medium, which can solve the problems of low data transmission rate and / or long latency when the terminal device has a poor network.

[0004] In a first aspect, embodiments of this application provide a data transmission method applied to a first terminal device, the method including:

[0005] The first terminal device obtains a data transmission request, which is used to request the transmission of data to be transmitted with the target device.

[0006] The first terminal device determines the service type corresponding to the data to be transmitted;

[0007] The first terminal device determines a target transmission path based on the service type. The target transmission path includes at least one second terminal device, which is communicatively connected to the first terminal device and also communicatively connected to the target device.

[0008] The first terminal device transmits the data to be transmitted to the target device through the target transmission path.

[0009] Using the aforementioned data transmission method, when the first terminal device needs to transmit data with the target device, the first terminal device can obtain a data transmission request. Based on the request, it can determine the service type corresponding to the data to be transmitted and, according to the service type, determine a target transmission path. The first terminal device then transmits the data to the target device through this path. The target transmission path may include at least one second terminal device, which is communicatively connected to both the first and target devices. This allows the second terminal device's communication network to assist the first terminal device in data transmission, improving its data transmission rate and / or reducing its latency, thereby enhancing the user experience.

[0010] In one possible implementation, the first terminal device determines the service type corresponding to the data to be transmitted, which may include:

[0011] The first terminal device determines the application corresponding to the data to be transmitted, and determines the service type corresponding to the data to be transmitted based on the application.

[0012] In the data transmission method provided by this implementation, each application in the first terminal device can be configured with a corresponding service type. The first terminal device can determine the application corresponding to the data to be transmitted and can directly determine the service type corresponding to the application as the service type corresponding to the data to be transmitted.

[0013] For example, for each application, the service type corresponding to that application can be set in its configuration file, i.e., the application can be set to latency-sensitive or bandwidth-stable. When the first terminal device needs to transmit data with the target device, the first terminal device can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application. Subsequently, the first terminal device can determine the service type corresponding to the foreground application according to its configuration file, and can set the service type corresponding to the foreground application as the service type corresponding to the data to be transmitted.

[0014] Alternatively, the first terminal device can have a first application list and a second application list. The first application list contains applications with latency-sensitive services, and the second application list contains applications with bandwidth-stable services. When the first terminal device needs to transmit data with the target device, it can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application. Subsequently, the first terminal device can determine the service type corresponding to the foreground application based on the first application list and / or the second application list, and can determine the service type corresponding to the foreground application as the service type corresponding to the data to be transmitted.

[0015] In another possible implementation, the first terminal device determines the service type corresponding to the data to be transmitted, which may include:

[0016] The first terminal device determines the task corresponding to the data to be transmitted, and determines the service type corresponding to the data to be transmitted based on the task.

[0017] In the data transmission method provided by this implementation, since the same application can perform different tasks at different times, and different tasks have different requirements for transmission performance, in order to meet the transmission requirements of different tasks and improve user experience, the first terminal device can determine the task corresponding to the data to be transmitted, so as to determine the service type corresponding to the data to be transmitted based on the task corresponding to the data to be transmitted.

[0018] For example, the first terminal device determining the task corresponding to the data to be transmitted may include:

[0019] The first terminal device obtains the application interface of the application corresponding to the data to be transmitted, which is currently running, and determines the task corresponding to the data to be transmitted based on the application interface.

[0020] In one possible implementation, the first terminal device determining the target transmission path based on the service type may include:

[0021] The first terminal device determines the default transmission path between the first terminal device and the target device;

[0022] The first terminal device determines the first transmission performance corresponding to the default transmission path based on the service type.

[0023] When the first transmission performance does not meet the transmission requirements corresponding to the service type, the first terminal device determines the target transmission path according to the service type.

[0024] In the data transmission method provided by this implementation, the first terminal device can obtain the default transmission path between itself and the target device. When the transmission performance of the default transmission path meets the transmission requirements of the data to be transmitted, the first terminal device can transmit the data through the default transmission path. However, when the transmission performance of the default transmission path does not meet the transmission requirements of the data to be transmitted, the first terminal device can activate the converged routing function, that is, it can form a network with surrounding terminal devices to utilize a second terminal device with better transmission performance to assist the first terminal device in transmitting the data to be transmitted, thereby improving the data transmission rate of the first terminal device and / or reducing the data transmission latency of the first terminal device, and improving the user experience.

[0025] In one example, before the first terminal device determines the target transmission path based on the service type, the method may further include:

[0026] The first terminal device sends a networking request to at least one third terminal device, wherein the at least one third terminal device is a device whose distance from the first terminal device is less than or equal to a preset distance threshold.

[0027] In response to the network confirmation message returned by the fourth terminal device, the first terminal device establishes a network connection with the fourth terminal device, wherein the fourth terminal device is one or more of the at least one third terminal device.

[0028] For example, establishing a network connection between the first terminal device and the fourth terminal device may include:

[0029] The first terminal device determines the communication network for establishing a network connection with the fourth terminal device based on the service type;

[0030] The first terminal device establishes a network connection with the fourth terminal device based on the communication network.

[0031] In the data transmission method provided by this implementation, the first terminal device can determine the transmission performance of each communication network (i.e., the communication network that can be connected between the first terminal device and the fourth terminal device) based on the service type corresponding to the data to be transmitted. Specifically, when the service type is latency-sensitive, the first terminal device can determine the latency of each communication network; when the service type is bandwidth-stable, the first terminal device can determine the bandwidth of each communication network. Subsequently, the first terminal device can determine the communication network with the optimal transmission performance as the communication network connecting the first terminal device and the fourth terminal device. For example, when the service type is latency-sensitive, the communication network with the shortest latency can be determined as the communication network connecting the first terminal device and the fourth terminal device; when the service type is bandwidth-stable, the communication network with the largest bandwidth can be determined as the communication network connecting the first terminal device and the fourth terminal device, thereby improving the data transmission speed and / or reducing the data transmission latency of the first terminal device through the communication network with the optimal transmission performance.

[0032] In one possible implementation, when the service type is latency-sensitive, the first terminal device determines the target transmission path based on the service type, which may include:

[0033] The first terminal device determines at least one fifth terminal device connected to the first terminal device;

[0034] The first terminal device determines the time delay between the first terminal device and the at least one fifth terminal device;

[0035] The first terminal device determines the device to be transmitted from the at least one fifth terminal device based on the delay, and sends the service type to the device to be transmitted to instruct the device to be transmitted to become a new first terminal device after receiving the service type, and returns to execute the step of determining at least one fifth terminal device connected to the first terminal device and subsequent steps, until the finally determined device to be transmitted is the target device.

[0036] The first terminal device determines the target transmission path based on all the devices to be transmitted.

[0037] For example, the latency-sensitive services may include video playback, web browsing, or game battles.

[0038] In the data transmission method provided by this implementation, when the service type is latency-sensitive, the first terminal device can determine the target transmission path according to the distributed routing decision method. That is, each terminal device can determine the device to be transmitted based on the real-time latency of each terminal device, and then obtain the target transmission path with the shortest latency based on each device to be transmitted to transmit the data to be transmitted, thereby reducing the latency of the first terminal device in transmitting data.

[0039] In another possible implementation, when the service type is bandwidth-stable, the first terminal device determines the target transmission path based on the service type, which may include:

[0040] The first terminal device determines all candidate transmission paths between the first terminal device and the target device;

[0041] The first terminal device determines the bandwidth corresponding to each of the candidate transmission paths;

[0042] The first terminal device determines the target transmission path based on the bandwidth, and the target transmission path is one of the candidate transmission paths.

[0043] In the data transmission method provided by this implementation, when the service type is bandwidth stable, the first terminal device can determine the target transmission path according to the centralized routing decision method. That is, the first terminal device can start from the global bandwidth size and obtain the target transmission path with the largest bandwidth to transmit the data to be transmitted, so as to improve the data transmission rate of the first terminal device and improve the user experience.

[0044] For example, the first terminal device determining the bandwidth corresponding to each of the candidate transmission paths may include:

[0045] For each candidate transmission path, the first terminal device determines each sub-path corresponding to the candidate transmission path;

[0046] The first terminal device obtains the bandwidth corresponding to each of the sub-paths;

[0047] The first terminal device determines the minimum bandwidth corresponding to each of the sub-paths as the bandwidth corresponding to the candidate transmission path.

[0048] For example, the bandwidth-stable service may include data uploading or data downloading.

[0049] Secondly, embodiments of this application provide a data transmission apparatus applied to a first terminal device, the apparatus including:

[0050] The transmission request acquisition module is used to acquire a data transmission request, which is used to request the transmission of data to be transmitted with the target device;

[0051] The service type determination module is used to determine the service type corresponding to the data to be transmitted;

[0052] A target path determination module is used to determine a target transmission path according to the service type. The target transmission path includes at least one second terminal device, which is communicatively connected to the first terminal device and to the target device.

[0053] The data transmission module is used to transmit the data to be transmitted to the target device through the target transmission path.

[0054] In one possible implementation, the service type determination module is specifically used to determine the application corresponding to the data to be transmitted, and to determine the service type corresponding to the data to be transmitted based on the application.

[0055] In another possible implementation, the service type determination module can also be used to determine the task corresponding to the data to be transmitted, and determine the service type corresponding to the data to be transmitted based on the task.

[0056] For example, the service type determination module can also be used to obtain the application interface of the application corresponding to the data to be transmitted, and determine the task corresponding to the data to be transmitted based on the application interface.

[0057] In one possible implementation, the target path determination module may include:

[0058] A default path determination unit is used to determine the default transmission path between the first terminal device and the target device;

[0059] A transmission performance determination unit is used to determine the first transmission performance corresponding to the default transmission path based on the service type.

[0060] The first target path determination unit is used to determine the target transmission path according to the service type when the first transmission performance does not meet the transmission requirements corresponding to the service type.

[0061] In one example, the device may further include:

[0062] A network request sending module is used to send a network request to at least one third terminal device, wherein the at least one third terminal device is a device whose distance from the first terminal device is less than or equal to a preset distance threshold.

[0063] A network connection establishment module is used to establish a network connection with the fourth terminal device in response to the network confirmation response information returned by the fourth terminal device, wherein the fourth terminal device is one or more of the at least one third terminal device.

[0064] For example, the network connection establishment module may include:

[0065] A communication network determination unit is configured to determine, based on the service type, the communication network for establishing a network connection with the fourth terminal device;

[0066] A network connection establishment unit is used to establish a network connection with the fourth terminal device based on the communication network.

[0067] In one possible implementation, when the service type is latency-sensitive, the target path determination module may include:

[0068] A device determination unit is configured to determine at least one fifth terminal device connected to the first terminal device;

[0069] A delay determination unit is used to determine the delay between the first terminal device and the at least one fifth terminal device;

[0070] The device to be transmitted unit is configured to determine the device to be transmitted corresponding to the first terminal device from the at least one fifth terminal device according to the delay, and send the service type to the device to be transmitted to instruct the device to be transmitted to become a new first terminal device after receiving the service type, and return to execute the step of determining at least one fifth terminal device connected to the first terminal device and subsequent steps until the finally determined device to be transmitted is the target device.

[0071] The second target path determination unit is used to determine the target transmission path based on all the devices to be transmitted.

[0072] For example, the latency-sensitive services may include video playback, web browsing, or game battles.

[0073] In another possible implementation, when the service type is bandwidth stable, the target path determination module may include:

[0074] A candidate path determination unit is used to determine all candidate transmission paths between the first terminal device and the target device;

[0075] A bandwidth determination unit is used to determine the bandwidth corresponding to each of the candidate transmission paths;

[0076] The third target path determination unit is used to determine the target transmission path based on each of the bandwidths, wherein the target transmission path is one of the candidate transmission paths.

[0077] For example, the bandwidth determination unit may include:

[0078] The sub-path determination unit is used to determine each sub-path corresponding to each candidate transmission path for each candidate transmission path.

[0079] The first bandwidth determination unit is used to obtain the bandwidth corresponding to each of the sub-paths;

[0080] The second bandwidth determination unit is used to determine the minimum bandwidth corresponding to each of the sub-paths as the bandwidth corresponding to the candidate transmission path.

[0081] For example, the bandwidth-stable service may include data uploading or data downloading.

[0082] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the terminal device implements the data transmission method described in any one of the first aspects above.

[0083] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to implement the data transmission method described in any one of the first aspects above.

[0084] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the data transmission method described in any one of the first aspects.

[0085] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0086] Figure 1 This is a schematic diagram illustrating an application scenario where a terminal device transmits data to a server.

[0087] Figure 2 This is a schematic diagram of the structure of the terminal device to which the data transmission method provided in this application is applicable;

[0088] Figure 3 This is a schematic diagram of the software architecture to which the data transmission method provided in the embodiments of this application is applicable;

[0089] Figure 4 This is a schematic flowchart of the data transmission method provided in the embodiments of this application;

[0090] Figure 5 This is a schematic flowchart of the networking provided in the embodiments of this application;

[0091] Figure 6 This is a schematic diagram of the networking application scenario provided in the embodiments of this application;

[0092] Figure 7 This is a network topology diagram obtained by the networking method provided in the embodiments of this application;

[0093] Figure 8 This is a schematic diagram of the application scenario provided in the embodiments of this application. Figure 1 ;

[0094] Figure 9 This is a schematic diagram of the application scenario provided in the embodiments of this application. Figure 2 . Detailed Implementation

[0095] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0096] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0097] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0098] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0099] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0100] Furthermore, the term "multiple" mentioned in the embodiments of this application should be interpreted as two or more.

[0101] The steps involved in the data transmission method provided in this application are merely examples, and not all steps are mandatory, nor are all contents of each piece of information or message required. They can be added or removed as needed during use. The same step or step or message with the same function in this application can be referenced and learned from each other in different embodiments.

[0102] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0103] With the rapid development of terminal technology, terminal devices generally have multiple communication networks such as cellular networks and wireless local area networks (WLAN). Therefore, terminal devices can transmit data with servers or other terminal devices through cellular networks or WLAN, that is, they can access data from servers or other terminal devices through cellular networks or WLAN, or upload data to servers or other terminal devices through cellular networks or WLAN.

[0104] Figure 1 This diagram illustrates an application scenario where a terminal device transmits data to a server. For example... Figure 1 As shown, when terminal device 100 connects to WLAN, it can transmit data with server 200 via WLAN. Specifically, terminal device 100 can obtain data from server 200 through router 300, or send data to server 200 through router 300. However, when poor WLAN signal quality is detected, terminal device 100 can switch to cellular network to transmit data with server 300 via cellular network. Specifically, terminal device 100 can obtain data from server 300 through cellular base station 400, or send data to server 300 through cellular base station 400.

[0105] In other words, terminal device 100 can transmit data with server 300 through its own cellular network or WLAN with good signal quality. However, when the signal quality of both WLAN and cellular networks is poor, it will result in a low data acquisition rate and / or long latency for terminal device 100 to obtain data from server 300, or a low data upload rate and / or long latency for terminal device 100 to server 300, leading to a poor user experience.

[0106] To address the aforementioned problems, embodiments of this application provide a data transmission method, a terminal device, and a computer-readable storage medium. In this method, when a first terminal device needs to transmit data with a target device such as a server or other terminal devices, the first terminal device can determine the service type corresponding to the data to be transmitted and determine a target transmission path based on the service type, so as to transmit the data to be transmitted with the target device through the target transmission path. The target transmission path may include at least one second terminal device, which is communicatively connected to the first terminal device and can also communicate with the target device. This allows the second terminal device's communication network to assist the first terminal device in data transmission, improving the data transmission rate and / or reducing the data transmission latency of the first terminal device, thereby enhancing user experience and demonstrating strong usability and practicality.

[0107] The data transmission method provided in this application can be applied to terminal devices such as mobile phones, laptops, wearable devices, in-vehicle devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and desktop computers. This application does not impose any restrictions on the specific type of terminal device.

[0108] The following first describes the terminal device involved in the embodiments of this application. Please refer to... Figure 2 , Figure 2 A schematic diagram of a terminal device 100 is shown.

[0109] Terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, antenna 1, antenna 2, a mobile communication module 140, a wireless communication module 150, a sensor module 160, buttons 190, a camera 170, a display screen 180, etc. The sensor module 160 may include a pressure sensor 160A, a gyroscope sensor 160B, a magnetic sensor 160C, an accelerometer sensor 160D, a proximity sensor 160E, a proximity light sensor 160F, a fingerprint sensor 160G, a touch sensor 160H, etc.

[0110] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0111] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0112] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0113] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0114] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0115] USB interface 130 is an interface compliant with the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. USB interface 130 can be used for data transfer between terminal device 100 and peripheral devices. This interface can also be used to connect other terminal devices, such as AR devices.

[0116] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0117] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 140, wireless communication module 150, modem processor and baseband processor, etc.

[0118] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0119] The mobile communication module 140 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 140 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 140 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 140 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 140 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 140 and at least some modules of the processor 110 may be housed in the same device.

[0120] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor displays images or videos via the display screen 180. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed within the same device as the mobile communication module 140 or other functional modules.

[0121] The wireless communication module 150 can provide solutions for wireless communication applications on the terminal device 100, including WLAN (such as wireless fidelity, Wi-Fi, or Wi-Fi peer-to-peer, Wi-Fi p2p), Bluetooth, ultra-wideband (UWB), global navigation satellite system (GNSS), frequency modulation (FM), near-field communication (NFC), and infrared (IR). The wireless communication module 150 can be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 150 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0122] In some embodiments, antenna 1 of terminal device 100 is coupled to mobile communication module 140, and antenna 2 is coupled to wireless communication module 150, enabling terminal device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0123] The terminal device 100 implements display functions through a GPU, a display screen 180, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 180 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0124] The display screen 180 is used to display images, videos, etc. The display screen 180 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include one or N display screens 180, where N is a positive integer greater than 1.

[0125] Terminal device 100 can perform shooting functions through ISP, camera 170, video codec, GPU, display 180 and application processor.

[0126] The ISP (Image Signal Processor) is used to process data fed back from the camera 170. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 170.

[0127] Camera 170 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the terminal device 100 may include one or N cameras 170, where N is a positive integer greater than 1.

[0128] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0129] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. Thus, terminal device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0130] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in terminal devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0131] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0132] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of terminal device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of terminal device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0133] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Terminal device 100 can receive button input and generate key signal inputs related to user settings and function control of terminal device 100.

[0134] The software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of terminal device 100.

[0135] Figure 3 This is a software structure block diagram of the terminal device 100 according to an embodiment of this application.

[0136] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0137] The application layer can include a series of application packages.

[0138] like Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, converged routing, etc.

[0139] In this embodiment, the user can control the start or stop of the converged routing function through the converged routing application, and / or set the configuration information of the converged routing function through the converged routing application. For example, the converged routing application can be an optional application of the terminal device 100. For instance, the terminal device 100 can be set to always enable the converged routing function by default and execute the converged routing function according to the default configuration information. Therefore, the terminal device 100 may not have a converged routing application.

[0140] The converged routing function refers to the ability to integrate the communication networks of other terminal devices to determine the target transmission path and perform data transmission according to the target transmission path. In other words, the converged routing function enables terminal device 100 to use the communication networks of other terminal devices to perform data transmission.

[0141] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0142] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0143] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0144] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0145] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0146] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0147] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0148] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0149] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0150] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0151] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0152] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), fusion routing management modules, etc.

[0153] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0154] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0155] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0156] A 2D graphics engine is a graphics engine for 2D drawing.

[0157] The converged routing management module controls the underlying hardware of terminal device 100 to establish wired and / or wireless connections with other terminal devices and exchange path detection information with other terminal devices to determine the target transmission path for data transmission based on the path detection information. The path detection information may include, but is not limited to, one or more of the following: latency, duty cycle, packet loss rate, wireless bandwidth, and signal-to-noise ratio.

[0158] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, audio drivers, sensor drivers, Bluetooth drivers, USB drivers, and WiFi drivers.

[0159] The data transmission method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific application scenarios.

[0160] Please see Figure 4 , Figure 4 A schematic flowchart illustrating the data transmission method provided in an embodiment of this application is shown. Figure 4 As shown, the method may include:

[0161] S401, The first terminal device obtains a data transmission request, which is used to request the transmission of data to be transmitted with the target device.

[0162] S402, The first terminal device determines the service type corresponding to the data to be transmitted.

[0163] S403. The first terminal device determines the target transmission path according to the service type. The target transmission path includes at least one second terminal device. The second terminal device is communicatively connected to the first terminal device and is also communicatively connected to the target device.

[0164] S404. The first terminal device transmits the data to be transmitted to the target device through the target transmission path.

[0165] In this embodiment, when a first terminal device needs to transmit data with a target device, such as when it needs to obtain data from or send data to the target device, the first terminal device can obtain a data transmission request. Based on the data transmission request, it can determine the service type corresponding to the data to be transmitted and determine a target transmission path based on the service type. The first terminal device then transmits the data to be transmitted to the target device through the target transmission path. The target transmission path may include at least one second terminal device, which is communicatively connected to both the first and target devices. This allows the second terminal device to utilize its communication network to assist the first terminal device in data transmission, thereby improving the data transmission rate and / or reducing the data transmission latency of the first terminal device, thus enhancing the user experience.

[0166] The service types can include latency-sensitive and bandwidth-stable services. Latency-sensitive services require low latency, i.e., smooth display with minimal lag. Bandwidth-stable services require high bandwidth, i.e., fast transmission speeds. Target devices can be servers or other terminal devices, such as music servers, video servers, download servers, or game servers, or mobile phones, laptops, or tablets.

[0167] It should be understood that the communication connection between the second terminal device and the first terminal device can be a direct connection or an indirect connection, meaning that the communication connection between the first and second terminal devices can be achieved through other terminal devices. Similarly, the communication connection between the second terminal device and the target device can be a direct connection or an indirect connection.

[0168] In one possible implementation, after determining the target transmission path between the first terminal device and the target device, data can continue to be transmitted between them through the target transmission path until the first terminal device receives a handover instruction, or until the target transmission path becomes unusable for data transmission. The handover instruction can refer to a user-input command to switch networks. The unusable target transmission path can mean that a device along the target transmission path has lost network access.

[0169] In other words, when the first terminal device transmits data A to the target device, the first terminal device can determine the target transmission path A based on the service type corresponding to data A. Subsequently, when the first terminal device also needs to transmit data B and data C to the target device, the first terminal device can directly transmit data B and data C to the target device through the target transmission path A.

[0170] In another possible implementation, the first terminal device can execute the above-described processes S401 to S404 every time data is transmitted. That is, when the first terminal device transmits data A with the target device, it can determine the target transmission path A based on the service type corresponding to data A, and transmit data A through the target transmission path A. Subsequently, when the first terminal device needs to transmit data B with the target device, it can again determine the target transmission path B based on the service type corresponding to data B, and transmit data B through the target transmission path B. Similarly, when the first terminal device needs to transmit data C with the target device, it can again determine the target transmission path C based on the service type corresponding to data C, and transmit data C through the target transmission path C. The target transmission paths B and C can be the same as or different from the target transmission path A.

[0171] The following provides a detailed explanation of S402, where the first terminal device determines the service type corresponding to the data to be transmitted.

[0172] In one possible implementation, the first terminal device can determine the service type corresponding to the data to be transmitted based on the application corresponding to the data to be transmitted. The application corresponding to the data to be transmitted can be either the application receiving the data or the application sending the data. The application in the first terminal device that needs to transmit data with the target device is generally an application currently running in the foreground (hereinafter referred to as the foreground application); therefore, the application corresponding to the data to be transmitted can be the foreground application of the first terminal device.

[0173] In one example, the first terminal device can be configured with service types corresponding to various applications. For instance, for each application, the service type can be set in its configuration file, i.e., setting the application to be latency-sensitive or bandwidth-stable. When the first terminal device needs to transmit data with the target device, it can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application. Subsequently, the first terminal device can determine the service type corresponding to the foreground application based on its configuration file, and can then set the service type of the foreground application as the service type corresponding to the data to be transmitted.

[0174] Alternatively, the first terminal device can have a first application list and a second application list. The first application list contains applications with latency-sensitive services, and the second application list contains applications with bandwidth-stable services. When the first terminal device needs to transmit data with the target device, it can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application. Subsequently, the first terminal device can determine the service type corresponding to the foreground application based on the first application list and / or the second application list, and can determine the service type corresponding to the foreground application as the service type corresponding to the data to be transmitted.

[0175] For example, the first terminal device can be configured to classify applications primarily used for content playback or display, such as online games, video playback, and browsers, as latency-sensitive, and applications primarily used for data upload and / or download, such as cloud storage and app stores, as bandwidth-stable. Therefore, when the first terminal device determines that the foreground application is an online game, it can determine that the service type corresponding to the data to be transmitted is latency-sensitive. When the first terminal device determines that the foreground application is a cloud storage application, it can determine that the service type corresponding to the data to be transmitted is bandwidth-stable. When the first terminal device determines that the foreground application is a video playback application, it can determine that the service type corresponding to the data to be transmitted is latency-sensitive.

[0176] In another possible implementation, since the same application can execute different tasks at different times, and different tasks have different requirements for transmission performance, in order to meet the transmission requirements of different tasks and improve user experience, the first terminal device can determine the service type corresponding to the data to be transmitted based on the task corresponding to the data to be transmitted. It should be understood that a task can refer to a function implemented by the application that requires data interaction with the target device, such as a download function that needs to download data from a server, an upload function that needs to upload data to a server, or a browsing function that needs to browse web page content on a server.

[0177] For example, in online gaming applications, low latency is required during gameplay, so the service type corresponding to the data to be transmitted can be latency-sensitive. Conversely, high download speeds are required during version updates, so the service type corresponding to the data to be transmitted can be bandwidth-stable.

[0178] For example, in video playback applications, low latency is required during video playback, so the service type corresponding to the data to be transmitted can be latency-sensitive. Conversely, high download speed is required for video download, so the service type corresponding to the data to be transmitted can be bandwidth-stable.

[0179] For example, in cloud storage applications, high upload or download speeds are required for file uploads or downloads, in which case the service type corresponding to the data being transmitted can be bandwidth-stable. Conversely, low latency is required for online file browsing, in which case the service type corresponding to the data being transmitted can be latency-sensitive.

[0180] In one example, the first terminal device can be configured with service types corresponding to various tasks. For instance, for each application, the service types corresponding to each task of that application can be set in the application's configuration file. When the first terminal device needs to transmit data with the target device, the first terminal device can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application, and determine the task being executed by the foreground application. Subsequently, the first terminal device can determine the service type corresponding to that task based on the foreground application's configuration file, and can then determine the service type corresponding to that task as the service type corresponding to the data to be transmitted.

[0181] Alternatively, the first terminal device can set up a first task list and a second task list. The first task list contains tasks with a latency-sensitive service type, and the second task list contains tasks with a bandwidth-stable service type. When the first terminal device needs to transmit data with the target device, it can determine the application corresponding to the data to be transmitted, i.e., determine the foreground application and the task being executed by the foreground application. Subsequently, the first terminal device can determine the service type corresponding to the task based on the first task list and / or the second task list, and can then determine the service type corresponding to the task as the service type corresponding to the data to be transmitted.

[0182] For example, the first terminal device can be configured to assign bandwidth-stable service types to tasks primarily involving data transmission, such as data upload and download, and latency-sensitive service types to tasks primarily involving content playback or display, such as video playback, web browsing, and game battles. Therefore, when the first terminal device determines that the task being performed by the foreground application is a data transmission task (e.g., data upload or download), it can determine that the service type corresponding to the data to be transmitted is latency-sensitive. Conversely, when the first terminal device determines that the task being performed by the foreground application is a content playback or display task (e.g., video playback, web browsing, or game battles), it can determine that the service type corresponding to the data to be transmitted is bandwidth-stable.

[0183] For example, the first terminal device can obtain the application interface of the foreground application that is running, so as to determine the task being performed by the foreground application based on the application interface. For instance, for an online game application, when the application interface of the online game application that is running is a version download interface, the first terminal device can determine that the task being performed by the online game application is a data download task. When the application interface of the online game application that is currently running is a game battle interface, the first terminal device can determine that the task being performed by the online game application is a game battle task.

[0184] In this embodiment, the first terminal device can obtain the name of the application interface from the source code corresponding to the application interface, and determine the application interface that is running in the foreground based on the name of the application interface. Alternatively, the first terminal device can extract keywords from the content of the application interface, and determine the application interface that is running in the foreground based on the extracted keywords.

[0185] It should be noted that the above-described method of determining the application interface of the foreground application by name acquisition or keyword extraction is only an exemplary interpretation and should not be construed as a limitation on the embodiments of this application. In the embodiments of this application, technicians can set specific determination methods according to actual scenarios to determine the application interface of the foreground application, and the embodiments of this application do not impose any limitations on this.

[0186] For example, the first terminal device can be configured with identification features corresponding to each task, and a field A indicating the task can be added to the data packet corresponding to the data to be transmitted or the data transmission request. When the first terminal device needs to transmit data with the target device, it can obtain the data packet corresponding to the data to be transmitted or the data packet corresponding to the data transmission request, and obtain the content of field A in that data packet. Subsequently, the first terminal device can match the content of field A with the identification features corresponding to each task. When the content of field A matches a certain identification feature, the first terminal device can determine the task corresponding to that identification feature as the task being executed by the foreground application. The data transmission request can be a request to obtain the data to be transmitted, or a request to send the data to be transmitted.

[0187] For example, when the Uniform Resource Locator (URL) in the data packet corresponding to the data to be transmitted or the data transmission request contains strings such as mp4, ts or flv, the first terminal device can determine that the data to be transmitted is video playback data, and thus determine that the task being performed by the foreground application is video playback.

[0188] In this embodiment, when the first terminal device needs to transmit data with the target device, the first terminal device can first determine the transmission performance of the default transmission path between the first terminal device and the target device. When the transmission performance of the default transmission path meets the transmission requirements of the data to be transmitted, the first terminal device can transmit the data to be transmitted through the default transmission path.

[0189] When the transmission performance of the default transmission path does not meet the transmission requirements of the data to be transmitted, the first terminal device can activate the converged routing function, that is, it can form a network with surrounding terminal devices to use the second terminal device with better transmission performance to assist the first terminal device in transmitting the data to be transmitted, thereby improving the data transmission rate of the first terminal device and / or reducing the data transmission latency of the first terminal device and improving the user experience.

[0190] It is understandable that transmission performance can be defined as latency and / or bandwidth. The transmission requirements corresponding to the data to be transmitted can be specifically configured by technical personnel according to the actual scenario. Furthermore, different transmission requirements can be set for different types of data to be transmitted.

[0191] For example, for latency-sensitive data to be transmitted, transmission requirements can be set according to the actual scenario (e.g., the maximum latency acceptable to the user). For instance, the transmission requirement can be set to a latency less than or equal to this maximum latency. Therefore, when the first terminal device determines that the latency corresponding to the default transmission path is greater than this maximum latency, the first terminal device can network with surrounding terminal devices to utilize surrounding second terminal devices with better transmission performance to assist the first terminal device in transmitting the data to be transmitted.

[0192] For example, for bandwidth-stable data to be transmitted, transmission requirements can be set according to the actual scenario (e.g., the minimum bandwidth acceptable to the user). For instance, the transmission requirement can be set to a bandwidth greater than or equal to this minimum bandwidth. Therefore, when the first terminal device determines that the bandwidth corresponding to the default transmission path is less than this minimum bandwidth, the first terminal device can network with surrounding terminal devices to utilize surrounding second terminal devices with better transmission performance to assist the first terminal device in transmitting the data to be transmitted.

[0193] In one possible implementation, when the first terminal device needs to transmit data, it can directly activate the converged routing function. This allows it to network with surrounding terminal devices and transmit data via a target transmission path with better transmission performance. This improves the data transmission rate and / or reduces the data transmission latency of the first terminal device, enhancing the user experience. In this case, the target transmission path can be the default transmission path corresponding to the first terminal device. That is, when the default transmission path has the best transmission performance, the first terminal device can transmit data via the default transmission path.

[0194] The following is a detailed explanation of the networking process for the first terminal device.

[0195] Please see Figure 5 , Figure 5 A schematic flowchart illustrating the networking provided in an embodiment of this application is shown. Figure 5 As shown, the networking process may include:

[0196] S501, the first terminal device sends a networking request to at least one third terminal device, wherein the third terminal device is a device whose distance from the first terminal device is less than or equal to a preset distance threshold.

[0197] S502. The third terminal device receives the networking request and determines whether to form a network with the first terminal device.

[0198] S503. When it is determined that the third terminal device will form a network with the first terminal device, the third terminal device sends a response message confirming the network formation to the first terminal device.

[0199] S504. After receiving the response information confirming the network formation, the first terminal device establishes a network connection with the third terminal device.

[0200] In this embodiment of the application, when the first terminal device determines that it needs to form a network, the first terminal device may send a network formation request to at least one third terminal device to request to establish a network connection with at least one third terminal device. Figure 5 The following example uses two third-party terminal devices for illustration.

[0201] It should be understood that a third terminal device is a terminal device that is less than or equal to a preset distance threshold from the first terminal device and is capable of data transmission with the target device. The preset distance threshold can be set by technicians based on the specific scenario, or it can be customized by the user. For example, the user can customize the preset distance threshold to any value such as 1 meter, 2 meters, or 5 meters.

[0202] A terminal device capable of transmitting data with a target device can refer to a terminal device that can directly transmit data with the target device, for example, the terminal device can be directly connected to the target device through a communication network; or it can refer to a terminal device that can indirectly transmit data with the target device, that is, the terminal device can be indirectly connected to the target device, for example, the terminal device can be connected to other terminal devices, and those other terminal devices can be connected to the target device.

[0203] Please see Figure 6 and Figure 7 , Figure 6 A schematic diagram of the networking application scenario provided in the embodiments of this application is shown. Figure 7 The diagram illustrates the network topology corresponding to the network relationship obtained by the network setup. This application scenario uses a laptop computer 500 as the first terminal device, and the laptop computer 500 needs to transmit data with the server 200 as an example for illustrative purposes.

[0204] When the converged routing function of the laptop 500 is activated, for example, when the transmission performance of the default transmission path between the laptop 500 and the server 200 does not meet the transmission requirements of the data to be transmitted, the laptop 500 can activate the converged routing function by default, or when the laptop 500 detects that the button for the converged routing function is triggered, the laptop 500 can determine that the converged routing function is activated. At this time, the laptop 500 can determine one or more terminal devices A that can be networked.

[0205] Among them, terminal device A can be a terminal device that is less than or equal to a preset distance threshold from the laptop 500 and can transmit data with the server 200.

[0206] It should be understood that terminal device A can be a terminal device that has established a connection with laptop 500 or a terminal device that has not established a connection with laptop 500.

[0207] like Figure 6 As shown in (a), assume that the terminal devices A identified by the laptop 500 include a mobile phone 600 and a smart screen 700. The mobile phone 600 can connect to the server 200 via a router 300 and a cellular base station 400, respectively, and the smart screen 700 can connect to the server 200 via a router 300. In this case, the laptop 500 can identify terminal devices B (i.e., mobile phone 600 and smart screen 700) that have not yet established a connection with the laptop 500, and can send networking requests to each terminal device B to request the establishment of a connection through the communication network.

[0208] The communication network can be a wireless network such as Bluetooth, WiFi, WiFi p2p, or UWB. For example, UWB bandwidth can be higher than WiFi p2p bandwidth, WiFi p2p bandwidth can be higher than WiFi bandwidth, and WiFi bandwidth can be higher than Bluetooth bandwidth.

[0209] It should be understood that the communication network connecting the laptop 500 and each terminal device B can be configured by the default settings of the laptop 500 or by the user.

[0210] For example, for any terminal device B, the laptop computer 500 can determine one or more communication networks that can be connected between the laptop computer 500 and the terminal device B, and can establish a connection with the terminal device B through each communication network. Alternatively, after determining one or more communication networks that can be connected between the laptop computer 500 and the terminal device B, the laptop computer 500 can determine the transmission performance of each communication network according to the service type corresponding to the data to be transmitted. That is, when the service type is latency-sensitive, the laptop computer 500 can determine the latency of each communication network; when the service type is bandwidth-stable, the laptop computer 500 can determine the bandwidth of each communication network. Subsequently, the laptop computer 500 can determine the communication network with the optimal transmission performance as the communication network connecting the laptop computer 500 and the terminal device B, so as to improve the data transmission speed of the laptop computer 500 and / or reduce the data transmission latency of the laptop computer 500.

[0211] Assume that neither the mobile phone 600 nor the smart screen 700 has established a connection with the laptop 500. For example... Figure 6As shown in (a), the laptop 500 can send a first networking request to the mobile phone 600 to request a connection with the mobile phone 600 via a communication network (e.g., Bluetooth), and at the same time, the laptop 500 can send a second networking request to the smart screen 700 to request a connection with the smart screen 700 via a communication network (e.g., WiFi).

[0212] like Figure 6 As shown in (b), after receiving the first network request, the mobile phone 600 can display a prompt window 601 on its screen. The prompt window 601 displays the message, "The laptop requests to establish a Bluetooth connection with you to assist in data transmission. Do you agree?" Simultaneously, the prompt window 601 can also display an "Agree" button 602 and an "Ignore" button 603. The "Agree" button 602 is used to agree to the laptop 500's network request, that is, to agree to establish a Bluetooth connection with the laptop 500 to assist in data transmission. The "Ignore" button 603 is used to reject the laptop 500's network request.

[0213] When the mobile phone 600 detects that the "Agree" button 602 has been clicked or touched, the mobile phone 600 can send a confirmation message to the laptop 500 to establish a network connection. After receiving the response message from the mobile phone 600, the laptop 500 can establish a Bluetooth connection between the laptop 500 and the mobile phone 600.

[0214] like Figure 6 As shown in (c), after the smart screen 700 receives the second network request, a prompt window 701 can pop up on the display interface of the smart screen 700. The prompt window 701 can display the message "The laptop requests to establish a WiFi connection with you to assist the laptop in data transmission. Do you agree?" At the same time, the prompt window 701 can also display an "Agree" button 702 and an "Ignore" button 703.

[0215] When the smart screen 700 detects that the "Agree" button 702 has been clicked or touched, the smart screen 700 can send a confirmation message to the laptop 500 to establish a network connection. After receiving the response message from the smart screen 700, the laptop 500 can establish a WiFi connection with the smart screen 700.

[0216] After the network is set up, the laptop 500 can obtain the network relationship, and the corresponding network topology diagram can be shown as follows: Figure 7As shown. It should be understood that the network topology records the relationships between the laptop 500, mobile phone 600, smart screen 700, and server 200. Subsequently, when network changes occur, such as when the laptop 500 establishes a connection with a new terminal device, or when the network connection of the mobile phone 600 or smart screen 700 is lost, the laptop 500 can promptly update the network topology.

[0217] It should be noted that for terminal device A, which has already established a connection with laptop 500 via a communication network (e.g., Bluetooth) before networking, if laptop 500 determines that it can also establish a connection with terminal device A via other communication networks (e.g., WiFi and UWB), laptop 500 can establish a connection with terminal device A via WiFi and UWB respectively. Alternatively, laptop 500 can change the communication network connected to terminal device A according to the transmission performance of each communication network (i.e., Bluetooth, WiFi, and UWB) and the service type corresponding to the data to be transmitted, so that laptop 500 can directly transmit data with terminal device A through a communication network with better transmission performance, thereby improving the data transmission speed and / or reducing the data transmission latency of laptop 500.

[0218] For example, when a terminal device A is already connected to a laptop 500 via Bluetooth, if the laptop 500 determines that it can also establish a connection with the terminal device A via WiFi, and the latency of WiFi is less than that of Bluetooth, the laptop 500 can change the communication network between the laptop 500 and the terminal device A from Bluetooth to WiFi. This allows the laptop 500 and the terminal device A to directly transmit data via WiFi, reducing the data transmission latency of the laptop 500.

[0219] In one possible implementation, when the laptop 500 needs to form a network, it can identify one or more terminal devices A that can be networked, and display the relevant information of each terminal device A on the laptop 500's display interface. This allows the user to select one or more terminal devices C from among the terminal devices A to network with the laptop 500 according to actual needs. At this time, the laptop 500 can send networking requests to each terminal device C individually to request the establishment of a connection with each terminal device C. In other words, the laptop 500 can form a network based on the user's selection, improving networking efficiency and enhancing the user experience.

[0220] In this embodiment of the application, after the network is established, the first terminal device can determine the target transmission path based on the service type corresponding to the data to be transmitted, and then transmit the data. The following provides a detailed description of S403 and the first terminal device determining the target transmission path based on the service type.

[0221] Specifically, when the service type corresponding to the data to be transmitted is latency-sensitive, the first terminal device can determine the target transmission path based on a distributed routing decision-making method. When the service type corresponding to the data to be transmitted is bandwidth-stable, the first terminal device can determine the target transmission path based on a centralized routing decision-making method.

[0222] The following will explain: (i) Determining the target transmission path based on the distributed routing decision method; (ii) Determining the target transmission path based on the centralized routing decision method.

[0223] (i) Determining the target transmission path based on the distributed routing decision-making method

[0224] Distributed routing decision-making refers to a method where each terminal device independently determines the routing decision for its corresponding data transmission device. For any given terminal device, the corresponding data transmission device is the device to which that terminal device will transmit data during data transmission. In other words, distributed routing decision-making allows each terminal device to independently decide which device to transmit its received data to. Therefore, in distributed routing decision-making, the target transmission path can be determined in real-time during data transmission or by sending a data transmission request. The following example, where a first terminal device needs to send data to a server, will illustrate distributed routing decision-making.

[0225] For example, when a first terminal device needs to send data to a server, it can determine one or more terminal devices D connected to it based on the network topology obtained from the network topology, and obtain all sub-paths (hereinafter referred to as sub-paths A) between the first terminal device and each terminal device D. Subsequently, the first terminal device can obtain the transmission performance (e.g., latency) corresponding to each sub-path A based on the service type (i.e., latency-sensitive) of the data to be transmitted, and can determine the terminal device E corresponding to the sub-path A with the lowest latency as the data to be transmitted to the first terminal device. That is, the first terminal device can determine terminal device E as a routing node in the target transmission path. At this time, the first terminal device can send the data to be transmitted and the corresponding service type to terminal device E through the sub-path A with the lowest latency, so that the data to be transmitted can be sent to the server through terminal device E.

[0226] After receiving the data to be transmitted and the corresponding service type, terminal device E can determine one or more terminal devices F connected to it (excluding the first terminal device transmitting the data to E) based on the network topology. It then obtains all sub-paths (hereinafter referred to as sub-paths B) between terminal device E and each terminal device F. Subsequently, terminal device E can obtain the latency corresponding to each sub-path B and determine the terminal device G corresponding to the sub-path B with the lowest latency as the device to be transmitted, i.e., terminal device G can be determined as a routing node in the target transmission path. At this point, terminal device E can send the data to be transmitted and the corresponding service type to terminal device G through the sub-path B with the lowest latency, so as to continue sending the data to be transmitted to the server through terminal device G.

[0227] Similarly, after receiving the data to be transmitted and the corresponding service type, terminal device G can determine one or more terminal devices H connected to terminal device G (excluding terminal device E that transmits the data to be transmitted to terminal device G) based on the network relationship obtained from the network topology. Then, based on the service type, terminal device G can determine the corresponding device J to be transmitted from terminal device G among terminal devices H, and send the data to be transmitted and the corresponding service type to device J. This allows device J to continue to determine the corresponding device to be transmitted, and so on, until the data to be transmitted is transmitted to the server.

[0228] It should be understood that the first terminal device can determine the latency of each sub-path A by sending probe messages to the corresponding terminal device D through each sub-path A. For example, the first terminal device can determine the latency of each sub-path A based on the round-trip time (RTT) corresponding to each probe message. Here, RTT is the time it takes for the probe message to travel from the first terminal device to the terminal device D, plus the time it takes for the terminal device D to send a response message back to the first terminal device based on the probe message.

[0229] For example, the first terminal device can periodically send probe messages to determine the latency of each sub-path A. The sending period of the probe messages can be specifically set by technicians according to the actual scenario, and this application embodiment does not impose any restrictions on this.

[0230] Similarly, terminal device E can periodically send probe messages to the corresponding terminal device F through each sub-path B to determine the latency corresponding to each sub-path B. Other terminal devices, such as terminal device G, can also periodically send probe messages to determine the latency corresponding to each sub-path of terminal device G.

[0231] In one possible implementation, when a terminal device selects a transmission device, if a candidate device (i.e., a terminal device connected to that terminal device) detects that its transmission performance is poor (e.g., latency exceeds a preset threshold), the candidate device can send a notification to the terminal device, informing it that its transmission performance is too poor to meet the transmission requirements of the data to be transmitted. This allows the terminal device to quickly select another device with better transmission performance as the transmission device, thereby improving the speed of determining the target transmission path and reducing the transmission latency of the data. The preset threshold can be set by technicians based on the specific scenario.

[0232] It should be understood that the transmission performance of the candidate device can be the transmission performance between the candidate device and the terminal device, or it can be the transmission performance between the candidate device and other devices connected to the candidate device, wherein the other devices connected to the candidate device may not include the terminal device.

[0233] For example, when terminal device M selects a device to transmit to, if the candidate device N corresponding to terminal device M (wherein, in addition to being connected to terminal device M, candidate device N can also be connected to terminal device S and terminal device R) detects that the transmission performance between candidate device N and terminal device M is poor, and / or detects that the transmission performance between candidate device N and terminal device S, as well as the transmission performance between candidate device N and terminal device R, are both poor, candidate device N can send a prompt message to terminal device M to inform terminal device M that its transmission performance is poor.

[0234] For example, the transmission performance of the candidate device can be determined based on the latency of the transmitted data. For instance, the transmission performance of the candidate device can be determined based on the latency of the data transmitted between the candidate device and the terminal device before the terminal device selects a transmission device. When the candidate device determines that the latency of the transmitted data is greater than a preset threshold, the candidate device can determine that its transmission performance is poor.

[0235] For example, the candidate device can detect the latency between itself and the corresponding device (such as the terminal device and / or other devices connected to the candidate device) to determine its transmission performance. When the latency between the candidate device and the terminal device is determined to be greater than a preset threshold based on the probe message, and / or when the latency between the candidate device and all other devices connected to the candidate device is determined to be greater than the preset threshold, the candidate device can determine that its transmission performance is poor.

[0236] For example, when the first terminal device selects a device to transmit data, if a terminal device D determines that the latency of the data transmitted between terminal device D and the first terminal device is greater than a preset threshold, terminal device D can determine that its own transmission performance is poor. At this time, terminal device D can send a prompt message to the first terminal device to inform it that its transmission performance cannot meet the transmission requirements, so that the first terminal device can quickly determine other terminal devices D that meet the transmission requirements to transmit data, thereby reducing the transmission latency of the data to be transmitted.

[0237] For example, when terminal device E selects a device to transmit data, if a terminal device F discovers through a probe message that the latency of terminal device F and all other devices connected to terminal device F, such as terminal device G and terminal device H, is greater than a preset threshold, terminal device F can determine that its own transmission performance is poor. Terminal device F can then send a prompt message to terminal device E to inform terminal device E that its transmission performance cannot meet the transmission requirements. This allows terminal device E to quickly identify other terminal devices that meet the transmission requirements for data transmission, thereby reducing the transmission latency of the data to be transmitted.

[0238] The following example illustrates the distributed routing decision-making method using specific application scenarios.

[0239] Please see Figure 8 , Figure 8 This application illustrates an application scenario provided by an embodiment of the present application. Figure 1 In this application scenario, the first terminal device is a laptop computer 500. The laptop computer 500 needs to send data to the server 200, and the network topology corresponding to the network relationship established by the laptop computer 500 through networking is as follows: Figure 8 As shown.

[0240] When the laptop 500 is engaged in a game battle in an online game application, the laptop 500 needs to send its real-time battle data to the server 200. At this time, the laptop 500 can determine that the service type corresponding to the real-time battle data is latency-sensitive. Therefore, the laptop 500 can determine the latency T1 of the sub-path between the laptop 500 and the router 300, and can determine the latency T2 of the sub-path between the laptop 500 and the mobile phone 600.

[0241] like Figure 8 As shown, assuming T1 is 15ms and T2 is 10ms, that is, T2 is less than T1. Therefore, the laptop 500 can identify the mobile phone 600 as the device to be transmitted, that is, the laptop 500 can send the real-time battle data and the corresponding service type (i.e., latency-sensitive type) to the mobile phone 600.

[0242] It should be understood that when the laptop 500 and the mobile phone 600 are connected through multiple communication networks, that is, when there are multiple sub-paths between the laptop 500 and the mobile phone 600, the laptop 500 can obtain the latency of each sub-path separately, and can determine the sub-path corresponding to the minimum latency as the final sub-path between the laptop 500 and the mobile phone 600. That is, the laptop 500 can determine the minimum latency as T2. Therefore, when the laptop 500 determines that the mobile phone 600 is the device to be transmitted, the laptop 500 can send the real-time battle data and the corresponding service type to the mobile phone 600 through the sub-path corresponding to the minimum latency.

[0243] After receiving the real-time battle data and the corresponding service type, mobile phone 600 can determine the latency T3 of the sub-path between mobile phone 600 and router 300, and the latency T4 of the sub-path between mobile phone 600 and cellular base station 400.

[0244] like Figure 8 As shown, assuming T3 is 10ms and T4 is 20ms, that is, T3 is less than T4. Therefore, mobile phone 600 can identify router 300 as the device to be transmitted, that is, mobile phone 600 can send the real-time battle data to server 200 through router 300.

[0245] Therefore, the final target transmission path for transmitting this real-time battle data is: Laptop 500 -> Mobile Phone 600 -> Router 300 -> Server 200. Subsequently, Laptop 500 can continue to send real-time battle data to Server 200 or receive real-time battle data sent by other terminals from Server 200 via the target transmission path (i.e., Laptop 500 -> Mobile Phone 600 -> Router 300 -> Server 200) until Laptop 500 detects a switching command or detects that the target transmission path cannot transmit data. When a switching command is detected or the target transmission path cannot transmit data, Laptop 500 can determine a new target transmission path based on the new real-time battle data to transmit the new real-time battle data. Alternatively, when transmitting new real-time battle data later, Laptop 500 can also directly determine a new target transmission path based on the new real-time battle data to transmit the new real-time battle data.

[0246] (ii) Determining the target transmission path based on the centralized routing decision-making method

[0247] Centralized routing decision-making refers to a routing decision-making method in which the first terminal device determines the complete transmission path, that is, the first terminal device determines all routing nodes in the target transmission path. The following will illustrate centralized routing decision-making using the example of the first terminal device sending data to be transmitted to the server.

[0248] For example, when a first terminal device needs to send data to be transmitted to a server, the first terminal device can determine all possible candidate transmission paths between the first terminal device and the server based on the network topology obtained from the network topology. Subsequently, the first terminal device can determine the transmission performance (e.g., bandwidth) corresponding to each candidate transmission path based on the service type (i.e., bandwidth-stable) corresponding to the data to be transmitted, and determine the target transmission path based on the bandwidth.

[0249] After determining the target transmission path, the first terminal device can send notification information to all terminal devices along the target transmission path to inform each terminal device of the selected target transmission path. This allows each terminal device to prepare for routing (e.g., modifying its routing table) to assist the first terminal device in transmitting the data to be transmitted. Subsequently, the first terminal device can send the data to be transmitted to its corresponding receiving device. The receiving device can then continue transmitting the data according to the target transmission path until the data reaches the server.

[0250] It should be understood that for each candidate transmission path, the candidate transmission path may include one or more sub-paths. A sub-path refers to the path between two adjacent devices within the candidate transmission path. In one example, the first terminal device can obtain the duty cycle, packet loss rate, radio bandwidth, and signal-to-noise ratio of each sub-path in the candidate transmission path, and determine the bandwidth of each sub-path based on these parameters. Subsequently, the first terminal device can determine the bandwidth of the candidate transmission path based on the bandwidth of each sub-path. For example, the first terminal device can determine the minimum bandwidth among the sub-paths as the bandwidth of the candidate transmission path.

[0251] In one possible implementation, for any sub-path, the first terminal device can determine the bandwidth of the sub-path according to the following formula:

[0252]

[0253] R = B log2(1+SNR) bit / s;

[0254] Where Chload is the duty cycle of the sub-path, Ploss is the packet loss rate of the sub-path, B is the radio bandwidth of the sub-path, and SNR is the signal-to-noise ratio of the sub-path.

[0255] The centralized routing decision-making method will be illustrated below with specific application scenarios.

[0256] Please see Figure 9 , Figure 9 This application illustrates an application scenario provided by an embodiment of the present application. Figure 2 In this application scenario, the first terminal device can be a laptop 500. The laptop 500 needs to send data to the server 200, and the network topology corresponding to the network relationship established by the laptop 500 through networking is as follows: Figure 9 As shown.

[0257] When laptop 500 is running a cloud storage application and needs to upload images to server 200, laptop 500 can determine that the service type corresponding to the data to be transmitted is bandwidth-stable. Therefore, laptop 500... Figure 9 The network topology shown can determine all possible candidate transmission paths between laptop 500 and server 200. Specifically, the determined candidate transmission paths can include: laptop 500->router 300->server 200, laptop 500->router 300->mobile phone 600->cellular base station 400->server 200, laptop 500->mobile phone 600->router 300->server 200, and laptop 500->mobile phone 600->cellular base station 400->server 200. When there are multiple sub-paths between laptop 500 and mobile phone 600, the sub-path between them can be the one with the largest bandwidth.

[0258] For any candidate transmission path, the laptop computer 500 can obtain the duty cycle, packet loss rate, wireless bandwidth, and signal-to-noise ratio of each sub-path within that candidate transmission path, thus obtaining the bandwidth of that sub-path. For example... Figure 9 As shown, assume the bandwidth of the sub-path between laptop 500 and mobile phone 600 is 4Mbps, the bandwidth of the sub-path between mobile phone 600 and cellular base station 400 is 4Mbps, the bandwidth of the sub-path between cellular base station 400 and server 200 is 4Mbps, the bandwidth of the sub-path between mobile phone 600 and router 300 is 3Mbps, the bandwidth of the sub-path between laptop 500 and router 300 is 5Mbps, and the bandwidth of the sub-path between router 300 and server 200 is 2Mbps.

[0259] At this point, laptop 500 can determine that the bandwidth of the transmission path from laptop 500 to router 300 to server 200 is 2 Mbps, the bandwidth of the transmission path from laptop 500 to router 300 to mobile phone 600 to cell tower 400 to server 200 is 3 Mbps, the bandwidth of the transmission path from laptop 500 to mobile phone 600 to router 300 to server 200 is 2 Mbps, and the bandwidth of the transmission path from laptop 500 to mobile phone 600 to cell tower 400 to server 200 is 4 Mbps. Therefore, laptop 500 can determine the target transmission path as: laptop 500 -> mobile phone 600 -> cell tower 400 -> server 200.

[0260] Subsequently, the laptop 500 can send a notification message to the mobile phone 600, and can also send the image to the mobile phone 600. The notification message informs the mobile phone 600 to send the image to the server 200 via the cellular base station 400. After receiving the notification message, the mobile phone 600 can adjust its routing table, setting the transmission device to the cellular base station 400. Upon receiving the image later, the mobile phone 600 can forward the image to the cellular base station 400, so that the image can be sent to the server 200 via the cellular base station 400.

[0261] In this embodiment of the application, after the first terminal device completes the transmission of the data to be transmitted based on the target transmission path, or after the application or task corresponding to the data to be transmitted stops, the first terminal device can turn off the converged routing function and send a converged routing stop message to all devices in the network relationship to inform each device that it can stop forwarding data.

[0262] The data transmission method provided in the embodiments of this application will be illustrated below with reference to specific application scenarios.

[0263] For example, when an online game application is running in the foreground of the first terminal device and the online game application is performing a game battle, it indicates that the first terminal device needs to send real-time battle data to the server. At this time, the first terminal device can determine that the service type corresponding to the real-time battle data is latency-sensitive. Therefore, the first terminal device can determine the target transmission path A according to the distributed routing decision method to transmit the real-time battle data to the server.

[0264] Subsequently, when the first terminal device is redirected to the version update interface based on the version update prompt in the pop-up window, it indicates that the first terminal device needs to download the new version data of the online game application from the server. At this time, the first terminal device can determine that the service type corresponding to the new version data is bandwidth stable. Therefore, the first terminal device can determine the target transmission path B to obtain the new version data from the server according to the centralized routing decision method.

[0265] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0266] Corresponding to the data transmission method described in the above embodiments, this application also provides a data transmission device, the various modules of which can implement the various steps of the data transmission method.

[0267] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0268] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0269] This application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the terminal device to implement the steps in any of the above-described method embodiments. For example, the structure of the terminal device can be as follows: Figure 2 As shown.

[0270] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the steps in any of the above method embodiments.

[0271] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps in any of the above method embodiments.

[0272] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable storage media cannot be electrical carrier signals or telecommunication signals.

[0273] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0274] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0275] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0276] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0277] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A data transmission method, characterized in that, Applied to a first terminal device, the method includes: The first terminal device obtains a data transmission request, which is used to request the transmission of data to be transmitted with the target device. The first terminal device determines the service type corresponding to the data to be transmitted; The first terminal device determines a target transmission path based on the service type. The target transmission path includes at least one second terminal device, which is communicatively connected to the first terminal device and also communicatively connected to the target device. The first terminal device transmits the data to be transmitted to the target device through the target transmission path; Wherein, the terminal device determines the target transmission path according to the service type, including: When the service type is latency-sensitive, the first terminal device determines the target transmission path according to a distributed routing decision method. When the service type is bandwidth stable, the first terminal device determines the target transmission path according to the centralized routing decision method.

2. The method according to claim 1, characterized in that, The first terminal device determines the service type corresponding to the data to be transmitted, including: The first terminal device determines the application corresponding to the data to be transmitted, and determines the service type corresponding to the data to be transmitted based on the application.

3. The method according to claim 1, characterized in that, The first terminal device determines the service type corresponding to the data to be transmitted, including: The first terminal device determines the task corresponding to the data to be transmitted, and determines the service type corresponding to the data to be transmitted based on the task.

4. The method according to claim 3, characterized in that, The first terminal device determines the task corresponding to the data to be transmitted, including: The first terminal device obtains the application interface of the application corresponding to the data to be transmitted, which is currently running, and determines the task corresponding to the data to be transmitted based on the application interface.

5. The method according to any one of claims 1 to 4, characterized in that, The first terminal device determines the target transmission path according to the service type, including: The first terminal device determines the default transmission path between the first terminal device and the target device; The first terminal device determines the first transmission performance corresponding to the default transmission path based on the service type. When the first transmission performance does not meet the transmission requirements corresponding to the service type, the first terminal device determines the target transmission path according to the service type.

6. The method according to any one of claims 1 to 5, characterized in that, Before the first terminal device determines the target transmission path based on the service type, the method further includes: The first terminal device sends a networking request to at least one third terminal device, wherein the at least one third terminal device is a device whose distance from the first terminal device is less than or equal to a preset distance threshold. In response to the network confirmation message returned by the fourth terminal device, the first terminal device establishes a network connection with the fourth terminal device, wherein the fourth terminal device is one or more of the at least one third terminal device.

7. The method according to claim 6, characterized in that, The first terminal device establishes a network connection with the fourth terminal device, including: The first terminal device determines the communication network for establishing a network connection with the fourth terminal device based on the service type; The first terminal device establishes a network connection with the fourth terminal device based on the communication network.

8. The method according to any one of claims 1 to 7, characterized in that, The first terminal device determines the target transmission path according to a distributed routing decision method, including: The first terminal device determines at least one fifth terminal device connected to the first terminal device; The first terminal device determines the time delay between the first terminal device and the at least one fifth terminal device; The first terminal device determines the device to be transmitted from the at least one fifth terminal device based on the delay, and sends the service type to the device to be transmitted to instruct the device to be transmitted to become a new first terminal device after receiving the service type, and returns to execute the step of determining at least one fifth terminal device connected to the first terminal device and subsequent steps, until the finally determined device to be transmitted is the target device. The first terminal device determines the target transmission path based on all the devices to be transmitted.

9. The method according to claim 8, characterized in that, The latency-sensitive services include video playback, web browsing, or game battles.

10. The method according to any one of claims 1 to 7, characterized in that, The first terminal device determines the target transmission path according to a centralized routing decision method, including: The first terminal device determines all candidate transmission paths between the first terminal device and the target device; The first terminal device determines the bandwidth corresponding to each of the candidate transmission paths; The first terminal device determines the target transmission path based on the bandwidth, and the target transmission path is one of the candidate transmission paths.

11. The method according to claim 10, characterized in that, The first terminal device determines the bandwidth corresponding to each of the candidate transmission paths, including: For each candidate transmission path, the first terminal device determines each sub-path corresponding to the candidate transmission path; The first terminal device obtains the bandwidth corresponding to each of the sub-paths; The first terminal device determines the minimum bandwidth corresponding to each of the sub-paths as the bandwidth corresponding to the candidate transmission path.

12. The method according to claim 10 or 11, characterized in that, The bandwidth-stable services include data uploading or data downloading.

13. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the terminal device to implement the data transmission method as described in any one of claims 1 to 12.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a computer, it causes the computer to implement the data transmission method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data transmission method and UE

    CN107211340A

  • Method and equipment for transmitting data and computer program product

    CN110391982A