CN114745451B - Data transmission method and device, electronic equipment and computer readable medium - Google Patents

Data transmission method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN114745451B
CN114745451B CN202210445715.2A CN202210445715A CN114745451B CN 114745451 B CN114745451 B CN 114745451B CN 202210445715 A CN202210445715 A CN 202210445715A CN 114745451 B CN114745451 B CN 114745451B
Authority
CN
China
Prior art keywords
data
transmission
transmitted
queue
transmission link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210445715.2A
Other languages
Chinese (zh)
Other versions
CN114745451A (en
Inventor
林锦隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210445715.2A priority Critical patent/CN114745451B/en
Publication of CN114745451A publication Critical patent/CN114745451A/en
Application granted granted Critical
Publication of CN114745451B publication Critical patent/CN114745451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The disclosure provides a data transmission method, a data transmission device, electronic equipment and a computer readable medium, and relates to the technical field of communication. The method comprises the following steps: establishing a wired data transmission link with a second terminal device, and establishing a wireless data transmission link with the second terminal device, wherein the wireless data transmission link comprises one or more transmission channels; responding to a data transmission instruction, acquiring first transmission data and second transmission data in data to be transmitted, wherein the data volume of the first transmission data is larger than that of the second transmission data; and transmitting the second transmission data to the second terminal equipment side through the wired data transmission link. The method and the device can improve the data transmission rate between the terminal devices and the utilization rate of the transmission link.

Description

Data transmission method and device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a data transmission method, a data transmission device, an electronic apparatus, and a computer readable medium.
Background
The data transmission is to transmit data from a data source to a data terminal according to a certain procedure so as to realize information transmission and exchange between terminal devices. The terminal devices may transmit documents, pictures, video, audio and even application data of the terminal devices between the terminal devices by means of a wireless communication connection, such as a Wi-Fi (WIRELESS FIDELITY ) connection, a bluetooth connection, or by means of establishing a wired communication connection. However, with rapid development and wide application of the communication technology field, the requirements of users on the data transmission rate are higher and higher, and the related technology cannot meet the requirements of the users.
Disclosure of Invention
The present disclosure aims to provide a data transmission method, a data transmission device, an electronic apparatus, and a computer readable medium, so as to improve the data transmission rate between terminal apparatuses and the utilization rate of a transmission link at least to some extent.
According to a first aspect of the present disclosure, there is provided a data transmission method applied to a first terminal device, including: establishing a wired data transmission link with a second terminal device, and establishing a wireless data transmission link with the second terminal device, wherein the wireless data transmission link comprises one or more transmission channels; responding to a data transmission instruction, and acquiring first transmission data and second transmission data in data to be transmitted, wherein the data volume of the first transmission data is larger than that of the second transmission data; and sending the first transmission data to the second terminal equipment through the wired data transmission link, and sending the second transmission data to the second terminal equipment through the wireless data transmission link.
According to a second aspect of the present disclosure, there is provided a data transmission apparatus applied to a first terminal device, including: the connection establishment module is used for establishing a wired data transmission link with the second terminal equipment and establishing a wireless data transmission link with the second terminal equipment, wherein the wireless data transmission link comprises one or more transmission channels; the data processing module is used for responding to a data transmission instruction, acquiring first transmission data and second transmission data in data to be transmitted, wherein the data volume of the first transmission data is larger than that of the second transmission data; and the transmission module is used for sending the first transmission data to the second terminal equipment through the wired data transmission link and sending the second transmission data to the second terminal equipment through the wireless data transmission link.
According to a third aspect of the present disclosure, there is provided an electronic apparatus, comprising: a processor; and a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the methods described above.
According to a fourth aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
According to the data transmission method, the data transmission device, the electronic equipment and the computer readable medium, the wired data transmission link and the wireless data transmission link are independent of each other, the process of transmitting first transmission data between the first terminal equipment and the second terminal equipment through the wired data transmission link is independent of the wireless data transmission link between the first terminal equipment and the second terminal equipment, the process of transmitting second transmission data between the first terminal equipment and the second terminal equipment through the wireless data transmission link is independent of the wired data transmission link between the first terminal equipment and the second terminal equipment, and the wired data transmission link and the wireless data transmission link jointly process data to be processed, so that the data transmission rate is improved, even if one transmission link in the wired data transmission link or the wireless data transmission link is abnormal in the data transmission process, the other transmission link can still normally transmit data, and therefore robustness and stability of data transmission are ensured. The data is transmitted in a wired data transmission link mode, the problems that the wireless data transmission link is easily affected by physical environment and the transmission rate is unstable are solved, because the wired data transmission link is serial transmission, if smaller data is sent, a large amount of time is consumed in the data transmission process in the process of opening the data to be transmitted and reading the content of the data to be transmitted, therefore, the data with larger data volume is transmitted through the wired data transmission link, the frequent execution of the data transmission process is avoided, the utilization rate of the wired data transmission link is improved, the data with smaller data volume is transmitted by combining the wireless data transmission link, all transmission channels of the embodiment of the present disclosure are full-load transmission, and the data transmission efficiency between terminal devices is improved and the user experience is improved through the mutual complementation of the transmission performance between the two channels.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
Fig. 2 schematically illustrates a flow chart of a data transmission method in an exemplary embodiment of the present disclosure;
Fig. 3 schematically illustrates a schematic diagram of acquiring second transmission data corresponding to a wireless data transmission channel in parallel in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of an implementation of a data transmission policy for data to be transmitted in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a diagram of partitioning a data queue in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates another diagram of partitioning a data queue in an exemplary embodiment of the present disclosure;
Fig. 7 schematically illustrates a schematic diagram of allocating first transmission data and second transmission data in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow chart of another implementation of a data transmission policy for data to be transmitted in an exemplary embodiment of the present disclosure;
fig. 9 schematically illustrates a schematic diagram of acquiring first/second transmission data from ordered data to be transmitted in an exemplary embodiment of the present disclosure;
Fig. 10 schematically illustrates a process flow diagram of a wired data transmission process in an exemplary embodiment of the present disclosure;
Fig. 11 schematically illustrates a flow chart for establishing a wireless data transmission link and a wired data transmission link in an exemplary embodiment of the present disclosure
Fig. 12 schematically illustrates a composition diagram of a data transmission device in an exemplary embodiment of the present disclosure;
fig. 13 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram of a system architecture of an exemplary application environment to which a data transmission method and apparatus of an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include at least terminal devices 101, 102 and a network 103. The network 103 serves as a medium providing at least a communication link between the terminal devices 101, 102. Network 103 may include wired, one or more wireless communication links, and the like. The terminal devices 101, 102 may be a variety of electronic devices having data transfer capabilities including, but not limited to, smart phones, smart watches, desktop computers, portable computers, tablet computers, and the like. It should be understood that the number of terminal devices, networks in fig. 1 is merely illustrative. Any number of terminal devices, networks, may also be added as desired for implementation. The data transmission method provided by the embodiments of the present disclosure is generally performed in the terminal devices 101, 102, and accordingly, the data transmission apparatus is generally provided in the terminal devices 101, 102. For example, after the wired data transmission link and the wireless data transmission link between the terminal devices 101 and 102 are established, the data transmission method provided in the embodiments of the present disclosure may be executed by the terminal device 101, the data to be transmitted in the terminal device 101 is sent to the terminal device 102 through the wired data transmission link and the wireless data transmission link, and received by the terminal device 102, and correspondingly, the data transmission method provided in the embodiments of the present disclosure may also be executed by the terminal device 102, and the data to be transmitted in the terminal device 102 is sent to the terminal device 101 through the wired data transmission link and the wireless data transmission link, and received by the terminal device 101.
In the related art, the terminal device supports data transmission through a cellular network module, and can also realize data transmission through a local area network communication module, such as a Wi-Fi module, a Bluetooth module, and the like, however, in a manner of performing data transmission through such wireless connection, the data transmission rate is easily affected by the physical environment of the current transmission to cause unstable transmission rate, for example, when a large number of wireless networks exist in the current use environment, the data transmission rate between the terminal devices is greatly reduced, the data transmission rate may even be reduced to 1/10 of the normal transmission rate, and the data transmission rate is limited by the wireless throughput rate of the terminal device. The terminal devices are connected by a universal serial bus USB, but the data transmission rate is limited by the USB transmission rate, for example, the USB 2.0 transmission rate is 20M/s, the USB 3.0 transmission rate is 40M/s, and the terminal devices can only transmit data in a serial manner by the wired connection mode, so that the terminal devices consume a lot of time to continuously open the data to be transmitted, read the content to be transmitted, and consume more time if smaller data to be transmitted is sent by the wired data transmission connection, thereby reducing the utilization rate of the wired data transmission link and limiting the data transmission rate.
In view of one or more of the problems described above, example embodiments of the present disclosure provide a data transmission method. The data transmission method may be applied to one or more of the above-described terminal apparatuses 101, 102, which is not particularly limited in the present exemplary embodiment. Referring to fig. 2, the data transmission method may include the following steps S210 to S230:
In step S210, a wired data transmission link with the second terminal device is established, and a wireless data transmission link with the second terminal device is established.
In embodiments of the present disclosure, a wireless data transmission link may include one or more transmission channels, which may be used for data transmission in parallel when the wireless data transmission link is a plurality of transmission channels. For convenience of distinction, the data transmitting device is denoted as a first terminal device, the data receiving device is denoted as a second terminal device, i.e. the first terminal device may first establish a wired data transmission link with the second terminal device and a wireless data transmission link with the second terminal device, wherein the wired data transmission link and the wireless data transmission link are independent from each other. For example, a wired data transmission link is established between the device a and the device B, and a wireless data transmission link is established, when the device a is to send data to be transmitted to the device B, the device a is used as a first terminal device, and the device B is used as a second terminal device; accordingly, when the device B sends data to be transmitted to the device a, the device B serves as a first terminal device, and the device a serves as a second terminal device, that is, in the embodiment of the present disclosure, the first terminal device and the second terminal device are relative concepts, not absolute concepts.
In addition to the first terminal device and the second terminal device establishing the wired data transmission link and the wireless data transmission link, only the wired data transmission link between the first terminal device and the second terminal device, or only the wireless data transmission link between the first terminal device and the second terminal device may be established according to the actual data transmission scenario. That is, in the embodiment of the present disclosure, the data transmitting apparatus and the data receiving apparatus may switch between the double link data transmission and the single link data transmission.
In some possible embodiments, the first terminal device may first establish a wired data transmission link with the second terminal device, and during data transmission through the wired data transmission link, establish a wireless data transmission link between the first terminal device and the second terminal device, and thereafter switch the single-link data transmission (wired data transmission) to dual-link data transmission. Correspondingly, the first terminal device may first establish a wireless data transmission link with the second terminal device, and establish a wired data transmission link between the first terminal device and the second terminal device in the process of performing data transmission through the wireless data transmission link, and thereafter, switch the single-link data transmission (wireless data transmission) to the dual-link data transmission.
In some possible embodiments, the wired data transmission link or the wireless data transmission link may be disconnected when the first terminal device and the second terminal device perform dual-link data transmission through the wired and wireless data transmission links, and thereafter, the dual-link data transmission is switched to the single-link data transmission (wireless data transmission or wired data transmission).
It is noted that, when transmitting data through the dual link, the number of transmission channels included in the wireless data transmission link may be switched to one or more according to the actual transmission scenario. For example, when the number of transmission channels of the wired data transmission link is one, in order to increase the utilization rate of the wired data transmission link, the number of transmission channels included in the wireless data transmission link may be plural in order to transmit data having a smaller data amount in parallel through the plural transmission channels, and when data is transmitted through only one wireless data transmission channel, the number of transmission channels of the wireless data transmission link may be one, which is not particularly limited in the embodiment of the present disclosure.
When the dual-link data transmission is adopted between the terminal devices, the sequence of establishing the wired data transmission link and the wireless data transmission link is not particularly limited, the wired data transmission link can be established first, the wireless data transmission link can be established again, the wireless data transmission link can be established first, the wired data transmission link can be established again, and the wired/wireless data transmission link can be established simultaneously.
By the embodiment of the disclosure, a wired data transmission link and a wireless data transmission link comprising one or more transmission channels are established between the first terminal equipment and the second terminal equipment, so that the subsequent data transmission can be conveniently performed through the wired data transmission link and the wireless data transmission link, and the terminal equipment can be switched between single/double-link data transmission to meet different data transmission requirements.
In step S220, in response to the data transmission instruction, first transmission data and second transmission data in the data to be transmitted are acquired, wherein the data amount of the first transmission data is larger than the data amount of the second transmission data.
In embodiments of the present disclosure, the data transmission instruction may be an instruction triggered by a user using the first terminal device, e.g. by clicking, sliding a virtual object of the terminal device interface, panning, rotating or shaking the terminal device, etc. Although there is no dependency between the wired data transmission link and the wireless data transmission link, the data transmission processes between the wired data transmission link and the wireless data transmission link do not interfere with each other, in the embodiment of the disclosure, the wired data transmission link and the wireless data transmission link share data to be transmitted, and according to a preset data transmission policy, corresponding first transmission data/second transmission data are respectively obtained from the shared data to be transmitted, so that the first transmission data are sent to the second terminal device through the wired data transmission link, and the second transmission data are sent through the wireless data transmission link. The data to be transmitted is obtained through the cooperative coordination of the wired data transmission link and the wireless data transmission link so as to meet different data transmission requirements and improve the data transmission rate.
In an exemplary embodiment of the present disclosure, the number of transmission channels of the wireless data transmission link is greater than the number of transmission channels of the wired data transmission link, and the second transmission data having a smaller data amount is transmitted through the wireless data transmission link having a larger transmission channel, and the first transmission data having a larger data amount is transmitted through the wired data transmission link having a smaller transmission channel. The data transmission process at least comprises the steps of opening the data to be transmitted and reading the content of the data to be transmitted, and then sending the data to be transmitted, if the data with smaller data quantity is transmitted through the wired data transmission link, the data transmission process is required to be frequently executed, so that the channel utilization rate of the wired data transmission link is low, and the data transmission process is executed in parallel through more transmission channels of the wireless data transmission link, so that the time consumed by opening the data to be transmitted and reading the content to be transmitted in the data transmission process of the wired data transmission link is balanced, and the channel utilization rate of the wired and wireless data transmission links is improved.
Since the wireless data transmission link may include a plurality of transmission channels, in response to the data transmission instruction, in step S220, the second transmission data among the data to be transmitted may be acquired in parallel so as to be transmitted to the second terminal device in parallel through the plurality of transmission channels in the wireless data transmission link. As shown in fig. 3, in an exemplary embodiment of the present disclosure, second transmission data corresponding to a wireless data transmission channel is obtained in parallel, in a data transmission process, in a wired data transmission link portion, first transmission data is obtained from data to be transmitted through a wired data transmission link a, in a wireless data transmission link portion, second transmission data (1, 2,3 … … n) is obtained from data to be transmitted in parallel through a plurality of transmission channels (b 1, b2, b3 … … bn), and in combination with the wired/wireless data transmission link, the data transmission amount per unit time is increased.
Because the wired data transmission link is serial transmission, the process of sending the data to be transmitted by the first terminal device includes opening the data to be transmitted, reading the content of the data to be transmitted and sending the data to be transmitted, if the data with smaller data quantity is transmitted through the wired data transmission link, the first terminal device will consume more time in continuously opening and reading the data, and the channel utilization rate of the wired data transmission link is lower. Correspondingly, based on the wireless data transmission link, a plurality of data to be transmitted can be sent to the second terminal device in parallel through a plurality of transmission channels, namely, the opening and reading operations of the plurality of data to be transmitted can be simultaneously carried out through a transmission mode of the plurality of transmission channels, so that the data with smaller data quantity is preferentially processed through the wireless data transmission link, the data with larger data quantity is preferentially processed through the wired data transmission connection, and the channel utilization rate and the data transmission rate of the wired data transmission link can be improved. Therefore, in the embodiment of the disclosure, data with larger data volume is obtained as the first transmission data to be transmitted through the wired data transmission link, the second transmission data with smaller data volume is preferentially transmitted through the plurality of transmission channels of the wireless data transmission link, the transmission link is prevented from presenting an idle state, the wired data transmission link and the wireless data transmission link are fully utilized to carry out full-load transmission, and the data transmission rate is improved.
It should be noted that, in order to distinguish the data to be transmitted with different data sizes, the data with larger data size is recorded as the first transmission data, the data with smaller data size is recorded as the second transmission data, that is, the data size of the first transmission data is larger than the data size of the second transmission data, and the types, formats and the like of the first transmission data and the second transmission data may be different or the same, that is, the "first" and the "second" are only identifiers for distinguishing, and are not limited to the specific number, the specific type and the like of the data to be transmitted.
In step S230, the first transmission data is transmitted to the second terminal device via the wired data transmission link, and the second transmission data is transmitted to the second terminal device via the wireless data transmission link.
In an embodiment of the present disclosure, the first transmission data is sent to the second terminal device through a wired data transmission link, and the second transmission data is sent to the second terminal device through a wireless data transmission link.
Wherein the first transmission data and the second transmission data may be transmitted in parallel to the second terminal device through the wired data transmission link and the wireless data transmission link, where "in parallel" is used to indicate that transmission operations for different data among the data to be transmitted are simultaneously performed through the wired data transmission link and the wireless data transmission link, there may be a case where the amount of the data to be transmitted finally transmitted through the wired data transmission link and the wireless data transmission link is different, that is, the first amount of the first transmission data transmitted through the wired data transmission link is different from the second amount of the second transmission data transmitted through the wireless data transmission link, since at least one of the types, the data amount sizes, the transmission rates of the wired data transmission link, and the transmission rates of the wireless data transmission link may be different. For example, the data to be transmitted includes 128 files (including but not limited to audio, video, pictures, files and application data), and after the double link data transmission through the wired and wireless data transmission links, 50 files are transmitted to the second terminal device through the wired data transmission link, and 78 files are transmitted to the second terminal device through the wireless data transmission link. Of course, in some possible embodiments, if the wired data transmission link is abnormal or the transmission rate is lower than the preset rate threshold, the method may switch to single link transmission through the wireless data transmission link, and conversely, if the wireless data transmission link is abnormal or the transmission rate is lower than the preset rate threshold, the method may switch to single link transmission through the wired data transmission link, where the embodiments of the present disclosure may schedule the wired data transmission link and the wireless data transmission link to transmit data according to an actual data transmission scenario.
According to the data transmission method provided by the embodiment of the disclosure, the wire data transmission link and the wireless data transmission link which are independent of each other are established between the first terminal equipment and the second terminal equipment, and the wire data transmission link and the wireless data transmission link jointly process data to be processed, so that the data transmission rate is improved, even if the transmission is interrupted due to the abnormality of one transmission link in the wire data transmission link or the wireless data transmission link in the data transmission process, the other transmission link can still normally perform data transmission, and the robustness and the stability of the data transmission are ensured. Meanwhile, the data is transmitted in a wired data transmission link mode, the problems that the wireless data transmission link is easily influenced by physical environment and the transmission rate is unstable are solved, the data is transmitted in a wireless data transmission link mode, the problems that the wired data transmission link is easily limited by the transmission rate of a universal serial bus, the data transmission rate is influenced by low utilization rate of a data transmission channel and the like are solved, the data transmission efficiency between terminal devices is improved, and the user experience is good.
In an exemplary embodiment of the present disclosure, an implementation of a data transmission policy for data to be transmitted is also provided. In response to the data transmission instruction, acquiring the first transmission data and the second transmission data of the data to be transmitted may include the following steps S410 to S430:
In step S410, the data to be transmitted is allocated to the data queues corresponding to different data size classes according to the data size of the data to be transmitted.
In an exemplary embodiment of the present disclosure, the data size level is obtained by dividing according to a data size threshold, where the height of the data size level indicates the data size of the data to be transmitted in the corresponding data queue, the data size of the data to be transmitted in the data queue of the high data size level is greater than the data size of the data to be transmitted in the data queue of the low data size level, that is, the data size level is higher, the data size of the data to be transmitted in the corresponding data queue is indicated to be greater, and conversely, the data size level is lower, the data size of the data to be transmitted in the corresponding data queue is indicated to be smaller.
For example, as shown in fig. 5, a schematic diagram of dividing a data queue according to an exemplary embodiment of the present disclosure is shown, as shown in fig. 5, the data amount of the data to be transmitted is compared with a data amount threshold 100M, if the data amount of the data to be transmitted is greater than or equal to the data amount threshold 100M, the data to be transmitted is divided into a data queue a, if the data amount of the data to be transmitted is less than the data amount threshold 100M, the data to be transmitted is divided into a data queue B, and so on, all the data to be transmitted are distributed into the corresponding data queues according to the comparison result with the data amount threshold. Wherein the data volume level of the data queue a is higher than the data volume level of the data queue B. With continued reference to fig. 6, if the preset data amount threshold includes 100M and 500M, the data to be transmitted is divided into a data queue a (the data amount of the data to be transmitted is greater than 500M), a data queue B (the data amount of the data to be transmitted is greater than or equal to 100M and less than or equal to 500M), and a data queue C (the data amount of the data to be transmitted is less than 100M) according to the data amount threshold. The data volume levels of the data queues a to C are sequentially reduced.
It should be noted that the data volume thresholds and the divided data queues in fig. 5 and 6 are merely illustrative, and the embodiments of the present disclosure may select different data volume thresholds to divide the data to be transmitted into a plurality of data queues according to actual data transmission scenarios.
In step S420, a first target data queue is determined from the plurality of data queues in order of the data volume level from high to low to obtain first transmission data from the first target data queue.
In the exemplary embodiment of the present disclosure, since data having a larger data amount is first acquired as the first transmission data, the first transmission data may be acquired from the data queue in order of the data amount level from high to low. In the process of acquiring the first transmission data, after all the data to be transmitted in the data queue of the previous data volume level is transmitted, acquiring the data to be transmitted from the data queue of the next data volume level adjacent to the data queue of the previous data volume level as the first transmission data.
With continued reference to fig. 6, the data queue a is first determined to be a first target data queue and first transmission data is acquired from the data queue a, the data queue B is determined to be a first target data queue and first transmission data is acquired from the data queue B after all the data to be transmitted in the data queue a are transmitted, and the data queue C is determined to be a first target data queue and first transmission data is acquired from the data queue C after all the data to be transmitted in the data queue B are transmitted.
According to the data transmission method and device, the data to be transmitted is divided into the plurality of data queues with different data volume levels, first transmission data can be acquired from the data queues with high data volume levels and distributed to the wired data transmission link, the data with larger data volume can be preferentially transmitted through the wired data transmission link, the data transmission link is based on serial transmission, the time consumption in data opening and data reading is avoided, the utilization rate of a data transmission channel is guaranteed, the wired data transmission link is not easy to be influenced by physical environment, the data with larger data volume is transmitted through the wired data transmission link, transmission interruption caused by physical environment is avoided, data transmission stability is higher, in addition, the first transmission data/second transmission data can be acquired from different data queues through the wired/wireless data transmission link, the data volume of the first transmission data is ensured to be larger than that of the second transmission data, and the time consumed for ordering the data to be transmitted is avoided.
In step S430, a second target data queue is determined from the data queues in order of the data volume level from low to high to obtain second transmission data from the second target data queue.
In the exemplary embodiment of the present disclosure, since data of smaller data amount is first acquired as the second transmission data, the second transmission data can be acquired from the data queues corresponding to different data amount levels in order of the data amount levels from low to high. And in the process of acquiring the second transmission data, acquiring the data to be transmitted from the data queue of the next data volume level adjacent to the data queue of the previous data volume level as the second transmission data after all the data to be transmitted in the data queue of the previous data volume level are transmitted.
Continuing to refer to the example of fig. 6, in the order of the data queue C, the data queue B and the data queue a, the data queue C is first determined to be a second target data queue, the second transmission data is acquired from the data queue C and distributed to the wireless data transmission link, after the data to be transmitted in the data queue C is completely transmitted, the data queue B is determined to be the second target data queue, the second transmission data is acquired from the data queue B, after the data to be transmitted in the data queue B is completely transmitted, the data queue a is determined to be the second target data queue, and the second transmission data is acquired from the data queue a.
According to the data transmission method and device, the data to be transmitted is divided into the plurality of data queues with different data volume grades, the second transmission data can be firstly obtained from the data queues with low data volume grades, the data with smaller data volume is guaranteed to be transmitted preferentially through the wireless data transmission link, the data opening and data reading efficiency in unit time can be improved based on parallel transmission of the wireless data transmission link for the plurality of transmission channels, the utilization rate of the data transmission channels can be guaranteed, and the data transmission rate in unit time can be improved.
In an exemplary embodiment of the present disclosure, the data queues corresponding to different data volume levels may be in a first-in first-out data queue structure, that is, in response to a data transmission instruction, the first transmission data or the second transmission data is acquired from the head of each data queue, and accordingly, when new data to be transmitted exists, the data is added to the tail of the corresponding data queue according to the data volume of the new data to be transmitted, or when unsuccessfully transmitted data to be processed exists, the data to be processed is added to the tail of the corresponding data queue again.
In an exemplary embodiment of the present disclosure, the data to be transmitted may include private data and public data. The private data is data stored in the private area in the first terminal device, for example, application data of an application installed in the terminal device, for example, application data stored in the directory data, and the private data may also be related data that needs to be transmitted as the private data according to an actual data transmission scenario, and the specific content of the private data is not particularly limited in the embodiment of the present disclosure. The public data may be data stored in a public area, for example, related data stored in a memory card in the first terminal device, and other related data which may be transmitted as public data and not specifically set as private data may be used as the public data in the embodiments of the present disclosure.
Based on the above, the data to be transmitted can be divided into a public data queue and a private data queue according to the type of the data to be transmitted, or related data which needs to be transmitted as private data and exists in a public area can be added into the private data queue to be transmitted as private data according to the actual data transmission requirement, so that the data transmission has more flexibility.
In an exemplary embodiment of the present disclosure, according to a data size class of data size of data to be transmitted in a common data queue, the data to be transmitted in the common data queue may be divided into a plurality of data queues corresponding to the data size class, so as to obtain a plurality of data queues corresponding to the common data queue.
Since the wired data transmission link depends on the mtp (Multi-path transmission) service of the terminal system, the wired data transmission link cannot directly acquire private data in the terminal and needs to encrypt the private data to be used as public data transmission, the embodiment of the disclosure can firstly transmit the public data through the wired data transmission link and firstly transmit the private data through the wireless data transmission link.
The method comprises the steps that a first target data queue is determined from a data queue according to the sequence of data volume levels from high to low, so that first transmission data is acquired from the first target data queue; after the data to be transmitted in the public data queue is transmitted, acquiring first transmission data from the private data queue; or the second transmission data can be acquired from the private data queue, and after the data to be transmitted in the private data queue is transmitted, the second target data queue is determined from the data queue according to the order of the data volume level from low to high so as to acquire the second transmission data from the second target data queue.
Correspondingly, the private data queues can be divided into a plurality of data queues corresponding to different data volume grades according to the data volume size. Wherein the data to be transmitted in the public/private data queues may be divided into a plurality of data queues according to the method shown in fig. 5 or fig. 6, which will not be described in detail.
For example, fig. 7 shows a schematic diagram of acquiring first transmission data and second transmission data according to an exemplary embodiment of the present disclosure, and fig. 7 shows that the public data queue is divided into a data queue a (data amount greater than or equal to 100M) and a data queue B (data amount less than 100M) according to the data amount of data to be transmitted in the public data queue, and the private data queue is divided into a data queue C (data amount greater than or equal to 100M) and D (data amount less than 100M). For the wireless data transmission link, first, the second transmission data is acquired from the data queue D, C according to the order of the data volume level from low to high, if there is no data to be transmitted in the data queues D and C, the second transmission data is acquired from the data queue B, if there is no data to be transmitted in the data queue B, the second transmission data is acquired from the data queue a, that is, for the wireless data transmission link, the private data is acquired first, after all the private data are sent, the public data is acquired according to the order of the data volume from low to high, and the second transmission data is acquired.
For the wired data transmission link, first transmission data is acquired from the data queues corresponding to the public data queues according to the order of the data volume level from high to low, and after all the data to be transmitted in the plurality of data queues corresponding to the public data queues are transmitted, the wired data transmission link performs private data transmission, namely, the first transmission data is acquired from the private data queues according to the order of the data volume level from high to low, namely, the first transmission data is acquired according to the order of the data queues A, B, C and D shown in fig. 7.
In some possible embodiments, in order to ensure that the data amount of the first transmission data sent through the wired data transmission link is greater than the data amount of the second transmission data sent through the wireless data transmission link, when the data amount of the data to be transmitted in the private data queue is greater than the data amount of the data to be transmitted in the public data queue, the first transmission data may be first acquired from a plurality of data queues corresponding to the private data queue, and conversely, the second transmission data may be first acquired from a plurality of data queues corresponding to the public data queue, that is, still ensure that the data amount of the first transmission data is greater than the data amount of the second transmission data.
In an exemplary embodiment of the present disclosure, another implementation of a data transmission policy for data to be transmitted is also provided. In response to the data transmission instruction, acquiring the first transmission data and the second transmission data of the data to be transmitted may include the following steps S810 to S820:
Step 810, the data to be transmitted is ordered according to the order of the data size from large to small, so as to obtain a data queue.
In step S820, the first transmission data is acquired from the head of the data queue, and the second transmission data is acquired from the tail of the data queue.
In an exemplary embodiment of the present disclosure, data to be transmitted may be ordered according to an order of from large to small data amounts, so as to obtain a data queue, and first transmission data may be obtained from a head of the data queue, and second transmission data may be obtained from a tail of the data queue, so as to ensure that data to be transmitted with a larger data amount is preferentially selected as the first transmission data, and data to be transmitted with a smaller data amount is selected as the second transmission data. Fig. 9 is a schematic diagram of acquiring first/second transmission data from ordered data to be transmitted according to an embodiment of the disclosure, where the ordered data queues are x1, x2, x3 … …, that is, the first transmission data and the second transmission data are acquired from the head and tail of the queue respectively.
In another exemplary embodiment, the data to be transmitted may be further sorted according to the order of the data volume from small to large, so as to obtain a data queue, obtain the second transmission data from the head of the data queue, and obtain the first transmission data from the tail of the data queue, so that it is ensured that the data to be transmitted with a larger data volume is preferentially selected as the first transmission data, and the data to be transmitted with a smaller data volume is selected as the second transmission data.
The data to be transmitted is sequenced according to the data quantity to obtain a data queue, and the first transmission data can be transmitted by the wired data transmission link and the second transmission data can be transmitted by the wireless data transmission link under the condition that more data queues are not required to be divided.
In an exemplary embodiment of the present disclosure, the private data may be encrypted before the first transmission data and the second transmission data in the data to be transmitted are acquired in response to the data transmission instruction, and the encrypted private data and the public data are used as the data to be transmitted, so that the security of the private data is ensured, and the encrypted private data and the public data can be transmitted in the same data sending policy.
In an exemplary embodiment of the present disclosure, in a process of transmitting first transmission data and second transmission data to a second terminal device through a wired data transmission link and a wireless data transmission link, when a transmission abnormality occurs in certain data to be transmitted, the data to be transmitted is rejoined in a corresponding data queue. When the transmission of the first transmission data by the wired data transmission link fails, the first transmission data is added into the corresponding data queue again; and/or when the wireless data transmission link fails to transmit the second transmission data, the second transmission data is added into the corresponding data queue again.
And under the condition that the data to be transmitted is distributed to the data queues corresponding to different data volume grades according to the data volume of the data to be transmitted, if the first transmission data/the second transmission data are abnormal in transmission, the first transmission data/the second transmission data are added into the corresponding data queues again according to the first transmission data/the second data volume of the abnormal transmission. For example, if the first transmission data belongs to the data queue a before transmission, the data amount according to the first transmission data is added to the data queue a again after transmission abnormality. For example, when the data queue a is first-in first-out, then the end of the queue is added to the data queue a.
Under the condition that a data queue is obtained according to the sequence of the data volume from large to small, if the first transmission data/the second transmission data are abnormal in transmission, the first data/the second transmission data to be transmitted are added to the corresponding positions in the ordered data queue again according to the data volume of the first transmission data/the second transmission data with abnormal transmission, and the ordered data queue is ensured to be arranged according to the sequence of the data volume from large to small (or from small to large).
According to the data transmission method and device, in the data transmission process, the data to be processed with abnormal transmission is added to the corresponding data queue again, so that the influence on the normal operation of the whole data transmission due to the abnormal transmission of the individual data to be transmitted is avoided, the omission of any data to be transmitted is avoided, and the integrity of the data transmission is ensured.
It should be noted that, in an exemplary embodiment, the data queue or the position to which the data to be transmitted belongs may also be adjusted in response to the transmission level adjustment operation of the user, so that the order of data transmission accords with the user expectation and the user experience is good under the condition of ensuring the utilization rate of the transmission link.
In an exemplary embodiment of the present disclosure, in order to increase the data transmission rate, step S220 may further include: and acquiring first transmission data and second transmission data in the data to be transmitted according to the data transmission rates of the wired data transmission link and the wireless data transmission link.
The first transmission rate of the wired data transmission link may be acquired, and the second transmission rate of the wireless data transmission link may be acquired, and if the first transmission rate is greater than the second transmission rate, the first transmission data may be sent to the second terminal device through the wired data transmission link, and the second transmission data may be sent to the second terminal device through the wireless data transmission link. Correspondingly, if the first transmission rate is smaller than the second transmission rate, the second transmission data is sent to the second terminal device through the wired data transmission link, and the first transmission data is sent to the second terminal device through the wireless data transmission link.
For example, with continued reference to fig. 7, when there is only data to be transmitted that contains an incomplete transmission in the data queue a, the first transmission data and the second transmission data may be acquired from the data queue a according to the data transmission rates of the wired data transmission link and the wireless data transmission link. For example, if the current wired data transmission link is idle, the first transmission data can be acquired from the data queue a and transmitted through the wired data transmission link, and when the wireless data transmission link finishes the transmission of the current second transmission data, the second transmission data is acquired from the data queue a immediately and is performed through the wireless data transmission link, and when the wired/wireless data transmission links are idle, according to the current data transmission rate, the data transmission rates in the wired data transmission link and the wireless data transmission link are higher, the first transmission data with large data quantity in the data to be transmitted is transmitted first, and the second transmission data is transmitted by the other data transmission link, so that the wired data transmission link and the wireless data transmission link are ensured to have no idle condition, and the data transmission efficiency is ensured.
In the actual transmission process, if the data size of the data to be transmitted is smaller than the first data size threshold, the exemplary embodiment of the disclosure further provides an implementation manner of data packaging and sending: and combining the first target data to be transmitted in the data to be transmitted to generate a data packet with the data volume being greater than or equal to a first data volume threshold value, and taking the data packet as first transmission data so as to send the data packet to the second terminal equipment through a wired data transmission link. The first target data to be transmitted may select a portion of the data to be transmitted from the data to be transmitted according to current data processing capabilities of the current wired data transmission link and the wireless data transmission link.
If the data to be transmitted are smaller than 100M, a part of the data to be transmitted can be selected from the data to be transmitted, combined, packed to generate a data packet with the data amount larger than or equal to 100M, and transmitted through the wired data transmission link, and other unpacked data to be transmitted continue to be transmitted through the wireless data transmission link, so that the problem of low channel utilization caused by the fact that the wired data transmission link transmits files with smaller data amount is avoided, the channel utilization of the wired data transmission link is improved, the data to be transmitted with smaller data amount is processed in parallel through the wired/wireless data transmission link, and the data transmission rate is improved.
In the actual transmission process, there may be a case that the data amount of the data to be transmitted is greater than the second data amount threshold, and the exemplary embodiment of the present disclosure further provides an implementation manner of data splitting and sending: and dividing the second target data to be transmitted in the data to be transmitted into a plurality of split sub-data, and transmitting the split sub-data to the second terminal equipment through a wireless data transmission link. The second target data to be transmitted may select a portion of the data to be transmitted from the data to be transmitted according to current data processing capabilities of the current wired data transmission link and the wireless data transmission link.
The second target data to be transmitted may be split into a plurality of split sub-data, and the split sub-data belonging to the same second target data to be transmitted may be set with an associated identifier, so that after the split sub-data are sent to the second terminal device, the second terminal device may combine the split sub-data belonging to the same second target data to be transmitted according to the associated identifier.
According to the data transmission method and device, the data to be transmitted can be dynamically combined or split according to the data size of the data to be transmitted, the wired data transmission link can be used for preferentially processing the data with larger data size, the wireless data transmission link is used for preferentially processing the data with smaller data size, the condition that the wired data transmission link and the wireless data transmission link are free or wait to transmit is avoided, and the data transmission rate is improved.
In an exemplary embodiment of the present disclosure, in order to improve robustness of data transmission, transmitting, in parallel, first transmission data and second transmission data to a second terminal device by using a wired data transmission link and a wireless data transmission link for cooperative transmission of data to be transmitted may at least include: when the wired data transmission link is abnormal, transmitting the first transmission data to the second terminal equipment through the wireless transmission link; or when the wireless data transmission link is abnormal, transmitting the second transmission data to the second terminal equipment through the wired transmission link. That is, in the data transmission process, the transmission is interrupted due to the abnormality of one transmission link in the wired data transmission link or the wireless data transmission link, the other transmission link can still normally perform data transmission, and the other transmission link can be used for sending the remaining data to be transmitted to the second terminal device, so that the robustness and stability of the data transmission are ensured.
In an exemplary embodiment of the present disclosure, after a wired data transmission link is established between a first terminal device and a second terminal device, if the second terminal device supplies power to the first terminal device, the power supply includes two parts: power consumption for data transmission and power consumption for charging the first terminal device. In order to ensure enough power consumption for data transmission, the embodiment of the disclosure stops the charging behavior between the first terminal device and the second terminal device based on the wired data transmission link, avoids the electric quantity loss and heating caused by charging the second terminal device to the first terminal device, ensures that the second terminal device is in low electric quantity to cause data transmission interruption, improves the stability of data transmission, and also avoids the problems of data loss and the like caused by the data transmission interruption.
In an exemplary embodiment of the present disclosure, in order to ensure stability of a data transmission process, if at least one of the first terminal device and the second terminal device has a power value lower than a preset power threshold, sending data to be transmitted to the second terminal device is stopped. For example, the preset electric quantity threshold is 20% of the electric quantity of the terminal equipment, if the electric quantity of the second terminal equipment is lower than 20%, the sending of the data to be transmitted to the second terminal equipment is stopped, and the data loss and the like caused by the interruption of transmission are avoided. The preset power threshold may be a predetermined value of the terminal device, or may be set by a user of the terminal device before the data transmission operation.
By way of example, fig. 10 shows a process flow diagram of a wired data transmission process according to an exemplary embodiment of the present disclosure. As shown in fig. 10, taking a terminal device of an android system as an example, a wired data transmission link between a first terminal device and a second terminal device is established, and data to be transmitted is divided into a data queue a, a data queue B and a data queue C with data volume levels from high to low, where the process includes:
In step S1010, the first terminal device obtains the first transmission data from the data queues corresponding to different data volume levels according to the order of the data volume from high to low, and the manner of obtaining the first transmission data can refer to step 420, which is not described herein.
In step S1020, the first terminal device notifies the second terminal device to read the first transmission data through the wired data transmission link.
In step S1030, the second terminal device reads the first transmission data received through the wired data transmission link through an MTP (custom extension protocol based on picture transmission protocol) driving interface of the android platform.
In step S1040, the second terminal device may verify the integrity of the received first transmission data, and if the first transmission data is incomplete and the current power is lower than 20%, or the wired transmission link is disconnected, the data transmission is interrupted, and the incomplete first transmission data is deleted.
Step S1050, the first terminal device receives the data transmission result sent by the second terminal device, and if the sending is successful, the steps S1010 to S1040 are repeatedly executed.
In step S1060, if the transmission fails, the first transmission data with failed transmission is added to the corresponding data queue again. The manner of re-joining to the corresponding data queue is described in the above section, and will not be described in detail here.
In step S1070, if the power of the first terminal device is lower than 20% or the wired data transmission link is disconnected, the sending of the first transmission data to the second terminal device is stopped.
In an exemplary embodiment of the present disclosure, as shown in fig. 11, a flow chart of establishing a wireless data transmission link and a wired data transmission link according to an exemplary embodiment of the present disclosure is shown, and it should be noted that fig. 11 is merely exemplary, and the order of establishing the wireless data transmission link and the wired data transmission link and the type of establishing the wireless data transmission link in the exemplary embodiment of the present disclosure are not particularly limited.
As shown in fig. 11, the process of establishing a wireless transmission link is: step S1110, the second terminal device creates a hotspot, and provides the hotspot name and the password information to the first terminal device, for example, in the form of a two-dimensional code or in a text format; step S1120, the first terminal device obtains the hotspot name and the password information; step S1130, the first terminal device establishes a wireless data transmission link with the second terminal device based on the hotspot name and the password information obtained in step S1120; step S1140, connecting a universal serial bus USB interface of the second terminal device to one end of a USB cable; step S1150, connecting the other end of the USB line with the USB interface of the first terminal device; step S1160, the second terminal device detects the device connection state based on the USB line; step S1170, determining that the electric quantity of the second terminal device is greater than or equal to a preset electric quantity threshold (e.g. 20%), and establishing a wired data transmission link between the first terminal device and the second terminal device; in step S1180, the charging switch on the first terminal device based on the wired data transmission link is turned off.
It should be noted that, there is no dependency between step S1110 to step S1130 and step S1140 to step S1170, that is, the wireless data transmission link is established and the wired data transmission link is established without interference, and fig. 11 is only an example, and all the manners of establishing various wireless wired data transmission links and wireless data transmission links between terminal devices may be used as the link establishment manners in the embodiments of the present disclosure, which includes but is not limited to the link establishment manners described above.
In summary, according to the data transmission method provided by the embodiment of the present disclosure, the wired data transmission link and the wireless data transmission link are simultaneously established between the first terminal device and the second terminal device, and the wired data transmission link and the wireless data transmission link are independent from each other, but since the wired data transmission link and the wireless data transmission link jointly process the data to be processed, the data transmission rate is improved, and even if an abnormality of one of the wired data transmission link or the wireless data transmission link causes transmission interruption in the parallel data transmission process, the other transmission link can still normally perform data transmission, thereby ensuring the robustness and stability of data transmission. According to the data transmission method, the data is transmitted in a wired data transmission link mode, the problems that the wireless data transmission link is easily affected by physical environment and the transmission rate is unstable are solved, the data is transmitted in a wireless data transmission link mode, the data is transmitted in parallel through a plurality of transmission channels, the problems that the wired data transmission link is easily limited by the transmission rate of a universal serial bus and the like are solved, the data transmission efficiency between terminal equipment is improved, and the user experience is improved through the mutual complementation of the transmission performance between the two channels.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Further, referring to fig. 12, in an exemplary embodiment of the present disclosure, a data transmission apparatus 1200 is provided, which includes a connection establishment module 1210, a data processing module 1220, and a transmission module 1230. Wherein:
a connection establishment module 1210, configured to establish a wired data transmission link with the second terminal device, and establish a wireless data transmission link with the second terminal device, where the wireless data transmission link includes one or more transmission channels;
the data processing module 1220 is configured to obtain, in response to a data transmission instruction, first transmission data and second transmission data in data to be transmitted, where a data amount of the first transmission data is greater than a data amount of the second transmission data;
the transmission module 1230 is configured to send the first transmission data to the second terminal device through a wired data transmission link, and send the second transmission data to the second terminal device through a wireless data transmission link.
In an exemplary embodiment, the number of transmission channels of the wireless data transmission link is greater than the number of transmission channels of the wired data transmission link.
In an exemplary embodiment, the data processing module 1220 may include: a first data queue dividing unit, configured to allocate the data to be transmitted to data queues corresponding to different data volume levels according to the data volume of the data to be transmitted; a first data obtaining unit configured to determine a first target data queue from the data queues in order of the data volume level from high to low, so as to obtain the first transmission data from the first target data queue; and the second data acquisition unit is used for determining a second target data queue from the data queues according to the order of the data volume grades from low to high so as to acquire the second transmission data from the second target data queue, wherein the data volume of the data to be transmitted in the data queue with the high data volume grade is larger than the data volume of the data to be transmitted in the data queue with the low data volume grade.
In an exemplary embodiment, the data transmission apparatus 1200 may further include a second data queue dividing unit for allocating the data to be transmitted to a public data queue and a private data queue according to the type of the data to be transmitted; the second data queue dividing unit is configured to: and distributing the data to be transmitted in the public data queues to the data queues corresponding to different data volume grades according to the data volume of the data to be transmitted in the public data queues.
In an exemplary embodiment, the second data acquisition unit is further configured to: and before determining a second target data queue from the data queues according to the order of the data volume grades from low to high so as to acquire the second transmission data from the second target data queue, firstly acquiring the second transmission data from the private data queue.
In an exemplary embodiment, the first data acquisition unit is further configured to: and after determining a first target data queue from the data queues according to the order of the data volume grades from high to low so as to acquire the first transmission data from the first target data queue, acquiring the first transmission data from the private data queue.
In an exemplary embodiment, the transmission module 1230 may include: the first exception processing unit is used for re-adding the first transmission data into a corresponding data queue when the transmission of the first transmission data by the wired data transmission link fails; and/or a second exception processing unit, configured to, when the wireless data transmission link fails to transmit the second transmission data, rejoin the second transmission data into the corresponding data queue.
In an exemplary embodiment, the data processing module 1220 may further include: the ordering unit is used for ordering the data to be transmitted according to the order of the data volume from large to small to obtain a data queue; a third data acquisition unit configured to acquire the first transmission data from a head of the data queue; and a fourth data acquisition unit, configured to acquire the second transmission data from the tail of the data queue.
In an exemplary embodiment, the data transmission apparatus 1200 may further include: the encryption module is used for encrypting the private data; and the data determining module takes the encrypted private data and the public data as the data to be transmitted.
In an exemplary embodiment, if the data amounts of the data to be transmitted are all smaller than the first data amount threshold, the data transmission apparatus further includes: the data merging module is used for merging the first target data to be transmitted in the unique data queue to generate a data packet with the data volume being greater than or equal to the first data volume threshold value; the fourth data acquisition unit is configured to take the data packet as the first transmission data to acquire the first transmission data through the wired data transmission link.
In an exemplary embodiment, if the data amounts of the data to be transmitted are all greater than the second data amount threshold, the data transmission apparatus 1200 may further include: the data splitting module is used for splitting the second target data to be transmitted in the unique data queue into a plurality of splitting sub-data; the fourth data acquisition unit is further configured to: and taking the split sub-data as the second transmission data to acquire the second transmission data through the transmission channels.
In an exemplary embodiment, the data transmission apparatus 1200 further includes: the transmission rate acquisition module is used for acquiring a first transmission rate of the wired data transmission link and acquiring a second transmission rate of the wireless data transmission link; the transmission module is configured to send the first transmission data to the second terminal device through the wired data transmission link and send the second transmission data to the second terminal device through the wireless data transmission link if the first transmission rate is greater than the second transmission rate; or if the first transmission rate is smaller than the second transmission rate, sending the second transmission data to the second terminal device through the wired data transmission link, and sending the first transmission data to the second terminal device through the wireless data transmission link.
In an exemplary embodiment, the data transmission module 1230 may further include: the first transmission strategy adjustment module is used for transmitting the first transmission data to the second terminal equipment through the wireless transmission connection when the wired data transmission link is abnormal; or a second transmission policy adjustment module, configured to transmit the second transmission data to the second terminal device through the wired transmission connection when the wireless data transmission link is abnormal.
In an exemplary embodiment, the data transmission apparatus 1200 may further include: and the charging control module is used for stopping the charging action based on the wired data transmission link when the first terminal equipment and the second terminal equipment are charged based on the wired data transmission link.
In an exemplary embodiment, the data transmission apparatus 1200 may further include: and the transmission control module is used for stopping sending the data to be transmitted to the second terminal equipment if at least one of the first terminal equipment and the second terminal equipment has the condition that the electric quantity value is lower than a preset electric quantity threshold value.
The specific details of each module in the above apparatus are already described in the method section, and the details that are not disclosed can be referred to the embodiment of the method section, so that they will not be described in detail.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
There is also provided in an exemplary embodiment of the present disclosure an electronic device for implementing the data transmission method, which may be the terminal device 101, 102 in fig. 1. The electronic device comprises at least a processor and a memory for storing executable instructions of the processor, the processor being configured to perform a data transmission method via execution of the executable instructions.
The configuration of the electronic device in the embodiment of the present disclosure will be exemplarily described below taking the mobile terminal 1300 in fig. 13 as an example. It will be appreciated by those skilled in the art that the configuration of fig. 13 can also be applied to stationary type devices in addition to components specifically for mobile purposes. In other embodiments, mobile terminal 1300 may include more or less components than those illustrated, or may combine certain components, or may split certain components, or may have a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interfacing relationship between the components is shown only schematically and is not limiting on the construction of the mobile terminal 1300. In other embodiments, mobile terminal 1300 may also employ a different interface from that of fig. 13, or a combination of interfaces.
As shown in fig. 13, the mobile terminal 1300 may specifically include: processor 1310, internal memory 1321, external memory interface 1322, universal serial bus (Universal Serial Bus, USB) interface 1330, charge management module 1340, power management module 1341, battery 1342, antenna 1, antenna 2, mobile communication module 1350, wireless communication module 1360, audio module 1370, speaker 1371, receiver 1372, microphone 1373, headset interface 1374, sensor module 1380, display 1390, camera module 1391, indicator 1392, motor 1393, key 1394, user identification module (subscriber identification module, SIM) card interface 1395, and so forth. Wherein the sensor module 1380 may include a depth sensor 13801, a pressure sensor 13802, a gyroscopic sensor 13803, and the like.
The processor 1310 may include one or more processing units, such as: the Processor 1310 may include an application Processor (Application Processor, AP), a modem Processor, a graphics Processor (Graphics Processing Unit, GPU), an image signal Processor (IMAGE SIGNAL Processor, ISP), a controller, a video codec, a digital signal Processor (DIGITAL SIGNAL Processor, DSP), a baseband Processor and/or a neural network Processor (Neural-Network Processing Unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The NPU is a neural Network (Neural-Network, NN) computing processor, and can rapidly process input information by referencing a biological neural Network structure, such as referencing a transmission mode among human brain neurons, and can continuously learn. Applications such as intelligent awareness of the mobile terminal 1300 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The processor 1310 has a memory disposed therein. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transfer instructions, and notification instructions, and are controlled to be executed by the processor 1310.
The charge management module 1340 is configured to receive a charge input from a charger. The power management module 1341 is configured to connect the battery 1342, the charge management module 1340, and the processor 1310. The power management module 1341 receives input from the battery 1342 and/or the charge management module 1340, and provides power to the processor 1310, the internal memory 1321, the display 1390, the camera module 1391, the wireless communication module 1360, and so forth.
The wireless communication function of the mobile terminal 1300 may be implemented by the antenna 1, the antenna 2, the mobile communication module 1350, the wireless communication module 1360, a modem processor, a baseband processor, and the like. Wherein the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals; the mobile communication module 1350 may provide a solution for wireless communication including 3G/4G/5G or the like applied to the mobile terminal 1300; the modem processor may include a modulator and a demodulator; the wireless communication module 1360 may provide solutions for wireless communication including wireless local area networks (Wireless Local Area Networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) networks), bluetooth (BT), etc., as applied on the mobile terminal 1300. In some embodiments, antenna 1 and mobile communication module 1350 of mobile terminal 1300 are coupled, and antenna 2 and wireless communication module 1360 are coupled, such that mobile terminal 1300 may communicate with a network and other devices through wireless communication techniques.
The mobile terminal 1300 realizes a display function through a GPU, a display screen 1390, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 1390 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 1310 may include one or more GPUs that execute program instructions to generate or change display information.
The mobile terminal 1300 may implement a photographing function through an ISP, a camera module 1391, a video codec, a GPU, a display 1390, an application processor, and the like. The ISP is used for processing data fed back by the camera module 1391; the camera module 1391 is used to capture still images or video; the digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals; video codec is used to compress or decompress digital video, and mobile terminal 1300 may also support one or more video codecs.
The external memory interface 1322 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the mobile terminal 1300. The external memory card communicates with the processor 1310 via an external memory interface 1322 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 1321 may be used to store computer-executable program code that includes instructions. The internal memory 1321 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the mobile terminal 1300 (e.g., audio data, phonebook, etc.), etc. In addition, the internal memory 1321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), and the like. The processor 1310 performs various functional applications of the mobile terminal 1300 and data processing by executing instructions stored in the internal memory 1321 and/or instructions stored in a memory provided in the processor.
Mobile terminal 1300 may implement audio functions through an audio module 1370, a speaker 1371, a receiver 1372, a microphone 1373, an earphone interface 1374, an application processor, and the like. Such as music playing, recording, etc.
The depth sensor 13801 is used to obtain depth information of a scene. In some embodiments, a depth sensor may be provided at the camera module 1391.
The pressure sensor 138033 is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 13802 may be provided to the display 1390. The pressure sensor 13802 is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like.
The gyro sensor 13803 may be used to determine a motion gesture of the mobile terminal 1300. In some embodiments, the angular velocity of mobile terminal 1300 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 13803. The gyro sensor 13803 may be used to capture anti-shake, navigation, motion-sensing game scenes, etc.
In addition, sensors with other functions, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., may be provided in the sensor module 1380 according to actual needs.
Other devices that provide secondary functionality may also be included in mobile terminal 1300. For example, the key 1394 includes a power-on key, a volume key, and the like, and a user can generate key signal inputs related to user settings and function control of the mobile terminal 1300 through key inputs. As another example, an indicator 1392, a motor 1393, a SIM card interface 1395, and the like.
Furthermore, exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (15)

1. A data transmission method, applied to a first terminal device, comprising:
Establishing a wired data transmission link with a second terminal device, and establishing a wireless data transmission link with the second terminal device, wherein the wireless data transmission link comprises a plurality of transmission channels;
responding to a data transmission instruction, and acquiring first transmission data and second transmission data in data to be transmitted, wherein the data volume of the first transmission data is larger than that of the second transmission data;
transmitting the first transmission data to the second terminal device through the wired data transmission link, and transmitting the second transmission data to the second terminal device through the wireless data transmission link;
If the data quantity of the data to be transmitted is smaller than a first data quantity threshold, merging first target data to be transmitted in the data to be transmitted, generating a data packet with the data quantity larger than or equal to the first data quantity threshold, and taking the data packet as the first transmission data;
If the data quantity of the data to be transmitted is larger than a second data quantity threshold value, dividing second target data to be transmitted in the data to be transmitted into a plurality of split sub-data, and taking the split sub-data as the second transmission data;
The responding to the data transmission instruction, obtaining the first transmission data and the second transmission data in the data to be transmitted, includes:
distributing the data to be transmitted to data queues corresponding to different data volume grades according to the data volume of the data to be transmitted;
Determining a first target data queue from the data queues according to the order of the data volume level from high to low so as to acquire the first transmission data from the first target data queue;
determining a second target data queue from the data queues according to the order of the data volume level from low to high so as to acquire the second transmission data from the second target data queue;
the data quantity of the data to be transmitted in the data queue of the high data quantity level is larger than the data quantity of the data to be transmitted in the data queue of the low data quantity level.
2. The method of claim 1, wherein the number of transmission channels of the wireless data transmission link is greater than the number of transmission channels of the wired data transmission link.
3. The method according to claim 1, wherein the method further comprises:
Distributing the data to be transmitted to a public data queue and a private data queue according to the type of the data to be transmitted;
and distributing the data to be transmitted in the public data queues to the data queues corresponding to different data volume grades according to the data volume of the data to be transmitted in the public data queues.
4. A method according to claim 3, wherein said obtaining first transmission data of the data to be transmitted comprises:
Determining a first target data queue from the data queues according to the order of the data volume level from high to low so as to acquire the first transmission data from the first target data queue;
After the data to be transmitted in the public data queue is transmitted, acquiring the first transmission data from the private data queue; or alternatively
The obtaining the second transmission data in the data to be transmitted includes:
acquiring the second transmission data from the private data queue;
and after the data to be transmitted in the private data queue is transmitted, determining a second target data queue from the data queues according to the order of the data volume level from low to high so as to acquire the second transmission data from the second target data queue.
5. The method of claim 1, wherein the sending the first transmission data to the second terminal device over the wired data transmission link and the second transmission data to the second terminal device over the wireless data transmission link comprises:
when the wired data transmission link fails to transmit the first transmission data, the first transmission data is added into the corresponding data queue again; and/or
And when the wireless data transmission link fails to transmit the second transmission data, the second transmission data is added into the corresponding data queue again.
6. The method according to claim 1, wherein the acquiring the first transmission data and the second transmission data in the data to be transmitted in response to the data transmission instruction includes:
Sequencing the data to be transmitted according to the sequence of the data volume from large to small to obtain a data queue;
Acquiring the first transmission data from the head of the data queue;
and acquiring the second transmission data from the tail of the data queue.
7. The method of claim 1, wherein prior to the acquiring the first transmission data and the second transmission data of the data to be transmitted in response to the data transmission instruction, the method further comprises:
private data and public data are obtained, and the private data are encrypted;
And taking the encrypted private data and public data as the data to be transmitted.
8. The method according to claim 1, wherein the method further comprises:
Acquiring a first transmission rate of the wired data transmission link and acquiring a second transmission rate of the wireless data transmission link;
and if the first transmission rate is greater than the second transmission rate, sending the first transmission data to the second terminal equipment through the wired data transmission link, and sending the second transmission data to the second terminal equipment through the wireless data transmission link.
9. The method of claim 8, wherein the method further comprises:
And if the first transmission rate is smaller than the second transmission rate, sending the second transmission data to the second terminal equipment through the wired data transmission link, and sending the first transmission data to the second terminal equipment through the wireless data transmission link.
10. The method according to any of claims 1 to 9, wherein said sending the first transmission data to the second terminal device via the wired data transmission link and sending the second transmission data to the second terminal device via the wireless data transmission link comprises:
transmitting the first transmission data to the second terminal device through the wireless data transmission link when the wired data transmission link is abnormal; or alternatively
And when the wireless data transmission link is abnormal, transmitting the second transmission data to the second terminal equipment through the wired data transmission link.
11. The method according to any one of claims 1 to 9, further comprising:
And stopping the charging action based on the wired data transmission link when the first terminal device and the second terminal device are charged based on the wired data transmission link.
12. The method according to any one of claims 1 to 9, further comprising:
and if at least one of the first terminal equipment and the second terminal equipment has the condition that the electric quantity value is lower than a preset electric quantity threshold value, stopping sending the data to be transmitted to the second terminal equipment.
13. A data transmission apparatus, characterized by being applied to a first terminal device, comprising:
The connection establishment module is used for establishing a wired data transmission link with the second terminal equipment and establishing a wireless data transmission link with the second terminal equipment, wherein the wireless data transmission link comprises a plurality of transmission channels;
The data processing module is used for responding to a data transmission instruction, acquiring first transmission data and second transmission data in data to be transmitted, wherein the data volume of the first transmission data is larger than that of the second transmission data;
a transmission module, configured to send the first transmission data to the second terminal device through the wired data transmission link, and send the second transmission data to the second terminal device through the wireless data transmission link;
If the data quantity of the data to be transmitted is smaller than a first data quantity threshold, merging first target data to be transmitted in the data to be transmitted, generating a data packet with the data quantity larger than or equal to the first data quantity threshold, and taking the data packet as the first transmission data;
If the data quantity of the data to be transmitted is larger than a second data quantity threshold value, dividing second target data to be transmitted in the data to be transmitted into a plurality of split sub-data, and taking the split sub-data as the second transmission data;
The data processing module is configured to perform:
distributing the data to be transmitted to data queues corresponding to different data volume grades according to the data volume of the data to be transmitted;
Determining a first target data queue from the data queues according to the order of the data volume level from high to low so as to acquire the first transmission data from the first target data queue;
determining a second target data queue from the data queues according to the order of the data volume level from low to high so as to acquire the second transmission data from the second target data queue;
the data quantity of the data to be transmitted in the data queue of the high data quantity level is larger than the data quantity of the data to be transmitted in the data queue of the low data quantity level.
14. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1 to 12 via execution of the executable instructions.
15. A computer readable medium, on which a computer program is stored, which, when being executed by a processor, implements the method according to any one of claims 1 to 12.
CN202210445715.2A 2022-04-26 Data transmission method and device, electronic equipment and computer readable medium Active CN114745451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210445715.2A CN114745451B (en) 2022-04-26 Data transmission method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210445715.2A CN114745451B (en) 2022-04-26 Data transmission method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN114745451A CN114745451A (en) 2022-07-12
CN114745451B true CN114745451B (en) 2024-07-12

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854202A (en) * 2010-05-07 2010-10-06 华为技术有限公司 Data transmission method, equipment and system
CN111355752A (en) * 2018-12-20 2020-06-30 阿里巴巴集团控股有限公司 File transmission method, device and equipment based on gatekeeper
CN113473645A (en) * 2020-03-12 2021-10-01 华为技术有限公司 Data transmission method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854202A (en) * 2010-05-07 2010-10-06 华为技术有限公司 Data transmission method, equipment and system
CN111355752A (en) * 2018-12-20 2020-06-30 阿里巴巴集团控股有限公司 File transmission method, device and equipment based on gatekeeper
CN113473645A (en) * 2020-03-12 2021-10-01 华为技术有限公司 Data transmission method and device

Similar Documents

Publication Publication Date Title
CN108681436B (en) Image quality parameter adjusting method, device, terminal and storage medium
US11934352B2 (en) Card rendering method and electronic device
EP4013003A1 (en) Communication protocol switching method, apparatus and system
CN111372325A (en) Method and device for establishing Wi-Fi point-to-point connection
CN106888079A (en) Resource allocation methods and device
CN110493626B (en) Video data processing method and device
KR20200140097A (en) Apparatus and method for measuring location of multiple electronic devices based on time scheduling in ultra wide band
CN112188461B (en) Control method and device of near field communication device, medium and electronic equipment
CN113556715B (en) Device connection method and apparatus, computer readable medium and electronic device
WO2021218318A1 (en) Video transmission method, electronic device and computer readable medium
CN113238727A (en) Screen switching method and device, computer readable medium and electronic equipment
CN110413383B (en) Event processing method, device, terminal and storage medium
CN114745451B (en) Data transmission method and device, electronic equipment and computer readable medium
CN115175149A (en) Equipment adding method and device, bluetooth chip and equipment
WO2023134509A1 (en) Video stream pushing method and apparatus, and terminal device and storage medium
WO2019045128A1 (en) Image quality enhancement of video call
WO2023116311A1 (en) Data interaction method and apparatus, and device and storage medium
CN113407318B (en) Operating system switching method and device, computer readable medium and electronic equipment
CN108874699B (en) Method and device for using MTP (Multi-time transfer protocol) function by multiple systems and electronic equipment
CN116244231A (en) Data transmission method, device and system, electronic equipment and storage medium
CN114745451A (en) Data transmission method and device, electronic equipment and computer readable medium
US20220116566A1 (en) Electronic device for processing image and image processing method thereof
CN115607955A (en) Vehicle machine system, method for realizing extended display and storage medium
CN108494700A (en) Across link data transmission method, device, computer equipment and storage medium
CN114691067A (en) Screen projection method and electronic equipment

Legal Events

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