CN115022307A - File downloading method and device, storage medium and electronic equipment - Google Patents

File downloading method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115022307A
CN115022307A CN202210883523.XA CN202210883523A CN115022307A CN 115022307 A CN115022307 A CN 115022307A CN 202210883523 A CN202210883523 A CN 202210883523A CN 115022307 A CN115022307 A CN 115022307A
Authority
CN
China
Prior art keywords
file
file information
record
information record
target
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
CN202210883523.XA
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.)
Bank of China Financial Technology Co Ltd
Original Assignee
Bank of China Financial 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 Bank of China Financial Technology Co Ltd filed Critical Bank of China Financial Technology Co Ltd
Priority to CN202210883523.XA priority Critical patent/CN115022307A/en
Publication of CN115022307A publication Critical patent/CN115022307A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a file downloading method and a device, which can be applied to the financial field or other fields, wherein each optional file information record in a file record table can be determined, the file record table is obtained according to a downloading directory file list in an FTP server, and each optional file information record is a file information record in a state to be downloaded; selecting a target file information record which is not locked currently from all the alternative file information records; and locking the target file information record by using a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server, wherein the record lock corresponding to the target FTP client is used for locking the file information record so as to prevent the FTP clients except the target FTP client in the FTP client cluster from operating the file information record, thereby avoiding the problem caused by repeated downloading of the same file by a plurality of FTP clients.

Description

File downloading method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a file downloading method and apparatus, a storage medium, and an electronic device.
Background
At present, in order to improve the efficiency of File transfer between system devices, File Transfer Protocol (FTP) is generally used for File transfer between system devices. Specifically, after an FTP client is connected to an FTP server, a file list of a remote directory is obtained from the FTP server, and all files in the list are downloaded from the server.
In the prior art, in order to improve the file downloading efficiency, a plurality of FTP clients are usually provided to download files from an FTP server at the same time, but in the case of a plurality of FTP clients, a situation that a plurality of clients download one remote file at the same time is easy to occur, and the files are repeatedly processed by a plurality of nodes, so that problems of file coverage, I/O errors and the like are caused.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a file downloading method, which can avoid the problem that the same file is repeatedly downloaded by a plurality of FTP clients at the same time.
The invention also provides a file downloading device used for ensuring the realization and the application of the method in practice.
A file downloading method is applied to a target FTP client in an FTP client cluster, and comprises the following steps:
responding to a file downloading instruction, determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded;
selecting a target file information record which is not locked currently from all the alternative file information records;
and locking the target file information record by applying a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server.
Optionally, the determining information records of the optional files in the file record table of the FTP client cluster includes:
acquiring a file record table of the FTP client cluster;
determining the state of each file information record in the file record table;
and for each file information record, determining the file information record as alternative file information under the condition that the state of the file information record is a to-be-downloaded state.
Optionally, the obtaining the file record table of the FTP client cluster includes:
acquiring parameters of the FTP server;
after communication connection is established with the FTP server according to the parameters of the FTP server, a first instruction is sent to the FTP server through the communication connection, so that a download directory file list of the FTP server is obtained from the FTP server;
and obtaining a file record table of the FTP client according to the file information of each file in the download directory file list.
Optionally, the selecting a currently unlocked target file information record from the candidate file information records includes:
sequentially selecting each alternative file information record in the file record table, and determining whether the selection is successful;
and when any one of the alternative file information records in the file record table is selected successfully, determining the currently and successfully selected alternative information record as the currently unlocked target file information record.
Optionally, the method further includes, after downloading the file corresponding to the target file information record from the FTP server, that:
and if the file download failure corresponding to the target file information record is detected, unlocking the target file information record, and selecting a new target file information record which is not locked currently from the alternative file information records again.
A file downloading device applied to a target FTP client in an FTP client cluster, the device comprises:
the determining unit is used for responding to a file downloading instruction and determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded;
the selecting unit is used for selecting the target file information record which is not locked currently from the alternative file information records;
and the downloading unit is used for locking the target file information record by using the record lock corresponding to the target FTP client and downloading the file corresponding to the target file information record from the FTP server.
The above apparatus, optionally, the determining unit includes:
the acquisition subunit is used for acquiring a file record table of the FTP client cluster;
a first determining subunit, configured to determine a state of each file information record in the file record table;
and the second determining subunit is used for determining the file information record as the alternative file information under the condition that the state of the file information record is the state to be downloaded for each file information record.
The above apparatus, optionally, the obtaining subunit includes:
the acquisition component is used for acquiring parameters of the FTP server;
the first execution component is used for sending a first instruction to the FTP server through the communication connection after the communication connection is established with the FTP server according to the parameters of the FTP server so as to obtain a download directory file list of the FTP server from the FTP server;
and the second execution component is used for obtaining a file record table of the FTP client according to the file information of each file in the download directory file list.
The above apparatus, optionally, the selecting unit includes:
the selecting subunit is used for sequentially selecting each alternative file information record in the file record table and determining whether the selection is successful;
and the third determining subunit is configured to, when any one of the candidate file information records in the file record table is successfully selected, determine the currently successfully selected candidate information record as the currently unlocked target file information record.
A storage medium comprising storage instructions, wherein the instructions, when executed, control a device on which the storage medium is located to perform the file download method as described above.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the file download method as described above.
Based on the file downloading method and device, the storage medium and the electronic equipment provided by the implementation of the invention, the method comprises the following steps: responding to a file downloading instruction, determining each alternative file information record in a file record table of an FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded; selecting a target file information record which is not locked currently from all the alternative file information records; and locking the target file information record by applying a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from an FTP server, wherein the record lock corresponding to the target FTP client is used for locking the file information record so as to prevent the FTP clients except the target FTP client in the FTP client cluster from operating the file information record, thereby avoiding the problem caused by repeated downloading of the same file by a plurality of FTP clients.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, 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 method for downloading a file according to the present invention;
FIG. 2 is a flow chart of a process for determining alternative file information records according to the present invention;
FIG. 3 is a flowchart of a process for selecting a currently unlocked target file information record according to the present invention;
FIG. 4 is a schematic structural diagram of a file downloading device according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention;
fig. 6 is an exemplary diagram of an implementation scenario provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the prior art, in order to improve the file downloading efficiency, a plurality of FTP clients are usually provided to download files from an FTP server at the same time, but in the case of a plurality of FTP clients, a situation that a plurality of clients download one remote file at the same time is easy to occur, and the files are repeatedly processed by a plurality of nodes, so that problems of file coverage, I/O errors and the like are caused.
Based on this, an embodiment of the present invention provides a file downloading method, where the method may be applied to an electronic device, the electronic device may be a target FTP client in an FTP client cluster, the FTP cluster includes multiple FTP clients, and the target FTP client may be any one of the FTP clients in the FTP cluster, and a flowchart of the method is shown in fig. 1, and specifically includes:
s101: and responding to a file downloading instruction, and determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded.
In this embodiment, the download directory file list obtains file information of each file that may include a download directory in the FTP server; in some embodiments, the download directory file list may be compared with the initial file record list to determine a new file information record in the to-be-downloaded file directory file list, and the new file information record in the to-be-downloaded target file list is inserted into the initial file record to obtain the file information record.
S102: and selecting the target file information record which is not locked currently from the alternative file information records.
In this embodiment, after the candidate file information is allocated to each FTP client, the FTP client may lock the allocated candidate file information, so that it is possible to avoid that other FTP clients select the allocated candidate file information to download files.
S103: and locking the target file information record by applying a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server, wherein the record lock corresponding to the target FTP client is used for locking the file information record.
In this embodiment, the record lock may be an ORACLE row level lock, which locks only the row being accessed. When a row lock is used, other users may update data in the same table outside of the row. The row-level lock is an exclusive lock, and is used to prevent other transactions from modifying the row, that is, the record lock may be used to prevent FTP clients in the FTP client cluster other than the target FTP client from downloading files by using the target file information record.
In this embodiment, each FTP client has its own corresponding record lock, and after a target FTP client locks a target file information record, it can be prevented that FTP clients in the FTP client cluster other than the target FTP client operate the target file information record, so that the problem that the same file is repeatedly downloaded by multiple FTP clients at the same time can be avoided.
In an embodiment provided by the present invention, based on the above scheme, specifically, the determining a process of information record of each candidate file in a file record table of the FTP client cluster specifically includes, as shown in fig. 2:
s201: and acquiring a file record table of the FTP client cluster.
In this embodiment, the file record table may be obtained from a shared database of the FTP client cluster.
S202: determining the state of each file information record in the file record table.
In this embodiment, a preset status field in the file record table may be read, so as to determine the status of each file information record in the file record table.
S203: and for each file information record, determining the file information record as alternative file information under the condition that the state of the file information record is a to-be-downloaded state.
In this embodiment, the file corresponding to the candidate file information is a file to be downloaded in the FTP server.
In an embodiment provided by the present invention, based on the above scheme, specifically, the obtaining a file record table of the FTP client cluster includes:
acquiring parameters of the FTP server;
after communication connection is established with the FTP server according to the parameters of the FTP server, a first instruction is sent to the FTP server through the communication connection, so that a download directory file list of the FTP server is obtained from the FTP server;
and obtaining a file record table of the FTP client according to the file information of each file in the download directory file list.
In this embodiment, the first instruction may be a LIST instruction, which is used to LIST file information in the ftp server specified directory and return the file information to the client. The parameters of the FTP server may include an IP address, username, password, download directory, etc.
In this embodiment, the download directory file list may be compared with the file record table to be updated to obtain a comparison result, the file information record that is recorded in the download directory file list and does not exist in the file record to be updated is determined according to the comparison result, the file information record is inserted into the file record table to be updated to obtain the file record table, and the file record table to be updated may be an initial file record table.
In an embodiment provided by the present invention, based on the above scheme, specifically, the selecting, from the candidate file information records, a target file information record that is not currently locked includes, as shown in fig. 3:
s301: and sequentially selecting each alternative file information record in the file record table, and determining whether the selection is successful.
In this embodiment, the selection operation may be sequentially performed on each file information record in the file record table, and if the preset error reporting information is detected, it is determined that the selection is failed, otherwise, it is determined that the selection is successful.
S302: and when any one of the alternative file information records in the file record table is selected successfully, determining the currently and successfully selected alternative information record as the currently unlocked target file information record.
By applying the method provided by the embodiment of the invention, the target file information record which is not locked by other FTP clients can be selected, and the condition that a plurality of FTP clients simultaneously acquire the same target file information record can be avoided.
In an embodiment of the present invention, based on the above scheme, specifically, after downloading the file corresponding to the target file information record from the FTP server, the method further includes:
and if the file download failure corresponding to the target file information record is detected, unlocking the target file information record, and selecting a new target file information record which is not locked currently from the alternative file information records again.
In some embodiments, if it is detected that the file download corresponding to the target file information record fails, the next candidate file information record of the target file information record may be continuously selected until a new target file information record is obtained.
In some embodiments, if it is detected that the file corresponding to the target file information record is successfully downloaded, a migration instruction may be sent to the FTP server, so that the FTP server migrates the file corresponding to the target file information record to a preset backup directory, and updates the state of the target file information record in the file record table, where the updated state of the target file information record indicates that the file corresponding to the target file information record has been downloaded.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a file downloading apparatus, which is used for implementing the method in fig. 1 specifically, the file downloading apparatus provided in the embodiment of the present invention may be applied to an electronic device, and a schematic structural diagram of the file downloading apparatus is shown in fig. 4, and specifically includes:
a determining unit 401, configured to determine, in response to a file download instruction, each alternative file information record in a file record table of the FTP client cluster, where the file record table is obtained according to a download directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded;
a selecting unit 402, configured to select, from the candidate file information records, a target file information record that is not currently locked;
a downloading unit 403, configured to lock the target file information record by using a record lock corresponding to the target FTP client, and download a file corresponding to the target file information record from an FTP server.
In an embodiment provided by the present invention, based on the above scheme, specifically, the determining unit includes:
the acquisition subunit is used for acquiring a file record table of the FTP client cluster;
a first determining subunit, configured to determine a state of each file information record in the file record table;
and the second determining subunit is used for determining the file information record as the alternative file information under the condition that the state of the file information record is the state to be downloaded for each file information record.
In an embodiment provided by the present invention, based on the above scheme, specifically, the obtaining subunit includes:
the acquisition component is used for acquiring parameters of the FTP server;
the first execution component is used for sending a first instruction to the FTP server through the communication connection after the communication connection is established with the FTP server according to the parameters of the FTP server so as to obtain a download directory file list of the FTP server from the FTP server;
and the second execution component is used for obtaining a file record table of the FTP client according to the file information of each file in the download directory file list.
In an embodiment provided by the present invention, based on the above scheme, specifically, the selecting unit includes:
the selecting subunit is used for sequentially selecting each alternative file information record in the file record table and determining whether the selection is successful;
and the third determining subunit is configured to, when any one of the candidate file information records in the file record table is successfully selected, determine the currently successfully selected candidate information record as the currently unlocked target file information record.
The specific principle and the implementation process of each unit and each module in the file downloading device disclosed in the above embodiment of the present invention are the same as those of the file downloading method disclosed in the above embodiment of the present invention, and reference may be made to corresponding parts in the file downloading method provided in the above embodiment of the present invention, which are not described herein again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the file downloading method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
responding to a file downloading instruction, determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a to-be-downloaded state;
selecting a target file information record which is not locked currently from all the alternative file information records;
and locking the target file information record by applying a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server.
Referring to fig. 6, an exemplary implementation scenario provided for the embodiment of the present invention is shown, which includes a plurality of FTP clients and an FTP server, wherein the plurality of FTP clients can download files from the FTP server. For any FTP client, determining the FTP client as a target client, firstly determining each alternative file information record in a file record table of an FTP client cluster by the target client, and then selecting the target file information record which is not locked currently from each alternative file information record; and finally, locking the target file information record by using a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server.
In some embodiments, a file download system is deployed in each FTP client, comprising: the file list storage module and the file downloading module poll all files in a remote directory of the FTP server, inquire whether the files exist in a file record list or not according to file names, and insert the newly added files into the file name record list if the files do not exist in the file record list. The file downloading module inquires the file to be downloaded in the record table, and locks the record of the table to ensure that only the node downloads the file, so that the problems of coverage and the like caused by downloading the file by a plurality of nodes are avoided.
In this embodiment, an FTP client node information configuration table FTPCLIENTHOSTINFO may be established. Inserting all FTP cluster client nodes into a table, as shown in table 1 specifically:
Figure BDA0003765153110000101
Figure BDA0003765153110000111
TABLE 1
The file record table FILERECORD in this embodiment is shown in table 2:
Figure BDA0003765153110000112
TABLE 2
And the file list storage module (resident process) is used for inquiring the download service configuration table FTPDOWNLOADCONF to obtain the parameters of the remote FTP server, including an IP address, a user name, a password, a remote directory and the like. After the FTP client is connected with the FTP server through the parameters, a remote directory file LIST is obtained through an LIST instruction, whether files in the LIST exist in a file record table FILERORD or not is inquired one by one, if the files do not exist, the file information is inserted into a database file record table, and the file state is 'W-to-be-downloaded'. The module is a resident process, and is restarted after the FTP server is connected after the file list is processed.
And the file downloading module (resident process) is used for inquiring all records with the FILECORD file record table state of W-to-be-downloaded. And (3) circulating treatment: for update operation locks a file record, if "ORA-00054" is reported in error (indicating that the record is busy with resources and is being downloaded by other nodes), processing continues with the next record. If not, the FTP parameter in the FTPDOWNLOADCONF table is inquired through server _ IP to be connected to a remote server, a corresponding file is downloaded from a remote directory, after the file is downloaded, the remote file is moved into a backup directory, the file state is updated to be F-download completion, and the lock is released after the update is submitted. And (5) resident process, after downloading is finished, inquiring the W-file to be downloaded in the file record table again for processing.
In this embodiment, if the downloading process reports an error, for example, the remote server is abnormally connected, the row lock is automatically released, and the next record is processed continuously.
It should be noted that the file downloading method and device provided by the invention can be used in the fields of artificial intelligence, block chain, distribution, cloud computing, big data, internet of things, mobile internet, network security, chip, virtual reality, augmented reality, holography, quantum computing, quantum communication, quantum measurement, digital twinning, and finance. The foregoing is merely an example, and does not limit the application field of the file downloading method and apparatus provided by the present invention.
It should be noted that, in this specification, each embodiment is described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same as and similar to each other in each embodiment may be referred to. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The foregoing describes in detail a file downloading method provided by the present invention, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the foregoing examples are only used to help understanding the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, 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 invention.

Claims (10)

1. A file downloading method is applied to a target FTP client in an FTP client cluster, and comprises the following steps:
responding to a file downloading instruction, determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded;
selecting a current unlocked target file information record from all the alternative file information records;
and locking the target file information record by applying a record lock corresponding to the target FTP client, and downloading a file corresponding to the target file information record from the FTP server.
2. The method according to claim 1, wherein said determining each alternative file information record in the file record table of the FTP client cluster comprises:
acquiring a file record table of the FTP client cluster;
determining the state of each file information record in the file record table;
and for each file information record, determining the file information record as alternative file information under the condition that the state of the file information record is a to-be-downloaded state.
3. The method according to claim 2, wherein the obtaining the file record table of the FTP client cluster comprises:
acquiring parameters of the FTP server;
after communication connection is established with the FTP server according to the parameters of the FTP server, a first instruction is sent to the FTP server through the communication connection, so that a download directory file list of the FTP server is obtained from the FTP server;
and obtaining a file record table of the FTP client according to the file information of each file in the download directory file list.
4. The method according to claim 1, wherein said selecting a currently unlocked target file information record from among the candidate file information records comprises:
sequentially selecting each alternative file information record in the file record table, and determining whether the selection is successful;
and when any one of the alternative file information records in the file record table is selected successfully, determining the currently and successfully selected alternative information record as the currently unlocked target file information record.
5. The method according to claim 1, wherein after downloading the file corresponding to the target file information record from the FTP server, further comprising:
and if the file download failure corresponding to the target file information record is detected, unlocking the target file information record, and selecting a new target file information record which is not locked currently from the alternative file information records again.
6. A file download apparatus, for a target FTP client in a cluster of FTP clients, the apparatus comprising:
the determining unit is used for responding to a file downloading instruction and determining each alternative file information record in a file record table of the FTP client cluster, wherein the file record table is obtained according to a downloading directory file list in the FTP server, and each alternative file information record is a file information record in a state to be downloaded;
the selecting unit is used for selecting the target file information record which is not locked currently from the alternative file information records;
and the downloading unit is used for locking the target file information record by using the record lock corresponding to the target FTP client and downloading the file corresponding to the target file information record from the FTP server.
7. The apparatus of claim 6, wherein the determining unit comprises:
the acquisition subunit is used for acquiring a file record table of the FTP client cluster;
a first determining subunit, configured to determine a state of each file information record in the file record table;
and the second determining subunit is used for determining the file information record as the alternative file information under the condition that the state of the file information record is the state to be downloaded for each file information record.
8. The apparatus of claim 6, wherein the selecting unit comprises:
the selecting subunit is used for sequentially selecting each alternative file information record in the file record table and determining whether the selection is successful;
and the third determining subunit is configured to, when any one of the candidate file information records in the file record table is successfully selected, determine the currently successfully selected candidate information record as the currently unlocked target file information record.
9. A storage medium, characterized in that the storage medium comprises storage instructions, wherein when the instructions are executed, a device on which the storage medium is located is controlled to execute the file downloading method according to any one of claims 1 to 5.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the file download method of any of claims 1-5.
CN202210883523.XA 2022-07-26 2022-07-26 File downloading method and device, storage medium and electronic equipment Pending CN115022307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210883523.XA CN115022307A (en) 2022-07-26 2022-07-26 File downloading method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210883523.XA CN115022307A (en) 2022-07-26 2022-07-26 File downloading method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115022307A true CN115022307A (en) 2022-09-06

Family

ID=83080193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210883523.XA Pending CN115022307A (en) 2022-07-26 2022-07-26 File downloading method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115022307A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629811A (en) * 2023-07-26 2023-08-22 太平金融科技服务(上海)有限公司深圳分公司 Double-record file processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863050A (en) * 2005-09-15 2006-11-15 上海华为技术有限公司 Method of document synchronization between server and system thereof
CN106776720A (en) * 2016-11-18 2017-05-31 北京奇虎科技有限公司 A kind of document handling method and device
CN110620798A (en) * 2018-06-19 2019-12-27 北京京东尚科信息技术有限公司 Control method, system, equipment and storage medium for FTP connection
CN112905533A (en) * 2021-02-05 2021-06-04 优车库网络科技发展(深圳)有限公司 File submission management method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863050A (en) * 2005-09-15 2006-11-15 上海华为技术有限公司 Method of document synchronization between server and system thereof
CN106776720A (en) * 2016-11-18 2017-05-31 北京奇虎科技有限公司 A kind of document handling method and device
CN110620798A (en) * 2018-06-19 2019-12-27 北京京东尚科信息技术有限公司 Control method, system, equipment and storage medium for FTP connection
CN112905533A (en) * 2021-02-05 2021-06-04 优车库网络科技发展(深圳)有限公司 File submission management method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116629811A (en) * 2023-07-26 2023-08-22 太平金融科技服务(上海)有限公司深圳分公司 Double-record file processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11307906B1 (en) Solver for cluster management system
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
US20060259594A1 (en) Progressive deployment and maintenance of applications on a set of peer nodes
US8943082B2 (en) Self-assignment of node identifier in a cluster system
WO2016177130A1 (en) Method and device for selecting communication node
US9069571B2 (en) Propagation of unique device names in a cluster system
CN107580032B (en) Data processing method, device and equipment
CN109522043B (en) Method and device for managing configuration data and storage medium
US11240302B1 (en) Live migration of log-based consistency mechanisms for data stores
US20120143829A1 (en) Notification of configuration updates in a cluster system
CN111708836B (en) Cluster management method, device and cluster system
CN111444157A (en) Distributed file system and data access method
US20150286496A1 (en) Systems and methods for enlisting single phase commit resources in a two phase commit transaction
CN115022307A (en) File downloading method and device, storage medium and electronic equipment
KR101638689B1 (en) System and method for providing client terminal to user customized synchronization service
CN112612541A (en) Method and device for managing configuration files
US20120209821A1 (en) Validation of access to a shared data record subject to read and write access by multiple requesters
CN110543465A (en) directory operation method and device, computer equipment and storage medium
US20190065327A1 (en) Efficient versioned object management
CN114564530A (en) Database access method, device, equipment and storage medium
CN115250269B (en) File distribution method and device, storage medium and electronic equipment
CN116166300B (en) Upgrade management method and device for intellectual property system
CN113873052B (en) Domain name resolution method, device and equipment of Kubernetes cluster
CN114513501B (en) Target distribution method and system
CN115604345B (en) Development method of application program and computer readable 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