Data lake metadata management method and system based on reinforcement learning and semantic interpretation

By employing reinforcement learning and semantic interpretation methods, the metadata of the Iceberg data lake is monitored and optimized in real time. This addresses the issues of reliance on human experience and rigid strategies in data lake metadata management, enabling adaptive optimization and efficient management, reducing operational costs, and improving system transparency and management efficiency.

CN122064651AActive Publication Date: 2026-05-19ZHEJIANG UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202610544955.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-05-19
Estimated Expiration
2046-04-23

AI Technical Summary

Technical Problem

Existing data lake metadata management relies on manual experience for optimization, resulting in rigid optimization strategies, a lack of adaptability to dynamic loads, and high barriers to metadata interaction and analysis, making it difficult to adapt to dynamic changes in data scale and query patterns.

Method used

We employ a reinforcement learning and semantic interpretation approach. By monitoring the metadata features and query performance of the Iceberg data lake in real time, we construct a state vector, utilize a reinforcement learning decision agent to output the optimal action, and express it semantically through a large language model, forming a closed-loop system of perception-decision-execution-interpretation.

Benefits of technology

It achieves adaptive optimization of metadata management, reduces reliance on human experience, improves system transparency and user-friendliness of operation and maintenance, reduces total cost of ownership, and improves the management efficiency and resource utilization of the data platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064651A_ABST
    Figure CN122064651A_ABST
Patent Text Reader

Abstract

The invention discloses a data lake metadata management method and system based on reinforcement learning and semantic interpretation. According to the method, the optimal optimization strategy can be autonomously learned from historical interaction through reinforcement learning, and the decision is dynamically adjusted according to the real-time metadata state and the query load, so that the dependence on fixed rules and artificial experience is thoroughly eliminated, and the adaptivity of the optimization effect is remarkably improved; monitoring, modeling, decision making, execution, feedback and explanation are tightly coupled, metadata management becomes a closed loop capable of self-iteration and continuous optimization, the effect of each optimization operation can be fed back to be used for improving the next decision making, and the system has the long-term self-improvement capability; by introducing a large language model, a complex metadata state, machine decision logic and an operation result are presented in a natural language form, so that the system understanding cost is greatly reduced; and through an automatic and intelligent decision-making and execution mechanism, the dependence on manual adjustment and optimization of deep operation and maintenance experts is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of big data management and artificial intelligence technology, and in particular to a data lake metadata management method and system based on reinforcement learning and semantic interpretation. Background Technology

[0002] With the popularization of big data technology, data lakes have become the mainstream architecture for enterprises to store and process massive amounts of heterogeneous data from multiple sources. However, with the continuous growth of data scale and the dynamic changes in business query patterns, data lake metadata exhibits characteristics such as large quantity, complex structure, and frequent evolution, posing a severe challenge to metadata management. In existing engineering practices, traditional data lake metadata management typically involves manually configuring optimization tasks such as snapshot expiration cleanup and metadata file merging, triggering data compression based on fixed thresholds, and having operations personnel manually execute optimization operations via SQL or scripts. This approach has the following drawbacks: 1) High cost of manual optimization: Metadata optimization operations such as merging small files and adjusting partitioning strategies are highly dependent on human experience and are difficult to adapt to dynamically changing workloads and environments; 2) Rigid optimization strategies: Existing automation tools are mostly based on preset rules (such as file size thresholds) and lack the ability to adaptively learn from comprehensive factors such as long-term query patterns, data value, and storage costs; 3) High barrier to entry for metadata interaction and analysis: Operations and business personnel need to query metadata through complex SQL or APIs, which is difficult to understand intuitively and affects analysis. Summary of the Invention

[0003] The technical problem to be solved by this invention is to provide a data lake metadata management method and system based on reinforcement learning and semantic interpretation, so as to solve the technical problems existing in the data lake metadata management, such as reliance on manual experience for optimization, static and rigid optimization strategies, lack of adaptability to dynamic load, and poor interpretability of the metadata management process.

[0004] Firstly, a data lake metadata management method based on reinforcement learning and semantic interpretation is provided, comprising: collecting current metadata feature information and query performance information of the Iceberg data lake; normalizing the collected current metadata feature information and query performance information to construct a current state vector, and outputting the optimal metadata optimization action through a trained reinforcement learning decision agent; executing the metadata optimization action, and constructing a next state vector based on the metadata feature information and query performance information after the execution of the metadata optimization action; calculating the actual reward brought by executing the metadata optimization action based on the current state vector and the next state vector; combining the current state vector, metadata optimization action, actual reward, and next state vector into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent; and semantically expressing the metadata management process based on the natural language query input by the user, and presenting it in natural language form.

[0005] Secondly, a data lake metadata management system based on reinforcement learning and semantic interpretation is provided, comprising: a data acquisition module for acquiring current metadata feature information and query performance information of the Iceberg data lake; a reinforcement learning decision module for normalizing the acquired current metadata feature information and query performance information, constructing a current state vector, and outputting the optimal metadata optimization action through a trained reinforcement learning decision agent; a metadata optimization execution module for executing the metadata optimization action; and a semantic interpretation module for semantically expressing the metadata management process based on user-input natural language queries using a large language model and presenting it in natural language form; the data acquisition module is also used to acquire metadata feature information and query performance information after the execution of the metadata optimization action; the reinforcement learning decision module is also used to construct a next state vector based on the metadata feature information and query performance information after the execution of the metadata optimization action, and calculate the actual reward brought by executing the metadata optimization action based on the current state vector and the next state vector; and combine the current state vector, metadata optimization action, actual reward, and next state vector into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent.

[0006] The aforementioned data lake metadata management method and system based on reinforcement learning and semantic interpretation, through reinforcement learning, can autonomously learn the optimal optimization strategy from historical interactions and dynamically adjust decisions based on real-time metadata status and query load. This completely eliminates reliance on fixed rules and human experience, significantly improving the adaptability and long-term benefits of optimization effects. It tightly couples multiple stages—monitoring, modeling, decision-making, execution, feedback, and interpretation—making metadata management a self-iterable, continuously optimizing closed-loop system. The effect of each optimization operation is fed back to improve the next decision, giving the system long-term self-improvement capabilities. By introducing a large language model, complex metadata status, machine decision logic, and operation results are presented in natural language, greatly reducing the system's understanding cost and supporting governance auditing and decision traceability. Through automated and intelligent decision-making and execution mechanisms, it reduces reliance on manual tuning by experienced operations experts, enabling the most effective optimization operations to be executed at the optimal time, balancing storage, computing costs, and query performance. This reduces the overall total cost of ownership of the data lake and improves the resource utilization and management efficiency of the data platform. Attached Figure Description

[0007] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0008] Figure 1 This is a flowchart illustrating a data lake metadata management method based on reinforcement learning and semantic interpretation in one embodiment of the present invention; Figure 2 This is a structural block diagram of a reinforcement learning decision agent in one embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a data lake metadata management method system based on reinforcement learning and semantic interpretation in one embodiment of the present invention. Detailed Implementation

[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0010] Explanation of some terms related to this invention: A data lake is a data storage system that centrally stores large amounts of structured, semi-structured, and unstructured data in its raw format. This data can be used for various purposes, including data analysis, machine learning, and data mining. Notable open-source data lakes include Apache Iceberg, Apache Hudi, and Delta Lake.

[0011] Iceberg Data Lake: An open-source tabular data lake framework that implements ACID transactions, schema evolution, and time travel capabilities through metadata structures such as Snapshot, Manifest, and Manifest List.

[0012] Metadata: Data that describes data, used to explain the attributes, sources, formats, relationships, etc. of the data. It is the core foundation of data lake governance and includes technical metadata (such as database table structure, field types, storage paths) and business metadata (such as data meaning, business tags, and usage scenarios).

[0013] Large Language Model (LLM): A large-scale language processing model based on deep learning, possessing powerful semantic understanding, text generation, and knowledge reasoning capabilities. It can be fine-tuned to adapt to the terminology understanding and text processing needs of specific industries.

[0014] Reinforcement learning: a machine learning method that uses the interaction between an agent and its environment to generate feedback signals and continuously optimize the policy to maximize cumulative rewards. It is suitable for parameter adjustment and policy optimization in dynamic scenarios.

[0015] Intelligent agent: In artificial intelligence, it refers to an autonomous entity that can perceive the environment, make decisions, and perform actions to achieve its goals.

[0016] This invention provides a data lake metadata management method and system based on reinforcement learning and semantic interpretation. By integrating deep reinforcement learning and large language model technology, it achieves the following: (1) Real-time perception and dynamic modeling of data lake metadata status and query load; (2) Based on the adaptive optimization strategy generation and continuous learning mechanism of reinforcement learning, it gets rid of the dependence on fixed rules and human experience; (3) Natural language semantic interpretation of metadata optimization decisions and execution results to improve system transparency and user-friendliness of operation and maintenance interactions; (4) Form a closed-loop intelligent management system integrating perception, decision-making, execution and interpretation to comprehensively improve the management efficiency, automation level and governance of data lake metadata.

[0017] This invention is applied to a data lake environment built on the Apache Iceberg table format. The system monitors and collects real-time metadata changes and query engine (such as Spark) logs, and automatically makes decisions and executes metadata optimization tasks using deep reinforcement learning, large language models, and other technologies. It also responds to various user inquiries in an intelligent dialogue manner. The invention is described in detail below through specific embodiments. Unless otherwise specified, the embodiments and features described below can be combined with each other.

[0018] Figure 1 A flowchart illustrating a data lake metadata management method based on reinforcement learning and semantic interpretation provided in an embodiment of the present invention is shown below. Figure 1 As shown, the data lake metadata management method based on reinforcement learning and semantic interpretation includes steps S10 to S60: S10: Collect current metadata characteristics and query performance information of Iceberg data lake.

[0019] This step is performed by the data acquisition module, which is responsible for acquiring metadata feature information and query performance information from Iceberg metadata files and query engine logs in real time or periodically. The data acquisition module includes the following two collectors: (1) Iceberg native metadata collector: Through the metadata interface provided by Iceberg, it parses the manifest and snapshot files in real time to obtain table-level metadata (including table identifier, schema information, partition definition, etc.), version metadata (including the number of snapshots, the creation time of each snapshot and the snapshot lineage, etc.) and file-level metadata (including the number of manifest files, the number of data files, the file size distribution, etc.).

[0020] (2) Query performance collector: Connects to the log system of query engines such as Spark, parses historical and real-time queries, extracts performance indicators such as execution time and scanned data volume, and identifies the proportion of query patterns and data hotspots by analyzing the SQL structure, and quantifies user access behavior.

[0021] Specifically, step S10 includes: S11: Real-time parsing of inventory and snapshot files through the metadata interface provided by the Iceberg data lake system to obtain the current table-level metadata, version metadata, and file-level metadata of the Iceberg data lake; S12: Extract execution time and scanned data volume by parsing historical and real-time queries, and identify the proportion of query patterns and data hotspots by analyzing SQL structure.

[0022] The data acquisition module performs preliminary cleaning and structuring of the collected raw metadata feature information and query performance information to provide input for subsequent state modeling and decision-making.

[0023] S20: Normalize the collected current metadata feature information and query performance information, construct the current state vector, and output the optimal metadata optimization action through the trained reinforcement learning decision agent.

[0024] This step is executed by the reinforcement learning decision module, which is the core module for automatic metadata optimization in this invention. This module takes the collected current metadata feature information and query performance information as input, models the current metadata state, and automatically generates optimization decisions using the reinforcement learning decision agent.

[0025] The reinforcement learning decision module includes the following components: (1) State space: For each monitored Iceberg table, the state space abstracts the metadata features collected within a certain time window into a fixed-dimensional normalized state vector. A sliding time window approach is used to update the historical state, enabling the system to reflect the dynamic characteristics of metadata changes over time.

[0026] In this embodiment of the invention, the state space is used to normalize the collected metadata feature information and query performance information, constructing a 19-dimensional state vector. Each dimension quantifies key indicators of the target Iceberg table in terms of storage efficiency, access patterns, and structural health (including but not limited to small file ratio, partition skew, query latency, snapshot depth, etc.). The definitions of each dimension are as follows: a) Table-level metadata characteristics (7 dimensions): Number of current snapshots; Number of manifest files; Number of data files; Total data volume of the table; Number of partitions; Number of table structure columns; Number of days since the table was created; b) File-level metadata characteristics (7 dimensions): proportion of small files (the proportion of files smaller than a specified size, such as 128MB); average file size; standard deviation of file size; partition skew (standard deviation of data volume in each partition); number of orphan files (the number of files not referenced by any snapshot); proportion of files marked for deletion; proportion of expired snapshots; c) Query performance characteristics (5 dimensions): average query latency; number of queries; amount of data scanned; point query ratio; full table scan ratio.

[0027] (2) Action space: The action space contains a set of optimization actions for Iceberg metadata, covering core metadata management operations such as file merging, snapshot cleanup, and data sorting and rewriting. The action space includes the following six actions: a) No operation (i.e., no optimization is performed); b) Merge small files (compact_files); c) Clean up expired snapshots (expire_snapshots); d) Rewrite and sort the data (rewrite_data_sort); e) Adjusting partitions (e.g., merging or splitting partitions, repartitioning); f) Update metadata statistics (update_statistics).

[0028] (3) Reinforcement learning decision-making agent: This reinforcement learning decision agent adopts an Actor-Critic architecture. Both the policy network (Actor) and the value network (Critic) use a multilayer perceptron with two hidden layers. The input layer dimension is the state space dimension (19-dimensional), and the hidden layer dimensions are [128, 64]. The output layer dimension of the policy network is the action space dimension (6-dimensional), and the probability distribution of each action is output through the Softmax function. ,in The parameters of the policy network include all weights and biases; Indicates an action, This represents the state vector. The value network output layer is 1-dimensional and is used to evaluate the value of the current state. ,in These represent the parameters of the value network. The structure of a reinforcement learning decision-making agent is as follows: Figure 2 As shown, the calculation formulas for the outputs of each layer of the reinforcement learning decision agent are as follows: Output of hidden layer 1: ;in This is the weight matrix from the input layer to hidden layer 1. This is the corresponding bias vector.

[0029] Hidden layer 2 output: ;in This is the weight matrix from hidden layer 1 to hidden layer 2. This is the corresponding bias vector.

[0030] Policy network output: ;in This is the weight matrix from hidden layer 2 to the policy output layer. This is the corresponding bias vector.

[0031] Value network output: ;in This is the weight matrix from hidden layer 2 to the policy output layer. This is the corresponding bias vector.

[0032] The reinforcement learning decision agent needs to be iteratively trained in an environment consisting of offline historical data, and the policy network parameters are updated simultaneously during the training process. and value network parameters After training, the trained policy network and value network parameters are fixed and deployed to the production environment. Specifically, the current state vector is... Metadata optimization actions output by the policy network The environment performs this metadata optimization action. The actual reward received later and the next state vector Combine them to form empirical quadruples The data is then stored in an experience replay buffer. During training, a batch of experience data is randomly sampled from the buffer, and the policy network and value network are updated using the Proximal Policy Optimization (PPO) algorithm. 1. Calculate the dominance function: ; in This is the discount factor.

[0033] Update policy network (PPO objective function): ; in , indicating the current policy network In state Select action The probability of the old policy network The ratio of the probability of choosing the same action under the same conditions; This is the cutting factor.

[0034] Update the value network (mean squared error loss): ; Training continues until the policy converges on the validation set or reaches a preset number of training epochs. "Policy convergence on the validation set" means that when evaluating the policy network on the validation set, its cumulative reward (or policy loss) does not show a significant increase over multiple consecutive training epochs (e.g., 10 epochs), i.e., the absolute value of the reward change between adjacent epochs is lower than a preset threshold (e.g., 1%), and the loss function value of the value network tends to stabilize. To prevent early stopping due to random fluctuations, an early stopping mechanism combined with a sliding window to smooth the evaluation metrics is typically used to ensure the robustness of the convergence determination.

[0035] Specifically, step S20 includes: S21: Normalize the collected current metadata feature information and query performance information to construct the current state vector. ; S22: Transfer the current state vector The trained reinforcement learning decision-making agent is input, and the agent outputs the probability distribution of each action in the action space through the policy network. ; S23: Based on the probability distribution The action with the highest probability is selected as the optimal metadata optimization action. It then outputs the corresponding decision instructions.

[0036] S30: Execute the metadata optimization action, and construct the next state vector based on the metadata feature information and query performance information after the metadata optimization action is executed.

[0037] This step is executed by the metadata optimization execution module, the data acquisition module, and the reinforcement learning decision module. Specifically, the metadata optimization execution module calls Iceberg's native API to perform the metadata optimization action based on the decision instructions output by the reinforcement learning decision module. Specifically, this includes: merging files by specified granularity and range; rewriting data and sorting it in a certain way; cleaning up expired snapshots and reclaiming metadata; and rewriting or merging partition structures. Metadata optimization actions, etc. After execution, the data acquisition module collects metadata feature information and query performance information after the metadata optimization action is performed. The reinforcement learning decision module normalizes the collected metadata feature information and query performance information after the metadata optimization action is performed, and constructs the next state vector. .

[0038] S40: Based on the current state vector and the next state vector, calculate the actual reward brought by performing the metadata optimization action.

[0039] This step is executed by the reinforcement learning decision-making module. This module constructs a reward function to calculate the actual reward for performing the metadata optimization action. This function measures the impact of the current optimization decision on the overall system optimization effect. The goal is to control the size of the metadata, reduce computation and storage costs, improve query performance, and avoid frequent or ineffective optimizations. The calculation of the actual reward needs to consider the following aspects: Storage cost benefits : The amount of storage reduced after optimization (e.g., storage space is reduced after cleaning snapshots and merging small files).

[0040]

[0041] Query performance benefits : The average query latency is reduced after optimization.

[0042]

[0043] Calculation cost penalty The cost of computing resources consumed by performing the optimization operation itself. The unit price of resources is the cost per unit of computing resources, and the baseline cost is a preset upper limit for computing costs.

[0044]

[0045] Stability penalty To avoid frequent optimization, an additional negative reward is given for each optimization operation to encourage the reinforcement learning decision agent to optimize only when necessary. This item is -1 when performing an optimization action, and 0 otherwise.

[0046] Final actual reward Defined as a weighted sum of the above four items, the weight parameters are... It can be dynamically adjusted according to business scenarios:

[0047] S50: Combine the current state vector, metadata optimization action, actual reward, and next state vector into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent.

[0048] This step is performed by the reinforcement learning decision module. After each metadata optimization action is completed, the current state vector is... Metadata optimization actions output by the policy network Perform this metadata optimization action. The actual reward received later and the next state vector Combine them to form empirical quadruples The data is then stored in an experience replay buffer. The reinforcement learning decision module is configured with an online learning mode. During a preset offline training time (e.g., early morning each day), it uses new experience data from the buffer to fine-tune the policy and value networks of the reinforcement learning decision agent, achieving continuous policy optimization to adapt to environmental drift. To prevent performance degradation due to excessive single updates, the system introduces a policy update threshold mechanism. During each policy update, the system employs the pruning mechanism from the PPO algorithm, using a pruning coefficient... (Typically set to 0.2) This limits the step size for policy updates. Specifically, it sets the importance sampling ratio when calculating the policy loss. Cut it so that it falls into Within the range, this ensures that the difference between the new strategy and the old strategy is not too large.

[0049] S60: Based on user input, natural language queries utilize a large language model to semantically express the metadata management process and present it in natural language form.

[0050] This step is executed by the semantic interpretation module, which calls the fine-tuned large language model and combines current metadata information, reinforcement learning decision paths, and optimized execution result indicators to improve the interpretability of the metadata management process. Its main capabilities include: 1) parsing user natural language queries, converting them into retrieval or analysis instructions for the current metadata, and outputting the metadata information required by the user; 2) explaining the reasons for the decisions made by the reinforcement learning decision module and the effects of optimization operations (e.g., "The system plans to merge files in table A at midnight because a large number of small files were detected, affecting yesterday's query performance"). The generated explanation results are available for data governance personnel to view and support auditing, analysis, and decision backtracking.

[0051] Specifically, step S60 includes: S61: Receive natural language queries input by the user. Specifically, the semantic parsing component in the semantic interpretation module receives natural language questions input by data engineers (users) in the interactive interface provided by the system, such as "View the data expansion situation of table db1.tb1 in the past week and explain what optimizations have been made". S62: The first LLM, after fine-tuning, performs intent recognition on the natural language query and converts it into corresponding structured instructions based on the intent recognition results. For example, the semantic parsing component uses the first LLM to perform intent recognition on the natural language query "View the data expansion of table db1.tb1 in the past week and explain what optimizations were performed." and determines that the query contains dual intents: "metadata history query" and "explanation of optimization operations". Subsequently, based on the identified dual intents, the natural language query is converted into two structured instructions: a) Retrieve historical snapshot information of table db1.tb1, such as daily data volume and number of files, in the past seven days; b) Retrieve records of all automated optimization tasks performed by the system on the table within the same time period and their key indicators from the operation log.

[0052] S63: Execute the above structured instructions to retrieve and summarize the required multi-dimensional data, and obtain the structured data.

[0053] S64: The semantic interpretation module integrates the retrieved structured data with the query context to construct detailed prompts, which are then input into a second LLM that has been specially fine-tuned for technical interpretation. Based on the input information, the second LLM generates a coherent, accurate, and easy-to-understand natural language response.

[0054] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0055] Figure 3 A schematic diagram of the structure of a data lake metadata management system based on reinforcement learning and semantic interpretation provided in an embodiment of the present invention is shown below. Figure 3 As shown, the data lake metadata management system based on reinforcement learning and semantic interpretation includes a data acquisition module 10, a reinforcement learning decision-making module 20, a metadata optimization execution module 30, and a semantic interpretation module 40. Detailed descriptions of each functional module are as follows: Data acquisition module 10 is used to collect current metadata characteristics and query performance information of Iceberg data lake; The reinforcement learning decision module 20 is used to normalize the collected current metadata feature information and query performance information, construct the current state vector, and output the optimal metadata optimization action through the trained reinforcement learning decision agent. Metadata optimization execution module 30 is used to perform the metadata optimization action; The semantic interpretation module 40 is used for natural language queries based on user input. It uses a large language model to semantically express the metadata management process and present it in natural language form. The data acquisition module 10 is also used to collect metadata feature information and query performance information after the metadata optimization action is executed; The reinforcement learning decision module 20 is further configured to construct the next state vector based on the metadata feature information and query performance information after the metadata optimization action is executed, and to calculate the actual reward brought by executing the metadata optimization action based on the current state vector and the next state vector; and to combine the current state vector, the metadata optimization action, the actual reward and the next state vector into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent.

[0056] The core workflow of the data lake metadata management system based on reinforcement learning and semantic interpretation includes: (1) Metadata collection: The data collection module 10 collects Iceberg metadata feature information and query performance information in real time or periodically.

[0057] (2) State modeling and intelligent decision-making: The reinforcement learning decision module 20 normalizes the collected current metadata feature information and query performance information to construct the current state vector. , The input is fed into a pre-trained reinforcement learning decision-making agent. Based on the policies learned from historical experience, the agent's policy network infers the metadata optimization action that yields the highest expected return in the current state. .

[0058] (3) Optimize action execution: The metadata optimization execution module 30 executes the metadata optimization actions output by the reinforcement learning decision module 20 by calling the Iceberg API. .

[0059] (4) Feedback and learning: After the metadata optimization action is executed, the data acquisition module 10 collects metadata feature information and query performance information again to obtain the next state vector. The reinforcement learning decision-making module 20 calculates the actual reward based on a preset reward function, comprehensively considering the storage benefits, performance improvements, and computational costs brought about by this optimization. And the complete experiential quadruple formed by this interaction Stored in the replay buffer for subsequent offline retraining or online fine-tuning of the policy network to optimize future decisions.

[0060] (5) Semantic interaction and explanation: Users can query metadata status or ask for the reasons for optimization decisions through natural language. The semantic explanation module 40 generates easy-to-understand answers based on LLM.

[0061] The above steps are executed cyclically, enabling the Iceberg data lake metadata management process to have the ability to continuously learn, make autonomous decisions, and interact in a user-friendly manner.

[0062] Specific limitations regarding the data lake metadata management system based on reinforcement learning and semantic interpretation can be found in the limitations of the data lake metadata management method based on reinforcement learning and semantic interpretation mentioned above, and will not be repeated here. Each module in the aforementioned data lake metadata management system based on reinforcement learning and semantic interpretation can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0063] The data lake metadata management method and system based on reinforcement learning and semantic interpretation provided by this invention have the following significant advantages: (1) By constructing a dynamic state space covering multiple dimensions such as storage and performance, and using a PPO-based reinforcement learning algorithm for decision-making, this invention can autonomously learn the optimal optimization strategy from historical interactions based on changes in metadata scale, structural evolution characteristics, and query load. Compared with existing metadata management methods that rely on human experience or static rules, this invention can dynamically adapt to constantly changing data scale, query load, and business scenarios, achieving adaptive and intelligent metadata optimization strategies, and significantly improving the adaptability and long-term benefits of optimization effects.

[0064] (2) By tightly coupling metadata monitoring, state modeling, intelligent decision-making, optimization operation execution, effect feedback and semantic interpretation, a complete closed loop of perception-decision-execution-interpretation is formed, constituting a self-iteratory and continuously optimized closed-loop system. This system can automatically adjust subsequent strategies according to the actual effect of each optimization operation, enabling the metadata management process to have continuous self-improvement capabilities and maintain the health of the data lake in the long term.

[0065] (3) By introducing a semantic interpretation module of a large language model, the changes in metadata structure, the reasons for optimization decisions, and the effects of execution are expressed semantically, which improves the interpretability of metadata use and management, and presents the complex metadata management process to operation and maintenance and governance personnel in the form of natural language. Compared with the black-box optimization schemes in the prior art that lack interpretability, this invention effectively reduces the system understanding cost and supports governance auditing, problem tracing, and decision analysis.

[0066] (4) Through automated intelligent decision-making and execution, this invention greatly reduces the reliance on the experience of senior operation and maintenance personnel and avoids tedious and repetitive manual tuning operations. At the same time, the intelligent strategy can execute the most effective optimization at the best time, balance storage costs, computing overhead and query performance, reduce the total cost of ownership (TCO) of the data lake as a whole, and improve the management efficiency and resource utilization of the data platform.

[0067] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0068] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A data lake metadata management method based on reinforcement learning and semantic interpretation, characterized in that, include: Collect current metadata characteristics and query performance information of Iceberg data lake; The collected current metadata feature information and query performance information are normalized to construct the current state vector, and the optimal metadata optimization action is output through the trained reinforcement learning decision agent. Perform the metadata optimization action, and construct the next state vector based on the metadata feature information and query performance information after the metadata optimization action is performed; Based on the current state vector and the next state vector, calculate the actual reward brought by performing the metadata optimization action; The current state vector, metadata optimization action, actual reward, and next state vector are combined into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent. Based on user-input natural language queries, a large language model is used to semantically express the metadata management process and present it in natural language form.

2. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, The collection of current metadata characteristics and query performance information of the Iceberg data lake includes: The Iceberg data lake system provides a metadata interface that allows for real-time parsing of inventory and snapshot files to obtain the current table-level metadata, version metadata, and file-level metadata of the Iceberg data lake. By analyzing historical and real-time queries, we can extract execution time and scan data volume, and identify the proportion of query patterns and data hotspots by analyzing the SQL structure.

3. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, The process of normalizing the collected current metadata feature information and query performance information to construct the current state vector, and outputting the optimal metadata optimization action through the trained reinforcement learning decision agent, includes: The collected current metadata feature information and query performance information are normalized to construct the current state vector; The current state vector is input into the trained reinforcement learning decision agent, which outputs the probability distribution of each action in the action space through the policy network. Based on the probability distribution, the action with the highest probability is selected as the optimal metadata optimization action, and the corresponding decision instruction is output.

4. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 3, characterized in that, The actions in the action space include no operation, merging small files, cleaning up expired snapshots, rewriting and sorting data, adjusting partitions, and updating metadata statistics.

5. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, During the training of the reinforcement learning decision agent, the policy network and value network of the reinforcement learning decision agent are updated using the PPO algorithm.

6. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, The execution of the metadata optimization action, and the construction of the next state vector based on the metadata feature information and query performance information after the metadata optimization action is executed, includes: The metadata optimization action is performed by calling the Iceberg API; Collect metadata feature information and query performance information after the metadata optimization action is executed; The metadata feature information and query performance information after the collected metadata optimization actions are executed are normalized to construct the next state vector.

7. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, The calculation of the actual reward resulting from performing the metadata optimization action based on the current state vector and the next state vector includes: Based on the current state vector and the next state vector, calculate the storage cost benefit, query performance benefit, computation cost penalty and stability penalty respectively. The final actual reward is obtained by weighting and summing the storage cost benefits, query performance benefits, computation cost penalties, and stability penalties.

8. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 7, characterized in that, Using formula Compute storage cost benefits ; Using formula Calculate query performance benefits ; Using formula Calculate the computational cost penalty The unit price of resources is the cost of calculating resources per unit, and the benchmark cost is the preset upper limit of the calculation cost. Set stability penalty , The value is -1 when performing metadata optimization actions, and 0 otherwise. Using formula Calculate the actual reward ,in, These are the weight parameters.

9. The data lake metadata management method based on reinforcement learning and semantic interpretation as described in claim 1, characterized in that, The natural language query based on user input utilizes a large language model to semantically express the metadata management process and presents it in natural language form, including: Receive natural language queries input by the user; The natural language query is subjected to intent recognition by the first LLM, and the natural language query is converted into corresponding structured instructions based on the intent recognition result; Execute the above structured instructions to retrieve and summarize the required multi-dimensional data to obtain structured data; The retrieved structured data is integrated with the query context to construct detailed prompts, which are then input into a second LLM for technical explanation. The second LLM generates a coherent, accurate, and easy-to-understand natural language response based on the input information.

10. A data lake metadata management system based on reinforcement learning and semantic interpretation, characterized in that, include: The data acquisition module is used to collect current metadata characteristics and query performance information of the Iceberg data lake; The reinforcement learning decision module is used to normalize the collected current metadata feature information and query performance information, construct the current state vector, and output the optimal metadata optimization action through the trained reinforcement learning decision agent. The metadata optimization execution module is used to perform the metadata optimization action; The semantic interpretation module is used for natural language queries based on user input. It uses a large language model to semantically express the metadata management process and present it in natural language form. The data acquisition module is also used to collect metadata feature information and query performance information after the metadata optimization action is executed; The reinforcement learning decision module is also used to construct the next state vector based on the metadata feature information and query performance information after the metadata optimization action is executed, and to calculate the actual reward brought by executing the metadata optimization action based on the current state vector and the next state vector. The current state vector, metadata optimization actions, actual rewards, and next state vector are combined into empirical data for subsequent offline retraining or online fine-tuning of the reinforcement learning decision agent.