A data transmission method, a first device, and a second device
By selecting multiple transmission lines between smart devices to transmit data blocks in parallel, the problems of low data transmission efficiency and waste of resources between smart devices are solved, and more efficient data transmission and resource utilization are achieved.
Patent Information
- Application Number
- CN202110896831.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-08-05
AI Technical Summary
The data transmission efficiency between smart devices is low, and the transmission line resources are severely wasted, mainly due to the limitations of the carrying capacity of a single transmission line and the inadequate utilization of resources.
Two or more target transmission lines are selected between smart devices, and the data is split according to the carrying capacity of each line, forming data blocks of appropriate sizes, and parallel transmission is carried out to improve efficiency and resource utilization.
By transmitting data blocks in parallel, the data transmission efficiency between smart devices is significantly improved, and the resources of multiple transmission lines are fully utilized, avoiding the problems of transmission speed limit and resource waste.
Smart Images

Figure CN113630808B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method, a first device, and a second device. Background Art
[0002] With the development of smart devices, smart devices will generate and use data when in use. This data has become an important part of data applications. In order to complete data sharing between smart devices, smart devices need to complete data transmission through their own transmission lines.
[0003] At present, although smart devices have transmission lines such as Wifi, Bluetooth, USB, NFC, etc., data transmission between smart devices is completed using only one transmission line. When using one transmission line to transmit data, it is limited by the carrying capacity of the transmission line, resulting in insufficient upper limit of data transmission speed, which leads to low efficiency of data transmission between smart devices. Summary of the invention
[0004] In view of this, the present invention proposes a data transmission method, a first device, and a second device, the main purpose of which is to improve the efficiency of data transmission between devices.
[0005] In a first aspect, the present invention provides a data transmission method, which is applied to a first device, and the method includes:
[0006] Selecting N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2;
[0007] Splitting the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line;
[0008] The target transmission lines are used to transmit the corresponding data blocks to the second device in parallel.
[0009] In a second aspect, the present invention provides a data transmission method, which is applied to a second device, and the method includes:
[0010] Receiving N data blocks transmitted by the first device in parallel through N target transmission lines, wherein the N target transmission lines are selected from the transmission lines between the first device and the second device, the N data blocks are obtained by splitting the data to be transmitted according to the carrying capacity of each target transmission line, and each target transmission line has its own corresponding data block, and N is greater than or equal to 2;
[0011] The N data blocks are merged to form the data to be transmitted.
[0012] In a third aspect, the present invention provides a first device, the first device comprising:
[0013] A selection unit, configured to select N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2;
[0014] A splitting unit, used for splitting the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line;
[0015] The transmission unit is used to transmit the corresponding data blocks to the second device in parallel by using the target transmission lines.
[0016] In a fourth aspect, the present invention provides a second device, the second device comprising:
[0017] A receiving unit, configured to receive N data blocks transmitted by a first device in parallel through N target transmission lines, wherein the N target transmission lines are selected from the transmission lines between the first device and the second device, the N data blocks are obtained by splitting the data to be transmitted according to the carrying capacity of each target transmission line, and each target transmission line has its own corresponding data block, and N is greater than or equal to 2;
[0018] A merging unit is used to merge the N data blocks to form the data to be transmitted.
[0019] In a fifth aspect, the present invention provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data transmission method described in the first aspect, or the data transmission method described in the second aspect.
[0020] In a sixth aspect, the present invention provides a storage management device, comprising: a memory for storing a program; a processor, coupled to the memory, for running the program to execute the data transmission method described in the first aspect, or, to execute the data transmission method described in the second aspect.
[0021] By means of the above technical scheme, the present invention provides a data transmission method, a first device, and a second device. When the first device needs to transmit data to the second device, two or more target transmission lines are first selected from the transmission lines between the first device and the second device. Then, the data to be transmitted is split according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line. Finally, each target transmission line is used to transmit its corresponding data blocks to the second device in parallel. Since the scheme provided by the present invention can use two or more transmission lines to transmit data blocks of a size suitable for the carrying capacity of each transmission line in parallel when transmitting data between two devices, it can not only improve the efficiency of data transmission between devices, but also make full use of the transmission line resources possessed by the devices.
[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A flow chart of a data transmission method provided by an embodiment of the present invention is shown;
[0025] Figure 2 A flow chart of another data transmission method provided by another embodiment of the present invention is shown;
[0026] Figure 3 A flowchart of another data transmission method provided by another embodiment of the present invention is shown;
[0027] Figure 4 A flowchart of another data transmission method provided by another embodiment of the present invention is shown;
[0028] Figure 5 A schematic structural diagram of a first device provided by an embodiment of the present invention is shown;
[0029] Figure 6 A schematic structural diagram of another first device provided by an embodiment of the present invention is shown;
[0030] Figure 7A schematic structural diagram of a second device provided in another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0031] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0032] Smart devices usually have external interfaces such as Wifi, Bluetooth, USB, NFC, etc., through which transmission lines between smart devices are formed, and data transmission between smart devices is completed through these transmission lines, thereby realizing the sharing and use of data between smart devices. At present, although smart devices have transmission lines such as Wifi, Bluetooth, USB, NFC, etc., data transmission between smart devices is completed using only one transmission line. This method of using one transmission line to transmit data has at least the following two shortcomings: First, when using one transmission line to transmit data, it is limited by the carrying capacity of the transmission line, resulting in insufficient upper limit of data transmission speed, thereby resulting in low efficiency of data transmission between smart devices. Second, when using one transmission line to transmit data, other transmission lines may be in an idle state, resulting in a waste of transmission line resources. In order to overcome the above shortcomings, an embodiment of the present invention provides a data transmission method, so that when transmitting data between smart devices, the transmission lines possessed by the smart devices are fully utilized to transmit data in parallel, thereby not only improving the efficiency of data transmission between smart devices, but also making full use of the transmission line resources possessed by the smart devices.
[0033] In order to clearly illustrate the data transmission between smart devices, in this embodiment, when data is transmitted between smart devices, the data provider is defined as the first device and the data receiver is defined as the second device. There is a transmission line between the first device and the second device, and the transmission line may include but is not limited to a Wifi transmission line, a Bluetooth transmission line, a USB transmission line, and an NFC transmission line. The method described in this embodiment does not require any changes to the hardware of the smart device, and the transmission line originally possessed by the smart device can be used. In this embodiment, the type of smart device is not specifically limited, and all devices with data transmission requirements can be the smart devices described in this embodiment, which can be handheld terminals, mobile phones, computers and other devices.
[0034] like Figure 1 As shown, an embodiment of the present invention provides a data transmission method, which is applied to a first device and mainly includes:
[0035] 101. Select N target transmission lines from transmission lines between a first device and a second device, where N is greater than or equal to 2.
[0036] The first device described in this embodiment is a data provider, and the second device is a data receiver, and the transmission line between the two is determined based on the transmission lines that the two devices already have. The first device and the second device need to transmit their own transmission lines and the protocol version of the transmission lines to each other, so as to determine the transmission line between the first device and the second device based on these mutually transmitted transmission lines and protocol versions. It should be noted that there are at least two methods for the first device and the second device to transmit their own transmission lines and the protocol version of the transmission lines to each other: First, when the first device initiates a data transmission request to the second device, the transmission is performed, and this method only requires one transmission. Second, considering that the transmission line between the first device and the second device may change, in order to make the transmission line between the first device and the second device consistent with the change in time, the two devices transmit their own transmission lines and the protocol version of the transmission lines to each other at a set frequency.
[0037] Generally speaking, a transmission line between the first device and the second device will be formed only when they have the same type of transmission line. For example, if the first device has a Wifi transmission line and the second device has a Wifi transmission line, then there is a Wifi transmission line between the two devices. In addition, it should be noted that the first device and the second device have the same type of transmission line, but the protocol versions of their transmission lines are different, and a transmission line between the two devices can also be formed. For example, if the first device has a USB2.0 transmission line and the second device has a USB3.0 transmission line, then a USB transmission line can also be formed between the two devices.
[0038] The following is a description of a specific method for selecting a target transmission line, which includes at least the following methods:
[0039] In the first method, the transmission lines between the first device and the second device are both selected as target transmission lines.
[0040] In order to quickly transmit the data to be transmitted from the first device to the second device, all transmission lines between the first device and the second device are selected as target transmission lines.
[0041] The second method is to determine the data type corresponding to the transmission line between the first device and the second device, and select a transmission line with the same data type as the data to be transmitted as the target transmission line.
[0042] In practical applications, in order to better utilize the transmission lines, each transmission line can be assigned its corresponding data type, and it only transmits data with its corresponding data type. A transmission line can correspond to one or more data types.
[0043] When the first device needs to transmit data to be transmitted to the second device, the data type corresponding to each transmission line is determined, and the transmission line with the same data type as the data to be transmitted is selected as the target transmission line.
[0044] Exemplarily, if the data type of the data to be transmitted is verification data, a transmission line corresponding to the data type of verification data is selected as the target transmission line.
[0045] The third method is to determine the carrying capacity corresponding to the transmission line between the first device and the second device, and select a transmission line whose carrying capacity meets the preset carrying capacity requirement as the target transmission line.
[0046] Each transmission line between the first device and the second device has its own carrying capacity, which represents the throughput of the transmission line, and the throughput can be the throughput currently available for the transmission line. It should be noted that the carrying capacity of the transmission line is determined based on the smaller value of the throughput on the first device side and the throughput on the second device side. Exemplarily, the throughput of the USB transmission line on the first device side is 10MB / S, and the throughput of the USB transmission line on the second device side is 5MB / S, then the carrying capacity of the USB transmission line between the first device and the second device is 5MB / S.
[0047] In practical applications, considering that some carrying capacities are too small to contribute much to improving data transmission speed, when selecting a target transmission line, only transmission routes whose carrying capacities meet the preset carrying capacity requirements are selected as target transmission lines.
[0048] Exemplarily, the preset carrying capacity requirement is that the carrying capacity is not less than 10 KB / S, and the carrying capacity of the selected target transmission line is not less than 10 KB / S.
[0049] The fourth type is that if there is a corresponding set time interval for the data to be transmitted, the target transmission line is selected according to the carrying capacity of each transmission line, the size of the data to be transmitted and the set time interval, wherein the set time interval is used to limit the transmission time for the first device to transmit the data to be transmitted to the second device.
[0050] In actual applications, if there is data to be transmitted that needs to be transmitted to the second device within a specific time period, in order to ensure that the data to be transmitted can be transmitted to the second device within the specific time period, it is necessary to set a corresponding set time interval for the data to be transmitted. The set time interval can be set by the first device side or by the second device side, and is not specifically limited in this embodiment.
[0051] If there is a corresponding set time interval for the data to be transmitted, the target transmission line is selected according to the carrying capacity of each transmission line, the size of the data to be transmitted and the set time interval. The method for selecting the target transmission line is specifically described below: First, a first set time and a second set time are selected from the set time interval, wherein the first set time is the lower limit in the preset time interval, and the second set time is the upper limit in the preset time interval. Then, the quotient between the data to be transmitted and the first set time is determined, and the quotient between the size of the data to be transmitted and the second set time is determined, and the two quotients are respectively used as the upper limit and lower limit of the carrying capacity interval to form a carrying capacity interval. Finally, the target transmission line is selected based on the carrying capacity interval, wherein the sum of the carrying capacity of each target transmission line is within the carrying capacity interval. It should be noted that if there are multiple target transmission line selection schemes, and the sum of the carrying capacity of the transmission lines involved in each scheme is within the carrying capacity interval, then the transmission line involved in a scheme can be randomly selected as the target transmission line, or each scheme can be provided to the user, and the transmission line involved in the scheme selected by the user is the target transmission line.
[0052] It should be noted that the first to fourth solutions can be used alone or in combination according to actual business needs. For example, the second method and the third method are used in combination, that is, both the data type and the carrying capacity are considered when selecting the target transmission line.
[0053] 102. Split the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line.
[0054] In practical applications, in order to quickly transmit the data to be transmitted to the second device, the data to be transmitted needs to be split into data blocks corresponding to each target transmission line, so that each target transmission line can quickly transmit the data to be transmitted to the second device within the same time period under its own carrying capacity.
[0055] How to split the data to be transmitted is described below. The splitting process is specifically as follows: determining the ratio between the carrying capacities of the target transmission lines; determining the data block size corresponding to each target transmission line according to the ratio and the size of the data to be transmitted; and splitting the data to be transmitted according to the data block size corresponding to each target transmission line to form data blocks corresponding to each target transmission line.
[0056] Specifically, in order to ensure that the data blocks transmitted by each target transmission line can be transmitted to the second device within the same time period, it is necessary to determine the ratio between the carrying capacities of the target transmission lines, so as to split the data to be transmitted according to the ratio, so that the size of the data blocks corresponding to each target transmission line is suitable for its respective carrying capacity. For example, there are target transmission line 1 and target transmission line 2, wherein the carrying capacity of target transmission line 1 is 10MB / S, and the carrying capacity of target transmission line 2 is 20MB / S, then the carrying capacity ratio between target transmission line 1 and target transmission line 2 is 1:2.
[0057] Specifically, after determining the ratio, it is necessary to determine the data block size corresponding to each of the target transmission lines according to the ratio and the size of the data to be transmitted, so that the size of the data block corresponding to each target transmission line is suitable for its respective carrying capacity. For example, if the size of the data to be transmitted is 60MB, then after determining that the carrying capacity ratio between the target transmission line 1 and the target transmission line 2 is 1:2, it is determined that the data block size corresponding to the target transmission line 1 is 20MB, and the data block size corresponding to the target transmission line 2 is 40MB, and finally the data to be transmitted is split according to the data block size.
[0058] 103. Use the target transmission lines to transmit the corresponding data blocks to the second device in parallel.
[0059] In actual applications, in order to ensure that the data to be transmitted can be quickly transmitted to the second device, each target transmission line is used to transmit the data blocks corresponding to each target transmission line to the second device in parallel. For example, the data block size corresponding to target transmission line 1 is 20MB, and the data block size corresponding to target transmission line 2 is 40MB, then target transmission line 1 transmits 20MB data blocks, and target transmission line 2 transmits 40MB data blocks, and target transmission line 1 and target transmission line 2 transmit in parallel during transmission.
[0060] It should be noted that, in order to ensure the security of the data to be transmitted, each data block needs to be encrypted when each target transmission data is transmitted in data blocks. In addition, verification information needs to be set so that when the second device merges the data blocks to form the data to be transmitted, the authenticity of the data to be transmitted can be verified. In addition, in order for the second device to quickly merge the data blocks to obtain the data to be transmitted, the data blocks should have sequential coding.
[0061] The data transmission method provided by the embodiment of the present invention, when the first device needs to transmit data to the second device, first selects two or more target transmission lines from the transmission line between the first device and the second device. Then, the data to be transmitted is split according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line. Finally, each target transmission line is used to transmit its corresponding data blocks to the second device in parallel. Since the scheme provided by the embodiment of the present invention can use two or more transmission lines to transmit data blocks of a size suitable for the carrying capacity of each transmission line in parallel when transmitting data between two devices, it can not only improve the efficiency of data transmission between devices, but also make full use of the transmission line resources possessed by the devices.
[0062] Further, according to Figure 1 Another embodiment of the present invention also provides a data transmission method, such as Figure 2 As shown, the method is applied to a first device, and the method mainly includes:
[0063] 201. Select N target transmission lines from transmission lines between a first device and a second device, where N is greater than or equal to 2.
[0064] 202. Split the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line.
[0065] 203. Use the target transmission lines to transmit the corresponding data blocks to the second device in parallel.
[0066] 204. Monitor whether the information that the data block is not successfully transmitted is received from the second device. If it is detected, execute 205; otherwise, end the current process.
[0067] In actual applications, in order to ensure that the complete data to be transmitted is transmitted to the second device, it is necessary to monitor whether the information that the data block was not successfully transmitted is received from the second device. The monitoring method can be: after each data block is successfully received by the second device, the second device needs to feedback a successful receipt. If a successful receipt for the data block is not received within a preset time period, it means that the information that the data block was not successfully transmitted is received from the second device, and the data block was not successfully transmitted.
[0068] When it is detected that any data block is not successfully transmitted, step 205 needs to be executed to transmit the data block to the second device again.
[0069] When no information about unsuccessful transmission of the data blocks is detected, it means that the data blocks involved in the data to be transmitted have been successfully transmitted to the second device, and the current process is terminated.
[0070] 205. If information indicating that the data block was not successfully transmitted is received from the second device, determine the data block that was not successfully transmitted.
[0071] In order to ensure the integrity of the data to be transmitted received by the second device, the data block that has not been successfully transmitted is determined to transmit the data block to the second device again.
[0072] 206. Reselect a target transmission line for the data block that was not successfully transmitted according to the size of the data block that was not successfully transmitted and the carrying capacity of each target transmission line.
[0073] In this embodiment, if a data block is not successfully transmitted, the target transmission line for transmitting the data block has an abnormality with a certain probability. Therefore, in order to successfully retransmit the data block, it is necessary to reselect the target transmission line for the data block.
[0074] There are at least two methods for reselecting a target transmission line for a data block that has not been successfully transmitted:
[0075] The first is to select the target transmission line with the largest carrying capacity from among the target transmission lines as the target transmission line for the data block that was not successfully transmitted. It should be noted that the reselected target transmission line is not the transmission line that last transmitted the data block.
[0076] The second method is to select P target transmission lines in order to quickly transmit the unsuccessfully transmitted data blocks to the second device, where P is greater than or equal to 1, and the total carrying capacity of the P target transmission lines can ensure that the unsuccessfully transmitted data blocks are transmitted to the second device in the shortest time. This method requires re-splitting the unsuccessfully transmitted data blocks, and then determining the ratio between the carrying capacities of each target transmission line; determining the data block size corresponding to each of the target transmission lines based on the ratio and the size of the unsuccessfully transmitted data blocks; and splitting the unsuccessfully transmitted data blocks based on the data block size corresponding to each of the target transmission lines to form data blocks corresponding to each of the target transmission lines.
[0077] 207. Transmit the unsuccessfully transmitted data blocks to the second device through the reselected target transmission line.
[0078] In practical applications, in order to ensure that the data blocks that have not been successfully transmitted can be quickly transmitted to the second device, the data blocks corresponding to each target transmission line are transmitted to the second device in parallel using each target transmission line.
[0079] It should be noted that, in order to ensure that the data to be transmitted can be completely transmitted to the second device, step 204 needs to be continued after step 207. Of course, in order to avoid an infinite loop in this process, this process has a termination mechanism, that is, the data blocks that have not been successfully transmitted need to be retransmitted a limited number of times. When the number reaches a threshold, even if step 204 detects that there are data blocks that have not been successfully transmitted again, the subsequent process will be terminated and the alarm and other exception handling procedures will be entered.
[0080] Further, according to Figure 1 Another embodiment of the present invention also provides a data transmission method, such as Figure 3 As shown, the method is applied to a first device, and the method mainly includes:
[0081] 301. Select N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2.
[0082] 302. Split the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line.
[0083] 303. Use the target transmission lines to transmit the corresponding data blocks to the second device in parallel.
[0084] 304. Monitor whether the carrying capacity of the transmission line between the first device and the second device changes. If so, and the transmission of the data to be transmitted to the second device is not completed, execute 305; if no change occurs, and the transmission of the data to be transmitted to the second device is not completed, continue to execute this step 304.
[0085] In actual applications, the carrying capacity of the transmission line between the first device and the second device is the currently available carrying capacity, which changes with the use of the first device and the second device. Exemplarily, if the transmission line between the first device and the second device releases more carrying capacity, the current carrying capacity of the transmission line is greater than that before the release. Therefore, in order to improve the data transmission capacity, it is necessary to monitor the carrying capacity of the transmission line between the first device and the second device, so that when the carrying capacity changes, a transmission scheme suitable for the changed carrying capacity is adopted to continue to transmit data.
[0086] The following is a specific method for monitoring whether the carrying capacity of the transmission line between the first device and the second device has changed: the first device and the second device will exchange the current carrying capacity of their respective transmission lines at a set frequency. If the current carrying capacity of any received transmission line is different from the carrying capacity received last time, it means that the carrying capacity of the transmission line has changed. At this time, if it is determined that the transmission of the data to be transmitted to the second device is not completed, execute 305. If the current carrying capacity of all received transmission lines is the same as the carrying capacity received last time, it means that the carrying capacity of the transmission line has not changed, and continue to execute this step. It should be noted that the judgment principle that the current carrying capacity of the transmission line is the same as the carrying capacity received last time can be the following two: one is that the two carrying capacities are exactly the same, and the other is that the difference between the two carrying capacities is within the preset difference range.
[0087] 305. If the carrying capacity of the transmission line between the first device and the second device changes, and the transmission of the data to be transmitted to the second device is not completed, reselect M target transmission lines, where M is greater than or equal to 1.
[0088] In this embodiment, if the carrying capacity of the transmission line between the first device and the second device changes, and the transmission of the data to be transmitted to the second device is not completed, then in order to quickly transmit the untransmitted part of the data to be transmitted to the second device under the current carrying capacity, it is necessary to reselect M target transmission lines.
[0089] The method for reselecting the M target transmission lines is substantially the same as the method for selecting the N target transmission lines described above, and thus will not be described in detail herein.
[0090] 306. Re-split the data that has not been transmitted to the second device in the data to be transmitted according to the carrying capacity of each re-selected target transmission line to form data blocks corresponding to each re-selected target transmission line.
[0091] In practical applications, in order to enable the data to be transmitted to be quickly transmitted to the second device, it is necessary to split the data that has not been transmitted to the second device in the data to be transmitted to form data blocks corresponding to each target transmission line, so that each target transmission line can quickly transmit the data that has not been transmitted to the second device in the data to be transmitted to the second device within the same time period under its own carrying capacity.
[0092] The following describes how to split the data that is not transmitted to the second device in the data to be transmitted. The splitting process is specifically as follows: determining the ratio between the carrying capacities of the target transmission lines; determining the data block size corresponding to each of the target transmission lines based on the ratio and the size of the data that is not transmitted to the second device in the data to be transmitted; and splitting the data that is not transmitted to the second device in the data to be transmitted based on the data block size corresponding to each of the target transmission lines to form data blocks corresponding to each of the target transmission lines.
[0093] Specifically, in order to ensure that the data blocks transmitted by each target transmission line can be transmitted to the second device within the same time period, it is necessary to determine the ratio between the carrying capacities of the target transmission lines, so as to split the data to be transmitted that is not transmitted to the second device according to the ratio, so that the size of the data blocks corresponding to each target transmission line is suitable for its respective carrying capacity.
[0094] Specifically, after determining the ratio, it is necessary to determine the data block size corresponding to each of the target transmission lines based on the ratio and the size of the data to be transmitted that has not been transmitted to the second device, so that the size of the data block corresponding to each target transmission line is suitable for its respective carrying capacity.
[0095] 307 transmits the corresponding data blocks to the second device in parallel through the reselected target transmission lines, and executes 304.
[0096] In practical applications, in order to ensure that the data to be transmitted can be quickly transmitted to the second device, the data blocks corresponding to each target transmission line are transmitted to the second device in parallel using each target transmission line.
[0097] After executing step 307, it is necessary to execute step 304 again until all the data to be transmitted are successfully transmitted to the second device.
[0098] It should be noted that the above Figure 2 and Figure 3 The two data transmission methods shown can be used in combination.
[0099] like Figure 4 As shown, an embodiment of the present invention provides a data transmission method, which is applied to a second device and mainly includes:
[0100] 401. Receive N data blocks transmitted by a first device in parallel through N target transmission lines, wherein the N target transmission lines are selected from the transmission lines between the first device and the second device, the N data blocks are obtained by splitting the data to be transmitted according to the carrying capacity of each target transmission line, and each target transmission line has its own corresponding data block, and N is greater than or equal to 2.
[0101] In this embodiment, in order to enable the data to be transmitted to be quickly transmitted to the second device, it is necessary to split the data to be transmitted to form data blocks corresponding to each target transmission line, so that each target transmission line can quickly transmit the data to be transmitted to the second device in parallel within the same time period under its own carrying capacity.
[0102] When the second device receives the data blocks, the data blocks may be cached to a designated storage area in a hard disk or memory according to the size of the data blocks and the hardware information of the second device.
[0103] 402. Merge the N data blocks to form the data to be transmitted.
[0104] In this embodiment, when the second device receives all the data blocks for the data to be transmitted, it needs to merge the data blocks to restore the data to be transmitted. It should be noted that in order to ensure that the restored data to be transmitted is legal and complete, it is necessary to verify the data to be transmitted, and the verification process is pre-agreed by the first device and the second device.
[0105] If the data blocks are encrypted, they need to be decrypted before merging. Only after the decryption is successful can the merging process be performed.
[0106] The data transmission method provided by the embodiment of the present invention, when the first device needs to transmit data to the second device, receives N data blocks transmitted by the first device in parallel through N target transmission lines, merges the N data blocks to form data to be transmitted, so that the second device obtains the data to be transmitted. Since the scheme provided by the embodiment of the present invention can use two or more transmission lines to transmit data blocks of a size suitable for the carrying capacity of each transmission line in parallel when transmitting data between two devices, it can not only improve the efficiency of data transmission between devices, but also make full use of the transmission line resources of the devices.
[0107] Furthermore, according to the above Figure 1-Figure 3 Another embodiment of the present invention further provides a first device, such as Figure 5 As shown, the first device includes:
[0108] A selection unit 51, configured to select N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2;
[0109] A splitting unit 52, configured to split the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line;
[0110] The transmission unit 53 is used to transmit the corresponding data blocks to the second device in parallel by using the target transmission lines.
[0111] The first device provided by the embodiment of the present invention, when the first device needs to transmit data to the second device, first selects two or more target transmission lines from the transmission lines between the first device and the second device. Then, the data to be transmitted is split according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line. Finally, each target transmission line is used to transmit its corresponding data blocks to the second device in parallel. Since the solution provided by the embodiment of the present invention can use two or more transmission lines to transmit data blocks of a size suitable for the carrying capacity of each transmission line in parallel when transmitting data between two devices, it can not only improve the efficiency of data transmission between devices, but also make full use of the transmission line resources possessed by the devices.
[0112] Optional, such as Figure 6 As shown, the splitting unit 52 includes:
[0113] The determination module 521 is used to determine the ratio between the carrying capacities of the target transmission lines; and determine the data block size corresponding to each target transmission line according to the ratio and the size of the data to be transmitted;
[0114] The splitting module 522 is used to split the data to be transmitted according to the data block size corresponding to each target transmission line to form data blocks corresponding to each target transmission line.
[0115] Optional, such as Figure 6 As shown, the selection unit 51 includes:
[0116] The first selection module 511 is used to determine the data type corresponding to the transmission line between the first device and the second device; and select a transmission line with the same data type as the data to be transmitted as the target transmission line.
[0117] Optional, such as Figure 6 As shown, the selection unit 51 includes:
[0118] The second selection module 512 is used to select the target transmission line according to the carrying capacity of each transmission line, the size of the data to be transmitted and the set time interval if there is a corresponding set time interval for the data to be transmitted, wherein the set time interval is used to limit the transmission time of the first device to transmit the data to be transmitted to the second device.
[0119] Optional, such as Figure 6 As shown, the first device also includes:
[0120] The retransmission unit 54 is used to determine the data blocks that were not successfully transmitted if information that the data blocks were not successfully transmitted is received as feedback from the second device after the transmission unit 53 transmits the corresponding data blocks to the second device through each of the target transmission lines; reselect the target transmission line for the data blocks that were not successfully transmitted according to the size of the data blocks that were not successfully transmitted and the carrying capacity of each of the target transmission lines; and transmit the data blocks that were not successfully transmitted to the second device through the reselected target transmission line.
[0121] Optional, such as Figure 6 As shown, the first device also includes:
[0122] The updating unit 55 is used to execute the following loop after the transmission unit 53 transmits the corresponding data blocks to the second device in parallel through each of the target transmission lines, until the data to be transmitted is transmitted to the second device: if the carrying capacity of the transmission line between the first device and the second device changes, and the transmission of the data to be transmitted to the second device is not completed, reselect M target transmission lines, where M is greater than or equal to 1; re-split the data that has not been transmitted to the second device in the data to be transmitted according to the carrying capacity of each reselected target transmission line to form data blocks corresponding to each reselected target transmission line; and transmit the corresponding data blocks to the second device in parallel through each reselected target transmission line.
[0123] In the first device provided by the embodiment of the present invention, the detailed description of the method used in the operation process of each functional module can be found in Figure 1-Figure 3 The corresponding method of the method embodiment is explained in detail and will not be repeated here.
[0124] Furthermore, according to the above Figure 4 Another embodiment of the present invention further provides a second device, such as Figure 7 As shown, the second device includes:
[0125] A receiving unit 61 is configured to receive N data blocks transmitted by a first device in parallel through N target transmission lines, wherein the N target transmission lines are selected from the transmission lines between the first device and the second device, the N data blocks are obtained by splitting the data to be transmitted according to the carrying capacity of each target transmission line, and each target transmission line has its own corresponding data block, and N is greater than or equal to 2;
[0126] The merging unit 62 is configured to merge the N data blocks to form the data to be transmitted.
[0127] The second device provided in the embodiment of the present invention receives N data blocks transmitted by the first device in parallel through N target transmission lines when the first device needs to transmit data to the second device, and merges the N data blocks to form data to be transmitted, so that the second device obtains the data to be transmitted. Since the solution provided in the embodiment of the present invention can use two or more transmission lines to transmit data blocks of a size suitable for the carrying capacity of each transmission line in parallel when transmitting data between two devices, it can not only improve the efficiency of data transmission between devices, but also make full use of the transmission line resources of the devices.
[0128] In the second device provided in the embodiment of the present invention, the detailed description of the method used in the operation process of each functional module can be found in Figure 4 The corresponding method of the method embodiment is explained in detail and will not be repeated here.
[0129] Further, according to the above embodiment, another embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute Figures 1 to 3 The data transmission method described in any one of the above, or executing Figure 4 The data transmission method.
[0130] Further, according to the above embodiment, another embodiment of the present invention further provides a storage management device, the storage management device comprising:
[0131] Memory, used to store programs;
[0132] A processor, coupled to the memory, configured to run the program to perform Figures 1 to 3 The data transmission method described in any one of the above, or executing Figure 4 The data transmission method.
[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0136] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0137] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0138] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0139] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0140] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0141] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the operating method, device, and framework of the deep neural network model according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0142] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A data transmission method, characterized in that: Applied to a first device, the method includes: Selecting N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2; Splitting the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line; Utilizing each of the target transmission lines to transmit the corresponding data blocks to the second device in parallel; Execute the following loop until the data to be transmitted is transmitted to the second device: The first device and the second device exchange the carrying capacity of the transmission lines respectively possessed by each of them at a set frequency; If the carrying capacity of any received transmission line is different from the carrying capacity received last time, and the transmission of the data to be transmitted to the second device is not completed, reselect M target transmission lines, where M is greater than or equal to 1; Re-splitting the data that has not been transmitted to the second device in the data to be transmitted according to the carrying capacity of each re-selected target transmission line to form data blocks corresponding to each re-selected target transmission line; The corresponding data blocks are transmitted to the second device in parallel through each reselected target transmission line.
2. The method according to claim 1, characterized in that Splitting the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line includes: Determining a ratio between the carrying capacities of each of the target transmission lines; Determine the data block size corresponding to each of the target transmission lines according to the ratio and the size of the data to be transmitted; According to the data block size corresponding to each of the target transmission lines, the data to be transmitted is split to form data blocks corresponding to each of the target transmission lines.
3. The method according to claim 1, characterized in that: Selecting N target transmission lines from the transmission lines between the first device and the second device includes: Determine a data type corresponding to a transmission line between the first device and the second device; Selecting a transmission line with the same data type as the data to be transmitted as the target transmission line; or, Selecting N target transmission lines from the transmission lines between the first device and the second device includes: If there is a corresponding set time interval for the data to be transmitted, the target transmission line is selected according to the carrying capacity of each transmission line, the size of the data to be transmitted and the set time interval, wherein the set time interval is used to limit the transmission time for the first device to transmit the data to be transmitted to the second device.
4. The method according to any one of claims 1 to 3, characterized in that: After transmitting the corresponding data blocks to the second device in parallel through the target transmission lines, the method further includes: If the information that the data block was not successfully transmitted is received from the second device, determining the data block that was not successfully transmitted; Reselecting a target transmission line for the data block that was not successfully transmitted according to the size of the data block that was not successfully transmitted and the carrying capacity of each of the target transmission lines; The data blocks that were not successfully transmitted are transmitted to the second device through the reselected target transmission line.
5. A first device, characterized in that: The first device comprises: A selection unit, configured to select N target transmission lines from the transmission lines between the first device and the second device, where N is greater than or equal to 2; A splitting unit, used for splitting the data to be transmitted according to the carrying capacity of each target transmission line to form data blocks corresponding to each target transmission line; A transmission unit, configured to transmit the data blocks corresponding to each of the target transmission lines to the second device in parallel; An updating unit is used to execute the following loop until the data to be transmitted to the second device is transmitted completely after the transmission unit transmits the corresponding data blocks to the second device in parallel through each of the target transmission lines: the first device and the second device exchange the carrying capacity of the transmission lines they each have at a set frequency; if the carrying capacity of any received transmission line is different from the carrying capacity received last time, and the transmission of the data to be transmitted to the second device is not completed, then reselect M target transmission lines, where M is greater than or equal to 1; according to the carrying capacity of each reselected target transmission line, re-split the data that has not been transmitted to the second device in the data to be transmitted to form data blocks corresponding to each reselected target transmission line; and transmit the corresponding data blocks to the second device in parallel through each reselected target transmission line.
6. A computer-readable storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the data transmission method according to any one of claims 1 to 4.
7. A storage management device, characterized in that: The storage management device comprises: Memory, used to store programs; A processor, coupled to the memory, is used to run the program to execute the data transmission method according to any one of claims 1 to 4.
