CN115208877A - File transmission method, device, equipment, medium and product - Google Patents

File transmission method, device, equipment, medium and product Download PDF

Info

Publication number
CN115208877A
CN115208877A CN202210859183.7A CN202210859183A CN115208877A CN 115208877 A CN115208877 A CN 115208877A CN 202210859183 A CN202210859183 A CN 202210859183A CN 115208877 A CN115208877 A CN 115208877A
Authority
CN
China
Prior art keywords
file
file transmission
transmission
thread
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210859183.7A
Other languages
Chinese (zh)
Other versions
CN115208877B (en
Inventor
彭高波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202210859183.7A priority Critical patent/CN115208877B/en
Publication of CN115208877A publication Critical patent/CN115208877A/en
Application granted granted Critical
Publication of CN115208877B publication Critical patent/CN115208877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application discloses a file transmission method, a file transmission device, file transmission equipment, a file transmission medium and a file transmission product, and relates to the technical field of Internet. The file transmission method comprises the following steps: the method comprises the steps of configuring file transmission configuration information, wherein the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode; under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created; and transmitting a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission thread, to a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the first file transmission thread, in a file transmission mode included in the configuration information corresponding to the first file transmission thread by using a first file transmission thread of the plurality of file transmission threads. According to the scheme disclosed by the application, the file transmission efficiency can be improved.

Description

File transmission method, device, equipment, medium and product
Technical Field
The application belongs to the technical field of internet, and particularly relates to a file transmission method, device, equipment, medium and product.
Background
File transfer refers to the transfer of a file from one electronic device to another electronic device.
In the related art, when bulk file transmission is performed, transmission is generally performed in a single-thread manner.
However, the single-thread mode is adopted for file transmission, on one hand, file accumulation can be caused, and the file transmission efficiency is low; on the other hand, when the transmission file includes a file to be transmitted to a plurality of users and the plurality of users require to use different file transmission methods, the file transmission methods need to be switched frequently during the file transmission process, which also affects the file transmission efficiency.
Disclosure of Invention
The embodiment of the application provides a file transmission method, a file transmission device, equipment, a medium and a product, and can solve the problem of low file transmission efficiency.
In a first aspect, an embodiment of the present application provides a file transfer method, including:
the method comprises the steps of configuring file transmission configuration information, wherein the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode;
under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created;
and transmitting a first file to a first user by using a first file transmission thread in a first file transmission mode, wherein the first file transmission thread is any one of the file transmission threads, the first file transmission mode is a file transmission mode included in the configuration information corresponding to the first file transmission thread, the first user is a user corresponding to the user information of the file to be received included in the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to the path information of the file to be transmitted included in the configuration information corresponding to the first file transmission thread.
In a second aspect, an embodiment of the present application provides a file transfer device, including:
the file transmission system comprises a configuration module, a file transmission module and a file transmission module, wherein the configuration module is used for configuring file transmission configuration information, the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode;
the first creating module is used for creating a plurality of file transmission threads corresponding to the plurality of pieces of configuration information under the condition that a first file transmission condition is met;
the transmission module is used for transmitting a first file to a first user in a first file transmission mode by using a first file transmission thread, wherein the first file transmission thread is any one of a plurality of file transmission threads, the first file transmission mode is a file transmission mode included by configuration information corresponding to the first file transmission thread, the first user is a user corresponding to user information of the file to be received, which is included by the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to path information of the file to be transmitted, which is included by the configuration information corresponding to the first file transmission thread.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the file transfer method of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and the computer program instructions, when executed by a processor, implement the file transmission method of the first aspect.
In a fifth aspect, the present application provides a computer program product, and when executed by a processor of an electronic device, the instructions in the computer program product cause the electronic device to execute the file transfer method according to the first aspect.
In the embodiment of the application, the configuration information is transmitted through the configuration file, wherein the configuration information for file transmission comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of the file to be received, path information of the file to be transmitted and a file transmission mode; under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created; and transmitting a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission thread, to a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the first file transmission thread, in a file transmission mode included in the configuration information corresponding to the first file transmission thread by using a first file transmission thread in the plurality of file transmission threads. In this way, file transmission is performed through multiple threads, and each file transmission thread transmits the file corresponding to the path information of the file to be transmitted, which is included in the corresponding configuration information, to the user corresponding to the user information of the file to be received, which is included in the corresponding configuration information.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a file transfer method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a file transfer process provided by an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a document transportation device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" comprises 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The following describes in detail a file transfer method, an apparatus, a device, a medium, and a product according to the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a file transfer method according to an embodiment of the present application. As shown in fig. 1, the file transfer method may include:
s101: the method comprises the steps of configuring file transmission configuration information, wherein the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode;
s102: under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created;
s103: and transmitting a first file to a first user in a first file transmission mode by using a first file transmission thread, wherein the first file transmission thread is any one of a plurality of file transmission threads, the first file transmission mode is a file transmission mode included in configuration information corresponding to the first file transmission thread, the first user is a user corresponding to user information of the file to be received included in the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to path information of the file to be transmitted included in the configuration information corresponding to the first file transmission thread.
Specific implementations of the above steps will be described in detail below.
In the embodiment of the application, the configuration information is transmitted through the configuration file, wherein the configuration information for file transmission comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of the file to be received, path information of the file to be transmitted and a file transmission mode; under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created; and transmitting a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission thread, to a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the first file transmission thread, in a file transmission mode included in the configuration information corresponding to the first file transmission thread by using a first file transmission thread of the plurality of file transmission threads. In this way, file transmission is performed through multiple threads, and each file transmission thread transmits the file corresponding to the path information of the file to be transmitted, which is included in the corresponding configuration information, to the user corresponding to the user information of the file to be received, which is included in the corresponding configuration information.
In some possible implementations of the embodiments of the present application, the file transmission manner in the embodiments of the present application includes but is not limited to: a File Transfer Protocol (FTP) transmission method (hereinafter abbreviated as an FTP transmission method), a Secure File Transfer Protocol (SFTP) transmission method (hereinafter abbreviated as an SFTP transmission method), a Network File Transfer Protocol (NFT) transmission method (hereinafter abbreviated as an NFT transmission method), a TFTP transmission method (hereinafter abbreviated as a TFTP transmission method) and the like.
In some possible implementations of embodiments of the present application, the file transfer configuration information may be written in plain text. Each segment describes a piece of configuration information, and various pieces of information included in each piece of configuration information may be separated by a separator, for example, by "|". The information format corresponding to one piece of configuration information is "user information of a file to be received | path information of a file to be transmitted | file transmission mode".
In some possible implementations of embodiments of the present application, the file transfer configuration information may be tabulated. Each row records a piece of configuration information.
Illustratively, the file transfer configuration information of the configuration is shown in table 1.
TABLE 1
User information of file to be received Path information of file to be transmitted File transmission mode
User A /home/user A/input FTP transmission mode
User B Home/user B SFTP transmission mode
User C /home/abc NFT transmission mode
It is understood that the first row in table 1 is a header row, the second row in table 1 is a 1 st configuration information, the third row in table 1 is a 2 nd configuration information, and the fourth row in table 1 is a 3 rd configuration information.
In some possible implementations of the embodiments of the present application, the first condition in the embodiments of the present application includes but is not limited to: receiving a file transmission instruction, reaching a preset file transmission time point, and the like.
Illustratively, after receiving a file transfer instruction, 3 file transfer threads are created, and the 3 file transfer threads are a file transfer thread X, a file transfer thread Y, and a file transfer thread Z, respectively. The file transfer thread X corresponds to the 1 st configuration information in table 1, the file transfer thread Y corresponds to the 2 nd configuration information in table 1, and the file transfer thread Z corresponds to the 3 rd configuration information in table 1. Then, a file transmission thread X is utilized to transmit files in the "/home/user A/input" to a user A in an FTP transmission mode; transmitting the files in the "/home/user B" to the user B in an SFTP transmission mode by using a file transmission thread Y; and transmitting the file in the/home/abc to the user C in an NFT transmission mode by using a file transmission thread Z.
As another example, a file timing transmission task may be configured, and a time point of the file timing transmission may be configured, for example, 0. When reaching 0. The file transfer thread X corresponds to the 1 st configuration information in table 1, the file transfer thread Y corresponds to the 2 nd configuration information in table 1, and the file transfer thread Z corresponds to the 3 rd configuration information in table 1. Then, a file transmission thread X is utilized to transmit files in the "/home/user A/input" to the user A in an FTP transmission mode; transmitting the files in the "/home/user B" to the user B in an SFTP transmission mode by using a file transmission thread Y; and transmitting the files in the/home/abc to the user C in an NFT transmission mode by using a file transmission thread Z.
In some possible implementations of the embodiment of the present application, the file transmission method provided in the embodiment of the present application may further include: creating a plurality of file transmission monitoring threads corresponding to the plurality of pieces of configuration information; and monitoring the transmission progress of a second file by utilizing a first file transmission monitoring thread, wherein the first file transmission monitoring thread is any one of a plurality of file transmission monitoring threads, and the second file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission monitoring thread.
Illustratively, for the file transfer configuration information shown in table 1 above, 3 file transfer threads and 3 file transfer monitoring threads are created, where the 3 file transfer threads are respectively a file transfer thread X, a file transfer thread Y, and a file transfer thread Z, and the 3 file transfer monitoring threads are respectively a file transfer monitoring thread X, a file transfer monitoring thread Y, and a file transfer monitoring thread Z. The file transfer thread X and the file transfer monitoring thread X correspond to the 1 st configuration information in the table 1, the file transfer thread Y and the file transfer monitoring thread Y correspond to the 2 nd configuration information in the table 1, and the file transfer thread Z and the file transfer monitoring thread Z correspond to the 3 rd configuration information in the table 1.
Transmitting files in the "/home/user A/input" to a user A in an FTP transmission mode by using a file transmission thread X; transmitting the files in the "/home/user B" to the user B in an SFTP transmission mode by using a file transmission thread Y; and transmitting the files in the/home/abc to the user C in an NFT transmission mode by using a file transmission thread Z.
In the process of transmitting the files in the "/home/user A/input" to the user A in an FTP transmission mode by using the file transmission thread X, monitoring the progress of transmitting the files in the "/home/user A/input" by using the file transmission monitoring thread X, and outputting and displaying the files in real time.
In the process of transmitting the files in the "/home/user B" to the user B in an SFTP transmission mode by using the file transmission thread Y, monitoring the progress of transmitting the files in the "/home/user B" by using the file transmission monitoring thread Y, and outputting and displaying the files in real time.
In the process of transmitting the file in the "/home/abc" to the user C in the NFT transmission mode by using the file transmission thread Z, monitoring the progress of transmitting the file in the "/home/abc" by using the file transmission monitoring thread Z, and outputting and displaying the file in real time.
In the embodiment of the application, the file transmission progress can be monitored, so that a user can know the file transmission progress, and the user experience effect is improved.
In some possible implementations of the embodiment of the present application, the file transmission method provided in the embodiment of the present application may further include: and under the condition that the second file transmission thread is utilized to transmit the third file, the transmission of the third file is finished, wherein the second file transmission thread is any one of the file transmission threads, and the third file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the second file transmission thread.
Illustratively, when monitoring the progress of transferring the file in the "/home/user B" by using the file transfer monitoring thread Y, it is found that the progress does not change for a long time, which means that a jam occurs when the file in the "/home/user B" is transferred to the user B by using the file transfer thread Y in an SFTP transfer manner, and then the file in the "/home/user B" is transferred.
In the embodiment of the application, the transmission of the blocked file is finished, so that the transmission of the subsequent file is not blocked, and the file transmission efficiency is improved.
In some possible implementations of the embodiment of the present application, the file transmission method provided in the embodiment of the present application may further include: and sending prompt information to a second user under the condition that the fourth file is unsuccessfully transmitted by using the third file transmission thread, wherein the prompt information is used for prompting the file transmission error, the third file transmission thread is any one of a plurality of file transmission threads, the fourth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the third file transmission thread, and the second user is a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the third file transmission thread.
The reasons for file transmission failure may be network interruption, insufficient system memory, and the like. When the file transfer is stuck and the file transfer is forcibly ended, the file transfer is also a failure condition.
Illustratively, when a file in "/home/user B" fails to be transferred by the file transfer thread Y, a prompt message for prompting a file transfer error is sent to the user B.
The method for sending the prompt message is not limited in the embodiment of the present application, and any available method may be applied to the embodiment of the present application, for example, a mail, a short message, and the like.
In some possible implementations of the embodiment of the present application, the file transmission method provided in the embodiment of the present application may further include: and under the condition that the second file transmission condition is met, retransmitting the fourth file by using the third file transmission thread.
The second file transfer conditions in the embodiment of the present application include, but are not limited to: receiving a file retransmission instruction, reaching a preset file retransmission time point and the like.
In the embodiment of the application, the user can be ensured to receive the accurate file by retransmitting the file.
In some possible implementations of the embodiment of the application, the number of file retransmission times can be preset, and when the number of times of file retransmission reaches the preset number of file retransmission times, warning information can be pushed to a user to prompt the user that file retransmission fails for multiple times, and at this time, the user can analyze the reason causing the file transmission error so as to correctly transmit the file.
In some possible implementations of the embodiment of the present application, the file transmission method provided in the embodiment of the present application may further include: and deleting the fifth file under the condition that the fifth file is successfully transmitted by using the fourth file transmission thread, wherein the fourth file transmission thread is any one of the file transmission threads, and the fifth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the fourth file transmission thread.
Illustratively, the file in the "/home/user a/input" is successfully transmitted to the user a in an FTP transmission manner by using the file transmission thread X, and since the user a has successfully received the file in the "/home/user a/input", at this time, the file in the "/home/user a/input" may be deleted, so as to save the occupation of the storage space.
In some possible implementations of the embodiment of the present application, after a certain file transmission thread successfully transmits a file, the file transmission thread may be destroyed, so as to save system resource occupation.
Illustratively, if the file in the "/home/user a/input" is successfully transmitted to the user a in an FTP transmission manner by using the file transmission thread X, the file in the "/home/user a/input" is deleted, and the file transmission thread X is destroyed.
In some possible implementations of the embodiments of the present application, after a file is successfully transmitted by a certain file transmission thread, the file may be moved to a preset folder (for example, a successful directory) first, and when a certain condition is satisfied, all the files in the successful directory are deleted at one time. For example, a task for deleting the files in the successful directory at a fixed time is configured in advance, and when the time reaches a time point corresponding to the task, the task is triggered to delete the files in the successful directory.
In some possible implementations of the embodiments of the present application, after a file transmission thread fails to transmit a file, the file may be moved to a preset folder (for example, a failure directory) first, and when a certain condition is satisfied, the file in the failure directory is restored to an original directory, and then the file is retransmitted. For example, a timing file retransmission task is configured in advance, when the time reaches a time point corresponding to the timing file retransmission task, the timing file retransmission task is triggered, the files in the failed directory are restored to the original directory, and then the files are retransmitted.
In some possible implementations of the embodiment of the present application, when a file transmission thread fails to transmit a file, the file transmission thread may be destroyed, and when the file is retransmitted, the thread may be created again, and the newly created thread is used to transmit the file. Of course, the file transmission thread may not be destroyed, and when the file is retransmitted, the file transmission thread may be used to retransmit the file.
The process of file transfer is shown in fig. 2. Fig. 2 is a schematic process diagram of file transmission according to an embodiment of the present application.
Firstly, configuring file transmission configuration information, a timing file transmission task, a timing success directory cleaning task and a timing file retransmission task which comprise a plurality of pieces of configuration information, wherein each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode.
And when the time point corresponding to the timing file transmission task is reached, creating a file transmission thread and a file transmission monitoring thread respectively corresponding to each piece of configuration information.
For any piece of configuration information in the plurality of pieces of configuration information, transmitting a file corresponding to path information of the file to be transmitted, which is included in the piece of configuration information, to a user corresponding to user information of the file to be received, which is included in the piece of configuration information, in a file transmission mode included in the piece of configuration information by using a file transmission thread corresponding to the piece of configuration information; and monitoring the file transmission progress by using the file transmission monitoring thread corresponding to the configuration information.
And when the file transmission progress is abnormal, finishing transmitting the file corresponding to the path information of the file to be transmitted, which is included in the configuration information, moving the file corresponding to the path information of the file to be transmitted, which is included in the configuration information, into the failure directory, and when the time point corresponding to the timed file retransmission task is reached, restoring the file in the failure directory into the original directory and retransmitting the file.
And when the file transmission fails, moving the file corresponding to the path information of the file to be transmitted, which is included in the configuration information, to a failure directory, and when the time point corresponding to the timed file retransmission task is reached, restoring the file in the failure directory to the original directory for retransmission.
And when the file is successfully transmitted, moving the file corresponding to the path information of the file to be transmitted, which is included in the configuration information, to a successful directory, and when the time point corresponding to the timed successful directory cleaning task is reached, deleting the file in the successful directory.
It should be noted that, in all embodiments of the present application, the acquisition, storage, use and processing of data are in accordance with the relevant regulations of national laws and regulations.
The embodiment of the application also provides a file transmission device, as shown in fig. 3. Fig. 3 is a schematic structural diagram of a document transmission device according to an embodiment of the present application, where the document transmission device 300 may include:
the configuration module 301 is configured to configure file transmission configuration information, where the file transmission configuration information includes multiple pieces of configuration information, and each piece of configuration information includes user information of a file to be received, path information of the file to be transmitted, and a file transmission mode;
a first creating module 302, configured to create a plurality of file transfer threads corresponding to the plurality of pieces of configuration information if a first file transfer condition is satisfied;
the transmission module 303 is configured to transmit a first file to a first user in a first file transmission manner by using a first file transmission thread, where the first file transmission thread is any one of a plurality of file transmission threads, the first file transmission manner is a file transmission manner included in configuration information corresponding to the first file transmission thread, the first user is a user corresponding to user information of a file to be received included in the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to path information of the file to be transmitted included in the configuration information corresponding to the first file transmission thread.
In the embodiment of the application, the configuration information is transmitted through the configuration file, wherein the configuration information for file transmission comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of the file to be received, path information of the file to be transmitted and a file transmission mode; under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created; and transmitting a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission thread, to a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the first file transmission thread, in a file transmission mode included in the configuration information corresponding to the first file transmission thread by using a first file transmission thread of the plurality of file transmission threads. In this way, file transmission is performed through multiple threads, and each file transmission thread transmits the file corresponding to the path information of the file to be transmitted, which is included in the corresponding configuration information, to the user corresponding to the user information of the file to be received, which is included in the corresponding configuration information.
In some possible implementations of the embodiment of the present application, the file transmission apparatus 300 provided in the embodiment of the present application may further include:
the second establishing module is used for establishing a plurality of file transmission monitoring threads corresponding to the plurality of pieces of configuration information;
and the monitoring module is used for monitoring the transmission progress of a second file by utilizing a first file transmission monitoring thread, wherein the first file transmission monitoring thread is any one of the file transmission monitoring threads, and the second file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission monitoring thread.
In the embodiment of the application, the file transmission progress can be monitored, so that a user can know the file transmission progress, and the user experience effect is improved.
In some possible implementations of the embodiment of the present application, the file transmission apparatus 300 provided in the embodiment of the present application may further include:
and the ending module is used for ending the transmission of the third file under the condition that the second file transmission thread is utilized to transmit the third file, wherein the second file transmission thread is any one of the file transmission threads, and the third file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the second file transmission thread.
In the embodiment of the application, the transmission of the blocked file is finished, so that the transmission of the subsequent file is not blocked, and the file transmission efficiency is improved.
In some possible implementations of the embodiment of the present application, the file transmission apparatus 300 provided in the embodiment of the present application may further include:
and the sending module is used for sending prompt information to a second user under the condition that the fourth file is unsuccessfully transmitted by using the third file transmission thread, wherein the prompt information is used for prompting file transmission errors, the third file transmission thread is any one of a plurality of file transmission threads, the fourth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the third file transmission thread, and the second user is a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the third file transmission thread.
In some possible implementations of the embodiments of the present application, the transmission module 303 may be further configured to:
and under the condition that the second file transmission condition is met, retransmitting the fourth file by using the third file transmission thread.
In the embodiment of the application, the user can be ensured to receive the accurate file by retransmitting the file.
In some possible implementations of the embodiment of the present application, the file transmission apparatus 300 provided in the embodiment of the present application may further include:
and the deleting module is used for deleting the fifth file under the condition that the fifth file is successfully transmitted by using a fourth file transmission thread, wherein the fourth file transmission thread is any one of the file transmission threads, and the fifth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the fourth file transmission thread.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
The electronic device may include a processor 401 and a memory 402 storing computer program instructions.
Specifically, the processor 401 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the electronic device, where appropriate. In some particular embodiments, the memory 402 is non-volatile solid-state memory.
In some particular embodiments, the Memory may include Read-Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the file transfer methods according to the present application.
The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement the file transmission method provided by the embodiment of the present application.
In one example, the electronic device may also include a communication interface 403 and a bus 410. As shown in fig. 4, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
Bus 410 includes hardware, software, or both to couple the components of the electronic device to each other. By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus, FSB), a Hyper Transport (HT) Interconnect, an Industry Standard Architecture (ISA) Bus, an infiniband Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (Attachment) Bus, a Video electronics Local association (vlo) Bus, or a combination of two or more of these buses, as appropriate. Bus 410 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the present application, any suitable buses or interconnects are contemplated by the present application.
The electronic device can execute the file transmission method provided by the embodiment of the application, so that the corresponding technical effect of the file transmission method provided by the embodiment of the application is achieved.
In addition, in combination with the file transmission method in the foregoing embodiment, the embodiment of the present application further provides a computer-readable storage medium for implementing the file transmission method. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions realize the file transmission method provided by the embodiment of the application when being executed by a processor. Examples of computer readable storage media include non-transitory computer readable media such as ROM, RAM, magnetic or optical disks, and so forth.
An embodiment of the present application provides a computer program product, where instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device executes the file transmission method provided in the embodiment of the present application, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps, after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic Circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor Memory devices, ROM, flash Memory, erasable Read-Only Memory (EROM), floppy disks, compact disk Read-Only memories (CD-ROMs), optical disks, hard disks, optical fiber media, radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (15)

1. A method for file transfer, the method comprising:
configuring file transmission configuration information, wherein the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode;
under the condition that a first file transmission condition is met, a plurality of file transmission threads corresponding to the plurality of pieces of configuration information are created;
and transmitting a first file to a first user in a first file transmission mode by using a first file transmission thread, wherein the first file transmission thread is any one of the file transmission threads, the first file transmission mode is a file transmission mode included in configuration information corresponding to the first file transmission thread, the first user is a user corresponding to user information of the file to be received included in the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to path information of the file to be transmitted included in the configuration information corresponding to the first file transmission thread.
2. The method of claim 1, further comprising:
creating a plurality of file transmission monitoring threads corresponding to the plurality of pieces of configuration information;
and monitoring the transmission progress of a second file by utilizing a first file transmission monitoring thread, wherein the first file transmission monitoring thread is any one of the file transmission monitoring threads, and the second file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission monitoring thread.
3. The method of claim 1, further comprising:
and under the condition that a second file transmission thread is utilized to transmit a third file, the transmission of the third file is finished, wherein the second file transmission thread is any one of the file transmission threads, and the third file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the second file transmission thread.
4. The method of claim 1, further comprising:
and sending prompt information to a second user under the condition that the fourth file is unsuccessfully transmitted by using a third file transmission thread, wherein the prompt information is used for prompting file transmission errors, the third file transmission thread is any file transmission thread in the multiple file transmission threads, the fourth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the third file transmission thread, and the second user is a user corresponding to the user information of the file to be received, which is included in the configuration information corresponding to the third file transmission thread.
5. The method of claim 4, further comprising:
and under the condition that a second file transmission condition is met, retransmitting the fourth file by utilizing the third file transmission thread.
6. The method of claim 1, further comprising:
and deleting the fifth file under the condition that the fifth file is successfully transmitted by using a fourth file transmission thread, wherein the fourth file transmission thread is any one of the file transmission threads, and the fifth file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the fourth file transmission thread.
7. A file transfer apparatus, characterized in that the apparatus comprises:
the file transmission system comprises a configuration module, a transmission module and a transmission module, wherein the configuration module is used for configuring file transmission configuration information, the file transmission configuration information comprises a plurality of pieces of configuration information, and each piece of configuration information comprises user information of a file to be received, path information of the file to be transmitted and a file transmission mode;
the first creating module is used for creating a plurality of file transmission threads corresponding to the plurality of pieces of configuration information under the condition that a first file transmission condition is met;
the transmission module is configured to transmit a first file to a first user in a first file transmission manner by using a first file transmission thread, where the first file transmission thread is any one of the multiple file transmission threads, the first file transmission manner is a file transmission manner included in configuration information corresponding to the first file transmission thread, the first user is a user corresponding to user information of a file to be received included in the configuration information corresponding to the first file transmission thread, and the first file is a file corresponding to path information of the file to be transmitted included in the configuration information corresponding to the first file transmission thread.
8. The apparatus of claim 7, further comprising:
a second creating module, configured to create a plurality of file transmission monitoring threads corresponding to the plurality of pieces of configuration information;
and the monitoring module is used for monitoring the transmission progress of a second file by utilizing a first file transmission monitoring thread, wherein the first file transmission monitoring thread is any one of the file transmission monitoring threads, and the second file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the first file transmission monitoring thread.
9. The apparatus of claim 7, further comprising:
and the ending module is used for ending the transmission of the third file under the condition that the third file is transmitted by using a second file transmission thread in a stuck state, wherein the second file transmission thread is any one of the file transmission threads, and the third file is a file corresponding to the path information of the file to be transmitted, which is included in the configuration information corresponding to the second file transmission thread.
10. The apparatus of claim 7, further comprising:
the sending module is configured to send prompt information to a second user when a third file transmission thread fails to transmit a fourth file, where the prompt information is used to prompt a file transmission error, the third file transmission thread is any one of the multiple file transmission threads, the fourth file is a file corresponding to path information of a file to be transmitted, the path information of the file to be transmitted includes configuration information corresponding to the third file transmission thread, and the second user is a user corresponding to user information of the file to be received, the user information includes configuration information corresponding to the third file transmission thread.
11. The apparatus of claim 10, wherein the transmission module is further configured to:
and under the condition that a second file transmission condition is met, retransmitting the fourth file by utilizing the third file transmission thread.
12. The apparatus of claim 7, further comprising:
and the deleting module is configured to delete the fifth file when a fourth file transmission thread is used to successfully transmit the fifth file, where the fourth file transmission thread is any one of the multiple file transmission threads, and the fifth file is a file corresponding to the path information of the file to be transmitted, where the file path information includes configuration information corresponding to the fourth file transmission thread.
13. An electronic device, characterized in that the electronic device comprises: a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the file transfer method according to any one of claims 1 to 6.
14. A computer-readable storage medium, having computer program instructions stored thereon, which, when executed by a processor, implement the file transfer method of any one of claims 1-6.
15. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the file transfer method of any of claims 1-6.
CN202210859183.7A 2022-07-21 2022-07-21 File transmission method, device, equipment, medium and product Active CN115208877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210859183.7A CN115208877B (en) 2022-07-21 2022-07-21 File transmission method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210859183.7A CN115208877B (en) 2022-07-21 2022-07-21 File transmission method, device, equipment, medium and product

Publications (2)

Publication Number Publication Date
CN115208877A true CN115208877A (en) 2022-10-18
CN115208877B CN115208877B (en) 2024-02-27

Family

ID=83584347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210859183.7A Active CN115208877B (en) 2022-07-21 2022-07-21 File transmission method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN115208877B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216011A (en) * 2023-08-30 2023-12-12 建银工程咨询有限责任公司 File transmission method and device and electronic equipment
CN117216011B (en) * 2023-08-30 2024-05-03 建银工程咨询有限责任公司 File transmission method and device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998013738A1 (en) * 1996-09-24 1998-04-02 Honeywell Inc. System and method for providing multi-threaded bus access for data transmission and acquisition in a process control system
CN102811258A (en) * 2012-07-27 2012-12-05 北京星网锐捷网络技术有限公司 Data parallel-downloading method, apparatus and network device
US20170019459A1 (en) * 2014-06-30 2017-01-19 Tencent Technology (Shenzhen) Company Limited File transmission method, file transmission apparatus, and file transmission system
CN110138867A (en) * 2019-05-17 2019-08-16 哈工大机器人(山东)智能装备研究院 File transmission and method of reseptance, computer equipment and storage medium
US20200012449A1 (en) * 2015-10-01 2020-01-09 PacByte Solutions Pty Ltd Method and system for receiving a data file
CN112035407A (en) * 2020-09-01 2020-12-04 武汉虹旭信息技术有限责任公司 File transmission system and transmission method
CN113596148A (en) * 2021-07-27 2021-11-02 上海商汤科技开发有限公司 Data transmission method, system, device, computing equipment and storage medium
CN113993164A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File transmission method and file transmission device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998013738A1 (en) * 1996-09-24 1998-04-02 Honeywell Inc. System and method for providing multi-threaded bus access for data transmission and acquisition in a process control system
CN102811258A (en) * 2012-07-27 2012-12-05 北京星网锐捷网络技术有限公司 Data parallel-downloading method, apparatus and network device
US20170019459A1 (en) * 2014-06-30 2017-01-19 Tencent Technology (Shenzhen) Company Limited File transmission method, file transmission apparatus, and file transmission system
US20200012449A1 (en) * 2015-10-01 2020-01-09 PacByte Solutions Pty Ltd Method and system for receiving a data file
CN110138867A (en) * 2019-05-17 2019-08-16 哈工大机器人(山东)智能装备研究院 File transmission and method of reseptance, computer equipment and storage medium
CN112035407A (en) * 2020-09-01 2020-12-04 武汉虹旭信息技术有限责任公司 File transmission system and transmission method
CN113596148A (en) * 2021-07-27 2021-11-02 上海商汤科技开发有限公司 Data transmission method, system, device, computing equipment and storage medium
CN113993164A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File transmission method and file transmission device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216011A (en) * 2023-08-30 2023-12-12 建银工程咨询有限责任公司 File transmission method and device and electronic equipment
CN117216011B (en) * 2023-08-30 2024-05-03 建银工程咨询有限责任公司 File transmission method and device and electronic equipment

Also Published As

Publication number Publication date
CN115208877B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
CN102546784B (en) Method for conducting batch upgrading for device firmware based on controller area network (CAN) bus
EP3840265B1 (en) Method and apparatus for feeding back hybrid automatic repeat request of downlink data
CN110392381B (en) Multi-channel wireless communication method and device for nuclear power station and terminal equipment
CN105528325A (en) Protection method and system for high-speed transmission through standard SPI protocol
US20110041025A1 (en) Method of communication, in particular with capability of frame abortion or retransmission indication, between a transmitter and a receiver based on frames and corresponding communication node
CN111224837B (en) Method and system for automatically identifying CAN communication baud rate of vehicle ECU
WO2018040879A1 (en) Password keyboard usb communication anomaly recovery method and system
CN108833443A (en) A kind of method for message transmission and system, computer equipment
CN109039552B (en) Data recovery method and device
CN110972337B (en) Data transmission method, device and system, SDAP entity and storage medium
CN115208877A (en) File transmission method, device, equipment, medium and product
CN111818582B (en) Data transmission method and device and electronic equipment
JP5157638B2 (en) Packet communication system, packet transmission method and packet transmission program used in the packet communication system
CN108984136B (en) Printing data transmission method, device, equipment and storage medium
CN110913431A (en) Data wireless transmission method and device, computer equipment and storage medium
CN105634894A (en) Enhanced type CAN bus data resending method and device
CN108347312B (en) Control information sending and receiving method, network equipment and terminal equipment
CN112187408B (en) Data processing method, system, device, storage medium and processor
CN113411102B (en) Data transmission method, device and system and storage medium
CN102932754B (en) For the data sending, receiving method of radio communication
CN114499750A (en) Data packet processing method, communication device and communication system
CN114489718A (en) Firmware upgrading method, device, equipment and storage medium of tree connection system
KR102126671B1 (en) Restoring apparatus for communication error using history queue and method thereof
CN114579662A (en) Memory database synchronization method, system, equipment and storage medium
US20210320756A1 (en) Method and apparatus for transmitting information, and storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant