CN117216011B - File transmission method and device and electronic equipment - Google Patents

File transmission method and device and electronic equipment Download PDF

Info

Publication number
CN117216011B
CN117216011B CN202311110608.5A CN202311110608A CN117216011B CN 117216011 B CN117216011 B CN 117216011B CN 202311110608 A CN202311110608 A CN 202311110608A CN 117216011 B CN117216011 B CN 117216011B
Authority
CN
China
Prior art keywords
file
subfiles
executed
original
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.)
Active
Application number
CN202311110608.5A
Other languages
Chinese (zh)
Other versions
CN117216011A (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.)
Ccb Engineering Consulting Co ltd
Original Assignee
Ccb Engineering Consulting 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 Ccb Engineering Consulting Co ltd filed Critical Ccb Engineering Consulting Co ltd
Priority to CN202311110608.5A priority Critical patent/CN117216011B/en
Publication of CN117216011A publication Critical patent/CN117216011A/en
Application granted granted Critical
Publication of CN117216011B publication Critical patent/CN117216011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a file transmission method, a file transmission device and electronic equipment, and relates to the technical field of data processing. The file transmission method comprises the following steps: receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, wherein the subfiles are sent by a sending end; generating a task to be executed corresponding to the subfile; calling one or more threads in the thread pool, sending corresponding tasks to be executed to the threads, and generating first indication information of the tasks to be executed by each thread; and judging whether to perform file recovery processing on the sub-files based on the first indication information of the task to be executed, and if so, performing file recovery processing on the sub-files to obtain the original files. According to the method and the device for recovering the file, the multiple threads are utilized to process, the concurrency of tasks and the concurrency of data analysis and conversion are improved, the original file is recovered when the sub-files are not missing, the problem that the stored file is lost due to unstable network is avoided, and the file transmission effect is better.

Description

File transmission method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a file transmission method, a file transmission device and electronic equipment.
Background
In cross-domain data transmission, the transmission process of the data file is low in efficiency due to the instability of the network, and data loss is generated, so that the received data file is incomplete.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a file transmission method, where the method includes:
receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, wherein the subfiles are sent by a sending end;
Generating a task to be executed corresponding to the subfile after the transmission of the original file is finished;
Invoking one or more threads in the thread pool, and determining one or more tasks to be executed corresponding to each thread;
sending the corresponding task to be executed to the threads, and generating first indication information of the task to be executed by each thread according to the file information, wherein the first indication information is used for indicating whether a sub-file corresponding to the task to be executed is complete or not;
And judging whether to perform file recovery processing on the subfiles based on the first indication information of the task to be executed, and if so, performing recovery processing on the subfiles to obtain the original files.
An embodiment of a second aspect of the present disclosure provides a file transfer method, including:
Dividing an original file to obtain a plurality of subfiles;
generating file information of the original file according to the original file and the subfiles;
And sequentially sending the plurality of subfiles and the file information to a receiving end.
An embodiment of a third aspect of the present disclosure provides a file transfer device, including:
The receiving module is used for receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, which are sent by a sending end;
the task generating module is used for generating a task to be executed corresponding to the subfile after the transmission of the original file is finished;
the calling module is used for calling one or more threads in the thread pool and determining one or more tasks to be executed corresponding to each thread;
The acquisition module is used for sending the corresponding task to be executed to the threads, and each thread generates first indication information of the task to be executed according to the file information, wherein the first indication information is used for indicating whether a sub-file corresponding to the task to be executed is complete or not;
And the processing module is used for judging whether to perform file recovery processing on the subfiles based on the first indication information of the task to be executed, and if so, performing recovery processing on the subfiles to obtain the original files.
An embodiment of a fourth aspect of the present disclosure provides a file transfer device, including:
The splitting module is used for splitting the original file to obtain a plurality of subfiles;
the information generation module is used for generating file information of the original file according to the original file and the subfiles;
And the sending module is used for sequentially sending the plurality of subfiles and the file information to a receiving end.
An embodiment of a fifth aspect of the present disclosure proposes an electronic device, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the file transfer method provided in the embodiments of the first or second aspects of the present disclosure.
An embodiment of a sixth aspect of the present disclosure proposes a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the file transfer method provided in the embodiment according to the first or second aspect of the present disclosure.
An embodiment of a seventh aspect of the present disclosure proposes a computer program product comprising a computer program which, when executed by a processor, implements a file transfer method provided in an embodiment of the first or second aspect of the present disclosure.
The method and the device can utilize a plurality of threads to process simultaneously, improve the efficiency of analyzing the sub-files corresponding to the tasks to be executed, improve the concurrency of the tasks and the concurrency of data analysis and conversion, fully utilize resources to work when waiting, reflect whether the received files have the defects by judging whether the sub-files are complete, and recover the files to obtain the original files when the sub-files have no defects so as to realize complete file transmission.
Drawings
FIG. 1 is a flowchart of a method for file transfer according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of generating first indication information of a task to be performed provided by an embodiment of the present disclosure;
FIG. 3 is a flowchart of another method for file transfer provided by an embodiment of the present disclosure;
FIG. 4 is a flowchart of another method for file transfer provided by an embodiment of the present disclosure;
FIG. 5 is a flowchart of another method for file transfer provided by an embodiment of the present disclosure;
FIG. 6 is a block diagram of a file transfer device according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of another file transfer device according to an embodiment of the present disclosure;
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present disclosure and are not to be construed as limiting the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The following describes a file transmission method, a file transmission device and an electronic device according to an embodiment of the present disclosure with reference to the accompanying drawings.
The method and the device are suitable for scenes such as cross-region file transmission or data transmission between the sending end and the receiving end; the sending end can be a device with a sending function, such as a mobile device, a notebook computer, a tablet personal computer, an intelligent television, a screen projector or a projector; the receiving end can be a mobile device, a notebook computer, a tablet computer, a personal computer, a smart television, a display, a router, a projector or other devices with receiving functions. In some implementations, the file or data is sent by the sender to the receiver to complete the transfer of the file or data.
Fig. 1 is a flowchart of a file transfer method according to an embodiment of the disclosure, as shown in fig. 1, performed by a receiving end, where the method includes the following steps:
s101, receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, which are sent by a sending end.
It is understood that the original file is the file that was transferred. Alternatively, file transfer may be performed using a conventional file transfer Protocol (FILE TRANSFER Protocol, FTP), hypertext transfer Protocol (Hypertext Transfer Protocol, HTTP), or internet message access Protocol (INTERNET MAIL ACCESS Protocol, IMAP), or the like.
In some implementations, when the space occupied by the original file is large, the network transmission pressure is large, and the transmission process is slow, so that the original file can be divided to obtain a plurality of subfiles, and each subfile is sequentially transmitted, so that the pressure of the network on large file transmission in the transmission process is reduced.
Alternatively, the original file may be divided according to the size of the occupied space, for example, the original file is divided into a plurality of subfiles of the same size; the occupied space threshold value can also be set, the original file is divided into a plurality of subfiles, and the size of each subfile is smaller than the occupied space threshold value.
In some implementations, if the occupied space of the original file is smaller, normal transmission of the original file by the network is not affected, the original file may not be split, and the whole original file may be directly transmitted.
Further, the file information of the original file is received, and some necessary information corresponding to the original file, such as the file name, the file date, the number, etc., of the original file may be included in the file information of the original file. Alternatively, the division information of the original file may further include division information of the original file, such as whether the original file is divided, the number of sub-files divided by the original file, the number of each sub-file divided by the original file, and the like.
It will be appreciated that the file information of the original file should be able to completely include important information of the original file, that is, be able to uniquely correspond to the original file according to the file information of the original file.
S102, generating tasks to be executed corresponding to the subfiles after the transmission of the original files is finished.
After the transmission of the original file is finished, receiving a plurality of sub-files segmented by the original file and file information of the original file; considering that in the file transmission process, the transmission file may be lost due to the instability of the network or the network security problem, that is, the transmitted multiple subfiles may be different from the received multiple subfiles; it is therefore necessary to determine whether each sub-file is complete after the transmission of the original file is completed.
Optionally, each sub-file may be used as a task to be executed, and integrity judgment and determination may be performed on the task to be executed.
S103, one or more threads in the thread pool are called, and one or more tasks to be executed corresponding to each thread are determined.
In order to improve the efficiency of judging the integrity of the tasks to be executed, one or more threads in the thread pool can be called, and the multiple threads are utilized to process and analyze the multiple tasks to be executed in parallel so as to improve the analysis efficiency.
Optionally, the thread state in the thread pool may be monitored, and the thread in the idle state may be scheduled for processing analysis of the task to be executed.
Alternatively, each thread may randomly correspond to one or more tasks to be executed, and the tasks to be executed processed by different threads are different. And analyzing whether the subfiles corresponding to the tasks to be executed are complete or not by using each thread.
Optionally, the processing capacity of the threads in each idle state may be obtained by monitoring the processing capacity of the threads in the thread pool, and a suitable number of tasks to be executed may be allocated to the scheduled threads according to the processing capacity of the threads.
Optionally, a plurality of tasks to be executed are allocated to one thread, and can be queued through a queue, and the tasks to be executed are read from the queue in the thread for processing according to the first-in first-out principle.
Alternatively, the number of threads may be set randomly or determined according to the number of tasks to be performed, but the number of threads should not exceed the maximum execution capacity of the central processing unit CPU.
S104, sending corresponding tasks to be executed to the threads, and generating first indication information of the tasks to be executed by each thread according to the file information.
And sending the corresponding task to be executed to each thread. Optionally, the thread may further acquire file information of an original file, where the file information includes basic information of a subfile corresponding to each task to be executed.
In some implementations, the task to be executed may also be encapsulated, for example, an interface is added to the task to be executed, so that the attribute of the thread can be added to the task to be executed, and the thread is ensured to have the capability of executing the task to be executed.
Optionally, each thread can synchronously execute the tasks to be executed when processing the tasks to be executed, and can always control the constant number of threads to run, so that the analysis efficiency and the analysis speed of the tasks to be executed are improved.
In some implementations, the thread may generate first indication information of the task to be executed according to the file information, where the first indication information is used to indicate whether a subfile corresponding to the task to be executed is complete. That is, the first indication information may indicate that the task to be performed is complete or that the task to be performed is incomplete.
In some implementations, the thread may obtain a check code of a subfile corresponding to the task to be executed according to the file information, where the check code may be used to reflect information of the subfile before transmission; meanwhile, the thread calculates the check code of the task to be executed, if the calculated check code is coincident with the check code in the file information, the fact that the subfiles are consistent before and after transmission is indicated, that is, the subfiles corresponding to the task to be executed have no information loss in the transmission process, and the first indication information indicates that the task to be executed is complete. Correspondingly, if the calculated check code is inconsistent with the check code in the file information, the fact that the subfiles are inconsistent before transmission and after transmission is indicated, namely, the subfiles corresponding to the tasks to be executed have information loss in the transmission process, and the first indication information indicates that the tasks to be executed are incomplete.
Optionally, the check code corresponding to the subfile may be a value calculated according to the content of the subfile, and when the content of the subfile changes, the corresponding check code will also change accordingly.
S105, judging whether to perform file recovery processing on the sub-files based on the first indication information of the task to be executed, and if so, performing the file recovery processing on the sub-files to obtain the original files.
When the first indication information of all the tasks to be executed indicates that the tasks to be executed are complete, the content of all the subfiles corresponding to the tasks to be executed is not lost, that is, the subfiles received at present are complete, and the subfiles can be subjected to file recovery processing. Correspondingly, if the first indication information of any task to be executed indicates that the task to be executed is incomplete, which means that the content of the subfile corresponding to the task to be executed is lost, the received subfile is not complete enough, and file recovery processing of the subfile is not needed.
Further, when the sub-file is judged to be required to be subjected to file recovery processing, the sub-file is subjected to recovery processing, and the original file is obtained.
It can be understood that in the process of file recovery, the recovery of the sub-files should be consistent with the splitting sequence of the original files to ensure that the files obtained after the sub-file recovery are consistent with the original files, so as to achieve the purpose of complete transmission of the original files.
In the embodiment of the disclosure, a plurality of tasks to be executed are determined by receiving the file information of the subfiles and the original files, and the tasks to be executed are processed by calling a plurality of threads, so that whether the subfiles corresponding to the tasks to be executed are complete or not is judged, and whether the subfiles are restored or not is determined according to whether the subfiles are complete or not; the method has the advantages that the multiple threads are utilized for simultaneous processing, the efficiency of analyzing the sub-files corresponding to the tasks to be executed is improved, the concurrency of the tasks and the concurrency of data analysis and conversion are improved, resources can be fully utilized to work when waiting, whether the received files are missing is reflected by judging whether the sub-files are complete, and the original files are obtained by recovering the files when the sub-files are not missing, so that complete file transmission is realized, the problem of file loss caused by unstable network is avoided, and the file transmission effect is better.
On the basis of the foregoing embodiments, the embodiments of the present disclosure describe a process of generating first indication information of a task to be performed, and fig. 2 is a flowchart of generating first indication information of a task to be performed, where the process is performed by a receiving end, as shown in fig. 2, and the method includes the following steps:
S201, carrying out hash operation on the subfiles corresponding to the tasks to be executed, and generating second identification codes of the subfiles corresponding to the tasks to be executed.
Optionally, hash operation may be performed on the subfiles corresponding to the tasks to be executed, so as to obtain the second identification codes of the subfiles corresponding to the tasks to be executed.
It will be appreciated that the hash function in the hash operation is a mathematical equation based on which the code of the text message digest may be generated. That is, the second identification code of the sub-file corresponding to the task to be executed is obtained through the hash function, the second identification code uniquely corresponds to the text content of the sub-file, and when the text content of the sub-file is changed, the second identification code is also changed.
S202, the second identification code is matched with the first identification code of each subfile.
Alternatively, the file information of the original file may include a first identifier of a sub-file separated from the original file, that is, a first identifier of the sub-file before transmission, where the first identifier also reflects text content information of the sub-file.
And matching the second identification code with the first identification code of each sub-file, namely matching the sub-file of the task to be executed with each sub-file of the original file before transmission, and judging whether the sub-file successfully matched exists or not, so as to reflect whether the text content of the sub-file of the task to be executed is complete or not.
In some implementations, a similarity algorithm may be used to match the second identifier with the first identifier, such as a cosine similarity or a pearson correlation algorithm, and when the similarity is 1, it indicates that the second identifier and the first identifier are completely identical, that is, the second identifier and the first identifier are successfully matched.
And S203, if the second identification code is successfully matched with the first identification code of any subfile, generating first indication information for indicating the completeness of the subfile corresponding to the task to be executed.
In some implementations, if the second identification code is successfully matched with the first identification code of any sub-file, it is indicated that the sub-file of the task to be executed has a corresponding file in the sub-files divided by the original file, that is, the text content of the sub-file of the task to be executed is not lost, and first indication information indicating that the sub-file corresponding to the task to be executed is complete is generated.
S204, if the second identification code is not matched with the first identification code of any subfile, generating first indication information for indicating the incompleteness of the subfile corresponding to the task to be executed.
In some implementations, if it is determined that the second identifier code fails to match with the first identifier code of any sub-file, it is indicated that the sub-file of the task to be executed does not have a corresponding file in the sub-files divided by the original file, that is, the text content of the sub-file of the task to be executed is lost, so that the corresponding sub-file cannot be found, and therefore, first indication information indicating that the sub-file corresponding to the task to be executed is incomplete is generated.
In the embodiment of the disclosure, the second identification code of the received subfile is compared and matched with the first identification code of the subfile before transmission to judge whether the subfile consistent with the identification code of the subfile corresponding to the task to be executed exists, and the identification code can change along with the file content of the subfile, so that whether the received subfile is lost or not can be determined through the matching of the identification code, and the efficiency and the accuracy of judging whether the text content of the subfile is complete are both higher.
Fig. 3 is a flowchart of another file transfer method according to an embodiment of the disclosure, as shown in fig. 3, performed by a receiving end, where the method includes the following steps:
S301, receiving file information of a plurality of subfiles and an original file, which are obtained by dividing the original file and sent by a sending end.
Optionally, the file information of the original file at least includes: the number of the original file, the date of the file, the name of the file and the third identification code, the first label of the sub-file and the first identification code.
In some implementations, the file information of the original file may further include whether the original file has a partition, the number of sub-files partitioned by the original file, a table name corresponding to the original file, a file name of each sub-file, and the like, which are not limited herein.
In the embodiment of the present disclosure, the implementation method of step S301 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S302, generating a task to be executed corresponding to the subfile after the transmission of the original file is finished.
In the embodiment of the present disclosure, the implementation method of step S302 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S303, one or more threads in the thread pool are called, and one or more tasks to be executed corresponding to each thread are determined.
Alternatively, the number of processing units of the central processing unit CPU may be acquired; determining the maximum number of threads to be called according to the number of the processing units, and calling threads from a thread pool based on the maximum number of threads; wherein the maximum number of threads is less than or equal to the number of processing units.
The maximum number of threads is determined according to the number of processing units of the central processing unit, so that the tasks to be executed can be processed by the maximized calling threads when the central processing unit operates normally, and the processing efficiency is improved.
In the embodiment of the present disclosure, the implementation method of step S303 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S304, sending corresponding tasks to be executed to the threads, and generating first indication information of the tasks to be executed by each thread according to the file information.
In the embodiment of the present disclosure, the implementation method of step S304 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
And S305, when the sub-files corresponding to the tasks to be executed are complete in response to the indication of each first indication information, extracting the second labels of the sub-files from each received sub-file, and obtaining a second label sequence.
When all the first indication information indicates that the subfiles corresponding to the tasks to be executed are complete, the text content of all the received subfiles is indicated to be not lost. However, in the file transmission process, besides the text content of the file is lost, there may be a case that the file is lost, for example, a certain sub-file is lost; therefore, only whether the text content of the subfiles is complete is judged, and whether the subfiles are lost or not is analyzed again cannot be ensured because all subfiles are successfully transmitted.
Alternatively, when the original file is divided into a plurality of subfiles, a corresponding reference is generated for each subfile and recorded in file information of the original file.
In some implementations, the subfiles may carry their own labels for transmission during transmission. That is, after receiving the subfiles, the second labels corresponding to each subfile may be extracted, and the second labels of all the received subfiles may be arranged to obtain the second label sequence.
Alternatively, when the original file is divided into subfiles, the subfiles may be numbered sequentially from small to large in order to facilitate the sequence of the region subfiles.
Alternatively, in order to facilitate determining whether the subfiles are lost according to the second label sequence, the second labels may be arranged in order from small to large to obtain the second label sequence.
S306, obtaining a first label sequence based on the first label of each sub-file in the file information.
Alternatively, the first index of each sub-file, that is, the index generated by each sub-file at the time of splitting the original file, is acquired based on the file information of the original file.
Alternatively, the first labels are arranged in order from smaller to larger to obtain a first label sequence.
S307, the second label sequence is matched with the first label sequence.
Optionally, the second label sequence is matched with the first label sequence to determine whether the second label sequence is consistent with the first label sequence.
Alternatively, a global alignment algorithm or a dynamic time warping algorithm may be used to match the second label sequence with the first label sequence, and determine whether the second label sequence is consistent with the first label sequence.
S308, if the second label sequence is successfully matched with the first label sequence, generating second indication information for indicating that the subfiles are not lost.
In some implementations, if the second index sequence matches the first index sequence successfully, it indicates that the second index sequence is consistent with the first index sequence, that is, the index of all the subfiles is consistent, and the subfiles are not lost in the transmission process, so that second index information indicating that the subfiles are not lost is generated.
S309, if the second label sequence fails to match the first label sequence, generating second indication information indicating that the subfile is lost.
In some implementations, if the second reference sequence fails to match with the first reference sequence, it indicates that the second reference sequence is inconsistent with the first reference sequence, that is, the subfiles are lost in the transmission process, so that second indication information indicating that the subfiles are lost is generated.
And S310, when each second indication information indicates that the sub-file of the task to be executed is not lost, restoring the sub-file to obtain the original file.
When each second indication information indicates that the sub-file of the task to be executed is not lost, the transmission of the sub-file in the original file is complete, namely, all the sub-files are transmitted, and the text content of each sub-file is not lost, so that the file recovery processing can be carried out on all the sub-files.
Alternatively, the sub-files may be spliced in turn based on the second label of the sub-file, to generate a spliced file.
Further, in order to improve the accuracy of the original file transmission, the restored spliced file is judged again, and whether the spliced file is the original file is determined.
Optionally, hash operation can be performed on the spliced file to obtain a fourth identification code of the spliced file; and if the fourth identification code of the spliced file is consistent with the third identification code of the original file in the file information, determining that the spliced file is the original file.
That is, the fourth identification code of the spliced file is compared with the third identification code of the original file, if the fourth identification code is consistent with the third identification code, the spliced file is identical with the original file, the spliced file can be determined to be the original file, the original file is stored after the original file is restored, and the transmission of the complete file is completed.
Optionally, the number of the original file can be obtained from the file information, and a target storage directory corresponding to the number is determined; and storing the original file into a corresponding target storage directory. For example, the original file is labeled "a0651", a target storage directory including the number "a0651" is found, and the original file is stored in the corresponding target storage directory.
Further, after the original file is stored in the corresponding target storage directory, the original file in the target storage target can be automatically stored in the database, that is, after the transmission of the original file is completed and the original file is stored in the target storage directory, the original file is automatically triggered and stored in the database.
Optionally, if the first indication information indicates that the subfile corresponding to the task to be executed is incomplete or the second indication information indicates that the subfile corresponding to the task to be executed is missing, determining the number, the file date and the file name of the original file according to the file information; the number, file date, and file name of the original file are recorded as a transmission log of the original file. And reminds the sending end to resend the original file so as to ensure the integrity of the received file.
In the embodiment of the disclosure, after the first indication information of all the subfiles corresponding to the tasks to be executed indicates that the subfiles are complete, whether the entire subfiles are lost is judged, whether the subfiles are lost is judged by comparing the first label sequence and the second label sequence of the subfiles before and after transmission, whether the received files are accurate is judged more accurately, after the subfiles are judged to be lost, the subfiles are spliced according to the second label to obtain the spliced file, whether the spliced file is an original file is determined according to the identification code again, the received and restored original file is ensured to be the file to be transmitted through multiple judgment and determination, the restored original file is stored, and the effect and stability of file transmission are improved.
Fig. 4 is a flowchart of another file transfer method according to an embodiment of the disclosure, as shown in fig. 4, performed by a receiving end, where the method includes:
S401, receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, which are sent by a sending end.
In the embodiment of the present disclosure, the implementation method of step S401 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S402, generating a task to be executed corresponding to the subfile after the transmission of the original file is finished.
In the embodiment of the present disclosure, the implementation method of step S402 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S403, one or more threads in the thread pool are called, and one or more tasks to be executed corresponding to each thread are determined.
In the embodiment of the present disclosure, the implementation method of step S403 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S404, sending the corresponding task to be executed to the thread.
In the embodiment of the present disclosure, the implementation method of step S404 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S405, carrying out hash operation on the subfiles corresponding to the tasks to be executed, and generating second identification codes of the subfiles corresponding to the tasks to be executed.
In the embodiment of the present disclosure, the implementation method of step S405 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S406, the second identification code is matched with the first identification code of each subfile.
In the embodiment of the present disclosure, the implementation method of step S406 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S407, if the second identification code is successfully matched with the first identification code of any subfile, generating first indication information for indicating the completeness of the subfile corresponding to the task to be executed.
In the embodiment of the present disclosure, the implementation method of step S407 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S408, if the second identification code is not matched with the first identification code of any subfile, generating first indication information for indicating the incompleteness of the subfile corresponding to the task to be executed.
In the embodiment of the present disclosure, the implementation method of step S408 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S409, when the sub-files corresponding to the tasks to be executed are complete in response to the indication of the first indication information, extracting second marks of the sub-files from each received sub-file, and obtaining a second mark sequence.
In the embodiment of the present disclosure, the implementation method of step S409 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S410, obtaining a first label sequence based on the first label of each sub-file in the file information.
In the embodiment of the present disclosure, the implementation method of step S410 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S411, the second label sequence is matched with the first label sequence.
In the embodiment of the present disclosure, the implementation method of step S411 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
And S412, if the second label sequence is successfully matched with the first label sequence, generating second indication information for indicating that the subfiles are not lost.
In the embodiment of the present disclosure, the implementation method of step S412 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
S413, if the second label sequence fails to match with the first label sequence, generating second indication information indicating that the subfile is lost.
In the embodiment of the present disclosure, the implementation method of step S413 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described in detail.
And S414, when each second indication information indicates that the sub-file of the task to be executed is not lost, restoring the sub-file to obtain the original file.
In the embodiment of the present disclosure, the implementation method of step S414 may be implemented in any manner in each embodiment of the present disclosure, which is not limited herein, and is not described herein again.
In the embodiment of the disclosure, the second identification code of the received subfile is compared and matched with the first identification code of the subfile before transmission to judge whether the subfile consistent with the identification code of the subfile corresponding to the task to be executed exists, the efficiency and the accuracy of judging whether the text content of the subfile is complete are both high, after the first indication information of the subfiles corresponding to all the tasks to be executed indicates that the subfile is complete, the whole subfile is also judged whether the subfile is lost, after the subfiles are judged to be not lost, the subfiles are spliced according to the second label to obtain the spliced file, whether the spliced file is an original file is determined according to the identification code again, the received and restored original file is ensured to be the file to be transmitted through multiple judgment and determination, the restored original file is stored, the problem that the stored file is lost due to unstable network is avoided, and the file transmission effect is better.
Fig. 5 is a flowchart of another file transfer method provided in an embodiment of the present disclosure, as shown in fig. 5, performed by a transmitting end, where the method includes:
s501, dividing an original file to obtain a plurality of subfiles.
Alternatively, the space occupation amount of the original file may be acquired; when the space occupation amount of the original file is larger than a preset space threshold value, the original file is segmented, and a plurality of subfiles are obtained.
When the space occupation amount of the original file is larger than a preset space threshold value, the original file is larger in occupied space, the transmission efficiency of the original file is lower, and the file is larger and is easier to lose file data and the like due to the instability of a network, so that when the space occupation amount of the original file is larger than the preset space threshold value, the original file is segmented.
Optionally, the original file may be randomly segmented to obtain a plurality of subfiles, where the space occupation of each subfile is less than or equal to the preset space threshold.
S502, generating file information of the original file according to the original file and the subfiles.
Optionally, first attribute information of the original file may be acquired, where the first attribute information includes at least a number, a file date, a file name, and a third identification code of the original file; acquiring second attribute information of the subfiles, wherein the second attribute information at least comprises a first label and a first identification code of the subfiles; the first attribute information and the second attribute information are taken as file information of the original file. That is, the file information of the original file includes at least: the number of the original file, the file date, the file name, the third identification code, the first label of the sub-file and the first identification code.
The file information according to the original file may correspond to the original file, and a plurality of subfiles into which the original file is divided.
S503, sequentially sending a plurality of subfiles and file information to a receiving end.
After the original file is divided, the transmission of the original file may be completed by sequentially transmitting the subfiles.
Further, after the sub-file transmission is completed, file information of the original file is sent so as to check whether the original file is successfully transmitted according to the file information.
In the embodiment of the disclosure, the original file is divided to obtain the plurality of subfiles, the subfiles are sent, the file information corresponding to the original file is sent, the condition that the large file is lost due to unstable network in the transmission process is reduced, the pressure of the transmission of the plurality of subfiles on the network transmission is smaller, the file transmission process is more stable, the transmitted file information is common information corresponding to the files, the method and the device are applicable to the transmission of various data files, the applicability is better, and the effect of file transmission is better.
Based on the above embodiments, the embodiments of the present disclosure may construct a general data file transmission assembly, and perform https certificate exchange through the transmitting end and the receiving end, and use https to perform secure transmission. The embodiment of the disclosure can be mainly realized by Java programs, and the embodiment is realized by setting a file receiver, a task generator, a task scheduler, an execution thread pool and a task executor; the file receiver can temporarily store the file information of the original file and a plurality of subfiles received by the receiving end, and the task generator is used for generating one or more tasks to be executed according to the received file information; distributing each task to be executed to an execution thread through a task scheduler; the execution thread pool is responsible for calling one or more threads and controlling the number of the threads to process tasks to be executed; finally, judging whether the original file is completely received or not according to the task executor, and storing and saving the received complete original file to realize a complete file transmission process and ensure that the saved received file is the complete original file.
Fig. 6 is a block diagram of a file transmission device according to an embodiment of the present disclosure, and as shown in fig. 6, a file transmission device 600 according to an embodiment of the present disclosure is executed by a receiving end, and includes:
a receiving module 601, configured to receive file information of a plurality of subfiles and an original file, which are sent by a sending end and obtained by dividing the original file;
the task generating module 602 is configured to generate a task to be executed corresponding to the subfile after the transmission of the original file is completed;
a calling module 603, configured to call one or more threads in the thread pool, and determine one or more tasks to be executed corresponding to each thread;
the obtaining module 604 is configured to send a corresponding task to be executed to a thread, and each thread generates first indication information of the task to be executed according to the file information, where the first indication information is used to indicate whether a sub-file corresponding to the task to be executed is complete;
The processing module 605 is configured to determine whether to perform file recovery processing on the sub-file based on the first instruction information of the task to be performed, and if it is determined to perform file recovery, perform recovery processing on the sub-file to obtain the original file.
In some implementations, the acquisition module 604 includes:
Carrying out hash operation on the subfiles corresponding to the tasks to be executed, and generating a second identification code of the subfiles corresponding to the tasks to be executed;
matching the second identification code with the first identification code of each subfile;
if the second identification code is successfully matched with the first identification code of any subfile, generating first indication information for indicating the completeness of the subfile corresponding to the task to be executed; or alternatively
If the second identification code is not matched with the first identification code of any subfile, generating first indication information indicating that the subfile corresponding to the task to be executed is incomplete.
In some implementations, the processing module 605 includes:
when each first indication information indicates that the subfile corresponding to the task to be executed is complete, extracting a second label of the subfile from each received subfile to obtain a second label sequence;
obtaining a first label sequence based on the first label of each sub-file in the file information;
matching the second label sequence with the first label sequence;
if the second label sequence is successfully matched with the first label sequence, generating second indication information indicating that the subfile is not lost; or alternatively
If the second label sequence fails to be matched with the first label sequence, second indication information indicating that the subfile is lost is generated.
In some implementations, the processing module 605 includes:
Splicing the sub-files in sequence based on the second label of the sub-file to generate a spliced file;
carrying out hash operation on the spliced file to obtain a fourth identification code of the spliced file;
and if the fourth identification code of the spliced file is consistent with the third identification code of the original file in the file information, determining that the spliced file is the original file.
In some implementations, the processing module 605 further includes:
acquiring the number of an original file from the file information, and determining a target storage directory corresponding to the number;
and storing the original file into a corresponding target storage directory.
In some implementations, the apparatus 600 further includes:
when the first indication information indicates that the sub-file corresponding to the task to be executed is incomplete, determining the number, the file date and the file name of the original file according to the file information;
the number, file date, and file name of the original file are recorded as a transmission log of the original file.
In some implementations, the calling module 603 includes:
Acquiring the number of processing units of a Central Processing Unit (CPU);
Determining the maximum number of threads to be called according to the number of the processing units, and calling threads from a thread pool based on the maximum number of threads; wherein the maximum number of threads is less than or equal to the number of processing units.
In the embodiment of the disclosure, a plurality of tasks to be executed are determined by receiving the file information of the subfiles and the original files, and the tasks to be executed are processed by calling a plurality of threads, so that whether the subfiles corresponding to the tasks to be executed are complete or not is judged, and whether the subfiles are restored or not is determined according to whether the subfiles are complete or not; the method has the advantages that the multiple threads are used for processing simultaneously, the efficiency of analyzing the subfiles corresponding to the tasks to be executed is improved, the concurrency of the tasks is improved, resources can be fully utilized to work when waiting, whether the received files are missing is reflected by judging whether the subfiles are complete, the files are restored to obtain the original files when the subfiles are not missing, so that complete file transmission is realized, the problem of file loss caused by unstable network is avoided, and the file transmission effect is better.
Fig. 7 is a block diagram of a file transmission device according to an embodiment of the present disclosure, and as shown in fig. 7, a file transmission device 700 according to an embodiment of the present disclosure is executed by a transmitting end, and includes:
the splitting module 701 is configured to split an original file to obtain a plurality of subfiles;
The information generating module 702 is configured to generate file information of an original file according to the original file and the subfiles;
A sending module 703, configured to send the plurality of subfiles and the file information to the receiving end in sequence.
In some implementations, the information generation module 702 includes:
Acquiring first attribute information of an original file, wherein the first attribute information at least comprises the number, the file date, the file name and a third identification code of the original file;
Acquiring second attribute information of the subfiles, wherein the second attribute information at least comprises a first label and a first identification code of the subfiles;
the first attribute information and the second attribute information are taken as file information of the original file.
In some implementations, the partitioning module 701 further includes:
Acquiring the space occupation amount of an original file;
when the space occupation amount of the original file is larger than a preset space threshold value, the original file is segmented, and a plurality of subfiles are obtained.
In the embodiment of the disclosure, the original file is divided to obtain the plurality of subfiles, the subfiles are sent, the file information corresponding to the original file is sent, the condition that the large file is lost due to unstable network in the transmission process is reduced, the pressure of the transmission of the plurality of subfiles on the network transmission is smaller, the file transmission process is more stable, the transmitted file information is common information corresponding to the files, the method and the device are applicable to the transmission of various data files, the applicability is better, and the effect of file transmission is better.
Fig. 8 is a block diagram of an electronic device, according to an example embodiment. As shown in fig. 8, the electronic device 800 includes:
Memory 810 and processor 820, bus 830 connecting the different components (including memory 810 and processor 820), memory 810 storing a computer program that when executed by processor 820 implements the file transfer method described in the embodiments of the present disclosure.
Bus 830 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 800 typically includes a variety of electronic device readable media. Such media can be any available media that is accessible by electronic device 800 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 810 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 840 and/or cache memory 850. Electronic device 800 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 860 may be used to read from and write to non-removable, non-volatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 830 through one or more data medium interfaces. Memory 810 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
A program/utility 880 having a set (at least one) of program modules 870 may be stored, for example, in memory 810, such program modules 870 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 870 generally perform the functions and/or methods in the embodiments described in this disclosure.
The electronic device 800 may also communicate with one or more external devices 890 (e.g., keyboard, pointing device, display 891, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 892. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 893. As shown in fig. 8, network adapter 893 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown in fig. 8, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
Processor 820 executes various functional applications and data processing by executing programs stored in memory 810.
It should be noted that, the implementation process and the technical principle of the electronic device in this embodiment refer to the foregoing explanation of the file transfer method in the embodiment of the disclosure, and are not repeated herein.
To achieve the above embodiments, the present disclosure also proposes a computer-readable storage medium.
Wherein the instructions in the computer-readable storage medium, when executed by a processor of the service server, enable the service server to perform the file transfer method as described above. Alternatively, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
To achieve the above embodiments, the present disclosure further provides a computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a file transfer method as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims. It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (19)

1. A method of file transfer performed by a receiving end, the method comprising:
receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, wherein the subfiles are sent by a sending end; the file information comprises a first identification code of the subfile and a first label of the subfile;
Generating a task to be executed corresponding to the subfile after the transmission of the original file is finished;
Invoking one or more threads in the thread pool, and determining one or more tasks to be executed corresponding to each thread;
sending the corresponding task to be executed to the threads, and generating first indication information of the task to be executed by each thread according to the file information, wherein the first indication information is used for indicating whether a sub-file corresponding to the task to be executed is complete or not;
Judging whether to carry out file recovery processing on the subfiles based on the first indication information of the task to be executed, if so, carrying out recovery processing on the subfiles to obtain the original files;
The generating, by each thread, first indication information of the task to be executed according to the file information includes:
carrying out hash operation on the subfiles corresponding to the tasks to be executed, and generating a second identification code of the subfiles corresponding to the tasks to be executed;
matching the second identification code with the first identification code of each subfile;
if the second identification code is successfully matched with the first identification code of any sub-file, generating first indication information for indicating the completeness of the sub-file corresponding to the task to be executed; or alternatively
If the second identification code is failed to be matched with the first identification code of any sub-file, generating first indication information for indicating that the sub-file corresponding to the task to be executed is incomplete;
The determining whether to perform file recovery processing on the subfiles based on the first indication information of the task to be executed includes:
When each first indication information indicates that the subfile corresponding to the task to be executed is complete, extracting a second label of the subfile from each received subfile to obtain a second label sequence;
Obtaining a first label sequence based on the first label of each sub-file in the file information;
Matching the second sequence of labels with the first sequence of labels;
If the second label sequence is successfully matched with the first label sequence, generating second indication information for indicating that the subfiles are not lost; or alternatively
If the second label sequence fails to be matched with the first label sequence, generating second indication information indicating that the subfiles are lost; when each piece of second indication information indicates that the sub-file of the task to be executed is not lost, file recovery processing is carried out on all the sub-files.
2. The method of claim 1, wherein the file information includes a third identification code of the original file, wherein the performing the file recovery process on the sub-file to obtain the original file includes:
splicing the subfiles in sequence based on the second marks of the subfiles to generate spliced files;
carrying out hash operation on the spliced file to obtain a fourth identification code of the spliced file;
and if the fourth identification code of the spliced file is consistent with the third identification code of the original file in the file information, determining that the spliced file is the original file.
3. The method of claim 2, wherein after performing the file recovery process on the subfiles to obtain the original file, further comprising:
Acquiring the number of the original file from the file information, and determining a target storage directory corresponding to the number;
and storing the original file into the corresponding target storage directory.
4. The method of claim 3, wherein the file information further includes a file date and a file name of the original file, the method further comprising:
When the first indication information indicates that the subfiles corresponding to the tasks to be executed are incomplete, determining the number, the file date and the file name of the original file according to the file information;
And recording the serial numbers, the file dates and the file names of the original files as transmission logs of the original files.
5. The method of any of claims 1-4, wherein invoking one or more threads in a thread pool comprises:
Acquiring the number of processing units of a Central Processing Unit (CPU);
Determining the maximum number of threads to be called according to the number of the processing units, and calling threads from the thread pool based on the maximum number of threads; wherein the maximum number of threads is less than or equal to the number of processing units.
6. A method for file transfer, performed by a sender, the method comprising:
Dividing an original file to obtain a plurality of subfiles;
generating file information of the original file according to the original file and the subfiles;
Sequentially sending the plurality of subfiles and the file information to a receiving end, the receiving end performing the method according to any one of claims 1-5.
7. The method of claim 6, the generating file information of the original file according to the original file and the subfiles, comprising:
Acquiring first attribute information of the original file, wherein the first attribute information at least comprises the number, the file date, the file name and a third identification code of the original file;
acquiring second attribute information of the subfiles, wherein the second attribute information at least comprises a first label and a first identification code of the subfiles;
And taking the first attribute information and the second attribute information as file information of the original file.
8. The method of claim 7, wherein the splitting the original file to obtain a plurality of subfiles, further comprises:
Acquiring the space occupation amount of the original file;
and when the space occupation amount of the original file is larger than a preset space threshold value, dividing the original file to obtain the plurality of subfiles.
9. A file transfer apparatus, performed by a receiving end, the apparatus comprising:
the receiving module is used for receiving a plurality of subfiles obtained by dividing an original file and file information of the original file, which are sent by a sending end; the file information comprises a first identification code of the subfile and a first label of the subfile;
the task generating module is used for generating a task to be executed corresponding to the subfile after the transmission of the original file is finished;
the calling module is used for calling one or more threads in the thread pool and determining one or more tasks to be executed corresponding to each thread;
The acquisition module is used for sending the corresponding task to be executed to the threads, and each thread generates first indication information of the task to be executed according to the file information, wherein the first indication information is used for indicating whether a sub-file corresponding to the task to be executed is complete or not;
The processing module is used for judging whether to carry out file recovery processing on the subfiles based on the first indication information of the task to be executed, and if so, carrying out recovery processing on the subfiles to obtain the original files;
The acquisition module comprises:
carrying out hash operation on the subfiles corresponding to the tasks to be executed, and generating a second identification code of the subfiles corresponding to the tasks to be executed;
matching the second identification code with the first identification code of each subfile;
if the second identification code is successfully matched with the first identification code of any sub-file, generating first indication information for indicating the completeness of the sub-file corresponding to the task to be executed; or alternatively
If the second identification code is failed to be matched with the first identification code of any sub-file, generating first indication information for indicating that the sub-file corresponding to the task to be executed is incomplete;
The processing module comprises:
When each first indication information indicates that the subfile corresponding to the task to be executed is complete, extracting a second label of the subfile from each received subfile to obtain a second label sequence;
Obtaining a first label sequence based on the first label of each sub-file in the file information;
Matching the second sequence of labels with the first sequence of labels;
If the second label sequence is successfully matched with the first label sequence, generating second indication information for indicating that the subfiles are not lost; or alternatively
If the second label sequence fails to be matched with the first label sequence, generating second indication information indicating that the subfiles are lost; when each piece of second indication information indicates that the sub-file of the task to be executed is not lost, file recovery processing is carried out on all the sub-files.
10. The apparatus of claim 9, wherein the processing module comprises:
splicing the subfiles in sequence based on the second marks of the subfiles to generate spliced files;
carrying out hash operation on the spliced file to obtain a fourth identification code of the spliced file;
and if the fourth identification code of the spliced file is consistent with the third identification code of the original file in the file information, determining that the spliced file is the original file.
11. The apparatus of claim 10, wherein the processing module further comprises:
Acquiring the number of the original file from the file information, and determining a target storage directory corresponding to the number;
and storing the original file into the corresponding target storage directory.
12. The apparatus of claim 11, wherein the apparatus further comprises:
When the first indication information indicates that the subfiles corresponding to the tasks to be executed are incomplete, determining the number, the file date and the file name of the original file according to the file information;
And recording the serial numbers, the file dates and the file names of the original files as transmission logs of the original files.
13. The apparatus according to any one of claims 9-12, wherein the invoking module comprises:
Acquiring the number of processing units of a Central Processing Unit (CPU);
Determining the maximum number of threads to be called according to the number of the processing units, and calling threads from the thread pool based on the maximum number of threads; wherein the maximum number of threads is less than or equal to the number of processing units.
14. A file transfer apparatus, characterized by being executed by a transmitting end, the apparatus comprising:
The splitting module is used for splitting the original file to obtain a plurality of subfiles;
the information generation module is used for generating file information of the original file according to the original file and the subfiles;
A sending module, configured to send the plurality of subfiles and the file information sequentially to a receiving end, where the receiving end performs the method according to any one of claims 1-5.
15. The apparatus of claim 14, the information generation module comprising:
Acquiring first attribute information of the original file, wherein the first attribute information at least comprises the number, the file date, the file name and a third identification code of the original file;
acquiring second attribute information of the subfiles, wherein the second attribute information at least comprises a first label and a first identification code of the subfiles;
And taking the first attribute information and the second attribute information as file information of the original file.
16. The apparatus of claim 15, wherein the segmentation module further comprises:
Acquiring the space occupation amount of the original file;
and when the space occupation amount of the original file is larger than a preset space threshold value, dividing the original file to obtain the plurality of subfiles.
17. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
The processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-5 or 6-8.
18. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the method of any of claims 1-5 or 6-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-5 or 6-8.
CN202311110608.5A 2023-08-30 2023-08-30 File transmission method and device and electronic equipment Active CN117216011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311110608.5A CN117216011B (en) 2023-08-30 2023-08-30 File transmission method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311110608.5A CN117216011B (en) 2023-08-30 2023-08-30 File transmission method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN117216011A CN117216011A (en) 2023-12-12
CN117216011B true CN117216011B (en) 2024-05-03

Family

ID=89036199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311110608.5A Active CN117216011B (en) 2023-08-30 2023-08-30 File transmission method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117216011B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590233A (en) * 2017-09-07 2018-01-16 郑州云海信息技术有限公司 A kind of file management method and device
WO2018014564A1 (en) * 2016-07-20 2018-01-25 中兴通讯股份有限公司 Method and device for recovering incomplete transmission file
CN110708363A (en) * 2019-09-20 2020-01-17 济南浪潮数据技术有限公司 File transmission method, system, electronic equipment and storage medium
CN114338651A (en) * 2021-12-27 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium
CN114356855A (en) * 2021-12-06 2022-04-15 深圳市亚略特科技股份有限公司 File management method, file management device, electronic device and readable storage medium
CN114553863A (en) * 2022-04-27 2022-05-27 中国工商银行股份有限公司 File transmission method and device, storage medium and electronic equipment
CN115086298A (en) * 2022-05-30 2022-09-20 中银金融科技有限公司 File transmission method and device
WO2022206759A1 (en) * 2021-03-31 2022-10-06 华为技术有限公司 File sending method, device and computer readable storage medium
CN115208877A (en) * 2022-07-21 2022-10-18 中国建设银行股份有限公司 File transmission method, device, equipment, medium and product
CN116244111A (en) * 2022-12-21 2023-06-09 杭州堃博生物科技有限公司 Data recovery method, storage method, medical equipment, device and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018014564A1 (en) * 2016-07-20 2018-01-25 中兴通讯股份有限公司 Method and device for recovering incomplete transmission file
CN107590233A (en) * 2017-09-07 2018-01-16 郑州云海信息技术有限公司 A kind of file management method and device
CN110708363A (en) * 2019-09-20 2020-01-17 济南浪潮数据技术有限公司 File transmission method, system, electronic equipment and storage medium
WO2022206759A1 (en) * 2021-03-31 2022-10-06 华为技术有限公司 File sending method, device and computer readable storage medium
CN114356855A (en) * 2021-12-06 2022-04-15 深圳市亚略特科技股份有限公司 File management method, file management device, electronic device and readable storage medium
CN114338651A (en) * 2021-12-27 2022-04-12 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium
CN114553863A (en) * 2022-04-27 2022-05-27 中国工商银行股份有限公司 File transmission method and device, storage medium and electronic equipment
CN115086298A (en) * 2022-05-30 2022-09-20 中银金融科技有限公司 File transmission method and device
CN115208877A (en) * 2022-07-21 2022-10-18 中国建设银行股份有限公司 File transmission method, device, equipment, medium and product
CN116244111A (en) * 2022-12-21 2023-06-09 杭州堃博生物科技有限公司 Data recovery method, storage method, medical equipment, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自适应文件传输与策略研究;郑利宁;王云岚;;计算机工程与应用(第36期);全文 *

Also Published As

Publication number Publication date
CN117216011A (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN110764945A (en) Crash log processing method, device, equipment and storage medium
CN111813573B (en) Communication method of management platform and robot software and related equipment thereof
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN111708794B (en) Data comparison method and device based on big data platform and computer equipment
CN110825694A (en) Data processing method, device, equipment and storage medium
CN111625342B (en) Data tracing method, device and server
CN112822260A (en) File transmission method and device, electronic equipment and storage medium
CN112311902A (en) File sending method and device based on micro-service
CN110442564B (en) Incremental data verification method and storage medium
CN110267215B (en) Data detection method, equipment and storage medium
CN111782431A (en) Exception processing method, exception processing device, terminal and storage medium
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
CN117216011B (en) File transmission method and device and electronic equipment
CN110442439B (en) Task process processing method and device and computer equipment
CN110888791A (en) Log processing method, device, equipment and storage medium
CN112346952A (en) Method, equipment and electronic equipment for regression testing of test cases
CN112818204B (en) Service processing method, device, equipment and storage medium
CN116303320A (en) Real-time task management method, device, equipment and medium based on log file
CN112527497B (en) Serialized multithreaded data processing system
CN115794751A (en) Method and device for determining integrity of log
CN112395119B (en) Abnormal data processing method, device, server and storage medium
CN113111078A (en) Resource data processing method and device, computer equipment and storage medium
CN113760920A (en) Data synchronization method and device, electronic equipment and storage medium
CN112131611A (en) Data correctness verification method, device, equipment, system and storage medium
CN111324668A (en) Database data synchronous processing method and device and storage medium

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