A dynamic routing method and apparatus
By using a dynamic routing method, the impact on users during storage migration is resolved, enabling users to switch storage protocols without being aware of the changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETSUNION CLEARING CORP
- Filing Date
- 2021-05-14
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies make it difficult to coordinate existing users to switch from file storage to object storage when migrating system file storage methods, which can impact user business operations.
A storage dynamic routing method is provided, which receives user operation requests, obtains user configuration information, determines the storage protocol, generates a corresponding second request path based on the request path, and executes the operation request.
This allows the system to automatically adapt to different storage protocols without requiring users to make changes when the storage method changes, thus minimizing the impact on users.
Smart Images

Figure CN115344193B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer storage, and more specifically to a storage dynamic routing method and apparatus. Background Technology
[0002] In traditional internet business systems, system files are mostly stored in file storage. However, with the development of internet business, file storage has gradually become unable to meet the storage requirements of massive amounts of files. Therefore, more and more business systems need to migrate system files from file storage to object storage.
[0003] After migrating the storage method using existing technology, newly connected users can directly use the new storage method for storage. However, for existing users, it is difficult to coordinate them to switch from the original storage method to the new storage method to operate on the data. Therefore, the migration of the storage method will affect the business execution of existing users in the system. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defect that the migration of system file storage in the prior art will affect users, thereby providing a storage dynamic routing method and device.
[0005] The first aspect of the present invention provides a storage dynamic routing method, comprising: receiving an operation request from a user, the operation request including a first request path; obtaining configuration information of the user and determining the storage protocol corresponding to the user based on the configuration information; generating a second request path based on the first request path, the second request path corresponding to the storage protocol; and performing an operation corresponding to the operation request according to the second request path.
[0006] Optionally, in the storage dynamic routing method provided by the present invention, generating a second request path based on a first request path includes: determining the current directory in session control, merging the first request path with the current directory to obtain a complete request path; and converting the complete request path according to a storage protocol to obtain a second request path.
[0007] Optionally, in the storage dynamic routing method provided by the present invention, if the operation request is a directory switching request, the operation corresponding to the operation request is executed according to the second request path, including: if the second request path exists, changing the current directory in the user's session control to the first request path; and returning a response message indicating that the directory switching was successful to the user.
[0008] Optionally, in the storage dynamic routing method provided by the present invention, if the second request path exists in the object storage, it is determined that the second request path exists.
[0009] Optionally, the storage dynamic routing method provided by the present invention further includes: if the second request path does not have a file object in the object storage, determining whether at least one file or directory exists under the second request path; if at least one file or directory exists under the second request path, determining that the second request path exists.
[0010] Optionally, in the storage dynamic routing method provided by the present invention, if the operation request is a request to obtain a file list and the storage protocol corresponding to the user is an object storage protocol, the operation corresponding to the operation request is performed according to the second request path, including: using the second request path as an identifier for the request to obtain a file list; traversing all of the user's files, obtaining all file objects starting with the identifier, and encapsulating the file objects starting with the identifier into a standard file path and returning it to the user.
[0011] Optionally, in the storage dynamic routing method provided by the present invention, if the operation request is a download request and the storage protocol corresponding to the user is an object storage protocol, the operation corresponding to the operation request is executed according to the second request path, including: encapsulating the download request according to the object storage protocol; executing the encapsulated download request to obtain the data under the second request path; and returning the data under the second request path to the user.
[0012] Optionally, in the storage dynamic routing method provided by the present invention, before the step of receiving the user's operation request for target data, the method further includes: obtaining the user's basic information and storage protocol; and storing the user's basic information and storage protocol in a preset management backend.
[0013] Optionally, in the storage dynamic routing method provided by the present invention, after the step of storing the user's basic information and storage protocol into a preset management backend and before the step of receiving the user's operation request, the method further includes: receiving the user's login information; determining the user's basic information based on the user's login information; determining the user's storage protocol based on the user's basic information and the preset management backend; and injecting configuration information corresponding to the storage protocol into the user's context.
[0014] Optionally, the storage dynamic routing method provided by the present invention further includes: receiving a storage protocol switching request; obtaining the user's basic information and the target storage protocol according to the storage protocol switching request; replacing the storage protocol corresponding to the basic information stored in the preset management backend with the target storage protocol; and injecting the configuration information corresponding to the target storage protocol into the user's context when the user's login information is received.
[0015] Optionally, in the storage dynamic routing method provided by the present invention, when file storage is used, the access permissions of the file directory are controlled by the system where the file encryption transmission protocol is located; when object storage is used, the access permissions of the file objects are controlled by the access control list of the object storage.
[0016] A second aspect of the present invention provides a storage dynamic routing device, comprising: an operation request receiving module for receiving an operation request from a user, the operation request including a first request path; a storage protocol determining module for obtaining configuration information of the user and determining the storage protocol corresponding to the user based on the configuration information; a path conversion module for generating a second request path based on the first request path, the second request path corresponding to the storage protocol; and an operation instruction execution module for executing an operation corresponding to the operation request according to the second request path.
[0017] A third aspect of the present invention provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to perform the storage dynamic routing method as provided in the first aspect of the present invention.
[0018] A fourth aspect of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a computer to execute the storage dynamic routing method provided in the first aspect of the present invention.
[0019] The technical solution of this invention has the following advantages:
[0020] The storage dynamic routing method and apparatus provided by this invention, upon receiving a user's operation request, first converts the first request path carried in the operation request into a second request path corresponding to the storage protocol based on the user's storage protocol, and then completes the operation on the target data according to the second request path. The storage dynamic routing method provided by this invention can convert the first request path carried in the operation request into a second request path corresponding to different storage protocols. Therefore, this invention supports conversion between multiple different storage protocols. Furthermore, upon receiving a user's operation request, it converts the first request path according to the user's storage protocol and then executes the user's operation request. The user does not need to make any changes, so even if the file storage method is changed, it will not affect external users. Attached Figure Description
[0021] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1This is a flowchart illustrating a specific example of the dynamic routing method in an embodiment of the present invention;
[0023] Figure 2 This is a schematic diagram illustrating a specific example of a file encryption transmission protocol service system in an embodiment of the present invention.
[0024] Figure 3 This is a schematic diagram illustrating a specific example of a dynamic routing device in an embodiment of the present invention.
[0025] Figure 4 This is a schematic diagram illustrating a specific example of a computer device in an embodiment of the present invention. Detailed Implementation
[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0028] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0029] This invention provides a method for storing dynamic routes, such as... Figure 1 As shown, it includes:
[0030] Step S10: Receive the user's operation request, which includes a first request path. For example, if the operation request is to download a file, the operation request will include the path where the file is located; if the operation request is to store a file, the operation request will include the path where the file is stored; if the operation request is to change the path, the operation request will include the changed path.
[0031] Step S20: Obtain the user's configuration information and determine the storage protocol corresponding to the user based on the configuration information, wherein the configuration information includes information on the storage protocol pre-configured for the user.
[0032] In one optional embodiment, the user's configuration information can be pre-stored in a management backend. The management backend can be located in an SFTP server or in a location accessible to the SFTP server. When a user logs into the server, the server injects the configuration information stored in the management backend into the user's context. When the user sends an operation request, the server can determine the user's storage protocol based on the configuration information in the user's context.
[0033] In one optional embodiment, the configuration information includes, in addition to the user's storage protocol, the username, initial password, home directory, and regular SFTP user parameters. If the storage protocol is the object storage protocol (S3 protocol), the configuration information also includes object storage buckets, keys (AccessKey / SecretKey), etc.
[0034] Step S30: Generate a second request path based on the first request path. The second request path corresponds to the storage protocol.
[0035] In one optional embodiment, the first request path is determined by the user based on the file storage interface displayed on the user's terminal. However, the file storage interface displayed on the user's terminal may not be compatible with the user's storage protocol. Therefore, it is necessary to generate a second storage path corresponding to the storage protocol based on the first storage path, thereby completing the operation request along the second storage path. For example, the first request path is typically a path with a directory hierarchy. If the user's storage protocol is object storage, the first request path needs to be converted into a second request path that satisfies the storage protocol, thereby allowing operations to be performed on the files under that path. If the specified path corresponds to the storage protocol, this step is unnecessary.
[0036] Step S40: Perform the operation corresponding to the operation request according to the second request path. For example, when the operation request is to download a file, download the file under the second request path; when the operation request is to store a file, store the file in the directory of the second request path.
[0037] The storage dynamic routing method provided in this embodiment of the invention, upon receiving a user's operation request, first converts the first request path carried in the operation request into a second request path corresponding to the storage protocol based on the user's storage protocol, and then completes the operation request according to the second request path. This method can convert the first request path in the operation request into a second request path corresponding to different storage protocols. Therefore, this embodiment supports conversion between multiple different storage protocols. Furthermore, upon receiving a user's operation request, it first converts the first request path according to the user's storage protocol and then executes the user's operation request. The user does not need to make any changes, so even if the file storage method is changed, it will not affect the user.
[0038] In an optional embodiment, step S30 specifically includes:
[0039] First, determine the current directory in session control, and merge the first request path with the current directory to obtain the complete request path.
[0040] In one optional embodiment, the first request path is the path from the current directory to the target directory, not the path from the initial directory to the target directory. In order to obtain the complete request path, it is necessary to obtain the path from the initial directory to the current directory, and then concatenate the path from the initial directory to the current directory with the first request path to obtain the complete request path from the initial directory to the target directory.
[0041] Then, the complete request path is transformed according to the storage protocol to obtain the second request path.
[0042] If the file storage interface displayed on the user's end does not match the user's storage protocol, then when querying the target directory, it is necessary to start from the initial directory and query level by level according to the storage method corresponding to the storage protocol. Therefore, in order to accurately find the target directory in the storage method corresponding to the storage protocol, it is necessary to obtain the second request path based on the complete request path.
[0043] In one optional embodiment, when performing path conversion, it is necessary to convert according to the storage characteristics corresponding to the storage protocol. For example, if the complete path is divided into a file tree by " / ", then when converting the complete path into a second request path corresponding to object storage, since object storage is a flat storage method and does not have the concept of a directory tree, when converting the second request path, it is necessary to convert the complete path into a form that is not separated by " / ".
[0044] In an optional embodiment, if the operation request is a directory switching request, then step S40 specifically includes:
[0045] The system checks if the second requested path exists. If it does, it changes the current directory in the user's session control to the first requested path and returns a successful directory switch response to the user. Since the current directory in the session control is user-facing, it's necessary to change the directory in the session control to the first requested path, not the second.
[0046] If the second requested path does not exist, a response message indicating that the directory switch failed is returned.
[0047] In an optional embodiment, the existence of the second request path can be determined by the following steps:
[0048] If a file object exists under the second requested path, the second requested path is determined to exist; if no file object exists under the second requested path, it is determined whether at least one file or directory exists under the second requested path; if at least one file or directory exists under the second requested path, the second requested path is determined to exist.
[0049] In an optional embodiment, if the operation request is a request to obtain a file list, and the user's corresponding storage protocol is an object storage protocol, then step S40 specifically includes:
[0050] First, the second request path is used as the identifier for the request to retrieve the file list.
[0051] Then, iterate through all the user's files, retrieve all file objects that begin with an identifier, and encapsulate these file objects into a standard file and return it to the user. Object storage protocols do not have directory hierarchies; objects prefixed with the second requested path can be identified as objects within that path.
[0052] In one specific embodiment, when obtaining the file list, it is necessary to repeatedly obtain the files containing the above identifier. However, considering performance issues, a maximum number of file lists can be set. When the returned result is greater than the maximum number of file lists, the loop will stop.
[0053] In an optional embodiment, if the operation request is a download request and the user's corresponding storage protocol is an object storage protocol, the above step S40 specifically includes:
[0054] First, the download request is encapsulated according to the object storage protocol. Specifically, an s3client needs to be created to encapsulate the download request.
[0055] Then, execute the encapsulated download request to obtain the data from the second request path.
[0056] In one specific embodiment, since object storage is usually a flat storage method, when converting a specified path into a second request path, the first request path is actually converted into a string. When retrieving data under the second request path, data with the above string as a prefix is actually retrieved.
[0057] Finally, the data from the second requested path is returned to the user. The data from the second requested path is returned to the user as a stream.
[0058] In one optional embodiment, the file download operation can only be performed if the second request path exists. Therefore, before performing the above operations, it is necessary to determine whether the second request path exists. The specific determination method is described in the above embodiment.
[0059] In an optional embodiment, if the operation request is a storage request, the storage request includes data to be stored, and the storage protocol is object storage, then step S40 specifically includes: identifying the data to be stored according to the second request path, and storing the identified data to be stored. When the storage method is object storage, the second request path is a string, and identifying the data to be stored means using the string as a prefix for the data to be stored. When the data to be stored needs to be queried later, it can be queried using the prefix.
[0060] In an optional embodiment, as described in step S20 above, the user's configuration information can be pre-stored in the management backend, specifically through the following steps: obtaining the user's basic information and storage protocol, and storing the user's basic information and storage protocol in the preset management backend. The user's basic information can be information that can uniquely identify the user, such as a username.
[0061] In an optional embodiment, in order to quickly determine the user's storage protocol when a user's operation request is received, the user's basic information can be determined based on the user's login information after receiving the user's login information. Then, the storage protocol corresponding to the information can be determined from a preset management backend based on the user's basic information, and configuration information corresponding to the storage protocol can be injected into the user's context. Thus, when a user's operation request is received, the user's storage protocol can be determined based on the configuration information carried in the user's context.
[0062] In one specific embodiment, after an SFTP user logs into the SFTP server, the SFTP server creates a file system based on the SFTP user's configuration information. For example, if the user's storage protocol is S3, an S3FileSystem is created, and S3 storage-related configuration information is injected into the user's context.
[0063] In an optional embodiment, when it is necessary to modify the user's storage protocol, the following steps are performed:
[0064] First, receive a storage protocol switching request, and obtain the user's basic information and the target storage protocol based on the storage protocol switching request;
[0065] Then, the storage protocol corresponding to the basic information stored in the preset management backend is changed to the target storage protocol. When the user's login information is received, the configuration information corresponding to the target storage protocol is injected into the user's context.
[0066] When a user logs into the SFTP server again, the SFTP server injects the configuration information of the changed storage protocol into the user's context. When the user sends an operation request, the SFTP server can identify the new storage protocol based on the user's context and execute the operation request according to the new storage protocol. Therefore, it can be seen that the change of storage protocol will not affect the user's operation.
[0067] In one alternative embodiment, when file storage is used, access permissions to the file directory are controlled by the system containing the file encryption transmission protocol; when object storage is used, access permissions to file objects are controlled by the access control list of the object storage.
[0068] The storage dynamic routing method provided in this embodiment of the invention configures the user's storage protocol in the management backend. When the user's storage method is changed, the storage protocol in the configuration information can be modified directly in the management backend. When the user logs in again, the updated configuration information in the management backend can be injected into the user's context. When the user issues an operation request, the server can determine the user's storage protocol based on the configuration information in the user's context and execute the operation request according to the user's storage protocol. Thus, even if the user's storage protocol changes, it will not affect the user, and the user is unaware of the storage protocol conversion.
[0069] This invention provides a file encryption transmission protocol service system, such as... Figure 2 As shown, it includes the access layer, protocol layer, and storage layer;
[0070] The access layer is used to connect with users and receive user operation requests, which include a first request path.
[0071] The protocol layer includes a file encryption transmission protocol, a storage protocol routing module, and a storage protocol conversion module. In addition, the protocol layer also includes related protocols for user login, file deletion, upload and download, and directory creation.
[0072] The file encryption transmission protocol is used to transfer files. This protocol enables remote file retrieval, file content transfer, file management, and other operations. Its control signals and data signals are transmitted through a secure data channel.
[0073] Storage protocol routing is used to select the storage method corresponding to the user's storage protocol. This embodiment of the invention also provides a dedicated user management backend, which facilitates the management of SFTP users and allows for the configuration of different underlying storage protocols for different users. After obtaining the user's storage protocol through the user management backend, storage protocol routing can route the user to the storage service corresponding to that user's storage protocol.
[0074] The storage protocol conversion module includes at least one server adapter for adapting operation requests according to the storage method corresponding to the storage protocol. For example... Figure 2 As shown, the storage protocol conversion module provided in this embodiment of the invention includes an S3 adapter and a Swift adapter. In practical applications, different adapters can be added according to the user's storage protocol to adapt to the operation request.
[0075] The storage layer includes at least one storage submodule, with different submodules used to store different types of files. In this embodiment of the invention, the storage layer includes S3 services, file storage, and Swift services, with different modules used to store files according to different protocols.
[0076] The file encryption transmission protocol service system provided by this invention includes an access layer, a protocol layer, and a storage layer. Users connect to the file encryption transmission server through the access layer and send operation requests. The protocol layer includes a file encryption transmission protocol, a storage protocol routing module, and a storage protocol conversion module. The file encryption transmission protocol is used to transmit files. The storage protocol routing module selects the storage method corresponding to the user's storage protocol. The storage protocol conversion module adapts the user's operation request to the corresponding storage method. The file encryption transmission protocol server provided in this embodiment of the invention, while maintaining the upper-layer file encryption transmission protocol unchanged, can flexibly select different storage methods through the storage protocol routing and storage protocol conversion modules. Therefore, even if the file storage method is changed, it will not affect external users. The user's storage protocol is configured in the management backend. To change the user's storage method, the storage protocol in the configuration information can be switched directly in the management backend. The changes to file operations caused by the storage protocol conversion are resolved by the dynamic storage routing method provided in this embodiment of the invention, and the user is unaware of the storage protocol conversion.
[0077] In one specific embodiment, the file encryption transmission protocol server provided by this invention delegates directory permissions to the underlying control and is only responsible for controlling the user's read and write permissions. For example, when using file storage, directory permissions are controlled by the system that deploys the file encryption transmission protocol server; when using object storage, the access permissions of file objects are controlled by the object storage's file access permission control (ACL).
[0078] In one specific embodiment, the file encryption transmission protocol server provided by this invention offers a stateless service. The actual data storage and the service provided by the file encryption transmission protocol server are separate. Therefore, the file encryption transmission protocol server can be deployed in any location, and each server can independently provide services without affecting others. Multiple file encryption transmission protocol servers can be deployed simultaneously to provide services to users, improving service throughput. The stateless service ensures that files do not have intermediate states, guaranteeing data consistency.
[0079] This invention provides a storage dynamic routing device, such as... Figure 3 As shown, it includes:
[0080] The operation request receiving module 10 is used to receive the user's operation request. The operation request includes a first request path, as described in detail in the above embodiment for step S10.
[0081] The storage protocol determination module 20 is used to obtain the user's configuration information and determine the storage protocol corresponding to the user based on the configuration information. For a detailed description, please refer to the description of step S20 in the above embodiments.
[0082] The path conversion module 30 is used to generate a second request path based on the first request path. The second request path corresponds to the storage protocol. For a detailed description, please refer to the description of step S30 in the above embodiments.
[0083] The operation instruction execution module 40 is used to execute the operation corresponding to the operation request according to the second request path. For a detailed description, please refer to the description of step S40 in the above embodiment.
[0084] The storage dynamic routing device provided in this embodiment of the invention, upon receiving a user's operation request, first converts the first request path carried in the operation request into a second request path corresponding to the storage protocol according to the user's storage protocol, and then completes the operation on the target data according to the second request path. The storage dynamic routing device provided in this embodiment of the invention can convert the first request path into a second request path corresponding to different storage protocols. Therefore, this embodiment of the invention supports conversion between multiple different storage protocols. Furthermore, upon receiving a user's operation request, it converts the first request path according to the user's storage protocol and then executes the user's operation request. The user does not need to make any changes, so even if the file storage method is changed, it will not affect external users.
[0085] This invention provides a computer device, such as... Figure 4 As shown, the computer device mainly includes one or more processors 51 and a memory 52. Figure 4 Take the 51 processor as an example.
[0086] The computer device may also include an input device 53 and an output device 54.
[0087] The processor 51, memory 52, input device 53, and output device 54 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0088] Processor 51 may be a Central Processing Unit (CPU). Processor 51 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof. The general-purpose processor may be a microprocessor or any conventional processor. Memory 52 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the message identifier generation device. Furthermore, memory 52 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 52 may optionally include memory remotely located relative to processor 51, and these remote memories may be connected to a storage dynamic routing device via a network. Input device 53 can receive calculation requests (or other numerical or character information) input by the user, and generate key signal inputs related to the storage of dynamic routing devices. Output device 54 may include a display screen or other display device for outputting calculation results.
[0089] This invention provides a computer-readable storage medium that stores computer instructions. The computer storage medium stores computer-executable instructions that can execute the storage dynamic routing method in any of the above method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0090] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for storing dynamic routes, characterized in that, include: Receive user operation request, wherein the operation request includes a first request path; Obtain the user's configuration information and determine the storage protocol corresponding to the user based on the configuration information; A second request path is generated based on the first request path, and the second request path corresponds to the storage protocol. The first request path is determined by the user based on the file storage interface displayed on the user's device; Perform the operation corresponding to the operation request according to the second request path; Generate a second request path based on the first request path, including: Determine the current directory in session control, merge the first request path with the current directory to obtain the complete request path; the first request path is the path from the current directory to the target directory, and concatenate the path from the initial directory to the current directory with the first request path to obtain the complete request path from the initial directory to the target directory; The complete request path is converted according to the storage protocol to obtain the second request path.
2. The method for storing dynamic routes according to claim 1, characterized in that, If the operation request is a directory switching request, perform the operation corresponding to the operation request according to the second request path, including: If the second request path exists, change the current directory in the user's session control to the first request path; Return a response message indicating that the directory switch was successful to the user.
3. The method for storing dynamic routes according to claim 2, characterized in that, If a file object exists under the second requested path, it is determined that the second requested path exists.
4. The method for storing dynamic routing according to claim 3, characterized in that, Also includes: If no file object exists under the second requested path, determine whether at least one file or directory exists under the second requested path; If at least one file or directory exists under the second requested path, it is determined that the second requested path exists.
5. The method for storing dynamic routes according to claim 1, characterized in that, If the operation request is a request to retrieve a file list, and the storage protocol corresponding to the user is an object storage protocol, the operation corresponding to the operation request is executed according to the second request path, including: Use the second request path as the identifier for the request to obtain the file list; Iterate through all the user's files, obtain all file objects that begin with the identifier, and encapsulate the file objects that begin with the identifier into a standard file path and return it to the user.
6. The method for storing dynamic routes according to claim 1, characterized in that, If the operation request is a download request, and the storage protocol corresponding to the user is an object storage protocol, the operation corresponding to the operation request is executed according to the second request path, including: The download request is encapsulated according to the object storage protocol. Execute the encapsulated download request to obtain the data from the second request path; Return the data from the second requested path to the user.
7. The method for storing dynamic routing according to claim 1, characterized in that, Before receiving the user's request for operation on the target data, the following steps are also included: Obtain basic user information and storage protocols; The user's basic information and storage protocol are stored in a preset management backend.
8. The method for storing dynamic routes according to claim 7, characterized in that, After the step of storing the user's basic information and storage protocol in the preset management backend, and before the step of receiving the user's operation request, the following steps are also included: Receive user login information and determine the user's basic information based on the user login information; The user's storage protocol is determined based on the user's basic information and the preset management backend; Inject configuration information corresponding to the storage protocol into the user's context.
9. The method for storing dynamic routes according to claim 7, characterized in that, Also includes: Receive storage protocol switching request; Obtain the user's basic information and the target storage protocol according to the storage protocol switching request; Replace the storage protocol corresponding to the basic information stored in the preset management backend with the target storage protocol; When a user's login information is received, configuration information corresponding to the target storage protocol is injected into the user's context.
10. The method for storing dynamic routing according to any one of claims 1-9, characterized in that, When using file storage, access permissions to the file directory are controlled by the system running the file encryption transmission protocol; When using object storage, access permissions for file objects are controlled by the object storage's access control list.
11. A storage dynamic routing device, characterized in that, include: An operation request receiving module is used to receive user operation requests, wherein the operation request includes a first request path; A storage protocol determination module is used to obtain the user's configuration information and determine the storage protocol corresponding to the user based on the configuration information; A path conversion module is used to generate a second request path based on the first request path, wherein the second request path corresponds to the storage protocol. The first request path is determined by the user based on the file storage interface displayed on the user's device; An operation instruction execution module is used to execute an operation corresponding to the operation request according to the second request path; Generate a second request path based on the first request path, including: Determine the current directory in session control, merge the first request path with the current directory to obtain the complete request path; the first request path is the path from the current directory to the target directory, and concatenate the path from the initial directory to the current directory with the first request path to obtain the complete request path from the initial directory to the target directory; The complete request path is converted according to the storage protocol to obtain the second request path.
12. A computer device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to perform the storage dynamic routing method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the storage dynamic routing method as described in any one of claims 1-10.