Data management method, device, storage medium and electronic equipment

By storing the correspondence between the object directory and the actual path in the database and generating the target page display information, the problem of historical data being unable to be managed after user/user group data is deleted is solved, and efficient storage and convenient management of historical data are achieved.

CN119200958BActive Publication Date: 2025-09-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411090274.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2025-09-19
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

In the prior art, valuable historical data cannot be effectively preserved and managed after user/user group data is deleted, resulting in low data management efficiency.

Method used

By storing the correspondence between the object directory and the actual path in the database, generating the target page display information, responding to the data acquisition request of the front-end application, determining the objects to be processed and performing data management operations, including renaming and migration, etc., to ensure that historical data can be queried and managed.

Benefits of technology

It achieves efficient storage and management of historical user data, facilitates management personnel's query and operation, solves the problem of unreasonable storage and management of historical data, and improves the convenience of data migration and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119200958B_ABST
    Figure CN119200958B_ABST
Patent Text Reader

Abstract

The present application provides a data management method, apparatus, storage medium, and electronic device, relating to the field of computer technology. The method comprises: responding to a target data acquisition request sent by a front-end application, sending target page display information corresponding to the target data acquisition request to the front-end application; responding to the data management request sent by the front-end application, based on the management object information contained in the data management request, executing the data management operation indicated by the data management request on the pending objects indicated by the management object information stored in multiple storage nodes; wherein the historical object data is obtained by renaming the corresponding existing object data after the object data management system deletes the object in the same storage node. The data management method, apparatus, storage medium, and electronic device provided in the present application are used to facilitate management personnel to query and manage the historical data of users / user groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data management method, device, storage medium, and electronic device. Background Art

[0002] The data management system's structure is organized according to users / user groups. Accordingly, the underlying storage space is also divided according to user directories / user group directories. When a user / user group is created on the system, a corresponding user directory is created within the corresponding storage space to store the user / user group data.

[0003] In related technologies, when an administrator deletes a user or user group from the system, the system directly deletes the corresponding data or transfers it to other, less efficient storage methods to save storage space. However, this direct deletion of user or user group data fails to transfer or preserve valuable data.

[0004] Based on this, there is an urgent need for a data management method to improve the management efficiency of historical user data of deleted users / user groups. Summary of the Invention

[0005] The purpose of this application is to provide a data management method, device, storage medium and electronic device for facilitating managers to query and manage historical data of users / user groups.

[0006] This application provides a data management method, including:

[0007] In response to the target data acquisition request sent by the front-end application, target page display information corresponding to the target data acquisition request is sent to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; in response to the data management request sent by the front-end application, the object to be processed stored in the storage node indicated by the management object information contained in the data management request is determined, and the data management operation indicated by the data management request is performed on the object to be processed; wherein, the historical object data is: in the same storage node, after the object data management system deletes the object, the corresponding existing object data is renamed.

[0008] Optionally, the target data acquisition request includes: a first data acquisition request; the target page display information includes: first page display information; in response to the target data acquisition request sent by the front-end application, sending the target page display information corresponding to the target data acquisition request to the front-end application includes: receiving the first data acquisition request sent by the front-end application; in response to the first data acquisition request, acquiring from the database a plurality of to-be-processed information storing a correspondence between an object directory and an actual path, and generating a plurality of first page display information based on the plurality of to-be-processed information; one to-be-processed information corresponds to one first page display information; the first page display information includes: an object name, a storage node name, an object type, a number of reconstructions, and a creation time; sending the plurality of first page display information to the front-end application; wherein, after receiving the plurality of first page display information, the front-end application displays the object directory of the to-be-displayed object corresponding to each first page display information on a page based on the plurality of first page display information; and after receiving the plurality of first page display information, the front-end application prioritizes the to-be-displayed objects having the same object name based on the creation time contained in each first page display information, and displays the objects differently according to the priority of each to-be-displayed object.

[0009] Optionally, the target data acquisition request includes: a second data acquisition request; the target page display information includes: second page display information; the response to the target data acquisition request sent by the front-end application, sending the target page display information corresponding to the target data acquisition request to the front-end application, includes: receiving the second data acquisition request sent by the front-end application; responding to the second data acquisition request, based on the target parameter carried in the second data acquisition request, obtaining the actual path of the target object accessed by the second data acquisition request from the database; the target parameter information includes: object name, object type, storage node name and reconstruction times; based on the actual path of the target object, obtaining the second page display information corresponding to the target object from the storage node indicated by the target parameter; the second page display information includes: file information contained in the object directory corresponding to the target object; sending the second page display information to the front-end application; wherein, after receiving the second page display information, the front-end application displays the files contained in the object directory corresponding to the target object on the page based on the first page display information.

[0010] Optionally, the operation indicated by the data management request is: a data transfer operation; in response to the data management request sent by the front-end application, determining the objects to be processed stored in the storage node indicated by the management object information contained in the data management request, and performing the data management operation indicated by the data management request on the objects to be processed, including: determining the actual path of each object to be processed in at least one object to be processed based on the management object information; and transferring the at least one object to be processed from the multiple storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed.

[0011] Optionally, the transferring of the at least one object to be processed from the multiple storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed includes: when there is an object with the same object name in the at least one object to be processed, renaming the object with the same name in the at least one object to be processed according to a first renaming rule; when there is an object with the same object name as the at least one object to be processed in the target directory, renaming the object with the same name in the at least one object to be processed according to the first renaming rule.

[0012] Optionally, the operation indicated by the data management request is: a data download operation; in response to the data management request sent by the front-end application, determining the objects to be processed stored in the storage node indicated by the management object information contained in the data management request, and performing the data management operation indicated by the data management request on the objects to be processed, including: determining the actual path of each object to be processed in at least one object to be processed based on the management object information; downloading the at least one object to be processed to the target directory indicated by the data download operation based on the actual path of each object to be processed, and renaming the objects with the same name in the at least one object to be processed according to the first renaming rule during the download process.

[0013] Optionally, the page of the front-end application also displays existing user objects, and the method further includes: in response to an object deletion request sent by the front-end application, renaming the object directory corresponding to the object to be deleted indicated by the object deletion request according to a second renaming rule; based on the object name, storage node name, object type and object directory name of the object to be deleted, creating correspondence information between the object directory and the actual path of the object to be deleted in the database, and updating the reconstruction number of the information to be updated in the database that has the same object name as the object to be deleted.

[0014] The present application also provides a data management device, comprising:

[0015] An information display module is used to respond to a target data acquisition request sent by the front-end application and send target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; a data processing module is used to respond to a data management request sent by the front-end application, determine the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and perform the data management operation indicated by the data management request on the object to be processed; wherein, the historical object data is: in the same storage node, after the object data management system deletes the object, the corresponding existing object data is renamed.

[0016] Optionally, the target data acquisition request includes: a first data acquisition request; the target page display information includes: first page display information; the device further includes: a receiving module and a sending module; the receiving module is used to receive the first data acquisition request sent by the front-end application; the information display module is specifically used to obtain, in response to the first data acquisition request, multiple to-be-processed information storing the correspondence between the object directory and the actual path from the database, and generate multiple first page display information based on the multiple to-be-processed information; one to-be-processed information corresponds to one first page display information; the first page display information includes: object name, storage node name, object type, number of reconstructions, and creation time; the sending module is used to send the multiple first page display information to the front-end application; wherein, after receiving the multiple first page display information, the front-end application displays the object directory of the to-be-displayed object corresponding to each first page display information on the page based on the multiple first page display information; and after receiving the multiple first page display information, the front-end application prioritizes the to-be-displayed objects with the same object name based on the creation time contained in each first page display information, and displays them differently according to the priority of each to-be-displayed object.

[0017] Optionally, the target data acquisition request includes: a second data acquisition request; the target page display information includes: second page display information; the receiving module is also used to receive the second data acquisition request sent by the front-end application; the information display module is specifically used to respond to the second data acquisition request and, based on the target parameter carried in the second data acquisition request, obtain the actual path of the target object accessed by the second data acquisition request from the database; the target parameter information includes: object name, object type, storage node name and number of reconstructions; the information display module is specifically also used to obtain the second page display information corresponding to the target object from the storage node indicated by the target parameter based on the actual path of the target object; the second page display information includes: file information contained in the object directory corresponding to the target object; the sending module is also used to send the second page display information to the front-end application; wherein, after receiving the second page display information, the front-end application displays the files contained in the object directory corresponding to the target object on the page based on the first page display information.

[0018] Optionally, the operation indicated by the data management request is: a data transfer operation; the data processing module is specifically used to determine the actual path of each object to be processed in at least one object to be processed based on the management object information; the data processing module is also specifically used to transfer the at least one object to be processed from the multiple storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed.

[0019] Optionally, the data processing module is specifically used to rename the object with the same name in the at least one object to be processed according to the first renaming rule when there is an object with the same name as the at least one object to be processed; the data processing module is also specifically used to rename the object with the same name in the at least one object to be processed according to the first renaming rule when there is an object with the same name as the at least one object to be processed in the target directory.

[0020] Optionally, the operation indicated by the data management request is: a data download operation; the data processing module is specifically used to determine the actual path of each object to be processed in at least one object to be processed based on the management object information; the data processing module is also specifically used to download the at least one object to be processed to the target directory indicated by the data download operation based on the actual path of each object to be processed, and rename the objects with the same name in the at least one object to be processed according to the first renaming rule during the download process.

[0021] Optionally, the page of the front-end application also displays existing user objects, and the data processing module is further used to respond to the object deletion request sent by the front-end application, and rename the object directory corresponding to the object to be deleted indicated by the object deletion request according to the second renaming rule; the data processing module is also used to create correspondence information between the object directory and the actual path of the object to be deleted in the database based on the object name, storage node name, object type and object directory name of the object to be deleted, and update the reconstruction number of the information to be updated in the database that is the same as the object name of the object to be deleted.

[0022] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above-mentioned data management methods when executed by a processor.

[0023] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-described data management methods when executing the program.

[0024] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above-mentioned data management methods when executed by a processor.

[0025] The data management method, device, storage medium and electronic device provided by the present application first respond to the target data acquisition request sent by the front-end application, send the target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; thereafter, in response to the data management request sent by the front-end application, determine the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and perform the data management operation indicated by the data management request on the object to be processed; wherein, the historical user data is: in the same storage node, after the data management system deletes the object, the corresponding existing user data is renamed. In this way, not only the storage problem of user historical data is solved, but also it is convenient for management personnel to query and manage the historical data of users / user groups. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the present application or 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 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.

[0027] Figure 1 It is a structural diagram of the data management system provided by this application;

[0028] Figure 2 It is a flowchart of the data management method provided by this application;

[0029] Figure 3 This is a schematic diagram of the data transfer process provided by this application;

[0030] Figure 4 This is a schematic diagram of the data download process provided by this application;

[0031] Figure 5 It is a structural diagram of the data management device provided by this application;

[0032] Figure 6 It is a structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0034] 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, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0035] In related technologies, after administrators delete users and user groups from the data management system, the system will directly delete that part of the data and will no longer manage the data of the deleted users and user groups. As users use the platform, they may find that valuable data of historical users or user groups cannot be transferred or retained. Alternatively, administrators want to separate users from user data. When deleting a user, they do not delete the user data, but still save the historical user data together with the existing user data, and the page display is also unified. However, this will cause the existing user and historical user data to be mixed, making it difficult for administrators to distinguish between existing user data and historical user data. In order to distinguish between existing user data and historical user data, they need to first go to the user management to confirm that the user does not exist, and then jump to the data management page to find the corresponding data. The operation is very cumbersome.

[0036] In response to the above-mentioned technical problems existing in the relevant technologies, the embodiments of the present application provide a data management method, which can solve the problem that historical user data and historical user group data in the data management system cannot be reasonably stored and managed, and conveniently provide management functions such as the display of historical user data and historical user group data, the migration of historical user data and historical user group data, the downloading of historical user data and historical user group data to the local, the deletion and clearing of historical user data and historical user group data, etc., providing managers with a view of historical user data management, and facilitating administrators to transfer, download, delete and other operations on historical user and user group data, thereby realizing convenient data migration and management.

[0037] like Figure 1 As shown in FIG, a schematic diagram of the structure of the data management system provided by an embodiment of the present application includes: a plurality of storage nodes (such as Figure 1 Storage nodes A and B shown in FIG), for storing a database of correspondences between object directories and actual paths (such as Figure 1 The embodiment of the present invention relates to a front-end application for user data management, wherein each of the plurality of storage nodes stores historical user data and current user data, as well as historical user group data and current user group data. The management unit is configured to process requests from the front-end application and feed back relevant information retrieved from the database and storage nodes to the front-end application.

[0038] It should be noted that, since the operations on user data and user group data in the embodiments of the present application are exactly the same, objects are used to represent users or user groups in the embodiments of the present application.

[0039] In this embodiment of the present application, to reduce storage and network overhead, existing object data and historical object data are stored in the same root directory of the same storage. To distinguish existing object data from historical object data in the same root directory, this embodiment of the present application performs special processing on the underlying storage format of historical object data. Specifically, within the underlying storage directory, this embodiment of the present application renames the directories of historical users and historical user groups based on the timestamp when the object was deleted, enabling the coexistence of historical object data and existing object data.

[0040] At the same time, since historical object data is displayed based on object names in the front-end application, in order to facilitate management personnel to manage historical object data, it is necessary to store the correspondence between object directories and actual paths in the database. Specifically, the data structure for storing the correspondence between object directories and actual paths in the database can be as follows:

[0041] {

[0042] "id":"0123", / / Primary key, unique identifier of the record;

[0043] "name": "user1", / / The name of the user or user group, that is, the object name;

[0044] "storageName":"nfs1", / / storage node name;

[0045] "storagePath": " / .user1.del20240618150450", / / actual path;

[0046] "storageLocation":1, / / Object type: 1 is the user group directory, 2 is the user directory;

[0047] "delTime": 2, / / Number of times the user / user group with the same name is rebuilt, that is, the number of times the object is rebuilt;

[0048] "createTime":"", / / The time when this information was created, that is, the time when the object was deleted;

[0049] }

[0050] Based on the above data structure, the actual path of the object directory of each historical object can be queried, and the historical object data of the historical object can be accessed based on the actual path.

[0051] The data management method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0052] like Figure 2As shown, an embodiment of the present application provides a data management method, which may include the following steps 201 and 202:

[0053] Step 201: In response to a target data acquisition request sent by the front-end application, target page display information corresponding to the target data acquisition request is sent to the front-end application.

[0054] The target page display information is generated based on the corresponding relationship between the object directory and the actual path stored in the database.

[0055] For example, the target data retrieval request may include a first data retrieval request for retrieving the object directory of all historical objects, and a second data retrieval request for retrieving a historical object selected by the administrator. Accordingly, the target page display information may include a first page display information for displaying the object directory of all historical objects, and a second page display information for displaying the subdirectories and files within the object directory of the historical object selected by the administrator.

[0056] For example, the data structure Data2Query defining the page display data in the embodiment of the present application is as follows:

[0057] {

[0058] "id":"0123", / / Primary key, unique identifier of the record;

[0059] "fileName":"user1", / / The displayed file name, that is, the object name;

[0060] "storageName":"nfs1", / / The storage node name to be displayed;

[0061] "filePath":" / .user1.del20240618150450", / / The actual path of the object directory;

[0062] "storageLocation":1, / / Directory location: 1-group directory, 2-user directory;

[0063] "fileType":1, / / File type: 1-file, 2-folder;

[0064] "fileSize":"123456", / / file size;

[0065] "fileTime":"1719478551000", / / file creation time;

[0066] "delTime":1, / / The number of times the object with the same name is rebuilt;

[0067] }

[0068] It should be noted that, when the system creates a user or user group, it will create a directory for the user or user group, i.e., an object directory. Therefore, the first level under the root directory must be a folder. Based on this, the first level directory under the root directory can be accessed through the above-mentioned first data acquisition request. After receiving the first data acquisition request, the system encapsulates the relevant information of each object directory as the above-mentioned Data2Query and returns it to the front-end application; for the subdirectories or subfiles of the first-level directory,

[0069] Specifically, when the target data acquisition request is the first data acquisition request and the target page display information is the first page display information, the above step 201 may further include the following steps 201a1 to 201a3:

[0070] Step 201a1: Receive a first data acquisition request sent by the front-end application.

[0071] Step 201a2: In response to the first data acquisition request, a plurality of to-be-processed information storing the correspondence between the object directory and the actual path is acquired from the database, and a plurality of first page display information is generated based on the plurality of to-be-processed information.

[0072] Among them, one piece of information to be processed corresponds to one piece of first page display information; the first page display information includes: object name, storage node name, object type, reconstruction times and creation time.

[0073] Step 20a3: Send the multiple first page display information to the front-end application.

[0074] Among them, after receiving the multiple first page display information, the front-end application displays the object directory of the object to be displayed corresponding to each first page display information on the page based on the multiple first page display information; and after receiving the multiple first page display information, the front-end application prioritizes the objects to be displayed with the same object name based on the creation time contained in each first page display information, and displays them differently according to the priority of each object to be displayed.

[0075] For example, all historical user data and historical user group data, regardless of user or user group, regardless of primary storage or backup storage, are all displayed flatly on the page of the front-end application. The displayed information includes: object name, storage node name, object type, number of reconstructions, data size, creation time, etc., that is, the content contained in the above-mentioned Data2Query.

[0076] It should be noted that the front-end application page can display the object directory of all objects (including existing objects and historical objects) based on the object name. Since historical objects and existing objects may have the same name, and historical objects may also have the same name, the front-end application can display them differently on the page based on the order of the above creation time. For example, the older the historical object, the higher the transparency of the folder icon.

[0077] In a possible implementation, the first page display information may further include a display priority of each historical object. The display priority of each historical object may be calculated based on the following steps S1 and S2:

[0078] Step S1: Obtain priority parameter information of each historical object among a plurality of historical objects with the same object name, and normalize various parameters in the priority parameter information.

[0079] The priority parameter information includes: number of accesses, creation time, and number of reconstructions.

[0080] Step S2: Obtain the display priority of each historical object by performing weighted summation based on the normalized priority parameter information.

[0081] Illustratively, after receiving the first page display information, the front-end application displays the multiple historical objects with the same object name in a differentiated manner based on the display priority of each historical object.

[0082] Specifically, when the target data acquisition request is the second data acquisition request and the target page display information is the second page display information, the above step 201 may further include the following steps 201b1 to 201b3:

[0083] Step 201b1: In response to the second data acquisition request, based on the target parameter carried in the second data acquisition request, obtain from the database the actual path of the target object accessed by the second data acquisition request.

[0084] The target parameter information includes: object name, object type, storage node name and reconstruction times.

[0085] Step 201b2: Obtain the second page display information corresponding to the target object from the storage node indicated by the target parameter based on the actual path of the target object.

[0086] The second page display information includes: file information contained in the object directory corresponding to the target object.

[0087] Step 201b3: Send the second page display information to the front-end application.

[0088] After receiving the second page display information, the front-end application displays the files contained in the object directory corresponding to the target object on the page based on the first page display information.

[0089] For example, when the administrator double-clicks to select a folder of a historical object on the page of the front-end application, the front-end application can send a second data acquisition request to the system. The system responds to the second data acquisition request and sends a second page display information containing the sub-files and sub-directory information contained in the object directory of the historical object to the front-end application. After receiving the second page display information, the front-end application displays the sub-files and sub-directories contained in the object directory.

[0090] It should be noted that in order to keep the data structure obtained each time the same, the front-end application can obtain the actual path of the folder through the first data acquisition request, but since the actual path may change due to multi-user access, when the front-end application obtains the sub-directories and sub-files of the object directory of the historical object through the second data acquisition request, it is also necessary to obtain the real-time path of the sub-file or sub-folder again.

[0091] Step 202: In response to the data management request sent by the front-end application, determine the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and perform the data management operation indicated by the data management request on the object to be processed.

[0092] The historical object data is obtained by renaming the corresponding existing object data after the object data management system deletes the object in the same storage node.

[0093] Exemplarily, in an embodiment of the present application, the operations indicated by the data management request may include: a data transfer operation and a data download operation.

[0094] Specifically, when the operation indicated by the data management request is a data transfer operation, the above step 202 may include the following steps 202a and 202b:

[0095] Step 202a: Based on the management object information, determine the actual path of each object to be processed in at least one object to be processed.

[0096] Step 202b: Transferring the at least one object to be processed from the multiple storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed.

[0097] For example, when data is transferred, objects with duplicate names may appear. To avoid the situation where the transferred object directory cannot identify which object it belongs to, the object directory of the duplicated object may be renamed.

[0098] Specifically, the above step 202b may further include the following steps 202b1 and 202b2:

[0099] Step 202b1: When there are objects with the same object name in the at least one object to be processed, rename the objects with the same object name in the at least one object to be processed according to a first renaming rule.

[0100] Step 202b2: If there is an object with the same name as the at least one object to be processed in the target directory, rename the object with the same name in the at least one object to be processed according to the first renaming rule.

[0101] For example, Figure 3 FIG. 1 is a schematic diagram of a data transfer process according to an embodiment of the present application, including steps A1 to A6:

[0102] A1. The system administrator logs in to the system, enters the historical user / user group data management module, previews the files of the historical user / user group, selects the files / directories of the historical user / user group to be transferred (i.e., the objects to be transferred), and selects the target directory to be transferred.

[0103] A2. If it is a batch transfer operation, it is necessary to determine whether there are files / directories with the same name as the historical user / user group to be transferred. If so, it is necessary to generate a copy of the historical file name and jump to A4. If not, it is necessary to determine whether there are files or directories with the same name in the target directory. If not, it is necessary to jump directly to A4. If so, it is necessary to jump to A5.

[0104] A3. If it is not a batch transfer operation, determine whether there is a file or directory with the same name in the target directory. If not, jump to A4; if so, jump to A5.

[0105] A4. Issue the handover task and enter the file management progress list. After the handover is completed, jump to A4.

[0106] A5. Select whether to overwrite. If you choose to overwrite, go to A4. If not, the process ends.

[0107] A6: Check if the object to be transferred is a first-level directory. If not, transfer it directly and the process ends. If it is, rename it based on the generated copy name and the process ends.

[0108] Exemplarily, the generation rule of the replica name (ie, the first renaming rule) may be: object name+primary key ID+creation timestamp.

[0109] Specifically, when the operation indicated by the data management request is a data download operation, the above step 202 may include the following steps 202c1 and 202c2:

[0110] Step 202c1: Based on the management object information, determine the actual path of each object to be processed in at least one object to be processed.

[0111] Step 202c2: download the at least one object to be processed to the target directory indicated by the data download operation based on the actual path of each object to be processed, and rename the objects with the same name in the at least one object to be processed according to the first renaming rule during the download process.

[0112] For example, Figure 4 FIG. 1 is a schematic diagram of a data download process provided in an embodiment of the present application, including steps B1 to B6:

[0113] B1. The system administrator logs in to the system, enters the historical user / user group data management module, previews the files of the historical user / user group, and selects the files / directories of the historical user / user group to be downloaded, i.e., the download objects.

[0114] B2. If it is a batch download operation, it is necessary to determine whether there are files / directories with the same name as the historical user / user group to be downloaded. If so, a copy of the historical file name needs to be generated and the process jumps to B5. If not, the process jumps directly to B4.

[0115] B3. If it is not a batch download operation, determine whether the file to be downloaded is a directory. If so, jump to B4; if not, jump to B6.

[0116] B4: Is it a first-level directory? If not, recursively traverse the files, return the compressed stream, and jump to B6. If so, rename the file stream returned by the first-level directory to the historical user / user group name, encapsulate the compressed stream, and jump to B6.

[0117] B5. The file stream returned by the first-level directory needs to be renamed to the generated copy name, and the compressed package stream is encapsulated, and then jump to B6.

[0118] B6. Establish a Hypertext Transfer Protocol (HTTP) connection and receive the file stream. Once the receiving is complete, the process ends.

[0119] It should be noted that in the embodiments of the present application, the HTTP connection established between the front-end application and the server usually has a timeout period. If there is no response for a long time after the HTTP connection is established, the front-end application will disconnect due to timeout. Therefore, if multiple files or directories are packaged and then returned to the front-end application, there is a risk of timeout.

[0120] In an embodiment of the present application, a method of returning a compressed packet stream immediately is used to solve the problem of download failure caused by timeout and disconnection between the front-end application and the server due to excessive user data. The response returned by the download interface to the front-end application is defined as a file stream, and the file name of the response is set to the timestamp of the current download history data, and the content-type of the response is set to file stream. At the beginning of the download interface, a compressed packet stream object zipOut is defined, and this compressed packet stream object is used to continuously receive the compressed packet stream generated by recursively traversing the file. This ensures that the stream is immediately returned to the front-end application until the stream reception is completed, and the file download is complete.

[0121] Optionally, in an embodiment of the present application, after an object (user or user group) is deleted on the system, the object directory of the object may be renamed and related information may be created in the database.

[0122] Illustratively, the data management method provided in the embodiment of the present application may further include the following steps 203 and 204:

[0123] Step 203: In response to the object deletion request sent by the front-end application, rename the object directory corresponding to the object to be deleted indicated by the object deletion request according to a second renaming rule.

[0124] Step 204: Based on the object name, storage node name, object type, and object directory name of the object to be deleted, create correspondence information between the object directory and the actual path of the object to be deleted in the database, and update the reconstruction count of the to-be-updated information with the same object name as the object to be deleted in the database.

[0125] For example, the second naming rule may be object name + keyword del + deletion timestamp, such as “ / .user1.del20240618150450” in the above example. The front-end application may differentiate between existing objects and historical objects based on the object name.

[0126] The data management method provided by the embodiment of the present application, first, in response to the target data acquisition request sent by the front-end application, sends the target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; thereafter, in response to the data management request sent by the front-end application, determines the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and performs the data management operation indicated by the data management request on the object to be processed; wherein, the historical user data is: in the same storage node, after the data management system deletes the object, the corresponding existing user data is renamed. In this way, not only the storage problem of user historical data is solved, but also it is convenient for management personnel to query and manage the historical data of users / user groups.

[0127] It should be noted that the data management method provided in the embodiments of the present application can be executed by a data management device or a control module in the data management device for executing the data management method. In the embodiments of the present application, the data management device provided in the embodiments of the present application is described by taking the execution of the data management method by the data management device as an example.

[0128] It should be noted that the data management methods shown in the figures in the embodiments of this application are each described by way of example in conjunction with one of the figures in the embodiments of this application. In specific implementations, the data management methods shown in the figures in the figures in the above methods may also be implemented in conjunction with any other combinable figures shown in the above embodiments, and will not be further described here.

[0129] The data management device provided by the present application is described below, and the data management method described below and above can be referenced to each other.

[0130] Figure 5 A structural diagram of the data management device provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, specifically including:

[0131] The information display module 501 is used to respond to the target data acquisition request sent by the front-end application and send the target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; the data processing module 502 is used to respond to the data management request sent by the front-end application, determine the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and perform the data management operation indicated by the data management request on the object to be processed; wherein, the historical object data is: in the same storage node, after the object data management system deletes the object, the corresponding existing object data is renamed.

[0132] Optionally, the target data acquisition request includes: a first data acquisition request; the target page display information includes: first page display information; the device further includes: a receiving module and a sending module; the receiving module is used to receive the first data acquisition request sent by the front-end application; the information display module 501 is specifically used to, in response to the first data acquisition request, obtain multiple to-be-processed information storing the correspondence between the object directory and the actual path from the database, and generate multiple first page display information based on the multiple to-be-processed information; one to-be-processed information corresponds to one first page display information; the first page display information includes: object name, storage node name, object type, number of reconstructions, and creation time; the sending module is used to send the multiple first page display information to the front-end application; wherein, after receiving the multiple first page display information, the front-end application displays the object directory of the to-be-displayed object corresponding to each first page display information on the page based on the multiple first page display information; and after receiving the multiple first page display information, the front-end application prioritizes the to-be-displayed objects with the same object name based on the creation time contained in each first page display information, and displays them differently according to the priority of each to-be-displayed object.

[0133] Optionally, the target data acquisition request includes: a second data acquisition request; the target page display information includes: second page display information; the receiving module is also used to receive the second data acquisition request sent by the front-end application; the information display module 501 is specifically used to respond to the second data acquisition request, based on the target parameter carried in the second data acquisition request, to obtain the actual path of the target object accessed by the second data acquisition request from the database; the target parameter information includes: object name, object type, storage node name and reconstruction times; the information display module 501 is specifically also used to obtain the second page display information corresponding to the target object from the storage node indicated by the target parameter based on the actual path of the target object; the second page display information includes: file information contained in the object directory corresponding to the target object; the sending module is also used to send the second page display information to the front-end application; wherein, after receiving the second page display information, the front-end application displays the files contained in the object directory corresponding to the target object on the page based on the first page display information.

[0134] Optionally, the operation indicated by the data management request is: a data transfer operation; the data processing module 502 is specifically used to determine the actual path of each object to be processed in at least one object to be processed based on the management object information; the data processing module 502 is also specifically used to transfer the at least one object to be processed from the multiple storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed.

[0135] Optionally, the data processing module 502 is specifically used to rename the object with the same name in the at least one object to be processed according to the first renaming rule when there is an object with the same name as the at least one object to be processed; the data processing module 502 is also specifically used to rename the object with the same name in the at least one object to be processed according to the first renaming rule when there is an object with the same name as the at least one object to be processed in the target directory.

[0136] Optionally, the operation indicated by the data management request is: a data download operation; the data processing module 502 is specifically used to determine the actual path of each object to be processed in at least one object to be processed based on the management object information; the data processing module 502 is also specifically used to download the at least one object to be processed to the target directory indicated by the data download operation based on the actual path of each object to be processed, and rename the objects with the same name in the at least one object to be processed according to the first renaming rule during the download process.

[0137] Optionally, the page of the front-end application also displays existing user objects, and the data processing module 502 is also used to respond to the object deletion request sent by the front-end application, and rename the object directory corresponding to the object to be deleted indicated by the object deletion request according to the second renaming rule; the data processing module 502 is also used to create the correspondence information between the object directory of the object to be deleted and the actual path in the database based on the object name, storage node name, object type and object directory name of the object to be deleted, and update the reconstruction number of the information to be updated in the database that is the same as the object name of the object to be deleted.

[0138] The data management device provided by the present application first responds to the target data acquisition request sent by the front-end application and sends the target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; thereafter, in response to the data management request sent by the front-end application, the device determines the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and performs the data management operation indicated by the data management request on the object to be processed; wherein, the historical user data is: in the same storage node, after the data management system deletes the object, the corresponding existing user data is renamed. In this way, not only the storage problem of user historical data is solved, but also it is convenient for management personnel to query and manage the historical data of users / user groups.

[0139] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communications bus 540. The processor 510 may invoke logic instructions in the memory 530 to execute a data management method, which includes: responding to a target data acquisition request sent by the front-end application, sending target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory and the actual path stored in the database; responding to the data management request sent by the front-end application, determining the object to be processed stored in the storage node indicated by the management object information included in the data management request, and performing the data management operation indicated by the data management request on the object to be processed; wherein the historical object data is obtained by renaming the corresponding existing object data in the same storage node after the object data management system deletes the object.

[0140] In addition, the logical instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program code.

[0141] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the data management method provided by the above methods, the method including: in response to the target data acquisition request sent by the front-end application, sending target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; in response to the data management request sent by the front-end application, determining the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and performing the data management operation indicated by the data management request on the object to be processed; wherein, the historical object data is: in the same storage node, after the object data management system deletes the object, the corresponding existing object data is renamed.

[0142] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned data management methods, the method comprising: in response to a target data acquisition request sent by the front-end application, sending target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on the correspondence between the object directory stored in the database and the actual path; in response to the data management request sent by the front-end application, determining the object to be processed stored in the storage node indicated by the management object information contained in the data management request, and performing the data management operation indicated by the data management request on the object to be processed; wherein, the historical object data is: in the same storage node, after the object data management system deletes the object, the corresponding existing object data is renamed.

[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0144] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data management method, characterized in that: A management unit applied to a data management system, the system further comprising: a plurality of storage nodes for storing user data, a database for storing correspondences between object directories and actual paths, and a front-end application for user data management, wherein each of the plurality of storage nodes stores historical object data and existing object data; the historical object data being obtained by renaming the corresponding existing object data in the same storage node after the object data management system deletes an object; The method comprises: In response to a target data acquisition request sent by the front-end application, target page display information corresponding to the target data acquisition request is sent to the front-end application; the target page display information is generated based on a correspondence between an object directory stored in the database and an actual path; In response to a data management request sent by the front-end application, an object to be processed stored in the storage node indicated by the management object information contained in the data management request is determined, and a data management operation indicated by the data management request is performed on the object to be processed.

2. The method according to claim 1, characterized in that The target data acquisition request includes: a first data acquisition request; the target page display information includes: first page display information; The step of responding to the target data acquisition request sent by the front-end application and sending target page display information corresponding to the target data acquisition request to the front-end application includes: Receiving a first data acquisition request sent by the front-end application; In response to the first data acquisition request, a plurality of to-be-processed information storing correspondences between object directories and actual paths is acquired from the database, and a plurality of first page display information is generated based on the plurality of to-be-processed information; each to-be-processed information corresponds to one first page display information; the first page display information includes: object name, storage node name, object type, reconstruction count, and creation time; Sending the plurality of first page display information to the front-end application; Among them, after receiving the multiple first page display information, the front-end application displays the object directory of the object to be displayed corresponding to each first page display information on the page based on the multiple first page display information; and after receiving the multiple first page display information, the front-end application prioritizes the objects to be displayed with the same object name based on the creation time contained in each first page display information, and displays them differently according to the priority of each object to be displayed.

3. The method according to claim 1 or 2, characterized in that The target data acquisition request includes: a second data acquisition request; the target page display information includes: second page display information; The step of responding to the target data acquisition request sent by the front-end application and sending target page display information corresponding to the target data acquisition request to the front-end application includes: Receiving the second data acquisition request sent by the front-end application; In response to the second data acquisition request, based on target parameters carried in the second data acquisition request, obtaining from the database an actual path of the target object accessed by the second data acquisition request; the target parameter information includes: object name, object type, storage node name, and reconstruction count; Acquire the second page display information corresponding to the target object from the storage node indicated by the target parameter based on the actual path of the target object; the second page display information includes: file information contained in the object directory corresponding to the target object; Sending the second page display information to the front-end application; After receiving the second page display information, the front-end application displays the files contained in the object directory corresponding to the target object on the page based on the first page display information.

4. The method according to claim 1, wherein The operation indicated by the data management request is: data transfer operation; The step of responding to the data management request sent by the front-end application, determining an object to be processed stored in the storage node indicated by management object information included in the data management request, and performing a data management operation indicated by the data management request on the object to be processed includes: determining, based on the management object information, an actual path of each of the at least one object to be processed; The at least one object to be processed is transferred from the plurality of storage nodes to the target directory indicated by the data transfer operation based on the actual path of each object to be processed.

5. The method according to claim 4, characterized in that The transferring, based on the actual path of each object to be processed, the at least one object to be processed from the plurality of storage nodes to the target directory indicated by the data transfer operation comprises: In a case where there is an object with the same object name among the at least one object to be processed, renaming the object with the same object name among the at least one object to be processed according to a first renaming rule; In a case where an object having the same name as the at least one object to be processed exists in the target directory, the object having the same name as the at least one object to be processed is renamed according to the first renaming rule.

6. The method according to claim 1, characterized in that The operation indicated by the data management request is: data download operation; The step of responding to the data management request sent by the front-end application, determining an object to be processed stored in the storage node indicated by management object information included in the data management request, and performing a data management operation indicated by the data management request on the object to be processed includes: determining, based on the management object information, an actual path of each of the at least one object to be processed; The at least one object to be processed is downloaded to the target directory indicated by the data download operation based on the actual path of each object to be processed, and objects with the same name in the at least one object to be processed are renamed according to the first renaming rule during the downloading process.

7. The method according to claim 1, characterized in that The page of the front-end application also displays an existing user object, and the method further includes: In response to the object deletion request sent by the front-end application, rename the object directory corresponding to the object to be deleted indicated by the object deletion request according to a second renaming rule; Based on the object name, storage node name, object type and object directory name of the object to be deleted, create correspondence information between the object directory and the actual path of the object to be deleted in the database, and update the reconstruction number of the information to be updated in the database with the same object name as the object to be deleted.

8. A data management device, characterized in that: Applied to an object data management system, the system comprises: a plurality of storage nodes for storing object data, a database for storing the correspondence between object directories and actual paths, and a front-end application for object data management, wherein each of the plurality of storage nodes stores historical object data and current object data; the device comprises: an information display module, configured to respond to a target data acquisition request sent by the front-end application and send target page display information corresponding to the target data acquisition request to the front-end application; the target page display information is generated based on a correspondence between an object directory stored in the database and an actual path; a data processing module, configured to, in response to a data management request sent by the front-end application, determine an object to be processed stored in the storage node indicated by management object information contained in the data management request, and perform a data management operation indicated by the data management request on the object to be processed; The historical object data is obtained by renaming the corresponding existing object data after the object data management system deletes the object in the same storage node.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data management method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the data management method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Metadata query method and device based on distributed file system and storage medium

    CN114116613A

  • Page management method and device, processor and electronic equipment

    CN115712794A