Directory path processing system, method and equipment and storage medium
By designing a directory path processing system, using the coordinated work of the instruction routing protocol management module and the metadata management module, the problem of inefficient operation of directory path nodes in the existing technology is solved, and efficient directory path node instruction processing and system performance improvement are achieved.
Patent Information
- Application Number
- CN202411792094.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The existing directory path tree structure cannot take into account efficient performance when processing node addition, deletion, movement and positioning operations, resulting in poor performance of directory storage services.
A directory path processing system is designed, including an instruction routing protocol management module, a first directory path metadata management module and a second directory path metadata management module. Through an intelligent routing protocol, the user's directory path node instructions are forwarded to ensure the fast and accurate execution of instructions.
Through collaborative work, the system's concurrent processing capabilities and fault tolerance are improved, and the performance and reliability of the entire directory path processing system are improved.
Smart Images

Figure CN119892726A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of cloud computing technology, and in particular to a directory path processing system, method, device and storage medium. Background Art
[0002] Directory paths involve a wide range of application scenarios today, such as file system directory structures, library book path structures, and other tree-structured directory path application scenarios. Among them, there are currently two common data structures for directory path trees: a directory path tree structure based on the parent-child node pointer relationship and a directory path tree structure based on rowkey expression.
[0003] However, whether simply using a directory path tree structure based on the parent-child node pointer relationship or simply using a directory path tree structure based on rowkey expression, it is impossible to simultaneously take into account efficient directory path node addition, deletion, movement, and positioning operations, resulting in poor performance in the directory storage service. Summary of the invention
[0004] Embodiments of the present application provide a directory path processing system, method, device and storage medium.
[0005] In a first aspect, an embodiment of the present application provides 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 used 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;
[0007] The first directory path metadata management module is used to execute the directory path node instruction;
[0008] The second directory path metadata management module is used to execute the directory path node instruction.
[0009] Optionally, the system further comprises: a metadata synchronization module;
[0010] 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.
[0011] Optionally, the first directory path metadata management module includes 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 includes a child node ID, a parent node ID, a node name, and a deletion mark.
[0012] Optionally, the second directory path metadata management module includes 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 and stores it in the second preset database, 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, which is applied to an instruction routing protocol management module in the directory path processing system described in the first aspect, and the method includes:
[0014] 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, 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 includes:
[0016] Receive directory path node instructions sent by users;
[0017] The directory path node instruction is forwarded 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 the routing protocol.
[0018] Optionally, the directory path node instructions include a directory path node location instruction, a directory path node addition instruction, a directory path node deletion instruction, and a directory path node move instruction.
[0019] Optionally, 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 includes:
[0020] When the directory path node instruction is a location 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 an instruction to add a directory path node, forwarding the directory path node instruction to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module will execute the newly added node corresponding to the instruction to add a directory path node and synchronize it to the second directory path metadata management module;
[0022] When the directory path node instruction is a delete directory path node instruction, forwarding the directory path node instruction 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;
[0023] 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 an 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.
[0024] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the directory path processing methods described above.
[0025] In a fourth aspect, an embodiment of the present application further provides a storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any of the directory path processing methods described above.
[0026] In the embodiment of the present application, the directory path processing 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 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 used to execute the directory path node instruction; the second directory path metadata management module is used 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 collaborative 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 responsible for executing instructions respectively, which improves 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 an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0029] Figure 1 is a schematic diagram of a directory path processing system provided by an embodiment of the present application;
[0030] Figure 2 It is a flowchart of the steps of a directory path processing method provided by an embodiment of the present application;
[0031] Figure 3 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0032] Figure 4 This is a schematic diagram of node state changes of an exemplary directory path processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present 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 used 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;
[0036] The first directory path metadata management module is used to execute the directory path node instruction;
[0037] The second directory path metadata management module is used to execute the directory path node instruction.
[0038] It should be noted that in the embodiment of the present application, the instruction routing protocol management module is responsible for receiving instructions for locating, adding, deleting, and moving directory path nodes sent by users, and forwarding instructions according to the routing protocol. The content of the protocol is as follows: 1) For instructions for adding, deleting, and moving nodes, they are only sent to the directory path metadata management module based on the parent-child node pointer relationship for operation. 2) For instructions for locating directory path nodes, they are first forwarded to the directory path metadata management module based on the rowkey structure for query. If no query is found, they are forwarded to the directory path metadata management module based on the parent-child node pointer relationship for query.
[0039] It should be noted that in the embodiment of the present application, the first directory path metadata management module is a directory path metadata management module based on the expression of the parent-child node pointer relationship, wherein the first directory path metadata management module is responsible for executing the instructions forwarded by the instruction routing protocol management module to locate, add, delete, and move the directory path node. The characteristics of its metadata model are: using the parent node pointer to express the parent-child relationship of each node in a directory path, for example, the directory path / root / dir1_1 / dir2_1, the node root is the parent node of the node dir1_1, the node dir1_1 is the parent node of the node dir2_1, and the binary expression of this directory path is: <node root, null>, <node dir1_1, the pointer of the node dir1_1 pointing to the node root>, <node dir2_1, the pointer of the node dir2_1 pointing to the node dir1_1>.
[0040] It should be noted that in the embodiment 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 directory path node positioning instruction forwarded by the instruction routing protocol management module, and translating the incremental directory path metadata transmitted by the internal metadata synchronization module into directory path metadata based on rowkey expression for storage. Its metadata model is characterized by expression based on rowkey, for example, the directory path / root / dir1_1 / dir2_1 is translated into rowkey expression as: md5( / root / dir1_1)+dir2_1.
[0041] Furthermore, the directory path processing system further includes: a metadata synchronization module;
[0042] 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.
[0043] It should be noted that in an embodiment of the present application, the metadata synchronization module detects the first directory path metadata management module in real time or periodically, that is, the directory path metadata expressed based on the parent-child node pointer relationship, and can synchronize the added, deleted, and moved directory path metadata to the second directory path metadata management module.
[0044] Furthermore, the first directory path metadata management module includes 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 includes 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 using mysql. Examples of operations for adding, moving, and deleting directory path nodes are as follows: Figure 4 Describe the process.
[0046] In the initial state 1, the directory node tuple relationship metadata stored in MySQL is as shown in Table 1:
[0047] Table 1 Initial state 1 Directory node tuple relationship metadata stored in mysql
[0048]
[0049] Furthermore, the second directory path metadata management module includes 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 and stores it 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 using hbase.
[0051] In the initial state 1, the rowkey stored in hbase is as shown in Table 2:
[0052] Table 2 Initial state 1hbase stored rowkey
[0053]
[0054] In the embodiment of the present application, the directory path processing 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 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 used to execute the directory path node instruction; the second directory path metadata management module is used 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 collaborative 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 responsible for executing instructions respectively, which improves the concurrent processing capability and fault tolerance of the system, thereby improving the performance and reliability of the entire directory path processing system.
[0055] Figure 2 is a flowchart of a method for processing a directory path provided by an embodiment of the present application, such as Figure 2 As shown, the method is applied to the fast-forwarding network element in the directory path processing system, and includes:
[0056] Step 101, receive a directory path node instruction sent by a user, and forward 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 embodiments of the present application, specific reference is made to the foregoing discussion, which will not be repeated here.
[0058] Further, the receiving of the directory path node instruction sent by the 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 the routing protocol includes:
[0059] Receive directory path node instructions sent by users;
[0060] The directory path node instruction is forwarded 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 the routing protocol.
[0061] Furthermore, the directory path node instructions include a directory path node location instruction, a directory path node addition instruction, a directory path node deletion instruction, and a directory path node movement instruction.
[0062] Further, 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 includes:
[0063] When the directory path node instruction is a location directory path node instruction, forwarding the directory path node instruction to a 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 node positioning operation, for example, the user sends the instruction "locate the directory path / root / dir2_1 / dir3_1 / dir4_1", according to the protocol rules of the instruction routing management module, will be preferentially forwarded to the directory path metadata management module based on the rowkey structure expression for positioning. At this time, the directory path / root / dir2_1 / dir3_1 / dir4_1 will be translated into the corresponding rowkey md5 ( / root / dir2_1 / dir3_1) dir4_1, and then the row data related to the rowkey is directly obtained from hbase using the get method, that is, the location of the directory path is obtained. This positioning method is very efficient. If the directory path metadata expressed based on the parent-child node pointer relationship is used for positioning, it is necessary to search step by step according to the relationship between node_id and parent_node_id and the path hierarchy to the last node dir4_1 of the path. This positioning method is very inefficient, especially for directory paths with a deep search hierarchy. The embodiment of the present application adopts an efficient method for the operation mechanism of locating nodes.
[0065] When the directory path node instruction is an instruction to add a directory path node, forwarding the directory path node instruction to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module will execute the newly added node corresponding to the instruction to add a directory path node and synchronize it to the second directory path metadata management module;
[0066] It should be noted that in the embodiment of the present application, to add a node operation, in state 1, the user sends an instruction to "add a new node dir1_1 between node root and node dir2_1". According to the routing rules of the instruction routing management module, the new node will be directly incrementally updated in the MySQL database, and then the incremental data of MySQL will be synchronized to the directory path rowkey stored in HBase through the metadata synchronization module, and converted to state 2. The specific synchronization process is exemplified as follows but not limited to this: first, the rowkey of the corresponding upper node can be found from hbase by intercepting the string judgment method. For example, if we add a new node dir1_1 between the node root and the node dir2_1, we should find the path rowkey of / root, decrypt it and concatenate the node dir1_1, generate the rowkey and add the new data to hbase; at the same time, find the lower node, which is the dir2_1 node and the directly or indirectly connected child nodes in this example. We can use breadth-first search based on the binary relationship table, and then perform string judgment based on the node name to find all the path rowkeys in hbase that contain the node and its child nodes. After decryption, concatenate the paths to obtain a new path, generate a new rowkey, add the data to hbase, and delete the original path rowkey to complete the synchronization of the new node.
[0067] In state 2, the metadata of the directory node binary relationship stored in MySQL is shown in Table 3. Compared with state 1, it involves two incremental data: 1. For the record with node_id = 1, the value of the field parent_node_id is changed to 6; 2. A new record with node_id = 6 is added.
[0068] Table 3 Initial state 2 Directory node tuple relationship metadata stored in MySQL
[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 hbase is shown in Table 4. Compared with state 1, it involves 7 incremental data, including the following:
[0071] Deleted 3 data: md5( / root)dir2_1, md5( / root / dir2_1)dir3_1, md5( / root / dir2_1 / dir3_1)dir4_1;
[0072] A total of 4 data items were added: md5( / root)dir1_1, md5( / root / dir1_1)dir2_1, md5( / root / dir1_1 / dir2_1)dir3_1, and md5( / root / dir1_1 / dir2_1 / dir3_1)dir4_1.
[0073] Table 4 Initial state 1hbase stored rowkey
[0074]
[0075]
[0076] It can be seen that for adding node operations, operating based on directory path metadata expressed by parent-child node pointer relationships is relatively efficient and involves less data to be updated.
[0077] When the directory path node instruction is a delete directory path node instruction, forwarding the directory path node instruction 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 the instruction "delete node dir1_2". According to the routing rules of the instruction routing management module, the newly added node will be directly incrementally updated in the mysql database, and then the incremental data of mysql will be synchronized to the directory path rowkey stored in hbase through the metadata synchronization module and converted to state 4. The specific synchronization process is exemplified as follows but not limited to this: Similarly, based on the binary relationship table, using breadth-first search, and then judging the string according to the node name, the path rowkey of the node dir1_2 and its child nodes can be found from hbase. After decryption, the dir1_2 directory is deleted by intercepting the string, and a new rowkey is regenerated and stored, and the original rowkey is deleted; if dir1_2 is the last level directory node, the record is directly deleted to complete the synchronization of the deleted node.
[0079] In state 4, the metadata of the directory node tuple relationship stored in MySQL is shown in Table 5. Compared with state 3, it involves 2 incremental data, including the following:
[0080] For the record with node_id=2, change the value of the field parent_node_id to 1;
[0081] For the record with node_id=3, change the value of the deleted field to 1, indicating that the record has been deleted.
[0082] Table 5 Initial state 3 Directory node tuple relationship metadata stored in MySQL
[0083]
[0084]
[0085] In state 4, the rowkey stored in hbase is shown in Table 6. Compared with state 3, it involves 7 incremental data, including the following:
[0086] Deleted 4 data: 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;
[0087] A total of 3 new data items have been added: md5( / root)dir2_1, md5( / root / dir2_1)dir3_1, and md5( / root / dir2_1 / dir3_1)dir4_1.
[0088] Table 6 Initial state 1hbase 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] It can be seen that for the node deletion operation, the operation based on the directory path metadata expressed by the parent-child node pointer relationship is relatively efficient, and involves 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 an 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 "move the subtree with node dir2_1 as the root to dir1_2". According to the routing rules of the instruction routing management module, the newly added node will be directly incrementally updated in the mysql database, and then the incremental data of mysql will be synchronized to the directory path rowkey stored in hbase through the metadata synchronization module, and then converted to state 3. The specific synchronization process is exemplified as follows but not limited to this: Similarly, based on the binary relationship table, breadth-first search is used, and then string judgment is performed based on the node name, the path rowkey of the node dir2_1 and its child nodes are found from hbase, and the path rowkey of the node dir1_2 to be moved is found and decrypted, and the path is spliced with the path of the dir2_1 node and its child nodes after containing / dir2_1, a new rowkey is generated, new data is added to hbase, and the original rowkey data containing dir2_1 is deleted, and the synchronization of the mobile node can be completed.
[0092] In state 3, the directory node tuple relationship metadata stored in MySQL is as shown in Table 7. Compared with state 2, it involves one incremental data: for the record with node_id = 2, the value of the field parent_node_id is changed to 3.
[0093] Table 7 Initial state 4 Directory node tuple relationship metadata stored in MySQL
[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 hbase is shown in Table 8. Compared with state 2, it involves 6 incremental data, including the following:
[0096] Delete 3 data: md5( / root / dir1_1)dir2_1, md5( / root / dir1_1 / dir2_1)dir3_1, md5( / root / dir1_1 / dir2_1 / dir3_1)dir4_1;
[0097] Added 3 data: md5( / root / dir1_2)dir2_1, md5( / root / dir1_2 / dir2_1)dir3_1, and md5( / root / dir1_2 / dir2_1 / dir3_1)dir4_1.
[0098] Table 8 Initial state 1hbase stored rowkey
[0099]
[0100] It can be seen that for mobile node operations, operations based on directory path metadata expressed by parent-child node pointer relationships are relatively efficient and involve less updated data.
[0101] In the embodiment of the present application, the directory path processing 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 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 used to execute the directory path node instruction; the second directory path metadata management module is used 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 collaborative 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 responsible for executing instructions respectively, which improves 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 This is a structural diagram of an electronic device M00 provided in an embodiment of the present application. In the figure, the electronic device M00 includes a processor M01 and a memory M02. The electronic device includes: a processor; a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the directory path processing methods described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0103] In an embodiment of the present application, the memory M02 can be used to store software programs and various data. The memory M02 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory M02 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory M02 in the embodiment of the present application includes but is not limited to these and any other suitable types of memories.
[0104] The processor M01 may 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 application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor M01.
[0105] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned directory path processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0106] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0107] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned directory path processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0108] It should be understood that the chip involved in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0109] An embodiment of the present application further provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the directory path processing methods described above.
[0110] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned directory path processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0111] An embodiment of the present application also provides a vehicle, comprising the directory path processing device as described above.
[0112] It should be noted that, in this article, the term "comprises", "includes" 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 includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do 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 embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0114] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A directory path processing system, characterized in that: The 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 used 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 used to execute the directory path node instruction; The second directory path metadata management module is used to execute the directory path node instruction.
2. The system according to claim 1, characterized in that The system further comprises: 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, 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 includes a child node ID, a parent node ID, a node name, and a deletion mark.
4. The system according to claim 1, characterized in that The second directory path metadata management module includes 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 and stores it in the second preset database, wherein 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 instruction routing protocol management module applied to the directory path processing system described in any one of claims 1 to 4, the method comprising: 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, so that the first directory path metadata management module and the second directory path metadata management module execute the directory path node instruction.
6. The method according to claim 5, characterized in that The receiving of the directory path node instruction sent by the 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 the routing protocol includes: Receive directory path node instructions sent by users; The directory path node instruction is forwarded 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 the routing protocol.
7. The method according to claim 6, characterized in that The directory path node instructions include a directory path node location instruction, a directory path node addition instruction, a directory path node deletion instruction, and a directory path node movement instruction.
8. The method according to claim 7, characterized in that The method of 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: When the directory path node instruction is a location directory path node instruction, forwarding the directory path node instruction to a second directory path metadata management module according to a routing protocol; When the directory path node instruction is an instruction to add a directory path node, forwarding the directory path node instruction to the first directory path metadata management module according to the routing protocol, so that the first directory path metadata management module will execute the newly added node corresponding to the instruction to add a directory path node and synchronize it to the second directory path metadata management module; When the directory path node instruction is a delete directory path node instruction, forwarding the directory path node instruction 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; 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 an 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.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the directory path processing method as described in any one of claims 5-8.
10. A computer storage medium, a readable storage medium, for storing a program, characterized in that: When the program is executed by a processor, the directory path processing method as described in any one of claims 5-8 is implemented.
Citation Information
Patent Citations
A unified storage method for files and structured data based on a key-value library
CN102298641A
HBase based mobile object parallel grid index synchronization method under distributed environment
CN105354263A
File query method, apparatus and device and readable storage medium
CN108920631A
Method for formatting HBase data
CN110287172A
Data recovery method and device and related equipment
CN111324483A