Intelligent document retrieval and generation system based on metadata driving

By introducing an intelligent document search and generation system driven by metadata in the distributed indexing architecture, the problems of low retrieval efficiency and high result noise in multi-dimensional composite queries are solved, and efficient and accurate document retrieval is achieved.

CN120104624AActive Publication Date: 2025-06-06TAIJI COMPUTER CORPORATION LIMITED

Patent Information

Application Number
CN202510594134.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-06-06
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

In the existing technology, when multi-dimensional composite query under distributed index architecture, the lack of metadata pre-filtering mechanism leads to inefficient retrieval efficiency and excessive noise in the result.

Method used

The intelligent document search and generation system based on metadata is adopted, including metadata extraction module, dynamic index construction module, intelligent routing module, distributed search module and result generation module. Through the collaborative work of multiple modules such as metadata extraction, dynamic index construction, intelligent routing, distributed search and result generation, metadata pre-filtering and efficient retrieval are realized.

Benefits of technology

It significantly reduces the overhead of redundant computing, improves the response efficiency of multi-dimensional composite query, reduces result noise, and meets practical application requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104624A_ABST
    Figure CN120104624A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an intelligent document retrieval and generation system based on metadata driving, which comprises a metadata extraction module, a dynamic index construction module, an intelligent routing module, a distributed retrieval module and a result generation module. The metadata extraction module extracts organization names, timestamps and technical classification tags from an input document, maps the organization names, the timestamps and the technical classification tags into structured key value pairs, and transmits the structured key value pairs to the dynamic index construction module through a streaming pipeline; and the dynamic index construction module constructs a skip list index based on discrete fields to realize rapid matching, fuses metadata features and document semantics by adopting a multi-head attention mechanism, and outputs a structured response through topic clustering. According to the method, through a metadata pre-filtering, path optimization and semantic analysis cooperation mechanism, the multi-dimensional composite query efficiency in a distributed environment is improved, and noise interference is suppressed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an intelligent document retrieval and generation system driven by metadata. Background Art

[0002] In the prior art, retrieval systems for large-scale unstructured data usually adopt a distributed index architecture to achieve efficient storage and query. However, when the index data is divided into multiple independently stored blocks, the retrieval process needs to traverse all data blocks to complete feature matching, resulting in a significant increase in computing resource consumption, especially in scenarios involving multi-dimensional composite queries, where the system response efficiency decreases exponentially. For example, in the retrieval application of enterprise information databases, existing methods cannot effectively combine structured metadata such as the applicant organization and time range to pre-screen the target data blocks, causing the system to perform redundant retrieval on data blocks of irrelevant time intervals and non-related applicants, which not only increases data transmission delays, but also introduces a large number of noisy results. This technical defect stems from the lack of a metadata pre-filtering mechanism in the existing index structure, which makes it impossible to quickly locate the most relevant data subset through logical constraints at the beginning of the retrieval, resulting in retrieval accuracy and efficiency that are difficult to meet actual application requirements. Summary of the invention

[0003] In view of the shortcomings of the prior art, the present invention provides a metadata-driven intelligent document retrieval and generation system to solve the problems of low retrieval efficiency and excessive result noise caused by the lack of metadata pre-filtering mechanism during multi-dimensional composite queries under a distributed index architecture.

[0004] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows: The present invention provides a metadata-driven intelligent document retrieval and generation system, comprising: A metadata extraction module, used for extracting key fields from input documents and mapping them into structured key-value pairs, and outputting the structured key-value pairs to a streaming pipeline; A dynamic index building module is used to receive the structured key-value pairs transmitted by the streaming pipeline, inject the received structured key-value pairs into a preset memory buffer, classify the structured key-value pairs in the preset memory buffer by field type to obtain discrete or continuous classification results, build a skip table index for discrete fields, build a red-black tree index for continuous fields, integrate the skip table index and the red-black tree index to generate mixed index data, and input the mixed index data into a preset logical sharding strategy unit, which outputs sharding strategy parameters and mixed index data; An intelligent routing module, used to receive the mixed index data output by the preset logical sharding strategy unit, calculate the hash value of the primary key field by a preset hash function based on the primary key field in the structured key-value pair generated by the metadata extraction module, logically shard the mixed index data according to the hash value of the primary key field to obtain sharded index data, generate a mapping relationship table between sharded data and storage nodes by a preset improved consistent hash algorithm, and transmit the sharded index data to the corresponding storage node according to the mapping relationship table; A distributed retrieval module is used to receive the sharded index data in response to a query request, call a time series prediction model trained based on historical query logs, generate a query probability prediction value for the sharded index data through the time series prediction model, and filter the target shard set in combination with the sharding strategy parameters, and retrieve the associated document fragments of the target shard set from the corresponding storage node according to the mapping relationship table between the shard data and the storage node; The result generation module is used to extract the entity relationship in the associated document fragment through a preset semantic parsing engine to generate a semantic graph structure, splice the node vector of the semantic graph structure with the metadata feature vector in the structured key-value pair, and input it into a multi-head attention model to generate structured response data.

[0005] Furthermore, in the metadata-driven intelligent document retrieval and generation system of the present invention, the dynamic index construction module includes: A data receiving unit, used for receiving structured key-value pairs from the metadata extraction module, and transmitting the metadata key-value pairs of the newly added documents to the difference encapsulation unit through a streaming pipeline; A difference encapsulation unit, used for encapsulating the metadata key-value pair of the newly added document into a difference descriptor including an operation type and a version identifier, and injecting the difference descriptor into a jump table and a red-black tree mixed storage area of ​​a preset memory buffer of a dynamic index construction module; An update unit is used to periodically read the difference descriptors of the memory buffer. The persistent storage form of the mixed index data is a B+ tree index. A gap filling model is used to identify the key value interval gaps of the B+ tree index. The incremental data in the difference descriptor is inserted into the key value interval gaps according to the field type classification, and hierarchically merged with the B+ tree index to generate an updated index structure.

[0006] Furthermore, in the metadata-driven intelligent document retrieval and generation system described in the present invention, the intelligent routing module includes: a sharding decision unit, which is used to receive the mixed index data output by the dynamic index construction module, build a metadata knowledge graph based on the structured key-value pairs generated by the metadata extraction module, the metadata knowledge graph includes entity nodes and relationship edges, input the metadata knowledge graph into a preset graph neural network for dynamic embedding to generate a high-dimensional vector representation of metadata entities, calculate the semantic relevance of metadata combinations based on the cosine similarity between the high-dimensional vector representations, generate a query heat map based on the metadata combinations and their query frequencies recorded in the historical query logs, and generate shard boundary parameters including virtual node weight factors and shard capacity thresholds by combining the semantic relevance of metadata combinations with the time window access frequency distribution in the query heat map and the physical proximity relationship in the storage node topology data; A routing execution unit, configured to adjust the mapping density of the virtual node ring according to the virtual node weight factor in the shard boundary parameter, map the metadata primary key hash value to the target physical node through a preset improved consistent hashing algorithm, and optimize the routing path based on the physical proximity relationship in the storage node topology data; The replica pre-distribution unit is used to receive the hotspot probability value output by the long-short-term memory prediction model trained based on historical query logs. When the hotspot probability value exceeds the dynamically adjusted threshold, the creation of a cache shard of the target node is triggered according to the association weight in the sharding strategy parameter. The cache shard includes a data block associated with the hotspot metadata combination.

[0007] Furthermore, in the metadata-driven intelligent document retrieval and generation system of the present invention, the sharding decision unit is further used for: The metadata knowledge graph is input into the preset graph neural network for dynamic embedding to generate a high-dimensional vector representing the semantic relevance of metadata; A bottom-up hierarchical clustering analysis is performed on the high-dimensional vectors, a distance matrix is ​​constructed by calculating the Euclidean distance between clusters, and adjacent clusters are merged according to a dynamically adjusted cluster radius threshold to identify metadata communities with semantic associations; wherein the metadata communities with semantic associations are defined by entity relationship edges in the metadata knowledge graph; The high-dimensional vector of the semantically associated metadata community generated by the hierarchical clustering analysis is used to calculate the vector space distance distribution of the metadata community. The time window access frequency distribution in the real-time query heat map is generated based on the metadata combination and metadata combination query frequency recorded in the historical query log. The physical proximity relationship data in the storage node topology data is collected. A sharding discrimination model based on the machine learning framework is constructed based on the vector space distance distribution of the metadata community, the time window access frequency distribution in the real-time query heat map, and the physical proximity relationship data in the storage node topology data. The sharding discrimination model receives the following input features: A vector space distance distribution of the metadata community; The time window access frequency distribution in the real-time query heat map; The physical proximity relationship data in the storage node topology data; The input features are combined by a feature crossover algorithm, and based on the training data annotated by the historical sharding decision records, a preset importance ranking algorithm is used to screen the key factors affecting the sharding decision; The output includes the shard capacity threshold and the shard boundary decision parameters of the relevance weight, where: The shard capacity threshold is determined by the vector space distance distribution of the clustering results and the physical proximity relationship in the storage node topology data; The relevance weight is dynamically adjusted by the time window access frequency distribution and feature cross-results in the real-time query heat map.

[0008] Furthermore, in the metadata-driven intelligent document retrieval and generation system of the present invention, the distributed retrieval module is also used for: In the index change operation, a vector tag including a logical timestamp generated by the version controller inside the distributed retrieval module is attached; The partial order relationship of vector labels received by different nodes is compared through the vector clock algorithm to determine the order of operation execution; When updating index copies asynchronously, version merging is performed on conflicting operations according to the execution order, and consistency verification is performed on the merged index copies through the version merging engine in the distributed retrieval module to maintain causal consistency of cross-node indexes.

[0009] Furthermore, the metadata-driven intelligent document retrieval and generation system of the present invention further includes: a load balancing module; Receive the storage pressure, network bandwidth and CPU load indicator data collected by the node monitoring agent, and input them into the multi-dimensional weight evaluation model preset in the load balancing module for quantitative calculation; Input the quantization results into the reinforcement learning engine based on the Q-learning algorithm to dynamically generate the sharding weight matrix; According to the weight distribution result of the shard weight matrix, the topological optimal routing path is calculated by the shortest path algorithm, and the routing decision instruction is sent to the query scheduler of the intelligent routing module to adjust the diversion ratio of the query request.

[0010] Furthermore, in the metadata-driven intelligent document retrieval and generation system described in the present invention, the load balancing module is configured to receive implicit association data in the query log through a reverse feedback channel, and write the implicit association data into the graph database of the metadata knowledge graph; The dynamic adjustment module in the load balancing module analyzes the updated associations in the knowledge graph and recalculates the semantic similarity threshold of the metadata shards. When it is detected that the shard load deviates from the balancing threshold, the elastic migration pipeline is triggered to migrate the associated data blocks in parallel according to the topological structure in the storage node topology data. During the migration process, the data change operation logs of the source node and the target node are synchronized through the dual-write controller.

[0011] Furthermore, in the metadata-driven intelligent document retrieval and generation system of the present invention, the result generation module includes: The preprocessing unit receives the associated document fragments returned by the distributed retrieval module, extracts entity relationships through the semantic parsing engine, and outputs an annotated semantic graph structure; A text generation unit receives the semantic graph structure, fuses metadata features in the structured key-value pairs generated by the metadata extraction module in a neural network based on a multi-head attention mechanism, and generates a preliminary response text; The post-processing unit performs prefix aggregation processing on the preliminary response text, identifies implicit topic distribution through a preset latent Dirichlet distribution model, merges response paragraphs of the same topic, and outputs an optimized structured response document.

[0012] Furthermore, in the metadata-driven intelligent document retrieval and generation system of the present invention, the preprocessing unit is also used for: Based on the preset Node2Vec algorithm, the entities in the metadata knowledge graph are embedded in the graph to generate high-dimensional vector representations. Inputting the high-dimensional vector representation into a similarity calculator, and constructing a semantic adjacency matrix of the document fragment by using a cosine similarity metric; The sliding window processor traverses the semantic adjacency matrix, extracts the periodic association pattern in the time dimension through a preset Fourier transform, and outputs a set of feature vectors with time series labels.

[0013] Furthermore, the metadata-driven intelligent document retrieval and generation system of the present invention further includes an abnormality recovery mechanism, which includes: The checkpoint generation unit periodically captures the index structure status of the dynamic index building module, generates snapshot files including the B+ tree node distribution, and stores them in the write-ahead log; The difference synchronization controller calls the Merkle tree comparison algorithm during data migration to compare the difference in vector space hash values ​​between the source node and the target node, generate a difference data set and synchronize it to the target node; After the network partition is recovered, the lease coordinator compares the logical timestamp of each node's snapshot file through the version vector, triggers the incremental synchronizer to perform the playback of the missing operation log, and synchronizes the index status of each node through the anti-entropy protocol.

[0014] Beneficial effects of the present invention: The present invention uses the synergy of metadata pre-filtering mechanism and hybrid index structure to screen out non-correlated data fragments in the index construction stage, reduce the number of fragments that need to be traversed in the distributed retrieval stage, and significantly reduce redundant computing overhead; the intelligent routing module stores high-correlation fragments to physical neighboring nodes based on semantic clustering results and improved consistent hashing algorithm, and combines the LSTM model to predict the hot query path, give priority to accessing the cache fragments of local or neighboring nodes, and suppress network delays caused by full cross-node scanning; the distributed retrieval module maintains the temporal correctness of index changes through the causal consistency protocol, and dynamically integrates metadata features and document semantics in combination with the multi-head attention mechanism of the generation model to filter expired data and non-correlated content; the post-processing unit uses the topic model to optimize the response structure, merge repeated semantic paragraphs and insert standardized identifiers to form accurate technical document output. The above technical solution effectively improves the response efficiency and result relevance of multi-dimensional composite queries through the three-level collaboration of metadata-driven pre-screening, path optimization and semantic reconstruction, and solves the technical defects of low retrieval efficiency and noise accumulation under the traditional distributed architecture. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on the drawings without paying any creative labor.

[0016] Figure 1 A system architecture diagram of a metadata-driven intelligent document retrieval and generation system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The technical solutions provided by the embodiments of the present invention are described in detail below in conjunction with the drawings. In order to better understand the purpose of the present invention, the present invention is further described in detail below.

[0018] See also Figure 1 The present invention provides a metadata-driven intelligent document retrieval and generation system, comprising: A metadata extraction module, used for extracting key fields from input documents and mapping them into structured key-value pairs, and outputting the structured key-value pairs to a streaming pipeline; The metadata extraction module parses the text content of the input document through the natural language processing engine, and uses the pre-trained named entity recognition model to identify the organization name, timestamp and technical classification label. During the recognition process, the regular expression verification layer is called to verify the format of the extracted field, for example, the time information in the "2023 X Company A Technology Tender" is converted into the ISO 8601 standard format "2023-01-01", and abnormal data that does not conform to the preset pattern is filtered out. The fields that pass the verification are mapped to a key-value pair structure after type annotation. The key corresponds to the metadata type identifier (such as "organization", "time", "technical classification"), and the value is converted into a standardized expression through semantic normalization, for example, "ABC" is mapped to a unified technical classification code.

[0019] The structured key-value pairs are attached with document unique identifier and timestamp metadata, and pushed to the streaming pipeline through asynchronous message queues. The message queue divides the data partitions according to the primary key hash value to ensure that the metadata of the same primary key maintains temporal consistency during transmission. The streaming pipeline sets a backpressure control mechanism to dynamically adjust the data transmission rate to match the processing capacity of the downstream module to prevent memory buffer overflow. During the transmission process, the key-value pairs are serialized and compressed to reduce network bandwidth usage, and a cyclic redundancy check code field is attached to ensure data transmission integrity.

[0020] The key-value data output to the streaming pipeline carries a context identifier in a unified format. The identifier includes the data source node address and the processing stage mark, forming an end-to-end data traceability link. The downstream module tracks the flow status of metadata in the system through the identifier, and supports data rollback and debugging analysis in abnormal scenarios. Data packets that fail verification trigger the exception handling process, and record the error type and original text fragment to the log database for subsequent model optimization and rule iteration.

[0021] A dynamic index building module is used to receive the structured key-value pairs transmitted by the streaming pipeline, inject the received structured key-value pairs into a preset memory buffer, classify the structured key-value pairs in the preset memory buffer by field type to obtain discrete or continuous classification results, build a skip table index for discrete fields, build a red-black tree index for continuous fields, integrate the skip table index and the red-black tree index to generate mixed index data, and input the mixed index data into a preset logical sharding strategy unit, which outputs sharding strategy parameters and mixed index data; After receiving the structured key-value pairs transmitted by the streaming pipeline, the dynamic index building module injects the data into the preset memory buffer through the memory allocator. The buffer is divided into skip table partitions and red-black tree partitions, and the key-value pairs are diverted according to the field type classification rules: discrete fields (such as institution names, technical classification codes) are assigned to skip table partitions, and continuous fields (such as timestamps, numerical sequences) are assigned to red-black tree partitions. The field type parser is called during the classification process, and the field type identifier is matched based on the metadata schema definition file, and the classification result label is generated and attached to the key-value pair header.

[0022] The skip table index builder implements multi-level index construction for discrete fields, with the index level set to 4 levels, and the nodes store key value hash pointers and version number information. The skip table insertion operation uses a probabilistic promotion algorithm to dynamically adjust the node level to achieve an exact match query with O(log n) time complexity. The red-black tree index builder maintains global orderliness for continuous fields, and keeps the tree structure balanced through color marking and rotation operations when inserting new key values. The leaf nodes record the boundary values ​​of the timestamp interval, supporting the efficient execution of range queries such as "2020-2023". After the hybrid index data is generated, the index merger integrates the pointer topology relationship between the skip table and the red-black tree into a unified index view, writes it to the distributed file system and attaches a version number identifier.

[0023] After the logical sharding strategy unit loads the mixed index data, it calls the semantic clustering analysis engine to calculate the sharding capacity threshold based on the co-occurrence frequency between fields (such as the document concentration of an institution in a specific technical field) and the strength of association. In the clustering process, the K-means algorithm is used to divide the index key value space and identify high-density areas as the core areas of the sharding. The sharding strategy parameter generator outputs an instruction set including sharding identifiers, capacity thresholds, and associated weight factors, driving the downstream routing module to implement physical sharding mapping. The version manager records the index version change log, supports incremental updates and historical status rollbacks, and forms a closed-loop index management mechanism.

[0024] An intelligent routing module, used to receive the mixed index data output by the preset logical sharding strategy unit, calculate the hash value of the primary key field by a preset hash function based on the primary key field in the structured key-value pair generated by the metadata extraction module, logically shard the mixed index data according to the hash value of the primary key field to obtain sharded index data, generate a mapping relationship table between sharded data and storage nodes by a preset improved consistent hash algorithm, and transmit the sharded index data to the corresponding storage node according to the mapping relationship table; After the intelligent routing module receives the mixed index data output by the logical sharding strategy unit, the primary key parser extracts the primary key field in the structured key-value pair (such as the combination of the organization name and the technical classification code) and calls the double hash function to generate the primary key hash value. The hash function uses the MurmurHash algorithm combined with the modular operation to generate a 32-bit hash code, and the hash code is evenly distributed to the virtual node space through the hash ring mapping mechanism to reduce the hash skew phenomenon. The shard cutter divides the mixed index data into logical shards according to the hash value range. The boundary of each shard is dynamically determined by the capacity threshold in the sharding strategy parameters, and generates a shard metadata table including the shard identifier and version number.

[0025] The improved consistent hashing algorithm introduces dynamic weight factors for virtual nodes, which are dynamically adjusted based on the real-time load status of the storage node (such as CPU utilization and remaining disk space). The virtual node manager allocates fewer virtual nodes to high-load nodes and more virtual nodes to low-load nodes based on the weight factors, thereby balancing data distribution. The hash ring reconstructor periodically updates the mapping relationship between virtual nodes and physical nodes, generates a mapping relationship table including node addresses, shard identifiers, and version numbers, and stores it in the distributed configuration center.

[0026] When shard data is transmitted in a directional manner, the routing executor selects the target physical node based on the mapping relationship table, giving priority to topologically adjacent nodes to reduce network latency. The data encapsulator packages the shard index data and shard metadata table into a transmission unit, attaches a cyclic redundancy check code and an operation log sequence number, and writes it to the distributed message queue through zero-copy technology. The replica pre-distribution listener monitors the access frequency of the hotspot shards. When the frequency exceeds the preset threshold, it triggers the asynchronous preloading of the cache shards. After receiving the shard data, the target node establishes a memory-level cache index and updates the local routing table. The incremental change log of the source node is synchronized through the dual-write controller to maintain data consistency.

[0027] A distributed retrieval module is used to receive the sharded index data in response to a query request, call a time series prediction model trained based on historical query logs, generate a query probability prediction value for the sharded index data through the time series prediction model, and filter the target shard set in combination with the sharding strategy parameters, and retrieve the associated document fragments of the target shard set from the corresponding storage node according to the mapping relationship table between the shard data and the storage node; When the distributed retrieval module responds to a query request, the query parser extracts metadata constraints in the request (such as institution name, time range, and technical classification label) and generates a query feature vector. The time series prediction model loads the time series data in the historical query log, inputs the feature vector into the trained LSTM neural network, and outputs the query probability prediction value of each shard. The probability value reflects the potential frequency of the target shard being accessed in the future time window. The shard filter combines the capacity threshold and the associated weight factor in the shard strategy parameters, sorts the probability values ​​and filters the shards below the dynamically adjusted threshold to generate a set of target shard identifiers.

[0028] The mapping relationship parser parses the physical node address list corresponding to the target shard according to the mapping relationship table between the shard data and the storage node. The retrieval coordinator sends index scan requests to the target node cluster in parallel. The request package encapsulates the shard identifier, version number and query condition. The node executes a multi-level cache strategy locally, giving priority to accessing hot shard data in memory, and quickly eliminates non-matching key values ​​through Bloom filters to reduce disk I / O operations. For cross-node shard retrieval, the version matcher calls the causal consistency protocol to compare the logical timestamp sequences of the results returned by different nodes, merges the conflicting document fragments in the order of operation execution, and generates a globally consistent intermediate result set.

[0029] The result aggregator performs deduplication and sorting operations on the intermediate result set, calculates the comprehensive relevance score based on the metadata features of the associated document fragments (such as timestamp proximity and technical classification similarity), and selects document fragments with scores higher than the preset threshold. The retrieval results are returned to the result generation module through zero-copy transmission technology, and the query logger is triggered to update the historical access records, forming a feedback data closed loop to optimize the training accuracy of the subsequent prediction model.

[0030] The result generation module is used to extract the entity relationship in the associated document fragment through a preset semantic parsing engine to generate a semantic graph structure, splice the node vector of the semantic graph structure with the metadata feature vector in the structured key-value pair, and input it into a multi-head attention model to generate structured response data.

[0031] After the result generation module receives the associated document fragments returned by the distributed retrieval module, the semantic parsing engine calls the dependency parser to extract the entity-relationship triples in the fragments, for example, parsing the entities "X Company", "ABC", "5 million yuan" and the relationship "bidding amount" from "X Company's 2023 ABC technology bidding amount is 5 million yuan". The parsed triples are feature aligned with the structured key-value pairs generated by the metadata extraction module, for example, "ABC" is mapped to a standard technology classification code to generate a semantic graph structure with a timestamp and source identifier.

[0032] The cross-modal fusion layer concatenates the semantic graph node vector with the metadata feature vector and inputs it into the encoder-decoder model based on the multi-head attention mechanism. The encoder captures the contextual association within the document fragment through the multi-head self-attention mechanism. The decoder introduces metadata features as key-value pairs in the generation phase and dynamically adjusts the weight of the technical classification label and the time dimension feature on the generation result through the cross-attention mechanism. For example, when the weight of the timestamp feature is increased, the time series trend analysis content is given priority in the generated text.

[0033] The generative model uses a beam search algorithm to traverse the candidate response sequence, suppresses semantic repetitions through the n-gram language model, and combines the coverage penalty mechanism to avoid missing key entities. The initially generated response text carries paragraph markers and entity reference tags, such as " <section1>Technical indicators <entity ref="ABC"> ...< / entity> The post-processing unit uses the latent Dirichlet allocation model to analyze the distribution of paragraph topics, calculates the topic similarity matrix between paragraphs, aggregates the same topic paragraphs into the same chapter based on the similarity threshold, and inserts cross-reference links and standardized chapter numbers.

[0034] The structured response document is written back to the storage node through the version controller, and the document association edge weights in the metadata knowledge graph are updated. The output interface converts the document into PDF or XML format that complies with ISO specifications, and adds metadata traceability information (such as "data source: node A-version V2") for users to verify the relevance of the results. When the anomaly detector detects semantic conflicts or format errors during the generation process, it triggers the rollback mechanism to re-call the retrieval module to obtain supplementary data fragments and iteratively optimize the generation results.

[0035] The metadata extraction module parses the unstructured text content from the input document, uses the named entity recognition algorithm to identify the organization name, timestamp and technical classification label, verifies the format validity of the extracted field through regular expressions, and filters out the noise data that does not conform to the preset pattern. The extracted fields are mapped to a key-value pair structure after type annotation, where the key corresponds to the metadata type identifier and the value is converted to a standard format through semantic normalization, such as unifying the time information into a preset standard string. The key-value pair is attached with the document unique identifier and timestamp meta information, and is pushed to the streaming pipeline through an asynchronous message queue. The queue divides the data partitions according to the metadata primary key hash value to ensure the order of data with the same primary key during transmission.

[0036] After the dynamic index construction module receives the key-value pair data from the streaming pipeline, it injects the data into the memory buffer according to the field type classification rules. Discrete fields are stored in the skip table index partition. The skip table accelerates the precise matching of field names through a multi-level index layer. The index node stores the hash pointer and version number of the key-value pair, supporting fast insertion and query in high-concurrency scenarios. Continuous fields are written to the red-black tree index partition. The red-black tree maintains the global order of the field value, optimizes the range query performance through self-balancing rotation operations, and the leaf node records the start and end boundaries of the timestamp interval. After the hybrid index data is generated, the logical sharding strategy unit performs semantic clustering analysis on the index structure, calculates the sharding capacity threshold based on the co-occurrence frequency and association strength between fields, and generates sharding strategy instructions including sharding identifiers and topology constraint parameters.

[0037] After the intelligent routing module parses the sharding strategy instruction, it uses a double hash function to hash the metadata primary key and generate a virtual node identifier. The improved consistent hashing algorithm introduces a dynamic weight factor for virtual nodes, and adjusts the distribution density of virtual nodes on the hash ring according to the real-time load status of the storage node, so that high-association shards are mapped to adjacent nodes in the physical topology. The routing execution unit encapsulates the sharded index data into data blocks, attaches the shard version number and the operation log sequence number, and transmits them to the target storage node through the distributed message middleware. The replica pre-distribution unit monitors the hotspot access pattern in the historical query log, calls the LSTM prediction model to generate the access probability distribution in the future time window, and triggers the pre-loading of the cached replica of the hotspot shard when the probability exceeds the dynamic threshold, reducing the cross-node retrieval delay.

[0038] When the distributed retrieval module responds to a query request, it parses the metadata constraints in the query conditions and calls the time series prediction model to calculate the access probability value of the target shard. The probability value is combined with the sharding strategy parameters to generate a set of candidate shards. The retrieval coordinator sends index scan requests to the target node in parallel based on the mapping relationship table between the shards and the storage nodes. The node executes a multi-level cache strategy locally, giving priority to accessing hot shard data in memory, filtering invalid key values ​​through Bloom filters, and reducing disk I / O overhead. The causal consistency protocol is activated during cross-node retrieval. The vector clock algorithm compares the logical timestamp sequences of the results returned by different nodes, merges conflicting versions in the order of operation execution, and generates a globally consistent query result set.

[0039] The result generation module performs semantic analysis on the document fragments returned by the retrieval, and the dependency syntax analysis engine extracts entity relationship triples in the fragments to construct a weighted semantic graph structure. In the encoding stage, the generation model concatenates the semantic graph node vector with the metadata feature vector, calculates the association weights between cross-modal features through the multi-head attention mechanism, and dynamically integrates technical classification labels and time dimension information. In the decoding stage, the beam search algorithm is used to generate candidate response sequences, and the n-gram language model is used to suppress semantically repeated fragments and output preliminary structured text. The post-processing unit performs topic clustering analysis on the text, and the latent Dirichlet distribution model identifies the implicit topic distribution, merges the response paragraphs of the same topic, inserts chapter identifiers and cross-reference links, and generates structured response output that meets the technical document specifications.

[0040] The load balancing module collects resource utilization indicators of storage nodes in real time. The multi-dimensional evaluation model quantifies the storage pressure, network bandwidth and CPU load of the node, and generates a node health score matrix. The reinforcement learning engine dynamically optimizes the shard weight allocation strategy based on the Q-learning algorithm. The shortest path algorithm calculates the topological optimal routing path according to the weight matrix and adjusts the diversion ratio of query requests. The elastic migration pipeline triggers the data migration task when it detects that the shard load deviates from the balancing threshold. The dual-write controller synchronizes the data changes of the source node and the target node, and ensures the read-write consistency during the migration process through the operation log sequence number.

[0041] The abnormal recovery mechanism maintains system reliability by comparing checkpoint snapshots with Merkle trees. The checkpoint generation unit periodically persists index structure snapshots, and the snapshot file records the key value distribution and version number information of the B+ tree node. The difference synchronization controller builds a Merkle tree hash structure during data migration, locates the data difference between the source node and the target node, and generates an incremental patch package. After the network partition is recovered, the lease coordinator compares the snapshot logical timestamp of each node through the version vector, triggering an incremental synchronization operation to converge the distributed index state.

[0042] Specifically, the metadata-driven intelligent document retrieval and generation system of the present invention, the dynamic index construction module includes: A data receiving unit, used for receiving structured key-value pairs from the metadata extraction module, and transmitting the metadata key-value pairs of the newly added documents to the difference encapsulation unit through a streaming pipeline; A difference encapsulation unit, used for encapsulating the metadata key-value pair of the newly added document into a difference descriptor including an operation type and a version identifier, and injecting the difference descriptor into a jump table and a red-black tree mixed storage area of ​​a preset memory buffer of a dynamic index construction module; An update unit is used to periodically read the difference descriptors of the memory buffer. The persistent storage form of the mixed index data is a B+ tree index. A gap filling model is used to identify the key value interval gaps of the B+ tree index. The incremental data in the difference descriptor is inserted into the key value interval gaps according to the field type classification, and hierarchically merged with the B+ tree index to generate an updated index structure.

[0043] The data receiving unit receives the structured key-value pairs pushed by the metadata extraction module through the streaming pipeline, and uses the asynchronous transmission protocol to achieve high-throughput data transmission. The key-value pairs are attached with document unique identifiers and operation type tags, and the data partitions are divided according to the primary key hash value to ensure that the data with the same primary key maintains temporal consistency during the transmission process. The streaming pipeline sets up a data verification layer to verify data integrity through cyclic redundancy check codes, filter abnormal data packets that fail verification, and prevent invalid data from entering the index construction process. The back pressure control mechanism is used during the transmission process to dynamically adjust the data push rate to prevent memory buffer overflow.

[0044] The difference encapsulation unit parses the received key-value pair data, identifies the operation types including insert, update and delete, and generates a difference descriptor including an operation code, a field identifier and a version serial number. The descriptor uses a binary encoding format to compress and store the changed data set, with a timestamp and data source identifier attached to the head and a checksum field attached to the tail. The difference data of discrete fields is encapsulated as a skip table node descriptor, which records the level pointer and key value hash value; the difference data of continuous fields is encapsulated as a red-black tree node descriptor, which records the key value interval boundary and balance factor. The encapsulated descriptor is injected into the mixed storage area of ​​the memory buffer. The skip table partition uses a multi-level index to accelerate the rapid positioning of discrete fields, and the red-black tree partition maintains the order of continuous fields through rotational balance.

[0045] The update unit starts the background merge thread, regularly scans the difference descriptors in the memory buffer, and uses the gap filling model to identify the key value distribution gaps of the persistent B+ tree index. Discrete field difference data matches the free slots of the B+ tree leaf node according to the hash value. After insertion, the node split detection is triggered. When the number of node key values ​​exceeds the preset threshold, the split operation is performed, a new child node is generated, and the parent node pointer is updated. The continuous field difference data is compared with the existing key value range of the B+ tree through the interval merging algorithm, and the non-overlapping intervals are inserted into the corresponding leaf nodes. The overlapping intervals implement version conflict detection, retain the latest version of the data, and record the operation log. The lock-free snapshot technology is used in the merging process to create a read-only view of the index structure for query service access, so as to realize the parallel execution of index updates and query services.

[0046] After the hierarchical merge is completed, the update unit generates a new B+ tree index version and stores it persistently in the distributed file system. The version manager records the version number and change log of the index structure, and supports index recovery under abnormal conditions through the snapshot rollback mechanism. The merge result triggers an incremental update of the metadata knowledge graph, and the graph database synchronously loads the newly added field association relationship to provide a data basis for subsequent semantic sharding decisions. The index status monitor collects the distribution density and query hit rate of B+ tree nodes in real time, dynamically adjusts the parameter threshold of the gap filling model, and optimizes the data processing efficiency of the next merge cycle.

[0047] Specifically, the intelligent document retrieval and generation system based on metadata drive described in the present invention, the intelligent routing module includes: a sharding decision unit, which is used to receive the mixed index data output by the dynamic index construction module, build a metadata knowledge graph based on the structured key-value pairs generated by the metadata extraction module, the metadata knowledge graph includes entity nodes and relationship edges, input the metadata knowledge graph into a preset graph neural network for dynamic embedding to generate a high-dimensional vector representation of metadata entities, calculate the semantic relevance of metadata combinations based on the cosine similarity between the high-dimensional vector representations, generate a query heat map based on the metadata combinations and their query frequencies recorded in the historical query logs, and generate the shard boundary parameters including virtual node weight factors and shard capacity thresholds by combining the semantic relevance of metadata combinations with the time window access frequency distribution in the query heat map and the physical proximity relationship in the storage node topology data; A routing execution unit, configured to adjust the mapping density of the virtual node ring according to the virtual node weight factor in the shard boundary parameter, map the metadata primary key hash value to the target physical node through a preset improved consistent hashing algorithm, and optimize the routing path based on the physical proximity relationship in the storage node topology data; The replica pre-distribution unit is used to receive the hotspot probability value output by the long-short-term memory prediction model trained based on historical query logs. When the hotspot probability value exceeds the dynamically adjusted threshold, the creation of a cache shard of the target node is triggered according to the association weight in the sharding strategy parameter. The cache shard includes a data block associated with the hotspot metadata combination.

[0048] When constructing the metadata knowledge graph, the sharding decision unit parses the entity type and relationship attributes in the structured key-value pair, maps the organization name to the entity node, uses the technology classification label and timestamp as the node attributes, and establishes the co-occurrence relationship edge between entities. The graph neural network uses the graph convolutional network layer to aggregate the features of multi-hop neighbor nodes, generates node sequence samples through a biased random walk strategy, and uses the Skip-gram model training to generate high-dimensional vector representations. The vector representation stores the semantic association strength between entities. For example, organizations in similar technical fields have a smaller Euclidean distance in the vector space. The semantic association calculation module inputs the vector into the cosine similarity calculator to generate the association matrix of the metadata combination. The matrix dimension corresponds to the interaction strength between different metadata entities.

[0049] The query heat map construction module analyzes historical query logs, counts the access frequency of metadata combinations by time window, and uses a sliding window mechanism to capture periodic access patterns. The time window access frequency is weighted and fused with the semantic relevance matrix to generate a comprehensive relevance score. The storage node topology analyzer collects physical connection latency and bandwidth data between nodes and builds a node proximity graph. The shard boundary parameter generator integrates the comprehensive relevance score with the physical proximity relationship, calculates the virtual node weight factor through a linear weighted model, and dynamically adjusts the shard capacity threshold in combination with the disk capacity data of the storage node to form a shard strategy instruction set including topology constraints.

[0050] After parsing the sharding strategy instructions, the routing execution unit reconstructs the topology of the virtual node ring. The improved consistent hashing algorithm allocates more virtual nodes to high-weight factor shards to increase their distribution density on the hash ring. The metadata primary key is double-hashed to generate a location identifier. After being mapped to the virtual node ring, the target physical node with the lowest latency is selected based on the physical proximity relationship graph. The routing path optimizer uses the Dijkstra algorithm to calculate the shortest transmission path between nodes. The path cost function combines bandwidth utilization and transmission hops to generate the optimal routing path table. The routing instructions are encapsulated into data packets including shard identifiers and version numbers, and distributed to the target nodes through a low-latency communication protocol.

[0051] The replica pre-distribution unit loads the long-short-term memory prediction model. The model input layer receives the metadata combination sequence in the historical query log and generates training samples through time window slicing. The gated recurrent unit of the hidden layer captures the access pattern dependency across time steps and outputs the hotspot probability value of each metadata combination in the future time window. The dynamic threshold adjuster calculates the adaptive change curve of the probability threshold according to the node load status and cache capacity. When the hotspot probability value exceeds the threshold, the replica creation instruction triggers the cache shard preloading of the target node. The data block selector extracts the data block with the highest association weight from the persistent storage, establishes the memory-level cache index and updates the routing meta-information table. The cache shard keeps data synchronized with the source shard through the double-write mechanism, and the operation log sequence number ensures the consistency of incremental updates.

[0052] Specifically, in the metadata-driven intelligent document retrieval and generation system of the present invention, the sharding decision unit is further used for: The metadata knowledge graph is input into the preset graph neural network for dynamic embedding to generate a high-dimensional vector representing the semantic relevance of metadata; A bottom-up hierarchical clustering analysis is performed on the high-dimensional vectors, a distance matrix is ​​constructed by calculating the Euclidean distance between clusters, and adjacent clusters are merged according to a dynamically adjusted cluster radius threshold to identify metadata communities with semantic associations; wherein the metadata communities with semantic associations are defined by entity relationship edges in the metadata knowledge graph; The high-dimensional vector of the semantically associated metadata community generated by the hierarchical clustering analysis is used to calculate the vector space distance distribution of the metadata community. The time window access frequency distribution in the real-time query heat map is generated based on the metadata combination and metadata combination query frequency recorded in the historical query log. The physical proximity relationship data in the storage node topology data is collected. A sharding discrimination model based on the machine learning framework is constructed based on the vector space distance distribution of the metadata community, the time window access frequency distribution in the real-time query heat map, and the physical proximity relationship data in the storage node topology data. The sharding discrimination model receives the following input features: A vector space distance distribution of the metadata community; The time window access frequency distribution in the real-time query heat map; The physical proximity relationship data in the storage node topology data; The input features are combined by a feature crossover algorithm, and based on the training data annotated by the historical sharding decision records, a preset importance ranking algorithm is used to screen the key factors affecting the sharding decision; The output includes the shard capacity threshold and the shard boundary decision parameters of the relevance weight, where: The shard capacity threshold is determined by the vector space distance distribution of the clustering results and the physical proximity relationship in the storage node topology data; The relevance weight is dynamically adjusted by the time window access frequency distribution and feature cross-results in the real-time query heat map.

[0053] When the sharding decision unit inputs the metadata knowledge graph into the graph neural network, the graph convolutional network layer is used to aggregate the multi-hop neighbor features of the entity nodes, and the node representation is updated through the message passing mechanism. The entity relationship edge attributes are used as weight parameters to participate in feature propagation, generating high-dimensional vectors including high-order semantic associations. A negative sampling strategy is implemented in the dynamic embedding process to randomly mask some node relationships to enhance the generalization ability of the model, so that entities with similar semantics are clustered in the vector space. The high-dimensional vectors are stored in a distributed vector database and timestamps are attached to support time series association analysis.

[0054] The hierarchical clustering analysis module performs bottom-up aggregation operations on high-dimensional vectors. In the initial stage, each vector is treated as an independent cluster, and the inter-cluster distance matrix is ​​constructed based on the Euclidean distance. The dynamic radius adjuster implements radius contraction for clusters corresponding to high-frequency access metadata based on the access frequency distribution of the real-time query heat map, thereby increasing the clustering density of hot data areas. During the iterative merging process, the merge operation is triggered when the distance value of adjacent clusters is less than the current threshold. After the merge, the cluster center vector is updated to the weighted average of the member vectors, generating a metadata community division result that reflects the strength of semantic association. The cluster identifier and the association strength coefficient are written into the knowledge graph, and the community attribute label of the entity node is updated.

[0055] When constructing the sharding discrimination model, the feature engineering module standardizes the input features. The vector space distance distribution features are converted into probability distribution curves through kernel density estimation, the time window access frequency distribution features use exponential smoothing to eliminate short-term fluctuation noise, and the physical proximity relationship data is converted into a delay weight matrix between nodes. The feature crossover algorithm uses a polynomial crossover strategy to generate interactive term features of vector distance and access frequency, enhancing the model's ability to capture complex association patterns. The historical sharding decision records are used as training sets after data cleaning. The feature importance sorter calculates the contribution of each feature based on the gradient boosting decision tree model to screen out the key factor combination that affects the sharding capacity threshold.

[0056] In the shard boundary decision parameter generation phase, the capacity threshold calculator combines the compactness index of the vector distribution within the cluster and the remaining disk space ratio of the storage node to dynamically adjust the maximum data carrying capacity of the shard. The association weight calculation module integrates the trend slope of the access frequency of the time window and the feature cross-result, and uses the sliding window weighted algorithm to generate the weight coefficient. The parameter optimizer triggers the online learning mechanism based on the node topology change event, feeds back the deviation data of the actual routing path and the predicted path to the shard discrimination model, and iteratively updates the weight allocation strategy. The final decision parameter set is converted into shard instructions through the policy engine, driving the routing module to adjust the mapping rules of the virtual node ring.

[0057] The parameter output module encapsulates the shard capacity threshold and the association weight into a policy configuration file, with a version number and an effective timestamp. When the configuration file is distributed to the storage node cluster, a two-phase commit protocol is used to ensure the atomic update of all node configurations. The version rollback manager persistently stores historical parameter versions and automatically triggers configuration rollback operations when a shard load anomaly is detected to maintain the stability of routing decisions. After the policy takes effect, the monitoring agent collects shard query hit rates and node load indicators in real time, generates performance reports and feeds them back to the shard discrimination model, forming a closed-loop optimization link.

[0058] Specifically, in the metadata-driven intelligent document retrieval and generation system of the present invention, the distributed retrieval module is further used to: In the index change operation, a vector tag including a logical timestamp generated by the version controller inside the distributed retrieval module is attached; The partial order relationship of vector labels received by different nodes is compared through the vector clock algorithm to determine the order of operation execution; When updating index copies asynchronously, version merging is performed on conflicting operations according to the execution order, and consistency verification is performed on the merged index copies through the version merging engine in the distributed retrieval module to maintain causal consistency of cross-node indexes.

[0059] When generating logical timestamps, the version controller of the distributed retrieval module constructs a vector tag based on the increasing sequence of the node identifier and the local event counter. The vector tag uses a composite structure of [node ID: event counter] to record the node where the index change operation is generated and the operation sequence number, and is attached to the data change request packet header through the operation log. The data packet encapsulates the operation type, field identifier, and key value data, and attaches a globally unique request identifier during transmission to form the basic data for operation traceability.

[0060] The vector clock algorithm is activated when a node receives an index change request, parses the vector label carried by the operation, and updates the local vector clock state. The local clock maintains the latest value of each node's event counter, and constructs a partial order relationship graph by comparing the numerical relationship of each node's counter in the vector label. When a concurrent operation conflict is detected, the conflict detector marks the operation pairs with causal dependencies and generates an operation execution sequence based on the preset node priority strategy. For concurrent operations without direct causal relationships, the operation type priority strategy is adopted, in which delete operations take precedence over update operations, and update operations take precedence over insert operations. After processing is completed, the node broadcasts the updated vector clock state to the relevant replica nodes to synchronize the latest operation sequence information.

[0061] The version merge engine implements multi-version index management during the asynchronous update process, creates branch versions for conflicting operations, and attaches version identifiers. The merge process uses an operation playback mechanism to reapply the change operations to the index replicas according to the logical timeline based on the execution order determined by the vector clock algorithm. For multiple update operations involving the same field, the field-level version fuser retains the last valid operation result and generates a field version history chain. After the merge is completed, the consistency checker compares the vector clock status of the index replicas of each node, synchronizes the missing change operation logs through the anti-entropy protocol, and eliminates the status differences between nodes. The verification result triggers the index snapshot generation task, which persists the merged index structure and updates the version association relationship in the metadata knowledge graph.

[0062] The conflict resolution strategy refines the processing logic for specific scenarios during the merge process. For field-level value conflicts, the latest write priority principle is adopted to determine the latest valid value based on the logical timestamp in the vector label. For structural conflicts, such as overlapping key value intervals caused by index node splits, the interval merger implements a boundary calibration algorithm to re-divide the key value range and adjust the parent node pointer. The merged index structure verifies the balance state of the red-black tree and the B+ tree through the balance factor detector, triggering a self-balancing operation to maintain query performance. The operation log compressor regularly cleans up synchronized historical log entries to free up storage space and improve log playback efficiency.

[0063] The consistency maintenance mechanism runs continuously during the distributed retrieval process. When processing query requests, the version resolver selects index replicas that meet causal consistency based on the vector clock state, and excludes branch versions that have not completed merge operations. The routing coordinator gives priority to accessing replica nodes with the latest logical timestamps when querying across nodes, and filters expired data responses by version number comparison. The abnormal recovery module activates the offline operation cache in the network partition scenario, and re-injects the cached operation log into the merge process after the partition is restored to ensure the integrity of operations during the interruption. The monitoring agent collects index merge success rate and conflict resolution time-consuming indicators in real time, and feeds back to the sharding discrimination model to optimize the sharding strategy parameters, forming a closed-loop performance tuning link.

[0064] Specifically, the metadata-driven intelligent document retrieval and generation system of the present invention further includes: a load balancing module; Receive the storage pressure, network bandwidth and CPU load indicator data collected by the node monitoring agent, and input them into the multi-dimensional weight evaluation model preset in the load balancing module for quantitative calculation; Input the quantization results into the reinforcement learning engine based on the Q-learning algorithm to dynamically generate the sharding weight matrix; According to the weight distribution result of the shard weight matrix, the topological optimal routing path is calculated by the shortest path algorithm, and the routing decision instruction is sent to the query scheduler of the intelligent routing module to adjust the diversion ratio of the query request.

[0065] The node monitoring agent of the load balancing module deploys a lightweight data collector to capture the disk usage, network interface throughput and CPU core utilization indicators of the storage node in real time. The collector uses a sliding window mechanism to smooth the original data and generate a time series indicator sequence after eliminating the interference of instantaneous fluctuations. The indicator sequence is transmitted to the multi-dimensional weight evaluation model through a message queue. The model implements logarithmic normalization on the storage pressure indicator, converts the network bandwidth indicator into the remaining bandwidth ratio, and calculates the CPU load indicator as the weighted average of the core utilization to generate a standardized scoring matrix.

[0066] After the multi-dimensional weight evaluation model outputs the node health score, the reinforcement learning engine initializes the state-action value table of the Q-learning algorithm. The state space is defined as a discretized combination of the node score matrix, and the action space corresponds to the set of shard weight adjustment strategies. The exploration phase uses the ε-greedy strategy to select random actions, and the execution phase updates the Q-value table items based on the historical query response delay feedback. The dynamic weight generator calculates the node affinity weight and path cost factor of each shard based on the updated Q-value table, and generates a shard weight matrix including weight priority. The matrix dimension matches the storage node topology.

[0067] When the shortest path algorithm parses the storage node topology, it maps the node affinity weights in the shard weight matrix to edge weight parameters. The improved Dijkstra algorithm traverses the feasible paths in the topology, and the path cost function integrates the number of transmission hops, bandwidth utilization penalty items, and node load balancing factors to screen the candidate path set that meets the minimum delay constraint. The optimal path selector selects the transmission path with the lowest comprehensive cost from the candidate paths based on the real-time network congestion status, and generates a routing decision instruction including the target node address and priority identifier.

[0068] Routing decision instructions are sent to the query scheduler through a high-priority message queue. After the instruction parser extracts the path weight parameter, it dynamically adjusts the query request distribution ratio in the thread pool. The diversion controller routes high-priority queries to low-load nodes based on the weight coefficient, while limiting the request reception rate of overloaded nodes. When the elastic scaler monitors the change in node load, it triggers the online update task of the weight matrix, and the reinforcement learning engine recalculates the Q value table to form a closed-loop tuning mechanism. After the routing policy takes effect, the performance monitor collects query latency and node load balancing coefficients, generates a tuning report and feeds it back to the weight evaluation model, and iteratively optimizes the scoring calculation rules.

[0069] The exception handling mechanism is activated when a node fails. After the fault detector marks the unavailable node, the path recalculation engine immediately removes the failed node from the topology map and re-executes the shortest path algorithm to generate an alternative routing solution. The active-active node switch migrates the shard data of the failed node to the backup node. During the migration process, the data consistency is maintained through the double-write mechanism of the operation log. After the load balancing state is restored, the incremental synchronizer compares the data differences between the nodes and reissues the missing query requests to the updated routing path to ensure service continuity.

[0070] Specifically, in the metadata-driven intelligent document retrieval and generation system described in the present invention, the load balancing module is configured to receive implicit association data in the query log through a reverse feedback channel, and write the implicit association data into the graph database of the metadata knowledge graph; The dynamic adjustment module in the load balancing module analyzes the updated associations in the knowledge graph and recalculates the semantic similarity threshold of the metadata shards. When it is detected that the shard load deviates from the balancing threshold, the elastic migration pipeline is triggered to migrate the associated data blocks in parallel according to the topological structure in the storage node topology data. During the migration process, the data change operation logs of the source node and the target node are synchronized through the dual-write controller.

[0071] The reverse feedback channel of the load balancing module deploys a query log parsing engine to implement association rule mining on metadata combination patterns in historical query requests. The parsing engine uses the Apriori algorithm to identify high-frequency co-occurring metadata entity pairs and converts implicit association relationships into attribute graph structure data, including entity nodes, co-occurrence frequency weights, and time decay factors. The converted graph data is written into the graph database of the metadata knowledge graph through the batch import interface, and the weight coefficients of the entity relationship edges are updated to enhance the knowledge graph's ability to represent dynamic query patterns.

[0072] The dynamic adjustment module triggers the semantic analysis task after the knowledge graph is updated. The graph embedding engine uses the Node2Vec algorithm to generate a high-dimensional vector representation of the metadata entity. The similarity threshold calculator calculates the average clustering density of the metadata entities in the current shard based on the Euclidean distance distribution in the vector space, and generates a dynamically adjusted semantic similarity threshold through a sliding window weighted algorithm in combination with the real-time load status of the storage node. The threshold update event triggers the shard re-evaluation process, marking the metadata combination whose entity similarity in the shard is lower than the new threshold as a candidate set to be migrated.

[0073] The elastic migration pipeline is activated when the load monitor detects that the shard load deviates from the balancing threshold. The migration controller generates a parallel migration task queue based on the storage node topology data. The data block splitter divides the shard to be migrated into multiple migration units according to the physical storage location, and each unit is attached with a version identifier and source node location information. The dual-write controller intercepts write requests during the migration process and distributes the data change operation log to the source node and the target node at the same time, ensuring the sequential consistency of the dual-write operation through the operation log sequence number. After the migration is completed, the consistency checker compares the data differences between the two nodes, parses the unsynchronized incremental operation logs for compensatory writes, and updates the shard location records in the routing meta-information table.

[0074] During data synchronization, the version conflict detector identifies the data version difference between the source node and the target node, and adopts a merge strategy based on logical timestamps to resolve conflicts. The conflict merger prioritizes the operation records with higher version numbers, and writes the data with lower version numbers into the rollback log for subsequent auditing. The migration status tracker monitors the processing progress of each migration unit in real time. When a node failure or network interruption is detected, the breakpoint resume mechanism is triggered to resume data transmission from the most recent successful checkpoint. After the migration task is completed, the load balancing module re-evaluates the resource utilization of the node cluster, generates a new shard weight matrix and feeds it back to the reinforcement learning engine to form a closed-loop optimization link.

[0075] Specifically, in the metadata-driven intelligent document retrieval and generation system of the present invention, the result generation module includes: The preprocessing unit receives the associated document fragments returned by the distributed retrieval module, extracts entity relationships through the semantic parsing engine, and outputs an annotated semantic graph structure; A text generation unit receives the semantic graph structure, fuses metadata features in the structured key-value pairs generated by the metadata extraction module in a neural network based on a multi-head attention mechanism, and generates a preliminary response text; The post-processing unit performs prefix aggregation processing on the preliminary response text, identifies implicit topic distribution through a preset latent Dirichlet distribution model, merges response paragraphs of the same topic, and outputs an optimized structured response document.

[0076] After the preprocessing unit receives the associated document fragments returned by the distributed retrieval module, the semantic parsing engine calls the dependency parser to identify the subject-verb-object structure in the document fragment, and uses the pre-trained named entity recognition model to extract technical feature entities. The entity relationship extractor parses the subordinate relationships and interactive actions between entities based on the combination of rule templates and deep learning models, and generates a semantic graph structure with weighted labels. The semantic graph nodes store entity types and normalized identifiers, the edge attributes record the relationship type and confidence score, and the document source identifier and timestamp meta-information are attached to form a traceable semantic association network.

[0077] After the text generation unit loads the semantic graph structure, the encoder layer cross-modally concatenates the metadata feature vector and the semantic graph node vector. The multi-head attention mechanism is activated in the decoding stage, calculating the attention weight distribution of the query vector and each semantic graph node, and dynamically adjusting the influence of the technical classification label and timestamp features on the generation result. The generator uses a beam search strategy to traverse the candidate response sequence space, suppresses semantic repetitive fragments through the n-gram language model, combines the coverage penalty mechanism to avoid missing key entities, and outputs a preliminary response text including technical descriptions and data traceability information.

[0078] The post-processing unit performs paragraph segmentation on the preliminary response text, and uses the latent Dirichlet distribution model to analyze the co-occurrence pattern of terms in the paragraph, identify the implicit topic distribution and calculate the topic similarity matrix. The prefix aggregator clusters paragraphs of the same topic based on the similarity threshold, and uses the maximum boundary correlation algorithm to select the expression combination with the highest information density. The structured reorganization engine performs logical sorting on the optimized paragraph set, inserts metadata-guided chapter identifiers and cross-reference hyperlinks, and generates structured output that conforms to technical document specifications. The version controller writes the final response document back to the storage node, and synchronously updates the document association index in the metadata knowledge graph to form a closed-loop data processing link.

[0079] Specifically, in the metadata-driven intelligent document retrieval and generation system of the present invention, the preprocessing unit is further used for: Based on the preset Node2Vec algorithm, the entities in the metadata knowledge graph are embedded in the graph to generate high-dimensional vector representations. Inputting the high-dimensional vector representation into a similarity calculator, and constructing a semantic adjacency matrix of the document fragment by using a cosine similarity metric; The sliding window processor traverses the semantic adjacency matrix, extracts the periodic association pattern in the time dimension through a preset Fourier transform, and outputs a set of feature vectors with time series labels.

[0080] When the preprocessing unit applies the Node2Vec algorithm to perform graph embedding calculations on entities in the metadata knowledge graph, a biased random walk strategy is used to generate node sequence samples. During the walk, the return parameters and input and output parameter weights are adjusted to control the tendency of the walk path to the breadth-first or depth-first strategy, and to capture the structural proximity and semantic similarity between entities. The generated node sequence is input into the Skip-gram model for training, and the discrimination of the high-dimensional vector representation is optimized through negative sampling technology, so that entities in similar technical fields are clustered in the vector space. The vector representation is attached with entity type identifiers and timestamp tags, and stored in the distributed vector database for downstream modules to call.

[0081] The similarity calculator normalizes high-dimensional vectors to eliminate the impact of vector modulus differences on similarity measurement. The cosine similarity calculation module constructs a fully connected semantic adjacency matrix, and the matrix elements represent the association strength of the corresponding entity pairs in the semantic space. During the matrix construction process, sparse processing is implemented to filter low-association data through a preset threshold to generate a compressed adjacency matrix structure. The matrix is ​​divided into blocks according to the time dimension and a time window identifier is attached, which is stored as a time series block matrix to provide structured input for periodic pattern analysis.

[0082] The sliding window processor traverses the time series block matrix along the time axis and sets configurable window span and sliding step parameters. The matrix data in the window is converted into frequency domain signals through fast Fourier transform, and the periodic correlation patterns corresponding to the frequency domain energy peaks are extracted. The pattern recognizer maps the frequency domain features back to the time domain and generates a time series mark with start time, cycle length and intensity value combined with the original timestamp. The feature vector set generation module performs dimensionality reduction processing on the extracted patterns, uses the principal component analysis algorithm to retain the key feature dimensions, and outputs a feature vector set carrying time context information for the generation model to perform cross-modal fusion.

[0083] The association between time series tags and feature vectors is realized through the timestamp alignment engine, which parses the time window identifier of the feature vector and matches it with the entity time attribute in the metadata knowledge graph. The aligned data is injected into the time series index structure of the graph database to support fast retrieval based on time range. The anomaly detector monitors the mutation events of periodic patterns. When the pattern strength is detected to deviate from the historical baseline, the dynamic update mechanism of the metadata knowledge graph is triggered to enhance the system's adaptability to changes in time series associations.

[0084] Specifically, the metadata-driven intelligent document retrieval and generation system of the present invention further includes an abnormality recovery mechanism, which includes: The checkpoint generation unit periodically captures the index structure status of the dynamic index building module, generates snapshot files including the B+ tree node distribution, and stores them in the write-ahead log; The difference synchronization controller calls the Merkle tree comparison algorithm during data migration to compare the difference in vector space hash values ​​between the source node and the target node, generate a difference data set and synchronize it to the target node; After the network partition is recovered, the lease coordinator compares the logical timestamp of each node's snapshot file through the version vector, triggers the incremental synchronizer to perform the playback of the missing operation log, and synchronizes the index status of each node through the anti-entropy protocol.

[0085] The checkpoint generation unit deploys a periodic task scheduler to trigger the index structure state capture process at regular intervals. The index traverser scans the B+ tree node distribution in the dynamic index construction module and records the key value range of the leaf node and the pointer topology relationship of the non-leaf node. The snapshot serializer converts the node metadata and key value mapping relationship into binary format, appends the logical timestamp and version number, and writes it to the independent storage partition of the pre-write log. The log manager implements a generational storage strategy to retain the complete snapshots and incremental operation logs of the last three checkpoint cycles to form a recovery baseline data based on the time window.

[0086] When the data migration task is started, the differential synchronization controller calls the Merkle tree builder to generate the hash tree structure of the source node and the target node. Leaf nodes store the vector space hash code of the key-value data, and non-leaf nodes are generated by calculating the hash values ​​of their child nodes level by level. The tree comparer compares the hash values ​​layer by level starting from the root node to locate the subtree branches with differences. The differential data extractor generates the minimum differential data set based on the inconsistent subtree paths, encapsulates the differential key values ​​into an incremental patch package, and sends it to the target node through a compressed transmission protocol. After receiving the patch package, the data verifier of the target node reconstructs the local Merkle tree and updates the local index version after completing the final consistency check.

[0087] The lease coordinator starts the state coordination protocol during the network partition recovery phase and requests the latest checkpoint snapshot metadata from each node. The version vector parser extracts the logical timestamp sequence in the snapshot and constructs a version vector table including the maximum event counter of each node. The conflict detector identifies node pairs with version differences through the vector clock algorithm, and preferentially selects the node with the latest logical timestamp as the synchronization reference source. The incremental synchronizer pulls the operation log within the missing time interval from the reference source node, and applies the log to the target node index structure in the order of operation through the transaction replay mechanism. The anti-entropy protocol is activated after the synchronization is completed, and the key value distribution status of each node index copy is compared. Compensation synchronization requests are initiated for the residual difference data until the version vectors of all nodes reach a converged state.

[0088] During the abnormal recovery process, the breakpoint resume controller monitors data transmission interruption events and records the offset of the successfully transmitted data block. When the network is restored, the differential data packet will continue to be transmitted from the breakpoint position to avoid repeated transmission and improve efficiency. When the version rollback manager detects an abnormal index structure after synchronization, it will roll back to the most recent stable version based on the snapshot file in the pre-write log, while retaining the abnormal version log for subsequent analysis. The monitoring agent collects the recovery success rate and synchronization time consumption indicators in real time, and feeds back to the load balancing module to optimize the shard migration strategy, forming a closed-loop mechanism for exception handling and system tuning.

[0089] The technical features of the present invention are explained as follows: Metadata extraction module: a functional unit that automatically identifies and extracts key fields (such as institution name, timestamp, and technical classification label) from unstructured documents. The document content is parsed through natural language processing technology, and the original text is converted into a standardized key-value pair format (for example, "Application date: January 1, 2023" is mapped to {"date":"2023-01-01"}), and regular expression verification is implemented on the field format to filter invalid data.

[0090] Structured key-value pair: a standardized data unit organized in the form of key (Key) and value (Value), where the key represents the metadata type (such as institution, time, and technology classification), and the value corresponds to the specific content. For example, {"institution":"XYZ Company","tech_field":"ABC"}, which is used for rapid matching in subsequent index construction and retrieval.

[0091] Streaming pipeline: An asynchronous data transmission channel based on a message queue (such as Kafka) that transmits metadata key-value pairs to downstream modules in order. Primary key hash partitioning is used to ensure that metadata in the same organization or technology field maintains temporal consistency during transmission, and timestamps are attached to support incremental data processing.

[0092] Skip list index: A hierarchical linked list structure designed for discrete fields (such as institution names). It achieves fast insertion and accurate query by establishing multi-level indexes (such as stratification by the first letter of the institution name), with a time complexity of O(log n). For example, the institution name index supports fast location of the target data block by the first letter.

[0093] Red-black tree index: A self-balancing binary search tree used to maintain the order of continuous fields (such as timestamps). The tree height is balanced through node coloring and rotation operations, supporting efficient range queries (such as "documents between 2020 and 2023") with a time complexity of O(log n).

[0094] Logical sharding strategy unit: A decision-making module that divides the data storage range based on metadata semantic relevance. By analyzing the co-occurrence frequency of fields (such as the concentration of documents of an institution in a specific technical field) and query heat maps, sharding capacity thresholds and associated weight parameters are generated to guide data sharding storage.

[0095] Improved consistent hashing algorithm: A dynamic scaling mechanism for virtual nodes is introduced based on the traditional hash ring. The distribution density of virtual nodes on the hash ring is adjusted according to the shard association weight, so that highly associated shards (such as documents in the same technical field) are mapped to storage nodes adjacent to the physical topology, reducing the frequency of cross-node queries.

[0096] LSTM prediction model: Long short-term memory neural network, used to analyze time series patterns in historical query logs (such as a surge in search volume in a certain technology field in a specific month), predict future hot metadata combinations and their access probabilities, and guide the preloading of cache shards.

[0097] Causal consistency protocol: a mechanism for maintaining the order of operations in a distributed system. The operation timing is recorded through a vector clock (such as [node ID: event counter]), and the clock states of different nodes are compared to determine the execution priority of conflicting operations (such as deletion operations take precedence over update operations), thus ensuring the causal order of data changes.

[0098] Multi-head attention mechanism: a feature fusion technology in neural networks, used to generate semantic association analysis of models. By calculating the attention weights of document fragment semantics and metadata features (such as institutional attributes and time dimensions) in parallel, the influence of different features on the generated results is dynamically adjusted to suppress the output of irrelevant content.

[0099] Merkle tree comparison algorithm: a data consistency verification method based on hash trees. By comparing the subtree hash values ​​of the source node and the target node (such as the difference in the root node hash indicates the inconsistency of the underlying data), the minimum data set to be synchronized is located, and an incremental patch package is generated for differential synchronization.

[0100] Elastic migration pipeline: A transmission channel that dynamically adjusts data distribution. When an unbalanced shard load is detected, the associated data blocks (such as all bidding information of an organization) are migrated in parallel according to the storage node topology. The migration unit is attached with a version identifier to avoid data loss, and the read-write consistency is maintained through a dual-write controller.

[0101] Latent Dirichlet Allocation Model: A topic modeling algorithm used to identify implicit topic distribution in response text. By analyzing the co-occurrence pattern of terms within paragraphs, calculating the topic similarity matrix, merging paragraphs with the same topic and optimizing the output structure. In the specific implementation of the present invention, for the multi-dimensional composite query scenario of the enterprise information database, efficient retrieval and low-noise output are achieved through multi-module collaboration. The metadata extraction module deploys a natural language processing engine, uses a pre-trained named entity recognition model to parse the input document, identifies the organization name, timestamp and technology classification label, verifies the field format through regular expressions, and converts the "2023 X Company A Technology Tender" into a structured key-value pair {"Organization":"X Company","Time":"2023-01-01","Technology Classification":"ABC"}. The streaming pipeline is implemented based on the Kafka message queue, and data is transmitted by primary key hash partition. The transmission delay is controlled at the millisecond level to ensure the order and integrity of the time series data.

[0102] The dynamic index construction module divides the memory buffer into skip list and red-black tree partitions. Discrete fields such as the name of the organization build a skip list index, and the node level is set to 4 levels to achieve accurate matching with O(log n) time complexity; continuous fields such as timestamps build red-black tree indexes, and maintain ordered key value intervals to support "2020-2023" range queries. The logical sharding strategy unit implements hierarchical clustering analysis on the index data. When it is detected that the document concentration of an organization in a specific technical field exceeds 80%, it generates associated shards and marks them as high-priority storage areas. After the mixed index data is calculated by the sharding strategy, the sharding decision process of the intelligent routing module is triggered. The graph neural network generates a high-dimensional vector for the "X Company-ABC" entity pair in the metadata knowledge graph. Combined with the average monthly visits of 2,000 times for this combination in historical queries, the sharding capacity threshold and associated weight are calculated to drive the improved consistent hashing algorithm to route the shards to node clusters adjacent to the physical topology.

[0103] When the distributed retrieval module responds to the query "X company's ABC field bidding information from 2020 to 2023", the LSTM prediction model predicts that the access probability value of the metadata combination is 0.92 based on the historical logs. The retrieval coordinator preferentially accesses the cache shards of the local node and filters the documents in the non-target time interval through the Bloom filter. The causal consistency protocol compares the version vectors during cross-node retrieval and returns 50 globally consistent related document fragments after merging conflict operations. The semantic parsing engine of the result generation module extracts the technical parameters and contract amount entities in the fragments and constructs a weighted semantic graph; the generation model integrates the characteristics of the organization attributes through the multi-head attention mechanism, and outputs a structured response document including a technical indicator comparison table and a time trend chart. The post-processing unit merges the repeated bidding process description paragraphs and finally generates an output file that conforms to the ISO document specification. When the load balancing module monitors the node CPU utilization in real time and exceeds 75%, it triggers elastic migration to migrate 30% of the shard data to the low-load node in parallel. The migration process maintains the query service response time below 500ms through the dual-write controller. After 5 minutes of network interruption, the abnormal recovery mechanism quickly synchronizes the 5 missing operation logs based on Merkle tree difference comparison, allowing the cluster to restore data consistency within 2 minutes.

[0104] The present invention uses a metadata-driven pre-filtering mechanism and a hybrid index structure to coordinate optimization and screen out non-associated data fragments during the index construction phase. The metadata extraction module parses the organization name, timestamp, and technical classification label from the input document, maps them into structured key-value pairs, and injects them into the streaming pipeline; the dynamic index construction module constructs a hybrid index of a skip table and a red-black tree based on the field type. The skip table index achieves fast and accurate matching of discrete fields, and the red-black tree maintains the orderliness of continuous fields to support range queries. When the index is generated, the logical fragmentation strategy unit pre-screens highly relevant fragments based on the semantic relevance of the metadata combination, and excludes data fragments of non-target time intervals and non-associated organizations at the initial stage of retrieval through the pre-filtering mechanism, thereby reducing the number of fragments that need to be traversed in the distributed retrieval phase and reducing redundant computing overhead.

[0105] The intelligent routing module implements hierarchical clustering analysis based on the metadata vector generated by the graph neural network, and generates shard boundary parameters by combining the query heat map and the topological characteristics of the storage node. The improved consistent hashing algorithm introduces a dynamic weight factor for virtual nodes, and routes highly associated shards to physically adjacent nodes. The LSTM prediction model is combined to predict hotspot query patterns and preload cache shards at the target node. This mechanism predicts the query path through semantic relevance, gives priority to accessing the associated shard data of the local node or adjacent nodes, avoids network transmission delays and invalid calculations caused by full shard scanning across nodes, and suppresses the access frequency of noise shards.

[0106] The distributed retrieval module and the result generation module work together to achieve semantic-level noise filtering. The retrieval phase calls the causal consistency protocol to maintain the temporal correctness of cross-node indexes, and the vector clock algorithm merges conflicting operation versions to eliminate interference from expired data; the generation phase fuses metadata features and document semantics through a multi-head attention mechanism, and cross-modal feature weighting suppresses the output of non-related content. The post-processing unit uses the latent Dirichlet distribution model to identify the implicit topic distribution of the response text, merges repeated semantic paragraphs and inserts structured identifiers to generate optimized technical documents. The above three-level collaborative mechanism effectively improves the accuracy and response efficiency of multi-dimensional composite queries through index pre-screening, path optimization and semantic reconstruction.

Claims

1. Metadata-driven intelligent document retrieval and generation system, characterized by: include: A metadata extraction module, used for extracting key fields from input documents and mapping them into structured key-value pairs, and outputting the structured key-value pairs to a streaming pipeline; A dynamic index building module, used for injecting structured key-value pairs into a preset memory buffer, classifying the structured key-value pairs in the preset memory buffer by field type and generating mixed index data, and inputting the mixed index data into a preset logical sharding strategy unit, and the preset logical sharding strategy unit outputs sharding strategy parameters and mixed index data; An intelligent routing module, for receiving mixed index data, calculating the hash value of the primary key field by a preset hash function based on the primary key field in the structured key-value pair generated by the metadata extraction module, logically sharding the mixed index data according to the hash value of the primary key field to obtain sharded index data, generating a mapping relationship table between sharded data and storage nodes by a preset improved consistent hash algorithm, and transmitting the sharded index data to the corresponding storage node according to the mapping relationship table; A distributed retrieval module is used to receive the sharded index data in response to a query request, call a time series prediction model trained based on historical query logs, generate a query probability prediction value for the sharded index data through the time series prediction model, and filter the target shard set in combination with the sharding strategy parameters, and retrieve the associated document fragments of the target shard set from the corresponding storage node according to the mapping relationship table between the shard data and the storage node; The result generation module is used to extract the entity relationship in the associated document fragment through a preset semantic parsing engine to generate a semantic graph structure, splice the node vector of the semantic graph structure with the metadata feature vector in the structured key-value pair, and input it into a multi-head attention model to generate structured response data.

2. The metadata-driven intelligent document retrieval and generation system according to claim 1, characterized in that: The dynamic index building module includes: A data receiving unit, used for receiving structured key-value pairs from the metadata extraction module, and transmitting the metadata key-value pairs of the newly added documents to the difference encapsulation unit through a streaming pipeline; A difference encapsulation unit, used for encapsulating the metadata key-value pair of the newly added document into a difference descriptor including an operation type and a version identifier, and injecting the difference descriptor into a jump table and a red-black tree mixed storage area of ​​a preset memory buffer of a dynamic index construction module; An update unit is used to periodically read the difference descriptors of the memory buffer. The persistent storage form of the mixed index data is a B+ tree index. A gap filling model is used to identify the key value interval gaps of the B+ tree index. The incremental data in the difference descriptor is inserted into the key value interval gaps according to the field type classification, and hierarchically merged with the B+ tree index to generate an updated index structure.

3. The metadata-driven intelligent document retrieval and generation system according to claim 2, characterized in that: The intelligent routing module includes: a sharding decision unit, which is used to receive the mixed index data output by the dynamic index building module, build a metadata knowledge graph based on the structured key-value pairs generated by the metadata extraction module, the metadata knowledge graph includes entity nodes and relationship edges, input the metadata knowledge graph into a preset graph neural network for dynamic embedding to generate a high-dimensional vector representation of the metadata entity, calculate the semantic relevance of the metadata combination based on the cosine similarity between the high-dimensional vector representations, generate a query heat map based on the metadata combination and its query frequency recorded in the historical query log, and generate the shard boundary parameters including the virtual node weight factor and the shard capacity threshold by combining the semantic relevance of the metadata combination with the time window access frequency distribution in the query heat map and the physical proximity relationship in the storage node topology data; A routing execution unit, configured to adjust the mapping density of the virtual node ring according to the virtual node weight factor in the shard boundary parameter, map the metadata primary key hash value to the target physical node through a preset improved consistent hashing algorithm, and optimize the routing path based on the physical proximity relationship in the storage node topology data; The replica pre-distribution unit is used to receive the hotspot probability value output by the long-short-term memory prediction model trained based on historical query logs. When the hotspot probability value exceeds the dynamically adjusted threshold, the creation of a cache shard of the target node is triggered according to the association weight in the sharding strategy parameter. The cache shard includes a data block associated with the hotspot metadata combination.

4. The metadata-driven intelligent document retrieval and generation system according to claim 3, characterized in that: The shard decision unit is also used to: The metadata knowledge graph is input into the preset graph neural network for dynamic embedding to generate a high-dimensional vector representing the semantic relevance of metadata; A bottom-up hierarchical clustering analysis is performed on the high-dimensional vectors, a distance matrix is ​​constructed by calculating the Euclidean distance between clusters, and adjacent clusters are merged according to a dynamically adjusted cluster radius threshold to identify metadata communities with semantic associations; wherein the metadata communities with semantic associations are defined by entity relationship edges in the metadata knowledge graph; The high-dimensional vector of the semantically associated metadata community generated by the hierarchical clustering analysis is used to calculate the vector space distance distribution of the metadata community. The time window access frequency distribution in the real-time query heat map is generated based on the metadata combination and metadata combination query frequency recorded in the historical query log. The physical proximity relationship data in the storage node topology data is collected. A sharding discrimination model based on the machine learning framework is constructed based on the vector space distance distribution of the metadata community, the time window access frequency distribution in the real-time query heat map, and the physical proximity relationship data in the storage node topology data. The sharding discrimination model receives the following input features: A vector space distance distribution of the metadata community; The time window access frequency distribution in the real-time query heat map; The physical proximity relationship data in the storage node topology data; The input features are combined by a feature crossover algorithm, and based on the training data annotated by the historical sharding decision records, a preset importance ranking algorithm is used to screen the key factors affecting the sharding decision; The output includes the shard capacity threshold and the shard boundary decision parameters of the relevance weight, where: The shard capacity threshold is determined by the vector space distance distribution of the clustering results and the physical proximity relationship in the storage node topology data; The relevance weight is dynamically adjusted by the time window access frequency distribution and feature cross-results in the real-time query heat map.

5. The metadata-driven intelligent document retrieval and generation system according to claim 4, characterized in that: The distributed retrieval module is further used for: In the index change operation, a vector tag including a logical timestamp generated by the version controller inside the distributed retrieval module is attached; The partial order relationship of vector labels received by different nodes is compared through the vector clock algorithm to determine the order of operation execution; When the index replica is updated asynchronously, the conflicting operations are version-merged according to the execution order, and the consistency of the merged index replica is checked by the version merging engine in the distributed retrieval module.

6. The metadata-driven intelligent document retrieval and generation system according to claim 5, characterized in that: Also includes: Load balancing module; Receive the storage pressure, network bandwidth and CPU load indicator data collected by the node monitoring agent, and input them into the multi-dimensional weight evaluation model preset in the load balancing module for quantitative calculation; Input the quantization results into the reinforcement learning engine based on the Q-learning algorithm to dynamically generate the sharding weight matrix; According to the weight distribution result of the shard weight matrix, the topological optimal routing path is calculated by the shortest path algorithm, and the routing decision instruction is sent to the query scheduler of the intelligent routing module.

7. The metadata-driven intelligent document retrieval and generation system according to claim 6, characterized in that: The load balancing module is configured to receive implicit association data in the query log through a reverse feedback channel, and write the implicit association data into a graph database of the metadata knowledge graph; The dynamic adjustment module in the load balancing module analyzes the updated associations in the knowledge graph and recalculates the semantic similarity threshold of the metadata shards. When it is detected that the shard load deviates from the balancing threshold, the elastic migration pipeline is triggered to migrate the associated data blocks in parallel according to the topological structure in the storage node topology data. During the migration process, the data change operation logs of the source node and the target node are synchronized through the dual-write controller.

8. The metadata-driven intelligent document retrieval and generation system according to claim 7, characterized in that: The result generation module comprises: The preprocessing unit receives the associated document fragments returned by the distributed retrieval module, extracts entity relationships through the semantic parsing engine, and outputs an annotated semantic graph structure; A text generation unit receives the semantic graph structure, fuses metadata features in the structured key-value pairs in a neural network based on a multi-head attention mechanism, and generates a preliminary response text; The post-processing unit performs prefix aggregation processing on the preliminary response text, identifies implicit topic distribution through a preset latent Dirichlet distribution model, merges response paragraphs of the same topic, and outputs an optimized structured response document.

9. The metadata-driven intelligent document retrieval and generation system according to claim 8, characterized in that: The pre-processing unit is also used for: Based on the preset Node2Vec algorithm, the entities in the metadata knowledge graph are embedded in the graph to generate high-dimensional vector representations. Inputting the high-dimensional vector representation into a similarity calculator, and constructing a semantic adjacency matrix of the document fragment by using a cosine similarity metric; The sliding window processor traverses the semantic adjacency matrix, extracts the periodic association pattern in the time dimension through a preset Fourier transform, and outputs a set of feature vectors with time series tags.

10. The metadata-driven intelligent document retrieval and generation system according to claim 9, characterized in that: It also includes an abnormal recovery mechanism, which includes: The checkpoint generation unit periodically captures the index structure status of the dynamic index building module, generates snapshot files including the B+ tree node distribution, and stores them in the write-ahead log; The difference synchronization controller calls the Merkle tree comparison algorithm during data migration to compare the difference in vector space hash values ​​between the source node and the target node, generate a difference data set and synchronize it to the target node; After the network partition is recovered, the lease coordinator compares the logical timestamp of each node's snapshot file through the version vector, triggers the incremental synchronizer to perform the playback of the missing operation log, and synchronizes the index status of each node through the anti-entropy protocol.

Citation Information

Patent Citations

  • Hybrid indexing method based on big-data model metadata

    CN107273443A

  • Fragmented database routing method, system and device and storage medium

    CN111367884A

  • Indexing for evolving large-scale datasets in multi-master hybrid transactional and analytical processing systems

    CN113874852A

  • Metadata index construction method and device, equipment, storage medium and program product

    CN118939657A

  • Indexing for evolving large-scale datasets in multi-master hybrid transactional and analytical processing systems

    US20200372004A1

Cited By

  • Efficient man-machine interaction method and system combining rule engine and real-time stream processing technology

    CN120335620A

  • Vector database index recommendation method and device, equipment and medium

    CN120336331A

  • Vector database index recommendation method, device, equipment and medium

    CN120336331B

  • Big data archive management full-life-cycle credible traceability data processing method

    CN120408574A

  • Enterprise financial document unified management system and method based on distributed storage

    CN120430878A