CN112118235A - SFTP-based file management method, device and medium - Google Patents

SFTP-based file management method, device and medium Download PDF

Info

Publication number
CN112118235A
CN112118235A CN202010898961.4A CN202010898961A CN112118235A CN 112118235 A CN112118235 A CN 112118235A CN 202010898961 A CN202010898961 A CN 202010898961A CN 112118235 A CN112118235 A CN 112118235A
Authority
CN
China
Prior art keywords
cache
file
server
sftp
system server
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
CN202010898961.4A
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN202010898961.4A priority Critical patent/CN112118235A/en
Publication of CN112118235A publication Critical patent/CN112118235A/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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a file management method, equipment and medium based on SFTP, after starting SFTP service, a remote file server is connected with a system server; storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path; uploading the files in the cache region of the system server to the cache region of the remote file server by calling an SFTP command according to the cache path of the files in the cache region of the system server; and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling the SFTP command according to the cache path corresponding to the file in the cache region of the remote file server. The embodiment of the specification stores the files on the remote file server in a unified manner, and establishes connection with the remote file server through the system server, so that the files are encrypted and mutually transmitted safely, and the operating pressure of the system server is reduced.

Description

SFTP-based file management method, device and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a file management method, device, and medium based on SFTP.
Background
Sftp (secure File Transfer protocol) is a secure File Transfer protocol, is a network transport protocol for data stream connection, providing File access, transmission and management functions, and can provide a secure network encryption method for transmitting files.
In the prior art, a system is divided into different functional modules, each functional module may have different file uploading requirements, and uploaded files include documents, pictures, plug-ins, compressed packages and the like. When too many files are uploaded to the system server, the memory of the system server is reduced, and great pressure is applied to the operation of the system server.
Disclosure of Invention
In view of this, embodiments of the present application provide a file management method, device, and medium based on SFTP, so as to solve the problem in the prior art that after too many files are uploaded to a system server, the memory of the system server is reduced, and great pressure is applied to the operation of the system server.
The embodiment of the application adopts the following technical scheme:
the embodiment of the application provides a file management method based on SFTP, and the method comprises the following steps:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
It should be noted that, in the embodiments of the present specification, files are uniformly stored in a remote file server, and a connection is established between a system server and a remote file server, so that secure encryption and mutual transmission of files are realized, and the operating pressure of the system server is reduced.
Further, before uploading the file in the cache area of the system server to the cache area of the remote file server by calling an SFTP command according to the cache path corresponding to the file in the cache area of the system server, the method further includes:
and after the form page triggers the uploading of the file, the file of the cache region of the system server is uploaded to the cache region of the remote file server.
It should be noted that, a form page exists in the file management system in the embodiment of the present specification, and if uploading a file in the cache area of the system server to the cache area of the remote file server is executed, an instruction for uploading the file needs to be triggered on the form page, so that the file management is facilitated.
Further, after the file in the cache of the system server is uploaded to the cache of the remote file server by calling the SFTP command, the method further includes:
and inserting record data into the file, and setting the state of the record data to be 0.
Note that, the recorded data is inserted into the file, and the status of the recorded data is set to 0, which indicates that the recorded data has been uploaded to the cache area of the remote file server.
Further, after inserting the record data into the file and setting the status of the record data to 0, the method further includes:
and after the form is submitted and saved, changing the state of the recorded data to 1.
The state may be a save state of the current file, where 0 is uploaded and not saved, and 1 is saved. The form submission save may be a save of a file.
Further, the downloading the file from the cache area of the remote file server to the cache area of the system server by calling the SFTP command specifically includes:
and downloading the file with the recorded data state of 1 from the cache region of the remote file server to the cache region of the system server through an SFTP command.
If it is necessary to download the file in the cache area of the remote file server to the cache area of the system server, the file with the recorded data state of 0 is not saved, and therefore only the file with the recorded data state of 1 can be downloaded.
Further, after the form is submitted and saved and the state of the recorded data is changed to 1, the method further includes:
and clearing the files in the cache area of the system server and the files with the data recorded in the cache area of the remote file server and the state of 0 according to the preset time.
It should be noted that the cache files of the system server are periodically cleared to reduce the operating pressure of the system server. If the form is not submitted for storage, the corresponding file can be cleared at the preset time, and meanwhile, the related data in the database can be deleted.
Further, after the file is downloaded from the cache of the remote file server to the cache of the system server by calling the SFTP command, the method further includes:
and if the file needs to be deleted, modifying the state of the recorded data of the file to be 0.
It should be noted that, by modifying the state of the recorded data of the file, the deletion of the file can be completed at a predetermined time.
Further, after the file is downloaded from the cache of the remote file server to the cache of the system server by calling the SFTP command, the method further includes:
and if the file of the page needs to be downloaded, downloading the file in the cache region of the system server according to the cache path corresponding to the file in the cache region of the system server.
It should be noted that, before this, the system has already uploaded the file to the cache area of the system server, and if the file of the page needs to be downloaded, only the file in the cache area of the system server needs to be downloaded to the specified location.
An embodiment of the present application further provides an SFTP-based file management apparatus, where the apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
An embodiment of the present application further provides a file management medium based on SFTP, in which computer-executable instructions are stored, where the computer-executable instructions are set to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: the embodiment of the specification stores the files on the remote file server in a unified manner, and establishes connection with the remote file server through the system server, so that the files are encrypted and mutually transmitted safely, and the operating pressure of the system server is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a file management method based on SFTP according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a file management method based on SFTP according to a second embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some 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.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a file management method based on SFTP provided in an embodiment of the present specification, where the following steps may be executed by a file management system in the embodiment of the present specification, and the specific steps may include:
step S101, after the SFTP service is started, the remote file server is connected with a system server.
In step S101 of the embodiment of the present specification, the SFTP command is executed on the premise that the SFTP service is started, and then the remote file server is connected to the system server by using the configured user name and password through the SFTP command.
Step S102, storing the files in cache regions of the system servers, wherein each cache region of the system server corresponds to one cache path.
In step S102 of this embodiment, the file is first stored in a cache on the system server after being uploaded.
And step S103, uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache paths corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path.
And step S104, if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
In step S104 in this embodiment of the present description, if a user needs to load a certain page, the user needs to download a file stored in the cache area of the remote file server to the cache area of the system server, so that the content of the file can be displayed on the page, for example, when the file is a picture, the user can only view the picture from the cache area of the remote file server to the cache area of the system server.
The embodiment of the specification stores the files on the remote file server in a unified manner, and establishes connection with the remote file server through the system server, so that the files are encrypted and mutually transmitted safely, and the operating pressure of the system server is reduced.
Corresponding to the first embodiment of the present specification, fig. 2 is a schematic flowchart of a file management method based on SFTP provided in the second embodiment of the present specification, where the following steps may be executed by a file management system in the embodiment of the present specification, and the specific steps may include:
step S201, after the SFTP service is started, the remote file server is connected with the system server.
In step S201 of the embodiment of the present specification, the SFTP command is executed on the premise that the SFTP service is started, and then the remote file server is connected to the system server by using the configured user name and password through the SFTP command.
Step S202, storing the file in a cache area of the system server, wherein the cache area of each system server corresponds to one cache path.
In step S202 of this embodiment, the file is first stored in a cache on the system server after being uploaded.
Step S203, uploading the files in the cache area of the system server to the cache areas of the remote file servers by calling an SFTP command according to the cache paths corresponding to the files in the cache area of the system server, wherein each cache area of the remote file server corresponds to one cache path.
In step S203 in this embodiment of the present description, after the form page triggers uploading of the file, the file in the cache area of the system server is uploaded to the cache area of the remote file server.
Step S204, inserting record data into the file, and setting the state of the record data to be 0.
In step S204 of the embodiment of the present specification, a state of 0 may indicate that the cache area uploaded to the remote file server has been uploaded. The recorded data of the file can be seen in table 1.
Figure BDA0002659352310000071
TABLE 1
Step S205, after the form is submitted and saved, change the state of the recorded data to 1.
In step S205 of the embodiment of the present specification, the state may also be a save state of the current file, where 0 is uploaded and not saved, and 1 is saved. The form submission save may be a save of a file.
Step S206, according to the preset time, eliminating the files in the cache area of the system server and the files with the status of 0 of the data recorded in the cache area of the remote file server.
In step S206 of the embodiment of the present specification, the cache file of the system server is periodically cleared to reduce the operating pressure of the system server. If the form is not submitted for storage, the corresponding file can be cleared at the preset time, and meanwhile, the related data in the database can be deleted. For example, at 1 point every morning, the files in the cache area of the system server and the files in the cache area of the remote file server, which have the data recorded therein and have the status of 0, are removed.
And step S207, if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
In step S207 of the embodiment of this specification, the downloading the file from the cache area of the remote file server to the cache area of the system server by calling an SFTP command specifically includes:
and inquiring the record data of the file according to the service data main key (see table 1) of the file, and downloading the file with the record data state of 1 to a cache region of a system server from the cache region of a remote file server through an SFTP command.
And step S208, if the file needs to be deleted, the state of the recorded data of the file is modified to be 0.
In step S208 of the embodiment of the present specification, deletion of a file can be completed at a predetermined time by modifying the state of recorded data of the file.
Step S209, if the file of the page needs to be downloaded, the file in the cache area of the system server is downloaded according to the cache path corresponding to the file in the cache area of the system server.
It should be noted that, in the embodiments of the present specification, paths of the uploaded files are distinguished according to modules, functions, and internal codes of service data, and the uploaded files are separately managed, so that the managed files on the remote file server are neat and standard, and query is facilitated.
It should be noted that, in the embodiment of the present specification, while a file is stored, a database maintains record data correspondingly, and by performing state update on data in the database and matching with a file cleaning timing task of a system, unified management is performed on uploaded files of the system. And the file is transmitted through the SFTP command, and the security of file transmission is better guaranteed.
The embodiment of the specification stores the files on the remote file server in a unified manner, and establishes connection with the remote file server through the system server, so that the files are encrypted and mutually transmitted safely, and the operating pressure of the system server is reduced.
An embodiment of the present application further provides an SFTP-based file management apparatus, where the apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
An embodiment of the present application further provides a file management medium based on SFTP, in which computer-executable instructions are stored, where the computer-executable instructions are configured to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially 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.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An SFTP-based file management method, the method comprising:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
2. The SFTP-based file management method according to claim 1, wherein before uploading the file in the cache of the system server to the cache of the remote file server by invoking an SFTP command according to the cache path corresponding to the file in the cache of the system server, the method further comprises:
and after the form page triggers the uploading of the file, the file of the cache region of the system server is uploaded to the cache region of the remote file server.
3. The SFTP-based file management method of claim 2, wherein after uploading the file in the cache of the system server to the cache of the remote file server by invoking the SFTP command, the method further comprises:
and inserting record data into the file, and setting the state of the record data to be 0.
4. The SFTP-based file management method of claim 3, wherein after the inserting the record data on the file and setting the status of the record data to 0, the method further comprises:
and after the form is submitted and saved, changing the state of the recorded data to 1.
5. The SFTP-based file management method of claim 4, wherein the downloading the file from the cache of the remote file server to the cache of the system server by invoking an SFTP command specifically comprises:
and downloading the file with the recorded data state of 1 from the cache region of the remote file server to the cache region of the system server through an SFTP command.
6. The SFTP-based file management method of claim 4, wherein after the change of the state of the logging data to 1 after the form submission is saved, the method further comprises:
and clearing the files in the cache area of the system server and the files with the data recorded in the cache area of the remote file server and the state of 0 according to the preset time.
7. The SFTP-based file management method of claim 6, wherein after the downloading of the file from the cache of the remote file server to the cache of the system server by invoking an SFTP command, the method further comprises:
and if the file needs to be deleted, modifying the state of the recorded data of the file to be 0.
8. The SFTP-based file management method of claim 1, wherein after downloading the file from the cache of the remote file server to the cache of the system server by invoking the SFTP command, the method further comprises:
and if the file of the page needs to be downloaded, downloading the file in the cache region of the system server according to the cache path corresponding to the file in the cache region of the system server.
9. An SFTP-based file management device, the device comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
10. An SFTP-based file management medium storing computer-executable instructions, the computer-executable instructions configured to:
after starting SFTP service, establishing connection between a remote file server and a system server;
storing the files in cache regions of system servers, wherein the cache region of each system server corresponds to a cache path;
uploading the files in the cache region of the system server to the cache regions of the remote file servers by calling an SFTP command according to the cache path corresponding to the files in the cache region of the system server, wherein each cache region of each remote file server corresponds to one cache path;
and if the page corresponding to the file needs to be loaded, downloading the file from the cache region of the remote file server to the cache region of the system server by calling an SFTP command according to the cache path corresponding to the file in the cache region of the remote file server.
CN202010898961.4A 2020-08-31 2020-08-31 SFTP-based file management method, device and medium Pending CN112118235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010898961.4A CN112118235A (en) 2020-08-31 2020-08-31 SFTP-based file management method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010898961.4A CN112118235A (en) 2020-08-31 2020-08-31 SFTP-based file management method, device and medium

Publications (1)

Publication Number Publication Date
CN112118235A true CN112118235A (en) 2020-12-22

Family

ID=73805198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010898961.4A Pending CN112118235A (en) 2020-08-31 2020-08-31 SFTP-based file management method, device and medium

Country Status (1)

Country Link
CN (1) CN112118235A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100198889A1 (en) * 2008-09-29 2010-08-05 Brandon Patrick Byers Client application program interface for network-attached storage system
CN110198334A (en) * 2018-04-19 2019-09-03 腾讯科技(深圳)有限公司 Access method, device and storage medium based on object storage service
CN110401724A (en) * 2019-08-22 2019-11-01 北京旷视科技有限公司 File management method, ftp server and storage medium
CN110855736A (en) * 2019-09-20 2020-02-28 深圳市有方科技股份有限公司 File transfer method, file transfer apparatus, and computer-readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100198889A1 (en) * 2008-09-29 2010-08-05 Brandon Patrick Byers Client application program interface for network-attached storage system
CN110198334A (en) * 2018-04-19 2019-09-03 腾讯科技(深圳)有限公司 Access method, device and storage medium based on object storage service
CN110401724A (en) * 2019-08-22 2019-11-01 北京旷视科技有限公司 File management method, ftp server and storage medium
CN110855736A (en) * 2019-09-20 2020-02-28 深圳市有方科技股份有限公司 File transfer method, file transfer apparatus, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN110990804B (en) Resource access method, device and equipment
CN108712454B (en) File processing method, device and equipment
CN108418851B (en) Policy issuing system, method, device and equipment
CN111796823A (en) Method and device for updating page and displaying page and page maintenance system
CN108268289B (en) Parameter configuration method, device and system for web application
CN110263502B (en) Picture processing method and device based on block chain
CN111400681B (en) Data authority processing method, device and equipment
CN107479868B (en) Interface loading method, device and equipment
CN115309766B (en) Method and device for executing database service
CN115617799A (en) Data storage method, device, equipment and storage medium
CN112631679A (en) Preloading method and device for micro-application
CN109144600B (en) Application program running method and device and computer readable medium
CN111355672A (en) Message forwarding method and device
CN106156050B (en) Data processing method and device
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN108989072B (en) Method and device for deploying, managing and calling assembly
CN112579955A (en) Page access method, equipment, medium and electronic equipment
CN110022351B (en) Service request processing method and device
CN111338655A (en) Installation package distribution method and system
CN112118235A (en) SFTP-based file management method, device and medium
CN113254163B (en) Processing method and device of block chain data
CN108153799B (en) Database access control method and device and database system
CN107239270B (en) Code processing method and device
CN110633321B (en) Data synchronization method, device and equipment
CN114238934A (en) Equipment information acquisition method, device, equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201222

RJ01 Rejection of invention patent application after publication