CN117056283A - File transfer method, device and storage medium - Google Patents
File transfer method, device and storage medium Download PDFInfo
- Publication number
- CN117056283A CN117056283A CN202311002334.8A CN202311002334A CN117056283A CN 117056283 A CN117056283 A CN 117056283A CN 202311002334 A CN202311002334 A CN 202311002334A CN 117056283 A CN117056283 A CN 117056283A
- Authority
- CN
- China
- Prior art keywords
- file
- transfer
- circulation
- target
- user
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/176—Support for shared access to files; File sharing support
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域Technical field
本申请涉及互联网技术,尤其涉及一种文件流转方法、设备及存储介质。This application relates to Internet technology, and in particular to a file transfer method, equipment and storage medium.
背景技术Background technique
随着计算机和互联网技术的飞速发展,人们逐渐习惯将文件在不同设备间流转,以共享网络资源,线上流转的方式在提供便利的同时也带来了相应的安全隐患,因此需要建立一套安全、准确、高效的文件流转系统。With the rapid development of computer and Internet technology, people have gradually become accustomed to transferring files between different devices to share network resources. While online transfer provides convenience, it also brings corresponding security risks. Therefore, it is necessary to establish a set of Safe, accurate and efficient document circulation system.
现有的文件流转方法使用的系统为OSS文件存储系统,文件提供方基于指定的文件格式拉取指定的数据内容生成文件,上传至OSS文件存储系统指定的路径下,并将存储路径告知文件接收方,文件接收方根据存储路径从OSS文件存储系统中下载指定的文件。The system used by the existing file transfer method is the OSS file storage system. The file provider pulls the specified data content based on the specified file format to generate a file, uploads it to the path specified by the OSS file storage system, and informs the file recipient of the storage path. Party, the file recipient downloads the specified file from the OSS file storage system according to the storage path.
由于OSS文件存储系统未完全自动化,在文件流转过程中会消耗大量人力成本和时间成本,并且存在人为误操作和遗漏文件的可能,导致文件流转的失误率较高,从而对文件流转效率产生影响;而从OSS文件存储系统下载文件无法保证一次性全部下载,以及下载权限不清,容易发生越权,无法满足对安全性的要求,因此现有技术存在文件流转效率低以及安全性差的技术问题。Since the OSS file storage system is not fully automated, a large amount of labor and time costs will be consumed in the file transfer process, and there is the possibility of human misoperation and missing files, resulting in a high error rate in file transfer, thus affecting the efficiency of file transfer. ; However, downloading files from the OSS file storage system cannot guarantee that all files will be downloaded at once, and the download permissions are unclear, which makes it easy to exceed authority and cannot meet security requirements. Therefore, the existing technology has technical problems of low file transfer efficiency and poor security.
发明内容Contents of the invention
本申请提供一种文件流转方法、设备及存储介质,用以解决现有技术中文件流转效率低以及安全性差的技术问题。This application provides a file transfer method, equipment and storage medium to solve the technical problems of low file transfer efficiency and poor security in the prior art.
第一方面,本申请提供一种文件流转方法,包括:In the first aspect, this application provides a document circulation method, including:
响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户;In response to a business request for file transfer, determine at least one file provider corresponding to the file transfer;
为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户;Configure the corresponding file interface for the target transfer file, set transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules;
对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转。The identity of the file providing user and the file receiving user is authenticated. If the verification is passed, file transfer between the file providing user and the file receiving user is established based on the preset method.
可选地,基于预设方式建立文件提供用户和文件接收用户之间的文件流转,包括:Optionally, create file transfers between the file provider user and the file receiving user based on a preset method, including:
判断流转规则是否符合预设模式,若是,则向文件提供用户发送第一指示信息;其中,第一指示信息用于指示文件提供用户上传目标流转文件;Determine whether the circulation rule conforms to the preset pattern, and if so, send first instruction information to the file providing user; wherein the first instruction information is used to instruct the file providing user to upload the target circulation file;
基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,将目标流转文件上传至存放目录;其中,流转方式包括本地流转和/或远端流转;Determine the corresponding transfer method based on the transfer rules, determine the storage directory of the target transfer file based on the transfer method, and upload the target transfer file to the storage directory; where the transfer method includes local transfer and/or remote transfer;
将存放目录中的目标流转文件同步至文件接收用户。Synchronize the target transfer file in the storage directory to the file receiving user.
可选地,将存放目录中的目标流转文件同步至文件接收用户,包括:Optionally, synchronize the target transfer file in the storage directory to the file receiving user, including:
向文件接收用户发送第二指示信息;其中,第二指示信息用于指示文件接收用户下载目标流转文件;Send second instruction information to the file receiving user; wherein the second instruction information is used to instruct the file receiving user to download the target circulation file;
基于存放目录,对目标流转文件进行下载。Based on the storage directory, download the target circulation file.
可选地,将目标流转文件上传至存放目录,还包括:Optionally, upload the target transfer file to the storage directory, including:
判断与目标流转文件关联的文件管理平台是否具有修改权限,若是,则基于文件管理平台对存放目录中的目标流转文件进行编辑;Determine whether the file management platform associated with the target transfer file has modification permissions. If so, edit the target transfer file in the storage directory based on the file management platform;
基于编辑后的目标流转文件对存放目录进行更新。Update the storage directory based on the edited target transfer file.
可选地,基于预设方式建立文件提供用户和文件接收用户之间的文件流转,还包括:Optionally, creating file transfers between file providing users and file receiving users based on a preset method also includes:
获取文件流转日志,基于文件流转日志查找目标流转文件、编辑过程中生成的过程文件、编辑后的目标流转文件;Obtain the file transfer log, and search the target transfer file, the process file generated during the editing process, and the edited target transfer file based on the file transfer log;
基于预设路径保存目标流转文件、过程文件、编辑后的目标流转文件。Save target transfer files, process files, and edited target transfer files based on preset paths.
可选地,基于预设方式建立文件提供用户和文件接收用户之间的文件流转,还包括:Optionally, creating file transfers between file providing users and file receiving users based on a preset method also includes:
获取存放目录中存储的所有文件;Get all files stored in the storage directory;
基于预设要求对文件进行清理。Clean files based on preset requirements.
可选地,基于文件接口设置流转规则,包括:Optionally, set flow rules based on the file interface, including:
基于预设类别将至少一个文件提供用户划分到相应的用户组;classify at least one file providing user into a corresponding user group based on a preset category;
基于文件接口为每个用户组设置相应的流转规则。Set corresponding transfer rules for each user group based on the file interface.
第二方面,本申请提供一种文件流转设备,包括:In the second aspect, this application provides a document circulation device, including:
确定模块,用于响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户;A determination module, configured to respond to a business request for file transfer and determine at least one file provider corresponding to the file transfer;
第一处理模块,用于为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户;其中,流转规则包括本地流转和/或远端流转;The first processing module is configured to configure a corresponding file interface for the target transfer file, set transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules; wherein the transfer rules include local transfer and/or remote transfer;
第二处理模块,用于对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转。The second processing module is used to authenticate the identity of the file providing user and the file receiving user. If the verification is passed, establish file transfer between the file providing user and the file receiving user based on a preset method.
可选地,第二处理模块用于:Optionally, the second processing module is used for:
判断流转规则是否符合预设模式,若是,则向文件提供用户发送第一指示信息;其中,第一指示信息用于指示文件提供用户上传目标流转文件;Determine whether the circulation rule conforms to the preset pattern, and if so, send first instruction information to the file providing user; wherein the first instruction information is used to instruct the file providing user to upload the target circulation file;
基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,将目标流转文件上传至存放目录;其中,流转方式包括本地流转和/或远端流转;Determine the corresponding transfer method based on the transfer rules, determine the storage directory of the target transfer file based on the transfer method, and upload the target transfer file to the storage directory; where the transfer method includes local transfer and/or remote transfer;
将存放目录中的目标流转文件同步至文件接收用户。Synchronize the target transfer file in the storage directory to the file receiving user.
可选地,第二处理模块还用于:Optionally, the second processing module is also used to:
向文件接收用户发送第二指示信息;其中,第二指示信息用于指示文件接收用户下载目标流转文件;Send second instruction information to the file receiving user; wherein the second instruction information is used to instruct the file receiving user to download the target circulation file;
基于存放目录,对目标流转文件进行下载。Based on the storage directory, download the target circulation file.
可选地,第二处理模块还用于:Optionally, the second processing module is also used to:
判断与目标流转文件关联的文件管理平台是否具有修改权限,若是,则基于文件管理平台对存放目录中的目标流转文件进行编辑;Determine whether the file management platform associated with the target transfer file has modification permissions. If so, edit the target transfer file in the storage directory based on the file management platform;
基于编辑后的目标流转文件对存放目录进行更新。Update the storage directory based on the edited target transfer file.
可选地,第二处理模块还用于:Optionally, the second processing module is also used to:
获取文件流转日志,基于文件流转日志查找目标流转文件、编辑过程中生成的过程文件、编辑后的目标流转文件;Obtain the file transfer log, and search the target transfer file, the process file generated during the editing process, and the edited target transfer file based on the file transfer log;
基于预设路径保存目标流转文件、过程文件、编辑后的目标流转文件。Save target transfer files, process files, and edited target transfer files based on preset paths.
可选地,第二处理模块还用于:Optionally, the second processing module is also used to:
获取存放目录中存储的所有文件;Get all files stored in the storage directory;
基于预设要求对文件进行清理。Clean files based on preset requirements.
可选地,第一处理模块用于:Optionally, the first processing module is used for:
基于预设类别将至少一个文件提供用户划分到相应的用户组;classify at least one file providing user into a corresponding user group based on a preset category;
基于文件接口为每个用户组设置相应的流转规则。Set corresponding transfer rules for each user group based on the file interface.
本申请的第三方面,提供了一种文件流转设备,包括:The third aspect of this application provides a file transfer device, including:
处理器和存储器;processor and memory;
存储器存储计算机执行指令;Memory stores instructions for execution by the computer;
处理器执行存储器存储的计算机执行指令,使得文件流转设备执行第一方面中任一项的文件流转方法。The processor executes the computer execution instructions stored in the memory, so that the file transfer device executes any of the file transfer methods of the first aspect.
第四方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现如第一方面中任一项的文件流转方法。In a fourth aspect, the present application provides a computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When the computer-executable instructions are executed by a processor, they are used to implement file transfer as in any one of the first aspects. method.
本申请提供的文件流转方法、设备及存储介质,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转,避免当用户的账号信息泄露时文件流转过程受到攻击,同时目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。The file transfer method, equipment and storage medium provided by this application are based on a distributed file system that responds to business requests for file transfer, determines at least one file corresponding to the file transfer to provide the user, and uniformly stores target transfer files through the distributed file system to ensure the target Integrity and high availability of transfer files; configure the corresponding file interface for the target transfer file, set transfer rules based on the file interface, determine at least one file receiving user based on the transfer rules, conduct unified management of file providing users and file receiving users, and Isolate permissions between different users to ensure the security of target transfer files; authenticate the file providing user and file receiving user. If the verification is passed, a file connection between the file providing user and the file receiving user is established based on the preset method. Circulation avoids attacks on the file circulation process when user account information is leaked. At the same time, the circulation process of target circulation files in the distributed file system does not require manual participation. File providing users and file receiving users do not need to interact with the distributed file system multiple times. Docking reduces the risk of docking and achieves the technical effect of improving file transfer efficiency and security.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
图1为本申请实施例提供的文件流转方法流程图一;Figure 1 is a flowchart 1 of the file transfer method provided by the embodiment of the present application;
图2为本申请实施例提供的文件流转方法的场景图一;Figure 2 is a scene diagram of the file transfer method provided by the embodiment of the present application;
图3为本申请实施例提供的文件流转方法的场景图二;Figure 3 is a scene diagram 2 of the file transfer method provided by the embodiment of the present application;
图4为本申请实施例提供的文件流转方法的场景图三;Figure 4 is a scene diagram 3 of the file transfer method provided by the embodiment of the present application;
图5为本申请实施例提供的文件流转方法的场景图四;Figure 5 is a scene diagram 4 of the file transfer method provided by the embodiment of the present application;
图6为本申请实施例提供的文件流转方法的场景图五;Figure 6 is a scene diagram 5 of the file transfer method provided by the embodiment of the present application;
图7为本申请实施例提供的文件流转方法的场景图六;Figure 7 is a scene diagram 6 of the file transfer method provided by the embodiment of the present application;
图8为本申请实施例提供的文件流转方法流程图二;Figure 8 is a flow chart 2 of the file transfer method provided by the embodiment of the present application;
图9为本申请实施例提供的文件流转方法的场景图七;Figure 9 is a scene diagram 7 of the file transfer method provided by the embodiment of the present application;
图10为本申请实施例提供的文件流转设备的结构示意图;Figure 10 is a schematic structural diagram of a file transfer device provided by an embodiment of the present application;
图11为本申请实施例提供的文件流转设备的硬件结构图。Figure 11 is a hardware structure diagram of a file transfer device provided by an embodiment of the present application.
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。Through the above-mentioned drawings, clear embodiments of the present application have been shown, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present application's concepts in any way, but are intended to illustrate the application's concepts for those skilled in the art with reference to specific embodiments.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的设备和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with aspects of the present application as detailed in the appended claims.
在现有技术中,使用OSS文件存储系统进行文件流转,文件提供方基于指定的文件格式拉取指定的数据内容生成文件,上传至OSS文件存储系统指定的路径下,然而在上传过程中可能存在人为误操作和遗漏文件的情况,对文件流转效率产生影响;文件上传完成后,将存储路径告知文件接收方,文件接收方根据存储路径从OSS文件存储系统中下载指定的文件,无法保证一次性全部下载,并且下载权限不清,容易发生越权,而整个文件流转过程也会消耗大量人力成本和时间成本,因此,现有技术存在文件流转效率低以及安全性差的技术问题。In the existing technology, the OSS file storage system is used for file transfer. The file provider pulls the specified data content based on the specified file format to generate a file, and uploads it to the path specified by the OSS file storage system. However, there may be problems during the upload process. Human misoperation and missing files will have an impact on file transfer efficiency; after the file upload is completed, the storage path will be informed to the file recipient, and the file recipient will download the specified file from the OSS file storage system according to the storage path, which cannot be guaranteed to be one-time All downloads, and the download permissions are unclear, which is prone to unauthorized access, and the entire file transfer process will also consume a lot of labor costs and time costs. Therefore, the existing technology has technical problems of low file transfer efficiency and poor security.
本申请提供的文件流转方法、设备及存储介质,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转,避免当用户的账号信息泄露时文件流转过程受到攻击,同时目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。The file transfer method, equipment and storage medium provided by this application are based on a distributed file system that responds to business requests for file transfer, determines at least one file corresponding to the file transfer to provide the user, and uniformly stores target transfer files through the distributed file system to ensure the target Integrity and high availability of transfer files; configure the corresponding file interface for the target transfer file, set transfer rules based on the file interface, determine at least one file receiving user based on the transfer rules, conduct unified management of file providing users and file receiving users, and Isolate permissions between different users to ensure the security of target transfer files; authenticate the file providing user and file receiving user. If the verification is passed, a file connection between the file providing user and the file receiving user is established based on the preset method. Circulation avoids attacks on the file circulation process when user account information is leaked. At the same time, the circulation process of target circulation files in the distributed file system does not require manual participation. File providing users and file receiving users do not need to interact with the distributed file system multiple times. Docking reduces the risk of docking and achieves the technical effect of improving file transfer efficiency and security.
下面以具体的实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
图1为本申请实施例提供的文件流转方法流程图一。如图1所示,本实施例提供的一种文件流转方法,包括:Figure 1 is a flowchart 1 of a file transfer method provided by an embodiment of the present application. As shown in Figure 1, this embodiment provides a file transfer method, including:
S101、响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户;S101. In response to the business request for file transfer, determine at least one file provider corresponding to the file transfer;
本实施例中,整个文件流转过程依赖于GlusterFS分布式文件系统进行,并遵循安全文件传输协议SFTP,GlusterFS分布式文件系统是一个可扩展的网络文件系统,相比其他分布式文件系统,GlusterFS分布式文件系统具有高扩展性、高可用性、高性能等特点。图2为本申请实施例提供的文件流转方法的场景图一,如图2所示,GlusterFS分布式文件系统总体采用管理层、Master中心控制层、Worker流转处理层的架构,管理层由系统操作人员基于相应的程序对用户进行操作,包括对GlusterFS分布式文件系统进行维护、管理等;Master中心控制层作为对管理层和Worker流转处理层进行通讯控制的中枢系统,主要用来管理Worker流转处理层的各个集群以及流转规则的分配等工作;Worker流转处理层主要负责对文件流转过程进行处理,是GlusterFS分布式文件系统的核心业务层。系统操作人员在管理层接收到文件流转的业务请求,并确定文件流转对应的至少一个文件提供用户,例如,通过celery分布式任务队列,多线程处理文件流转的业务请求。In this embodiment, the entire file transfer process relies on the GlusterFS distributed file system and follows the secure file transfer protocol SFTP. The GlusterFS distributed file system is an scalable network file system. Compared with other distributed file systems, GlusterFS distributed file system The file system has the characteristics of high scalability, high availability, and high performance. Figure 2 is a scene diagram of the file transfer method provided by the embodiment of this application. As shown in Figure 2, the GlusterFS distributed file system generally adopts the architecture of the management layer, the Master center control layer, and the Worker transfer processing layer. The management layer is operated by the system. Personnel operate users based on corresponding programs, including maintenance and management of the GlusterFS distributed file system; the Master center control layer serves as the central system for communication control between the management layer and the Worker transfer processing layer, and is mainly used to manage Worker transfer processing. The various clusters of the layer and the distribution of transfer rules; the Worker transfer processing layer is mainly responsible for processing the file transfer process and is the core business layer of the GlusterFS distributed file system. The system operator receives the business request for file transfer at the management level and determines at least one file corresponding to the file transfer to provide the user. For example, through the celery distributed task queue, multi-threads process the business request for file transfer.
S102、为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户;S102. Configure a corresponding file interface for the target transfer file, set transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules;
本实施例中,如图3为本申请实施例提供的文件流转方法的场景图二,如图3所示,按照功能架构可将GlusterFS分布式文件系统划分为系统配置模块、用户管理模块、流转管理模块、文件交换管理模块、流转日志管理模块、白名单管理模块;系统配置模块包括集群管理、应用管理、系统监控、系统配置,其中,集群管理用于管理整个GlusterFS分布式文件系统的集群,并维护集群信息,如新增、删除、修改等,应用管理用于同步文件管理平台的应用信息,便于后期维护;用户管理模块包括本地用户、远端用户、用户组、用户导出,本地用户和远端用户用于管理各个集群的本地用户和远端用户信息,本地用户信息包括本地用户的用户名、密码等基本信息及空间限制等信息维护,远端用户信息包括远端用户的用户名、密码等基本信息,用户组用于将用户划分成组,方便管理用户和维护流转规则,用户导出用于导出用户信息,便于审计、运维;流转管理模块用于对文件进行流转,包括本地流转、远端流转、上传流转、下载流转、一对一流转、一对多流转、多对一流转、多对多流转;文件交换管理模块包括文件接口管理、上传下载管理、文件定时清理、文件编辑,文件接口管理用于维护、更改文件接口,便于与其他系统的复用与对接,文件定时清理为了防止文件过多而影响GlusterFS分布式文件系统的整体性能和稳定性;流转日志管理模块包括文件流转链、日志查询,文件流转链记录了流转文件从流转开始到流转结束的一系列过程日志,包括文件比较、备份、流转、删除等环节的日志信息;白名单管理模块包括添加/编辑白名单,通过白名单管理模块对用户进行身份验证,防止在用户账号密码泄露的情况下,攻击者发起登录攻击。In this embodiment, Figure 3 is a scene diagram of the file transfer method provided by the embodiment of the present application. As shown in Figure 3, the GlusterFS distributed file system can be divided into a system configuration module, a user management module, and a transfer module according to the functional architecture. Management module, file exchange management module, flow log management module, whitelist management module; system configuration module includes cluster management, application management, system monitoring, and system configuration. Among them, cluster management is used to manage the cluster of the entire GlusterFS distributed file system. And maintain cluster information, such as addition, deletion, modification, etc. Application management is used to synchronize application information of the file management platform to facilitate later maintenance; the user management module includes local users, remote users, user groups, user export, local users and Remote users are used to manage local users and remote user information of each cluster. Local user information includes basic information such as local users’ usernames and passwords, as well as information maintenance such as space restrictions. Remote user information includes remote users’ usernames, Basic information such as passwords. User groups are used to divide users into groups to facilitate user management and maintenance of transfer rules. User export is used to export user information for auditing and operation and maintenance. The transfer management module is used to transfer files, including local transfers. , remote transfer, upload transfer, download transfer, one-to-one transfer, one-to-many transfer, many-to-one transfer, many-to-many transfer; the file exchange management module includes file interface management, upload and download management, regular file cleaning, and file editing. , File interface management is used to maintain and change file interfaces to facilitate reuse and docking with other systems. Files are regularly cleaned to prevent too many files from affecting the overall performance and stability of the GlusterFS distributed file system; the circulation log management module includes files Circulation chain, log query, file circulation chain records a series of process logs from the beginning to the end of circulation of files, including log information of file comparison, backup, circulation, deletion and other links; the whitelist management module includes adding/editing whitelists , authenticate users through the whitelist management module to prevent attackers from launching login attacks when the user account and password are leaked.
本实施例中,基于接收到的文件流转的业务请求确定目标流转文件,并根据业务请求为目标流转文件配置相应的文件接口,包括配置文件接口中文名、文件接口英文名、应用、文件服务器集群、文件接口路径以及相关备注。基于预设类别将至少一个文件提供用户划分到相应的用户组,如根据省份进行分组,并基于相应的处于工作状态的服务器为每个用户组设置流转规则;其中,流转规则包括一对一流转、一对多流转、多对一流转、多对多流转。In this embodiment, the target transfer file is determined based on the received business request for file transfer, and the corresponding file interface is configured for the target transfer file according to the business request, including configuring the Chinese name of the file interface, the English name of the file interface, application, and file server cluster , file interface path and related remarks. Divide at least one file-providing user into corresponding user groups based on preset categories, such as grouping according to provinces, and set transfer rules for each user group based on the corresponding working server; where the transfer rules include one-to-one transfer , one-to-many circulation, many-to-one circulation, many-to-many circulation.
在第一示范例中,图4为本申请实施例提供的文件流转方法的场景图三,如图4所示,基于VIP和Keepalived技术,确定相应的服务器是否处于正常工作状态,若否,则通过VRRP协议或自定义脚本,选择处于正常工作状态的其他服务器设置流转规则。In the first demonstration example, Figure 4 is scene diagram 3 of the file transfer method provided by the embodiment of the present application. As shown in Figure 4, based on VIP and Keepalived technology, it is determined whether the corresponding server is in normal working status. If not, then Use the VRRP protocol or custom scripts to select other servers that are in normal working condition to set flow rules.
本实施例中,基于负载均衡原则,将流转规则分发到对应的Worker流转处理层的集群中,通过流转规则所在的集群确定相应的至少一个文件接收用户;当流转规则较多而导致Worker流转处理层的压力较大时,可以横向动态地对Worker流转处理层进行扩容,保证流转规则的及时性和可靠性;其中,流转规则存储在数据库中。In this embodiment, based on the load balancing principle, the circulation rules are distributed to the cluster of the corresponding Worker circulation processing layer, and at least one corresponding file receiving user is determined through the cluster where the circulation rules are located; when there are too many circulation rules, Worker circulation processing When the pressure on the layer is high, the Worker transfer processing layer can be horizontally and dynamically expanded to ensure the timeliness and reliability of the transfer rules; the transfer rules are stored in the database.
在第二示范例中,图5为本申请实施例提供的文件流转方法的场景图四,如图5所示,根据一致性哈希算法,计算流转规则的哈希值与Worker流转处理层的集群的哈希值,将两个哈希值进行比较,确定流转规则所在的集群,进而确定相应的至少一个文件接收用户;若某个集群发生宕机,重新计算流转规则的哈希值与Worker流转处理层的集群的哈希值,对流转规则进行分配,保证流转规则的高可用性。In the second demonstration example, Figure 5 is scene diagram 4 of the file transfer method provided by the embodiment of the present application. As shown in Figure 5, according to the consistent hash algorithm, the hash value of the transfer rule and the hash value of the Worker transfer processing layer are calculated. The hash value of the cluster, compare the two hash values to determine the cluster where the transfer rule is located, and then determine at least one corresponding file receiving user; if a cluster goes down, recalculate the hash value of the transfer rule and the Worker The hash value of the cluster in the circulation processing layer is used to distribute the circulation rules to ensure the high availability of the circulation rules.
S103、对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转。S103. Perform identity verification on the file providing user and the file receiving user. If the verification passes, establish file transfer between the file providing user and the file receiving user based on a preset method.
本实施例中,对文件提供用户和文件接收用户进行身份验证,若验证通过,则将文件提供用户和文件接收用户添加至白名单。In this embodiment, identity verification is performed on the file providing user and the file receiving user. If the verification is passed, the file providing user and the file receiving user are added to the whitelist.
在第三示范例中,图6为本申请实施例提供的文件流转方法的场景图五,如图6所示,通过FULLNAT技术与TOA技术定位文件提供用户和文件接收用户的IP地址,保证文件提供用户和文件接收用户的可溯源,从而得到具有登录权限的用户,基于负载均衡SLB的4层负载协议,为文件提供方和文件接收方进行安全白名单配置。In the third demonstration example, Figure 6 is scene diagram 5 of the file transfer method provided by the embodiment of the present application. As shown in Figure 6, the IP addresses of the file providing user and the file receiving user are located through FULLNAT technology and TOA technology to ensure that the file Provide traceability of users and file receiving users to obtain users with login permissions. Based on the load balancing SLB layer 4 load protocol, security whitelist configuration is performed for file providers and file receivers.
本实施例中,判断流转规则是否符合预设模式,若是,则向文件提供用户发送上传目标流转文件的指示信息,并基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录;向文件接收用户发送下载目标流转文件的指示信息,基于存放目录对目标流转文件进行下载;其中,流转方式包括本地流转、远端流转,远端流转包括SFTP上传和SFTP下载,本地流转指发生在本地集群上的文件流转,本地文件提供用户上传目标流转文件后,目标流转文件会流转到本地的文件接收用户的目录下,SFTP上传为本地文件提供用户上传的目标流转文件通过SFTP协议流转到远端文件接收用户的目录下,SFTP下载为从远端文件提供用户将目标流转文件通过SFTP协议下载到本地文件接收用户的目录下。In this embodiment, it is determined whether the circulation rules comply with the preset mode. If so, instruction information for uploading the target circulation file is sent to the file providing user, and the corresponding circulation mode is determined based on the circulation rules, and the storage directory of the target circulation file is determined based on the circulation mode. ; Send instructions for downloading the target transfer file to the file receiving user, and download the target transfer file based on the storage directory; among them, the transfer method includes local transfer and remote transfer, and the remote transfer includes SFTP upload and SFTP download, and the local transfer refers to the occurrence of For file transfer on the local cluster, the local file provider provides the user with the target transfer file, and the target transfer file will be transferred to the directory of the local file receiving user. SFTP upload provides the local file provider with the target transfer file uploaded by the user and is transferred to the target transfer file through the SFTP protocol. In the directory of the remote file receiving user, SFTP download allows the user to download the target transfer file from the remote file to the directory of the local file receiving user through the SFTP protocol.
在第四示范例中,通过扫描SQLite3数据库得到流转规则,基于自定义的模式模板——Shell-pattern表达式,判断流转规则是否与Shell-pattern表达式匹配,若匹配,则允许进行文件流转,若不匹配,则将不匹配的流转规则过滤掉,不允许进行文件流转。In the fourth demonstration example, the transfer rules are obtained by scanning the SQLite3 database. Based on the customized pattern template - Shell-pattern expression, it is judged whether the transfer rule matches the Shell-pattern expression. If it matches, file transfer is allowed. If there is no match, the unmatched transfer rules will be filtered out and file transfer will not be allowed.
在第五示范例中,图7为本申请实施例提供的文件流转方法的场景图六,如图7所示,基于文件提供用户,确定文件接收用户为本地用户还是远端用户;若为本地用户,文件提供用户通过SFTP安全协议登录GlusterFS分布式文件系统,将目标流转文件上传至本地服务器的指定存放目录中,文件接收用户通过SFTP安全协议从指定存放目录中获取目标流转文件;若为远端用户,文件提供用户基于SFTP安全协议登录GlusterFS分布式文件系统,将目标流转文件上传至本地服务器,再通过本地服务器将目标流转文件发送到远端服务器的指定存放目录中,文件接收用户通过SFTP安全协议从指定存放目录中获取目标流转文件。In the fifth exemplary example, Figure 7 is a scene diagram 6 of the file transfer method provided by the embodiment of the present application. As shown in Figure 7, based on the file providing user, it is determined whether the file receiving user is a local user or a remote user; if it is a local user User, the file providing user logs in to the GlusterFS distributed file system through the SFTP security protocol and uploads the target transfer file to the designated storage directory of the local server. The file receiving user obtains the target transfer file from the designated storage directory through the SFTP security protocol; if it is a remote End users, file providers log in to the GlusterFS distributed file system based on the SFTP security protocol, upload the target transfer file to the local server, and then send the target transfer file to the designated storage directory of the remote server through the local server. The file receiving user uses SFTP The security protocol obtains the target circulation file from the specified storage directory.
本实施例中,判断与目标流转文件关联的文件管理平台是否具有修改权限,若是,则基于文件管理平台对存放目录中的目标流转文件进行编辑;基于编辑后的目标流转文件对存放目录进行更新。In this embodiment, it is determined whether the file management platform associated with the target transfer file has modification authority. If so, the target transfer file in the storage directory is edited based on the file management platform; the storage directory is updated based on the edited target transfer file. .
本实施例中,在文件流转完成后,基于文件流转链获取文件流转日志,基于文件流转日志查找目标流转文件、编辑过程中生成的过程文件以及编辑后的目标流转文件,并进行备份,如使用RAID技术、GlusterFS的复制卷或者分布式复制卷对文件进行存储。还可通过文件流转日志检查文件流转的过程中是否出现问题,确保能够及时排查危险。此外,获取存放目录中的所有文件,通过一定的规则对文件进行清理,防止文件过多影响系统的稳定性。In this embodiment, after the file transfer is completed, the file transfer log is obtained based on the file transfer chain, the target transfer file, the process file generated during the editing process, and the edited target transfer file are searched based on the file transfer log, and backed up, such as using RAID technology, GlusterFS replicated volumes or distributed replicated volumes store files. You can also use the file transfer log to check whether problems occur during the file transfer process to ensure that risks can be identified in a timely manner. In addition, all files in the storage directory are obtained and the files are cleaned according to certain rules to prevent too many files from affecting the stability of the system.
本申请提供的文件流转方法,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于预设类别将至少一个文件提供用户划分到相应的用户组,为每个用户组设置流转规则,将流转规则分发到对应的流转处理层的集群中,通过流转规则所在的集群确定相应的至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于符合预设模式的流转规则建立文件提供用户和文件接收用户之间的文件流转,避免当用户的账号信息泄露时文件流转过程受到攻击,同时目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。The file transfer method provided by this application is based on the distributed file system responding to the business request for file transfer, determining at least one file provider corresponding to the file transfer, and uniformly storing the target transfer file through the distributed file system to ensure the integrity of the target transfer file. and high availability; configure the corresponding file interface for the target circulation file, divide at least one file providing user into the corresponding user group based on the preset category, set circulation rules for each user group, and distribute the circulation rules to the corresponding circulation processing In the cluster of layers, determine at least one corresponding file receiving user through the cluster where the circulation rule is located, conduct unified management of file providing users and file receiving users, and perform permission isolation between different users to ensure the security of target circulation files; Perform identity verification on the file providing user and the file receiving user. If the verification is passed, the file transfer between the file providing user and the file receiving user will be established based on the transfer rules that conform to the preset mode to avoid the file transfer process when the user's account information is leaked. Under attack, at the same time, the transfer process of target transfer files in the distributed file system does not require manual participation. File providing users and file receiving users do not need to dock multiple times with the distributed file system, which reduces the risk of docking and improves file transfer efficiency. and technical effects on security.
图8为本申请实施例提供的文件流转方法流程图二。如图8所示,本申请实施例提供的一种文件流转方法,包括:Figure 8 is a flowchart 2 of the file transfer method provided by the embodiment of the present application. As shown in Figure 8, a file transfer method provided by an embodiment of the present application includes:
S801、响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户;S801. In response to the business request for file transfer, determine at least one file provider corresponding to the file transfer;
S802、为目标流转文件配置相应的文件接口,并基于预设类别将至少一个文件提供用户划分到相应的用户组;基于文件接口为每个用户组设置相应的流转规则;基于流转规则确定至少一个文件接收用户;S802. Configure a corresponding file interface for the target transfer file, and divide at least one file providing user into a corresponding user group based on the preset category; set a corresponding transfer rule for each user group based on the file interface; determine at least one file based on the transfer rule. File receiving user;
S803、对文件提供用户和文件接收用户进行身份验证,若验证通过,则判断流转规则是否符合预设模式,若是,则向文件提供用户发送第一指示信息;其中,第一指示信息用于指示文件提供用户上传目标流转文件;S803. Perform identity verification on the file providing user and the file receiving user. If the verification is passed, determine whether the circulation rule conforms to the preset mode. If so, send the first instruction information to the file providing user; wherein the first instruction information is used to indicate File provides users with the ability to upload target circulation files;
S804、基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,将目标流转文件上传至存放目录;其中,流转方式包括本地流转和/或远端流转;S804. Determine the corresponding transfer method based on the transfer rules, determine the storage directory of the target transfer file based on the transfer method, and upload the target transfer file to the storage directory; where the transfer method includes local transfer and/or remote transfer;
S805、判断与目标流转文件关联的文件管理平台是否具有修改权限,若是,则基于文件管理平台对存放目录中的目标流转文件进行编辑;基于编辑后的目标流转文件对存放目录进行更新;S805. Determine whether the file management platform associated with the target transfer file has modification authority. If so, edit the target transfer file in the storage directory based on the file management platform; update the storage directory based on the edited target transfer file;
S806、向文件接收用户发送第二指示信息;其中,第二指示信息用于指示文件接收用户下载目标流转文件;基于存放目录,对目标流转文件进行下载;S806. Send the second instruction information to the file receiving user; wherein the second instruction information is used to instruct the file receiving user to download the target circulation file; download the target circulation file based on the storage directory;
S807、获取文件流转日志,基于文件流转日志查找目标流转文件、编辑过程中生成的过程文件、编辑后的目标流转文件;基于预设路径保存目标流转文件、过程文件、编辑后的目标流转文件;S807. Obtain the file transfer log, search for the target transfer file, the process file generated during the editing process, and the edited target transfer file based on the file transfer log; save the target transfer file, process file, and edited target transfer file based on the preset path;
S808、获取存放目录中存储的所有文件;基于预设要求对文件进行清理。S808. Obtain all files stored in the storage directory; clean the files based on preset requirements.
通过执行S801至S808,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于预设类别将至少一个文件提供用户划分到相应的用户组,为每个用户组设置流转规则,将流转规则分发到对应的流转处理层的集群中,通过流转规则所在的集群确定相应的至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则判断流转规则是否符合预设模式,若是,则指示文件提供用户上传目标流转文件,基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,并指示目标接收用户下载目标流转文件,目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。By executing S801 to S808, the distributed file system responds to the business request for file transfer, determines at least one file corresponding to the file transfer and provides it to the user, and uniformly stores the target transfer file through the distributed file system to ensure the integrity and high quality of the target transfer file. Availability; configure the corresponding file interface for the target transfer file, divide at least one file providing user into the corresponding user group based on the preset category, set transfer rules for each user group, and distribute the transfer rules to the corresponding transfer processing layer In the cluster, determine at least one corresponding file receiving user through the cluster where the circulation rule is located, conduct unified management of file providing users and file receiving users, and perform permission isolation between different users to ensure the security of target circulation files; Provide the user and the file receiving user for identity verification. If the verification is passed, it will be judged whether the transfer rule conforms to the preset mode. If so, the file provider user will be instructed to upload the target transfer file, determine the corresponding transfer method based on the transfer rules, and determine the target based on the transfer method. The storage directory of the transfer file, and instructs the target receiving user to download the target transfer file. The transfer process of the target transfer file in the distributed file system does not require manual participation. The file providing user and the file receiving user do not need to dock multiple times with the distributed file system. , reducing the risk of docking, and achieving the technical effect of improving file transfer efficiency and security.
在第六示范例中,图9为本申请实施例提供的文件流转方法的场景图七,如图9所示,首先,系统操作人员基于接收到的文件流转的业务请求确定文件流转对应的至少一个文件提供用户,并为目标流转文件配置相应的文件接口;其次,基于预设类别将至少一个文件提供用户划分到相应的用户组,为每个用户组设置流转规则,基于负载均衡原则,将流转规则分发到对应的Worker流转处理层的集群中,通过流转规则所在的集群确定相应的至少一个文件接收用户;最后,通知文件提供用户和文件接收用户进行文件的上传与下载,实现文件提供用户和文件接收用户之间的文件流转。In the sixth exemplary example, Figure 9 is scene diagram 7 of the file transfer method provided by the embodiment of the present application. As shown in Figure 9, first, the system operator determines at least the file transfer corresponding to the service request based on the received file transfer. Provide users with a file and configure the corresponding file interface for the target transfer file; secondly, divide at least one file provider user into the corresponding user group based on the preset category, set transfer rules for each user group, and based on the load balancing principle, The circulation rules are distributed to the cluster of the corresponding Worker circulation processing layer, and at least one corresponding file receiving user is determined through the cluster where the circulation rule is located; finally, the file providing user and the file receiving user are notified to upload and download the file, realizing the file providing user File transfer between file receiving users.
本申请提供的文件流转方法,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于预设类别将至少一个文件提供用户划分到相应的用户组,为每个用户组设置流转规则,基于流转规则确定至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转,避免当用户的账号信息泄露时文件流转过程受到攻击,同时目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。The file transfer method provided by this application is based on the distributed file system responding to the business request for file transfer, determining at least one file provider corresponding to the file transfer, and uniformly storing the target transfer file through the distributed file system to ensure the integrity of the target transfer file. and high availability; configure the corresponding file interface for the target transfer file, divide at least one file providing user into the corresponding user group based on the preset category, set transfer rules for each user group, and determine at least one file receiving user based on the transfer rules , conduct unified management of file providing users and file receiving users, and perform permission isolation between different users to ensure the security of target transfer files; perform identity verification on file providing users and file receiving users, and if the verification is passed, based on the predetermined Set up a method to create file transfer between the file provider user and the file receiving user to avoid attacks on the file transfer process when the user's account information is leaked. At the same time, the transfer process of target transfer files in the distributed file system does not require manual participation. The file provider user Users who receive files do not need to make multiple connections with the distributed file system, which reduces the risk of connection and achieves the technical effect of improving file transfer efficiency and security.
图10为本申请实施例提供的文件流转设备的结构示意图。如图10所示,本实施例提供的一种文件流转设备1000,包括:确定模块1001、第一处理模块1002、第二处理模块1003,Figure 10 is a schematic structural diagram of a file transfer device provided by an embodiment of the present application. As shown in Figure 10, a file transfer device 1000 provided in this embodiment includes: a determination module 1001, a first processing module 1002, and a second processing module 1003,
确定模块1001,用于响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户;Determination module 1001, configured to respond to a business request for file transfer and determine at least one file providing user corresponding to the file transfer;
第一处理模块1002,用于为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户;其中,流转规则包括本地流转和/或远端流转;The first processing module 1002 is configured to configure a corresponding file interface for the target transfer file, set transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules; where the transfer rules include local transfer and/or remote transfer;
第二处理模块1003,用于对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转。The second processing module 1003 is used to perform identity verification on the file providing user and the file receiving user. If the verification is passed, establish file transfer between the file providing user and the file receiving user based on a preset method.
一种可能的实现方式中,第二处理模块1003用于:In a possible implementation, the second processing module 1003 is used to:
判断流转规则是否符合预设模式,若是,则向文件提供用户发送第一指示信息;其中,第一指示信息用于指示文件提供用户上传目标流转文件;Determine whether the circulation rule conforms to the preset pattern, and if so, send first instruction information to the file providing user; wherein the first instruction information is used to instruct the file providing user to upload the target circulation file;
基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,将目标流转文件上传至存放目录;其中,流转方式包括本地流转和/或远端流转;Determine the corresponding transfer method based on the transfer rules, determine the storage directory of the target transfer file based on the transfer method, and upload the target transfer file to the storage directory; where the transfer method includes local transfer and/or remote transfer;
将存放目录中的目标流转文件同步至文件接收用户。Synchronize the target transfer file in the storage directory to the file receiving user.
一种可能的实现方式中,第二处理模块1003还用于:In a possible implementation, the second processing module 1003 is also used to:
向文件接收用户发送第二指示信息;其中,第二指示信息用于指示文件接收用户下载目标流转文件;Send second instruction information to the file receiving user; wherein the second instruction information is used to instruct the file receiving user to download the target circulation file;
基于存放目录,对目标流转文件进行下载。Based on the storage directory, download the target circulation file.
一种可能的实现方式中,第二处理模块1003还用于:In a possible implementation, the second processing module 1003 is also used to:
判断与目标流转文件关联的文件管理平台是否具有修改权限,若是,则基于文件管理平台对存放目录中的目标流转文件进行编辑;Determine whether the file management platform associated with the target transfer file has modification permissions. If so, edit the target transfer file in the storage directory based on the file management platform;
基于编辑后的目标流转文件对存放目录进行更新。Update the storage directory based on the edited target transfer file.
一种可能的实现方式中,第二处理模块1003还用于:In a possible implementation, the second processing module 1003 is also used to:
获取文件流转日志,基于文件流转日志查找目标流转文件、编辑过程中生成的过程文件、编辑后的目标流转文件;Obtain the file transfer log, and search the target transfer file, the process file generated during the editing process, and the edited target transfer file based on the file transfer log;
基于预设路径保存目标流转文件、过程文件、编辑后的目标流转文件。Save target transfer files, process files, and edited target transfer files based on preset paths.
一种可能的实现方式中,第二处理模块1003还用于:In a possible implementation, the second processing module 1003 is also used to:
获取存放目录中存储的所有文件;Get all files stored in the storage directory;
基于预设要求对文件进行清理。Clean files based on preset requirements.
一种可能的实现方式中,第一处理模块1002用于:In a possible implementation, the first processing module 1002 is used to:
基于预设类别将至少一个文件提供用户划分到相应的用户组;classify at least one file providing user into a corresponding user group based on a preset category;
基于文件接口为每个用户组设置相应的流转规则。Set corresponding transfer rules for each user group based on the file interface.
本申请提供的文件流转设备,包括确定模块、第一处理模块、第二处理模块,通过确定模块基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;通过第一处理模块为目标流转文件配置相应的文件接口,并基于预设类别将至少一个文件提供用户划分到相应的用户组,为每个用户组设置流转规则,将流转规则分发到对应的流转处理层的集群中,通过流转规则所在的集群确定相应的至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;通过第二处理模块对文件提供用户和文件接收用户进行身份验证,若验证通过,则判断流转规则是否符合预设模式,若是,则指示文件提供用户上传目标流转文件,基于流转规则确定相应的流转方式,基于流转方式确定目标流转文件的存放目录,并指示目标接收用户下载目标流转文件,目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。The file transfer device provided by this application includes a determination module, a first processing module, and a second processing module. The determination module responds to a business request for file transfer based on the distributed file system and determines at least one file provider corresponding to the file transfer. The distributed file system uniformly stores the target transfer files to ensure the integrity and high availability of the target transfer files; configures corresponding file interfaces for the target transfer files through the first processing module, and divides at least one file providing user into the corresponding file based on the preset category User groups, set transfer rules for each user group, distribute the transfer rules to the cluster of the corresponding transfer processing layer, determine at least one corresponding file receiving user through the cluster where the transfer rule is located, and provide file providing users and file receiving users Carry out unified management and isolate permissions between different users to ensure the security of target transfer files; use the second processing module to authenticate the identities of file providing users and file receiving users. If the verification is passed, it is judged whether the transfer rules comply with the predetermined Set mode, if so, instruct the file to provide the user with uploading the target circulation file, determine the corresponding circulation mode based on the circulation rules, determine the storage directory of the target circulation file based on the circulation mode, and instruct the target receiving user to download the target circulation file, and the target circulation file is distributed The transfer process within the distributed file system does not require manual participation. File providing users and file receiving users do not need to dock with the distributed file system multiple times, which reduces the risk of docking and achieves the technical effect of improving file transfer efficiency and security.
图11为本申请实施例提供的文件流转设备的硬件结构图。如图11所示,该文件流转设备1100包括:Figure 11 is a hardware structure diagram of a file transfer device provided by an embodiment of the present application. As shown in Figure 11, the file transfer device 1100 includes:
处理器1101和存储器1102;Processor 1101 and memory 1102;
存储器存储计算机执行指令;Memory stores instructions for execution by the computer;
处理器执行存储器1102存储的计算机执行指令,使得文件流转设备执行如上述的文件流转方法。The processor executes the computer execution instructions stored in the memory 1102, so that the file transfer device executes the file transfer method as described above.
应理解,上述处理器1101可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital SignalProcessor,简称:DSP)、专用集成电路(英文:Application Specific IntegratedCircuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合发明所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。存储器1102可能包含高速随机存取存储器(英文:Random Access Memory,简称:RAM),也可能还包括非易失性存储器(英文:Non-volatilememory,简称:NVM),例如至少一个磁盘存储器,还可以为U盘、移动硬盘、只读存储器、磁盘或光盘等。It should be understood that the above-mentioned processor 1101 can be a central processing unit (English: Central Processing Unit, abbreviation: CPU), or other general-purpose processor, a digital signal processor (English: Digital SignalProcessor, abbreviation: DSP), or an application-specific integrated circuit. (English: Application Specific Integrated Circuit, abbreviation: ASIC), etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in conjunction with the invention can be directly embodied and executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The memory 1102 may include high-speed random access memory (English: Random Access Memory, abbreviation: RAM), and may also include non-volatile memory (English: Non-volatile memory, abbreviation: NVM), such as at least one disk memory, and may also include For U disk, mobile hard disk, read-only memory, magnetic disk or optical disk, etc.
本申请实施例相应还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现如上述的文件流转方法。Correspondingly, embodiments of the present application also provide a computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When the computer-executable instructions are executed by a processor, they are used to implement the above file transfer method.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其他实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求书指出。Other embodiments of the present application will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary technical means in the technical field that are not disclosed in this application. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求书来限制。It is to be understood that the present application is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311002334.8A CN117056283A (en) | 2023-08-09 | 2023-08-09 | File transfer method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311002334.8A CN117056283A (en) | 2023-08-09 | 2023-08-09 | File transfer method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117056283A true CN117056283A (en) | 2023-11-14 |
Family
ID=88658290
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311002334.8A Pending CN117056283A (en) | 2023-08-09 | 2023-08-09 | File transfer method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117056283A (en) |
-
2023
- 2023-08-09 CN CN202311002334.8A patent/CN117056283A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11816003B2 (en) | Methods for securely facilitating data protection workflows and devices thereof | |
CN114787781B (en) | Systems and methods for enabling highly available managed failover services | |
US10819701B2 (en) | Autonomous secrets management for a managed service identity | |
CN114756519B (en) | Managed file synchronization with stateless sync nodes | |
US10691790B2 (en) | Autonomous secrets management for a temporary shared access signature service | |
US9507678B2 (en) | Non-disruptive controller replacement in a cross-cluster redundancy configuration | |
CN104580395B (en) | A kind of cloudy collaboration Storage Middleware Applying system based on existing cloud storage platform | |
US11122012B2 (en) | License utilization management system service suite | |
CN106407011A (en) | A routing table-based search system cluster service management method and system | |
CN111385325B (en) | P2P-based file distribution system and method | |
EP3765982A1 (en) | Autonomous cross-scope secrets management | |
CN105072183A (en) | Management method and management device for cloud operation system (OS) software repository | |
US20240054054A1 (en) | Data Backup Method and System, and Related Device | |
US10862887B2 (en) | Multiple domain authentication using data management and storage node | |
CN117131493A (en) | Permission management system construction method, device, equipment and storage medium | |
US9749278B1 (en) | Persistent connections for email web applications | |
WO2024021703A1 (en) | Server control method, server, and storage medium | |
US10353733B1 (en) | Systems and methods for performing virtual machine updates without rebuild of distributed databases thereon | |
CN117056283A (en) | File transfer method, device and storage medium | |
WO2020038106A1 (en) | Bmc management method and system and related device | |
JP5734421B2 (en) | Management information generation method, management information generation program, and management information generation apparatus | |
JP7212158B2 (en) | Provider network service extension | |
CN114745757A (en) | A cluster switching method, device, equipment and medium | |
US9961027B2 (en) | Email webclient automatic failover | |
Mattox | Rancher Deep Dive |
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 |