File flow conversion method, device and storage medium
Patent Information
- Application Number
- CN202311002334.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-08-09
AI Technical Summary
[0005]本申请提供一种文件流转方法、设备及存储介质,用以解决现有技术中文件流转效率低以及安全性差的技术问题
[0057]本申请提供的文件流转方法、设备及存储介质,基于分布式文件系统响应于文件流转的业务请求,确定文件流转对应的至少一个文件提供用户,通过分布式文件系统统一存储目标流转文件,确保目标流转文件的完整性及高可用性;为目标流转文件配置相应的文件接口,并基于文件接口设置流转规则,基于流转规则确定至少一个文件接收用户,对文件提供用户和文件接收用户进行统一管理,并在不同用户之间进行权限隔离,保证目标流转文件的安全性;对文件提供用户和文件接收用户进行身份验证,若验证通过,则基于预设方式建立文件提供用户和文件接收用户之间的文件流转,避免当用户的账号信息泄露时文件流转过程受到攻击,同时目标流转文件在分布式文件系统内的流转过程无需人工参与,文件提供用户和文件接收用户不需要与分布式文件系统进行多次对接,降低了对接危险,实现了提高文件流转效率以及安全性的技术效果。
Smart Images

Figure CN117056283B_ABST
Abstract
Description
Technical Field
[0001] This application relates to Internet technology, and more particularly to a file transfer method, device, and storage medium. Background Technology
[0002] 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 file transfer provides convenience, it also brings corresponding security risks. Therefore, it is necessary to establish a secure, accurate, and efficient file transfer system.
[0003] The existing file transfer method uses 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. The file recipient then downloads the specified file from the OSS file storage system according to the storage path.
[0004] Because the OSS file storage system is not fully automated, it consumes a lot of manpower and time during file transfer, and there is a possibility of human error and missing files, resulting in a high error rate in file transfer and thus affecting the efficiency of file transfer. Furthermore, downloading files from the OSS file storage system cannot guarantee that all files will be downloaded at once, and unclear download permissions can easily lead to unauthorized access, failing to meet security requirements. Therefore, existing technologies suffer from low file transfer efficiency and poor security. Summary of the Invention
[0005] This application provides a file transfer method, device, and storage medium to solve the technical problems of low file transfer efficiency and poor security in the prior art.
[0006] Firstly, this application provides a document transfer method, including:
[0007] In response to a business request for file transfer, identify at least one file-providing user corresponding to the file transfer;
[0008] Configure the corresponding file interface for the target file to be transferred, set the transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules;
[0009] The system authenticates both the file provider and the file receiver. If authentication is successful, the system establishes a file transfer between the file provider and the file receiver based on a preset method.
[0010] Optionally, file transfer between the file providing user and the file receiving user is established based on a preset method, including:
[0011] Determine whether the streaming rules conform to the preset pattern. If so, send the first instruction information to the file provider user. The first instruction information is used to instruct the file provider user to upload the target streaming file.
[0012] The corresponding transfer method is determined based on the transfer rules, the storage directory of the target transfer file is determined based on the transfer method, and the target transfer file is uploaded to the storage directory; wherein, the transfer method includes local transfer and / or remote transfer;
[0013] Synchronize the target streaming files in the storage directory to the file receiving user.
[0014] Optionally, the target streaming files in the storage directory are synchronized to the file receiving user, including:
[0015] Send a second instruction message to the file receiving user; wherein the second instruction message is used to instruct the file receiving user to download the target streaming file;
[0016] Download the target streaming file based on the storage directory.
[0017] Optionally, uploading the target streaming file to the storage directory also includes:
[0018] Determine whether the file management platform associated with the target file has modification permissions. If so, edit the target file in the storage directory based on the file management platform.
[0019] The storage directory is updated based on the edited target stream file.
[0020] Optionally, establishing file transfer between the file providing user and the file receiving user based on a preset method also includes:
[0021] Obtain the file flow log, and use the file flow log to find the target flow file, the process files generated during editing, and the edited target flow file;
[0022] The target stream file, process file, and edited target stream file are saved based on a preset path.
[0023] Optionally, establishing file transfer between the file providing user and the file receiving user based on a preset method also includes:
[0024] Retrieve all files stored in the directory;
[0025] Clean up the files based on preset requirements.
[0026] Optionally, flow rules can be set based on the file interface, including:
[0027] Based on a preset category, at least one file is provided to the user and assigned to the corresponding user group;
[0028] Each user group can set corresponding flow rules based on the file interface.
[0029] Secondly, this application provides a document transfer device, comprising:
[0030] The determination module is used to respond to business requests for file transfer and determine at least one file provided by the user corresponding to the file transfer;
[0031] The first processing module is used to configure the corresponding file interface for the target file to be transferred, set the 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;
[0032] The second processing module is used to authenticate the file provider and the file receiver. If the authentication is successful, the file transfer between the file provider and the file receiver is established based on a preset method.
[0033] Optionally, the second processing module is used for:
[0034] Determine whether the streaming rules conform to the preset pattern. If so, send the first instruction information to the file provider user. The first instruction information is used to instruct the file provider user to upload the target streaming file.
[0035] The corresponding transfer method is determined based on the transfer rules, the storage directory of the target transfer file is determined based on the transfer method, and the target transfer file is uploaded to the storage directory; wherein, the transfer method includes local transfer and / or remote transfer;
[0036] Synchronize the target streaming files in the storage directory to the file receiving user.
[0037] Optionally, the second processing module is also used for:
[0038] Send a second instruction message to the file receiving user; wherein the second instruction message is used to instruct the file receiving user to download the target streaming file;
[0039] Download the target streaming file based on the storage directory.
[0040] Optionally, the second processing module is also used for:
[0041] Determine whether the file management platform associated with the target file has modification permissions. If so, edit the target file in the storage directory based on the file management platform.
[0042] The storage directory is updated based on the edited target stream file.
[0043] Optionally, the second processing module is also used for:
[0044] Obtain the file flow log, and use the file flow log to find the target flow file, the process files generated during editing, and the edited target flow file;
[0045] The target stream file, process file, and edited target stream file are saved based on a preset path.
[0046] Optionally, the second processing module is also used for:
[0047] Retrieve all files stored in the directory;
[0048] Clean up the files based on preset requirements.
[0049] Optionally, the first processing module is used for:
[0050] Based on a preset category, at least one file is provided to the user and assigned to the corresponding user group;
[0051] Each user group can set corresponding flow rules based on the file interface.
[0052] A third aspect of this application provides a document transfer device, comprising:
[0053] Processor and memory;
[0054] The memory stores instructions that the computer executes;
[0055] The processor executes computer execution instructions stored in memory, causing the file transfer device to perform any of the file transfer methods in the first aspect.
[0056] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the file transfer method as described in any of the first aspects.
[0057] The file transfer method, device, and storage medium provided in this application respond to file transfer business requests based on a distributed file system. They determine at least one file provider user corresponding to the file transfer, and uniformly store the target file transfer file through the distributed file system to ensure its integrity and high availability. They configure corresponding file interfaces for the target file transfer, set transfer rules based on these interfaces, and determine at least one file receiver user based on these rules. They manage both the file provider and receiver users uniformly and isolate permissions between different users to ensure the security of the target file transfer. They authenticate both the file provider and receiver users; if authentication is successful, file transfer is established between them using a preset method. This prevents attacks on the file transfer process when user account information is leaked. Furthermore, the transfer process of the target file transfer within the distributed file system requires no manual intervention, and the file provider and receiver users do not need to interact with the distributed file system multiple times, reducing the risk of interface conflicts and achieving the technical effects of improving file transfer efficiency and security. Attached Figure Description
[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0059] Figure 1 The file transfer method flow provided in the embodiments of this application Figure 1 ;
[0060] Figure 2 Scenario for the file transfer method provided in the embodiments of this application Figure 1 ;
[0061] Figure 3 Scenario for the file transfer method provided in the embodiments of this application Figure 2 ;
[0062] Figure 4 Scenario for the file transfer method provided in the embodiments of this application Figure 3 ;
[0063] Figure 5 Scenario for the file transfer method provided in the embodiments of this application Figure 4 ;
[0064] Figure 6 Scenario for the file transfer method provided in the embodiments of this application Figure 5 ;
[0065] Figure 7 Scenario for the file transfer method provided in the embodiments of this application Figure 6 ;
[0066] Figure 8 The file transfer method flow provided in the embodiments of this application Figure 2 ;
[0067] Figure 9 Scenario for the file transfer method provided in the embodiments of this application Figure 7 ;
[0068] Figure 10 This is a schematic diagram of the structure of the document transfer device provided in the embodiments of this application;
[0069] Figure 11 This is a hardware structure diagram of the file transfer device provided in the embodiments of this application.
[0070] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0071] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0072] In existing technologies, file transfer is performed using the OSS file storage system. The file provider pulls specified data content based on a specified file format to generate a file, which is then uploaded to a specified path in the OSS file storage system. However, human error and file omissions may occur during the upload process, affecting the efficiency of file transfer. After the file is uploaded, the storage path is informed to the file recipient, who then downloads the specified files from the OSS file storage system according to the storage path. However, it is not guaranteed that all files will be downloaded at once, and download permissions are unclear, making unauthorized access easy to occur. The entire file transfer process also consumes a lot of manpower and time. Therefore, existing technologies suffer from low file transfer efficiency and poor security.
[0073] The file transfer method, device, and storage medium provided in this application respond to file transfer business requests based on a distributed file system. They determine at least one file provider user corresponding to the file transfer, and uniformly store the target file transfer file through the distributed file system to ensure its integrity and high availability. They configure corresponding file interfaces for the target file transfer, set transfer rules based on these interfaces, and determine at least one file receiver user based on these rules. They manage both the file provider and receiver users uniformly and isolate permissions between different users to ensure the security of the target file transfer. They authenticate both the file provider and receiver users; if authentication is successful, file transfer is established between them using a preset method. This prevents attacks on the file transfer process when user account information is leaked. Furthermore, the transfer process of the target file transfer within the distributed file system requires no manual intervention, and the file provider and receiver users do not need to interact with the distributed file system multiple times, reducing the risk of interface conflicts and achieving the technical effects of improving file transfer efficiency and security.
[0074] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These 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 this application will be described below with reference to the accompanying drawings.
[0075] Figure 1 The file transfer method flow provided in the embodiments of this application Figure 1 .like Figure 1 As shown, this embodiment provides a file transfer method, including:
[0076] S101. In response to the business request for file transfer, determine at least one file providing user corresponding to the file transfer;
[0077] 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 a scalable network file system. Compared with other distributed file systems, the GlusterFS distributed file system has the characteristics of high scalability, high availability, and high performance. Figure 2 Scenario for the file transfer method provided in the embodiments of this application Figure 1 ,like Figure 2As shown, the GlusterFS distributed file system adopts an architecture consisting of a management layer, a Master central control layer, and a Worker workflow processing layer. The management layer is operated by system personnel using corresponding programs, including maintaining and managing the GlusterFS distributed file system. The Master central control layer serves as the central system for communication control between the management layer and the Worker workflow processing layer, primarily managing the various clusters within the Worker workflow processing layer and the allocation of workflow rules. The Worker workflow processing layer is mainly responsible for processing the file workflow and is the core business layer of the GlusterFS distributed file system. System operators receive file workflow requests at the management layer and determine at least one file corresponding to the workflow to provide to the user. For example, this can be achieved through a Celery distributed task queue, using multiple threads to process file workflow requests.
[0078] S102. Configure the corresponding file interface for the target file to be transferred, and set the transfer rules based on the file interface, and determine at least one file receiving user based on the transfer rules;
[0079] In this embodiment, as Figure 3 Scenario for the file transfer method provided in the embodiments of this application Figure 2 ,like Figure 3As shown, the GlusterFS distributed file system can be divided into a system configuration module, a user management module, a workflow management module, a file exchange management module, a workflow log management module, and a whitelist management module according to its functional architecture. The system configuration module includes cluster management, application management, system monitoring, and system configuration. Cluster management manages the entire GlusterFS distributed file system cluster and maintains cluster information, such as adding, deleting, and modifying data. Application management synchronizes application information from the file management platform for easier maintenance. The user management module includes local users, remote users, user groups, and user export. Local and remote users manage the local and remote user information for each cluster. Local user information includes basic information such as username and password, as well as space limits. Remote user information includes basic information such as username and password. User groups are used to divide users into groups for easier user management and workflow rule maintenance. The export module is used to export user information for auditing and maintenance. The file transfer management module is used to transfer files, including local transfer, remote transfer, upload transfer, download transfer, one-to-one transfer, one-to-many transfer, many-to-one transfer, and many-to-many transfer. The file exchange management module includes file interface management, upload and download management, scheduled file cleanup, and file editing. File interface management is used to maintain and modify file interfaces for reuse and integration with other systems. Scheduled file cleanup is used to prevent excessive files from affecting the overall performance and stability of the GlusterFS distributed file system. The file transfer log management module includes file transfer chains and log queries. The file transfer chain records a series of process logs from the start to the end of the file transfer, including log information for file comparison, backup, transfer, and deletion. The whitelist management module includes adding / editing whitelists. The whitelist management module is used to authenticate users and prevent attackers from launching login attacks if user account passwords are leaked.
[0080] In this embodiment, the target file for file transfer is determined based on the received file transfer business request, and a corresponding file interface is configured for the target file according to the business request, including the Chinese name of the configuration file interface, the English name of the file interface, the application, the file server cluster, the file interface path, and related remarks. At least one file is assigned to a corresponding user group based on a preset category, such as grouping by province, and transfer rules are set for each user group based on the corresponding active servers; wherein, the transfer rules include one-to-one transfer, one-to-many transfer, many-to-one transfer, and many-to-many transfer.
[0081] In the first example, Figure 4 Scenario for the file transfer method provided in the embodiments of this application Figure 3 ,like Figure 4As shown, based on VIP and Keepalived technologies, it is determined whether the corresponding server is in normal working condition. If not, the flow rules are set for other servers in normal working condition through VRRP protocol or custom script.
[0082] In this embodiment, based on the principle of load balancing, the flow rules are distributed to the corresponding Worker flow processing layer clusters, and at least one file receiving user is determined by the cluster where the flow rules are located. When there are many flow rules and the pressure on the Worker flow processing layer is high, the Worker flow processing layer can be dynamically expanded horizontally to ensure the timeliness and reliability of the flow rules. The flow rules are stored in the database.
[0083] In the second example, Figure 5 Scenario for the file transfer method provided in the embodiments of this application Figure 4 ,like Figure 5 As shown, based on the consistent hashing algorithm, the hash value of the transfer rule is calculated and the hash value of the Worker transfer processing layer cluster is compared. The two hash values are then compared to determine the cluster where the transfer rule is located, and thus determine at least one corresponding file receiving user. If a cluster goes down, the hash value of the transfer rule and the hash value of the Worker transfer processing layer cluster are recalculated, and the transfer rule is allocated to ensure the high availability of the transfer rule.
[0084] S103. Verify the identity of the file provider and the file receiver. If the verification is successful, establish a file transfer between the file provider and the file receiver based on a preset method.
[0085] In this embodiment, the user providing the file and the user receiving the file are authenticated. If the authentication is successful, the user providing the file and the user receiving the file are added to the whitelist.
[0086] In the third example, Figure 6 Scenario for the file transfer method provided in the embodiments of this application Figure 5 ,like Figure 6 As shown, FULLNAT and TOA technologies are used to locate the IP addresses of file providers and file receivers, ensuring the traceability of file providers and file receivers, thereby identifying users with login permissions. Based on the Layer 4 load balancing protocol of SLB, a security whitelist is configured for file providers and file receivers.
[0087] In this embodiment, it is determined whether the transfer rule conforms to a preset mode. If so, an instruction to upload the target transfer file is sent to the file providing user, and the corresponding transfer method is determined based on the transfer rule. The storage directory of the target transfer file is determined based on the transfer method. An instruction to download the target transfer file is sent to the file receiving user, and the target transfer file is downloaded based on the storage directory. The transfer method includes local transfer and remote transfer. Remote transfer includes SFTP upload and SFTP download. Local transfer refers to file transfer that occurs on the local cluster. After the local file providing user uploads the target transfer file, the target transfer file will be transferred to the directory of the local file receiving user. SFTP upload is the transfer of the target transfer file uploaded by the local file providing user to the directory of the remote file receiving user via the SFTP protocol. SFTP download is the download of the target transfer file from the remote file providing user to the directory of the local file receiving user via the SFTP protocol.
[0088] In the fourth example, the flow rules are obtained by scanning the SQLite3 database. Based on the custom pattern template - Shell-pattern expression, it is determined whether the flow rules match the Shell-pattern expression. If they match, file flow is allowed. If they do not match, the mismatched flow rules are filtered out and file flow is not allowed.
[0089] In the fifth example, Figure 7 Scenario for the file transfer method provided in the embodiments of this application Figure 6 ,like Figure 7 As shown, based on the file provider user, it is determined whether the file recipient user is a local user or a remote user. If it is a local user, the file provider user logs into the GlusterFS distributed file system via the SFTP security protocol, uploads the target transfer file to the specified storage directory on the local server, and the file recipient user retrieves the target transfer file from the specified storage directory via the SFTP security protocol. If it is a remote user, the file provider user logs into the GlusterFS distributed file system via the SFTP security protocol, uploads the target transfer file to the local server, and then sends the target transfer file to the specified storage directory on the remote server via the local server. The file recipient user retrieves the target transfer file from the specified storage directory via the SFTP security protocol.
[0090] In this embodiment, it is determined whether the file management platform associated with the target circulating file has modification permissions. If so, the target circulating file in the storage directory is edited based on the file management platform; the storage directory is updated based on the edited target circulating file.
[0091] 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, process files generated during editing, and the edited target transfer file are located based on the file transfer log and backed up, such as using RAID technology, GlusterFS replicated volumes, or distributed replicated volumes for file storage. The file transfer log can also be used to check for problems during the file transfer process, ensuring timely troubleshooting. Furthermore, all files in the storage directory are retrieved and cleaned up according to certain rules to prevent excessive files from affecting system stability.
[0092] The file transfer method provided in this application responds to file transfer business requests based on a distributed file system. It identifies at least one file provider corresponding to the file transfer, and uses the distributed file system to uniformly store the target file, ensuring its integrity and high availability. It configures corresponding file interfaces for the target file and assigns at least one file provider to a corresponding user group based on preset categories. Transfer rules are set for each user group and distributed to the corresponding transfer processing layer cluster. At least one file receiver is identified through the cluster containing the transfer rules. File providers and receivers are managed uniformly, and access is isolated between different users to ensure the security of the target file. The method authenticates both the file provider and receiver. If authentication is successful, file transfer is established between them based on transfer rules conforming to a preset pattern. This prevents attacks on the file transfer process when user account information is leaked. Furthermore, the transfer process of the target file within the distributed file system requires no manual intervention, and file providers and receivers do not need to interact with the distributed file system multiple times, reducing the risk of interface conflicts and achieving the technical effects of improving file transfer efficiency and security.
[0093] Figure 8 The file transfer method flow provided in the embodiments of this application Figure 2 .like Figure 8 As shown in the embodiment of this application, a file transfer method includes:
[0094] S801. In response to a business request for file transfer, determine at least one file-providing user corresponding to the file transfer;
[0095] S802. Configure the corresponding file interface for the target file to be transferred, and assign at least one file to the corresponding user group based on the preset category; set the corresponding transfer rules for each user group based on the file interface; determine at least one file receiving user based on the transfer rules;
[0096] S803. Verify the identity of the file provider and the file receiver. If the verification is successful, determine whether the transfer rules conform to the preset mode. If so, send the first instruction information to the file provider. The first instruction information is used to instruct the file provider to upload the target transfer file.
[0097] 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; wherein, the transfer method includes local transfer and / or remote transfer;
[0098] S805. Determine whether the file management platform associated with the target streaming file has modification permissions. If so, edit the target streaming file in the storage directory based on the file management platform; update the storage directory based on the edited target streaming file.
[0099] S806. Send a second instruction message to the file receiving user; wherein the second instruction message is used to instruct the file receiving user to download the target streaming file; download the target streaming file based on the storage directory;
[0100] S807. Obtain the file flow log, and based on the file flow log, find the target flow file, the process file generated during the editing process, and the edited target flow file; save the target flow file, the process file, and the edited target flow file based on a preset path;
[0101] S808: Obtain all files stored in the storage directory; clean up the files based on preset requirements.
[0102] By executing steps S801 to S808, in response to business requests for file transfer based on a distributed file system, at least one file-providing user corresponding to the file transfer is identified. The target transfer file is stored uniformly through the distributed file system, ensuring its integrity and high availability. A corresponding file interface is configured for the target transfer file, and at least one file-providing user is assigned to a corresponding user group based on a preset category. Transfer rules are set for each user group, and these rules are distributed to the corresponding transfer processing layer cluster. At least one file-receiving user is determined based on the cluster containing the transfer rules. File-providing and file-receiving users are managed uniformly, and information is shared across different user groups. Access control is implemented between different systems to ensure the security of the target file. The system authenticates both the file provider and the file receiver. If authentication is successful, it checks if the file transfer rules conform to a preset pattern. If so, it instructs the file provider to upload the target file, determines the appropriate transfer method based on the rules, identifies the storage directory for the target file based on the transfer method, and instructs the target receiver to download the file. The file transfer process within the distributed file system requires no manual intervention. The file provider and receiver do not need to interact with the distributed file system multiple times, reducing the risk of interface conflicts and achieving the technical effects of improving file transfer efficiency and security.
[0103] In the sixth example, Figure 9 Scenario for the file transfer method provided in the embodiments of this application Figure 7 ,like Figure 9 As shown, firstly, the system operator determines at least one file provider user corresponding to the file transfer based on the received file transfer business request, and configures the corresponding file interface for the target file to be transferred. Secondly, based on preset categories, at least one file provider user is assigned to a corresponding user group, and transfer rules are set for each user group. Based on the load balancing principle, the transfer rules are distributed to the corresponding Worker transfer processing layer clusters, and at least one file receiving user is determined through the cluster where the transfer rules are located. Finally, the file provider user and the file receiving user are notified to upload and download the file, thus realizing the file transfer between the file provider user and the file receiving user.
[0104] The file transfer method provided in this application responds to business requests for file transfer based on a distributed file system. It identifies at least one file provider corresponding to the file transfer, stores the target file in a unified manner through the distributed file system, ensuring the integrity and high availability of the target file. It configures corresponding file interfaces for the target file and assigns at least one file provider to a corresponding user group based on preset categories. Transfer rules are set for each user group, and at least one file receiver is identified based on these rules. The file provider and receiver are managed uniformly, and access is isolated between different users to ensure the security of the target file. The method authenticates both the file provider and receiver. If authentication is successful, file transfer is established between them using a preset method, preventing attacks on the file transfer process when user account information is leaked. Furthermore, the transfer process of the target file within the distributed file system requires no manual intervention, and the file provider and receiver do not need to interface with the distributed file system multiple times, reducing the risk of interface failures and achieving the technical effects of improving file transfer efficiency and security.
[0105] Figure 10 This is a schematic diagram of the file transfer device provided in an embodiment of this application. Figure 10 As shown, this embodiment provides a file transfer device 1000, including: a determining module 1001, a first processing module 1002, and a second processing module 1003.
[0106] The determination module 1001 is used to determine, in response to a business request for file transfer, at least one file provider user corresponding to the file transfer;
[0107] The first processing module 1002 is used to configure a corresponding file interface for the target file to be transferred, and to set transfer rules based on the file interface, and to determine at least one file receiving user based on the transfer rules; wherein, the transfer rules include local transfer and / or remote transfer;
[0108] The second processing module 1003 is used to authenticate the file provider and the file receiver. If the authentication is successful, the file transfer between the file provider and the file receiver is established based on a preset method.
[0109] In one possible implementation, the second processing module 1003 is used for:
[0110] Determine whether the streaming rules conform to the preset pattern. If so, send the first instruction information to the file provider user. The first instruction information is used to instruct the file provider user to upload the target streaming file.
[0111] The corresponding transfer method is determined based on the transfer rules, the storage directory of the target transfer file is determined based on the transfer method, and the target transfer file is uploaded to the storage directory; wherein, the transfer method includes local transfer and / or remote transfer;
[0112] Synchronize the target streaming files in the storage directory to the file receiving user.
[0113] In one possible implementation, the second processing module 1003 is further used for:
[0114] Send a second instruction message to the file receiving user; wherein the second instruction message is used to instruct the file receiving user to download the target streaming file;
[0115] Download the target streaming file based on the storage directory.
[0116] In one possible implementation, the second processing module 1003 is further used for:
[0117] Determine whether the file management platform associated with the target file has modification permissions. If so, edit the target file in the storage directory based on the file management platform.
[0118] The storage directory is updated based on the edited target stream file.
[0119] In one possible implementation, the second processing module 1003 is further used for:
[0120] Obtain the file flow log, and use the file flow log to find the target flow file, the process files generated during editing, and the edited target flow file;
[0121] The target stream file, process file, and edited target stream file are saved based on a preset path.
[0122] In one possible implementation, the second processing module 1003 is further used for:
[0123] Retrieve all files stored in the directory;
[0124] Clean up the files based on preset requirements.
[0125] In one possible implementation, the first processing module 1002 is used for:
[0126] Based on a preset category, at least one file is provided to the user and assigned to the corresponding user group;
[0127] Each user group can set corresponding flow rules based on the file interface.
[0128] The file transfer device provided in this application includes a determination module, a first processing module, and a second processing module. The determination module, based on a distributed file system, responds to file transfer business requests and determines at least one file-providing user corresponding to the file transfer. The distributed file system uniformly stores the target transfer file, ensuring its integrity and high availability. The first processing module configures corresponding file interfaces for the target transfer file and assigns at least one file-providing user to a corresponding user group based on preset categories. Transfer rules are set for each user group, and these rules are distributed to the corresponding transfer processing layer cluster. The cluster containing the transfer rules determines at least one corresponding file-receiving user. The device then processes the file-providing and file-receiving users. Unified management and permission isolation between different users ensure the security of the target circulating files. The second processing module authenticates the file provider and file receiver. If the authentication is successful, it determines whether the circulation rules conform to the preset pattern. If so, it instructs the file provider to upload the target circulating file, determines the corresponding circulation method based on the circulation rules, determines the storage directory of the target circulating file based on the circulation method, and instructs the target receiver to download the target circulating file. The circulation process of the target circulating file within the distributed file system does not require manual intervention. The file provider and file receiver do not need to interact with the distributed file system multiple times, reducing the risk of interaction and achieving the technical effect of improving file circulation efficiency and security.
[0129] Figure 11 This is a hardware structure diagram of the file transfer device provided in an embodiment of this application. Figure 11 As shown, the document transfer device 1100 includes:
[0130] Processor 1101 and memory 1102;
[0131] The memory stores instructions that the computer executes;
[0132] The processor executes the computer execution instructions stored in memory 1102, causing the file transfer device to perform the file transfer method described above.
[0133] It should be understood that the processor 1101 described above can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The memory 1102 may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.
[0134] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the file transfer method described above.
[0135] Other embodiments of this application will readily occur to those skilled in the art upon 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 techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0136] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A file transfer method, characterized in that, include: In response to a business request for file transfer, at least one file-providing user corresponding to the file transfer is identified; Based on a preset category, at least one file is provided to the user and assigned to the corresponding user group; Configure the corresponding file interface for the target file to be transferred, and set the transfer rules for each user group based on the file interface; the transfer rules include one-to-one transfer, one-to-many transfer, many-to-one transfer, and many-to-many transfer; Obtain the hash value of the flow rule and the hash value of the flow processing layer cluster, compare the two hash values to determine the cluster where the flow rule is located; The cluster where the flow rules reside determines at least one corresponding file receiving user; The user providing the file and the user receiving the file are authenticated. If the authentication is successful, a file transfer is established between the user providing the file and the user receiving the file based on a preset method. The process of establishing file transfer between the file-providing user and the file-receiving user based on a preset method includes: Determine whether the streaming rules conform to a preset pattern. If so, send a first instruction message to the file provider user; wherein the first instruction message is used to instruct the file provider user to upload the target streaming file. Based on the aforementioned flow rules, a corresponding flow method is determined; based on the flow method, a storage directory for the target flow file is determined; and the target flow file is uploaded to the storage directory. The flow method includes local flow and / or remote flow. The target streaming file in the storage directory is synchronized to the file receiving user.
2. The method according to claim 1, characterized in that, The step of synchronizing the target streaming file in the storage directory to the file receiving user includes: Send a second instruction message to the file receiving user; wherein the second instruction message is used to instruct the file receiving user to download the target streaming file; Based on the storage directory, the target streaming file is downloaded.
3. The method according to claim 1, characterized in that, Uploading the target streaming file to the storage directory further includes: Determine whether the file management platform associated with the target circulating file has modification permissions. If so, edit the target circulating file in the storage directory based on the file management platform. The storage directory is updated based on the edited target transfer file.
4. The method according to claim 3, characterized in that, The method of establishing file transfer between the file providing user and the file receiving user based on a preset method further includes: Obtain the file flow log, and based on the file flow log, locate the target flow file, the process file generated during the editing process, and the edited target flow file; The target stream file, the process file, and the edited target stream file are saved based on a preset path.
5. The method according to claim 4, characterized in that, The method of establishing file transfer between the file providing user and the file receiving user based on a preset method further includes: Retrieve all files stored in the specified directory; The files are cleaned based on preset requirements.
6. A document transfer device, characterized in that, include: The determination module is used to determine, in response to a business request for file transfer, at least one file providing user corresponding to the file transfer; The first processing module is used to assign at least one file to the corresponding user group based on a preset category. Configure the corresponding file interface for the target file to be transferred, and set the transfer rules for each user group based on the file interface; the transfer rules include one-to-one transfer, one-to-many transfer, many-to-one transfer, and many-to-many transfer; Obtain the hash value of the flow rule and the hash value of the flow processing layer cluster, compare the two hash values to determine the cluster where the flow rule is located; The cluster where the flow rules reside determines at least one corresponding file receiving user; The second processing module is used to authenticate the file provider and the file receiver. If the authentication is successful, it determines whether the transfer rule conforms to a preset mode. If so, it sends a first instruction message to the file provider. The first instruction message is used to instruct the file provider to upload the target transfer file. Based on the aforementioned flow rules, a corresponding flow method is determined; based on the flow method, a storage directory for the target flow file is determined; and the target flow file is uploaded to the storage directory. The flow method includes local flow and / or remote flow. The target streaming file in the storage directory is synchronized to the file receiving user.
7. A document transfer device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the file transfer method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the file transfer method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
File distribution method and device
CN104283975A
File management method, device and system,apparatus and computer readable storage medium
CN110263001A