CN-122001870-A - File transmission method, device, equipment and storage medium based on equipment chain
Abstract
The embodiment of the application discloses a file transmission method, a device, equipment and a storage medium based on equipment chains, which are used for carrying out file simultaneous transmission processing according to a pre-established initial equipment chain so as to send data blocks corresponding to files to be simultaneously transmitted to receiving ends, detecting state information of all receiving ends at fixed time in the file simultaneous transmission processing process, wherein the state information comprises an online state, an offline state and a completion state, moving a first receiving end with the current state information being the offline state or the completion state out of the initial equipment chain according to the state information to obtain the current equipment chain, inserting a second receiving end with the state information being changed from the offline state to the online state into the current equipment chain based on pre-stored equipment chain information according to update the current equipment chain, wherein the pre-stored equipment chain information is an upstream-downstream relation corresponding to the initial equipment chain, and sending the rest data blocks corresponding to the files to be simultaneously transmitted according to the current equipment chain, so that the technical problem of low comprehensive file transmission efficiency can be solved.
Inventors
- LONG XIAOBIN
- WANG DONGJIE
Assignees
- 广州视源创新科技有限公司
- 广州视睿电子科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (12)
- 1. The file transmission method based on the equipment chain is characterized by being used for a first transmitting end, wherein any terminal equipment in the equipment chain is at most a transmitting end of one terminal equipment and/or at most a receiving end of one terminal equipment, and the terminal equipment at the head of the equipment chain is used as the first transmitting end, and the file transmission method based on the equipment chain comprises the following steps: Carrying out file simultaneous transmission processing according to a pre-established initial equipment chain so as to send a data block corresponding to a file to be simultaneously transmitted to a receiving end, wherein other terminal equipment of the initial equipment chain are all used as the receiving end of the first sending end; in the file simultaneous transmission processing process, detecting state information of all receiving ends at fixed time, wherein the state information comprises an online state, an offline state and a completion state; moving the first type of receiving end out of the initial equipment chain according to the state information to obtain a current equipment chain, wherein the first type of receiving end is a receiving end with current state information in an offline state or a finished state; inserting a second type of receiving end into a current equipment chain based on pre-stored equipment chain information according to the state information so as to update the current equipment chain, wherein the second type of receiving end is a receiving end of which the state information is changed from an off-line state to an on-line state, and the pre-stored equipment chain information is an upstream-downstream relationship corresponding to the initial equipment chain; and sending the residual data blocks corresponding to the file to be transmitted simultaneously according to the current equipment chain.
- 2. The method of claim 1, wherein the file co-transmission process according to a pre-established initial device chain comprises: creating an initial equipment chain according to preset switch grouping information, so that communication connection is established between terminal equipment corresponding to the receiving end and terminal equipment corresponding to the transmitting end; receiving ready instructions of all receiving ends, wherein the ready instructions comprise equipment information of corresponding receiving ends, and the equipment information comprises equipment identification and communication address information; Establishing initial upstream and downstream information according to the equipment information in the ready instruction and the initial equipment chain, wherein the initial upstream and downstream information comprises upstream information and downstream information of each node, the upstream information comprises equipment identification and communication address information of upstream equipment of a corresponding node, and the downstream information comprises equipment identification and communication address information of downstream equipment of the corresponding node; and carrying out file simultaneous transmission processing according to the initial upstream and downstream information.
- 3. The method according to claim 2, wherein the file co-transmission processing according to the initial upstream and downstream information includes: The initial upstream and downstream information is sent to all receiving ends, so that the receiving end of the corresponding node determines the upstream information and the downstream information of the receiving end; and sending the data block corresponding to the file to be transmitted to a receiving end, so that the receiving end of the corresponding node receives the data block transmitted by the corresponding upstream equipment according to the initial upstream and downstream information and transmits the corresponding data block to the downstream equipment.
- 4. The method according to claim 2, wherein creating an initial device chain from the preset switch packet information so that the terminal device corresponding to the receiving end establishes a communication connection with the terminal device corresponding to the transmitting end includes: According to preset exchanger grouping information, connecting terminal equipment in the same exchanger end to end in series to form equipment short chains, so that communication connection is established between the terminal equipment corresponding to the receiving end and the terminal equipment corresponding to the transmitting end in the same exchanger; And splicing the device short chains of different switches to obtain the complete initial device chain.
- 5. The method of claim 4, wherein the splicing the device short chains of different switches to obtain the complete initial device chain comprises: acquiring network card bandwidth information of each switch; and splicing the device short chains of different switches in sequence according to the order from high to low of the network card bandwidth information to obtain the complete initial device chain.
- 6. The method of claim 1, wherein the moving the first type of receiving end out of the initial device chain according to the state information to obtain a current device chain includes: removing the first type receiving end from the initial equipment chain according to the state information to obtain a current equipment chain and current upstream and downstream information; Transmitting the current upstream and downstream information to a receiving end in an online state according to the current equipment chain so that the receiving end of the corresponding node updates the upstream information and the downstream information of the receiving end; the sending the remaining data blocks corresponding to the file to be transmitted according to the current equipment chain comprises the following steps: And transmitting the remaining data blocks corresponding to the file to be transmitted to a receiving end, so that the receiving end of the corresponding node receives the data blocks transmitted by the corresponding upstream equipment according to the updated upstream information and transmits the corresponding data blocks to the corresponding downstream equipment according to the updated downstream information.
- 7. The method according to claim 1, wherein said inserting the second class of receiving terminals into the current device chain based on the pre-stored device chain information according to the status information to update the current device chain comprises: inserting the second type receiving end into the current equipment chain based on pre-stored equipment chain information according to the state information to obtain updated current equipment chain and updated upstream and downstream information; According to the updated current equipment chain, the updated upstream and downstream information is sent to a receiving end in an online state, so that the receiving end of the corresponding node updates the upstream information and the downstream information of the receiving end; the sending the remaining data blocks corresponding to the file to be transmitted according to the current equipment chain comprises the following steps: And transmitting the remaining data blocks corresponding to the file to be transmitted to a receiving end, so that the receiving end of the corresponding node receives the data blocks transmitted by the corresponding upstream equipment according to the updated upstream information and transmits the corresponding data blocks to the corresponding downstream equipment according to the updated downstream information.
- 8. The method according to claim 1, wherein after the transmitting of the remaining data blocks corresponding to the pending and transmitting file according to the current device chain, the method comprises: Obtaining network card bandwidth information of all receiving ends, carrying out queue division according to the network card bandwidth information, and determining a first queue receiving end and a second queue receiving end, wherein the network card bandwidth information of the first queue receiving end exceeds a first threshold value, and the network card bandwidth information of the second queue receiving end is below the first threshold value; Acquiring a retransmission request fed back by the receiving end of the first queue; Determining a retransmission data block corresponding to the first queue receiving end according to the retransmission request; and sending the corresponding retransmission data block to the first queue receiving end according to the current equipment chain until all retransmission of the first queue receiving end is completed.
- 9. The method of claim 8, wherein the sending the corresponding retransmission data block to the first queue receiving end until the first queue receiving end completes all retransmissions comprises: Acquiring a retransmission request fed back by the receiving end of the second queue; determining a retransmission data block corresponding to the second queue receiving end according to the retransmission request; and sending the corresponding retransmission data block to the second queue receiving end according to the current equipment chain until all retransmission of the second queue receiving end is completed.
- 10. A file transmission device based on a device chain, which is used for a first transmitting end, wherein any terminal device in the device chain is at most a transmitting end of a terminal device, and/or is at most a receiving end of a terminal device, and a terminal device at the head of the device chain is used as the first transmitting end, and the file transmission device based on the device chain comprises: The first data transmission module is used for carrying out file simultaneous transmission processing according to a pre-established initial equipment chain so as to send data blocks corresponding to files to be simultaneously transmitted to a receiving end, and other terminal equipment of the initial equipment chain are all used as the receiving end of the first sending end; the device detection module is used for detecting state information of all receiving ends at regular time in the file simultaneous transmission processing process, wherein the state information comprises an online state, an offline state and a completion state; The first equipment chain adjusting module is used for moving the first type of receiving end out of the initial equipment chain according to the state information to obtain a current equipment chain, wherein the first type of receiving end is a receiving end with current state information in an offline state or a finished state; the second equipment chain adjusting module is used for inserting a second type of receiving end into the current equipment chain based on pre-stored equipment chain information according to the state information so as to update the current equipment chain, wherein the second type of receiving end is a receiving end of which the state information is changed from an off-line state to an on-line state, and the pre-stored equipment chain information is an upstream-downstream relationship corresponding to the initial equipment chain; and the second data transmission module is used for transmitting the residual data blocks corresponding to the file to be transmitted simultaneously according to the current equipment chain.
- 11. A device chain-based file transfer device, comprising: a memory and one or more processors; The memory is used for storing one or more programs; When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
- 12. A storage medium storing computer executable instructions which, when executed by a processor, are adapted to carry out the method of any one of claims 1 to 9.
Description
File transmission method, device, equipment and storage medium based on equipment chain Technical Field The embodiment of the application relates to the technical field of information transmission, in particular to a file transmission method, device, equipment and storage medium based on an equipment chain. Background The switch equipment chain is to connect terminal equipment under a plurality of switches through a specific connection mode to form a logical network topology structure. Switch equipment chains are widely used in the fields of enterprise networks, data centers, industrial parks (for connecting various industrial equipment), smart cities (traffic, security, energy sources, etc.), finance, medical treatment, etc. When the existing switch equipment chain carries out file simultaneous transmission, the frequency of batch interruption of file transmission by terminal equipment is higher, and the comprehensive efficiency of file transmission is lower. Disclosure of Invention The embodiment of the application provides a file transmission method, device, equipment and storage medium based on equipment chains, which can solve the technical problem of lower comprehensive efficiency of file transmission based on equipment chains in the related art and promote the comprehensive efficiency of file transmission based on equipment chains. In a first aspect, an embodiment of the present application provides a method for transmitting a file based on a device chain, where the method is used for a first transmitting end, and any terminal device in the device chain is at most a transmitting end of a terminal device and/or at most a receiving end of a terminal device, and a terminal device at a head of the device chain is used as the first transmitting end, where the method for transmitting a file based on the device chain includes: Carrying out file simultaneous transmission processing according to a pre-established initial equipment chain so as to send a data block corresponding to a file to be simultaneously transmitted to a receiving end, wherein other terminal equipment of the initial equipment chain are all used as receiving ends of a first sending end; In the file simultaneous transmission processing process, detecting state information of all receiving ends at fixed time, wherein the state information comprises an online state, an offline state and a completion state; removing the first type of receiving end from the initial equipment chain according to the state information to obtain a current equipment chain, wherein the first type of receiving end is a receiving end with current state information in an offline state or a finished state; Inserting a second type of receiving end into the current equipment chain based on pre-stored equipment chain information according to the state information to update the current equipment chain, wherein the second type of receiving end is a receiving end of which the state information is changed from an off-line state to an on-line state, and the pre-stored equipment chain information is an upstream-downstream relationship corresponding to the initial equipment chain; and sending the residual data blocks corresponding to the file to be transmitted simultaneously according to the current equipment chain. Above-mentioned, realize carrying out the dynamic adjustment of current equipment chain based on the current state information of all receiving terminals, make can wait to pass the transmission of the corresponding surplus data block of file with the transmission based on current equipment chain after adjusting, with this avoid partial receiving terminal off-line after can't transmit data to downstream receiving terminal (namely interrupt file transmission in batches) and influence whole transmission efficiency, can in time shift out equipment chain with it when the receiving terminal is offline, with the adjustment equipment chain, make the downstream receiving terminal that is located this (off-line state) receiving terminal can be based on the equipment chain after adjusting and receive data (block), avoid waiting for after the receiving terminal of off-line state resumes the online state and just can receive data (block), thereby improve the data receiving efficiency of downstream receiving terminal, and then promote the whole work efficiency of file concurrent transmission based on equipment chain. In addition, when the receiving end is changed from the offline state to the online state, the receiving end corresponding to the online state is inserted into the current equipment chain based on the pre-stored equipment chain information, and the insertion of the receiving end which is recovered to the online state is realized, and meanwhile, the upstream and downstream relations corresponding to the initial equipment chain are kept consistent integrally, so that the situation of multiple switch crossing caused by random insertion is avoided, and the overall working ef