Data sending and receiving method, data transmission system and medium
By splicing and encapsulating data packets based on historical packet rates in data transmission, the problems of data leakage and low transmission efficiency are solved, and safe and efficient data transmission is achieved.
Patent Information
- Application Number
- CN202211708706.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-12-29
Smart Images

Figure CN115987665B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data sending and receiving method, a data transmission system and a medium. Background Art
[0002] During data transmission, when a sender sends a large file to a receiver, it can fragment the file and transmit the resulting sub-files sequentially to the receiver. For example, if a file is 10 gigabytes (GB), the sender can split the file into 10 sub-files of 1 GB each and send each sub-file to the receiver separately.
[0003] In the above data transmission process, when all sub-file data sent by the sender are intercepted by other devices, the other devices can obtain the file data sent by the sender through simple combination, resulting in the leakage of the transmitted data. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a data transmission and reception method, a data transmission system, and a medium to reduce the risk of data leakage caused by data being intercepted by other devices during data transmission and improve the security of data transmission. The specific technical solution is as follows:
[0005] An embodiment of the present application provides a data sending method, which is applied to a sending end, and the method includes:
[0006] Determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet;
[0007] splicing the sub-file data in the at least two original file data based on the first splicing method to obtain at least one spliced data;
[0008] Encapsulating the at least one spliced data into a data packet to obtain a data packet to be sent;
[0009] Send the data packet to be sent to the receiving end.
[0010] The present invention also provides a data receiving method, which is applied to a receiving end and includes:
[0011] receiving at least one data packet to be processed, where the data packet to be processed is a data packet to be sent by a sending end according to any one of the above-mentioned data sending methods;
[0012] Decapsulating each data packet to be processed to obtain the spliced data in each data packet to be processed;
[0013] The original file data is obtained from the spliced data.
[0014] The embodiment of the present application further provides a data transmission system, the system comprising a transmitting end and a receiving end;
[0015] The transmitting end is configured to determine a first splicing method for at least two original file data based on a transmission rate of a historical data packet; splice sub-file data in the at least two original file data based on the first splicing method to obtain at least one spliced data; encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent; and send the data packet to be sent to the receiving end;
[0016] The receiving end is used to receive at least one data packet to be sent; decapsulate each data packet to be sent to obtain spliced data in each data packet to be sent; and obtain original file data from the spliced data.
[0017] The present application also provides a transmitting end, including:
[0018] Memory for storing computer programs;
[0019] The processor is configured to implement any of the above-mentioned data sending methods when executing a program stored in the memory.
[0020] The embodiment of the present application further provides a receiving end, including:
[0021] Memory for storing computer programs;
[0022] The processor is configured to implement any of the above-mentioned data receiving methods when executing a program stored in the memory.
[0023] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned data sending or data receiving methods is implemented.
[0024] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned data sending or data receiving methods.
[0025] Beneficial effects of the embodiments of the present application:
[0026] The technical solution provided in the embodiment of the present application can determine a first splicing method for at least two original file data based on the transmission rate of historical data packets, and based on the first splicing method, splice the sub-file data in the at least two original file data to obtain at least one spliced data, thereby performing data packet encapsulation on each spliced data to obtain a data packet to be sent, and send the data packet to be sent to the receiving end.
[0027] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0028] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0029] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0030] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0032] Figure 1 A schematic diagram of a first flow chart of a data transmission method provided in an embodiment of the present application;
[0033] Figure 2 A second flow chart of the data transmission method provided in an embodiment of the present application;
[0034] Figure 3 A third flow chart of the data transmission method provided in an embodiment of the present application;
[0035] Figure 4 A fourth flow chart of the data transmission method provided in an embodiment of the present application;
[0036] Figure 5-a A first schematic diagram of the original file data provided in an embodiment of the present application;
[0037] Figure 5-b for Figure 5-a A second schematic diagram of the raw file data is shown;
[0038] Figure 5-c for Figure 5-b A first schematic diagram of the spliced data corresponding to the original file data;
[0039] Figure 5-d for Figure 5-b A second schematic diagram of the spliced data corresponding to the original file data;
[0040] Figure 6 A fifth flow chart of the data sending method provided in an embodiment of the present application;
[0041] Figure 7 A sixth flow chart of the data sending method provided in an embodiment of the present application;
[0042] Figure 8-a for Figure 5-a A third schematic diagram of the raw file data is shown;
[0043] Figure 8-b for Figure 8-a A structural diagram of the spliced data corresponding to the original file data;
[0044] Figure 9-a A second schematic diagram of the original file data provided in an embodiment of the present application;
[0045] Figure 9-b for Figure 9-a A schematic diagram of sub-file data corresponding to original file data;
[0046] Figure 9-c for Figure 9-b The first schematic diagram of the spliced data obtained by splicing neutron file data;
[0047] Figure 9-d for Figure 9-b The second schematic diagram of the spliced data obtained by splicing the neutron file data;
[0048] Figure 10 A seventh flow chart of the data sending method provided in an embodiment of the present application;
[0049] Figure 11-a for Figure 5-c A schematic diagram of the spliced data corresponding to the data to be packaged;
[0050] Figure 11-b for Figure 5-d The spliced data shown corresponds to the first schematic diagram of the data to be packaged;
[0051] Figure 11-c for Figure 5-d The spliced data shown corresponds to the second schematic diagram of the data to be packaged;
[0052] Figure 12 A first flow chart of the data receiving method provided in an embodiment of the present application;
[0053] Figure 13 A second flow chart of the data receiving method provided in an embodiment of the present application;
[0054] Figure 14 A third flow chart of the data receiving method provided in an embodiment of the present application;
[0055] Figure 15 A fourth flow chart of the data receiving method provided in an embodiment of the present application;
[0056] Figure 16 A fifth flow chart of the data receiving method provided in an embodiment of the present application;
[0057] Figure 17 for Figure 11-c A schematic diagram of storing data of each sub-file in;
[0058] Figure 18 A signaling diagram of the data transmission process provided in an embodiment of the present application;
[0059] Figure 19 A schematic diagram of the structure of a data sending device provided in an embodiment of the present application;
[0060] Figure 20 A schematic diagram of the structure of a data receiving device provided in an embodiment of the present application;
[0061] Figure 21 A schematic diagram of the structure of a data transmission system according to an embodiment of the present application;
[0062] Figure 22 A schematic diagram of the structure of a transmitting end provided in an embodiment of the present application;
[0063] Figure 23 A schematic diagram of the structure of a receiving end provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0065] In order to solve the problems in the related art, the embodiment of the present application provides a data sending method. Figure 1 As shown, Figure 1 The first flow chart of the data sending method provided in the embodiment of the present application is as follows: The method is applied to the sending end and specifically includes the following steps.
[0066] Step S101: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0067] Step S102: splicing sub-file data in at least two original file data based on a first splicing method to obtain at least one spliced data.
[0068] Step S103: encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent.
[0069] Step S104: Send the data packet to be sent to the receiving end.
[0070] In the embodiments of the present application, the transmitting end is a device that sends data packets to be sent, and the receiving end is a device that receives data packets to be sent from the transmitting end. For example, when a user sends file data to a server, the transmitting end can be a device used by the user, such as a mobile phone, computer, tablet, etc., and the receiving end can be a server. For another example, when a user watches video file data, the transmitting end is a video acquisition device or server, etc., and the receiving end can be a video display device. Depending on the specific application scenarios corresponding to the above-mentioned data transmission process, the transmitting end and the receiving end may also differ. Here, the transmitting end and the receiving end are not specifically limited.
[0071] pass Figure 1 The method shown can determine a first splicing method for at least two original file data based on the transmission rate of historical data packets, and based on the first splicing method, splice the sub-file data in the at least two original file data to obtain at least one spliced data, thereby performing data packet encapsulation on each spliced data to obtain a data packet to be sent, and send the data packet to be sent to the receiving end.
[0072] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0073] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0074] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0075] The embodiments of the present application are described below through specific examples.
[0076] Regarding the above step S101 , that is, based on the transmission rate of the historical data packets, a first splicing method of at least two original file data is determined.
[0077] In an embodiment of the present application, the sending end can determine the splicing method corresponding to at least two original file data in the current time period (recorded as the second time period) according to the preset time period and the transmission rate of the historical data packet.
[0078] In an optional embodiment, when the sending end determines that at least two original file data need to be spliced, it may determine a splicing method (referred to as a first splicing method) for the at least two original file data based on a historical data packet transmission rate.
[0079] In another optional embodiment, the sending end may determine a splicing method corresponding to a time period based on the historical data packet transmission rate at the end time point of the time range corresponding to each time period. When the sending end determines that at least two original file data need to be spliced, it may obtain the splicing method corresponding to the time period in which the current time falls and use it as the first splicing method for the at least two original file data.
[0080] The transmission rate of the historical data packets may be an average transmission rate of data packets sent by the sending end in each time period.
[0081] The above-mentioned original file data can be video file data, voice file data, text file data, or image file data, etc. In addition, the above-mentioned original file data can be stored locally on the above-mentioned sending end, or stored on another device. For example, when the above-mentioned original file data is video file data, the video file data can be obtained by the sending end from a video capture device, or the sending end acting as a video capture device can obtain and store the video file data in real time from the capture scene. The type of the above-mentioned original file data and the device storing the original file data are not specifically limited here.
[0082] The aforementioned splicing method may include information such as the amount of spliced data and the order of splicing. The amount of spliced data may be the first amount of data of the spliced sub-file data from at least two original file data; alternatively, the amount of spliced data may be the second amount of data of the spliced data obtained by splicing the sub-file data from at least two original file data. The order of splicing may be the order of splicing the sub-file data from at least two original file data. The information included in the aforementioned splicing method is not specifically limited. For ease of understanding, the following description uses the second amount of data as an example, which does not serve any limiting purpose.
[0083] The above data amount can be expressed as a numerical value such as the number of bytes. For example, the second data amount can be expressed as the number of bytes included in the spliced data obtained by splicing.
[0084] Regarding the above step S102 , that is, based on the first splicing method, the sub-file data in at least two original file data are spliced to obtain at least one spliced data.
[0085] In this step, after determining the first splicing method, the sending end may splice the sub-file data in the at least two original file data according to the first splicing method to obtain one or more spliced data. For example, the sending end may splice the sub-file data in the at least two original file data according to the splicing data volume in the first splicing method to obtain spliced data, where the data volume of each spliced data matches the splicing data volume.
[0086] In the embodiment of the present application, since the number of the original file data is at least two, the number of sub-file data obtained from each original file data may also be one or more. Therefore, when the sub-file data are spliced in step S102, the number of spliced data obtained by splicing may be one or more. Here, the number of spliced data obtained by splicing is not specifically limited.
[0087] In an optional embodiment, for the sub-file data in the original file data, when the data size of the original file data is not greater than a preset data size threshold, that is, when the data size of the original file data is relatively small, the sub-file data in the original file data may be the entire original file data. In this case, the number of sub-file data in the original file data is one.
[0088] In another optional embodiment, when the data volume of the original file data is greater than a preset data volume threshold, that is, when the data volume of the original file data is relatively large, the sub-file data in the original file data may be partial data in the original file data. In this case, the number of sub-file data in the original file data is multiple.
[0089] The preset data volume threshold can be set based on user needs, the type of original file data, the first data volume, and the like. Furthermore, depending on the amount of data contained in each original file data and the value of the preset data volume threshold, the number of sub-file data in each original file data may also vary. The preset data volume threshold and the number of sub-file data in each original file data are not specifically limited herein. For ease of understanding, the following description will be based on an example in which each original file data includes multiple sub-file data, which is not intended to be limiting in any way.
[0090] The data amounts of each spliced data item obtained by the splicing may be the same or different. For example, when the spliced data item is the first data amount, that is, the data amount of each sub-file data item is the same, in this case, since the number of sub-file data items spliced together may be the same or different, the data amounts of each spliced data item obtained by the splicing may be the same or different. Here, the data amount of each spliced data item is not specifically limited.
[0091] With respect to the above step S103 , data packet encapsulation is performed on at least one spliced data to obtain a data packet to be sent.
[0092] In an optional embodiment, for each spliced data in the above step S102, the sending end may encode the spliced data using a preset encoding algorithm to obtain encoded spliced data, and encapsulate the encoded spliced data to obtain a data packet to be sent.
[0093] The data packet encapsulation process may include the encoding and encapsulation. The encoded spliced data may be a binary number. The encapsulation of the encoded spliced data may be performed according to the transmission protocol between the sender and the receiver. For example, when the sender and the receiver use the Transmission Control Protocol (TCP) to transmit data, the sender may encapsulate the spliced data into a TCP data packet. For another example, when the sender and the receiver use the User Datagram Protocol (UDP) to transmit data, the sender may encapsulate the spliced data into a UDP data packet. The encoding and encapsulation processes are not described in detail herein.
[0094] In the embodiment of the present application, the data packet to be sent may include, in addition to the encoded spliced data, other data, such as an encoded splicing sequence, etc. The splicing sequence is used to indicate the order in which the original file data corresponding to each sub-file data is arranged. The details are described below and are not repeated here.
[0095] Regarding the above step S104, the data packet to be sent is sent to the receiving end.
[0096] In this step, according to the different transmission protocols between the sending end and the receiving end, the sending end may use the corresponding transmission protocol to send the data packet to be sent to the receiving end.
[0097] For example, when TCP transmission is adopted between the sending end and the receiving end, the sending end and the receiving end can send and receive data packets to be sent according to the TCP transmission process.
[0098] For another example, when UDP is used for transmission between the sending end and the receiving end, the sending end and the receiving end can send and receive data packets to be sent according to the UDP transmission process.
[0099] In an optional embodiment, during the UDP transmission process, in order to improve the reliability of the transmission of the data packet to be sent, the receiving end may perform a verification on the received data packet to be sent, for example, using a message digest algorithm (MD5) code verification. The verification process is not described in detail here.
[0100] In an optional embodiment, when the first splicing method includes the amount of splicing data, according to the above Figure 1 The method shown in the embodiment of the present application also provides a data sending method. Figure 2 As shown, Figure 2 This is a second flow chart of the data sending method provided in the embodiment of the present application. Figure 2 In the method shown, the above step S101 is refined into the following steps, namely step S1011 to step S1012.
[0101] Step S1011 , when the first transmission rate is greater than the second transmission rate, adjusting the amount of spliced data in the second splicing method corresponding to the first time period to obtain a first splicing method for at least two original file data.
[0102] The first transmission rate is the average transmission rate of historical data packets in the first time period, the first time period is the time period before the second time period of the current time, and the second transmission rate is the average transmission rate of historical data packets in the time period before the first time period.
[0103] In an optional embodiment, for the above-mentioned average transmission rate, the sending end can count the number of data packets sent by the sending end within each time period at the end time point of the time range corresponding to the time period, and calculate the quotient between the number and the length of the time period as the average transmission rate of the historical data packets within the time period.
[0104] In another optional embodiment, for the above average transmission rate, the user can use a monitoring device to monitor the transmission rate of the data packets sent by the sender. The sender obtains the average transmission rate of the historical data packets in each time period from the monitoring device.
[0105] In the embodiment of the present application, there is no specific limitation on the method for obtaining the above-mentioned average transmission rate.
[0106] The duration of each of the above time periods may be a value such as 30 seconds or 60 seconds. Here, the duration of each of the above time periods is not specifically limited.
[0107] In this embodiment of the present application, when the first transmission rate is greater than the second transmission rate, the sending end linearly adjusts the amount of spliced data in the second splicing method corresponding to the first time period to obtain a new splicing method. In this case, the sending end can determine the new splicing method as the first splicing method for the at least two original file data.
[0108] In the embodiment of the present application, the amount of spliced data in the splicing mode corresponding to the first time period may be a preset value, such as 300 kilobytes (KB), and the preset value is not specifically limited.
[0109] Step S1012: When the first transmission rate is not greater than the second transmission rate, the second splicing method is determined as the first splicing method of the at least two original file data.
[0110] In this embodiment of the present application, when the first transmission rate is not greater than the second transmission rate, the sending end may not adjust the amount of spliced data in the second splicing method corresponding to the first time period. That is, the second splicing method remains unchanged. In this case, the sending end may determine the second splicing method as the first splicing method for the at least two original file data.
[0111] In the embodiment of the present application, the above-mentioned step S1011 and step S1012 are steps respectively executed when the comparison results of the first transmission rate and the second transmission rate are different. Here, the execution of the above-mentioned step S1011 and step S1012 is not specifically limited.
[0112] Through the above-mentioned steps S1011-S1012, the sending end can adjust the amount of splicing data in the splicing method based on the comparison results of the first transmission rate and the second transmission rate when the transmission rate of the historical data packets increases significantly. Through the continuous adjustment process, the amount of splicing data in the splicing method can be matched with the network status of the current network, thereby reducing the transmission time of the data packets to be sent and improving the transmission rate of the data packets to be sent.
[0113] In an optional embodiment, with respect to the above step S1011, the sending end may adjust the amount of spliced data in the second splicing mode corresponding to the first time period according to a preset step size to obtain the first splicing mode of at least two original file data.
[0114] In another optional embodiment, with respect to the above step S1011, the sending end may adjust the amount of spliced data in the second splicing mode corresponding to the first time period within a preset data amount range to obtain the first splicing mode of at least two original file data.
[0115] In another optional embodiment, for the above step S1011, the sending end can adjust the amount of spliced data in the second splicing method corresponding to the first time period within a preset data amount range according to a preset step size to obtain the first splicing method of at least two original file data.
[0116] For ease of understanding, the adjustment of the splicing data size is explained below. It is assumed that the preset data size range is 300KB-500KB, the splicing data size is 300KB, and the preset step size is 20KB.
[0117] During the first time period, the total size of each piece of data spliced together by the sender is 300 KB. The sender calculates the average data transmission rate of the data packets during the current time period, such as rate 1. Since the second transmission rate does not exist, the sender directly adjusts the total size of the spliced sub-file data according to the preset step size, i.e., 300 + 20 = 320 KB.
[0118] During the second time period, the sender concatenates the sub-file data, resulting in a total data size of 320 KB for each concatenated data item. At this point, the sender calculates the average data transmission rate for the current time period, for example, rate 2, which is greater than rate 1. Because rate 2 is greater than rate 1, the sender adjusts the total data size of the concatenated sub-file data items according to the preset step size, i.e., 320 + 20 = 340 KB.
[0119] During the third time period, the total data size of each piece of data spliced together by the sender through the sub-file data splicing is 340 KB. At this point, the sender calculates the average data transmission rate for the data packets during the current time period. For example, rate 3, and rate 2 > rate 3. Since rate 2 > rate 3, the sender does not need to adjust the total data size of the sub-file data splicing. In other words, the total data size of the sub-file data splicing performed by the sender during the third time period remains 340 KB. This process is repeated in this way, achieving adjustments to the total data size of the sub-file data splicing during each time period.
[0120] In the above embodiment, when the sending end adjusts the total data amount of the sub-file data splicing, since the total data amount of the sub-file data splicing is linearly adjusted within the above-mentioned preset data amount range, i.e., between 300KB and 500KB, the above-mentioned adjustment process can not only adjust upward but also adjust downward.
[0121] For example, within a certain time period, if the total data size of the spliced sub-file data in the Tth time period is 400KB, and the average transmission rate in the current time period is lower than the average transmission rate in the T-1th time period, the sender can adjust the spliced data size in the splicing method corresponding to the Tth time period downward, that is, the spliced data size in the splicing method corresponding to the T+1th time period is lower than the splicing data size in the splicing method corresponding to the Tth time period.
[0122] In an optional embodiment, the preset step size for upward adjustment may be larger than the preset step size for downward adjustment. For example, the preset step size for upward adjustment may be 20 KB, and the preset step size for downward adjustment may be 10 KB.
[0123] In an optional embodiment, when the error between the first transmission rate and the second transmission rate is less than a preset error threshold, the sending end may stop adjusting the amount of spliced data in the splicing method. Specifically, when the error between the first transmission rate and the second transmission rate is less than the preset error threshold, the sending end may determine that the transmission time corresponding to the spliced data obtained by splicing the sub-file data using the splicing data amount in the second splicing method is minimized, and accordingly, the data packet transmission rate is maximized.
[0124] Through the above-mentioned adjustment of the amount of spliced data, the sending end can adjust the amount of spliced data in the splicing method used for splicing the sub-file data in real time, thereby adjusting the size of the data packet to be sent, so that the size of the data packet to be sent matches the network status at the current moment, thereby reducing the transmission time of the data packet to be sent and improving the transmission rate of the data packet to be sent.
[0125] In the above Figure 2 In the illustrated embodiment, the amount of data to be spliced in the splicing method is adjusted by comparing the first transmission rate with the second transmission rate. Alternatively, the sending end can also adjust the amount of data to be spliced in the splicing method based on the error between the first transmission rate and a preset third transmission rate. The third transmission rate is the maximum transmission rate at which the sending end can transmit data packets under ideal conditions, i.e., when the network is stable and the transmission bandwidth is maximized.
[0126] In the above embodiment, only the adjustment of the splicing data volume in the splicing method is described. In addition, other parameters in the above splicing method besides the splicing data volume can also be adjusted. For example, the splicing order in the above splicing method can be adjusted in real time based on user needs. The adjustment of other parameters in the above splicing method will not be described in detail here.
[0127] In an optional embodiment, when the amount of splicing data in the first splicing mode is the first amount of data, according to the above Figure 1 The method shown in the embodiment of the present application also provides a data sending method. Figure 3 As shown, Figure 3 This is a third flow chart of the data sending method provided in an embodiment of the present application. The method includes the following steps.
[0128] Step S301: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0129] The above step S301 is the same as the above step S101.
[0130] Step S302: If the splicing data amount included in the first splicing method is the first data amount, then sub-file data is obtained from at least two original file data respectively according to the first data amount.
[0131] Step S303: splicing the sub-file data corresponding to at least two original file data to obtain at least one spliced data.
[0132] The above steps S302 to S303 are refinements of the above step S102.
[0133] Step S304: encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent.
[0134] Step S305: Send the data packet to be sent to the receiving end.
[0135] The above steps S304 to S305 are the same as the above steps S103 to S104.
[0136] In an optional embodiment, when the above-mentioned splicing method further includes indicating the number of sub-file data to be spliced, according to the above-mentioned Figure 3 The method shown in the embodiment of the present application also provides a data sending method. Figure 4 As shown, Figure 4 This is a fourth flow chart of the data sending method provided in an embodiment of the present application. The method includes the following steps.
[0137] Step S401: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0138] The above step S401 is the same as the above step S301.
[0139] Step S402 : According to the data location information in each original file data, file data that matches the first data amount and has not been acquired is obtained from at least two original file data in parallel as sub-file data corresponding to the at least two original file data.
[0140] In this step, the original file data is stored in different other devices, or in different storage spaces of the same other device. In this case, when the sending end obtains the sub-file data from at least two original file data, it can read the same amount of data (i.e., the first amount of data) and the file data that has not been obtained from each original file data in parallel according to the data location information in each original file data as the sub-file data corresponding to each original file data.
[0141] For ease of understanding, combined Figure 5-a and Figure 5-b Take this as an example to illustrate. Figure 5-a This is a first schematic diagram of the original file data provided in an embodiment of the present application. Figure 5-b for Figure 5-a A second schematic diagram of the original file data is shown.
[0142] exist Figure 5-a The original file data in the file A includes file A, file B and file C. Each original file data is stored in a different device, and each original file data includes the same amount of data.
[0143] The sender is from Figure 5-a When obtaining sub-file data from the original file data shown in FIG, the sub-file data can be obtained in sequence according to the position information of each data in each original file data. Figure 5-b The file A shown includes data A1, data A2, data A3 and data A4. The arrangement order obtained by arranging the sub-file data according to the position in the data A is: data A1, data A2, data A3, data A4.
[0144] Now assume Figure 5-b The data volume corresponding to each sub-file data in is the first data volume. When the sending end first reads sub-file data from files A, B, and C, it reads data A1, data B1, and data C1, respectively. Data A1 is the sub-file data corresponding to file A, data B1 is the sub-file data corresponding to file B, and data C1 is the sub-file data corresponding to file C.
[0145] When the sending end reads sub-file data from different original file data, it can use a preset file reading function to read the sub-file data. The file reading function used by the sending end varies depending on the type of original file data. The method for reading sub-file data is not specifically limited herein.
[0146] In the embodiment of the present application, the number of the sub-file data obtained and the first data amount are different according to the different amounts of the above-mentioned original file data and the different amounts of data included in each original file data. Here, the number of the above-mentioned sub-file data and the above-mentioned first data amount are not specifically limited.
[0147] In the embodiments of the present application, the representation of data location information within different types of raw file data varies. For example, when the raw file data is video data, the data location information can be represented as the timestamp corresponding to each video frame. For another example, when the raw file data is image data, the data location information can be represented as the coordinate position of each pixel. The representation of data location information within different types of raw file data is not specifically limited. For ease of understanding, the following description will only use the raw file data as an example, which is not intended to be limiting.
[0148] In an embodiment of the present application, the parallel acquisition of the above sub-file data can be achieved through multiple processes in the sending end.
[0149] The above step S402 is a refinement of the above step S302.
[0150] Through step S402, the sending end can directly read the sub-file data in parallel from the device storing the original file data for subsequent splicing and transmission, thus avoiding the waste of computing and storage resources caused by the sending end directly obtaining the different original file data, thereby saving resources on the sending end. In addition, parallel reading can effectively improve the efficiency of obtaining sub-file data.
[0151] Step S403 : splicing the sub-file data corresponding to at least two original file data according to the splicing quantity to obtain at least one spliced data.
[0152] In this step, in addition to the amount of splicing data, the first splicing method may also include splicing data indicating the number of sub-file data to be spliced. The sending end may splice the sub-file data corresponding to at least two original file data according to the splicing data to obtain one or more spliced data. The number of sub-file data included in each spliced data item matches the splicing quantity.
[0153] In the embodiment of the present application, the sub-file data are spliced in different ways according to the number of sub-file data read and the size of the first data volume.
[0154] In an optional embodiment, when the number of original file data matches the above-mentioned splicing number, that is, when the number of sub-file data read from each original file data is the splicing number, the sending end can splice all the obtained sub-file data to obtain spliced data.
[0155] For ease of understanding, we still use the above Figure 5-b For example, let's assume that the sub-file data obtained by the sender is the above-mentioned data A1, data B1 and data C1. At this time, the sender can splice data A1, data B1 and data C1 to obtain spliced data, which can be specifically as follows: Figure 5-c Data 1 shown. Figure 5-c for Figure 5-b The first schematic diagram of the spliced data corresponding to the original file data.
[0156] In the embodiment of the present application, by splicing all sub-file data, the amount of spliced data is maximized while ensuring that the spliced data can be successfully transmitted to the receiving end, thereby effectively improving the efficiency of data transmission.
[0157] In another optional embodiment, when the amount of original file data is greater than the aforementioned splicing amount, the sending end may splice the sub-file data whose amount matches the splicing amount among all acquired sub-file data to obtain multiple spliced data.
[0158] For ease of understanding, it is assumed that the sending end obtains the above-mentioned Figure 5-b In addition to the data A1 , data B1 , and data C1 shown, data D1 from file D, data E1 from file E, and data F1 from file F are also acquired.
[0159] If the number of splicing is 2, the sender can select any two sub-files to splice when splicing the acquired data. For example, the sender can splice data A1 and data B1 to obtain spliced data 1, splice data C1 and data D1 to obtain spliced data 2, and splice data E1 and data F1 to obtain spliced data 3.
[0160] In an embodiment of the present application, by splicing sub-file data obtained from at least two original file data, the spliced data can be successfully transmitted to the receiving end, thereby enriching the combination splicing method of different sub-file data, increasing the difficulty of obtaining the original file data through the combination method after the data is intercepted, and improving the security of data transmission.
[0161] In the embodiment of the present application, since the sub-file data obtained in the above step S402 are all from different original file data, the splicing of any two sub-file data can meet the requirement that the spliced data at least includes sub-file data from two different original file data.
[0162] When the sending end splices all the sub-file data acquired in step S402, the number of sub-file data included in each spliced data (i.e., the splicing quantity) can be determined based on the current network transmission bandwidth, the first data size of each sub-file data, and other parameters. Alternatively, the number can be a preset value, which is then adjusted based on parameters such as the current network transmission bandwidth and the data size of each sub-file data. The number of sub-file data included in each spliced data is not specifically limited.
[0163] In the embodiment of the present application, due to the different types of original file data, the types of the acquired sub-file data also vary. Therefore, the spliced data obtained in step S403 may include sub-file data of different types. In other words, step S403 can implement splicing of sub-file data of different types. For example, the sending end can splice video sub-file data and audio sub-file data.
[0164] In the above step S403, for each spliced data, when the sub-file data included in any two spliced data come from the same original file data, Figure 5-c The sub-file data included in data 1 to data 4 are all from Figure 5-a At this time, when the sending end splices the sub-file data, the splicing order of the sub-file data can be different.
[0165] For ease of understanding, Figure 5-d Take this as an example to illustrate: Figure 5-d for Figure 5-b The second schematic diagram of the spliced data corresponding to the original file data.
[0166] exist Figure 5-d In the data 1, the order of splicing each sub-file data is: file A, file B, file C, the order of splicing each sub-file data in data 2 is: file C, file B, file A, the order of splicing each sub-file data in data 3 is: file C, file A, file B, the order of splicing each sub-file data in data 4 is: file B, file A, file C. Each sub-file data in data 1-data 4 comes from the above Figure 5-bHowever, the splicing method corresponding to each sub-file data in data 1 to data 4 is different. Here, the splicing method of the above sub-file data is not specifically limited.
[0167] Step S404: encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent.
[0168] Step S405: Send the data packet to be sent to the receiving end.
[0169] The above steps S404 to S405 are the same as the above steps S304 to S305.
[0170] Step S406, after sending the data packet to be sent to the receiving end, returns to the step of obtaining, in parallel, from at least two original file data, file data that matches the first data amount and has not been obtained, based on the location information of the data in each original file data, as sub-file data corresponding to the at least two original file data, until all the data in each original file data is obtained.
[0171] In the embodiment of the present application, after executing step S405, the sending end may return to executing step S402, i.e., returning to executing the step of concurrently acquiring, based on the data location information in each original file data, file data that matches the first data amount and has not been acquired from at least two original file data as sub-file data corresponding to the at least two original file data, until all data in each original file data is acquired. In other words, the unspliced sub-file data is re-read from the original file data until all data in each original file data is spliced.
[0172] In the above embodiment, step S406 is performed after step S405. Alternatively, step S406 may also be performed after step S402. The execution time of step S406 is not specifically limited.
[0173] Through the above step S406, the sending end can splice the sub-file data corresponding to each original file data according to the method shown in the above steps S402-S403 to obtain multiple spliced data, such as Figure 5-c As shown in data 1 to data 4, the data packet to be sent corresponding to each spliced data is transmitted to the receiving end, which improves the security and efficiency of data transmission while realizing the transmission of each original file data.
[0174] In the above Figure 4 In the illustrated embodiment, since the splicing method includes the amount of splicing data and the number of splicing data, based on the first splicing method, the amount of data of each spliced data obtained by splicing is also the same.
[0175] In an optional embodiment, when the amount of spliced data in the first splicing method is the second amount of data, according to the above Figure 1 The method shown in the embodiment of the present application also provides a data sending method. Figure 6 As shown, Figure 6 This is a fifth flow chart of the data sending method provided in an embodiment of the present application. The method includes the following steps.
[0176] Step S601: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0177] The above step S601 is the same as the above step S101.
[0178] Step S602: if the amount of spliced data included in the first splicing method is the second amount of data, sub-file data is obtained from at least two original file data respectively.
[0179] Step S603: splicing the sub-file data corresponding to at least two original file data according to the second data volume to obtain at least one spliced data.
[0180] The above steps S602 to S603 are refinements of the above step S102.
[0181] Step S604: encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent.
[0182] Step S605: Send the data packet to be sent to the receiving end.
[0183] The above steps S604 to S605 are the same as the above steps S103 to S104.
[0184] In an optional embodiment, according to the above Figure 6 The method shown in the embodiment of the present application also provides a data sending method. Figure 7 As shown, Figure 7 This is a sixth flow chart of the data sending method provided in an embodiment of the present application. The method includes the following steps.
[0185] Step S701: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0186] The above step S701 is the same as the above step S601.
[0187] Step S702: If the first splicing method includes a splicing data volume of the second data volume, each original file data is segmented to obtain a plurality of sub-file data; wherein the third data volume corresponding to each sub-file data is smaller than the second data volume, and the third data volumes corresponding to the sub-file data are the same / different.
[0188] In an optional embodiment, for each original file data, the sending end may perform segmentation processing on the original file data according to a fixed data volume to obtain a plurality of sub-file data corresponding to the original file data.
[0189] For ease of understanding, we still use the above Figure 5-a and Figure 5-b The sending end can use the first data volume as an example to illustrate. Figure 5-a The files A, B and C in the file are sliced and processed, and the results are as follows Figure 5-b The sub-file data in file A, file B and file C shown are Figure 5-b Data A1-data A4, data B1-data B4 and data C1-data C4 in.
[0190] In another optional embodiment, for different original file data, the sending end can use different methods to slice the original file data to obtain multiple sub-file data. Specifically, the sending end can slice the original file data evenly or unevenly.
[0191] For ease of understanding, combined Figure 8-a Take this as an example to illustrate. Figure 8-a for Figure 5-a A third schematic diagram of the original file data is shown.
[0192] exist Figure 8-a In the example, when the sending end performs sharding on file A, it performs uniform sharding on file A, resulting in eight sub-files of equal data size, namely, data A1 to data A8. When the sending end performs sharding on files B and C, it performs uneven sharding on files B and C, resulting in different sub-files, namely, data B1 to data B4, and data C1 to data C4.
[0193] In the embodiment of the present application, there are no specific limitations on the manner in which each original file is sliced, the number of sub-file data obtained by the slice processing, and the amount of data included in each sub-file data.
[0194] The above step S702 is a refinement of the above step S602.
[0195] Through step S702, the sending end obtains multiple original file data from other devices, allowing it to segment each original file data in different ways. This expands the segmentation processing methods for sub-file data, increases the number of sub-file data, and improves the diversity of the obtained sub-file data. This also facilitates the subsequent data splicing process for all sub-file data, thereby enriching the sub-file data splicing methods, improving the diversity of data splicing, and enhancing the security of data splicing.
[0196] For example, compared to the above step S402, Figure 5-b The sub-file data shown in step S702 is obtained as follows Figure 8-a The sub-file data shown, Figure 8-a In the data, both the number of sub-file data and the sub-file data types represented by different data volumes are significantly higher than those in the Figure 5-b The sub-file data shown is richer, providing more possibilities for the subsequent splicing of sub-file data.
[0197] Step S703: splicing the sub-file data corresponding to at least two original file data according to the second data volume to obtain at least one spliced data.
[0198] In an optional embodiment, for each sub-file data, at least two sub-file data with matching relative positions are spliced according to the second data volume to obtain multiple spliced data, and the relative position of each sub-file data is: the relative position of the sub-file data in all sub-file data obtained by processing the corresponding original file data fragments.
[0199] For ease of understanding, we still use the above Figure 5-b and Figure 5-c In Figure 5-b In the example, each sub-file data corresponds to the same data size, i.e., the data size is the first data size described above. Furthermore, each sub-file data has a corresponding relative position. For example, in file A, data A1 comes before data A2, data A3, and data A4. Therefore, the relative position of data A1 can be recorded as position 1. Similarly, the relative position of data A2 is position 2, the relative position of data A3 is position 3, and the relative position of data A4 is position 4.
[0200] When splicing sub-file data, the sending end can splice sub-file data whose relative positions match and whose total data volume is the second data volume to obtain spliced data. For example, the second data volume is three times the first data volume. Since the relative positions corresponding to data A1 in file A, data B1 in file B, and data C1 in file C are all position 1, that is, the relative positions match, the sending end can splice data A1, data B1, and data C1 to obtain Figure 5-c Similarly, the sender can concatenate data A2, data B2, and data C2 to obtain Figure 5-c Data 2 in the example, concatenate data A3, data B3 and data C3 to obtain Figure 5-c Data 3 in the example, concatenate data A4, data B4 and data C4 to obtain Figure 5-c The data in 4.
[0201] In the embodiment of the present application, since the relative position of each sub-file data in its corresponding original file data is unique, at least two sub-file data with matching relative positions must be from different original file data. The above-mentioned splicing of sub-file data with matching relative positions can achieve the splicing of sub-file data from different original file data.
[0202] In another optional embodiment, for each sub-file data, sub-file data corresponding to at least two original file data with mismatched relative positions are spliced according to the second data volume to obtain a plurality of spliced data.
[0203] For ease of understanding, Figure 8-a Combine Figure 8-b Take the following example to illustrate. Figure 8-b for Figure 8-a A structural diagram of the spliced data corresponding to the original file data.
[0204] Regarding the above Figure 8-a The sending end can splice the sub-file data obtained by fragmenting the files A, B and C shown in the figure, but the total data volume of the sub-file data does not match the relative position, and obtain the spliced data. Figure 8-a The data A1, data B2, data A2, data C3 and data A5 in the above table are combined to obtain Figure 8-b The data shown in 1 is Figure 8-a The data A3, data A4, data B1, data C1, data B4 and data A8 in the above table are combined to obtain Figure 8-b The data 2 shown in FIG5-a is combined with the data A6, data C4, data A7, data C2 and data B3 to obtain Figure 8-b Data 3 is shown.
[0205] In an optional embodiment, since the sending end may randomly fragment the original file data when executing S702 above, the data size of each sub-file data obtained from the fragmentation may vary. In this case, when executing step S703 above, it is difficult to ensure that the total data size of each sub-file data is exactly the second data size when splicing the multiple sub-file data. Therefore, the sending end may select a sub-file data splicing method that minimizes the error between the total data size and the second data size. Furthermore, when splicing the sub-file data, the sending end may add a corresponding amount of invalid data to the spliced data based on the error between the total data size and the second data size, and record the location of the added invalid data. When splicing the data, the receiving end may, based on the recorded location, not obtain the data at the corresponding location in the spliced data. The location of the added invalid data is not specifically limited herein.
[0206] In the embodiment of the present application, the invalid data is data that the receiving end will not obtain when obtaining the sub-file data corresponding to the original file data from the spliced data. The invalid data can be data in other original file data or other data. The invalid data is not specifically limited here.
[0207] In another optional embodiment, to ensure that the total data size of the spliced data obtained in step S703 is the second data size, the sending end may, when performing the fragmentation processing on each original file data in step S702, fragment the original file data according to the values whose sum equals the second data size, thereby facilitating the subsequent splicing of the sub-file data. For example, if the second data size is 10 and there are 3 original file data, the original file data may be fragmented in the form of 1+5+4=10, 2+3+5=10, 4+3+2=10, etc. The fragmentation method is not specifically limited herein.
[0208] Through the above-mentioned step S703, the sending end can, based on the relative position of each sub-file data in its corresponding original file data, splice the sub-file data with matching relative positions, or splice the sub-file data with mismatched relative positions, thereby effectively enriching the method of splicing sub-file data, thereby increasing the diversity of the spliced data obtained by splicing, improving the security of the spliced data, and further reducing the risk of data leakage caused by data interception, thereby improving the security of data transmission.
[0209] Step S704: encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent.
[0210] Step S705: Send the data packet to be sent to the receiving end.
[0211] The above steps S704 to S705 are the same as the above steps S604 to S605.
[0212] In the above Figure 4 and Figure 7 In the illustrated embodiments, the example is taken where the original file data includes the same amount of data. When the amounts of data included in the multiple original file data are different, the sending end may use other methods to splice the sub-file data.
[0213] For ease of understanding, the above Figure 4 The method shown, combined with Figure 9-a 、 Figure 9-b 、 Figure 9-c and Figure 9-d Take the example to illustrate the splicing of the above sub-file data. Figure 9-a A second schematic diagram of the original file data provided in an embodiment of the present application. Figure 9-b for Figure 9-a A schematic diagram of sub-file data corresponding to the original file data. Figure 9-c for Figure 9-b The first schematic diagram of the spliced data obtained by splicing neutron file data. Figure 9-d for Figure 9-b The second schematic diagram of the spliced data obtained by splicing the neutron file data.
[0214] against Figure 9-a The three original file data shown are file A, file B and file C. The sending end can read the first amount of sub-file data from file A, file B and file C respectively, that is, Figure 9-b The data A1, data B1 and data C1 in the sub-file are concatenated to obtain the following Figure 9-c and Figure 9-d Data 1 is obtained by splicing A1, data B1 and data C1. Similarly, the sender can Figure 9-b The data A2, data B2 and data C2 in the above table are combined to obtain the following Figure 9-c and Figure 9-d Data 2 in.
[0215] When the sender Figure 9-b When splicing data A3 and data B3 in file C, there is no unspliced data in file C. At this time, the sending end can splice the first amount of invalid data with data A3 and data B3 to obtain the following: Figure 9-c The data 3 shown in the figure is invalid data. Similarly, when the sending end splices the data A4 in the file A, the following can be obtained: Figure 9-c Data 4 is shown.
[0216] Or, when the sender Figure 9-b When splicing data A3 and data B3 in file C, there is no unspliced data in file C. At this time, the sending end can read the first amount of sub-file data from the original file with the largest amount of data according to the amount of data included in each original file data, that is, Figure 9-b The data A4 in the sub-file is obtained by concatenating the read sub-file data, data A3 and data B3 to obtain the following: Figure 9-d Data 3 is obtained by splicing data A3, data B3 and data A4.
[0217] above Figure 9-c In the embodiment shown, invalid data (i.e. Figure 9-c The -) in ( ) can come from the above-mentioned multiple original file data. Here, the above-mentioned invalid data is not specifically described.
[0218] In the embodiment of the present application, there is no specific limitation on the method of splicing sub-file data when the original file data includes different amounts of data.
[0219] In an optional embodiment, according to the above Figure 1 The method shown in the embodiment of the present application also provides a data sending method. Figure 10 As shown, Figure 10 This is a seventh flow chart of the data sending method provided in an embodiment of the present application. The method includes the following steps.
[0220] Step S1001: determining a first splicing method for at least two original file data based on a transmission rate of a historical data packet.
[0221] Step S1002: splicing sub-file data in at least two original file data based on a first splicing method to obtain at least one spliced data.
[0222] The above steps S1001 to S1002 are the same as the above steps S101 to S102.
[0223] Step S1003 : for each piece of spliced data, determine the file identifier of the original file data corresponding to each sub-file data included in the spliced data.
[0224] The file identifier of the original file data can be represented in the form of numbers, letters, etc. For example, Figure 5-a The file identifiers corresponding to file A, file B, and file C in the original file data shown can be represented as: A, B, and C, respectively. Here, the representation form of the file identifiers of the original file data is not specifically limited.
[0225] Step S1004 , arranging the file identifiers of the original file data corresponding to each sub-file data according to the arrangement order of each sub-file data in the spliced data, to obtain a splicing sequence of the spliced data.
[0226] For ease of understanding, we still use the above Figure 5-c The splicing data shown, the file identifiers corresponding to file A, file B and file C are respectively represented as: A, B and C. Figure 5-c In the example, data 1, data 2, data 3, and data 4 are all obtained by concatenating the sub-file data of each original file data in the order of file A, file B, and file C. Therefore, the concatenated sequence corresponding to each concatenated data, that is, data 1-data 4, can be expressed as: ABC.
[0227] In the above embodiment, the above steps S1003 and S1004 are executed after the above step S1002. Alternatively, the above steps S1003 and S1004 may be executed simultaneously with the above step S1002. Here, the generation time of the above spliced data and the spliced sequence of the spliced data is not specifically limited.
[0228] Step S1005 : for each piece of spliced data, encapsulate the spliced data and the target spliced sequence corresponding to the spliced data into a data packet to obtain a data packet to be sent.
[0229] The target splicing sequence corresponding to each of the above splicing data is the splicing sequence of the splicing data, or the encryption sequence corresponding to the splicing sequence of the splicing data. The target splicing sequence in the data packet to be sent is at the preset position of the splicing data.
[0230] In an optional embodiment, the above step S1005 can be further divided into the following steps, namely step 1 to step 2.
[0231] Step 1: for each piece of spliced data, splice the splicing sequence of the spliced data at a preset position of the spliced data to obtain data to be packaged.
[0232] In the embodiment of the present application, the preset position may be before or after the spliced data, or at a preset byte in the spliced data, such as the Nth byte.
[0233] For ease of understanding, we still use the above Figure 5-c The splicing data shown is pre-set to the position after the splicing data. Figure 5-c The splicing data shown, that is, data 1-data 4, the splicing sequence of each splicing data is ABC. After splicing the splicing sequence of each splicing data to the splicing data, the following is obtained: Figure 11-a The data to be packaged is shown as follows, Figure 11-a for Figure 5-c The spliced data shown corresponds to a schematic diagram of the data to be encapsulated.
[0234] In an optional embodiment, for at least two spliced data including sub-file data corresponding to the same original file data, the splicing sequences of the at least two spliced data are different.
[0235] For ease of understanding, combined Figure 11-b Take this as an example to illustrate: Figure 11-b for Figure 5-d The spliced data shown corresponds to the first schematic diagram of the data to be encapsulated.
[0236] exist Figure 11-b In the data to be packaged shown, Figure 5-d Each spliced data in , i.e. data 1-data 4, is derived from the same original file data. Figure 5-b However, due to the different splicing methods of the sub-file data corresponding to the different original file data in each spliced data, the splicing sequences corresponding to each spliced data are also different. Figure 11-b In the example, the splicing sequence in data 1 is ABC, the splicing sequence in data 2 is CBA, the splicing sequence in data 3 is CAB, and the splicing sequence in data 4 is BAC. The splicing sequences in the four data to be encapsulated are all different.
[0237] In an optional embodiment, to facilitate the subsequent receiving end to accurately obtain each original file data after receiving each data packet to be sent, the above-mentioned splicing sequence may also include the data size of each sub-file data and / or the location information of each sub-file data in the corresponding original file data; or the packet header of the above-mentioned data packet to be sent may carry the data size of each sub-file data and / or the location information of each sub-file data in the corresponding original file data. The acquisition of each original file data by the receiving end can be seen in the description below and is not explained in detail here.
[0238] For ease of understanding, the spliced sequence includes the above data volume and position information, combined with the above Figure 11-c Take this as an example to illustrate. Figure 11-c for Figure 5-d The spliced data shown corresponds to the second schematic diagram of the data to be packaged. Figure 11-c In each data to be packaged shown, the splicing sequence includes not only the file identifier indicating that each sub-file data corresponds to the original file data, but also the data amount corresponding to each sub-file data, that is, Figure 11-c The amount of data in , and the location information of each sub-file data in the corresponding original file data, that is, Figure 11-c Location information in .
[0239] above Figure 11-c The data volume and position information in the data volume and position information include the data volume and position information corresponding to each sub-file data. Taking Data 1 as an example, the data volume in Data 1 is the data volume corresponding to Data A1, Data B1, and Data C1, and the order of arrangement of the respective data volumes is the same as the order of arrangement of the sub-file data. In addition, the position information of each sub-file data in the corresponding original file data can be the actual position information of the sub-file data in the corresponding original file data, such as the timestamp of each video frame, or the relative position of the sub-file data in the corresponding original file. The position information of each sub-file data in the corresponding original file data is not specifically limited herein.
[0240] Step 2: encapsulate the data to be encapsulated to obtain a data packet to be sent.
[0241] The encapsulation process of the above-mentioned data to be encapsulated can refer to the encapsulation process of the above-mentioned spliced data, and will not be described in detail here.
[0242] Through steps 1 and 2 above, since the data packet to be sent by the sending end to the receiving end includes sub-file data from different original file data, the receiving end cannot accurately obtain the sub-file data of each original file data from the received data packet to be sent without knowing the sending end's splicing logic. Therefore, when the sending end sends the spliced data to the receiving end, it can also add the splicing sequence of the spliced data to the data packet to be sent. This allows the receiving end to determine the original file data corresponding to each sub-file data in the spliced data based on the splicing sequence after receiving the data packet to be sent, thereby facilitating the acquisition of each original file data.
[0243] Furthermore, since the splicing sequence in the data to be encapsulated can be located at a preset position in the splicing data, the selectivity of the position of the splicing sequence is effectively expanded, further improving the security of the splicing sequence, thereby improving the security of data transmission.
[0244] In another optional embodiment, the above step S1005 can be refined into the following steps, namely step three to step four.
[0245] Step three: encrypt the spliced sequence of the spliced data using a preset asymmetric encryption public key to obtain an encrypted sequence of the spliced data.
[0246] In this step, after determining the splicing sequence of each piece of spliced data, the sending end can encrypt the splicing sequence of the spliced data to further improve the security of the splicing sequence. That is, the sending end can use a preset asymmetric encryption algorithm and a public key previously disclosed by the receiving end to encrypt the splicing sequence of the spliced data to obtain the encrypted sequence of the spliced data.
[0247] In the embodiment of the present application, the receiving end pre-stores a private key for decryption processing. The public key and private key can be determined in advance by the sending end and the receiving end through a key negotiation. The key negotiation process is not described in detail here.
[0248] In the embodiments of the present application, only the asymmetric encryption method is used to encrypt the spliced sequence as an example. In addition, the sending end can also use other encryption methods to encrypt the spliced sequence, such as symmetric encryption. The encryption method of the spliced sequence is not specifically limited here.
[0249] Step 4: for each piece of spliced data, encapsulate the spliced data and the encrypted sequence of the spliced data into a data packet to be sent.
[0250] In this step, for each piece of spliced data, the sending end may splice the spliced data and the encryption sequence of the spliced data, and encode the spliced data, thereby encapsulating the encoded data to obtain a data packet to be sent.
[0251] In an optional embodiment, for each spliced data, the sending end may splice the encrypted sequence of the spliced data at a preset position of the spliced data to obtain data to be encapsulated, and perform encapsulation processing on the data to be encapsulated to obtain a data packet to be sent.
[0252] In the above embodiment, the splicing data and the encrypted sequence of the spliced data are first spliced and then encoded. Alternatively, the transmitting end may first encode and then splice. The order of splicing and encoding the spliced data and the encrypted sequence of the spliced data is not specifically limited.
[0253] Through step three, the sending end can determine, for each piece of spliced data, the order of the sub-file data corresponding to each piece of original file data in the spliced data, obtain a splicing sequence for each piece of spliced data, and encrypt the splicing sequence for each piece of spliced data to obtain an encrypted sequence, effectively improving the security of the splicing sequence. Furthermore, through step four, a data packet to be sent is generated, including the spliced data and the encrypted sequence, so that each piece of spliced data is bound to the encrypted sequence of the spliced data. As a result, upon receiving each data packet to be sent, the receiving end can accurately determine the original file data corresponding to each piece of sub-file data based on the encrypted sequence in each data packet to be sent. This ensures the security of the transmission of each piece of original file data while effectively ensuring the accuracy and convenience of obtaining each piece of original file data.
[0254] Through the above steps S1003 and S1004, the sending end can determine, for each piece of spliced data, the arrangement order of the sub-file data corresponding to each piece of original file data in the spliced data, and obtain the splicing sequence of each piece of spliced data. Then, through the above step S1005, a data packet to be sent including the spliced data and the splicing sequence is generated, so that each piece of spliced data is bound to the splicing sequence of the spliced data. Therefore, after receiving each piece of data to be sent, the receiving end can accurately determine the original file data corresponding to each piece of sub-file data based on the splicing sequence in each piece of data to be sent. This effectively ensures the accuracy and convenience of obtaining each piece of original file data while ensuring the security of the transmission of each piece of original file data.
[0255] Step S1006: Send the data packet to be sent to the receiving end.
[0256] The above step S1006 is the same as the above step S104.
[0257] Based on the same inventive concept, according to the data sending method provided in the above embodiment of the present application, the embodiment of the present application also provides a data receiving method. Figure 12 As shown, Figure 12 The first flow chart of the data receiving method provided in the embodiment of the present application is as follows: The method is applied to the receiving end and specifically includes the following steps.
[0258] Step S1201: Receive at least one data packet to be processed.
[0259] The data packet to be processed is any data packet to be sent from the transmitting end to the receiving end. Here, no specific description is given for the data packet to be processed.
[0260] Step S1202 : decapsulate each data packet to be processed to obtain the spliced data in each data packet to be processed.
[0261] In this step, after the receiving end receives the data packets to be processed sent by the sending end, the receiving end may decapsulate and decode each data to be transmitted to obtain the spliced data in each data packet to be processed.
[0262] In the embodiment of the present application, the above-mentioned data packet decapsulation process includes a decapsulation process for the data packet to be processed and a decoding process for the decapsulated data. Here, the above-mentioned data packet decapsulation process is not described in detail.
[0263] Step S1203: Acquire original file data from the spliced data.
[0264] In an optional embodiment, the sending end and the receiving end may pre-agreed on the concatenation logic for the sub-file data corresponding to each original file data. For each concatenated data obtained in step S1202, the receiving end may, based on the pre-agreed concatenation logic, obtain the sub-file data corresponding to each original file data from the concatenated data, and concatenate the sub-file data corresponding to the same original file data to obtain each original file data.
[0265] For ease of understanding, we still use the above Figure 5-b and Figure 5-c Assume that the splicing logic agreed upon by the sender and the receiver is: the sender follows the same splicing order as above and Figure 5-b The sub-file data with the same relative position matching and the same data size (such as the first data size) are spliced to obtain the following Figure 5-c The spliced data are shown.
[0266] The receiving end gets Figure 5-c After the data is spliced as shown, the first amount of data arranged in front can be read from data 1 to data 4 respectively, that is, Figure 5-c Data A1-data A4 in , and data A1-data A4 are spliced to obtain Figure 5-b File A shown in Figure 1. Similarly, the sender can obtain Figure 5-b File B and File C are shown.
[0267] Through the above Figure 12 The method shown can determine a first splicing method for at least two original file data based on the transmission rate of historical data packets, and based on the first splicing method, splice the sub-file data in the at least two original file data to obtain at least one spliced data, thereby performing data packet encapsulation on each spliced data to obtain a data packet to be sent, and send the data packet to be sent to the receiving end.
[0268] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0269] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0270] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0271] In an optional embodiment, if the data packet to be processed is obtained by encapsulating the spliced data and the spliced sequence of the spliced data, and the arrangement order of the file identifiers of the sub-file data corresponding to the original file data in the spliced sequence is the same as the arrangement order of the sub-file data, then according to the above Figure 12 The method shown in the embodiment of the present application also provides a data receiving method. Figure 13 As shown, Figure 13 This is a second flow chart of the data receiving method provided in an embodiment of the present application. The method includes the following steps.
[0272] Step S1301: Receive at least one data packet to be processed.
[0273] The above step S1301 is the same as the above step S1201.
[0274] Step S1302 : For each data packet to be processed, decapsulate the data packet to be processed to obtain the spliced data in the data packet to be processed and a spliced sequence of the spliced data.
[0275] In this step, since the above-mentioned data packets to be processed include spliced data and the spliced sequence of the spliced data, the receiving end can obtain the spliced data and the spliced sequence of the spliced data included in each data packet to be processed after decapsulating each received data packet to be processed.
[0276] Step S1303 : for each piece of spliced data, sub-file data corresponding to each piece of original file data is sequentially obtained from the spliced data according to the arrangement order of the file identifiers in the splicing sequence of the spliced data.
[0277] In this step, for each piece of spliced data, the receiving end can determine the order of the sub-file data corresponding to the different original file data in the spliced data based on the order of the file identifiers of the original file data in the spliced sequence of the spliced data. At this point, the receiving end can obtain the sub-file data corresponding to the different original file data from the spliced data based on this order.
[0278] For ease of understanding, the above Figure 11-a Assume that in each concatenated data, the data volume of each sub-file data is the same (ie, the data volume is the first data volume mentioned above).
[0279] exist Figure 11-a According to the splicing sequence, Figure 11-a ABC in the concatenation, the receiving end can determine that the concatenation order corresponding to the sub-file data in each concatenated data is: ABC. Since the data size of each sub-file data is the first data size, the receiving end can determine that the first data size of data in each concatenated data is the sub-file data corresponding to file A, the first data size of data in the middle is the sub-file data corresponding to file B, and the last data size of data is the sub-file data corresponding to file C.
[0280] Step S1304 , concatenating the sub-file data corresponding to each original file data to obtain each original file data.
[0281] In this step, for each original file data, after obtaining all sub-file data corresponding to the original file data, the receiving end may splice all sub-file data corresponding to the original file data to obtain the original file data.
[0282] The above steps S1303 to S1304 are refinements of the above step S1203.
[0283] Through the above steps S1302 to S1304, when the data amount of each sub-file data in each spliced data is the same, the receiving end can accurately determine the corresponding arrangement order of the sub-file data from different original file data in the spliced data based on the splicing sequence of the spliced data in each received data packet to be processed, thereby accurately determining the original file data corresponding to each sub-file data in the spliced data, facilitating the acquisition of the sub-file data corresponding to each original file data, and further facilitating the acquisition of each original file data.
[0284] In an optional embodiment, if the data packet to be processed is obtained by encapsulating the spliced data and the encryption sequence corresponding to the spliced sequence of the spliced data, and the arrangement order of the file identifiers of the sub-file data corresponding to the original file data in the spliced sequence is the same as the arrangement order of the sub-file data, then according to the above Figure 12 The method shown in the embodiment of the present application also provides a data receiving method. Figure 14 As shown, Figure 14 This is a third flow chart of the data receiving method provided in an embodiment of the present application. The method includes the following steps.
[0285] Step S1401: Receive at least one data packet to be processed.
[0286] Step S1402 : For each data packet to be processed, decapsulate the data packet to be processed to obtain the spliced data in the data packet to be processed and the encryption sequence corresponding to the spliced sequence of the spliced data.
[0287] The above step S1402 can refer to the description of the above step S1302 and will not be described in detail here.
[0288] Step S1403 : for each piece of spliced data, decrypt the encryption sequence corresponding to the splicing sequence of the spliced data to obtain the splicing sequence of the spliced data.
[0289] In an optional embodiment, when the encrypted sequence in the data packet to be processed is obtained by encrypting the data packet using a preset asymmetric public key, the receiving end, after obtaining the encrypted sequence in the data packet to be processed, can decrypt the encrypted sequence of the spliced data in each data packet to be processed using the preset asymmetric private key to obtain the spliced sequence of each spliced data.
[0290] In the embodiment of the present application, according to the different encryption processing methods of the above-mentioned sending end for the spliced sequence, the decryption processing process of the encryption sequence at the receiving end is also different. Here, the decryption processing process of the above-mentioned encrypted sequence is not described in detail.
[0291] Step S1404 : for each piece of spliced data, sub-file data corresponding to each piece of original file data is sequentially obtained from the spliced data according to the arrangement order of the file identifiers in the splicing sequence of the spliced data.
[0292] Step S1405 , concatenating the sub-file data corresponding to each original file data to obtain each original file data.
[0293] The above steps S1404 to S1405 can refer to the description of the above steps S1303 to S1304, and are not described in detail here.
[0294] Through the above steps S1402 to S1405, when the data amount of each sub-file data in each spliced data is the same, the receiving end can accurately determine the corresponding arrangement order of the sub-file data from different original file data in the spliced data based on the encryption sequence of the spliced data in each received data packet to be processed, thereby accurately determining the original file data corresponding to each sub-file data in the spliced data, facilitating the acquisition of the sub-file data corresponding to each original file data, and further facilitating the acquisition of each original file data.
[0295] In addition, since the splicing sequence of each splicing data is sent in an encrypted manner, this effectively improves the security of the splicing sequence transmission, thereby improving the security of data transmission.
[0296] In an optional embodiment, the above-mentioned splicing sequence may also include the data volume of each sub-file data and / or the position information of each sub-file data in the corresponding original file data; or the header of each data packet to be processed carries the data volume of each sub-file data and / or the position information of each sub-file data in the corresponding original file data.
[0297] In an optional embodiment, when the above-mentioned splicing sequence includes the data amount of each sub-file data and the position information of each sub-file data in the corresponding original file data, or the header of each data packet to be processed carries the data amount of each sub-file data and the position information of each sub-file data in the corresponding original file data, according to the above-mentioned Figure 13 or Figure 14 The method shown in the embodiment of the present application also provides a data receiving method. Figure 15 As shown, Figure 15 This is a fourth flow chart of the data receiving method provided in an embodiment of the present application. The method includes the following steps.
[0298] Step S1501: Receive at least one data packet to be processed.
[0299] Step S1502 : For each data packet to be processed, decapsulate the data packet to be processed to obtain the spliced data in the data packet to be processed and a spliced sequence of the spliced data.
[0300] The above steps S1501 to S1502 are the same as the above steps S1301 and S1302.
[0301] Step S1503 : for each spliced data, obtain each sub-file data included in the spliced data according to the data volume of each sub-file data, and determine the original file data corresponding to each obtained sub-file data according to the arrangement order of the file identifiers in the splicing sequence of the spliced data.
[0302] In this step, for each piece of spliced data, since the header of the spliced sequence or the data packet to be processed may include the data size of each sub-file data, the receiving end can split the spliced data based on this data size to obtain multiple sub-file data. For each sub-file data, based on the order of the sub-file data in the spliced data, the original file data corresponding to the file identifier at the corresponding position in the spliced sequence of the spliced data is determined as the original file data corresponding to the sub-file data.
[0303] For ease of understanding, the above Figure 11-c The following description is made using data 1 in the example. Assume that the data size in data 1 is expressed as: 100KB, 100KB, 100KB.
[0304] After obtaining data 1, the receiving end can obtain the first 100KB, middle 100KB and last 100KB of data from the spliced data according to the amount of data in data 1, and obtain three sub-file data, namely data A1, data B1 and data C1 in data 1.
[0305] The receiving end can determine, based on ABC in data 1, that data A1 is the sub-file data corresponding to file A, data B1 is the sub-file data corresponding to file B, and data C1 is the sub-file data corresponding to file C.
[0306] Step S1504 : splicing the sub-file data corresponding to each original file data according to the position information of each sub-file data in the corresponding original file data to obtain each original file data.
[0307] In this step, since the header of the above-mentioned splicing sequence or the data packet to be processed can also include the position information of each sub-file data in the corresponding original file data, the receiving end can determine the position of each sub-file data in the original file data based on the position information in the splicing sequence or the data packet to be processed, and thus splice all the sub-file data corresponding to the same original file data according to the position information to obtain the original file data.
[0308] For ease of understanding, we still use the above Figure 11-c The data 1 to data 4 are used as an example for explanation. Now assume that the position information corresponding to the sub-file data of file A in data 1 to data 4 is represented as: position 1, position 2, position 3 and position 4 respectively.
[0309] Through step S1503, the receiving end can determine that data A1-data A4 in data 1-data 4 are all sub-file data corresponding to file A. Based on the position information of the sub-file data corresponding to file A in data 1-data 4, the receiving end can determine the relative positions of data A1-data A4 in file A: position 1, position 2, position 3, and position 4, respectively. Based on these relative positions, the receiving end can concatenate data A1-data A4 to obtain file A corresponding to data A1-data A4.
[0310] In an embodiment of the present application, when the header of the above-mentioned splicing sequence or the data packet to be processed includes the data amount of each sub-file data in the splicing data, and / or the position information of each sub-file data in the corresponding original file data, the receiving end can accurately obtain the sub-file data corresponding to each original file data based on the data amount and position information, without the sending end and the receiving end having an agreement on the splicing logic, thereby obtaining each original file data, while improving the security of data transmission and effectively ensuring the accuracy of each original file data obtained by the receiving end.
[0311] exist Figure 15 In the illustrated embodiment, the above-mentioned step S1503 and step S1504 may be refinements of the above-mentioned step S1303 and step S1304, or may be refinements of the above-mentioned step S1404 and step S1405.
[0312] In an optional embodiment, according to the above Figure 12 The method shown in the embodiment of the present application provides a data receiving method. Figure 16 As shown, Figure 16 This is a fifth flow chart of the data receiving method provided in an embodiment of the present application. The method includes the following steps.
[0313] Step S1601: Receive at least one data packet to be processed.
[0314] Step S1602 : decapsulate each data packet to be processed to obtain the spliced data in each data packet to be processed.
[0315] Step S1603: Obtain original file data from the spliced data.
[0316] The above steps S1601 to S1603 are the same as the above steps S1201 to S1203.
[0317] Step S1604 : storing the original file data in different storage devices in parallel; or storing the original file data in different storage spaces of the same storage device in parallel.
[0318] In this step, for each original file data obtained in the above step S1603, the receiving end may store each original file data in parallel, and each original file data is stored in a different storage device or storage space.
[0319] For ease of understanding, we still use the above Figure 5-a The original file data shown is used as an example. Through the above step S1603, the receiving end can obtain Figure 5-a The receiving end can write file A, file B, and file C to different storage disks in parallel.
[0320] In the embodiment of the present application, the above-mentioned storage devices may be different storage disks, and the different storage spaces may be different address segments in the storage disks.
[0321] Through step S1604, the receiving end can store multiple original file data in parallel, effectively improving data storage efficiency. In addition, when storing the original file data, each original file data storage device or storage space is different, which allows each original file data to be stored separately, facilitating subsequent operations such as searching or retrieving the original file data.
[0322] In the above Figure 16 In the embodiment shown, only the above step S1604 is executed after the above step S1603. In addition, the above steps S1603 and S1604 can also be executed at the same time. Figure 11-c and Figure 17 To explain, Figure 17 for Figure 11-c A schematic diagram of storing data of each sub-file in .
[0323] The receiving end obtains the above-mentioned Figure 11-c After the spliced data is shown, the receiver can Figure 11-c The file identifier and data volume of each splicing sequence in the data are obtained from the corresponding splicing data for storage. For example, the receiving end can obtain the sub-file data from Figure 11-c The receiving end can obtain data A1, data B1 and data C1 according to the data 1 shown in FIG. Figure 11-c The position information included in each splicing sequence is used to determine the positions of data A1, data B1 and data C1 in file A, file B and file C respectively, so that data A1, data B1 and data C1 are stored in the storage space matching the position in storage device 1-storage device 3 respectively. For example, data A1 is the first sub-file data in file A, so data A is stored in the first storage space of storage device 1. Similarly, Figure 11-c Each splicing data is stored in a different storage device, and the following is obtained: Figure 17 The data storage diagram is shown.
[0324] In the above embodiment, the receiving end follows the above Figure 17 When storing sub-file data in the manner shown, it is considered that data packets may be lost during the data transmission process due to network environment issues. In this case, the transmitting end will replay the lost data packets. However, network delays may result in the reception of two or more identical data packets. In this case, when storing the sub-file data in the received identical data packets, the receiving end can perform data storage using serial control. In other words, the receiving end only stores the sub-file data included in one of the multiple identical data packets received. The serial control process is not described in detail here.
[0325] For ease of understanding, the following Figure 18 The above data transmission process is described. Figure 18 A signaling diagram of the data transmission process provided in an embodiment of the present application.
[0326] In step S1801, the sending end reads M bytes of data from N original file data respectively according to the splicing method as the sub-file data corresponding to each original file data.
[0327] The above-mentioned splicing method may be a splicing method corresponding to the time period of the current time.
[0328] M bytes of data are read from each original file data, so the number of sub-file data read is N.
[0329] Step S1802: The sending end splices the N sub-file data to obtain spliced data.
[0330] Step S1803 : The sending end arranges the file identifiers of the original file data corresponding to the sub-file data according to the splicing order of each sub-file data in the spliced data to obtain a splicing sequence.
[0331] Step S1804: The sending end performs asymmetric encryption on the concatenated sequence to obtain an encrypted sequence.
[0332] In step S1805, the sending end splices the encrypted sequence into the spliced data to obtain the data to be encapsulated, and encodes and encapsulates the data to be encapsulated to obtain the data packet to be sent.
[0333] Step S1806: The sending end sends the data packet to be sent to the receiving end.
[0334] Step S1807: The receiving end receives the data packet to be sent.
[0335] In step S1808, the receiving end decapsulates and decodes the received data packet to be sent to obtain the data to be encapsulated, and splits the data after the N*Mth byte of the data to be encapsulated to obtain the spliced data and the encrypted sequence.
[0336] Among them, the first N*M bytes are the above-mentioned spliced data, and the data after the first N*M bytes is the encrypted sequence.
[0337] Step S1809: The receiving end performs asymmetric decryption on the encrypted sequence to obtain a spliced sequence.
[0338] Step S1810: The receiving end splits the spliced data into M bytes to obtain multiple sub-file data.
[0339] Step S1811 : for each sub-file data, the receiving end determines the original file data corresponding to the file identifier at the corresponding position in the splicing sequence as the original file data corresponding to the sub-file data according to the position of the sub-file data in the splicing data.
[0340] In the above Figure 18 In the embodiment shown, only the splicing and transmission of M bytes of data in each original file data is used as an example for description. The splicing and transmission of other data in the above N original file data can refer to the method shown in the above steps S1801 to S1811.
[0341] Based on the same inventive concept, according to the data sending method provided in the above embodiment of the present application, the embodiment of the present application also provides a data sending device. Figure 19 As shown, Figure 19 A schematic diagram of the structure of a data sending device provided in an embodiment of the present application is provided. The device is applied to a sending end and includes the following modules.
[0342] A first determining module 1901 is configured to determine a first splicing method for at least two original file data based on a transmission rate of a historical data packet;
[0343] A splicing module 1902 is configured to splice sub-file data in at least two original file data based on a first splicing method to obtain at least one spliced data;
[0344] The encapsulation module 1903 is configured to encapsulate at least one spliced data into a data packet to obtain a data packet to be sent;
[0345] The sending module 1904 is configured to send a data packet to be sent to a receiving end.
[0346] Optionally, the first splicing method includes a splicing data volume, where the splicing data volume is a first data volume of the spliced sub-file data in at least two original file data, or a second data volume of the spliced data obtained by splicing the sub-file data in at least two original file data;
[0347] The first determining module 1901 includes:
[0348] an adjustment submodule, configured to adjust the amount of spliced data in the second splicing mode corresponding to the first time period when the first transmission rate is greater than the second transmission rate, to obtain the first splicing mode for at least two original file data; the first transmission rate is an average transmission rate of historical data packets in the first time period, the first time period being a time period before the second time period in which the current time is located, and the second transmission rate is an average transmission rate of historical data packets in the time period before the first time period;
[0349] The determining submodule is configured to determine the second splicing method as the first splicing method of at least two original file data when the first transmission rate is not greater than the second transmission rate.
[0350] Optionally, the above-mentioned adjustment submodule can be specifically used to adjust the amount of splicing data in the second splicing method corresponding to the first time period according to a preset step size to obtain the first splicing method of at least two original file data; or, within a preset data amount range, adjust the amount of splicing data in the second splicing method corresponding to the first time period to obtain the first splicing method of at least two original file data.
[0351] Optionally, the data sending device may further include:
[0352] A second determining module is configured to determine, for each piece of spliced data, a file identifier of the original file data corresponding to each sub-file data included in the spliced data before encapsulating the at least one piece of spliced data into a data packet to obtain a data packet to be sent;
[0353] a third determining module, configured to arrange the file identifiers of the original file data corresponding to each sub-file data according to the arrangement order of each sub-file data in the spliced data, to obtain a splicing sequence of the spliced data;
[0354] The above-mentioned encapsulation module 1903 can be specifically used to encapsulate the spliced data and the target splicing sequence corresponding to the spliced data into a data packet for each spliced data to obtain a data packet to be sent; wherein, the target splicing sequence corresponding to each spliced data is the splicing sequence of the spliced data, or the encryption sequence corresponding to the splicing sequence of the spliced data, and the target splicing sequence in the data packet to be sent is at a preset position of the spliced data.
[0355] Optionally, for at least two spliced data corresponding to the same original file data as the included sub-file data, the splicing sequences of the at least two spliced data are different;
[0356] The above-mentioned splicing sequence also includes the data amount of each sub-file data and / or the position information of each sub-file data in the corresponding original file data; or, the header of the data packet to be sent carries the data amount of each sub-file data and / or the position information of each sub-file data in the corresponding original file data.
[0357] Optionally, the splicing module 1902 includes:
[0358] a first acquisition submodule, configured to acquire sub-file data from at least two original file data respectively according to the first data amount if the amount of splicing data included in the first splicing mode is a first data amount;
[0359] A first splicing submodule is configured to splice sub-file data corresponding to at least two original file data to obtain at least one spliced data;
[0360] Or include:
[0361] a second acquisition submodule, configured to acquire sub-file data from at least two original file data respectively if the amount of spliced data included in the first splicing method is a second amount of data;
[0362] The second splicing submodule is configured to splice the sub-file data corresponding to at least two original file data according to the second data volume to obtain at least one spliced data.
[0363] Optionally, the first acquisition submodule may be configured to concurrently acquire, based on data location information in each original file data, file data that matches the first data volume and has not been acquired from at least two original file data as sub-file data corresponding to the at least two original file data;
[0364] The first splicing submodule may be configured to, when the first splicing mode includes indicating the number of sub-file data to be spliced, splice the sub-file data corresponding to at least two original file data according to the number of splicing to obtain at least one spliced data;
[0365] The data sending device may further include:
[0366] The calling module is configured to, after sending the data packet to be sent to the receiving end, call the first acquisition submodule to return to execute the step of acquiring, in parallel, file data that matches the first data amount and has not been acquired from at least two original file data according to the location information of the data in each original file data, as sub-file data corresponding to the at least two original file data, until all the data in each original file data is acquired.
[0367] Optionally, the second acquisition submodule may be configured to, if the amount of spliced data included in the first splicing method is the second amount of data, then, for each original file data, perform segmentation processing on the original file data to obtain a plurality of sub-file data; wherein the third data amount corresponding to each sub-file data is smaller than the second data amount, and the third data amounts corresponding to the sub-file data are the same or different;
[0368] The above-mentioned second splicing sub-module can be specifically used to, for each sub-file data, splice at least two sub-file data with matching relative positions according to the second data volume to obtain multiple spliced data, where the relative position of each sub-file data is: the relative position of the sub-file data in all sub-file data obtained by processing the corresponding original file data fragments; or, for each sub-file data, splice the sub-file data corresponding to at least two original file data with mismatched relative positions according to the second data volume to obtain multiple spliced data.
[0369] Based on the same inventive concept, according to the data receiving method provided in the above embodiment of the present application, the embodiment of the present application also provides a data receiving device. Figure 20 As shown, Figure 20 This is a schematic diagram of the structure of a data receiving device provided in an embodiment of the present application. The device is applied to a receiving end and includes the following modules.
[0370] A receiving module 2001 is configured to receive at least one data packet to be processed, where the data packet to be processed is a data packet to be sent by a sending end according to any of the data sending methods provided in the above embodiments of the present application;
[0371] The decapsulation module 2002 is configured to decapsulate each data packet to be processed to obtain the spliced data in each data packet to be processed;
[0372] The acquisition module 2003 is used to acquire the original file data from the spliced data.
[0373] Optionally, if the data packet to be processed is obtained by encapsulating the spliced data and the spliced sequence of the spliced data, and the arrangement order of the file identifiers of the sub-file data corresponding to the original file data in the spliced sequence is the same as the arrangement order of the sub-file data, then the decapsulation module 2002 may be specifically configured to decapsulate each data packet to be processed to obtain the spliced data in the data packet to be processed and the spliced sequence of the spliced data;
[0374] The acquisition module 2003 may be specifically configured to sequentially acquire sub-file data corresponding to each original file data from each spliced data according to the arrangement order of the file identifiers in the splicing sequence of the spliced data;
[0375] The sub-file data corresponding to each original file data is spliced to obtain each original file data.
[0376] Optionally, if the data packet to be processed is obtained by encapsulating the spliced data and the encryption sequence corresponding to the spliced sequence of the spliced data, and the arrangement order of the file identifiers of the sub-file data corresponding to the original file data in the spliced sequence is the same as the arrangement order of the sub-file data, then the decapsulation module 2002 can be specifically used to decapsulate each data packet to be processed to obtain the spliced data in the data packet to be processed and the encryption sequence corresponding to the spliced sequence of the spliced data;
[0377] The acquisition module 2003 may be specifically configured to decrypt the encryption sequence corresponding to the splicing sequence of each spliced data to obtain the splicing sequence of the spliced data;
[0378] For each piece of spliced data, according to the arrangement order of the file identifiers in the splicing sequence of the spliced data, the sub-file data corresponding to each piece of original file data is sequentially obtained from the spliced data;
[0379] The sub-file data corresponding to each original file data is spliced to obtain each original file data.
[0380] Optionally, if the splicing sequence further includes the data volume of each sub-file data and the position information of each sub-file data in the corresponding original file data, or if the header of each data packet to be processed carries the data volume of each sub-file data and the position information of each sub-file data in the corresponding original file data, then the acquisition module 2003 may be specifically configured to acquire, for each splicing data, each sub-file data included in the splicing data according to the data volume of each sub-file data, and determine, according to the arrangement order of the file identifiers in the splicing sequence of the splicing data, the original file data corresponding to each acquired sub-file data;
[0381] According to the position information of each sub-file data in the corresponding original file data, the sub-file data corresponding to each original file data is spliced to obtain each original file data.
[0382] Optionally, the data receiving device may further include:
[0383] The storage module is used to store the original file data in different storage devices in parallel; or to store the original file data in different storage spaces of the same storage device in parallel.
[0384] Through the device provided in the embodiment of the present application, a first splicing method for at least two original file data can be determined based on the transmission rate of historical data packets. Based on the first splicing method, sub-file data in the at least two original file data are spliced to obtain at least one spliced data, and then each spliced data is encapsulated into a data packet to obtain a data packet to be sent, and the data packet to be sent is sent to the receiving end.
[0385] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0386] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0387] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0388] Based on the same inventive concept, according to the data sending and data receiving methods provided in the above embodiments of the present application, the embodiments of the present application also provide a data transmission system. Figure 21 As shown, Figure 21 21 is a schematic diagram of a data transmission system according to an embodiment of the present application. The system includes a transmitting end 2101 and a receiving end 2102;
[0389] The transmitting end 2101 is configured to determine a first splicing method for at least two original file data based on a historical data packet transmission rate; splice sub-file data in the at least two original file data based on the first splicing method to obtain at least one spliced data; encapsulate the at least one spliced data into a data packet to obtain a data packet to be sent; and send the data packet to be sent to the receiving end 2102.
[0390] The receiving end 2102 is configured to receive at least one data packet to be sent; decapsulate each data packet to be sent to obtain spliced data in each data packet to be sent; and obtain original file data from the spliced data.
[0391] Through the system provided in the embodiment of the present application, a first splicing method for at least two original file data can be determined based on the transmission rate of historical data packets. Based on the first splicing method, sub-file data in the at least two original file data are spliced to obtain at least one spliced data, and then each spliced data is encapsulated into a data packet to obtain a data packet to be sent, and the data packet to be sent is sent to the receiving end.
[0392] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0393] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0394] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0395] Based on the same inventive concept, according to the data sending method provided in the above embodiment of the present application, the embodiment of the present application also provides a sending end, such as Figure 22 Shown, including:
[0396] Memory 2201, used for storing computer programs;
[0397] The processor 2202 is configured to execute the program stored in the memory 2201 and implement the following steps:
[0398] Obtaining sub-file data from multiple original file data respectively;
[0399] splicing the sub-file data corresponding to at least two original file data to obtain at least one spliced data;
[0400] Encapsulating a data packet based on at least one spliced data to obtain a data packet to be sent;
[0401] Send the data packet to be sent to the receiving end.
[0402] Furthermore, the transmitting end may further include a communication bus and / or a communication interface, and the processor 2202, the communication interface, and the memory 2201 communicate with each other via the communication bus.
[0403] Based on the same inventive concept, according to the data receiving method provided in the above embodiment of the present application, the embodiment of the present application also provides a receiving end, such as Figure 23 Shown, including:
[0404] Memory 2301, used for storing computer programs;
[0405] The processor 2302 is configured to execute the program stored in the memory 2301 and implement the following steps:
[0406] receiving at least one data packet to be processed, where the data packet to be processed is a data packet to be sent sent by a sending end according to any of the above data sending methods;
[0407] Decapsulating each data packet to be processed to obtain the spliced data in each data packet to be processed;
[0408] Get the original file data from the stitched data.
[0409] Furthermore, the receiving end may further include a communication bus and / or a communication interface, and the processor 2302, the communication interface, and the memory 2301 communicate with each other via the communication bus.
[0410] Through the transmitting end and receiving end provided by the embodiments of the present application, a first splicing method of at least two original file data can be determined based on the transmission rate of historical data packets. Based on the first splicing method, the sub-file data in the at least two original file data are spliced to obtain at least one spliced data, and then each spliced data is encapsulated into a data packet to obtain a data packet to be sent, and the data packet to be sent is sent to the receiving end.
[0411] Compared to related technologies, each data packet sent by a transmitting end to a receiving end includes spliced data obtained by splicing sub-file data from at least two original file data. This ensures that each spliced data includes sub-file data from different original file data. In other words, each data packet includes sub-file data from different original file data. When a data packet is intercepted by another device, the other device cannot determine the specific splicing method for each sub-file data included in the spliced data in the transmitted data packet, nor the original file data corresponding to each sub-file data. Therefore, the other device cannot obtain the individual original file data by combining the spliced data. In other words, when the other device combines the spliced data in the intercepted data packet, because each spliced data includes sub-file data from different original file data, the other device cannot accurately obtain any complete original file data. This effectively reduces the risk of data leakage caused by data interception by other devices during data transmission, thereby improving the security of data transmission.
[0412] In addition, since the spliced data in each data packet is obtained by splicing sub-file data from different original file data, when the sending end sends each data packet to the receiving end, it can improve data transmission security while achieving simultaneous transmission of multiple original file data.
[0413] Furthermore, since the splicing method of at least two original file data is determined based on the transmission rate of the historical data packets, the determined splicing method will also be different under different transmission rates of the historical data packets. This allows the splicing method of at least two original file data to be dynamically adjusted based on the transmission rate of the historical data packets, thereby reducing the transmission time of the later data packets and improving the transmission rate of the data packets.
[0414] The communication bus mentioned above for the transmitter / receiver can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0415] The communication interface is used for communication between the above-mentioned sending end or receiving end and other devices.
[0416] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0417] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0418] Based on the same inventive concept, according to the data sending and data receiving methods provided in the above-mentioned embodiments of the present application, the embodiments of the present application also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned data sending or data receiving methods.
[0419] Based on the same inventive concept, according to the data sending and data receiving methods provided in the above-mentioned embodiments of the present application, the embodiments of the present application also provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute any one of the data sending or data receiving methods in the above-mentioned embodiments.
[0420] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).
[0421] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0422] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, since the embodiments of the apparatus, system, transmitter, receiver, computer-readable storage medium, and computer program product are generally similar to the method embodiments, their descriptions are relatively simplified. For relevant portions, reference can be made to the descriptions of the method embodiments.
[0423] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A data transmission method, characterized in that: Applied to a sending end, the method includes: When the first transmission rate is greater than the second transmission rate, the amount of spliced data in the second splicing method corresponding to the first time period is adjusted to obtain the first splicing method of at least two original file data; the first transmission rate is an average transmission rate of historical data packets in a first time period, the first time period is a time period before the second time period in which the current time is located, and the second transmission rate is an average transmission rate of historical data packets in a time period before the first time period; When the first transmission rate is not greater than the second transmission rate, determining the second splicing mode as the first splicing mode for the at least two original file data; the first splicing mode includes a splicing data amount, the splicing data amount being a first data amount of the spliced sub-file data from the at least two original file data, or a second data amount of the spliced data obtained by splicing the sub-file data from the at least two original file data; splicing the sub-file data in the at least two original file data based on the first splicing method to obtain at least one spliced data; Encapsulating the at least one spliced data into a data packet to obtain a data packet to be sent; Send the data packet to be sent to the receiving end.
2. The method according to claim 1, characterized in that The step of adjusting the amount of spliced data in the second splicing mode corresponding to the first time period to obtain the first splicing mode of at least two original file data includes: Adjusting the amount of spliced data in the second splicing method corresponding to the first time period according to a preset step size to obtain a first splicing method for at least two original file data; or, Within a preset data volume range, the amount of spliced data in the second splicing method corresponding to the first time period is adjusted to obtain a first splicing method for at least two original file data.
3. The method according to claim 1, characterized in that Before encapsulating the at least one spliced data into a data packet to obtain a data packet to be sent, the method further includes: For each piece of spliced data, determining the file identifier of the original file data corresponding to each sub-file data included in the spliced data; Arrange the file identifiers of the original file data corresponding to each sub-file data according to the arrangement order of each sub-file data in the spliced data to obtain a splicing sequence of the spliced data; The step of encapsulating the at least one spliced data into a data packet to obtain a data packet to be sent includes: For each piece of spliced data, encapsulating the spliced data and the target spliced sequence corresponding to the spliced data into a data packet to obtain a data packet to be sent; The target splicing sequence corresponding to each splicing data is the splicing sequence of the splicing data, or the encryption sequence corresponding to the splicing sequence of the splicing data, and the target splicing sequence in the data packet to be sent is at a preset position of the splicing data.
4. The method according to claim 3, characterized in that For at least two spliced data corresponding to the sub-file data, which have the same original file data, the splicing sequences of the at least two spliced data are different; The splicing sequence also includes the data volume of each sub-file data and / or the position information of each sub-file data in the corresponding original file data; or, the header of the data packet to be sent carries the data volume of each sub-file data and / or the position information of each sub-file data in the corresponding original file data.
5. The method according to claim 1, wherein The step of splicing the sub-file data in the at least two original file data based on the first splicing method to obtain at least one spliced data includes: If the amount of spliced data included in the first splicing method is the first amount of data, obtaining sub-file data from the at least two original file data respectively according to the first amount of data; splicing the sub-file data corresponding to the at least two original file data to obtain at least one spliced data; or, If the amount of spliced data included in the first splicing method is the second amount of data, obtaining sub-file data from the at least two original file data respectively; According to the second data volume, the sub-file data corresponding to the at least two original file data are spliced to obtain at least one spliced data.
6. The method according to claim 5, characterized in that The step of obtaining sub-file data from the at least two original file data respectively according to the first data volume includes: According to the location information of the data in each original file data, file data that matches the first data amount and has not been acquired is obtained from the at least two original file data in parallel as sub-file data corresponding to the at least two original file data; When the first splicing mode includes indicating the number of sub-file data to be spliced, the step of splicing the sub-file data corresponding to the at least two original file data to obtain at least one spliced data includes: splicing the sub-file data corresponding to the at least two original file data according to the splicing quantity to obtain at least one spliced data; The method further comprises: After sending the data packet to be sent to the receiving end, return to the step of obtaining, based on the location information of the data in each original file data, file data that matches the first data amount and has not been obtained from the at least two original file data in parallel as sub-file data corresponding to the at least two original file data, until all the data in each original file data is obtained.
7. The method according to claim 5, characterized in that If the amount of spliced data included in the first splicing method is the second amount of data, the step of respectively obtaining sub-file data from the at least two original file data includes: If the amount of spliced data included in the first splicing method is the second amount of data, then for each original file data, the original file data is segmented to obtain a plurality of sub-file data; wherein the third data amount corresponding to each sub-file data is smaller than the second data amount, and the third data amounts corresponding to the sub-file data are the same or different; The step of splicing the sub-file data corresponding to the at least two original file data according to the second data volume to obtain at least one spliced data includes: For each sub-file data, according to the second data amount, at least two sub-file data with matching relative positions are spliced to obtain a plurality of spliced data, wherein the relative position of each sub-file data is: the relative position of the sub-file data in all sub-file data obtained by processing the corresponding original file data slices; or For each sub-file data, the sub-file data corresponding to at least two original file data whose relative positions do not match are spliced according to the second data amount to obtain a plurality of spliced data.
8. A data receiving method, characterized in that: Applied to a receiving end, the method includes: receiving at least one data packet to be processed, where the data packet to be processed is a data packet to be sent by a sending end according to the method according to any one of claims 1 to 7; Decapsulating each data packet to be processed to obtain the spliced data in each data packet to be processed; The original file data is obtained from the spliced data.
9. The method according to claim 8, characterized in that If the data packet to be processed is obtained by encapsulating spliced data and a spliced sequence of the spliced data, and the arrangement order of the file identifiers of the sub-file data corresponding to the original file data in the spliced sequence is the same as the arrangement order of the sub-file data, then the step of decapsulating each data packet to be processed to obtain the spliced data in each data packet to be processed includes: For each data packet to be processed, decapsulate the data packet to be processed to obtain spliced data in the data packet to be processed and a spliced sequence of the spliced data; The step of obtaining the original file data from the spliced data includes: For each piece of spliced data, according to the arrangement order of the file identifiers in the splicing sequence of the spliced data, the sub-file data corresponding to each piece of original file data is sequentially obtained from the spliced data; The sub-file data corresponding to each original file data is spliced to obtain each original file data.
10. The method according to claim 8, characterized in that If the data packet to be processed is obtained by encapsulating the spliced data and the encryption sequence corresponding to the spliced sequence of the spliced data, and the arrangement order of the file identifiers of the original file data corresponding to the sub-file data in the spliced sequence is the same as the arrangement order of the sub-file data, then the step of decapsulating each data packet to be processed to obtain the spliced data in each data packet to be processed includes: For each data packet to be processed, decapsulate the data packet to be processed to obtain the spliced data in the data packet to be processed and the encryption sequence corresponding to the spliced sequence of the spliced data; The step of obtaining the original file data from the spliced data includes: For each spliced data, decrypt the encryption sequence corresponding to the spliced sequence of the spliced data to obtain the spliced sequence of the spliced data; For each piece of spliced data, according to the arrangement order of the file identifiers in the splicing sequence of the spliced data, the sub-file data corresponding to each piece of original file data is sequentially obtained from the spliced data; The sub-file data corresponding to each original file data is spliced to obtain each original file data.
11. The method according to claim 9 or 10, characterized in that If the splicing sequence further includes the data amount of each sub-file data and the position information of each sub-file data in the corresponding original file data, or the header of each data packet to be processed carries the data amount of each sub-file data and the position information of each sub-file data in the corresponding original file data, then the step of sequentially acquiring, for each splicing data, the sub-file data corresponding to each original file data from the splicing data according to the arrangement order of the file identifiers in the splicing sequence of the splicing data includes: For each spliced data, according to the data volume of each sub-file data, each sub-file data included in the spliced data is obtained, and according to the arrangement order of the file identifiers in the splicing sequence of the spliced data, the original file data corresponding to each obtained sub-file data is determined; The step of splicing the sub-file data corresponding to each original file data to obtain each original file data includes: According to the position information of each sub-file data in the corresponding original file data, the sub-file data corresponding to each original file data is spliced to obtain each original file data.
12. The method according to claim 8, characterized in that The method further comprises: Storing the original file data in different storage devices in parallel; or, The original file data is stored in parallel in different storage spaces of the same storage device.
13. A data transmission system, characterized in that: The system includes a transmitting end and a receiving end; The transmitting end is configured to adjust the amount of spliced data in the second splicing mode corresponding to the first time period when the first transmission rate is greater than the second transmission rate, to obtain a first splicing mode for at least two original file data; the first transmission rate is an average transmission rate of historical data packets in the first time period, the first time period is a time period before the second time period in which the current time is located, and the second transmission rate is an average transmission rate of historical data packets in the time period before the first time period; when the first transmission rate is not greater than the second transmission rate, determine the second splicing mode as the first splicing mode for the at least two original file data; the first splicing mode includes a splicing data amount, the splicing data amount being a first data amount of spliced sub-file data in the at least two original file data or a second data amount of spliced data obtained by splicing sub-file data in the at least two original file data; splicing the sub-file data in the at least two original file data based on the first splicing mode to obtain at least one spliced data; performing data packet encapsulation on the at least one spliced data to obtain a data packet to be sent; and sending the data packet to be sent to the receiving end; The receiving end is used to receive at least one data packet to be sent; decapsulate each data packet to be sent to obtain spliced data in each data packet to be sent; and obtain original file data from the spliced data.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 or 8 to 12 is implemented.
Citation Information
Patent Citations
Data transmission method and related devices thereof
CN109587085A
Sending method and sending device of file transmission, electronic equipment and readable medium
CN109617945A