A file transmission method, device, equipment, medium and product

By performing sharded concurrent transmission of large files, the file transfer failure caused by HTTP connection timeout is solved, and more efficient file transfer is achieved.

CN119766804APending Publication Date: 2025-04-04LINGSHU TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411935467.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

During file transfer, the timeout mechanism of HTTP connection causes large file transfer to fail, especially when the client does not receive a server response, the connection will be disconnected.

Method used

By sharding the target file and setting the timeout time according to the file size of the shard file, the client transmits the shard file to the server in parallel and obtains the reception status and file status feedback from the server.

Benefits of technology

This method makes full use of network resources through sharded files, improves file transfer efficiency and avoids transmission failure caused by timeout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766804A_ABST
    Figure CN119766804A_ABST
Patent Text Reader

Abstract

The present invention discloses a file transmission method, device, equipment, medium and product, and relates to the field of data processing technology. The method comprises: slicing a target file to obtain at least one slicing file; setting a timeout for the slicing file according to the file size of the slicing file; transmitting at least one slicing file to a server in parallel, and obtaining the receiving status and file status of the slicing file fed back by the server. Through the above technical solution, the efficiency of file transmission can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a file transmission method, device, equipment, medium and product. Background Art

[0002] In the file transfer scenario, the client generally uses the Hypertext Transfer Protocol (HTTP) to transfer files. This solution is not a problem for the transfer of small files. If the file is too large, due to the timeout mechanism of the HTTP connection, when the file is being transferred, the client has not received a response from the server. When the preset or user-set timeout is reached, the client will disconnect and return an error, resulting in a failure of the file transfer. Summary of the invention

[0003] The present invention provides a file transmission method, device, equipment, medium and product to improve the file transmission efficiency.

[0004] According to one aspect of the present invention, there is provided a file transmission method, which is applied to a client, and the method comprises:

[0005] Slice the target file to obtain at least one slice file;

[0006] According to the file size of the fragment file, a timeout period is set for the fragment file;

[0007] At least one segment file is transmitted to the server in parallel, and the receiving status and file status of the segment file fed back by the server are obtained.

[0008] According to another aspect of the present invention, a file transmission method is provided, which is applied to a server, and the method comprises:

[0009] Obtain at least one fragment file of the target file sent by the client, and check whether the receiving status of the fragment file is received;

[0010] If it has been received, continue to receive other segment files and feedback the receiving status to the client;

[0011] If not received, receive the segment file and record the file status of the segment file; determine whether the segment file is the last segment file of the target file. If so, merge all segment files of the target file, record the file status of each segment file, and feedback the file status to the client.

[0012] According to another aspect of the present invention, there is provided a file transmission device, which is configured on a client and includes:

[0013] A file slicing module, used to slice the target file to obtain at least one slicing file;

[0014] A timeout setting module, used to set a timeout for the segmented file according to the file size of the segmented file;

[0015] The file transmission module is used to transmit at least one segment file to the server in parallel, and obtain the receiving status and file status of the segment file fed back by the server.

[0016] According to another aspect of the present invention, there is provided a file transmission device, which is configured at a server, and includes:

[0017] A fragment file acquisition module, used to acquire at least one fragment file of a target file sent by a client, and check whether the receiving status of the fragment file is received;

[0018] A file receiving module, used for continuing to receive other segmented files if the files have been received, and feeding back the receiving status to the client;

[0019] The file receiving module is also used to receive the segmented file if it has not been received, and record the file status of the segmented file; determine whether the segmented file is the last segmented file of the target file, and if so, merge all the segmented files of the target file, record the file status of each segmented file, and feedback the file status to the client.

[0020] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0021] at least one processor; and

[0022] a memory communicatively connected to the at least one processor; wherein,

[0023] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the file transmission method described in any embodiment of the present invention.

[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the file transmission method described in any embodiment of the present invention when executed.

[0025] According to another aspect of the present invention, a computer program product is provided. The computer program product comprises a computer program. When the computer program is executed by a processor, the file transmission method according to any embodiment of the present invention is implemented.

[0026] The technical solution of the embodiment of the present invention is to obtain at least one fragment file by fragmenting the target file, and then set a timeout for the fragment file according to the file size of the fragment file, and then transmit at least one fragment file to the server in parallel, and obtain the receiving status and file status of the fragment file fed back by the server. The above technical solution can make full use of network resources and improve file transmission efficiency by fragmenting the target file and then transmitting the fragment files concurrently.

[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 is a flowchart of a file transmission method provided according to an embodiment of the present invention;

[0030] Figure 2 is a flowchart of a file transmission method provided according to an embodiment of the present invention;

[0031] Figure 3 is a structural schematic diagram of a file transmission device provided according to an embodiment of the present invention;

[0032] Figure 4 is a structural schematic diagram of a file transmission device provided according to an embodiment of the present invention;

[0033] Figure 5 It is a structural schematic diagram of an electronic device for implementing the file transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] In addition, it should be noted that the collection, storage, use, processing, transmission, provision and disclosure of target file-related data involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0037] Figure 1 1 is a flowchart of a file transmission method provided according to an embodiment of the present invention. This embodiment is applicable to the case of how to transmit large files. The method can be executed by a file transmission device, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a file transmission function, such as a client. Figure 1 As shown, the file transmission method of this embodiment may include:

[0038] S110: Slice the target file to obtain at least one slice file.

[0039] In this embodiment, the target file refers to a file that needs to be transmitted to the server; optionally, the target file is a large file, that is, the file size of the target file is relatively large. The so-called fragmented file refers to a file obtained by fragmenting the target file, and the file size of the fragmented file is relatively small.

[0040] Specifically, the target file can be segmented based on the segmented file method to obtain at least one segmented file. For example, the target file can be equally divided according to the file size of the target file to obtain at least one segmented file; for another example, the target file can be segmented according to the number of documents in the target file to obtain at least one segmented file.

[0041] S120: Setting a timeout period for the fragmented file according to the file size of the fragmented file.

[0042] In this embodiment, the timeout period is used to determine whether the segment file is successfully transmitted.

[0043] Specifically, a timeout period may be set for the slice files according to the file size of the slice files. For example, if each slice file is 10 MB, the timeout period may be 5 seconds.

[0044] S130. Transmit at least one segment file to the server in parallel, and obtain a receiving status and a file status of the segment file fed back by the server.

[0045] In this embodiment, the receiving status refers to whether the segmented file is received by the server, including receiving and not receiving. The so-called file status refers to the transmission status of the segmented file, including not transmitted, transmitting, merging, successful transmission and failed transmission. It should be noted that the file status is transmitted in the form of a string; the status of each segment is recorded as the status of the segment index position in the string, so that the size of the message transmitted over the network can be reduced as much as possible in scenarios with more segments. The return message is as follows (taking the number of segments = 10 as an example): {"chunk_status":"0000000000",

[0046] "total_status":1}

[0047] An optional method is to transmit at least one segment file to the server in parallel; accordingly, the server feeds back the receiving status and file status of the segment file to the client.

[0048] Another optional method is to transmit at least one segmented file to the server in parallel and obtain the receiving status and file status of the segmented file fed back by the server, including: if the file status of the segmented file received from the server within the timeout period is transmission failure, retransmit the segmented file; if the timeout period expires and the receiving status is still not received from the server, initiate a file status query request to the server; if the file status received from the server is merging, do not retransmit the segmented file.

[0049] Specifically, for each segment file, if the client receives a transmission failure message from the server within the timeout period, the client will retransmit the segment file. If the client still does not receive the status of the segment file after the timeout period, the client will send a file status query request to the server. In response, the server will send the client feedback on the status of the segment file. If the client receives the segment file as being merged, the client will not retransmit the segment file.

[0050] It is understandable that by retransmitting the file in response to not receiving a successful transmission response of the segmented file, it is possible to ensure that the large file is transmitted to the server in its entirety. If there are many segmented files, it takes a long time for the server to merge the segmented files. If the client does not receive a receiving response from the server for the segmented files in time, it may misjudge the transmission failure and retransmit the segmented files. In this embodiment, by improving the interface for the client to query the file status of the segmented files, it is possible to avoid the segmented files being retransmitted by the client while being merged.

[0051] The technical solution of the embodiment of the present invention is to obtain at least one fragment file by fragmenting the target file, and then set a timeout for the fragment file according to the file size of the fragment file, and then transmit at least one fragment file to the server in parallel, and obtain the receiving status and file status of the fragment file fed back by the server. The above technical solution can make full use of network resources and improve file transmission efficiency by fragmenting the target file and then transmitting the fragment files concurrently.

[0052] Figure 2 1 is a flowchart of a file transmission method provided according to an embodiment of the present invention. This embodiment is applicable to the case of how to transmit large files. The method can be executed by a file transmission device, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries the file transmission function, such as a server. Figure 2 As shown, the file transmission method of this embodiment may include:

[0053] S210, obtaining at least one segment file of the target file sent by the client, and checking whether the receiving status of the segment file is received; if received, executing S220; if not received, executing S230.

[0054] The receiving status includes received and not received.

[0055] S220: Continue to receive other segment files and feedback the receiving status to the client.

[0056] S230: Receive segmented files and record the file status of the segmented files.

[0057] Specifically, if the receiving status is not received, the segmented file is received, and the file status of the segmented file is recorded, and S240 is continued to be executed.

[0058] S240, determining whether the segment file is the last segment file of the target file; if so, executing S250; if not, executing S260.

[0059] S250: Merge all the fragment files of the target file, record the file status of each fragment file, and feed back the file status to the client.

[0060] S260: Continue to receive other segment files.

[0061] The technical solution provided by the embodiment of the present invention obtains at least one fragment file of the target file sent by the client, and checks whether the receiving status of the fragment file is received; if it is received, it continues to receive other fragment files and feeds back the receiving status to the client; if it is not received, it receives the fragment file and records the file status of the fragment file; determines whether the fragment file is the last fragment file of the target file, and if so, merges all the fragment files of the target file, records the file status of each fragment file, and feeds back the file status to the client. The above technical solution facilitates the client to query the file status by receiving the fragment files and recording the file status, thereby improving the file transmission efficiency.

[0062] On the basis of the above embodiment, as an optional manner of the present invention, the file status of the target file may also be fed back to the client in response to the file status query request of the client.

[0063] The file status query request refers to a request for a client to query a server for the file status of a file, including the to-be-queried segment files of the target file.

[0064] Specifically, the client initiates a file status query request to the server. Accordingly, the server responds to the file status query request of the client, queries the file status of the to-be-queried segment file in the target file, and feeds back the file status of the to-be-queried segment file to the client.

[0065] It is understandable that the server provides an interface for the client to query the file status of the slice, that is, the transfer status, and the file status of the entire target file, that is, the transfer status, so as to understand the status of the slice file and facilitate file transmission.

[0066] Figure 3 1 is a schematic diagram of the structure of a file transmission device provided according to an embodiment of the present invention. This embodiment is applicable to the case of how to transmit large files. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a file transmission function, such as a client. Figure 3 As shown, the file transmission device of this embodiment may include:

[0067] The file segmentation module 310 is used to segment the target file to obtain at least one segment file;

[0068] A timeout setting module 320, used to set a timeout for a segment file according to the file size of the segment file;

[0069] The file transmission module 330 is used to transmit at least one segment file to the server in parallel, and obtain the receiving status and file status of the segment file fed back by the server.

[0070] The technical solution of the embodiment of the present invention is to obtain at least one fragment file by fragmenting the target file, and then set a timeout for the fragment file according to the file size of the fragment file, and then transmit at least one fragment file to the server in parallel, and obtain the receiving status and file status of the fragment file fed back by the server. The above technical solution can make full use of network resources and improve file transmission efficiency by fragmenting the target file and then transmitting the fragment files concurrently.

[0071] Optionally, the file transmission module 330 is specifically used for:

[0072] If the file status of the segmented file received from the server is transmission failure within the timeout period, the segmented file is retransmitted;

[0073] If the timeout period has expired and the server has not yet provided any feedback on the receiving status, a file status query request is sent to the server.

[0074] If the file status received from the server is being merged, the segmented file will not be retransmitted.

[0075] Optionally, the file status is transmitted as a string.

[0076] The file transmission device provided in the embodiment of the present invention can execute the file transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0077] Figure 4 1 is a schematic diagram of a file transmission device according to an embodiment of the present invention. This embodiment is applicable to the case of how to transmit large files. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a file transmission function, such as a server. Figure 4 As shown, the file transmission device of this embodiment may include:

[0078] The fragment file acquisition module 410 is used to acquire at least one fragment file of the target file sent by the client, and check whether the receiving status of the fragment file is received;

[0079] The file receiving module 420 is used to continue receiving other segment files if the file has been received, and to feedback the receiving status to the client;

[0080] The file receiving module 420 is also used to receive the fragment file if it has not been received, and record the file status of the fragment file; determine whether the fragment file is the last fragment file of the target file. If so, merge all the fragment files of the target file, record the file status of each fragment file, and feedback the file status to the client.

[0081] The technical solution provided by the embodiment of the present invention obtains at least one fragment file of the target file sent by the client, and checks whether the receiving status of the fragment file is received; if it is received, it continues to receive other fragment files and feeds back the receiving status to the client; if it is not received, it receives the fragment file and records the file status of the fragment file; determines whether the fragment file is the last fragment file of the target file, and if so, merges all the fragment files of the target file, records the file status of each fragment file, and feeds back the file status to the client. The above technical solution facilitates the client to query the file status by receiving the fragment files and recording the file status, thereby improving the file transmission efficiency.

[0082] Optionally, the device further includes a file status feedback module, which is used to:

[0083] In response to a file status query request from a client, the file status of the target file is fed back to the client.

[0084] The file transmission device provided in the embodiment of the present invention can execute the file transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0085] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0086] Figure 5 is a schematic diagram of the structure of an electronic device that implements the file transmission method of an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0087] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0088] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0089] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a file transfer method.

[0090] In some embodiments, the file transfer method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the file transfer method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the file transfer method in any other appropriate manner (e.g., by means of firmware).

[0091] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0092] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0093] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0094] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0095] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0096] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0097] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0098] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A file transmission method, applied to a client, characterized in that: include: Slice the target file to obtain at least one slice file; According to the file size of the fragment file, a timeout period is set for the fragment file; At least one segment file is transmitted to the server in parallel, and the receiving status and file status of the segment file fed back by the server are obtained.

2. The method according to claim 1, characterized in that Transmitting at least one segment file to the server in parallel, and obtaining the receiving status and file status of the segment file fed back by the server, including: If within the timeout period, the file status of the segmented file received from the server is transmission failure, the segmented file is retransmitted; If the receiving status fed back by the server is not received after the timeout period, a file status query request is initiated to the server; If the file status received from the server as being merged is received, the segmented file is not retransmitted.

3. The method according to any one of claims 1 to 2, characterized in that: The file status is transmitted in the form of a string.

4. A file transmission method, applied to a server, characterized in that: include: Obtain at least one fragment file of the target file sent by the client, and check whether the receiving status of the fragment file is received; If it has been received, continue to receive other segment files and feedback the receiving status to the client; If not received, receiving the segmented file and recording the file status of the segmented file; Determine whether the segment file is the last segment file of the target file. If so, merge all segment files of the target file, record the file status of each segment file, and feed back the file status to the client.

5. The method according to claim 4, characterized in that The method further comprises: In response to the file status query request of the client, the file status of the target file is fed back to the client.

6. A file transmission device, configured on a client, characterized in that: include: A file slicing module, used to slice the target file to obtain at least one slicing file; A timeout setting module, used to set a timeout for the segmented file according to the file size of the segmented file; The file transmission module is used to transmit at least one segment file to the server in parallel, and obtain the receiving status and file status of the segment file fed back by the server.

7. A file transmission device, configured at a server, characterized in that: include: A fragment file acquisition module, used to acquire at least one fragment file of a target file sent by a client, and check whether the receiving status of the fragment file is received; A file receiving module, used for continuing to receive other segmented files if the files have been received, and feeding back the receiving status to the client; The file receiving module is further used to receive the segmented file if it has not been received, and record the file status of the segmented file; Determine whether the segment file is the last segment file of the target file. If so, merge all segment files of the target file, record the file status of each segment file, and feed back the file status to the client.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the file transmission method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the file transmission method according to any one of claims 1 to 5 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the file transmission method according to any one of claims 1 to 5.

Citation Information

Cited By

  • File downloading method and system

    CN120639765A

  • Method and system for downloading files

    CN120639765B