Space optimization method, system and equipment based on multi-level tree organization metadata
By setting compression marks in a multi-level tree organization and dynamically adjusting the compression strategy, the problem of write amplification in a multi-layer tree structure metadata organization is solved, and the spatial optimization of metadata is achieved and space waste is reduced.
Patent Information
- Application Number
- CN202510026688.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-18
Smart Images

Figure CN119849438A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of metadata processing technology, and in particular to a space optimization method, system and device based on multi-level tree organization metadata. Background Art
[0002] In the storage field, the storage platform needs to be connected with the application layer services, which usually include file services, object services and block services. In order to store the metadata of the upper layer services at the bottom layer, the industry currently generally adopts two methods: flat KV method and multi-layer tree structure. Because there may be multiple file systems in a cluster, each file system has many directory files, and each directory file has multiple attributes, the use of a multi-layer tree structure can more conveniently organize the metadata of the file business.
[0003] In actual applications, the metadata organization method of the multi-layer tree structure has the following defects, that is, in some scenarios, the metadata write amplification is serious. For example, in some scenarios, the content stored on a certain tree is very small (for example, the attribute information of a file is very small), but when persisting the tree, it still needs to be written into a 4K data block (the minimum granularity of SSD disk read and write IO is 4K), resulting in particularly serious metadata write amplification and serious waste of metadata space.
[0004] Therefore, how to achieve spatial optimization of metadata organized in a multi-layer tree structure has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, in order to overcome the deficiencies of the prior art, the present application aims to provide a spatial optimization method, system and device based on multi-level tree organization metadata.
[0006] According to a first aspect of the present application, a spatial optimization method based on multi-level tree organization metadata is provided, the method comprising: Create a multi-level tree organization and set compression marks in the multi-level tree organization; When inserting records into a multi-level tree organization, remove the compression mark on the corresponding business type tree; When deleting records in a multi-level tree organization, re-set the compression mark for the corresponding business type tree; When serializing data organized in a multi-layer tree, the associated business type trees are serialized in a merged manner or serialized separately, depending on whether a compression mark exists in the business type tree in the associated path; When reading data organized in a multi-layer tree, data of the associated business type tree is read according to the compression mark; When eliminating a business type tree of a multi-layer tree organization, the associated business type tree is eliminated according to the compression mark.
[0007] Optionally, in the space optimization method based on multi-level tree organization metadata of the present application, a multi-level tree organization is created and a compression mark is set in the multi-level tree organization, including: when creating an associated business type tree under the top-level business type tree, a compression mark is set for the context of the created business type tree.
[0008] Optionally, in the space optimization method based on multi-level tree organization metadata of the present application, when inserting a record into the multi-level tree organization, removing the compression mark on the corresponding business type tree includes: When inserting a record into a business type tree in a multi-level tree organization, determining whether there is a compression mark in the business type tree context; When there is no compression mark in the business type tree context, the corresponding record is directly inserted; When a compression mark exists in the service type tree context, after inserting a record into the service type tree, if the depth of the service type tree changes from 1 to 2, the compression mark of the service type tree context is removed.
[0009] Optionally, in the space optimization method based on multi-level tree organization metadata of the present application, when deleting a record in the multi-level tree organization, resetting a compression mark for the corresponding business type tree includes: When deleting a record in the created business type tree, it is determined whether there is a compression mark in the business type tree context; When there is a compression mark in the business type tree context, the corresponding record is directly deleted; When there is no compression mark in the business type tree context, after deleting the corresponding record, if the depth of the business type tree changes from 2 to 1, the compression mark is re-set for the context of the business type tree.
[0010] Optionally, in the space optimization method based on multi-level tree-organized metadata of the present application, when serializing data organized in a multi-level tree, the associated business type trees are merged and serialized or serialized separately depending on whether there is a compression mark in the business type tree in the associated path, including: when serializing the top-level business type tree or the associated business type tree, determining whether there is a compression mark in the lower-level business type tree in the associated path, and when there is a compression mark in the lower-level business type tree in the associated path, storing the serialized data of the upper-level business type tree and the lower-level business type tree in the associated path together.
[0011] Optionally, in the space optimization method based on multi-level tree-organized metadata of the present application, when serializing data organized in a multi-level tree, the associated business type trees are merged and serialized or serialized separately according to whether there is a compression mark on the business type tree in the associated path. It also includes: when there is no compression mark on the lower-level business type tree in the associated path, the upper-level business type tree and the lower-level business type tree in the associated path are serialized separately.
[0012] Optionally, in the space optimization method based on multi-level tree-organized metadata of the present application, when reading data organized by a multi-level tree, the data of the associated business type tree is read according to the compression mark, including: when reading data of the top-level business type tree or the associated business type tree from the disk, judging whether there is a compression mark in the lower-level business type tree based on the lower-level business type tree information recorded in the read business type tree data; if there is a compression mark in the lower-level business type tree, parsing the data of the lower-level business type tree from the corresponding serialized data.
[0013] Optionally, in the space optimization method based on multi-level tree organization metadata of the present application, when multiple business type trees of the multi-level tree organization are eliminated, the associated business type trees are eliminated according to the compression mark, including: when the top-level business type tree or the associated business type tree is cached and eliminated, it is judged whether there is a compression mark in the lower-level business type tree according to the lower-level business type tree information recorded in the eliminated business type tree data, and if the lower-level business type tree has a compression mark, the lower-level business type tree is eliminated together.
[0014] According to a second aspect of the present application, a spatial optimization system based on multi-level tree organization metadata is provided, the system comprising an optimization server, the optimization server comprising: A multi-level tree organization creation module is used to create a multi-level tree organization and set a compression mark in the multi-level tree organization; A record insertion module, used to remove the compression mark on the corresponding business type tree when inserting a record into the multi-level tree organization; A record deletion module is used to reset the compression mark for the corresponding business type tree when deleting a record in a multi-level tree organization; A serialization module, which is used to merge or serialize the associated business type trees separately when serializing the data organized by the multi-layer tree, according to whether there is a compression mark in the business type tree in the associated path; A data reading module, used to read the data of the associated business type tree according to the compression mark when reading the data organized by the multi-layer tree; The business type tree elimination module is used to eliminate the associated business type trees according to the compression mark when eliminating the business type trees of the multi-layer tree organization.
[0015] According to a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect of the present application when executing the program.
[0016] The present application is based on a space optimization method, system and device for organizing metadata by a multi-layer tree. In a scenario where metadata is organized by a multi-layer tree, space optimization is performed through metadata compression. According to the depth of different types of trees, whether metadata compression is performed is dynamically adjusted to reduce the occupancy of metadata space. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is an example diagram of the architecture of a space optimization system based on multi-level tree organization metadata according to an embodiment of the present application; Figure 2 This is an example diagram of the architecture of an optimization server of a spatial optimization system based on multi-level tree organization metadata according to an embodiment of the present application; Figure 3 This is a first flow chart of a method for optimizing space based on organizing metadata in a multi-level tree according to an embodiment of the present application; Figure 4 This is a second process example diagram of the space optimization method based on multi-level tree organization metadata according to an embodiment of the present application; Figure 5 This is a third process example diagram of the space optimization method based on multi-level tree organization metadata according to an embodiment of the present application; Figure 6 This is a fourth process example diagram of the space optimization method based on multi-level tree organization metadata according to an embodiment of the present application; Figure 7 This is a fifth process example diagram of the space optimization method based on multi-level tree organization metadata according to an embodiment of the present application; Figure 8 An example diagram of a multi-level tree organization relationship created by a spatial optimization method based on multi-level tree organization metadata according to an embodiment of the present application; Fig. 9 This is an example diagram of a multi-level tree organization metadata before compression according to an embodiment of the present application; Fig.10This is an example diagram of the compression of multi-level tree-organized metadata based on the spatial optimization method of multi-level tree-organized metadata according to an embodiment of the present application; Fig.11 A schematic diagram of the structure of the device provided in this application. DETAILED DESCRIPTION
[0019] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0020] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.
[0021] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0022] Figure 1 FIG. 1 is an example diagram of the architecture of a space optimization system based on a multi-level tree-organized metadata according to an embodiment of the present application. Figure 1 As shown, the system may include an optimization server 101, a communication network 102 and / or one or more optimization clients 103. Figure 1 The example shown is a plurality of optimization clients 103 .
[0023] The optimization server 101 can be any suitable server for storing information, data, programs and / or any other suitable type of content. In some embodiments, the optimization server 101 can perform appropriate functions. For example, in some embodiments, the optimization server 101 can be used for space optimization based on multi-level tree organization metadata. As an optional example, in some embodiments, the optimization server 101 can be used to achieve space optimization based on multi-level tree organization metadata by setting compression marks. For example, the optimization server 101 can be used to: create a multi-level tree organization, set a compression mark in the multi-level tree organization; when inserting a record into the multi-level tree organization, remove the compression mark on the corresponding business type tree; when deleting a record in the multi-level tree organization, re-set the compression mark for the corresponding business type tree; when serializing the data of the multi-level tree organization, according to whether the business type tree in the associated path has a compression mark, the associated business type tree is merged and serialized or serialized separately; when reading the data of the multi-level tree organization, read the data of the associated business type tree according to the compression mark; when eliminating the business type tree of the multi-level tree organization, eliminate the associated business type tree according to the compression mark.
[0024] Figure 2 FIG. 1 is an example diagram of the architecture of an optimization server of a spatial optimization system based on multi-level tree organization metadata according to an embodiment of the present application, such as Figure 2 As shown, the optimization server of this embodiment includes: A multi-level tree organization creation module is used to create a multi-level tree organization and set a compression mark in the multi-level tree organization; A record insertion module, used to remove the compression mark on the corresponding business type tree when inserting a record into the multi-level tree organization; A record deletion module is used to reset the compression mark for the corresponding business type tree when deleting a record in a multi-level tree organization; A serialization module, which is used to merge or serialize the associated business type trees separately when serializing the data organized by the multi-layer tree, according to whether there is a compression mark in the business type tree in the associated path; A data reading module, used to read the data of the associated business type tree according to the compression mark when reading the data organized by the multi-layer tree; The business type tree elimination module is used to eliminate the associated business type trees according to the compression mark when eliminating the business type trees of the multi-layer tree organization.
[0025] As another example, in some embodiments, the optimization server 101 may send a spatial optimization method based on multi-level tree organization metadata to the optimization client 103 for user use based on a request from the optimization client 103 .
[0026] As an optional example, in some embodiments, the optimization client 103 is used to provide a visual optimization interface, which is used to receive a user's selection input operation for performing spatial optimization based on multi-level tree organization metadata, and, in response to the selection input operation, obtain an optimization interface corresponding to the option selected by the selection input operation from the optimization server 101 and display the optimization interface, wherein the optimization interface at least displays information on performing spatial optimization based on multi-level tree organization metadata and operation options for the information on performing spatial optimization based on multi-level tree organization metadata.
[0027] In some embodiments, the communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 102 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The optimization client 103 can be connected to the communication network 102 via one or more communication links (e.g., communication link 104), and the communication network 102 can be linked to the optimization server 101 via one or more communication links (e.g., communication link 105). The communication link can be any communication link suitable for transmitting data between the optimization client 103 and the optimization server 101, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.
[0028] The optimization client 103 may include any one or more clients that present an interface related to spatial optimization based on multi-level tree organization metadata in an appropriate form for user use and operation. In some embodiments, the optimization client 103 may include any suitable type of device. For example, in some embodiments, the optimization client 103 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, and / or any other suitable type of client device.
[0029] Although the optimization server 101 is illustrated as one device, in some embodiments, any suitable number of devices may be used to perform the functions performed by the optimization server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the optimization server 101. Alternatively, a cloud service may be used to implement the functions of the optimization server 101.
[0030] Based on the above system, an embodiment of the present application provides a space optimization method based on organizing metadata in a multi-level tree, which is described below through the following embodiments.
[0031] The spatial optimization method based on multi-level tree organization metadata of this embodiment can be executed on the optimization server side. The spatial optimization method based on multi-level tree organization metadata includes the following contents.
[0032] First, in this embodiment, a multi-level tree organization is created, and a compression mark is set in the multi-level tree organization. As an optional example, when creating an associated business type tree under the top-level business type tree, this embodiment sets a compression mark for the context of the created business type tree. For example, when creating a business type tree, this embodiment initializes a mark bit and sets the mark bit to a compression state. For example, in this embodiment, by checking whether the mark bit in the business type tree context is in a compression state, it is determined whether there is a compression mark in the business type tree context.
[0033] Figure 3 FIG. 1 is a first flow chart of a space optimization method based on a multi-level tree to organize metadata according to an embodiment of the present application. Figure 3 As shown, in this embodiment, when inserting a record into a multi-level tree organization, the compression mark on the corresponding business type tree is removed. As an optional example, in this embodiment, when inserting a record into a business type tree in a multi-level tree organization, it is determined whether there is a compression mark in the business type tree context; when there is no compression mark in the business type tree context, the corresponding record is directly inserted; when there is a compression mark in the business type tree context, after inserting the record into the business type tree, if the depth of the business type tree changes from 1 to 2, the compression mark of the business type tree context is removed. For example, this embodiment changes the mark bit in the business type tree context from a compressed state to a non-compressed state to achieve the removal of the compression mark of the business type tree context.
[0034] Figure 4 FIG. 2 is a second flow chart of a spatial optimization method based on a multi-level tree to organize metadata according to an embodiment of the present application. Figure 4 As shown, in this embodiment, when deleting a record in a multi-level tree organization, a compression mark is set for the corresponding business type tree again. As an optional example, in this embodiment, when deleting a record in a created business type tree, it is determined whether there is a compression mark in the business type tree context; when there is a compression mark in the business type tree context, the corresponding record is directly deleted; when there is no compression mark in the business type tree context, after deleting the corresponding record, if the depth of the business type tree changes from 2 to 1, a compression mark is set for the context of the business type tree again.
[0035] Figure 5 FIG. 3 is a third flow chart of a space optimization method based on a multi-level tree to organize metadata according to an embodiment of the present application. Figure 5As shown, in this embodiment, when serializing the data of the multi-layer tree organization, the associated business type trees are merged and serialized or serialized separately according to whether the business type tree in the associated path has a compression mark. As an optional example, in this embodiment, when the top-level business type tree or the associated business type tree is serialized, it is determined whether the lower business type tree in the associated path has a compression mark. When the lower business type tree in the associated path has a compression mark, the serialized data of the upper business type tree and the lower business type tree in the associated path are stored together. For example, the serialized data of the upper business type tree and the lower business type tree are merged into one data block for storage. When the lower business type tree in the associated path does not have a compression mark, the upper business type tree and the lower business type tree in the associated path are serialized separately. For example, the upper business type tree and the lower business type tree are serialized separately, and the serialized data are stored separately.
[0036] Figure 6 FIG. 4 is a fourth process example diagram of a space optimization method based on a multi-level tree to organize metadata according to an embodiment of the present application. Figure 6 As shown, in this embodiment, when reading data organized by a multi-layer tree, the data of the associated business type tree is read according to the compression mark. As an optional example, in this embodiment, when reading data of a top-level business type tree or an associated business type tree from a disk, it is determined whether the lower-level business type tree has a compression mark according to the lower-level business type tree information recorded in the read business type tree data. If the lower-level business type tree has a compression mark, the data of the lower-level business type tree is obtained by parsing from the corresponding serialized data. For example, the data of the lower-level business type tree is extracted from the merged serialized data, and parsed to restore the structure of the lower-level business type tree.
[0037] Figure 7 FIG. 5 is a fifth process example diagram of a space optimization method based on a multi-level tree to organize metadata according to an embodiment of the present application. Figure 7 As shown, in this embodiment, when a business type tree of a multi-layer tree organization is eliminated, the associated business type tree is eliminated according to the compression mark. As an optional example, in this embodiment, when the top-level business type tree or the associated business type tree is cached and eliminated, it is determined whether the lower-level business type tree has a compression mark according to the lower-level business type tree information recorded in the eliminated business type tree data. If the lower-level business type tree has a compression mark, the lower-level business type tree is eliminated together, that is, during the cache elimination process, the data of the lower-level business type tree associated with the upper-level business type tree is removed at the same time.
[0038] In the process of managing the service type tree, this embodiment periodically checks the compression mark status of the service type tree and performs optimization processing as needed.
[0039] The spatial optimization method of organizing metadata based on a multi-level tree in this embodiment is further described below in a specific scenario.
[0040] In this scenario, metadata is organized by B+ trees of three business types. The trees of these three business types are represented by Class A, Class B, and Class C respectively. Figure 8 This is an example diagram of a multi-level tree organization relationship created according to a spatial optimization method based on a multi-level tree organization metadata according to an embodiment of the present application.
[0041] In this scenario, when creating the B and C trees, a compress mark is added to the corresponding tree context.
[0042] When inserting a record into a B or C tree, if there is no compress mark in the tree context of this type, it is inserted directly; if there is a compress mark, when a new record is inserted, the depth of the tree changes from 1 to 2, then the compress mark of the tree is removed.
[0043] When deleting a record in a tree in class B or C, if there is a compress mark in the context of the tree, the record is deleted directly; if there is no compress mark, when the depth of the tree changes from 2 to 1 after deleting the record, the compress mark is re-applied.
[0044] When the tree data is serialized in a persistent format, if tree A finds that tree B has a compress mark, assuming that the serialized data of the leaf node associated with tree B on tree A is data 1, and the serialized data of tree B is data 2, then data 1 and data 2 are saved together; if tree B finds that tree C has a compress mark, assuming that the serialized data of the leaf node associated with tree B on tree B is data 3, and the serialized data of tree C is data 4, then data 3 and data 4 are saved together.
[0045] When reading the data of type A tree from the disk, if the information of type B tree recorded in the data has a compress mark, the data of type B tree will continue to be parsed from the serialized data; when deserializing the data of type B tree, if the information of type C tree recorded in the data has a compress mark, the data of type C tree will continue to be parsed from the serialized data.
[0046] During cache elimination, when eliminating Class A trees, if the information of Class B trees recorded in Class A tree data has a compress mark, Class A trees and Class B trees are eliminated together; when eliminating Class B trees, if the information of Class C trees recorded in Class B tree data has a compress mark, Class B trees and Class C trees are eliminated together.
[0047] Fig. 9 This is an example diagram of a multi-level tree organization metadata before compression according to an embodiment of the present application. Fig.10 This is an example diagram of compressing multi-level tree-organized metadata according to the spatial optimization method based on multi-level tree-organized metadata according to an embodiment of the present application.
[0048] According to the space optimization method and system based on multi-level tree organization of metadata of the present application, in the scenario where metadata is organized by multi-level trees, space optimization is performed through metadata compression. According to the depth of different types of trees, whether metadata compression is performed is dynamically adjusted to reduce the metadata space occupancy.
[0049] like Fig.11 As shown, the present application also provides a device, including a processor 310, a communication interface 320, a memory 330 for storing a processor executable computer program, and a communication bus 340. The processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 implements the above-mentioned spatial optimization method based on multi-level tree organization metadata by running the executable computer program.
[0050] Among them, the computer program in the memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0051] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected based on actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0052] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0053] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A spatial optimization method based on multi-level tree organization metadata, characterized in that: The method comprises: Create a multi-level tree organization and set compression marks in the multi-level tree organization; When inserting records into a multi-level tree organization, remove the compression mark on the corresponding business type tree; When deleting records in a multi-level tree organization, re-set the compression mark for the corresponding business type tree; When serializing data organized in a multi-layer tree, the associated business type trees are serialized in a merged manner or serialized separately, depending on whether a compression mark exists in the business type tree in the associated path; When reading data organized in a multi-layer tree, data of the associated business type tree is read according to the compression mark; When eliminating a business type tree of a multi-layer tree organization, the associated business type tree is eliminated according to the compression mark.
2. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: A multi-level tree organization is created, and a compression mark is set in the multi-level tree organization, including: when creating an associated business type tree under a top-level business type tree, a compression mark is set for a context of the created business type tree.
3. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When inserting records into a multi-level tree organization, remove the compression mark on the corresponding business type tree, including: When inserting a record into a business type tree in a multi-level tree organization, determining whether there is a compression mark in the business type tree context; When there is no compression mark in the business type tree context, the corresponding record is directly inserted; When a compression mark exists in the service type tree context, after inserting a record into the service type tree, if the depth of the service type tree changes from 1 to 2, the compression mark of the service type tree context is removed.
4. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When deleting records in a multi-level tree organization, re-set the compression mark for the corresponding business type tree, including: When deleting a record in the created business type tree, it is determined whether there is a compression mark in the business type tree context; When there is a compression mark in the business type tree context, the corresponding record is directly deleted; When there is no compression mark in the business type tree context, after deleting the corresponding record, if the depth of the business type tree changes from 2 to 1, the compression mark is re-set for the context of the business type tree.
5. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When serializing data organized in a multi-layer tree, the associated business type trees are merged and serialized or serialized separately according to whether there is a compression mark in the business type tree in the associated path, including: when serializing the top-level business type tree or the associated business type tree, determine whether there is a compression mark in the lower business type tree in the associated path; when a compression mark exists in the lower business type tree in the associated path, store the serialized data of the upper business type tree and the lower business type tree in the associated path together.
6. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When serializing data organized in a multi-layer tree, the associated business type trees are merged and serialized or serialized separately according to whether the business type tree in the associated path has a compression mark. It also includes: when the lower business type tree in the associated path does not have a compression mark, the upper business type tree and the lower business type tree in the associated path are serialized separately.
7. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When reading data organized in a multi-layer tree, the data of the associated business type tree is read according to the compression mark, including: when reading data of the top-level business type tree or the associated business type tree from the disk, judging whether there is a compression mark in the lower-level business type tree based on the lower-level business type tree information recorded in the read business type tree data, and if there is a compression mark in the lower-level business type tree, the data of the lower-level business type tree is parsed from the corresponding serialized data to obtain it.
8. The spatial optimization method based on multi-level tree organization metadata according to claim 1 is characterized in that: When eliminating multiple business type trees organized in a multi-layer tree, the associated business type trees are eliminated according to the compression mark, including: when the top-level business type tree or the associated business type tree is cached and eliminated, it is determined whether the lower-level business type tree has a compression mark based on the lower-level business type tree information recorded in the eliminated business type tree data. If the lower-level business type tree has a compression mark, the lower-level business type tree is eliminated together.
9. A spatial optimization system based on multi-level tree organization metadata, characterized in that: The system includes an optimization server, and the optimization server includes: A multi-level tree organization creation module is used to create a multi-level tree organization and set a compression mark in the multi-level tree organization; A record insertion module, used to remove the compression mark on the corresponding business type tree when inserting a record into the multi-level tree organization; A record deletion module is used to reset the compression mark for the corresponding business type tree when deleting a record in a multi-level tree organization; A serialization module, which is used to merge or serialize the associated business type trees separately when serializing the data organized by the multi-layer tree, according to whether there is a compression mark in the business type tree in the associated path; A data reading module, used to read the data of the associated business type tree according to the compression mark when reading the data organized by the multi-layer tree; The business type tree elimination module is used to eliminate the associated business type trees according to the compression mark when eliminating the business type trees of the multi-layer tree organization.
10. A computer device, characterized in that: The computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program.