File simultaneous transmission method, device and equipment based on equipment chain and storage medium

By transmitting files in blocks and compressing them to generate protocol headers, the problem of low efficiency in file transmission across device chains is solved, resulting in faster transmission speeds and higher accuracy.

CN122001871APending Publication Date: 2026-05-08GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411569127.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies based on device chains have low file transfer efficiency, especially when data is lost, requiring the retransmission of the entire large file, resulting in low transmission efficiency.

Method used

Files are distributed and transmitted in units of preset data blocks. The content of the data blocks is compressed and a protocol header is generated to generate network data packets. Consistency verification is performed at the receiving end, and network data packets are forwarded and data content is written simultaneously.

Benefits of technology

It reduces the amount and time of retransmission, improves transmission speed and overall efficiency, reduces the waiting time at the downstream receiving end, and improves the accuracy and efficiency of file simultaneous transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122001871A_ABST
    Figure CN122001871A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a file simultaneous transmission method and device based on an equipment chain, equipment and a storage medium. According to the technical scheme, the file distribution instruction is received, the to-be-distributed file is read with the preset data block length as the unit according to the file distribution instruction, the data block is obtained, and the data block comprises the data content; compressing the data content in the data block to obtain a corresponding compressed data packet, and generating a corresponding protocol header; combining each compressed data packet with a corresponding protocol header to obtain a corresponding network data packet; and sending the network data packet to a corresponding receiving end in the equipment chain, so that the corresponding receiving end forwards the received network data packet to a downstream receiving end, and writes the data content extracted from the network data packet into a local file, thereby solving the technical problem of low work efficiency of simultaneous file transmission based on the equipment chain in the related technology. And the work efficiency of simultaneous file transmission based on the equipment chain is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information transmission technology, and in particular to a file simultaneous transmission method, apparatus, device and storage medium based on device chain. Background Technology

[0002] A switch device chain refers to a logical network topology formed by connecting multiple terminal devices connected by a specific connection method. Switch device chains are widely used in enterprise networks, data centers, industrial parks (for connecting various industrial equipment), smart cities (transportation, security, and energy, etc.), finance, and healthcare.

[0003] In related technologies, when a switch device chain performs file simultaneous transmission, it transmits data in units of the entire large file. When some data is lost during transmission, that is, when the file received by the receiving end is incomplete, the entire large file needs to be retransmitted, resulting in relatively low overall transmission efficiency for file simultaneous transmission. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for file simultaneous transmission based on device chains, which can solve the technical problem of low efficiency in file simultaneous transmission based on device chains in related technologies and improve the efficiency of file simultaneous transmission based on device chains.

[0005] In a first aspect, embodiments of this application provide a file simultaneous transmission method based on a device chain, used as a first sending end, wherein in the device chain, any terminal device is at most a sending end of a terminal device, and / or at most a receiving end of a terminal device, and the terminal device at the head of the device chain serves as the first sending end, the method comprising:

[0006] Receive a file distribution instruction, and read the file to be distributed according to the file distribution instruction in units of preset data block length to obtain data blocks, the data blocks including data content;

[0007] The data content in the data block is compressed to obtain the corresponding compressed data packet, and the corresponding protocol header is generated.

[0008] Each compressed data packet is combined with its corresponding protocol header to obtain the corresponding network data packet;

[0009] The network data packet is sent to the corresponding receiver in the device chain, so that the corresponding receiver forwards the received network data packet to the downstream receiver and writes the data content extracted from the network data packet to a local file.

[0010] As described above, in file simultaneous transmission based on a device chain, the file to be distributed is read in units of a preset data block length according to the file distribution instruction, obtaining the corresponding data blocks. Subsequent transmission and statistics are performed on a block-by-block basis. Compared to related technologies that transmit the entire file to be distributed, this embodiment transmits the file on a block-by-block basis. When some data is lost and needs to be retransmitted, the amount of retransmitted data and the retransmission time are greatly reduced, thereby improving the overall efficiency of file simultaneous transmission. Furthermore, based on transmitting and statistics on a block-by-block basis, the data content within the data blocks is compressed to obtain a smaller unit of transmitted data, further improving transmission speed and efficiency. In addition, network data packet forwarding and data content writing can be performed simultaneously at the receiving end. Compared to related technologies where the entire file must be received before being sent to the downstream receiving end, this greatly reduces the waiting time at the downstream receiving end, further improving the overall efficiency of file simultaneous transmission.

[0011] In one embodiment, the device chain-based file transfer method further includes:

[0012] During the process of reading the file to be distributed, the corresponding verification value is obtained by calculating and processing the data content of each data block read.

[0013] After reading is complete, the first verification value corresponding to the file to be distributed is calculated based on the verification values ​​corresponding to all data blocks.

[0014] Receive the second verification value reported by each receiving end. The second verification value is obtained by the corresponding receiving end based on the data content in the local file after receiving the end of reception instruction.

[0015] By comparing the first verification value and the second verification value, the corresponding verification comparison result for each receiving end is obtained;

[0016] The verification comparison result is transmitted to the corresponding receiving end in the device chain so that the corresponding receiving end can determine whether the reception was successful based on the corresponding verification comparison result.

[0017] As described above, network data packets can be transmitted simultaneously while the verification value is being calculated, reducing the time spent waiting for the verification value to be calculated and thus improving the transmission efficiency of file transmission.

[0018] In one embodiment, the device chain-based file transfer method further includes:

[0019] During the process of reading the file to be distributed, the MD5 value corresponding to each data block is calculated and processed based on the data content of each data block read.

[0020] After reading is complete, the MD5 value of all data blocks is calculated to obtain the first MD5 value of the file to be distributed.

[0021] Receive the second MD5 value reported by each receiving end. The second MD5 value is obtained by the corresponding receiving end after receiving the end of reception instruction, based on verifying the data content in the local file.

[0022] Compare the first MD5 value and the second MD5 value to obtain the MD5 value comparison result for each receiver. The MD5 value comparison result includes whether the MD5 values ​​are the same or the MD5 values ​​are different.

[0023] The MD5 value comparison result is transmitted to the corresponding receiving end in the device chain, so that the corresponding receiving end determines that the reception is successful when the MD5 value comparison result is the same, or determines that the reception is unsuccessful when the MD5 value comparison result is different.

[0024] Compared with the related technologies that require the MD5 value of the entire file to be calculated before file transmission can begin, this embodiment can transmit network data packets simultaneously with the MD5 value calculation, reducing the waiting time for MD5 value calculation and thus improving the transmission efficiency of file transmission.

[0025] In one embodiment, the data content in the data block is compressed to obtain a corresponding compressed data packet, and a corresponding protocol header is generated, including:

[0026] The data content in the data block is compressed according to the preset compression algorithm to obtain the corresponding compressed data packet;

[0027] Based on the data block's identifier, size information, compression algorithm identifier, and compressed data packet size information, generate the corresponding protocol header;

[0028] Each compressed data packet is combined with its corresponding protocol header to obtain the corresponding network data packet, including:

[0029] The protocol header is encoded into a byte stream and appended to the compressed data packet for comprehensive encoding to obtain the network data packet.

[0030] As described above, by comprehensively encoding the compressed data packet and the corresponding protocol header to obtain the network data packet, the receiving end can perform consistency verification based on the protocol header checksum, thereby improving the accuracy of data reception and avoiding receiving inconsistent network data packets that cannot be decoded according to the preset decoding algorithm, thus improving the overall efficiency of file simultaneous transmission.

[0031] In one embodiment, after receiving the file distribution instruction, the process includes:

[0032] The receiver in the device chain reports the ready command, and the other terminal devices in the device chain are all receivers of the first sender.

[0033] After confirming that all receivers in the device chain have reported ready instructions, the file to be distributed is read in units of preset data block length according to the file distribution instructions;

[0034] Sending network data packets to the corresponding receiver in the device chain includes:

[0035] Network data packets are sent to the corresponding receiving end in the device chain according to the preset upstream and downstream information. The upstream and downstream information includes the upstream and downstream information of each receiving end. The upstream information includes the device identifier and communication address information of the upstream sending end of the corresponding receiving end, and the downstream information includes the device identifier and communication address information of the downstream receiving end of the corresponding receiving end.

[0036] As described above, by only starting file simultaneous transmission processing after all receiving ends have reported ready commands, the interruption of file simultaneous transmission due to some receiving ends not being ready is avoided, which would affect the working efficiency of the entire device chain. Therefore, the method of starting file simultaneous transmission processing only after all receiving ends have reported ready commands in this embodiment can effectively improve the file simultaneous transmission efficiency of the entire device chain.

[0037] In a second aspect, embodiments of this application provide a file simultaneous transmission method based on a device chain, for use at the receiving end, wherein any terminal device in the device chain is at most the sending end of one terminal device and / or at most the receiving end of one terminal device, and the terminal device at the head of the device chain serves as the first sending end. This file simultaneous transmission method based on a device chain includes:

[0038] According to the network data packets transmitted by the upstream sender corresponding to the device connection, the network data packets are obtained by combining the corresponding protocol headers of the compressed data packets. The compressed data packets are obtained by compressing the data content in the data blocks. The protocol header is generated according to the compression process of the data blocks. The data blocks are obtained by the first sender reading the file to be distributed in units of preset data block length according to the file distribution instruction. The data blocks include data content.

[0039] Perform consistency checks on the protocol headers of network data packets;

[0040] When the consistency check passes, the network data packet is added to the first queue and the second queue;

[0041] The network data packets are sent to the downstream receiving end through the first queue, and the data content extracted from the network data packets is written to the local file through the second queue.

[0042] As described above, the receiving end can simultaneously forward network data packets and write data content. Compared with related technologies that require the entire file to be received before it can be sent to the downstream receiving end, this reduces the waiting time of the downstream receiving end and further improves the overall efficiency of file simultaneous transmission.

[0043] In one embodiment, after receiving the network data packets transmitted from the corresponding upstream sender based on the device connection, the process includes:

[0044] After receiving the end-of-reception instruction, the data content in the local file is verified to obtain the second verification value;

[0045] The second verification value is reported to the first sending end so that the first sending end can compare the second verification value with the first verification value calculated by itself to obtain the corresponding verification comparison result;

[0046] Receive the verification comparison result transmitted by the first sender, and determine whether the reception was successful based on the verification comparison result.

[0047] Compared with the related technologies where file transmission can only begin after the verification value of the entire file to be distributed has been calculated, the first sending end in this embodiment can transmit network data packets simultaneously while calculating the verification value, reducing the time the receiving end waits for the first sending end to calculate the verification value, thereby improving the transmission efficiency of file transmission.

[0048] In a third aspect, embodiments of this application provide a file simultaneous transmission device based on a device chain, used as a first sending end. In the device chain, any terminal device is at most a sending end of a terminal device and / or at most a receiving end of a terminal device. The terminal device at the head of the device chain serves as the first sending end. The file simultaneous transmission device based on the device chain includes:

[0049] The data block reading module is used to receive file distribution instructions, read the file to be distributed in units of preset data block length according to the file distribution instructions, and obtain data blocks, which include data content;

[0050] The data block compression module is used to compress the data content in the data block to obtain the corresponding compressed data packet and generate the corresponding protocol header;

[0051] The data block integration module is used to combine the corresponding protocol headers of each compressed data packet to obtain the corresponding network data packet.

[0052] The data block sending module is used to send network data packets to the corresponding receiving end in the device chain, so that the corresponding receiving end forwards the received network data packets to the downstream receiving end, and writes the data content extracted from the network data packets into a local file.

[0053] In a fourth aspect, embodiments of this application provide a file simultaneous transfer device based on a device chain, including:

[0054] Memory and one or more processors;

[0055] Memory, used to store one or more programs;

[0056] When one or more programs are executed by one or more processors, the one or more processors implement a device chain-based file simultaneous transfer method as described in the first or second aspect.

[0057] In a fifth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform a device chain-based file simultaneous transfer method as described in the first or second aspect.

[0058] The beneficial effects of the device chain-based file simultaneous transfer device, device chain-based file simultaneous transfer equipment, and storage medium provided above can be referenced in light of the beneficial effects of the device chain-based file simultaneous transfer method. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of file transfer in a related technology provided in an embodiment of this application;

[0060] Figure 2 This is a schematic diagram of a device chain provided in an embodiment of this application;

[0061] Figure 3 This is a flowchart of a file simultaneous transfer method based on a device chain provided in an embodiment of this application;

[0062] Figure 4 This is a schematic diagram of a network data packet format provided in an embodiment of this application;

[0063] Figure 5 This is a flowchart of another file simultaneous transmission method based on device chain provided in the embodiments of this application;

[0064] Figure 6 This is a flowchart of another file simultaneous transmission method based on device chain provided in the embodiments of this application;

[0065] Figure 7 This is a schematic diagram of a file simultaneous transmission device based on a device chain provided in an embodiment of this application;

[0066] Figure 8 A schematic diagram of another file simultaneous transfer device based on device chain provided in this application embodiment.

[0067] Figure 9This is a schematic diagram of a file simultaneous transmission device based on a device chain provided in an embodiment of this application. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0069] Figure 1 This is a schematic diagram of file transfer in a related art provided in an embodiment of this application, referring to... Figure 1 In the related technology's device chain, source host 10 acts as the head of the chain, communicating with first host 20, and first host 20 communicating with second host 30. Second host 30 acts as the tail of the chain, thus forming a linear communication device chain. When performing file simultaneous transmission, the switch device chain transmits data in units of the entire large file, for example... Figure 1 In this process, a file is sent to a first host 20 via a sending program in the source host 10. The first host 20 receives the file via a receiving listening program. After the entire file is received, it is forwarded to a second host 30 via a forwarding program. The second host 30 then receives the file via a receiving listening program. This method of transmitting data in units of a large file is typically limited by network bandwidth, resulting in relatively low transmission efficiency. To improve efficiency, the entire large file can be compressed before transmission. While this method reduces data transmission volume and thus improves efficiency, it still requires retransmission of the entire file if some data is lost, making the overall efficiency relatively low.

[0070] Furthermore, in related technologies, during the transmission process of a device chain, when file simultaneous transmission is performed on a whole large file basis, the corresponding receiving end must complete the reception of all data in the entire large file before it can forward (the large file) to the downstream receiving end. This results in a long waiting time for the downstream receiving end, leading to low overall transmission efficiency for file simultaneous transmission across the entire device chain. For example... Figure 1In this process, the first host 20 first receives the entire large file transmitted by the source host 10 based on a receiving and listening program. After the entire large file is received, it is then forwarded to the second host 30 through a forwarding program. During the process of the first host 20 receiving the file, the subsequent second host 30 is in an idle state, resulting in very low overall transmission efficiency of the device chain. When the file to be transmitted is 10GB or 100GB or larger, this efficiency lag will be even more pronounced.

[0071] Furthermore, in related technologies, transmission is based on transmitting the entire large file as a unit. This requires calculating the integrity verification information of the entire file (such as the MD5 value) before sending the file, which requires a long waiting time for calculation. As a result, the overall transmission efficiency of the device chain is low.

[0072] Based on this, this application provides a device chain-based file simultaneous transmission method, apparatus, device, and storage medium to solve the technical problem of low efficiency in device chain-based file simultaneous transmission in related technologies. The device chain-based file simultaneous transmission method, apparatus, device, and storage medium provided in this application aim to read the file to be distributed in units of preset data block length according to the file distribution instruction when performing file simultaneous transmission based on a device chain, obtaining the corresponding data blocks. Subsequent transmission and statistics are performed on a data block basis. Compared to related technologies that perform file simultaneous transmission on the basis of the entire file to be distributed, this embodiment performs file simultaneous transmission on a data block basis. When some data is lost and needs to be retransmitted, the corresponding retransmission data volume and retransmission time are greatly reduced, thereby improving the overall efficiency of file simultaneous transmission. Furthermore, based on sending and statistics on a data block basis, the data content in the data block is compressed to obtain a smaller unit of transmitted data, further improving transmission speed and efficiency. Furthermore, the receiving end can simultaneously forward network data packets and write data content. Compared with related technologies that require all files to be received before they can be sent to the downstream receiving end, this greatly reduces the waiting time at the downstream receiving end and further improves the overall efficiency of file simultaneous transmission.

[0073] This embodiment performs file simultaneous transmission processing within a pre-created device chain. The topology of this device chain can be created manually or automatically based on the terminal devices within the chain. This embodiment does not limit the specific method of creating the device chain. In this device chain, any terminal device can be at most a sender and / or at most a receiver. The terminal device at the head of the chain serves as the first sender, and all other terminal devices in the chain are receivers of the first sender. The upstream device of any terminal device in the chain is the upstream sender, and the downstream device is the downstream receiver. Based on the creation of the device chain, upstream and downstream information is generated. This information includes upstream and downstream information for each receiver. The upstream information includes the device identifier and communication address information of the upstream device (i.e., the upstream sender) of the corresponding receiver, and the downstream information includes the device identifier and communication address information of the downstream device (i.e., the downstream receiver) of the corresponding receiver. Before starting file simultaneous transmission, the first sending end will send the upstream and downstream information corresponding to the device chain to each receiving end. During the file simultaneous transmission, each receiving end will receive the data (blocks) sent by the upstream device (i.e., the upstream sending end) according to the upstream and downstream information (upstream information), and send the corresponding data (blocks) to the downstream device (i.e., the downstream receiving end) according to the downstream and upstream information (downstream information).

[0074] Figure 2 This is a schematic diagram of a device chain provided in an embodiment of this application, with reference to... Figure 2 In this device chain, terminal device 1, terminal device 2, terminal device 3, terminal device 4, terminal device 5, terminal device 6, and terminal device 7 are connected in series to form the device chain. Figure 2 In this diagram, solid lines represent physical connections between switches, while dashed lines represent logical connections between upstream and downstream devices. Terminal device 1, acting as the head of the chain, is the first sender, and terminal devices 2-7 are all receivers of this first sender. For example, for terminal device 2, terminal device 1 acts as its upstream sender, and terminal device 3 as its downstream receiver. Through the device chain provided in this embodiment, the file simultaneous transmission method based on the device chain provided in this embodiment is executed, enabling terminal devices 1-7 to receive the corresponding simultaneous transmission file (i.e., the file to be distributed below) and write the data content of the simultaneous transmission file into a local file, thus achieving file simultaneous transmission.

[0075] Figure 3This is a flowchart illustrating a device chain-based file simultaneous interpretation method provided in this application embodiment. The device chain-based file simultaneous interpretation method provided in this embodiment can be executed by a device chain-based file simultaneous interpretation device. This device chain-based file simultaneous interpretation device can be implemented through software and / or hardware. The device chain-based file simultaneous interpretation device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the device chain-based file simultaneous interpretation device can be an electronic device, such as an interactive whiteboard, tablet computer, smart TV, learning machine, or mobile phone.

[0076] The following description uses an interactive flat panel as an example to illustrate the implementation of a device chain-based file simultaneous transfer method. This method is used as a first sending end. In the device chain, any terminal device can be at most a sending end and / or at most a receiving end, with the terminal device at the head of the chain serving as the first sending end. (Refer to...) Figure 3 The device chain-based file transfer method specifically includes:

[0077] S101. Receive file distribution instruction, read the file to be distributed according to the file distribution instruction in units of preset data block length, and obtain data blocks, the data blocks including data content.

[0078] The first sending end is the terminal device at the head of the device chain, acting as the initiator during file simultaneous transmission. When file simultaneous transmission is required, a file distribution instruction is generated in the first sending end based on the file simultaneous transmission initiation operation, or the file distribution instruction is input to the first sending end based on the file simultaneous transmission initiation operation. When the first sending end receives the file distribution instruction, it indicates that file simultaneous transmission needs to begin. The first sending end obtains / determines the file to be distributed according to the file distribution instruction, and reads the file to be distributed in units of a preset data block length to obtain data blocks. The data block includes identification information, data content, and size information (also known as length information). As described above, by reading the file to be distributed in units of a preset data block length, subsequent file simultaneous transmission can be performed based on data blocks. When packet loss occurs and retransmission is required, data can be retransmitted based on data blocks. Compared with the method in related technologies that requires retransmission of the entire file, this embodiment can greatly reduce the amount of retransmitted data and retransmission time, thereby improving the overall efficiency of file simultaneous transmission.

[0079] In one embodiment, after receiving the file distribution instruction, the first sending end can wait for the receiving ends in the device chain to report ready instructions to further improve the efficiency of file simultaneous transmission. A ready instruction can be understood as the corresponding receiving end being ready to participate in the file simultaneous transmission process. For example, the ready instruction can be received via TCP (Transmission Control Protocol) calls. After the device chain is established, TCP call connections between the first sending end and each receiving end can be established based on the upstream and downstream information of the device chain. Before starting file simultaneous transmission, the ready instructions reported by the corresponding receiving end are received according to the pre-established TCP call connections. After the first sending end receives the ready instructions reported by all receiving ends (in the device chain), it is determined that all receiving ends are ready, and file simultaneous transmission can begin. That is, the first sending end can execute the step of reading the file to be distributed in units of a preset data block length to obtain data blocks. As described above, by only starting file simultaneous transmission processing after all receiving ends have reported ready commands, the interruption of file simultaneous transmission due to some receiving ends not being ready is avoided, which would affect the working efficiency of the entire device chain. Therefore, the method of starting file simultaneous transmission processing only after all receiving ends have reported ready commands in this embodiment can effectively improve the file simultaneous transmission efficiency of the entire device chain.

[0080] S102. Compress the data content in the data block to obtain the corresponding compressed data packet and generate the corresponding protocol header.

[0081] After obtaining the data block as described above, to further improve the transmission speed, the data content in the data block can be compressed to further reduce the amount of data transmitted per unit. Based on the reduction in the amount of data transmitted per unit, the overall transmission efficiency can be further improved. In this embodiment, the data content in the data block can be compressed according to a preset compression algorithm to obtain the corresponding compressed data packet. Based on the data block's identification information, size information, compression algorithm identifier, and the size information of the compressed data packet, a corresponding protocol header is generated.

[0082] S103. Combine the corresponding protocol headers of each compressed data packet to obtain the corresponding network data packet.

[0083] Each compressed data packet and its corresponding protocol header are combined to obtain a corresponding network data packet, which is used for transmission to the downstream receiving end. In this embodiment, the protocol header corresponding to each compressed data packet can be encoded into a byte stream and added before the corresponding compressed packet for comprehensive encoding to obtain the corresponding network data packet.

[0084] For example, Figure 4 This is a schematic diagram of a network data packet format provided in an embodiment of this application, with reference to... Figure 4The network data provided in this embodiment includes a protocol header checksum, a protocol header, and (compressed) data content. The protocol header checksum is responsible for verifying the consistency of the protocol header, using CRC32 or other verification methods. The protocol header checksum is generated based on the protocol header and data content. The protocol header includes transferNum (transmission sequence number), chunk ld (data block ID), chunk length (data block length), data checksum, and data type. transferNum (transmission sequence number) is used to distinguish the file to which a data block belongs when multiple files are transmitted simultaneously. chunk ld (data block ID) represents the number / label of the data block in the file. chunk length represents the length of the data block; the chunk length combined with chunk ld (data block ID) can determine the write position of the data block in the file. The data checksum is used for verifying the consistency of the data in the data block, using CRC32 or other verification methods. The data type (field) is used to determine the type of data block, facilitating the receiving end to select the appropriate data processing method for the data block. If the sending end has encrypted the data block, the data type field can be used to identify encryption, and the receiving end can decrypt it accordingly. The data content is the data content corresponding to the data block. The data content in the network data packet is the compressed data content, which the receiving end needs to decode to obtain the corresponding original data content.

[0085] As described above, by comprehensively encoding the compressed data packet and the corresponding protocol header to obtain the network data packet, the receiving end can perform consistency verification based on the protocol header checksum, thereby improving the accuracy of data reception and avoiding receiving inconsistent network data packets that cannot be decoded according to the preset decoding algorithm, thus improving the overall efficiency of file simultaneous transmission.

[0086] S104. Send the network data packet to the corresponding receiving end in the device chain so that the corresponding receiving end forwards the received network data packet to the downstream receiving end, and writes the data content extracted from the network data packet to a local file.

[0087] After the data blocks are compressed and encoded to obtain the corresponding network data packets, the network data packets are sent to the corresponding receiving end in the device chain. This allows the receiving end to forward the received network data packets to the downstream receiving end and write the data extracted from the network data packets to a local file. In this embodiment, the network data packets can be sent to the corresponding downstream receiving end in the device chain according to preset upstream and downstream information. As mentioned above, the upstream and downstream information of the device chain includes upstream and downstream information for each receiving end. The upstream information includes the device identifier and communication address information of the upstream device (i.e., the upstream sender) of the corresponding receiving end, and the downstream information includes the device identifier and communication address information of the downstream device (i.e., the downstream receiver) of the corresponding receiving end. Therefore, the first sender (e.g., Figure 3 Terminal device 1) sends network data packets to its downstream receiver (e.g., based on the upstream and downstream information corresponding to the device chain) Figure 3 Terminal device 2 in the chain), its downstream receiving end forwards network data packets to the corresponding downstream receiving end (e.g., based on the upstream and downstream information of the device chain). Figure 3 Terminal device 3) in the chain of devices, thereby enabling network data packets to be transmitted to each receiving end in the chain of devices.

[0088] In one embodiment, in the device chain, after the corresponding receiving end receives the network data packet, it first performs a consistency check on the protocol header in the network data packet. The consistency check can be performed by the protocol header checksum. After the consistency check passes, the network data packet is added to the first queue and the second queue. The network data packet is sent to the corresponding downstream receiving end through the first queue, and the network data packet is decoded and decompressed through the second queue to extract the data content. The extracted data content is then written to a local file.

[0089] It should be noted that if the consistency check fails, the corresponding network data packet is discarded, and a retransmission request is generated based on the identification information of the network data packet (such as the data block ID). The retransmission request is then reported to the first sender to request the retransmission of the network data packet.

[0090] As described above, through steps S101-S104, when performing file simultaneous transmission based on the device chain, the file to be distributed is read according to the file distribution instruction in units of a preset data block length to obtain the corresponding data blocks. Subsequent transmission and statistics are performed on a data block basis. Compared to related technologies that perform file simultaneous transmission on a whole-file-to-distribute basis, this embodiment performs file simultaneous transmission on a data block basis. When some data is lost and needs to be retransmitted, the corresponding retransmission data volume and retransmission time are greatly reduced, thereby improving the overall efficiency of file simultaneous transmission. Furthermore, based on sending and statistics on a data block basis, the data content within the data block is compressed to obtain a smaller unit of transmitted data, further improving transmission speed and efficiency. In addition, network data packet forwarding and data content writing can be performed simultaneously at the receiving end. Compared to related technologies where the entire file must be received before being sent to the downstream receiving end, this greatly reduces the waiting time at the downstream receiving end, further improving the overall efficiency of file simultaneous transmission.

[0091] In one embodiment, to determine whether the receiving end has successfully received the data, that is, to determine whether the data content received by the receiving end is complete, it can also be understood as needing to determine whether the complete file corresponding to all network data packets received by each receiving end is the same as the file to be distributed; therefore, file integrity verification is required. Figure 5This is a flowchart of another file simultaneous transfer method based on a device chain provided in this application embodiment. This embodiment provides a file simultaneous transfer method based on a device chain to verify the integrity of the received file at the receiving end. (Refer to...) Figure 5 The device chain-based file transfer method is executed by the first sending end mentioned above, and specifically includes:

[0092] S201. Receive file distribution instruction, read the file to be distributed according to the file distribution instruction in units of preset data block length, and obtain data blocks, the data blocks including data content.

[0093] S202. During the process of reading the file to be distributed, the corresponding verification value is obtained by calculating and processing the data content in each data block read.

[0094] The verification value can be understood as a numerical value calculated according to a preset data integrity verification algorithm. The receiving end then calculates the corresponding verification value according to the same verification algorithm based on the received data content. If the verification value calculated by the receiving end is the same as the verification value calculated by the sending end, it means that the receiving end has received complete data / file.

[0095] In this embodiment, during the reading of the file to be distributed, the file is read according to a preset data block length. After obtaining the corresponding data block, calculations can be performed immediately based on the data content in the data block to obtain the verification value corresponding to that data block. After the verification value corresponding to the data block is calculated, the aforementioned S102-S104 steps can be executed to simultaneously transmit the network data packets corresponding to that data block based on the device chain. Compared with the related technologies where the verification value of the entire file to be distributed (which can be understood as the first verification value below) must be calculated before file simultaneous transmission can begin, this embodiment can perform simultaneous transmission of network data packets while calculating the verification value, reducing the waiting time for verification value calculation and thus improving the transmission efficiency of file simultaneous transmission.

[0096] In this embodiment, no restrictions are placed on the specific algorithm for calculating the verification value.

[0097] S203. After reading is complete, calculate and process the verification values ​​corresponding to all data blocks to obtain the first verification value corresponding to the file to be distributed.

[0098] Based on the aforementioned calculation of the corresponding verification value for each data block read, after the file to be distributed is read completely, the verification values ​​corresponding to all data blocks can be obtained. By calculating and processing the verification values ​​of all data blocks, the first verification value corresponding to the entire file to be distributed can be obtained. In this embodiment, the first verification value can be obtained by adding the verification values ​​corresponding to each data block, or by performing secondary encryption calculations based on the verification values ​​of each data block. This first verification value is used to verify whether the receiving end has successfully received the data after the reception is completed, that is, to verify whether the file / data content corresponding to all received network data packets is complete, and in other words, to verify whether the file / data content corresponding to all received network data packets is the same as the file to be distributed.

[0099] S204. Receive the second verification value reported by each receiving end. The second verification value is obtained by the corresponding receiving end based on the data content in the local file after receiving the end of reception instruction.

[0100] After each receiving end finishes receiving data—that is, after receiving the end-of-reception instruction from the first sending end—it can process all the data content written to its local file based on the received network packets using a preset verification algorithm to obtain the corresponding second verification value. End of reception can be understood as the completion of receiving all network packets corresponding to the file to be distributed, meaning that all network packets requiring retransmission have been retransmitted. For example, if the first sending end finishes retransmission and no new retransmission request is received within a preset time, it signifies the end of reception, and the first sending end sends an end-of-reception instruction / signal to the receiving end via a TCP connection. Each receiving end, upon receiving the end-of-reception instruction / signal from the first sending end, begins calculating its second verification value. After calculating its own second verification value, each receiving end sends it to the first sending end via a TCP connection. The first sending end receives the second verification values ​​reported by all receiving ends via the TCP connection.

[0101] S205. Compare the first verification value and the second verification value to obtain the corresponding verification comparison result for each receiving end.

[0102] The first sending end compares the received second verification value with the first verification value to obtain the corresponding verification comparison result for each receiving end. When the verification comparison result shows that the second verification value is the same as the first verification value, it means that the corresponding receiving end has successfully received the file to be distributed, i.e., received the complete file to be distributed; when the verification comparison result shows that the second verification value is different from the first verification value, it means that the corresponding receiving end has failed to receive the file, i.e., the received file / data content is incomplete, i.e., the received file / data content is different from the file to be distributed.

[0103] S206. Transmit the verification comparison result to the corresponding receiving end in the device chain so that the corresponding receiving end can determine whether the reception was successful based on the corresponding verification comparison result.

[0104] After receiving the verification comparison result from each receiving end, the first sending end transmits the corresponding verification comparison result to the receiving end in the device chain, so that the corresponding receiving end can determine whether the reception was successful based on its corresponding verification comparison result. For example, a corresponding device identifier can be added to the verification comparison result. When transmitting the verification comparison result based on the device chain, the corresponding receiving end can determine whether the verification comparison result belongs to itself based on the device identifier in the verification comparison result. If it determines that the verification comparison result belongs to itself, it determines whether the reception was successful based on that verification comparison result. It should be noted that this embodiment does not limit the operations after determining whether the reception was successful.

[0105] In one embodiment, the verification value is illustrated using the MD5 value as an example. A file distribution instruction is received, and the file to be distributed is read in units of a preset data block length according to the instruction, resulting in data blocks, each containing data content. During the reading of the file to be distributed, calculations are performed based on the data content of each data block to obtain the MD5 value corresponding to each data block. For example, after each data block is read, it can be submitted to an MD5 calculator, which performs calculations to obtain the MD5 value corresponding to that data block. After obtaining the MD5 value corresponding to the corresponding data block, steps S102-S104 are executed, and the network data packets corresponding to that data block are simultaneously transmitted based on the device chain. After reading is complete, calculations are performed based on the MD5 values ​​corresponding to all data blocks to obtain the first MD5 value corresponding to the file to be distributed (the entire file). In this embodiment, the first MD5 value can be obtained by adding the MD5 values ​​corresponding to each data block, or by performing secondary encryption calculations based on the MD5 values ​​of each data block. The first MD5 value is used to verify whether the receiving end has successfully received the data after the reception is completed. Specifically, it verifies whether the file / data content corresponding to all received network data packets is complete, and whether the file / data content is the same as the file to be distributed. After receiving the data, each receiving end can calculate and process the corresponding second MD5 value based on all the data content in its local file according to a preset verification algorithm (corresponding to the verification algorithm of the first sending end). The receiving end reports the second MD5 value to the first sending end via a TCP connection. The first sending end receives the second MD5 value reported by each receiving end. It compares the first MD5 value with the received second MD5 value to obtain the MD5 value comparison result for each receiving end. The MD5 value comparison result includes whether the MD5 values ​​are the same or different. The MD5 value comparison result is transmitted to the corresponding receiving end in the device chain, so that the corresponding receiving end determines that the reception was successful if the MD5 value comparison result is the same, or determines that the reception was unsuccessful if the MD5 value comparison result is different. Compared with related technologies that require the entire file's MD5 value to be calculated before file transmission can begin, this embodiment can transmit network data packets simultaneously with MD5 value calculation, reducing the waiting time for MD5 value calculation and thus improving the transmission efficiency of file transmission.

[0106] Based on the above embodiments, Figure 6 This is a flowchart of another file transfer method based on a device chain provided in the embodiments of this application, referred to... Figure 6This device chain-based file simultaneous transfer method is used at the receiving end. In the device chain, any terminal device can be at most a sending end and / or at most a receiving end. The terminal device at the head of the device chain serves as the first sending end, and the other terminal devices in the device chain serve as the receiving ends of the first sending end. This embodiment uses the file simultaneous transfer operation corresponding to one of the receiving ends as an example for explanation. The device chain-based file simultaneous transfer method specifically includes:

[0107] S301. The device receives network data packets transmitted from the corresponding upstream sender. The network data packets are obtained by combining the corresponding protocol headers of compressed data packets. The compressed data packets are obtained by compressing the data content in the data blocks. The protocol headers are generated according to the compression process of the data blocks. The data blocks are obtained by the first sender reading the file to be distributed in units of a preset data block length according to the file distribution instruction. The data blocks include data content.

[0108] Each receiving end receives the corresponding network data packets transmitted by the upstream sending end according to the upstream and downstream information of the device chain. The network data packets are obtained through the aforementioned S101-S103, which will not be described in detail here.

[0109] S302. Perform a consistency check on the protocol header in the network data packet.

[0110] After each receiving end receives a network data packet, it performs a consistency check based on the protocol header checksum in the network data packet. If the consistency check passes, it executes the following S303. If the consistency check fails, it discards the corresponding network data packet and generates a retransmission request based on the identification information of the network data packet (e.g., data block ID). Subsequently, it reports the retransmission request to the first sending end to request the retransmission of the network data packet.

[0111] S303. When the consistency check passes, add the network data packet to the first queue and the second queue.

[0112] Each receiving end performs a consistency check using the protocol header checksum in the network data packet. After the consistency check passes, the corresponding network data packet is added to the first queue and the second queue.

[0113] S304. Send network data packets to the downstream receiving end through the first queue, and write the data content extracted from the network data packets to a local file through the second queue.

[0114] Each receiving end performs a consistency check using the protocol header checksum in the network data packet. After the consistency check passes, the corresponding network data packet is added to the first queue and the second queue. The corresponding network data packet is sent to the corresponding downstream receiving end through the first queue, and the network data packet is decoded and decompressed through the second queue to extract the data content, which is then written to a local file.

[0115] For example, refer to Figure 2 Taking terminal device 2 as the receiving end in this embodiment as an example, the following description is provided. Terminal device 2 receives network data packets sent by terminal device 1. Terminal device 2 performs a consistency check based on the protocol header checksum of the network data packet. After the consistency check passes, the terminal device 2 adds the network data packet to the first queue and the second queue. Terminal device 2 sends the network data packet to terminal device 3 (i.e., the downstream receiving end) through the first queue, and decodes and decompresses the network data packet through the second queue to extract the data content. The extracted data content is then written to its own (i.e., terminal device 2's) local file.

[0116] As described above, the receiving end can simultaneously forward network data packets and write data content. Compared with related technologies that require the entire file to be received before it can be sent to the downstream receiving end, this reduces the waiting time of the downstream receiving end and further improves the overall efficiency of file simultaneous transmission.

[0117] In one embodiment, after receiving a network data packet, the receiving end determines that all network data packets corresponding to the file to be distributed have been received. It then reads the data content from a local file and processes the read data content according to a preset verification algorithm to obtain a second verification value. The second verification value is reported to the first sending end, so that the first sending end can compare the received second verification value with its own calculated first verification value to obtain the corresponding verification comparison result for the receiving end. The first sending end calculates the corresponding first verification value and obtains the corresponding verification comparison result according to the aforementioned steps S201-S204, which will not be elaborated here. The receiving end receives the verification comparison result transmitted by the first sending end based on the device connection and determines whether the reception was successful based on the verification comparison result. For example, the receiving end can determine whether the verification comparison result belongs to itself based on the device identifier in the verification comparison result. When it determines that the verification comparison result belongs to itself, it determines whether the reception was successful based on that verification comparison result. For example, if the verification comparison results received by the corresponding receiving end are the same, that is, the second verification value calculated by the receiving end is the same as the first verification value calculated by the sending end, then the receiving end determines that it has successfully received the data. When the verification comparison results received by the receiving end are different, that is, the second verification value calculated by the receiving end is different from the first verification value calculated by the sending end, the receiving end determines that it has failed to receive the data, that is, the received file / data content is incomplete, or the received file / data content is different from the file to be distributed.

[0118] Compared with the related technologies where file transmission can only begin after the verification value of the entire file to be distributed has been calculated, the first sending end in this embodiment can transmit network data packets simultaneously while calculating the verification value, reducing the time the receiving end waits for the first sending end to calculate the verification value, thereby improving the transmission efficiency of file transmission.

[0119] It should be noted that this embodiment does not restrict the operations after successful reception.

[0120] Based on the above embodiments, Figure 7 This is a schematic diagram of a file simultaneous transfer device based on a device chain, provided as an embodiment of this application. (Reference) Figure 7 The file simultaneous transmission device based on device chain provided in this embodiment is used as a first sending end. In the device chain, any terminal device can be the sending end of at most one terminal device and / or the receiving end of at most one terminal device. The terminal device at the head of the device chain serves as the first sending end. The file simultaneous transmission device based on device chain specifically includes: a data block reading module 21, a data block compression module 22, a data block integration module 23, and a data block sending module 24.

[0121] Among them, the data block reading module 21 is used to receive the file distribution instruction, read the file to be distributed in units of preset data block length according to the file distribution instruction, and obtain data blocks, the data blocks including data content;

[0122] The data block compression module 22 is used to compress the data content in the data block to obtain the corresponding compressed data packet and generate the corresponding protocol header;

[0123] Data block integration module 23 is used to combine the corresponding protocol headers of each compressed data packet to obtain the corresponding network data packet;

[0124] The data block sending module 24 is used to send network data packets to the corresponding receiving end in the device chain, so that the corresponding receiving end forwards the received network data packets to the downstream receiving end, and writes the data content extracted from the network data packets into a local file.

[0125] In one embodiment, the device chain-based file transfer device further includes: a first calculation module, a second calculation module, a verification value receiving module, a verification value comparison module, and a verification value sending module;

[0126] The first calculation module is used to perform calculations based on the data content of each data block read during the process of reading the file to be distributed, and to obtain the corresponding verification value.

[0127] The second calculation module is used to perform calculations based on the verification values ​​corresponding to all data blocks after reading is complete, so as to obtain the first verification value corresponding to the file to be distributed.

[0128] The verification value receiving module is used to receive the second verification value reported by each receiving end. The second verification value is obtained by the corresponding receiving end based on the data content in the local file after receiving the end of reception instruction.

[0129] The verification value comparison module is used to compare the first verification value and the second verification value to obtain the corresponding verification comparison result for each receiving end.

[0130] The verification value sending module is used to transmit the verification comparison result to the corresponding receiving end in the device chain, so that the corresponding receiving end can determine whether the reception was successful based on the corresponding verification comparison result.

[0131] In one embodiment, the device chain-based file transfer device further includes: a first MD5 calculation module, a second MD5 calculation module, an MD5 value receiving module, an MD5 value comparison module, and an MD5 value sending module;

[0132] The first MD5 calculation module is used to calculate and process the data content of each data block during the process of reading the file to be distributed, and obtain the MD5 value corresponding to each data block.

[0133] The second MD5 calculation module is used to calculate the first MD5 value of the file to be distributed after reading is completed, based on the MD5 values ​​of all data blocks.

[0134] The MD5 value receiving module is used to receive the second MD5 value reported by each receiving end. The second MD5 value is obtained by the corresponding receiving end after receiving the end of reception instruction, based on verifying the data content in the local file.

[0135] The MD5 value comparison module is used to compare whether the first MD5 value and the second MD5 value are the same, and to obtain the MD5 value comparison result corresponding to each receiver. The MD5 value comparison result includes whether the MD5 values ​​are the same or the MD5 values ​​are different.

[0136] The MD5 value sending module is used to transmit the MD5 value comparison result to the corresponding receiving end in the device chain, so that the corresponding receiving end can determine that the reception is successful when the MD5 value comparison result is the same, or determine that the reception is unsuccessful when the MD5 value comparison result is different.

[0137] In one embodiment, the data block compression module includes: a compression submodule and a protocol header generation submodule;

[0138] The compression submodule is used to compress the data content in the data block according to the preset compression algorithm to obtain the corresponding compressed data packet;

[0139] The protocol header generation submodule is used to generate the corresponding protocol header based on the data block's identification information, size information, compression algorithm identification, and compressed data packet size information;

[0140] Based on the aforementioned embodiments, the data block integration module is further used to encode the protocol header into a byte stream and append it to the compressed data packet for comprehensive encoding to obtain a network data packet.

[0141] In one embodiment, the file simultaneous transfer device based on device chain further includes: a ready instruction receiving module and a read-open determination module;

[0142] The ready instruction receiving module is used to receive ready instructions reported by the receiving end in the device chain. Other terminal devices in the device chain are all receiving ends of the first sending end.

[0143] The read start determination module is used to determine that after receiving the ready instructions reported by all receivers in the device chain, it reads the file to be distributed in units of preset data block length according to the file distribution instructions.

[0144] Based on the aforementioned embodiments, the data block sending module is further configured to send network data packets to the corresponding receiving end in the device chain according to preset upstream and downstream information. The upstream and downstream information includes upstream and downstream information for each receiving end. The upstream information includes the device identifier and communication address information of the upstream sending end of the corresponding receiving end, and the downstream information includes the device identifier and communication address information of the downstream receiving end of the corresponding receiving end.

[0145] Based on the above embodiments, Figure 8 A schematic diagram of another file simultaneous transfer device based on a device chain provided in this application embodiment. (Reference) Figure 8 The file simultaneous transmission device based on device chain provided in this embodiment is used as a receiving end. In the device chain, any terminal device can be the sending end of at most one terminal device and / or the receiving end of at most one terminal device. The terminal device at the head of the device chain is the first sending end. The file simultaneous transmission device based on device chain specifically includes: a data packet receiving module 31, a consistency verification module 32, a queue determination module 33, and a queue processing module 34.

[0146] Among them, the data packet receiving module 31 is used to receive network data packets transmitted by the corresponding upstream sending end according to the device connection. The network data packets are obtained by combining the corresponding protocol headers of the compressed data packets. The compressed data packets are obtained by compressing the data content in the data blocks. The protocol header is generated according to the compression process of the data blocks. The data blocks are obtained by the first sending end reading the file to be distributed in units of preset data block length according to the file distribution instruction. The data blocks include data content.

[0147] The consistency verification module 32 is used to perform consistency verification on the protocol header in network data packets;

[0148] The queue determination module 33 is used to add network packets to the first queue and the second queue when the consistency check passes;

[0149] The queue processing module 34 is used to send network data packets to the downstream receiving end through the first queue, and to write the data content extracted from the network data packets to a local file through the second queue.

[0150] In one embodiment, the device chain-based file transfer device further includes: a third calculation module, a verification value reporting module, and a comparison result receiving module;

[0151] The third calculation module is used to verify the data content of the local file after receiving the end of reception instruction, and obtain the second verification value;

[0152] The verification value reporting module is used to report the second verification value to the first sending end, so that the first sending end can compare the second verification value with the first verification value calculated by itself to obtain the corresponding verification comparison result;

[0153] The comparison result receiving module is used to receive the verification comparison result transmitted by the first sending end, and determine whether the reception was successful based on the verification comparison result.

[0154] The file simultaneous translation device based on device chain provided in this application embodiment can be used to execute the file simultaneous translation method based on device chain provided in the above embodiment, and has corresponding functions and beneficial effects.

[0155] This application provides a file simultaneous transfer device based on a device chain, referring to... Figure 9 The device chain-based file simultaneous interpretation device includes: a processor 41, a memory 42, a communication module 43, an input device 44, and an output device 45. The number of processors and the number of memories in the device chain-based file simultaneous interpretation device can be one or more. The processor, memory, communication module, input device, and output device of the device chain-based file simultaneous interpretation device can be connected via a bus or other means.

[0156] The memory 42, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the device chain-based file simultaneous transfer method in any embodiment of this application (e.g., data block reading module, data block compression module, data block integration module, and data block sending module in a device chain-based file simultaneous transfer device). The memory may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0157] The communication module 43 is used for data transmission.

[0158] The processor 41 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, thereby realizing the above-mentioned file transfer method based on device chain.

[0159] Input device 44 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 45 may include display devices such as a display screen.

[0160] The device chain-based file simultaneous translation device provided above can be used to execute the device chain-based file simultaneous translation method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0161] This application also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute a file simultaneous transfer method based on a device chain. The file simultaneous transfer method based on a device chain includes: receiving a file distribution instruction; reading a file to be distributed in units of a preset data block length according to the file distribution instruction to obtain data blocks, each data block including data content; compressing the data content in the data blocks to obtain corresponding compressed data packets and generating corresponding protocol headers; combining each compressed data packet with the corresponding protocol header to obtain corresponding network data packets; sending the network data packets to the corresponding receiving end in the device chain, so that the corresponding receiving end forwards the received network data packets to the downstream receiving end; and writing the data content extracted from the network data packets into a local file.

[0162] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0163] Of course, the storage medium for storing computer-executable instructions provided in the embodiments of this application is not limited to the file simultaneous transfer method based on device chain as described above, and can also perform related operations in the file simultaneous transfer method based on device chain provided in any embodiment of this application.

[0164] The device chain-based file simultaneous translation device, storage medium, and device chain-based file simultaneous translation equipment provided in the above embodiments can execute the device chain-based file simultaneous translation method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the device chain-based file simultaneous translation method provided in any embodiment of this application.

[0165] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.

Claims

1. A file simultaneous transfer method based on device chains, characterized in that, For use as a first transmitting end, in the device chain, any terminal device is at most a transmitting end of a terminal device, and / or at most a receiving end of a terminal device, the terminal device at the head of the device chain serves as the first transmitting end, the method includes: Receive a file distribution instruction, and read the file to be distributed according to the file distribution instruction in units of a preset data block length to obtain a data block, wherein the data block includes data content; The data content in the data block is compressed to obtain the corresponding compressed data packet, and the corresponding protocol header is generated. Each compressed data packet is combined with its corresponding protocol header to obtain the corresponding network data packet; The network data packet is sent to the corresponding receiving end in the device chain, so that the corresponding receiving end forwards the received network data packet to the downstream receiving end and writes the data content extracted from the network data packet into a local file.

2. The method according to claim 1, characterized in that, The method further includes: During the process of reading the file to be distributed, the corresponding verification value is obtained by calculating and processing the data content in each data block read. After reading is complete, the first verification value corresponding to the file to be distributed is obtained by calculating and processing based on the verification values ​​corresponding to all the data blocks. Receive the second verification value reported by each receiving end. The second verification value is obtained by the corresponding receiving end based on the data content in the local file after receiving the end of reception instruction. By comparing the first verification value and the second verification value, the corresponding verification comparison result for each receiving end is obtained; The verification comparison result is transmitted to the corresponding receiving end in the device chain so that the corresponding receiving end can determine whether the reception was successful based on the corresponding verification comparison result.

3. The method according to claim 1, characterized in that, The method further includes: During the process of reading the file to be distributed, the MD5 value corresponding to each data block is calculated based on the data content of each data block read. After reading is complete, the MD5 value of the data block is calculated to obtain the first MD5 value of the file to be distributed. Receive the second MD5 value reported by each receiving end. The second MD5 value is obtained by the corresponding receiving end after receiving the end of reception instruction, based on verifying the data content in the local file. By comparing whether the first MD5 value and the second MD5 value are the same, the MD5 value comparison result corresponding to each receiving end is obtained. The MD5 value comparison result includes whether the MD5 values ​​are the same or the MD5 values ​​are different. The MD5 value comparison result is transmitted to the corresponding receiving end in the device chain, so that the corresponding receiving end determines that the reception is successful when the MD5 value comparison result is the same, or determines that the reception is unsuccessful when the MD5 value comparison result is different.

4. The method according to claim 1, characterized in that, The step of compressing the data content in the data block to obtain the corresponding compressed data packet and generating the corresponding protocol header includes: The data content in the data block is compressed according to a preset compression algorithm to obtain the corresponding compressed data packet; Based on the identifier information and size information of the data block, the identifier of the compression algorithm, and the size information of the compressed data packet, a corresponding protocol header is generated; The step of combining each compressed data packet with its corresponding protocol header to obtain the corresponding network data packet includes: The protocol header is encoded into a byte stream and appended to the compressed data packet for comprehensive encoding to obtain the network data packet.

5. The method according to claim 1, characterized in that, After receiving the file distribution instruction, the following is included: The device receives a ready command reported by the receiving end in the device chain, where other terminal devices in the device chain are all receiving ends of the first sending end. After confirming that ready instructions have been received from all receivers in the device chain, the file to be distributed is read in units of a preset data block length according to the file distribution instruction; Sending the network data packet to the corresponding receiving end in the device chain includes: The network data packet is sent to the corresponding receiving end in the device chain according to the preset upstream and downstream information. The upstream and downstream information includes the upstream information and downstream information of each receiving end. The upstream information includes the device identifier and communication address information of the upstream sending end of the corresponding receiving end, and the downstream information includes the device identifier and communication address information of the downstream receiving end of the corresponding receiving end.

6. A file simultaneous transfer method based on device chains, characterized in that, For use as a receiving end, in the device chain, any terminal device can be at most a transmitting end of a terminal device, and / or at most a receiving end of a terminal device, wherein the terminal device at the head of the device chain serves as the first transmitting end, and the method includes: The device receives network data packets transmitted from the corresponding upstream sender. The network data packets are obtained by combining compressed data packets with corresponding protocol headers. The compressed data packets are obtained by compressing the data content in the data blocks. The protocol headers are generated according to the compression process of the data blocks. The data blocks are obtained by the first sender reading the file to be distributed in units of a preset data block length according to the file distribution instruction. The data blocks include data content. Perform a consistency check on the protocol headers in the network data packets; When the consistency check passes, the network data packet is added to the first queue and the second queue; The network data packets are sent to the downstream receiving end through the first queue, and the data content extracted from the network data packets is written to a local file through the second queue.

7. The method according to claim 6, characterized in that, After receiving the network data packets transmitted from the corresponding upstream sender according to the device connection, the process includes: After receiving the end-of-reception instruction, the data content in the local file is verified to obtain the second verification value; The second verification value is reported to the first sending end, so that the first sending end can compare the second verification value with the first verification value calculated by itself to obtain the corresponding verification comparison result; The system receives the verification comparison result transmitted by the first sending end and determines whether the reception was successful based on the verification comparison result.

8. A file simultaneous transfer device based on device chain, characterized in that, For use as a first sending end, in the device chain, any terminal device can be at most a sending end of a terminal device, and / or at most a receiving end of a terminal device, the terminal device at the head of the device chain serves as the first sending end, and the file simultaneous transmission device based on the device chain includes: The data block reading module is used to receive a file distribution instruction, and read the file to be distributed according to the file distribution instruction in units of a preset data block length to obtain a data block, wherein the data block includes data content; The data block compression module is used to compress the data content in the data block to obtain the corresponding compressed data packet and generate the corresponding protocol header; The data block integration module is used to combine the corresponding protocol headers of each compressed data packet to obtain the corresponding network data packet; The data block sending module is used to send the network data packets to the corresponding receiving end in the device chain, so that the corresponding receiving end forwards the received network data packets to the downstream receiving end, and writes the data content extracted from the network data packets into a local file.

9. A file simultaneous transfer device based on device chain, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a processor, are used to perform the method as described in any one of claims 1-7.