A method for data downloading and uploading and an electronic device
By processing the data in segments and transmitting it segmentally during data transmission, the problem of server backlogs during high concurrent large file transmission is solved, and the transmission efficiency and system stability are improved.
Patent Information
- Application Number
- CN202110470153.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-28
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2041-04-28
AI Technical Summary
During the high-concurrency large file transfer process, a large amount of untransmission data is accumulated in the server memory, resulting in insufficient memory capacity and may cause the server system to crash.
When generating request information for data to be downloaded or uploaded, the data is segmented according to the preset segmentation rules and formed pre-segment information. The server side sends or receives data segments to avoid a large amount of data transmission at one time.
It effectively avoids the server side's backlog of large amounts of untransmission data during high-concurrent large file transfers, reduces memory usage, and avoids the risk of server crash.
Smart Images

Figure CN113271343B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data management, and in particular, to a method for data downloading and uploading and an electronic device using the method. Background Art
[0002] Network Attached Storage (NAS) is a file-level computer data storage service connected to a computer network, which provides data access to heterogeneous client groups. NAS usually uses network file sharing protocols (such as NFS, SMB or AFP) to provide access to files, and can eliminate the responsibility of providing file services from other servers on the network.
[0003] Compared with traditional NAS disk transmission, when NAS is used for data uploading to an optical disc library, since the optical disc cannot achieve instant storage, during the data uploading process, the data needs to be first stored in the disk storage of the server, and after the data transmission ends, the file data can be uploaded to the optical disc; when used for file data downloading, it is also necessary to first obtain the file data from the optical disc library and put it into the server disk storage, and then according to the data size and location requested by the NAS protocol, return the corresponding file data content.
[0004] Due to the above reasons, a problem that occurs is that during high-concurrency large-file transmission, a large amount of untransmitted data will accumulate in the server memory, and because there is also a process from the cache memory (i.e., the memory) to the main memory (i.e., the hard disk) in the server memory, and because the memory capacity is limited, some file data often cannot be ensured to be received during concurrent operations, and in severe cases, it may even cause the server system to crash. Summary of the Invention
[0005] To solve the above technical problems, a first aspect of an embodiment of this application provides a method for data downloading, including:
[0006] Generating first request information for the data to be downloaded, where the first request information includes first storage location information of the data to be downloaded, user identity information, and pre-segmentation information, the first storage location is in the server-side main storage device, and the pre-segmentation information includes the initial position information and data length information of each segment of the data to be downloaded after being segmented according to a preset segmentation rule;
[0007] Sending the first request information;
[0008] When the first request information passes the server-side verification and when the first storage location stores the data to be downloaded, receiving the data to be downloaded, where the data to be downloaded is sent segment by segment by the server side from the first storage location according to the pre-segmentation information;
[0009] Combine each piece of data received segment by segment according to the pre-segmentation information to form the required downloaded data.
[0010] The second aspect of the embodiments of the present application provides a data download method, including:
[0011] Receive the first request information of the data to be downloaded, where the first request information includes the first storage location information of the data to be downloaded, user identity information, and pre-segmentation information. The first storage location is in the server-side main storage device, and the pre-segmentation information includes the initial position information and data length information of each piece of data after the data to be downloaded is segmented according to a preset segmentation rule;
[0012] Verify the first request information;
[0013] When the first request information passes the verification and when the data to be downloaded is stored at the first storage location, send the data to be downloaded segment by segment according to the pre-segmentation information;
[0014] When the data to be downloaded is not stored at the first storage location, send the second request information of the data to be downloaded to the optical disc library connected to the server side. The second request information includes the second storage location information of the data to be downloaded and pre-segmentation information. The second storage location is in the optical disc library, and the pre-segmentation information includes the initial position information and data length information of each piece of data after the data to be downloaded is segmented according to a preset segmentation rule.
[0015] In some embodiments, when the first request information passes the verification and when the data to be downloaded is stored at the first storage location, sending the data to be downloaded segment by segment according to the pre-segmentation information includes:
[0016] Read the data to be downloaded stored at the first storage location segment by segment into the cache memory of the server side according to the initial position information and data length information of each piece of data to be downloaded in the pre-segmentation information;
[0017] After a piece of the data to be downloaded is read, feed back the piece of the data to be downloaded from the cache memory to the client that sent the first request information, and delete the piece of the data to be downloaded from the cache memory.
[0018] In some embodiments, the second data storage device is an optical disc library, and the second storage location information is the storage location information of the data to be downloaded in the optical disc library.
[0019] In some embodiments, before sending a second request message for the data to be downloaded to an optical disc library connected to the server side when the data to be downloaded is not stored in the first storage location, the method further includes:
[0020] Assign different operation permissions to the second request message according to the identity information in the first request message or the IP address of the client from which the first request message comes;
[0021] When the operation permission in the second request message is a read-write permission, open the read-write permission of the optical disc library data for the second request message;
[0022] When the operation permission in the second request message is a read-only permission, open the read-only permission of the optical disc library data for the second request message;
[0023] When there is no operation permission for the optical disc data in the second request message, prohibit the second request message from requesting the optical disc library data.
[0024] A third aspect of the embodiments of the present application provides a data upload method, including:
[0025] Send a mounting request for requesting access to data files and file directories in the main storage device of the server side;
[0026] When the mounting request passes the verification of the server side, receive a feedback message allowing mounting for the mounting request, where the feedback message is sent by the server side;
[0027] Divide the data to be uploaded into multiple data segments according to a preset rule, and form disassembling information of the data to be uploaded, where the disassembling information at least includes the initial position information and data length information of each data segment after the data to be uploaded is disassembled;
[0028] Upload the disassembling information so that the server side can combine the data segments it receives according to the disassembling information;
[0029] Upload the disassembled data to be uploaded segment by segment with the data segment as the transmission unit.
[0030] A fourth aspect of the embodiments of the present application provides a data upload method, including:
[0031] Receive a mounting request sent by a client for requesting access to data files and file directories in the main storage device of the server side;
[0032] Verify the mounting request, and when the mounting request passes the verification, send a feedback message allowing mounting for the mounting request;
[0033] Receive the disassembled information of the data to be uploaded, where the disassembled information at least includes the initial position information and data length information of each segment of the data to be uploaded after splitting the data to be uploaded;
[0034] Create multiple block spaces with a determined capacity size in the cache memory of the server side. Before the transmission of the same piece of data to be uploaded is completed, each block space only receives the data segments formed after splitting the same piece of data to be uploaded;
[0035] Receive the data segment through the block space, and according to the disassembled information, after a determined data segment is received, transfer the data segment to the main memory of the server side;
[0036] Empty all the data in the block space so that the block space can continue to receive the next data segment.
[0037] In some embodiments, the method further includes:
[0038] When the remaining storage capacity of the main memory of the server side is lower than the set storage capacity, migrate the data in the main memory to the optical disc library connected to the server side.
[0039] In some embodiments, the set storage capacity is the storage capacity of a determined proportion of the total storage capacity of the main memory.
[0040] A fifth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any of the above aspects is implemented.
[0041] A sixth aspect of the embodiments of the present application provides a data control system based on an optical disc library, including:
[0042] A database access module, configured to query file information and / or shared link information from the database, and save the file information and / or the shared link information to the database;
[0043] An object storage module, configured to store the entity data of the file and return the file data required by other modules according to requirements;
[0044] A management interface module, configured to view the existing file information, view the existing shared link information, and control different permissions for IP addresses or network segments or users;
[0045] A shared link management module, configured to obtain all the existing shared links through the database access module, add, delete, or modify the shared links;
[0046] A permission management module, used for the management of the shared link, including permission management and permission setting;
[0047] A file system module, used to implement the connection between the system and the optical disc library, so as to realize the transmission, viewing, and deletion of file data in the optical disc library;
[0048] A shared client module, used to realize the viewing, uploading, or downloading of file data by generating and sending request information.
[0049] The beneficial effect of the embodiment of the present application is that when generating the first request information for the data to be downloaded, the data to be downloaded is segmented according to a preset segmentation rule to form pre-segmentation information, so that the server side can send data segment by segment when feeding back data, thereby avoiding the problem that a large amount of untransmitted data accumulates in the server side during high-concurrency large-file transmission. Brief Description of the Drawings
[0050] Figure 1 is a schematic diagram of the file data download process of the embodiment of the present application;
[0051] Figure 2 is a schematic diagram of the mounting and file data uploading process of the embodiment of the present application;
[0052] Figure 3 is a schematic diagram of the data control system structure based on the optical disc library in the embodiment of the present application. Detailed Embodiment
[0053] To make the purpose, technical solution, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the specific embodiment and with reference to the drawings. It should be understood that these descriptions are exemplary and are not intended to limit the scope of the present application. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessarily confusing the concepts of the present application.
[0054] Figure 1 is a schematic diagram of the file data download process of the embodiment of the present application.
[0055] As Figure 1 shown, a method for data download includes:
[0056] Step 110: Generate the first request information for the data to be downloaded. The first request information includes the first storage location information of the data to be downloaded, user identity information, and pre-segmentation information. The first storage location is in the main storage device of the server side. The pre-segmentation information includes the initial position information and data length information of each segment of data after the data to be downloaded is segmented according to a preset segmentation rule.
[0057] The action execution entity in this embodiment is the client. The first request information for the data to be downloaded is generated in step 110, that is, the client generates this first request information. Moreover, when generating this first request information, the first storage location information of the data to be downloaded, the user identity information, and the pre-segmentation information of the data to be downloaded are packaged together to generate this first request information.
[0058] Step 120: Send the first request information.
[0059] Step 130: When the first request information passes the verification of the server side and when the data to be downloaded is stored at the first storage location, receive the data to be downloaded, and the data to be downloaded is sent segment by segment by the server side from the first storage location according to the pre-segmentation information.
[0060] After sending the first request information to the server side in step 120, the server side verifies the identity information in the request information to determine whether the client can obtain the data download service of the server side.
[0061] In step 130, when the first request information passes the verification of the server side and when the data to be downloaded is stored at the first storage location, the client starts to receive the data to be downloaded.
[0062] Step 140: Combine each segment of data received one by one according to the pre-segmentation information to form the required downloaded data.
[0063] In step 140, each segment of data received one by one is combined according to the pre-segmentation information to form the required downloaded data, that is, the received data segments are recombined according to the preset rules to form the complete downloaded data.
[0064] In this embodiment, by segmenting the data to be downloaded according to the preset segmentation rules to form pre-segmentation information when generating the first request information for the data to be downloaded, the server side can send the data segment by segment when feeding back the data, thus avoiding the problem that a large amount of untransmitted data accumulates in the server side during high-concurrency large-file transmission.
[0065] As Figure 1 shown, a method for data download includes:
[0066] Step 210: Receive the first request information for the data to be downloaded, where the first request information includes the first storage location information of the data to be downloaded, the user identity information, and the pre-segmentation information. The first storage location is in the main storage device of the server side, and the pre-segmentation information includes the initial position information and data length information of each segment of data after the data to be downloaded is segmented according to the preset segmentation rules.
[0067] The action execution entity in this embodiment is the server side. The first request information for receiving the data to be downloaded in step 210 exactly corresponds to the first request information generated and sent by the client in step 110 of the corresponding embodiment.
[0068] Step 220: Verify the first request information.
[0069] Step 230: When the first request information passes the verification and when the data to be downloaded is stored at the first storage location, send the data to be downloaded segment by segment according to the pre-segmentation information;
[0070] Step 230 means that after the first request information passes the verification and when the data to be downloaded is stored at the first storage location, only when both conditions are met, the server side sends the data to be downloaded stored at the first storage location in its main memory to the client.
[0071] Step 240: When the data to be downloaded is not stored at the first storage location, send a second request information for the data to be downloaded to the optical disc library connected to the server side. The second request information includes the second storage location information and the pre-segmentation information of the data to be downloaded. The second storage location is in the optical disc library, and the pre-segmentation information includes the initial position information and the data length information of each segment of data after the data to be downloaded is segmented according to the preset segmentation rule.
[0072] Step 240 means the process of sending the second request information for the data to be downloaded to the optical disc library connected to the server side after the first request information passes the verification but the data to be downloaded is not stored at the first storage location. The second request information is generated by the first request information, and the only difference between it and the first request information is that the second storage location in it is different from the first storage location. The first storage location is in the main storage device of the server side, and the second storage location is in the optical disc library.
[0073] In this embodiment, by setting the second storage location in the optical disc library corresponding to the first storage location in the main storage device of the server side, the storage and reading of data are made more scalable.
[0074] In some embodiments, step 230 specifically includes:
[0075] Step 231: Read the data to be downloaded stored at the first storage location segment by segment into the cache memory of the server side according to the initial position information and the data length information of each segment of the data to be downloaded in the pre-segmentation information.
[0076] Step 232: After a segment of the data to be downloaded is read completely, feed back the segment of the data to be downloaded from the cache memory to the client that sent the first request message, and delete the segment of the data to be downloaded from the cache memory.
[0077] In this embodiment, by reading the data to be downloaded into the cache memory of the server side segment by segment and sending the data to be downloaded to the client segment by segment via the cache memory, the cache memory can process a relatively large data file to be downloaded with a relatively small storage space.
[0078] In some embodiments, before sending a second request message for the data to be downloaded to the optical disc library connected to the server side when the data to be downloaded is not stored at the first storage location, it further includes:
[0079] According to the identity information in the first request message or the IP address of the client from which the first request message comes, different operation permissions are given to the second request message;
[0080] When the operation permission in the second request message is the read-write permission, open the read-write permission of the optical disc library data to the second request message;
[0081] When the operation permission in the second request message is the read-only permission, open the read-only permission of the optical disc library data to the second request message;
[0082] When there is no operation permission for the optical disc data in the second request message, prohibit the second request message from requesting the optical disc library data.
[0083] In this embodiment, by giving different permissions to the second request message, the access of different clients or different users to the optical disc library can be made more standardized and controllable.
[0084] Figure 2 It is a schematic diagram of the mounting and file data uploading process of the embodiments of the present application.
[0085] As Figure 2 shown, a method for data uploading includes:
[0086] Step 310: Send a mounting request, where the mounting request is used to request access to data files and file directories in the main storage device of the server side.
[0087] The action execution subject of this embodiment is the client. The mounting request sent in step 310 refers to a process in which the client sends a request message to make computer files and directories on a storage device (such as a hard disk, CD-ROM, or shared resource) in the server, optionally, accessible to the file system of the client.
[0088] Step 320: After the mounting request passes the verification on the server side, receive the feedback information allowing mounting for the mounting request, where the feedback information is sent by the server side;
[0089] The process in Step 320 refers to that after the mounting request sent by the client passes the verification, the feedback information allowing mounting is received.
[0090] Step 330: Divide the data to be uploaded into multiple data segments according to a preset rule, and form disassembling information of the data to be uploaded, where the disassembling information at least includes the initial position information and data length information of each data segment after the data to be uploaded is disassembled;
[0091] Step 330 refers to the process of first dividing the file data into multiple data segments according to a preset rule and forming corresponding disassembling information before uploading the file data.
[0092] Step 340: Upload the disassembling information so that the server side can combine the data segments it receives according to the disassembling information;
[0093] Step 340 refers to the client uploading the disassembling information, so that the receiving end of the file data, that is, the server side, optionally a server storage device, can combine the received data segments according to the disassembling information.
[0094] Step 350: Upload the disassembled data to be uploaded segment by segment with the data segment as the transmission unit.
[0095] Step 350 refers to the process of the client uploading the file data disassembled into multiple data segments segment by segment with the data segment as the transmission unit.
[0096] In this embodiment, by generating and uploading the disassembling information, the data to be uploaded can be uploaded and received segment by segment at both the sending and receiving ends. And it can enable the server side to recombine the received data segments according to the disassembling information to form the complete uploaded data.
[0097] As Figure 2 shown, a data uploading method includes:
[0098] Step 410: Receive a mounting request, where the mounting request is sent by the client and is used to request access to data files and file directories in the server side main storage device.
[0099] The action execution subject of this embodiment is the server side. The mounting request received in Step 410 is exactly the mounting request sent by the client in Step 310 of the relative embodiment.
[0100] Step 420: Verify the mounting request. After the mounting request passes the verification, send feedback information allowing the mounting for the mounting request.
[0101] Step 420 means that after the server side verifies the mounting request, it sends feedback information allowing the mounting to the client.
[0102] Step 430: Receive disassembly information of the data to be uploaded. The disassembly information at least includes the initial position information and data length information of each segment of the data to be uploaded after the data to be uploaded is split.
[0103] Step 430 means that the server side receives the disassembly information of the data to be uploaded sent by the client, so that for the data to be uploaded received segment by segment subsequently, it can be recombined according to the disassembly information to form complete uploaded data.
[0104] Step 440: Establish multiple block spaces of a determined capacity size in the cache memory of the server side. Each block space only receives data segments formed after splitting the same copy of the data to be uploaded before the transmission of the same copy of the data to be uploaded is completed.
[0105] Step 440 means establishing multiple block spaces of a determined capacity size in the cache memory of the server side. For example, establish 5 block spaces with a size of 20M, and then each block space is only responsible for processing all the data segments after splitting one uploaded data. Moreover, before all the data segments of one uploaded data are processed, this block space will not be used for processing other uploaded data. That is to say, a block space will only respond to other uploaded data after processing all the data segments of one uploaded data.
[0106] Step 450: Receive the data segment through the block space, and according to the disassembly information, after a determined data segment is received, transfer the data segment to the main memory of the server side.
[0107] Step 450 means that according to the initial position and data length of the data segment in the disassembly information, after a determined data segment is received, transfer the data segment from the block space in the cache memory to the main memory.
[0108] Step 460: Empty all the data in the block space so that the block space can continue to receive the next data segment.
[0109] Step 460 means that after transferring a received data segment from the block space in the cache memory to the main memory in Step 450, further empty all the data in this block space so that the block space can continue to receive the next data segment.
[0110] In this embodiment, multiple block spaces are set in the cache memory of the server side, and each block space is only responsible for processing all data segments after splitting an uploaded data. Moreover, before all data segments of an uploaded data are processed, this block space will not be used for processing other uploaded data. Thus, to a certain extent, it can avoid the problem that a large amount of untransmitted data accumulates on the server side during high-concurrency large-file transmission.
[0111] In some embodiments, the method further includes:
[0112] Step 470: When the remaining storage capacity of the main memory of the server side is lower than the set storage capacity, migrate the data in the main memory to the optical disc library connected to the server side.
[0113] Wherein the set storage capacity is the storage capacity of a certain proportion of the total storage capacity of the main memory. For example, if the set storage capacity is 20% of the total storage space of the main memory, then when the remaining storage capacity of the main memory is lower than this set storage capacity, that is, 20% of the total storage space of the main memory, then start to migrate the data in the main memory to the optical disc library connected to the server side. That is to say, if there is enough remaining storage capacity in the main memory of the server side, the data migration to the optical disc library will not be started.
[0114] The embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any of the above embodiments is implemented.
[0115] Figure 3 It is a schematic structural diagram of a data control system based on an optical disc library in the embodiment of the present application.
[0116] As Figure 3 shown, a data control system based on an optical disc library includes:
[0117] A database access module 106, configured to query file information and / or shared link information from the database, and save the file information and / or the shared link information to the database;
[0118] An object storage module 107, configured to store the entity data of a file and return the file data required by other modules according to requirements;
[0119] A management interface module 101, configured to view existing file information, view existing shared link information, and control different permissions for IP addresses or network segments or users;
[0120] The shared link management module 104 is used to obtain all existing shared links through the database access module, and add, delete, or modify shared links.
[0121] The permission management module 103 is used for the management of the shared links, including permission management and permission setting.
[0122] The file system module 105 is used to implement the connection between the system and the optical disc library to achieve the transmission, viewing, and deletion of file data in the optical disc library.
[0123] The shared client module 102 is used to view, upload, or download file data by generating and sending request information.
[0124] Among them, the management interface module 101 sends the information of sharing and permissions to the shared link management module 104. The shared link management module 104 shares the disc cartridge according to the sent disc cartridge information and permission scope, and saves the information such as the shared name and shared disc cartridge to the database through the database access module 106.
[0125] The process of adding shared permissions to the database includes that the management interface module 101 sends the information of sharing and permissions to the shared link management module 104, and then the shared link management module 104 sends the permission information to the permission management module 103. The permission management module 103 saves the information such as the permission scope and permission level to the database through the database access module 106.
[0126] The process of file directory query includes operating to view the directory in the corresponding directory of the shared client module 102. The shared client module 102 calls the file system module 105, and the file system module 105 calls the object storage module 107 to request to view the subdirectories / files in the current directory and request to view the basic information of the subdirectories / files in turn. The object storage module 107 calls the database access module 106 to query the list of directories / files in the current directory and the basic information of each directory / file through the database and return them. The basic information includes the directory / file name, file size, file creation time, etc.
[0127] The process of file upload includes selecting one or more files or several folders in the shared client module 102 for upload operation. The shared client module 102 calls the file system module 106, and the file system module 106 divides the file into several small pieces and uploads them to the object storage module 107 in turn. After the entire target file is uploaded, it will call the upload completion interface of the object storage module 107. The object storage module 107 sends the information of the file / directory to the database access module 106 for storage of file information.
[0128] The process of file reading includes that in the shared client module 102, several files or folders are selected for reading operations. The file system module 105 is called through the shared client module 102. The file system module 105 divides the file content to be obtained into several small segments, and sequentially calls the object storage module 107 to obtain the file data of each segment, and finally composes the complete file data. The object storage module 107 returns the file stream to the file system module 105, and the file system module 105 returns the file stream data to the shared client module 102, completing the normal reading of the file data.
[0129] The process of automatically enabling sharing when the system starts includes starting the shared link management module 104, enabling the shared link management module 104 to query the basic information of the existing shared links through the database access module 106. The shared link management module 104 calls the permission management module 103 to query the sharing permission information. The permission management module 103 queries the required permission information through the database access module and returns the corresponding permission information to the shared link management module 104. After obtaining the sharing information and permission information, the shared link management module 104 reconstructs the shared link according to this information.
[0130] It should be understood that the above specific embodiments of the present application are only used for exemplary illustration or explanation of the principle of the present application, and do not constitute a limitation to the present application. Therefore, any modifications, equivalent replacements, improvements, etc. made without departing from the spirit and scope of the present application shall be included within the protection scope of the present application. In addition, the appended claims of the present application are intended to cover all changes and modification examples falling within the scope and boundary of the appended claims, or equivalent forms of such scope and boundary.
Claims
1. A method for data downloading, characterized in that, Including: The client generates first request information for the data to be downloaded. The first request information includes the first storage location information of the data to be downloaded, user identity information, and pre-segmentation information. The first storage location is in the server-side main storage device. The pre-segmentation information includes the initial position information and data length information of each segment of the data to be downloaded after segmentation according to a preset segmentation rule. The client sends the first request information to the server side. The server side verifies the identity information in the request information. When the first request information passes the verification of the server side and when the data to be downloaded is stored at the first storage location, the data to be downloaded is sent segment by segment by the server side from the first storage location according to the pre-segmentation information, that is, according to the initial position information and data length information of each segment of the data to be downloaded in the pre-segmentation information, the data to be downloaded stored at the first storage location is read segment by segment into the cache memory of the server side. When a segment of the data to be downloaded is read, the segment of the data to be downloaded is fed back from the cache memory to the client that sent the first request information, and the segment of the data to be downloaded is deleted from the cache memory; according to the pre-segmentation information, each segment of data received segment by segment is combined to form the required downloaded data. When the data to be downloaded is not stored at the first storage location, a second request information for the data to be downloaded is sent to the optical disc library connected to the server side. The second request information includes the second storage location information of the data to be downloaded and pre-segmentation information. The second storage location is in the optical disc library. The pre-segmentation information includes the initial position information and data length information of each segment of the data to be downloaded after segmentation according to a preset segmentation rule.
2. The method according to claim 1, characterized in that, Before sending the second request information for the data to be downloaded to the optical disc library connected to the server side when the data to be downloaded is not stored at the first storage location, it further includes: According to the identity information in the first request information or the IP address of the client from which the first request information comes, different operation permissions are assigned to the second request information. When the operation permission in the second request information is read-write permission, the read-write permission of the optical disc library data is opened for the second request information. When the operation permission in the second request information is read-only permission, the read-only permission of the optical disc library data is opened for the second request information. When there is no operation permission for the optical disc library data in the second request information, the second request information is prohibited from requesting the optical disc library data.
3. A method for data uploading, characterized in that, Including: Sending a mount request, which is used to request access to data files and file directories in the server-side main storage device. When the mount request passes the verification of the server side, receiving feedback information allowing the mount for the mount request, and the feedback information is sent by the server side. The data to be uploaded is divided into multiple data segments according to preset rules, and disassembling information of the data to be uploaded is formed. The disassembling information at least includes the initial position information and data length information of each data segment after the data to be uploaded is disassembled; The disassembling information is uploaded so that the server side can combine the data segments it receives according to the disassembling information; The disassembled data to be uploaded is uploaded segment by segment with the data segment as the transmission unit; among them, A mounting request is received. The mounting request is sent by the client and is used to request access to data files and file directories in the main storage device of the server side; The mounting request is verified. When the mounting request passes the verification, feedback information allowing mounting for the mounting request is sent; Disassembling information of the data to be uploaded is received. The disassembling information at least includes the initial position information and data length information of each data segment after the data to be uploaded is disassembled; Multiple block spaces with a determined capacity size are established in the cache memory of the server side. Each block space only receives data segments formed after disassembling the same data to be uploaded before the transmission of the same data to be uploaded is completed; The data segment is received through the block space, and according to the disassembling information, after a determined data segment is received, the data segment is transferred to the main memory of the server side; All data in the block space is cleared so that the block space can continue to receive the next data segment.
4. The method according to claim 3, characterized in that, It further includes: When the remaining storage capacity of the main memory of the server side is lower than the set storage capacity, the data in the main memory is migrated to an optical disc library connected to the server side.
5. The method according to claim 4, characterized in that, The set storage capacity is a storage capacity that is a determined proportion of the total storage capacity of the main memory.
6. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any one of the above claims 1-5 is implemented.
7. A data control system based on an optical disc library, characterized in that, It includes: A database access module, which is used to query file information and / or shared link information from the database, and save the file information and / or the shared link information to the database; An object storage module, which is used to store the entity data of files and return the file data required by other modules according to requirements; A management interface module, which is used to view existing file information, view existing shared link information, and control different permissions for IP addresses or network segments or users; A shared link management module, which is used to obtain all existing shared links through the database access module, and add, delete, or modify shared links; A permission management module, which is used for the management of the shared links, including permission management and permission setting; A file system module, which is used to implement the connection between the system and the optical disc library to realize the transmission, viewing, and deletion of file data in the optical disc library; A shared client module, which is used to realize the viewing, uploading, or downloading of file data by generating and sending request information through the data download / upload method described in any one of claims 1-6.
Citation Information
Patent Citations
Magnetic disk and optical disk fusion data security storage method, system and apparatus
CN105224891A
File processing method, device and equipment and storage medium
CN111783123A