Directory path processing system, method, apparatus, and storage medium
By working together with the instruction routing protocol management module and the two directory path metadata management modules, the problem of low efficiency in node operations of the directory path tree structure is solved, achieving efficient directory path node processing and improving system performance and reliability.
Patent Information
- Application Number
- CN202411792094.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The existing directory path tree structure cannot simultaneously support efficient node addition, deletion, movement, and positioning operations, resulting in poor performance of directory storage services.
The system employs the collaborative work of an instruction routing protocol management module and two directory path metadata management modules, which store metadata based on parent-child node pointer relationships and rowkey structures, respectively. It intelligently forwards directory path node instructions through the routing protocol, thereby achieving efficient directory path node operations.
It improves the performance and reliability of the directory path processing system, and enhances the system's concurrent processing capabilities and fault tolerance.
Smart Images

Figure CN119892726B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of cloud computing, and particularly relate to a directory path processing system, method, device and storage medium. BACKGROUND
[0002] Directory paths are related to a wide range of application scenarios today, such as file system directory structure, library book path structure, and other tree structure directory path application scenarios. Among them, there are two common data structures of directory path trees, a directory path tree structure based on parent-child node pointer relationship expression, and a directory path tree structure based on rowkey expression.
[0003] However, whether it is simply using a directory path tree structure based on parent-child node pointer relationship expression, or simply using a directory path tree structure based on rowkey expression, neither can simultaneously take into account efficient directory path node addition, deletion, movement, and positioning operations, resulting in low performance problems on the directory storage service. SUMMARY
[0004] Embodiments of the present application provide a directory path processing system, method, device and storage medium.
[0005] In a first aspect, embodiments of the present application provide a directory path processing system, the system comprising: an instruction routing protocol management module, a first directory path metadata management module, and a second directory path metadata management module.
[0006] The instruction routing protocol management module is configured to receive a directory path node instruction sent by a user, and forward the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol.
[0007] The first directory path metadata management module is configured to execute the directory path node instruction.
[0008] The second directory path metadata management module is configured to execute the directory path node instruction.
[0009] Optionally, the system further comprises a metadata synchronization module.
[0010] The metadata synchronization module is configured to synchronize first directory path metadata corresponding to the execution of the directory path node instruction by the first directory path metadata management module to the second directory path metadata management module.
[0011] Optionally, the first directory path metadata management module comprises a first preset database, and the first directory path metadata corresponding to the directory path node instruction is stored in the first preset database by the first directory path metadata management module, wherein the first preset database stores the first directory path metadata according to a preset table, and the preset table comprises a child node ID, a parent node ID, a node name, and a deletion mark.
[0012] Optionally, the second directory path metadata management module comprises a second preset database, and the second directory path metadata corresponding to the directory path node instruction is stored in the second preset database by the first directory path metadata management module, wherein the second preset database stores the second directory path metadata according to a preset row key.
[0013] In a second aspect, an embodiment of the present application provides a directory path processing method, applied to an instruction routing protocol management module in the directory path processing system in the first aspect, and the method comprises the following steps:
[0014] receiving a directory path node instruction sent by a user, and forwarding the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol, so that the first directory path metadata management module and the second directory path metadata management module execute the directory path node instruction.
[0015] Optionally, the receiving a directory path node instruction sent by a user, and forwarding the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol comprises:
[0016] receiving a directory path node instruction sent by a user;
[0017] forwarding the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a type of the directory path node instruction and a routing protocol.
[0018] Optionally, the directory path node instruction comprises a positioning directory path node instruction, an adding directory path node instruction, a deleting directory path node instruction, and a moving directory path node instruction.
[0019] Optionally, the forwarding the directory path node instruction to the first directory path metadata management module and / or the second directory path metadata management module according to the type of the directory path node instruction and the routing protocol comprises:
[0020] when the directory path node instruction is the locating directory path node instruction, forwarding the directory path node instruction to a second directory path metadata management module according to a routing protocol;
[0021] when the directory path node instruction is the adding directory path node instruction, forwarding the directory path node instruction to a first directory path metadata management module according to a routing protocol, so that the first directory path metadata management module synchronizes a newly-added node corresponding to the adding directory path node instruction to the second directory path metadata management module;
[0022] when the directory path node instruction is the deleting directory path node instruction, forwarding the directory path node instruction to a first directory path metadata management module according to a routing protocol, so that the first directory path metadata management module deletes a to-be-deleted node corresponding to the deleting directory path node instruction and synchronizes the to-be-deleted node to the second directory path metadata management module;
[0023] when the directory path node instruction is the moving directory path node instruction, forwarding the directory path node instruction to a first directory path metadata management module according to a routing protocol, so that the first directory path metadata management module performs incremental updating on a first preset database according to the deleting directory path node instruction, obtains incremental data, and synchronizes the incremental data to the second directory path metadata management module.
[0024] In a third aspect, an electronic device is provided and includes a processor and a memory storing processor-executable instructions. The processor is configured to execute the instructions to implement the directory path processing method of any of the above.
[0025] In a fourth aspect, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the directory path processing method of any of the above.
[0026] In the embodiment of the present application, the directory path processing system comprises: an instruction routing protocol management module, a first directory path metadata management module and a second directory path metadata management module; the instruction routing protocol management module is configured to receive a directory path node instruction sent by a user and forward the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol; the first directory path metadata management module is configured to execute the directory path node instruction; and the second directory path metadata management module is configured to execute the directory path node instruction. That is, in the embodiment of the present application, the directory path processing system realizes efficient directory path node instruction processing through the cooperative work of the instruction routing protocol management module, the first directory path metadata management module and the second directory path metadata management module. The instruction routing protocol management module can intelligently forward the directory path node instruction sent by the user to the corresponding metadata management module according to the routing protocol, ensuring the fast and accurate execution of the instruction. The first and second directory path metadata management modules are respectively responsible for executing the instruction, improving the concurrent processing capability and fault tolerance of the system, thereby improving the performance and reliability of the entire directory path processing system.
[0027] The above description is only a summary of the technical solutions of the present application. In order to enable one skilled in the art to better understand the technical means of the present application, the contents of the specification can be implemented, and in order to enable the above and other purposes, features and advantages of the present application to be more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not meant to limit the present application. Moreover, the same reference numerals are used throughout the various drawings to designate identical components. In the drawings:
[0029] Figure 1 FIG. 1 is a schematic diagram of a directory path processing system according to an embodiment of the present application;
[0030] Figure 2 FIG. 2 is a step flowchart of a directory path processing method according to an embodiment of the present application;
[0031] Figure 3 FIG. 3 is a structural diagram of an electronic device according to an embodiment of the present application;
[0032] Figure 4 FIG. 4 is a schematic diagram of an exemplary directory path processing method node state change according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be embodied in many forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
[0034] Figure 1 is a schematic diagram of a directory path processing system provided by an embodiment of the present application, the directory path processing system comprising: an instruction routing protocol management module, a first directory path metadata management module, and a second directory path metadata management module;
[0035] The instruction routing protocol management module is configured to receive a directory path node instruction sent by a user, and forward the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol.
[0036] The first directory path metadata management module is configured to execute the directory path node instruction.
[0037] The second directory path metadata management module is configured to execute the directory path node instruction.
[0038] It should be noted that in the embodiments of the present application, the instruction routing protocol management module is responsible for receiving positioning, adding, deleting, and moving directory path node instructions sent by a user, and forwarding the instructions according to a routing protocol. The protocol content is as follows: 1) for adding, deleting, and moving node instructions, only send to the directory path metadata management module based on the parent-child node pointer relationship table for operation. 2) for the positioning directory path node instruction, preferentially forward to the directory path metadata management module based on the rowkey structure table for query, and if not found, then secondarily forward to the directory path metadata management module based on the parent-child node pointer relationship table for query.
[0039] It should be noted that in the embodiments of the present application, the first directory path metadata management module is a directory path metadata management module based on parent-child node pointer relationship expression, wherein the first directory path metadata management module is responsible for executing the positioning, adding, deleting, and moving directory path node instructions forwarded by the instruction routing protocol management module. The metadata model features are as follows: a parent node pointer is used to express the parent-child relationship of each node in a directory path, for example, in the directory path / root / dir1_1 / dir2_1, the node root is the parent node of the node dir1_1, and the node dir1_1 is the parent node of the node dir2_1. The binary tuple expression of this directory path is: <node root, null>, <node dir1_1, a pointer from the node dir1_1 to the node root>, and <node dir2_1, a pointer from the node dir2_1 to the node dir1_1>.
[0040] It should be noted that in the embodiments of the present application, the second directory path metadata management module is a directory path metadata management module based on rowkey structure expression, wherein the second directory path metadata management module is responsible for executing the positioning directory path node instruction forwarded by the instruction routing protocol management module, and storing the incremental directory path metadata transmitted by the internal metadata synchronization module in the form of directory path metadata based on rowkey expression. The metadata model features are as follows: the expression is based on rowkey, for example, the directory path / root / dir1_1 / dir2_1 is translated into the rowkey expression: md5( / root / dir1_1)+dir2_1.
[0041] Further, the directory path processing system further comprises a metadata synchronization module.
[0042] The metadata synchronization module is configured to synchronize the first directory path metadata corresponding to the directory path node instruction executed by the first directory path metadata management module to the second directory path metadata management module.
[0043] It should be noted that in the embodiments of the present application, the metadata synchronization module detects the first directory path metadata management module in real time or at a fixed time, that is, the directory path metadata based on parent-child node pointer relationship expression, can synchronize the added, deleted, and moved directory path metadata to the second directory path metadata management module.
[0044] Further, the first directory path metadata management module comprises a first preset database, and the first directory path metadata corresponding to the directory path node instruction executed by the first directory path metadata management module is stored in the first preset database, wherein the first preset database stores the first directory path metadata according to a preset table, and the preset table comprises a child node ID, a parent node ID, a node name and a deletion mark.
[0045] It should be noted that, in the embodiment of the present application, the directory path metadata expressed based on the parent-child node pointer relationship is stored by using mysql. The operation sample of adding, moving and deleting the directory path node is as follows: Figure 4 The flow described above.
[0046] In the initial state 1, the directory node binary tuple relationship metadata stored by mysql is as shown in Table 1 below:
[0047] Table 1: Directory node binary tuple relationship metadata stored by mysql in the initial state 1
[0048]
[0049] Further, the second directory path metadata management module comprises a second preset database, and the first directory path metadata management module executes the second directory path metadata corresponding to the directory path node instruction to be stored in the second preset database, wherein the second preset database stores the second directory path metadata according to a preset row key.
[0050] It should be noted that, in the embodiment of the present application, the directory path metadata expressed based on the rowkey structure is stored by using hbase.
[0051] In the initial state 1, the rowkey stored by hbase is as shown in Table 2 below:
[0052] Table 2: Rowkey stored by hbase in the initial state 1
[0053]
[0054] In the embodiment of the present application, the directory path processing system comprises: an instruction routing protocol management module, a first directory path metadata management module and a second directory path metadata management module; the instruction routing protocol management module is configured to receive a directory path node instruction sent by a user and forward the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to a routing protocol; the first directory path metadata management module is configured to execute the directory path node instruction; and the second directory path metadata management module is configured to execute the directory path node instruction. That is, in the embodiment of the present application, the directory path processing system realizes efficient directory path node instruction processing through the cooperative work of the instruction routing protocol management module, the first directory path metadata management module and the second directory path metadata management module. The instruction routing protocol management module can intelligently forward the directory path node instruction sent by the user to the corresponding metadata management module according to the routing protocol, thereby ensuring the quick and accurate execution of the instruction. The first and second directory path metadata management modules are respectively responsible for executing the instruction, thereby improving the concurrent processing capability and fault tolerance of the system, and thus improving the performance and reliability of the entire directory path processing system.
[0055] Figure 2 is a step flowchart of a directory path processing method provided by the embodiment of the present application, as shown in Figure 2 the method comprises the following steps:
[0056] Step 101: receiving a directory path node instruction sent by a user and forwarding the directory path node instruction to a first directory path metadata management module and a second directory path metadata management module according to a routing protocol, so that the first directory path metadata management module and the second directory path metadata management module execute the directory path node instruction.
[0057] It should be noted that, in the embodiment of the present application, the foregoing is specifically described in the foregoing description, which will not be repeated here.
[0058] Further, the receiving of the directory path node instruction sent by the user and the forwarding of the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to the routing protocol comprises:
[0059] receiving a directory path node instruction sent by a user;
[0060] forwarding the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to the type of the directory path node instruction and a routing protocol.
[0061] Further, the directory path node instruction includes a locating directory path node instruction, an adding directory path node instruction, a deleting directory path node instruction and a moving directory path node instruction.
[0062] Further, the forwarding the directory path node instruction to the first directory path metadata management module and / or the second directory path metadata management module according to the type of the directory path node instruction and a routing protocol includes:
[0063] When the directory path node instruction is the locating directory path node instruction, the directory path node instruction is forwarded to the second directory path metadata management module according to a routing protocol;
[0064] It should be noted that, in the embodiment of the present application, the locating node operation, for example, a user sends an instruction of "locating directory path / root / dir2_1 / dir3_1 / dir4_1", according to the protocol rule of the instruction routing management module, the instruction is preferentially forwarded to the directory path metadata management module based on the rowkey structure expression for locating, at this time, the directory path / root / dir2_1 / dir3_1 / dir4_1 is translated into the corresponding rowkey md5( / root / dir2_1 / dir3_1)dir4_1, and then the rowkey related row data is directly obtained from the hbase using the get method, that is, the locating of the directory path is obtained, the locating method is very efficient. If the directory path metadata based on the parent-child node pointer relationship expression is located, the node_id and the parent_node_id relationship are needed to be searched according to the path level, and the last node dir4_1 of the path is searched step by step, the locating method is very inefficient, especially for the directory path with deep search level. The operation mechanism of the locating node in the embodiment of the present application adopts an efficient method.
[0065] When the directory path node instruction is the adding directory path node instruction, the directory path node instruction is forwarded to the first directory path metadata management module according to a routing protocol, so that the first directory path metadata management module synchronizes the added node corresponding to the adding directory path node instruction to the second directory path metadata management module;
[0066] It should be noted that in the embodiments of the present application, the operation of adding a node is added, in state 1, the user sends an instruction of "adding a node dir1_1 between the node root and the node dir2_1", according to the routing rule of the instruction routing management module, the added node is directly updated in the mysql database, and then the incremental data of the mysql is synchronized to the directory path rowkey of the hbase storage, and is converted to state 2. The specific synchronization process is exemplified as follows but is not limited to this: the corresponding upper node rowkey can be found from the hbase through the way of intercepting a string judgment, for example, we add a node dir1_1 between the node root and the node dir2_1, the path rowkey of / root should be found, the node dir1_1 is decrypted and spliced to generate a new rowkey to add data to the hbase; at the same time, the lower node, that is, the node dir2_1 and the directly or indirectly connected child nodes in this example, can be found based on the binary tuple relationship table using breadth-first search, and then the node name is used for string judgment to find all path rowkeys containing the node and its child nodes in the hbase, the new path is obtained by decrypting and splicing the path, a new rowkey is generated, and the data is added to the hbase, and the original path rowkey is deleted, so that the synchronization of the added node is completed.
[0067] In state 2, the directory node binary tuple relationship metadata stored in the mysql is as shown in Table 3, compared with state 1, 2 incremental data are involved: 1, the record of node_id=1 is modified to 6; 2, a new record of node_id=6 is added.
[0068] Table 3 Initial state 2 mysql storage directory node binary tuple relationship metadata
[0069] node_id parent_node_id node_name deleted 1 root 0 2 6 dir2_1 0 3 1 dir1_2 0 4 2 dir3_1 0 5 4 dir4_1 0 6 1 dir1_1 0
[0070] In state 2, the rowkey stored in the hbase is as shown in Table 4, compared with state 1, 7 incremental data are involved, and the specific contents include the following:
[0071] The md5( / root)dir2_1, md5( / root / dir2_1)dir3_1, md5( / root / dir2_1 / dir3_1)dir4_1 are deleted, a total of 3 data;
[0072] The md5( / root)dir1_1, md5( / root / dir1_1)dir2_1, md5( / root / dir1_1 / dir2_1)dir3_1, md5( / root / dir1_1 / dir2_1 / dir3_1)dir4_1 are added in total 4 pieces of data.
[0073] Table 4: Initial state 1 hbase stored rowkey
[0074]
[0075]
[0076] It can be seen that for the operation of adding a node, the operation of the directory path metadata based on the parent-child node pointer relationship is relatively efficient, and less data is involved in updating.
[0077] When the directory path node instruction is a delete directory path node instruction, the directory path node instruction is forwarded to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module deletes the corresponding node to be deleted according to the delete directory path node instruction, and synchronizes the node to be deleted to the second directory path metadata management module;
[0078] In state 3, the user sends a command to delete the node dir1_2. According to the routing rules of the instruction routing management module, the new node is directly updated in the mysql database. Then, the incremental data of the mysql is synchronized to the directory path rowkey stored in the hbase, which is converted to state 4. The specific synchronization process is exemplified as follows but is not limited thereto: similarly, based on the binary tuple relationship, the breadth-first search is used, and then the string judgment is performed according to the node name, so that the path rowkey of the node dir1_2 and its child nodes can be found from the hbase. After decryption, the dir1_2 directory is deleted by the string interception method, the new rowkey is generated and stored, and the original rowkey is deleted. If the dir1_2 is the last layer of the directory node, the record is directly deleted, so that the synchronization of deleting the node is completed.
[0079] In state 4, the directory node binary tuple relationship metadata stored in the mysql is as shown in Table 5. Compared with state 3, 2 pieces of incremental data are involved, and the specific contents include the following:
[0080] The field parent_node_id value of the record of node_id=2 is modified to 1.
[0081] For the record of node_id=3, the value of the field deleted is modified to 1, representing that the record is deleted.
[0082] Table 5: Initial state 3 mysql stored directory node tuple relationship metadata
[0083]
[0084]
[0085] In state 4, the hbase stored rowkey is as shown in Table 6 below. Compared with state 3, it involves 7 pieces of incremental data, which specifically includes the following contents:
[0086] The md5( / root)dir1_2, md5( / root / dir1_2)dir2_1, md5( / root / dir1_2 / dir2_1)dir3_1, md5( / root / dir1_2 / dir2_1 / dir3_1)dir4_1 are deleted, a total of 4 pieces of data;
[0087] The md5( / root)dir2_1, md5( / root / dir2_1)dir3_1, md5( / root / dir2_1 / dir3_1)dir4_1 are added, a total of 3 pieces of data.
[0088] Table 6: Initial state 1 hbase stored rowkey
[0089] rowkey / root md5( / root)dir1_1 md5( / root)dir2_1 md5( / root / dir2_1)dir3_1 md5( / root / dir2_1 / dir3_1)dir4_1
[0090] As can be seen, for the delete node operation, the directory path metadata expressed based on the parent-child node pointer relationship is relatively efficient, involving less updated data. When the directory path node instruction is a move directory path node instruction, the directory path node instruction is forwarded to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module performs incremental update on the first preset database according to the delete directory path node instruction, obtains incremental data, and synchronizes the incremental data to the second directory path metadata management module.
[0091] Mobile node operation: in state 2, the user sends the instruction of "moving the sub-tree with node dir2_1 as root to under dir1_2", according to the routing rule of the instruction routing management module, the new node is directly updated in the mysql database, then the incremental data of the mysql is synchronized to the directory path rowkey of the hbase storage through the metadata synchronization module, and the state is converted to state 3. The specific synchronization process is as follows but is not limited to this: similarly, based on the binary tuple relationship table, breadth-first search is used, then string judgment is performed according to the node name, the path rowkey of the node dir2_1 and its child nodes is found from the hbase, and the path rowkey of the node dir1_2 to be moved is found for decryption, the path of the dir2_1 node and its child nodes after containing / dir2_1 is spliced, a new rowkey is generated, the new data is added to the hbase, and the original rowkey data containing dir2_1 is deleted, so that the synchronization of the mobile node is completed.
[0092] In state 3, the directory node binary tuple relationship metadata stored in the mysql is as shown in Table 7, compared with state 2, 1 incremental data is involved: for the record of node_id=2, the field parent_node_id value is modified to 3.
[0093] Table 7 Initial state 4 mysql stored directory node binary tuple relationship metadata
[0094] node_id parent_node_id node_name deleted 1 root 0 2 3 dir2_1 0 3 1 dir1_2 0 4 2 dir3_1 0 5 4 dir4_1 0 6 1 dir1_1 0
[0095] In state 3, the rowkey stored in the hbase is as shown in Table 8, compared with state 2, 6 incremental data is involved, and the specific contents include the following:
[0096] Delete md5( / root / dir1_1)dir2_1, md5( / root / dir1_1 / dir2_1)dir3_1, md5( / root / dir1_1 / dir2_1 / dir3_1)dir4_1, a total of 3 data;
[0097] Add md5( / root / dir1_2)dir2_1, md5( / root / dir1_2 / dir2_1)dir3_1, md5( / root / dir1_2 / dir2_1 / dir3_1)dir4_1, a total of 3 data.
[0098] Table 8 Initial state 1 hbase stored rowkey
[0099]
[0100] Therefore, for the operation of the mobile node, the operation based on the directory path metadata expressed by the parent-child node pointer relationship is relatively efficient, and less data needs to be updated
[0101] In the embodiment of the present application, the directory path processing system comprises: an instruction routing protocol management module, a first directory path metadata management module and a second directory path metadata management module; the instruction routing protocol management module is configured to receive the directory path node instruction sent by the user and forward the directory path node instruction to the first directory path metadata management module and the second directory path metadata management module according to the routing protocol; the first directory path metadata management module is configured to execute the directory path node instruction; and the second directory path metadata management module is configured to execute the directory path node instruction. That is, in the embodiment of the present application, the directory path processing system realizes efficient directory path node instruction processing through the cooperative work of the instruction routing protocol management module, the first directory path metadata management module and the second directory path metadata management module. The instruction routing protocol management module can intelligently forward the directory path node instruction sent by the user to the corresponding metadata management module according to the routing protocol, ensuring the fast and accurate execution of the instruction. The first and second directory path metadata management modules are respectively responsible for executing the instruction, improving the concurrent processing capability and fault tolerance of the system, thereby improving the performance and reliability of the entire directory path processing system.
[0102] Figure 3 is a structural diagram of an electronic device M00 provided by the embodiment of the present application. In the diagram, the electronic device M00 comprises a processor M01 and a memory M02. The electronic device comprises: a processor; a memory for storing executable instructions of the processor, wherein the processor is configured to execute the instructions to implement the directory path processing method as described in any of the above embodiments and achieve the same technical effects. To avoid repetition, details are not described here.
[0103] In the embodiments of the present application, the memory M02 can be used to store software programs and various data. The memory M02 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory M02 can include a volatile memory or a non-volatile memory, or the memory x09 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory M02 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0104] The processor M01 can include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor M01.
[0105] The embodiments of the present application also provide a readable storage medium, the readable storage medium has a program or instructions stored thereon, the program or instructions are executed by a processor to implement various processes of the above-mentioned directory path processing method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.
[0106] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0107] The chip provided in the embodiments of the present application includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions, realizes each process of the directory path processing method embodiments, and can achieve the same technical effects. To avoid repetition, details are not described here.
[0108] It should be understood that the chip involved in the embodiments of the present application can also be referred to as a system level chip, a system chip, a chip system or a system on chip, etc.
[0109] The embodiments of the present application further provide a storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the directory path processing method as described above.
[0110] The embodiments of the present application provide a computer program product, the program product is stored in a storage medium, the program product is executed by at least one processor to realize each process of the directory path processing method embodiments, and can achieve the same technical effects. To avoid repetition, details are not described here.
[0111] The embodiments of the present application further provide a vehicle, the vehicle includes the directory path processing apparatus as described above.
[0112] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiments of the present application is not limited to the order of functions shown or discussed, but can also include functions performed in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.
[0113] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, also can be through hardware, but in many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the related art to make contributions can be embodied in the form of computer software product, the computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disc), including a number of instructions to make a terminal (may be a mobile phone, computer, server, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0114] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not limited, those skilled in the art can make many forms without departing from the purpose of the present application and the scope protected by the claims under the inspiration of the present application, all belong to the protection of the present application.
Claims
1. A directory path processing system, characterized in that, The system includes: an instruction routing protocol management module, a first directory path metadata management module, and a second directory path metadata management module; The instruction routing protocol management module is used to receive directory path node instructions sent by users, and forward the directory path node instructions to the first directory path metadata management module and the second directory path metadata management module according to the routing protocol, including: Receive directory path node instructions sent by the user; the directory path node instructions include instructions to locate a directory path node, instructions to add a directory path node, instructions to delete a directory path node, and instructions to move a directory path node. Based on the type of the directory path node instruction and the routing protocol, the directory path node instruction is forwarded to the first directory path metadata management module and / or the second directory path metadata management module, including: When the directory path node instruction is a directory path node location instruction, the directory path node instruction is forwarded to the second directory path metadata management module according to the routing protocol; When the directory path node instruction is an instruction to add a directory path node, the instruction is forwarded to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module will synchronize the newly added node corresponding to the instruction to add a directory path node to the second directory path metadata management module. When the directory path node instruction is a delete directory path node instruction, the directory path node instruction is forwarded to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module deletes the corresponding node to be deleted according to the delete directory path node instruction, and the node to be deleted is synchronized to the second directory path metadata management module. When the directory path node instruction is a moving directory path node instruction, the directory path node instruction is forwarded to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module performs incremental updates on the first preset database according to the moving directory path node instruction to obtain incremental data, and the incremental data is synchronized to the second directory path metadata management module. The first directory path metadata management module is a directory path metadata management module based on the parent-child node pointer relationship. The first directory path metadata management module is responsible for executing the instructions to locate, add, delete, and move directory path nodes forwarded by the routing protocol management module. Its metadata model features the following characteristics: it uses parent node pointers to express the parent-child relationship of each node in a directory path. The second directory path metadata management module is a directory path metadata management module based on the rowkey structure. It is responsible for executing the directory path node location instructions forwarded by the routing protocol management module and translating the incremental directory path metadata transmitted by the internal metadata synchronization module into directory path metadata based on the rowkey structure for storage. Its metadata model is characterized by being based on the rowkey structure.
2. The system according to claim 1, characterized in that, The system also includes: a metadata synchronization module; The metadata synchronization module is used to synchronize the first directory path metadata corresponding to the directory path node instruction executed by the first directory path metadata management module to the second directory path metadata management module.
3. The system according to claim 1, characterized in that, The first directory path metadata management module includes a first preset database. The first directory path metadata corresponding to the directory path node instruction executed by the first directory path metadata management module is stored in the first preset database. The first preset database stores the first directory path metadata according to a preset table. The preset table includes child node ID, parent node ID, node name, and deletion flag.
4. The system according to claim 1, characterized in that, The second directory path metadata management module includes a second preset database. The second directory path metadata corresponding to the directory path node instruction executed by the first directory path metadata management module is stored in the second preset database. The second preset database stores the second directory path metadata according to a preset row key.
5. A directory path processing method, characterized in that, The method, applied to the instruction routing protocol management module in any one of the directory path processing systems described in claims 1-4, comprises: The system receives directory path node instructions sent by the user and forwards the instructions to the first directory path metadata management module and the second directory path metadata management module according to the routing protocol, so that the first and second directory path metadata management modules execute the directory path node instructions.
6. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the directory path processing method as described in any of claims 5.
7. A computer storage medium for storing programs, characterized in that, When the program is executed by the processor, it implements the directory path processing method as described in any of claims 5.
Citation Information
Patent Citations
File query method, apparatus and device and readable storage medium
CN108920631A
Data recovery method and device and related equipment
CN111324483A