Data storage and sharing method and related device
By dividing the object storage server into a data collection stack, a data storage stack and a data distribution stack, the data security problems caused by direct access by users are solved, and the security and convenience of data storage are achieved.
Patent Information
- Application Number
- CN202310521645.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-05-10
AI Technical Summary
In the existing object storage server, users directly access the stored data, resulting in data security issues, and other stored data are exposed to the user.
The object storage server is divided into a data collection stack, a data storage stack and a data distribution stack. The user data is received and converted into object storage data through the data collection stack and submitted to the data storage stack. It is only provided to the user for download through the data distribution stack. The user can only access the data collection stack and cannot access the data storage stack.
It effectively protects the security of other data stored in the data storage stack, avoids data leakage, and facilitates users to store and download data.
Smart Images

Figure CN116582559B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data technology, and in particular to a data storage and sharing method and related devices. Background Art
[0002] With the rapid development of computer technology, the amount of information and data is increasing exponentially. How to store and share this data safely and effectively has become a common problem faced by all parties in the world.
[0003] In recent years, to address the slow storage speeds and limited storage space of traditional file system storage methods, related technologies have mostly adopted object storage methods for data storage. Object storage methods involve users storing data on an object storage server to obtain an address. The object storage server uses this address information to locate the stored data on the object storage server. Users do not need to know the data's storage format or location; they can simply download the corresponding data from the object storage server using the address information. This storage method makes the object storage server highly scalable and easy to increase storage capacity. Furthermore, as a distributed system server, the object storage server can use multiple servers to read and write data simultaneously, greatly accelerating storage speeds.
[0004] However, in actual applications, users can directly access the object storage server when uploading data, which means that other data stored in the object storage server is exposed to users, which is bound to cause serious data security problems. Summary of the Invention
[0005] In order to solve the above technical problems, the present application provides a data storage and sharing method and related devices, which not only facilitate users to upload data for storage, but also improve the security of data storage and can share it with users for download.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] In a first aspect, an embodiment of the present application discloses a data storage and sharing method, which is applied to an object storage server, wherein the object storage server includes a data collection stack, a data storage stack, and a data distribution stack. The method includes:
[0008] Receiving, through the data collection stack, data to be stored uploaded by a first user, wherein the data to be stored is data stored in a file system storage manner;
[0009] Converting the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data;
[0010] submitting the object storage data to the data storage stack through the data aggregation stack so that the data storage stack stores the object storage data;
[0011] In response to a download request for the object storage data sent by a second user, obtaining the object storage data from the data storage stack through the data distribution stack;
[0012] The object storage data is converted into data to be downloaded in a file system storage manner through the data distribution stack, so that the second user can obtain the data to be downloaded.
[0013] Optionally, after the data collection stack submits the object storage data to the data storage stack, the method further includes:
[0014] The object storage server obtains first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack;
[0015] The object storage server submits the first address information to the data storage stack so that the data storage stack stores the first address information.
[0016] Optionally, after the data collection stack receives the data to be stored uploaded by the first user, the method further includes:
[0017] Storing the data to be stored through the data collection stack;
[0018] If the object storage data is obtained within a preset time, deleting the data to be stored stored in the data collection stack;
[0019] If the object storage data cannot be obtained within the preset time, the step of converting the data to be stored into data stored in the object storage manner through the data collection stack is performed again.
[0020] Optionally, in response to a download request for the object storage data sent by a second user, obtaining, by the data distribution stack, the object storage data from the data storage stack includes:
[0021] In response to a download request for the object storage data sent by a second user, obtaining, by the data distribution stack, the object storage data from the data storage stack according to the first address information;
[0022] Converting the object storage data into data to be downloaded stored in a file system storage manner through the data distribution stack so that the second user obtains the data to be downloaded includes:
[0023] Converting the object storage data into data to be downloaded in a file system storage manner through the data distribution stack;
[0024] Storing the data to be downloaded by the data distribution stack;
[0025] Obtaining second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server;
[0026] The second address information is sent to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
[0027] Optionally, the method further includes:
[0028] In response to a download request for the object storage data sent by the second user, determining, by the data distribution stack, whether the download request meets a preset condition, and if so, identifying the download request as a legitimate request;
[0029] In response to a download request for the object storage data sent by a second user, acquiring, by the data distribution stack, the object storage data from the data storage stack according to the first address information includes:
[0030] The data distribution stack responds to the legal request and obtains the object storage data in the data storage stack according to the first address information.
[0031] Optionally, the method further includes:
[0032] If the storage time of the data to be downloaded meets the predetermined time, the data to be downloaded is deleted through the data distribution stack.
[0033] Optionally, the object storage server is a file transfer protocol server;
[0034] Receiving, through the data collection stack, the data to be stored uploaded by the first user includes:
[0035] The data collection stack receives data to be stored uploaded by a first user through a file transfer protocol corresponding to the file transfer protocol server.
[0036] In a second aspect, an embodiment of the present application discloses a data storage and sharing device, which is applied to an object storage server. The object storage server includes a data collection stack, a data storage stack, and a data distribution stack. The device includes:
[0037] a data receiving unit, configured to receive data to be stored uploaded by a first user through the data collection stack, wherein the data to be stored is data stored in a file system storage manner;
[0038] A first data conversion unit is configured to convert the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data;
[0039] a data submitting unit, configured to submit the object storage data to the data storage stack through the data collection stack, so that the data storage stack stores the object storage data;
[0040] a data acquisition unit, configured to acquire the object storage data from the data storage stack through the data distribution stack in response to a download request for the object storage data sent by a second user;
[0041] The second data conversion unit is configured to convert the object storage data into data to be downloaded that is stored in a file system storage manner through the data distribution stack, so that the second user can obtain the data to be downloaded.
[0042] Optionally, the device further includes:
[0043] A first address information acquiring unit, configured to acquire first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack;
[0044] The first address information submitting unit is configured to submit the first address information to the data storage stack so that the data storage stack stores the first address information.
[0045] Optionally, the device further includes:
[0046] A data storage unit, configured to store the data to be stored via the data collection stack;
[0047] The first data deleting unit is configured to delete the data to be stored in the data collection stack if the object storage data is obtained within a preset time; and to reactivate the first data converting unit if the object storage data cannot be obtained within the preset time.
[0048] Optionally, the data acquisition unit is further configured to, in response to a download request for the object storage data sent by a second user, acquire the object storage data from the data storage stack according to the first address information through the data distribution stack;
[0049] The second data conversion unit is further configured to convert the object storage data into data to be downloaded stored in a file system storage manner through the data distribution stack;
[0050] Storing the data to be downloaded by the data distribution stack;
[0051] Obtaining second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server;
[0052] The second address information is sent to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
[0053] Optionally, the device further includes:
[0054] a download request judging unit: in response to the download request for the object storage data sent by the second user, judging through the data distribution stack whether the download request meets a preset condition, and if so, identifying the download request as a legitimate request;
[0055] The data acquisition unit is further configured to respond to the legal request through the data distribution stack and acquire the object storage data in the data storage stack according to the first address information.
[0056] Optionally, the device further includes:
[0057] The second data deleting unit is configured to delete the data to be downloaded through the data distribution stack if the storage time of the data to be downloaded meets the predetermined time.
[0058] Optionally, the object storage server is a file transfer protocol server;
[0059] The data receiving unit is further configured to receive, through the data collection stack, data to be stored uploaded by a first user through a file transfer protocol corresponding to the file transfer protocol server.
[0060] In a third aspect, an embodiment of the present application discloses a computer device, comprising a processor and a memory:
[0061] The memory is used to store program code and transmit the program code to the processor;
[0062] The processor is configured to execute the data storage and sharing method as described in the first aspect or any optional implementation of the first aspect according to the instructions in the program code.
[0063] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the data storage and sharing method described in the first aspect or any optional implementation of the first aspect.
[0064] It can be seen from the above technical solution that when users upload data to be stored, they can only access the data collection stack but cannot access the data storage stack, thereby avoiding the risk of other data stored in the object storage server being exposed to users due to the user's direct access to the object storage server, and effectively protecting the data security of other data stored in the data storage stack. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0066] Figure 1 A flowchart of a data storage and sharing method provided in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of a data storage and sharing method in an actual application scenario provided by an embodiment of the present application;
[0068] Figure 3 A structural block diagram of a data storage and sharing device provided in an embodiment of the present application;
[0069] Figure 4 A structural block diagram of a computer device for data storage and sharing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The embodiments of the present application are described below with reference to the accompanying drawings.
[0071] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate. This is merely a way of distinguishing objects with the same attributes when describing them in the embodiments of this application.
[0072] In order to facilitate understanding of the technical solution of this application, some technical terms designed in this application are introduced below.
[0073] The file system storage method that stores and manages files through directories is well known to everyone. However, for institutions such as data centers that need to store large amounts of scientific data, the directory storage format of the file system storage method will make the data storage and retrieval process complicated and the access speed slow as the amount of data increases. In addition, the file system storage method is difficult to expand the storage capacity and has an upper limit on the storage space capacity.
[0074] To address the aforementioned technical issues, related technologies often use object storage instead of file system storage to store large amounts of data. Object storage involves users storing data on an object storage server and obtaining an address. The object storage server then uses this address to locate the stored data. Users do not need to know the data's storage format or location; they can simply download the data from the object storage server using the address. Because object storage servers are distributed systems, storage capacity can be easily expanded by adding additional servers. Furthermore, object storage servers can use multiple servers simultaneously to read and write data, significantly accelerating data access.
[0075] However, the data access method used in related technologies requires users to convert file system data into object storage before uploading it to an object storage server for storage. This requires users to learn specialized software tools, raising the barrier to entry for using object storage. Furthermore, users can directly access the object storage server when uploading data, exposing other data stored on the object storage server to users, inevitably leading to serious data security issues.
[0076] To solve the above technical problems, the present application provides a data storage and sharing method, which divides the object storage server into a data collection stack, a data storage stack, and a data distribution stack by stacking the object storage server. When a first user accesses the object storage server and prepares to upload data to be stored to the object storage server, the object storage server receives the data to be stored through the data collection stack, converts the data to be stored into object storage data stored in an object storage manner, and submits it to the data storage stack for storage. This eliminates the need for the first user to convert data stored in a file system storage manner into object storage data, making it easier for the first user to store the data to be stored. The object storage data is then converted into downloadable data stored in a file system storage manner through the data distribution stack and provided to a second user for download, making it easier for the second user to obtain the data to be downloaded. Moreover, during the interaction between the first user and the object storage server, the first user can only access the data collection stack, but not the data storage stack, thereby avoiding the risk of other data stored in the data storage stack being exposed to the first user and effectively protecting the security of other data stored in the data storage stack.
[0077] Next, a data storage and sharing method provided by an embodiment of the present application will be introduced in conjunction with the accompanying drawings. In this embodiment, the object storage server can be a server with object storage capabilities, such as an object storage device (OSD), or a server equipped with an object storage service (OSS) function, such as a disk array cluster or a storage server cluster with a built-in large-capacity hard disk. For the convenience of description, the present application will use a storage server cluster as the physical form of the object storage server to introduce the method provided by the present application.
[0078] See also Figure 1 , Figure 1 This is a flowchart of a data storage and sharing method provided in an embodiment of the present application. The method is applied to an object storage server, which includes a data collection stack, a data storage stack, and a data distribution stack. The method includes:
[0079] S101: Receive data to be stored uploaded by a first user through the data collection stack.
[0080] The first user is a user who uploads data to be stored in the object storage server, that is, a user who has data storage needs.
[0081] The data to be stored is stored in a file system, such as a file storage method using the File Transfer Protocol (FTP) or Network File System (NFS) service, and can include log storage data or file storage data with a directory structure. The data volume can be on the order of bytes (B), gigabytes (GB), or even petabytes (PB), or other quantities.
[0082] The data collection stack is a file system storage stack that is divided into two parts within the object storage server. It can store data to be stored and can also delete the data to be stored after converting and submitting it.
[0083] It is understandable that in the specific implementation of this application, when it comes to related data such as user-related data to be stored, when the various embodiments of this application are applied to specific products or technologies, the user's separate permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0084] In some implementations of this embodiment, in a scenario where a storage server cluster is used as an object storage server, some servers in the storage server cluster may be divided into a data aggregation stack, a data storage stack, and a data distribution stack.
[0085] S102: Convert the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data.
[0086] In some possible implementations of this embodiment, the object storage server can convert the data to be stored through a file-object conversion instruction program, specifically: obtaining the file names of all files in the data to be stored through the directory hierarchy of the data to be stored in the file system storage method; then reading the files in sequence according to the file names; and then converting the binary file stream into an object file stream, thereby converting the data stored in the file system storage method into data stored in the object storage method.
[0087] It is understandable that, since the types of data stored in the file system storage method are different, the object storage server may use different conversion methods for different data to be stored to convert them into object storage data.
[0088] In some other possible implementations of this embodiment, due to different file attributes within the same to-be-stored data, such as different file sizes or file formats, the difficulty of converting different files into object storage data may vary, leading to different conversion times. Therefore, the object storage server can group the files in the to-be-stored data according to their size and format, with the number of groups corresponding to the number of storage servers allocated by the data storage stack to store the object storage data. The object storage server then converts the grouped band storage data through the data aggregation stack, minimizing the time required to convert the to-be-stored data into object storage data and improving conversion efficiency.
[0089] S103: Submitting the object storage data to the data storage stack through the data collection stack, so that the data storage stack stores the object storage data.
[0090] The data storage stack is a stack that stores data in the form of object storage, separated from the object storage server. It has data storage capabilities. The data storage stack can store object storage data submitted by the data aggregation stack at any time, even permanently. Similar to the data aggregation stack, the data storage stack can also be a portion of the storage servers separated from the storage server cluster.
[0091] In some possible implementations of this embodiment, in S102, the object storage server groups files in the data to be stored, converts the grouped data into multiple object storage data, and then submits the multiple object storage data to the data storage stack. The data storage stack then stores the multiple object storage data in different storage servers, thereby enabling the object storage server to write the object storage data to multiple storage servers simultaneously. During subsequent data reading and downloading processes, the object storage server can also read the object storage data from multiple storage servers simultaneously, thereby achieving high parallelism in reading and writing the object storage data and accelerating the reading and writing of the object storage data.
[0092] To facilitate querying the object storage data in the data storage stack and providing downloading of the corresponding object storage data to a second user who has a data downloading requirement, after the data aggregation stack submits the object storage data to the data storage stack, the method further includes:
[0093] The object storage server obtains first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack;
[0094] The object storage server submits the first address information to the data storage stack so that the data storage stack stores the first address information.
[0095] In some implementations of this embodiment, in a scenario where a storage server cluster serves as an object storage server, the first address information may be the address information of the storage server storing the object storage data. For example, if the object storage data is stored in three storage servers named B, C, and D, the first address information may be the storage server addresses corresponding to the three storage servers B, C, and D.
[0096] At this time, object storage management software can be pre-installed in some storage servers belonging to the data storage stack, and the storage servers with the object storage management software installed can be used as metadata servers to store the first address information of the object storage data.
[0097] When a user requests to download data stored in the data storage stack, the object storage server can read the first address information in the metadata server and use the first address information to search for the object storage data requested by the user in the corresponding storage server, so as to facilitate the query of the object storage data in the data storage stack, speed up the data search process, and improve the efficiency of data search.
[0098] When the storage server processes data at a high concurrency, in order to avoid the high concurrency period and ensure successful conversion of the data to be stored, based on the above embodiment, after S103, the method further includes:
[0099] Storing the data to be stored through the data collection stack;
[0100] If the object storage data is obtained within a preset time, deleting the data to be stored stored in the data collection stack;
[0101] If the object storage data cannot be obtained within the preset time, the step of converting the data to be stored into data stored in the object storage manner through the data collection stack is performed again.
[0102] Since the object storage server can process the reception, conversion and submission of the data to be stored in parallel, the object storage server can simultaneously receive multiple data to be stored and perform the conversion and submission steps. However, the processing capacity of the object storage server is limited. When the data concurrency is too high or the central processing unit (CPU) is highly occupied, conversion or submission failures may occur.
[0103] Therefore, in some possible implementations, as mentioned above, the data collection stack also has the function of storing data, so the data collection stack can temporarily store the data to be stored, and after executing the process of converting the data to be stored into object storage data, determine whether the corresponding object storage data is generated within a preset time: if the corresponding object storage data is obtained, the previously stored data to be stored is deleted to save space in the data collection stack; if the corresponding object storage data is not obtained, the conversion is performed again in order to obtain the corresponding object storage data.
[0104] By using a preset time to determine whether object storage data is obtained, the system waits for a while when data concurrency is high or CPU usage is high, thereby automatically seeking idle time to execute the process of converting data to be stored and submitting data to object storage, thereby improving storage efficiency.
[0105] Please refer again Figure 1 S104: In response to the download request for the object storage data sent by the second user, obtain the object storage data from the data storage stack through the data distribution stack.
[0106] The second user is a user who has a downloading requirement for the object storage data stored in the object storage server. The second user sends a download request to the object storage server, requesting the object storage server to search for the corresponding object storage data and provide it to the second user for download.
[0107] As mentioned above, the data collection stack and data storage stack exist physically in the object storage server. The data distribution stack is basically the same. Some servers in the storage server cluster can also be divided to perform operations as the data distribution stack. I will not go into details here.
[0108] S105: Convert the object storage data into data to be downloaded in a file system storage manner through the data distribution stack, so that the second user can obtain the data to be downloaded.
[0109] As previously described, the data collection stack can convert the data to be stored in the file system storage mode into object storage data through the file-object conversion instruction program. The data distribution stack can also convert the object storage data into the data to be downloaded in the file system storage mode through the object-file conversion instruction program or other methods. This will not be repeated here.
[0110] As a possible implementation method, when the second user has a need to download data from the object storage server, an embodiment of the present application provides a method in which the object storage server provides the second user with the data to be downloaded. For the specific method, see S201-S205.
[0111] S201: In response to a download request for the object storage data sent by a second user, obtaining the object storage data from the data storage stack according to the first address information through the data distribution stack.
[0112] S202: Convert the object storage data into data to be downloaded through the data distribution stack, where the data to be downloaded is data stored in a file system storage manner.
[0113] The specific implementation method of the data aggregation stack converting the data to be stored into object storage data has been mentioned before. Please refer to the explanation and introduction of the specific implementation method in the above section, that is, the object storage data is read on the corresponding storage server and converted into the data to be downloaded in the file system storage method. I will not go into details here.
[0114] S203: Storing the data to be downloaded via the data distribution stack.
[0115] As described above, the data collection stack has the same process and effect on the storage of data as the first user, and the data distribution stack here also has the same process and effect on the second user.
[0116] S204: Obtain second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server.
[0117] After the data to be downloaded is stored in the data distribution stack, the object storage data can obtain the location information of the data distribution stack in the object storage server, that is, the second address information, based on the label or other characteristic information of the storage server corresponding to the data distribution stack.
[0118] S205: Send the second address information to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
[0119] In some possible implementations of this embodiment, the second user may access the data distribution stack through the network according to the second address information, and download the data to be downloaded from the data distribution stack to a local computer through online or offline download for subsequent use.
[0120] Since the second user who wants to download the data can only access the data distribution stack based on the second address information, and the data stored in the data distribution stack is the data to be downloaded, stored in the file system storage method that the second user is accustomed to using, and the data distribution stack only stores the data that the second user needs, when the second user accesses the object storage server, they cannot see any other data stored in the data storage stack except the data they requested to download. Therefore, by setting up the data distribution stack, it is not only convenient for the second user to obtain the required data, but also eliminates the need to use specialized software tools to convert data stored in object storage method to data stored in file system method. It also prevents the second user from accessing the data in the data storage stack, thus protecting the security of the data stored in the data storage stack.
[0121] To further improve the security of data stored in the data storage stack, when the second user sends a download request for the object storage data, the method further includes:
[0122] In response to a download request for the object storage data sent by the second user, determining, by the data distribution stack, whether the download request meets a preset condition, and if so, identifying the download request as a legitimate request;
[0123] Responding to a download request for the object storage data sent by a second user through the data distribution stack, obtaining the object storage data according to the first address information includes:
[0124] The data distribution stack responds to the legal request and obtains the object storage data in the data storage stack according to the first address information.
[0125] In some implementations of this embodiment, the legitimacy of a download request is determined by performing permission authentication on the download request's source, method, or connection IP address. If the download request's source, method, or connection IP address do not meet pre-set requirements, the download request is determined to be illegal, and operations such as data acquisition and subsequent conversion will not be performed. Only if the request is determined to be legitimate will the object storage data be acquired and converted for download by the second user. In this way, the security of data stored in the data storage stack is further protected through permission authentication.
[0126] When the data distribution stack stores the data to be downloaded and waits for the second user to obtain the data to be downloaded from the data distribution stack, the second user generally cannot respond to the action of the data distribution stack immediately, but can only obtain the data to be downloaded by downloading or other methods when it is idle. If the data distribution stack stores the data to be downloaded for a long time waiting for the second user to obtain it, it will cause a waste of storage space in the data distribution stack and affect the data downloaded by other users. Therefore, in order to facilitate the second user to obtain the data to be downloaded while saving the storage space of the data distribution stack, based on the above embodiment, the method further includes:
[0127] If the storage time of the data to be downloaded meets the predetermined time, the data to be downloaded is deleted through the data distribution stack.
[0128] In some possible implementations of this embodiment, the predetermined time period is 45 days. That is, starting from the time the data distribution stack sends the second address information to the second user, the data to be downloaded is stored in the data distribution stack for 45 days. When the predetermined storage time is reached, the data to be downloaded is deleted from the data distribution stack, thereby leaving sufficient time for the second user to obtain the data to be downloaded.
[0129] In some other possible implementations of this embodiment, the data distribution stack stores the second address information. When the time for the data distribution stack to store the data to be downloaded has reached half of the predetermined time and the second user has not downloaded the data to be downloaded, the second address information is sent to the second user again to prevent the second user from failing to obtain the data to be downloaded due to reasons such as failure to send the second address information or the second user forgetting to download.
[0130] Similar to the aforementioned data collection stack that deletes the data to be stored after obtaining the object storage data, the data distribution stack stores the data for a predetermined time and then deletes it. While leaving enough time for the second user to download, it regularly deletes data to save the storage space of the data distribution stack and improve the utilization of the storage space.
[0131] In some possible implementations, based on the above embodiment, further, the object storage server is a File Transfer Protocol (FTP) server;
[0132] Receiving, through the data collection stack, the data to be stored uploaded by the first user includes:
[0133] The data collection stack receives data to be stored uploaded by a first user through a file transfer protocol (FTP) corresponding to the file transfer protocol (FTP) server.
[0134] Compared to the Distributed File System (DFS), the File Transfer Protocol (FTP) is a common method for transferring files between users and data centers. FTP servers support transferring relatively large files, up to hundreds of terabytes (TB). DFS servers, on the other hand, support transferring files up to 2GB. In large file transfer scenarios, such as scientific databases, FTP servers can complete one-time data transfers.
[0135] Of course, corresponding to the data collection stack using FTP server, the data distribution stack can also be composed of FTP server. For the process of the second user obtaining the data to be downloaded, it also has the advantages of the first user uploading the data to be stored mentioned above, which will not be repeated here.
[0136] It's understandable that when users upload or download data to or from an FTP server, they need to use an FTP transfer tool to transfer data. FTP transfer tools are commonly used by users for data transfer. Whether a user uses an FTP transfer tool to upload stored data or a user uses an FTP transfer tool to download data, both operations are consistent with existing user data uploading and downloading habits, facilitating user access to data on object storage servers.
[0137] See also Figure 2 , Figure 2 This is a schematic diagram of a data storage and sharing method in an actual application scenario provided by the embodiment of the present application. Figure 2 , introduces the process of a first user storing data to be stored and the process of a second user downloading the data to be stored stored by the first user in the method provided in an embodiment of the present application.
[0138] The first user uploads the data to be stored 201 stored in the file system storage mode to the data collection stack 210. The data collection stack 210 converts the received data to be stored 201 into object storage data stored in the object storage mode, and submits the object storage data to the data storage stack 230. The data storage stack 230 stores the first address information of the object storage data.
[0139] Object storage server 230 receives a download request 203 for object storage data sent by a second user. Object storage server 230 obtains the object storage data from data storage stack 230 based on the first address information through data distribution stack 220, converts the object storage data into data to be downloaded 202 stored in a file system storage manner, and sends the second address information of data distribution stack 220 in object storage server 240 to the second user. The second user downloads data to be downloaded 202 from data distribution stack 220 based on the second address information.
[0140] See also Figure 3 , Figure 3 This is a structural block diagram of a data storage and sharing device provided in an embodiment of the present application. The device is applied to an object storage server, and the object storage server includes a data collection stack, a data storage stack, and a data distribution stack. The device includes:
[0141] The data receiving unit 310 is configured to receive data to be stored uploaded by a first user through the data collection stack, wherein the data to be stored is data stored in a file system storage manner;
[0142] A first data conversion unit 320 is configured to convert the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data;
[0143] A data submitting unit 330 is configured to submit the object storage data to the data storage stack through the data collection stack, so that the data storage stack stores the object storage data;
[0144] A data acquisition unit 340 is configured to acquire the object storage data from the data storage stack through the data distribution stack in response to a download request for the object storage data sent by the second user;
[0145] The second data conversion unit 350 is configured to convert the object storage data into data to be downloaded stored in a file system storage manner through the data distribution stack, so that the second user can obtain the data to be downloaded.
[0146] As a possible implementation, the device further includes:
[0147] A first address information acquiring unit, configured to acquire first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack;
[0148] The first address information submitting unit is configured to submit the first address information to the data storage stack so that the data storage stack stores the first address information.
[0149] As a possible implementation, the device further includes:
[0150] A data storage unit, configured to store the data to be stored via the data collection stack;
[0151] The first data deleting unit is configured to delete the data to be stored in the data collection stack if the object storage data is obtained within a preset time; and to reactivate the first data converting unit if the object storage data cannot be obtained within the preset time.
[0152] As a possible implementation, the data acquisition unit is further configured to, in response to a download request for the object storage data sent by a second user, acquire the object storage data from the data storage stack according to the first address information through the data distribution stack;
[0153] The second data conversion unit is further configured to convert the object storage data into data to be downloaded stored in a file system storage manner through the data distribution stack;
[0154] Storing the data to be downloaded by the data distribution stack;
[0155] Obtaining second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server;
[0156] The second address information is sent to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
[0157] As a possible implementation, the device further includes:
[0158] a download request judging unit: in response to the download request for the object storage data sent by the second user, judging through the data distribution stack whether the download request meets a preset condition, and if so, identifying the download request as a legitimate request;
[0159] The data acquisition unit is further configured to respond to the legal request through the data distribution stack and acquire the object storage data in the data storage stack according to the first address information.
[0160] As a possible implementation, the device further includes:
[0161] The second data deleting unit is configured to delete the data to be downloaded through the data distribution stack if the storage time of the data to be downloaded meets the predetermined time.
[0162] As a possible implementation, the object storage server is a file transfer protocol server;
[0163] The data receiving unit is further configured to receive, through the data collection stack, data to be stored uploaded by a first user through a file transfer protocol corresponding to the file transfer protocol server.
[0164] It can be seen from the above technical solution that when users upload data to be stored, they can only access the data collection stack but cannot access the data storage stack, thereby avoiding the risk of other data stored in the object storage server being exposed to users due to the user's direct access to the object storage server, and effectively protecting the data security of other data stored in the data storage stack.
[0165] See also Figure 4 , Figure 4 This is a structural block diagram of a computer device for adjusting audio equipment provided in an embodiment of the present application. The computer device may include a processor 410 and a memory 420:
[0166] The memory 420 is used to store program codes and transmit the program codes to the processor;
[0167] The processor 410 is configured to execute the above method according to the instructions in the program code.
[0168] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the above method.
[0169] It is understood that this method can be applied to a processing device capable of performing motion control, such as a terminal device or server with motion control functionality. This method can be executed independently by a terminal device or server, or it can be applied to a network scenario where a terminal device and a server communicate, with the terminal device and the server working together to execute the method. The terminal device can be a computer, a mobile phone, or other device. The server can be understood as an application server or a web server. In actual deployment, the server can be a standalone server or a clustered server.
[0170] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0171] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0172] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A data storage and sharing method, characterized in that: Applied to an object storage server, the object storage server includes a data collection stack, a data storage stack, and a data distribution stack, the method includes: Receiving, through the data collection stack, data to be stored uploaded by a first user, wherein the data to be stored is data stored in a file system storage manner; Converting the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data; submitting the object storage data to the data storage stack through the data aggregation stack so that the data storage stack stores the object storage data; The object storage server obtains first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack; The object storage server submits the first address information to the data storage stack, so that the data storage stack stores the first address information; In response to a download request for the object storage data sent by a second user, obtaining, by the data distribution stack, the object storage data from the data storage stack according to the first address information; Converting the object storage data into data to be downloaded in a file system storage manner through the data distribution stack; Storing the data to be downloaded by the data distribution stack; Obtaining second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server; The second address information is sent to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
2. The method according to claim 1, characterized in that After the data collection stack receives the data to be stored uploaded by the first user, the method further includes: Storing the data to be stored through the data collection stack; If the object storage data is obtained within a preset time, deleting the data to be stored stored in the data collection stack; If the object storage data cannot be obtained within the preset time, the step of converting the data to be stored into data stored in the object storage manner through the data collection stack is performed again.
3. The method according to claim 1, characterized in that The method further comprises: In response to a download request for the object storage data sent by the second user, determining, by the data distribution stack, whether the download request meets a preset condition, and if so, identifying the download request as a legitimate request; In response to a download request for the object storage data sent by a second user, acquiring, by the data distribution stack, the object storage data from the data storage stack according to the first address information includes: The data distribution stack responds to the legal request and obtains the object storage data in the data storage stack according to the first address information.
4. The method according to claim 1 or 3, characterized in that The method further comprises: If the storage time of the data to be downloaded meets the predetermined time, the data to be downloaded is deleted through the data distribution stack.
5. The method according to any one of claims 1 to 3, characterized in that The object storage server is a file transfer protocol server; Receiving, through the data collection stack, the data to be stored uploaded by the first user includes: The data collection stack receives data to be stored uploaded by a first user through a file transfer protocol corresponding to the file transfer protocol server.
6. A device for data storage and sharing, characterized in that: Applied to an object storage server, the object storage server includes a data collection stack, a data storage stack, and a data distribution stack, and the device includes: a data receiving unit, configured to receive data to be stored uploaded by a first user through the data collection stack, wherein the data to be stored is data stored in a file system storage manner; A first data conversion unit is configured to convert the data to be stored into data stored in an object storage manner through the data collection stack to obtain object storage data; a data submitting unit, configured to submit the object storage data to the data storage stack through the data collection stack, so that the data storage stack stores the object storage data; A first address information acquiring unit, configured to acquire first address information of the object storage data, where the first address information is storage location information of the object storage data in the data storage stack; a first address information submitting unit, configured to submit the first address information to the data storage stack so that the data storage stack stores the first address information; a data acquisition unit, configured to, in response to a download request for the object storage data sent by a second user, acquire the object storage data from the data storage stack according to the first address information through the data distribution stack; A second data conversion unit, configured to convert the object storage data into data to be downloaded stored in a file system storage manner through the data distribution stack; Storing the data to be downloaded by the data distribution stack; Obtaining second address information through the data distribution stack, where the second address information is location information of the data distribution stack in the object storage server; The second address information is sent to the second user through the data distribution stack, so that the second user obtains the data to be downloaded from the data distribution stack according to the second address information.
7. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the data storage and sharing method according to any one of claims 1 to 5 according to instructions in the program code.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the data storage and sharing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data storage method, server and system
CN109697020A
File transmission method and device
CN111447248A