CN110572462A - Cross-network file sharing method, device, equipment and medium - Google Patents

Cross-network file sharing method, device, equipment and medium Download PDF

Info

Publication number
CN110572462A
CN110572462A CN201910859542.7A CN201910859542A CN110572462A CN 110572462 A CN110572462 A CN 110572462A CN 201910859542 A CN201910859542 A CN 201910859542A CN 110572462 A CN110572462 A CN 110572462A
Authority
CN
China
Prior art keywords
file
data exchange
uploading
exchange gateway
behavior
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.)
Pending
Application number
CN201910859542.7A
Other languages
Chinese (zh)
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.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream Technology 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 Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN201910859542.7A priority Critical patent/CN110572462A/en
Publication of CN110572462A publication Critical patent/CN110572462A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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 method, a device, equipment and a medium for cross-network file sharing, wherein the method comprises the following steps: monitoring the uploading behavior of the first data exchange gateway when uploading files to the central database, and judging whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior. Therefore, according to the method and the device, before the second data exchange gateway finishes downloading the target file of the current round, the first data exchange gateway starts the next round of uploading behavior, fragment transmission of the file is achieved, the file exchange rate is increased, and the file exchange efficiency is improved.

Description

Cross-network file sharing method, device, equipment and medium
Technical Field
The present application relates to the field of file sharing technologies, and in particular, to a method, an apparatus, a device, and a medium for cross-network file sharing.
Background
In the prior art, when a file is exchanged across departments and networks, a first department uploads all files to be shared to a first data exchange gateway, the first data exchange gateway uploads the files to a central database after the uploading of the files is finished, and the central database uploads the files to a second data exchange gateway after the files are downloaded, so that a second department can download the files from the second data exchange gateway. Because the method transmits all the files at one time, the file exchange time is too long and the exchange efficiency is low when the amount of the files to be exchanged is large or the files are large.
disclosure of Invention
in view of the above, an object of the present application is to provide a method, an apparatus, a device, and a medium for exchanging cross-network files, which can accelerate the exchange rate of the cross-network files, improve the exchange efficiency, and realize the collection of the exchanged files in the central management department. The specific scheme is as follows:
in a first aspect, the present application discloses a method for cross-network file exchange, which is applied to data exchange central control, and includes:
monitoring the uploading behavior of the first data exchange gateway when uploading files to the central database, and judging whether the uploading behavior of the current round meets the preset condition;
If so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
Optionally, before monitoring an uploading behavior when the first data exchange gateway uploads a file to the central database and determining whether the uploading behavior in the current round meets a preset condition, the method further includes:
And receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
optionally, the method for sharing a file across a network further includes:
Receiving a file list which is sent by the second data exchange gateway and is downloaded completely, and obtaining a second file list;
Judging whether the first file list is consistent with the second file list or not;
if so, the data download task is ended.
Optionally, after sending the file identification information corresponding to the current round of uploading to the second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database, the method further includes:
Monitoring the transmission behavior of the central database when the central database transmits the file to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the preset condition;
if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end.
Optionally, the monitoring an uploading behavior when the first data exchange gateway uploads the file to the central database, and determining whether the uploading behavior in the current round meets a preset condition includes:
monitoring the uploading behavior of the first data exchange gateway when uploading the small files to the central database, and judging whether the uploading behavior in the current round meets a first preset condition;
Or monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the uploading behavior of the current round meets a second preset condition;
The large file is a file with the file size exceeding a first preset file size threshold value; the small file is a file with a file size not exceeding the first preset file size threshold.
optionally, the monitoring of the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and determining whether the uploading behavior in the current round meets a second preset condition include:
monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the time length corresponding to the uploading behavior in the current round is equal to a first preset time length threshold value or not;
Or monitoring the uploading behavior when the first data exchange gateway uploads the large file to the central database, and judging whether the size of the uploaded file corresponding to the uploading behavior in the current round is equal to a second preset file size threshold value or not.
Optionally, the monitoring an uploading behavior when the first data exchange gateway uploads a large file to the central database, and determining whether an uploading file size corresponding to the uploading behavior in the current round is equal to a second preset file size threshold includes:
if the size of the uploaded file corresponding to the current round of uploading behavior is not equal to the second preset file size threshold, judging whether the time length corresponding to the current round of uploading behavior is equal to the second preset time length threshold or not;
and if the duration is equal to the second preset duration threshold, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway so as to trigger the second data exchange gateway to download the incremental fragment of the target file corresponding to the file identification information from the central database.
Optionally, the cross-network file sharing method further includes:
And controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform read operation and write operation on the same large file.
In a second aspect, the present application discloses an inter-network file sharing apparatus, including:
the uploading behavior monitoring module is used for monitoring the uploading behavior when the first data exchange gateway uploads the file to the central database;
The uploading behavior judging module is used for judging whether the uploading behavior of the current round meets the preset condition or not;
The information transmission module is used for sending the file identification information corresponding to the uploading behavior of the current round to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database when the judgment result of the uploading behavior judgment module is yes;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
In a third aspect, the present application discloses an inter-network file sharing device, including:
a memory and a processor;
Wherein the memory is used for storing a computer program;
The processor is configured to execute the computer program to implement the cross-network file sharing method disclosed above.
in a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the cross-network file sharing method disclosed above.
Therefore, the method and the device monitor the uploading behavior when the first data exchange gateway uploads the file to the central database, and judge whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior. Therefore, after the uploading behavior of monitoring that the first data exchange gateway uploads the file to the central database meets the preset condition, the uploading behavior informs the second data exchange gateway to start downloading the corresponding target file in the central database without waiting for all files to be uploaded to finish downloading, and before the target file is downloaded by the second data exchange gateway, the first data exchange gateway starts the next round of uploading behavior, so that the fragment transmission of the file is realized, the file exchange rate is accelerated, the file exchange efficiency is improved, the exchange file is landed on the central database, and the collection of the exchange file in the central department is realized.
Drawings
in order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a cross-network file sharing method disclosed herein;
FIG. 2 is a flowchart of a specific cross-network file sharing method disclosed herein;
FIG. 3 is a schematic diagram of a specific cross-network file sharing method disclosed herein;
FIG. 4 is a flowchart of a specific cross-network file sharing method disclosed herein;
FIG. 5 is a flowchart of a specific cross-network file sharing method disclosed herein;
FIG. 6 is a schematic structural diagram of a cross-network file sharing apparatus according to the present disclosure;
Fig. 7 is a structural diagram of a data exchange central control device disclosed in the present application.
Detailed Description
the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
at present, when a file exchange is performed across departments and networks, a first department uploads all files to be shared to a first data exchange gateway, the first data exchange gateway uploads the files to a central database after the file upload is finished, and the central database uploads the files to a second data exchange gateway after the files are downloaded, so that a second department can download the files from the second data exchange gateway. Because the method transmits all the files at one time, the file exchange time is too long and the exchange efficiency is low when the amount of the files to be exchanged is large or the files are large. In view of this, the present application provides a method for sharing a file across a network, which can implement fragment transmission of the file and collection of the exchanged file in a central management department, accelerate a file exchange rate, and improve a file exchange efficiency.
the embodiment of the application discloses a cross-network file sharing method, which is applied to data exchange central control and is shown in figure 1, and the method comprises the following steps:
Step S11: and monitoring the uploading behavior of the first data exchange gateway when uploading the files to the central database, and judging whether the uploading behavior of the current round meets the preset condition.
In this embodiment, the first data exchange gateway is an ETL tool (ETL, Extract-Transform-Load), and can exchange data tables and files.
it can be understood that, before the monitoring the uploading behavior of the first data exchange gateway when uploading the file to the central database, and determining whether the uploading behavior in this round meets the preset condition, the method further includes: when a destination end needs to acquire a file resource of a source end, a data central control receives a file sharing application from the destination end and issues a file exchange task to a first data exchange gateway and a second data exchange gateway which respectively correspond to the source end and the destination end; and the first data exchange gateway establishes a file exchange task and downloads the file to be shared from the source end. Wherein the file transfer is implemented by a file transfer protocol, including but not limited to FTP.
In this embodiment, the monitoring of the uploading behavior when the first data exchange gateway uploads the file to the central database includes monitoring the size of the file to be uploaded corresponding to the uploading behavior when the first data exchange gateway uploads the file to the central database and/or the duration corresponding to the uploading behavior. Correspondingly, whether the uploading behavior of the current round meets the preset conditions or not is judged, and the method comprises the following steps: judging whether the size of the uploaded file corresponding to the uploading behavior of the current round meets a preset condition or not; and/or judging whether the time length corresponding to the current round of uploading behavior meets a preset condition or not.
step S12: if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
After the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
In this embodiment, the file identification information includes, but is not limited to, a file name and a file size. Correspondingly, when the uploading behavior of the current round meets the preset condition, the file name and the file size corresponding to the uploading behavior of the current round are sent to a second data exchange gateway so as to trigger the second data exchange gateway to download the target file corresponding to the file name and the file size from the central database.
it can be understood that, in the above process, after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior, so that fragment transmission of the file is realized, the file exchange speed is accelerated, and the file exchange efficiency is improved.
in the embodiment, the collection of the exchange files in the central management department is realized through the disk dropping of the central database. Specifically, after downloading a file from the first data exchange gateway, the central database backs up and stores the file, and uploads the file to the second data exchange gateway, and the process of storing and backing up the file is file collection.
Further, the method for sharing a file across a network in this embodiment further includes: and controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform file reading operation and file writing operation.
in a first specific implementation manner, the controlling the first data exchange gateway and/or the second data exchange gateway to perform a file read operation and a file write operation simultaneously may specifically include: and controlling the first data exchange gateway to simultaneously perform file reading operation and file writing operation. Specifically, it may be understood that the first data exchange gateway is controlled to perform a file write operation while performing a file read operation, that is, the first data exchange gateway is controlled to download a file from a source end and upload the file to the central database.
In a second specific implementation manner, the controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform a file read operation and a file write operation may specifically include: and controlling the second data exchange gateway to simultaneously perform file reading operation and file writing operation. Specifically, it may be understood that the second data exchange gateway is controlled to perform a file write operation while performing a file read operation, that is, the second data exchange gateway is controlled to download a file from the central database, and upload the file to the destination.
In a third specific implementation, the controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform a file read operation and a file write operation may specifically include: and controlling the first data exchange gateway to simultaneously perform file reading operation and file writing operation, and controlling the second data exchange gateway to simultaneously perform file reading operation and file writing operation. Specifically, the first data exchange gateway is controlled to perform a file write operation while performing a file read operation, and the second data exchange gateway is also controlled to perform a file write operation while performing a file read operation, that is, the first data exchange gateway is controlled to upload a file to a central database while downloading the file from a source, and the second data exchange gateway is controlled to upload a file to a destination while downloading the file from the central database.
therefore, the method and the device monitor the uploading behavior when the first data exchange gateway uploads the file to the central database, and judge whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior. Therefore, after the uploading behavior of monitoring that the first data exchange gateway uploads the file to the central database meets the preset condition, the uploading behavior informs the second data exchange gateway to start downloading the corresponding target file in the central database without waiting for all files to be uploaded to finish downloading, and before the target file is downloaded by the second data exchange gateway, the first data exchange gateway starts the next round of uploading behavior, so that the fragment transmission of the file is realized, the file exchange rate is accelerated, the file exchange efficiency is improved, the exchange file is landed on the central database, and the collection of the exchange file in the central department is realized.
referring to fig. 2, an embodiment of the present application discloses a specific cross-network file sharing method applied to data exchange central control, where the method includes:
Step S21: and receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
it can be understood that after the first data exchange gateway creates a file exchange task, it establishes a file transmission connection with the source end, obtains a file list including all files to be shared, and synchronizes the file list to the data exchange central control to obtain a first file list. The file sharing method comprises the following steps that all files to be shared comprise large files and small files, wherein the large files are files with the file sizes exceeding a first preset file size threshold value; the small file is a file with a file size not exceeding the first preset file size threshold.
Step S22: and monitoring the uploading behavior of the first data exchange gateway when uploading the files to the central database, and judging whether the uploading behavior of the current round meets the preset condition.
Step S23: if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
Step S24: and monitoring the transmission behavior of the central database when the central database transmits the file to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the preset condition.
it can be understood that, after the second data exchange gateway finishes downloading the target file from the central database, the target file may be stored in the second data exchange gateway first, and then downloaded from the second data exchange gateway when the destination end needs; or the step of monitoring the transmission behavior when the central database transmits the file to the second data exchange gateway and judging whether the transmission behavior in the current round meets the preset condition can be executed, and the target file is directly uploaded to the destination. The preset condition is the same as the preset condition in step S22.
Step S25: if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end.
step S26: and receiving the downloaded file list sent by the second data exchange gateway to obtain a second file list.
It will be appreciated that the second list of files should include the same type of file information as the first list of files. For example, if the first file list only includes file names and file sizes, the second file list also includes only file names and file sizes.
step S27: and judging whether the first file list is consistent with the second file list.
step S28: if so, the data download task is ended.
It is to be understood that the ending of the data download task includes ending the data download task of the first data exchange gateway, the central database, and the second data exchange gateway.
As shown in fig. 3, the principle of cross-network file sharing disclosed by the present embodiment is demonstrated. Fig. 3 shows a complete cross-network file sharing process, where a source performs a first round of uploading on a first data exchange gateway, when the first round of uploading meets a preset condition, a data exchange central controller sends file identification information corresponding to the first round of uploading to a second data exchange gateway to trigger the second data exchange gateway to start downloading a target file corresponding to the first round of uploading, and when it is monitored that the act of downloading the target file by the second data exchange gateway meets the preset condition, the data exchange central controller triggers the second data exchange gateway to upload the target file corresponding to the first round of uploading to a destination. After the first round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts a second round of uploading behavior. In the figure, the dotted line indicates that the data exchange central controller obtains a file list including all files to be shared from the first data exchange gateway, and sends file identification information to the second data exchange gateway.
Referring to fig. 4, an embodiment of the present application discloses a specific cross-network file sharing method applied to data exchange central control, where the method includes:
Step S31: and receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
Step S32: and monitoring the uploading behavior of the first data exchange gateway when the first data exchange gateway uploads the small files to the central database, and judging whether the uploading behavior in the current round meets a first preset condition.
in this embodiment, the small file is a file whose file size does not exceed a first preset file size threshold.
in this embodiment, the determining whether the current round of uploading behavior meets the first preset condition may specifically include: and judging whether the number of the small files uploaded in the current round of uploading behavior is equal to a preset small file number threshold value or not.
In a specific embodiment, the preset small file number threshold may be 1, that is, when it is detected that the number of small files uploaded in the current round of uploading reaches 1, step S33 is executed.
in another specific embodiment, the preset number of small files may be N, where N is greater than or equal to 2, that is, when it is monitored that the number of small files uploaded in the current round of uploading reaches N, step S33 is executed. For example, when it is detected that the number of the small files uploaded in the current round of uploading reaches 3, step S33 is executed.
Step S33: if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
that is, after the small file is uploaded from the first data exchange gateway to the central database, the data exchange central control sends the file identification information of the small file to the second data exchange gateway to trigger the second data exchange gateway to download the small file from the central database.
Step S34: and monitoring the transmission behavior of the central database when transmitting the small files to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the first preset condition.
step S35: if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end.
step S36: and receiving the downloaded file list sent by the second data exchange gateway to obtain a second file list.
step S37: and judging whether the first file list is consistent with the second file list.
step S38: if so, the data download task is ended.
Referring to fig. 5, an embodiment of the present application discloses a specific cross-network file sharing method applied to data exchange central control, where the method includes:
Step S41: and receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
Step S42: and monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the uploading behavior of the current round meets a second preset condition.
In this embodiment, the large file is a file whose file size exceeds a first preset file size threshold. The command for uploading the file utilization to the central database by the first data exchange gateway includes but is not limited to an APPE command of FTP.
In a first specific embodiment, the monitoring an uploading behavior when the first data exchange gateway uploads a large file to the central database, and determining whether the uploading behavior in this round meets a second preset condition may include: and monitoring the uploading behavior of the first data exchange gateway when the first data exchange gateway uploads the large file to the central database, and judging whether the time length corresponding to the uploading behavior in the current round is equal to a first preset time length threshold value or not. Specifically, the uploading behavior of the first data exchange gateway when uploading the large file to the central database is monitored, and step S43 is executed as long as the time length corresponding to the uploading behavior in this round reaches the first preset time length threshold. For example, the uploading behavior of the first data exchange gateway when uploading a large file to the central database is monitored, and when the time duration corresponding to the uploading behavior reaches 3 minutes, step S43 is executed. When the time length corresponding to each round of uploading behavior reaches the first preset time length threshold value, the sizes of the files corresponding to each round of uploading behavior may be different, the method can reduce the judging times and save the file exchange time length.
In a second specific embodiment, the monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and determining whether the uploading behavior in the current round meets a second preset condition may include: and monitoring the uploading behavior when the first data exchange gateway uploads the large file to the central database, and judging whether the size of the uploaded file corresponding to the uploading behavior in the current round is equal to a second preset file size threshold value or not. For example, the uploading behavior of the first data exchange gateway when uploading a large file to the central database is monitored, and when the uploading file size corresponding to the uploading behavior in this round reaches 1Mb, step S43 is executed.
Step S43: if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
In this embodiment, when the monitoring of the uploading behavior of the first data exchange gateway when uploading a large file to the central database and the determining of whether the uploading behavior of the current round meets the second preset condition include monitoring the uploading behavior of the first data exchange gateway when uploading a large file to the central database and determining whether the size of the uploaded file corresponding to the uploading behavior of the current round is equal to the second preset file size threshold, if the size of the uploaded file corresponding to the uploading behavior of the current round is not equal to the second preset file size threshold, determining whether the time duration corresponding to the uploading behavior of the current round is equal to the second preset time duration threshold; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; if not, continuing to monitor and judge until the size of the file corresponding to the current round of uploading behavior is equal to a second preset file size threshold, or the duration corresponding to the current round of uploading behavior is equal to a second preset duration threshold, so as to trigger the second data exchange gateway to download the incremental segment of the target file corresponding to the file identification information from the central database, thereby avoiding the problem of file exchange time extension caused by the situation that the size of the uploaded file corresponding to the last round of uploading behavior does not reach the second preset file size threshold, saving the file exchange time, and accelerating the file exchange speed.
In this embodiment, the command used by the second data exchange gateway in the process of downloading the target file from the central database includes, but is not limited to, a REST/RETR command of FTP.
step S44: and monitoring the transmission behavior of the central database when the central database transmits the large file to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the second preset condition.
step S45: if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end. .
in this embodiment, the command used by the destination to download the target file from the second data switching gateway includes, but is not limited to, an ape command of an FTP protocol.
Step S46: and receiving the downloaded file list sent by the second data exchange gateway to obtain a second file list.
Step S47: and judging whether the first file list is consistent with the second file list.
step S48: if so, the data download task is ended.
further, the cross-network file sharing method described in this embodiment further includes: and controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform read operation and write operation on the same large file.
In a first specific implementation manner, the first data exchange gateway is controlled to perform read operation and write operation on the same large file at the same time. Specifically, when the transmission of the large file adopts fragment transmission, if the first round of uploading behavior and the second round of uploading behavior transmit the same large file fragment, after the first round of uploading behavior meets the second preset condition, the first data exchange gateway downloads the target file corresponding to the second round of uploading behavior from the source end, and simultaneously uploads the target file corresponding to the first round of uploading behavior to the central database, so that the first data exchange gateway can simultaneously read and write the same large file.
In a second specific implementation manner, the second data exchange gateway is controlled to perform read operation and write operation on the same large file at the same time. Specifically, when the transmission of the large file adopts fragment transmission, if the first round of uploading behavior and the second round of uploading behavior transmit the same fragment of the large file, after the first round of uploading behavior meets the second preset condition, the second data exchange gateway downloads the target file corresponding to the second round of uploading behavior from the central database, and simultaneously uploads the target file corresponding to the first round of uploading behavior to the destination, so that the second data exchange gateway simultaneously reads and writes the same large file.
In a third specific implementation manner, the first data exchange gateway and the second data exchange gateway are controlled to simultaneously perform read operation and write operation on the same large file. Specifically, when the transmission of the large file adopts the fragment transmission, if the first round uploading action, the second round uploading action, the third round uploading action and the fourth round uploading action transmit the same fragment of the large file, after the first round of uploading behavior, the second round of uploading behavior and the third round of uploading behavior all meet the second preset condition, the second data exchange gateway downloads the target file corresponding to the second round of uploading behavior from the central database and uploads the target file corresponding to the first round of uploading behavior to the destination terminal, when the first data exchange gateway downloads the target file corresponding to the fourth uploading behavior from the source end, and uploading the target file corresponding to the third uploading behavior to the central database, so that the first data exchange gateway and the second data exchange gateway can simultaneously read and write the same large file.
Referring to fig. 6, an embodiment of the present application discloses an inter-network file sharing apparatus, including:
the uploading behavior monitoring module 11 is configured to monitor an uploading behavior when the first data exchange gateway uploads a file to the central database;
the uploading behavior judging module 12 is configured to judge whether the uploading behavior of the current round meets a preset condition;
the information transmission module 13 is configured to send file identification information corresponding to the current round of uploading behavior to a second data exchange gateway when the judgment result of the uploading behavior judgment module is yes, so as to trigger the second data exchange gateway to download a target file corresponding to the file identification information from the central database;
After the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
Therefore, the method and the device monitor the uploading behavior when the first data exchange gateway uploads the file to the central database, and judge whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior. Therefore, after the uploading behavior of monitoring that the first data exchange gateway uploads the file to the central database meets the preset condition, the uploading behavior informs the second data exchange gateway to start downloading the corresponding target file in the central database without waiting for all files to be uploaded to finish downloading, and before the target file is downloaded by the second data exchange gateway, the first data exchange gateway starts the next round of uploading behavior, so that the fragment transmission of the file is realized, the file exchange rate is accelerated, the file exchange efficiency is improved, the exchange file is landed on the central database, and the collection of the exchange file in the central department is realized.
Further, in this embodiment, the inter-network file sharing apparatus further includes:
The first file list acquisition module is used for receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list;
A second file list obtaining module, configured to receive a file list that is sent by the second data exchange gateway and has been downloaded, and obtain a second file list;
The file list judging module is used for judging whether the first file list is consistent with the second file list or not;
and the download ending module is used for ending the data download task when the judgment result of the file list judgment module is yes.
Further, an embodiment of the present application also discloses a cross-network file sharing device, where the cross-network file sharing device may be a data exchange central control device 20 as shown in fig. 7, and the data exchange central control device may specifically include, but is not limited to, a computer and the like.
Generally, the data exchange central control device 20 in this embodiment includes: a processor 21 and a memory 22.
Wherein the memory 22 is used for storing a computer program;
the processor 21 is configured to execute the computer program to implement the cross-network file sharing method disclosed in the foregoing embodiment.
the processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, and so on. The processor 21 may be implemented by at least one hardware of a DSP (digital signal processing), an FPGA (field-programmable gate array), and a PLA (programmable logic array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (graphics processing unit) which is responsible for rendering and drawing images to be displayed on the display screen. In some embodiments, the processor 21 may include an AI (artificial intelligence) processor for processing a calculation operation related to machine learning.
Memory 22 may include one or more computer-readable storage media, which may be non-transitory. Memory 22 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used for storing the following computer program 221, wherein after being loaded and executed by the processor 21, the computer program can realize the method steps executed by the data exchange central control disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 22 may also include an operating system 222, data 223, and the like, and the storage manner may be a transient storage or a permanent storage. The operating system 222 may be Windows, Unix, Linux, or the like. Data 223 may include a wide variety of data.
in some embodiments, the data exchange central control device 20 may further include a display 23, an input/output interface 24, a communication interface 25, a sensor 26, a power supply 27, and a communication bus 28.
Those skilled in the art will appreciate that the architecture shown in fig. 7 does not constitute a limitation of the data exchange central control device 20 and may include more or fewer components than those shown.
Further, an embodiment of the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the following steps:
Monitoring the uploading behavior of the first data exchange gateway when uploading files to the central database, and judging whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
Therefore, the method and the device monitor the uploading behavior when the first data exchange gateway uploads the file to the central database, and judge whether the uploading behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database; after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior. Therefore, after the uploading behavior of monitoring that the first data exchange gateway uploads the file to the central database meets the preset condition, the uploading behavior informs the second data exchange gateway to start downloading the corresponding target file in the central database without waiting for all files to be uploaded to finish downloading, and before the target file is downloaded by the second data exchange gateway, the first data exchange gateway starts the next round of uploading behavior, so that the fragment transmission of the file is realized, the file exchange rate is accelerated, the file exchange efficiency is improved, the exchange file is landed on the central database, and the collection of the exchange file in the central department is realized.
in this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: receiving a file list which is sent by the second data exchange gateway and is downloaded completely, and obtaining a second file list; judging whether the first file list is consistent with the second file list or not; if so, the data download task is ended.
in this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: monitoring the transmission behavior of the central database when the central database transmits the file to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the preset condition; if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: monitoring the uploading behavior of the first data exchange gateway when uploading the small files to the central database, and judging whether the uploading behavior in the current round meets a first preset condition; the small file is a file with a file size not exceeding a first preset file size threshold.
in this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the uploading behavior of the current round meets a second preset condition; the large file is a file with the file size exceeding a first preset file size threshold value.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and monitoring the uploading behavior of the first data exchange gateway when the first data exchange gateway uploads the large file to the central database, and judging whether the time length corresponding to the uploading behavior in the current round is equal to a first preset time length threshold value or not.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and monitoring the uploading behavior when the first data exchange gateway uploads the large file to the central database, and judging whether the size of the uploaded file corresponding to the uploading behavior in the current round is equal to a second preset file size threshold value or not.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: if the size of the uploaded file corresponding to the current round of uploading behavior is not equal to the second preset file size threshold, judging whether the time length corresponding to the current round of uploading behavior is equal to the second preset time length threshold or not; and if the duration is equal to the second preset duration threshold, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway so as to trigger the second data exchange gateway to download the incremental fragment of the target file corresponding to the file identification information from the central database.
in this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform read operation and write operation on the same large file.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further 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 other 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 phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, apparatus, device, and medium for cross-network file sharing provided by the present application are described in detail above, and a specific example is applied in the present application to illustrate the principle and implementation manner of the present application, and the description of the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A cross-network file sharing method is characterized by being applied to data exchange central control and comprising the steps of monitoring uploading behaviors when a first data exchange gateway uploads files to a central database, and judging whether the uploading behaviors in the current round meet preset conditions or not;
If so, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database;
after the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
2. The method according to claim 1, wherein before monitoring an upload behavior of the first data exchange gateway when uploading a file to the central database and determining whether the upload behavior in the current round meets a preset condition, the method further comprises:
and receiving a file list which is synchronous with the first data exchange gateway and comprises all files to be uploaded to obtain a first file list.
3. The cross-network file sharing method according to claim 2, further comprising:
Receiving a file list which is sent by the second data exchange gateway and is downloaded completely, and obtaining a second file list;
Judging whether the first file list is consistent with the second file list or not;
If so, the data download task is ended.
4. the method according to claim 1, wherein after sending the file identification information corresponding to the current round of uploading to the second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database, the method further comprises:
monitoring the transmission behavior of the central database when the central database transmits the file to the second data exchange gateway, and judging whether the transmission behavior of the current round meets the preset condition;
if so, sending the file identification information corresponding to the transmission behavior of the current round to a destination end so as to trigger the second data exchange gateway to upload the target file corresponding to the file identification information to the destination end.
5. the method according to any one of claims 1 to 4, wherein the monitoring of the uploading behavior of the first data exchange gateway when uploading the file to the central database and the determining whether the uploading behavior in the current round meets the preset condition comprises:
Monitoring the uploading behavior of the first data exchange gateway when uploading the small files to the central database, and judging whether the uploading behavior in the current round meets a first preset condition;
Or monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the uploading behavior of the current round meets a second preset condition;
The large file is a file with the file size exceeding a first preset file size threshold value; the small file is a file with a file size not exceeding the first preset file size threshold.
6. The method according to claim 5, wherein the monitoring of the uploading behavior of the first data exchange gateway when uploading the large file to the central database and the determining whether the uploading behavior in the current round meets a second preset condition comprises:
Monitoring the uploading behavior of the first data exchange gateway when uploading the large file to the central database, and judging whether the time length corresponding to the uploading behavior in the current round is equal to a first preset time length threshold value or not;
or monitoring the uploading behavior when the first data exchange gateway uploads the large file to the central database, and judging whether the size of the uploaded file corresponding to the uploading behavior in the current round is equal to a second preset file size threshold value or not.
7. The method according to claim 6, wherein the monitoring an uploading behavior of the first data exchange gateway when uploading the large file to the central database, and determining whether an uploading file size corresponding to the uploading behavior in the current round is equal to a second preset file size threshold comprises:
If the size of the uploaded file corresponding to the current round of uploading behavior is not equal to the second preset file size threshold, judging whether the time length corresponding to the current round of uploading behavior is equal to the second preset time length threshold or not;
And if the duration is equal to the second preset duration threshold, sending the file identification information corresponding to the current round of uploading to a second data exchange gateway so as to trigger the second data exchange gateway to download the incremental fragment of the target file corresponding to the file identification information from the central database.
8. The cross-network file sharing method according to claim 7, further comprising:
And controlling the first data exchange gateway and/or the second data exchange gateway to simultaneously perform read operation and write operation on the same large file.
9. An apparatus for cross-network file sharing, comprising:
The uploading behavior monitoring module is used for monitoring the uploading behavior when the first data exchange gateway uploads the file to the central database;
The uploading behavior judging module is used for judging whether the uploading behavior of the current round meets the preset condition or not;
the information transmission module is used for sending the file identification information corresponding to the uploading behavior of the current round to a second data exchange gateway to trigger the second data exchange gateway to download the target file corresponding to the file identification information from the central database when the judgment result of the uploading behavior judgment module is yes;
After the current round of uploading behavior meets the preset condition and before the second data exchange gateway finishes downloading the target file, the first data exchange gateway starts the next round of uploading behavior.
10. A cross-network file sharing device, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
The processor is configured to execute the computer program to implement the cross-network file sharing method according to any one of claims 1 to 8.
11. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the cross-network file sharing method of any one of claims 1 to 8.
CN201910859542.7A 2019-09-11 2019-09-11 Cross-network file sharing method, device, equipment and medium Pending CN110572462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910859542.7A CN110572462A (en) 2019-09-11 2019-09-11 Cross-network file sharing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910859542.7A CN110572462A (en) 2019-09-11 2019-09-11 Cross-network file sharing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN110572462A true CN110572462A (en) 2019-12-13

Family

ID=68779335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910859542.7A Pending CN110572462A (en) 2019-09-11 2019-09-11 Cross-network file sharing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110572462A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347050A (en) * 2020-10-27 2021-02-09 杭州安恒信息技术股份有限公司 File cross-network transmission method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110217954A1 (en) * 2010-03-03 2011-09-08 Htc Corporation Method, system, and mobile device for managing messages and computer-readable medium using the method
CN103139241A (en) * 2011-11-24 2013-06-05 腾讯科技(深圳)有限公司 Off-line download system and method for network resource files
CN103414793A (en) * 2013-09-04 2013-11-27 广东全通教育股份有限公司 Picture downloading and uploading device and method
CN103581230A (en) * 2012-07-26 2014-02-12 深圳市腾讯计算机系统有限公司 File transmission system and method, receiving end and sending end
CN105635287A (en) * 2015-12-31 2016-06-01 深圳市网心科技有限公司 File transmission system and method
CN110035307A (en) * 2019-03-08 2019-07-19 视联动力信息技术股份有限公司 A kind of fragment storage method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110217954A1 (en) * 2010-03-03 2011-09-08 Htc Corporation Method, system, and mobile device for managing messages and computer-readable medium using the method
CN103139241A (en) * 2011-11-24 2013-06-05 腾讯科技(深圳)有限公司 Off-line download system and method for network resource files
CN103581230A (en) * 2012-07-26 2014-02-12 深圳市腾讯计算机系统有限公司 File transmission system and method, receiving end and sending end
CN103414793A (en) * 2013-09-04 2013-11-27 广东全通教育股份有限公司 Picture downloading and uploading device and method
CN105635287A (en) * 2015-12-31 2016-06-01 深圳市网心科技有限公司 File transmission system and method
CN110035307A (en) * 2019-03-08 2019-07-19 视联动力信息技术股份有限公司 A kind of fragment storage method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347050A (en) * 2020-10-27 2021-02-09 杭州安恒信息技术股份有限公司 File cross-network transmission method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
DE102016104260B4 (en) Intelligent update of mobile applications
CN102664950B (en) Data communication method between welding power sources and computers
CN110493028A (en) A kind of clustered deploy(ment) method, system, device and computer readable storage medium
CN103634406A (en) File synchronization method and terminal thereof
CN107948097B (en) Bandwidth adjusting method and equipment
EP3267323A1 (en) Thin client system, connection management device, virtual machine operating device, method, and storage medium
CN103473343A (en) File management method, device and terminal
WO2017036183A1 (en) Differential upgrade package processing method and device, upgrade method, system and device
CN108280174A (en) Front end file construction method and server, page access method and terminal
CN107798039A (en) A kind of method of data synchronization and device
CN110572462A (en) Cross-network file sharing method, device, equipment and medium
CN111449572A (en) Cleaning robot control method and device, storage medium and cleaning robot
CN108228812A (en) Adaptive host node switching method and device
CN110113495A (en) Long-range control method, device, electronic equipment and the system of APP
CN111177160B (en) Service updating method, device, server and medium
CN109889456B (en) Data transmission method, device, equipment, system and storage medium
CN104717248B (en) File network sharing method, server and terminal
WO2023287357A2 (en) Data transmission method, node and system
CN112653717B (en) Multi-cloud cooperation distributed system and application distribution method
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN111126604A (en) Model training method, device, server and storage medium
CN113157611A (en) Data transmission control method, device, equipment and readable storage medium
CN111831380A (en) Task execution method and device, storage medium and electronic device
CN102571977B (en) Method and device for transmitting CDL files, and method and device for determining data integrity
JP6544340B2 (en) Display system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213

RJ01 Rejection of invention patent application after publication