A method for constructing a classification index for heterogeneous judicial data
By writing dynamic index words through mutual exclusion interleaving of hash hashing and floating-point feature vectors, constructing multi-branch trees and identifying redundant bits, the problems of joint query latency and high-concurrency writing in judicial data retrieval systems are solved, achieving efficient and stable retrieval and index maintenance.
Patent Information
- Application Number
- CN202610736603.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2046-05-26
AI Technical Summary
In existing judicial data retrieval systems, the separation of structured indexes and vector indexes leads to increased latency in joint queries, fixed quantization bit widths make it difficult to adjust encoding precision, and index maintenance is complex in high-concurrency write scenarios, affecting the real-time performance and stability of the retrieval system.
A hash function is used to process structured attribute labels to generate hash hash codes. A feature extraction model is used to process unstructured data into floating-point feature vectors. Static routing words and dynamic index words are established. Dynamic index words are written through a mutual exclusion interleaving method. A multi-way tree is constructed and redundant bits are identified in the intermediate nodes. A copy-on-write mechanism is used to update the index.
Reduce latency in join queries, improve retrieval efficiency, reduce the risk of data inconsistency, balance storage overhead and retrieval accuracy, and enhance the dynamic maintenance stability of the index structure.
Smart Images

Figure CN122570481B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heterogeneous data index construction technology, specifically a method for constructing a classification index for heterogeneous judicial data. Background Technology
[0002] With the advancement of judicial informatization, a large amount of case data has accumulated in the court's electronic case file system. This data includes both structured attributes such as cause of action, court level, trial level, year of filing, applicable legal provisions, and party type, as well as unstructured or semi-structured content such as judgments, court transcripts, evidence materials, scanned case files, and electronic service records. Structured attributes are typically used for precise filtering and conditional constraints, while unstructured content relies more on semantic understanding and similarity retrieval.
[0003] Existing judicial data retrieval systems typically employ relatively independent indexing methods to handle different types of data. For structured fields such as cause of action, court, year, and trial level, inverted indexes, relational database indexes, or hash indexes are generally created to support exact matching and range filtering. For unstructured texts such as judgments and court records, semantic vectors are usually generated through feature extraction models, and then similarity retrieval is achieved using approximate nearest neighbor indexes or product quantized vector indexes. In practical applications, systems often use either structured filtering followed by vector recall, or vector recall followed by structured conditional filtering, to complete joint queries.
[0004] However, because structured indexes and vector indexes are separate, joint queries require passing candidate results between multiple indexes and performing set intersections, resulting in a long retrieval chain and increased query latency. Furthermore, existing vector indexes typically use a fixed quantization bit width, making it difficult to adjust encoding precision based on data distribution differences across different case file groups. For structured codes that repeatedly appear within the same court level, trial level, or cause of action, there is a lack of effective redundancy identification and space reuse mechanisms, limiting the reconstruction accuracy of semantic vectors under a fixed storage budget. In scenarios with continuous writes and updates, multiple independent indexes need to be maintained separately, easily leading to consistency control and concurrent update overhead, affecting the real-time performance and stability of the judicial retrieval system. Therefore, this invention provides a classification index construction method for heterogeneous judicial data to address the shortcomings of existing technologies. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a classification index construction method for heterogeneous judicial data. This method solves the problem that existing judicial data retrieval technologies typically employ separate indexing techniques when dealing with heterogeneous scenarios where structured attributes and unstructured multimodal data coexist. This leads to multiple index interactions and result set intersections during joint queries, increasing retrieval latency. Furthermore, the fixed vector quantization encoding bit width makes it difficult to balance storage overhead and retrieval accuracy. In high-concurrency write scenarios, the dynamic update and maintenance mechanism of the index is complex, posing performance bottlenecks and the risk of data inconsistency.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The first aspect of this invention provides a method for constructing a classification index for heterogeneous judicial data, the method comprising: S1. Access judicial multimodal case file data containing structured attribute tags and unstructured data; use a hash function to process the structured attribute tags into hash hash codes, and use a feature extraction model to process the unstructured data into floating-point feature vectors; S2. Establish separate static routing words and dynamic index words for the aforementioned multimodal judicial case file data; S3. Based on the bit space preset for structured information and vector information, the hash code and the quantization code generated after quantizing the floating-point feature vector are written into the logical bit space of the dynamic index word in a mutually exclusive interleaving manner. S4. Construct a multi-branch tree addressing path based on the static routing word, and encapsulate the isomorphic state information of the intermediate nodes of the multi-branch tree and the child node reference array into a snapshot descriptor; S5. When the intermediate nodes of the multi-way tree meet the preset isomorphic conditions, identify the redundant scalar bits due to the consistency of structural attributes, generate residual quantization codes representing the difference between the floating-point feature vector and the initial quantization center, and use a copy-on-write mechanism to replace the physical space occupied by the redundant scalar bits with vector residual bits used to store the residual quantization codes. S6. Respond to the retrieval request, compile the request into a query mask set, perform pushdown pruning along the multi-branch tree path, and perform batch distance calculation at the leaf nodes using the aligned decoding buffer. Finally, output the retrieval results that have passed hash collision verification.
[0007] In one embodiment of the present invention, when the unstructured data is judicial document text, the feature extraction model is a Transformer model based on the BERT architecture, and the floating-point feature vector is the hidden state vector corresponding to a specific token in the output of the last encoder layer of the model.
[0008] Furthermore, establishing separate static routing words and dynamic index words for the judicial multimodal case file data includes: initializing and maintaining a fixed-length memory allocator aligned to cache line boundaries; allocating a static routing word and a dynamic index word for each piece of judicial multimodal case file data, wherein the storage space for the dynamic index word is requested from the fixed-length memory allocator, and the bit width of both the static routing word and the dynamic index word is set to 512 bits.
[0009] Furthermore, the mutually exclusive interleaving write operation includes: defining a structured mask, a vector initial quantization mask, and a reserved check mask to ensure that the bit spaces of the three are not intersecting pairwise, and that their union covers the bit space of the dynamic index word; respectively calling the non-contiguous bit assembly function, and writing the hash code and quantization code into the non-contiguous target bits of the dynamic index word according to the layout of the structured mask and the vector initial quantization mask.
[0010] Furthermore, the non-contiguous bit assembly function is implemented by detecting the instruction set support status of the central processing unit. If the BMI2 instruction set is detected, the PDEP hardware instruction is called to perform the bit assembly operation.
[0011] Furthermore, constructing a multi-way tree addressing path using the static routing word includes: segmenting the effective bit width of the static routing word from high to low bits according to a preset fixed bit step size to generate bit segments; and traversing the multi-way tree in the... At the hierarchical level, extract the corresponding first character from the static route word. The bit segment; the extracted bit segment Each bit segment is converted into an integer index value, and the integer index value is used as the physical index offset of the child node reference array of the current intermediate node to determine the mount path.
[0012] Furthermore, the isomorphic state information encapsulated in the snapshot descriptor includes an isomorphic bitmask and a release bitmask. The isomorphic bitmask is generated by performing a bitwise OR aggregation operation on the static routing words of all mounted data under the current node. If the bitwise AND result of a certain bit is equal to the bitwise OR result, then the corresponding bit position of the isomorphic bitmask is 1. The release bitmask is generated by performing a bitwise AND operation on the isomorphic bitmask and the structured mask of the epoch to which the current node belongs.
[0013] Furthermore, the isomorphic conditions satisfied by the intermediate node include: the number of judicial case file data samples directly mounted under the node reaches a preset scale threshold; and the size of the freeable bit space calculated by performing a group bit counting function on the free bit mask in the node snapshot descriptor is not less than the bit width of the smallest codebook in the global multi-scale residual codebook pool.
[0014] Furthermore, the process of dynamically replacing the redundant scalar bits with vector residual bits also includes: recording recovery information containing pointers to the old and new snapshot descriptors and the address of the newly allocated data block through a write-ahead log record; after confirming that the log has been written to disk, calling the compare and exchange atomic instruction to atomically modify the pointer in the parent node that points to the old snapshot descriptor to a pointer that points to the new snapshot descriptor.
[0015] Furthermore, the process of compiling the retrieval request into a query mask set includes: hashing the structured query conditions in the retrieval request to generate a basic hash code; and synchronously compiling the basic hash code into a query word that adapts to the mask layout version based on a global version registry that records all valid mask layout versions, thereby forming a query mask set.
[0016] Furthermore, the calculation of the physical index offset is represented by the following bitwise operation formula: ; in, In the first The sub-branch index number at the intermediate node of the layer. For static routing words, This represents the total effective bit width of the static routing word. The current tree level depth. Use a fixed bit step size.
[0017] Furthermore, the process of pruning down the multi-branch tree is implemented through the following branch removal rules: ; in, It is related to the current node epoch version. Aligned query words, It is a static routing word representing a piece of data within a node. It is the isomorphic bitmask of the current node; if the result of the operation is not a string of all zero bits, the intermediate branch is discarded.
[0018] Furthermore, before performing batch distance calculation at the leaf nodes, the process includes: calling a parallel bit extraction instruction to extract residual quantization codes and initial quantization codes from the dynamic index word based on the residual-specific positioning mask and the vector initial quantization mask, and then converging them into the alignment decoding buffer.
[0019] Furthermore, before the batch distance calculation, a feature reconstruction step is included, which synthesizes an approximate feature vector for distance measurement by adding the basic cluster center vector corresponding to the initial quantization encoding and the residual cluster center vector corresponding to the residual quantization encoding.
[0020] A second aspect of the present invention provides a classification index construction system for heterogeneous judicial data, comprising: The data parsing module is used to access multimodal judicial case file data, convert structured attribute tags into hash hash codes, and convert unstructured data into floating-point feature vectors. The memory management module is used to establish separate static routing words and dynamic index words for the judicial multimodal case file data; The mask compilation and bit interleaving module is used to write the hash code and the quantization code generated after quantizing the floating-point feature vector into the fixed-length logical bit space of the dynamic index word in a mutually exclusive interleaving manner. The dynamic reorganization module is used to dynamically replace redundant scalar bits generated due to consistent structural attributes with vector residual bits for storing residual quantization encoding when the intermediate nodes of a multi-way tree meet the isomorphic condition. The retrieval query module is used to respond to retrieval requests, prune branches down the multi-branch tree, perform batch distance calculations at leaf nodes, and output retrieval results that have passed hash collision verification.
[0021] In one embodiment of the present invention, the dynamic reorganization module is further configured to monitor the homogeneous redundancy state of intermediate nodes of a multi-way tree, encapsulate the state and child node reference array into a snapshot descriptor, and perform dynamic replacement based on write-ahead log and copy-on-write mechanism, and publish the updated snapshot descriptor by calling comparison and exchange atomic instructions.
[0022] Furthermore, the retrieval query module is also used to compile the retrieval request into a set of query masks adapted to different layout epochs in the index, and introduce an alignment decoding buffer in the leaf node to perform distance measurement and hash collision verification through batch bit extraction and vector instructions.
[0023] Furthermore, the mask compilation and bit interleaving module is also used to detect the instruction set support status of the central processing unit. When the BMI2 instruction set is supported, the PDEP hardware instruction is called to perform bit interleaving writing; when it is not supported, a software lookup table is used to achieve the equivalent function.
[0024] This invention provides a method for constructing a classification index for heterogeneous judicial data. It has the following beneficial effects: 1. This invention unifies the hash encoding generated from structured attribute tags and the vector quantization encoding generated from unstructured data into a dynamic index word, and uses mutual exclusion masks and bit interleaving for storage. This allows structured search conditions and semantic vector search information to be organized and accessed within the same index structure. Compared to building structured indexes and vector indexes separately, this reduces the overhead of multiple index accesses, result set intersection, and secondary filtering during joint queries, which helps reduce the overall latency in the retrieval of heterogeneous data in judicial case files.
[0025] 2. This invention utilizes static routing words to construct multi-branch tree addressing paths and maintains isomorphic bitmasks and release bitmasks at intermediate nodes, performing pushdown pruning on nodes that have achieved consistent structured attributes. During retrieval, the system can eliminate branches that do not meet the structured query conditions before entering leaf nodes, thereby reducing the amount of data that needs to participate in vector distance calculations and improving retrieval execution efficiency.
[0026] 3. When intermediate nodes meet the isomorphic condition, this invention converts redundant scalar bits generated due to consistent structured attributes into residual quantized encoding storage space, and publishes new snapshot descriptors through copy-on-write, write-ahead logging, and compare-and-swap atomic instructions. This approach improves the accuracy of vector approximation reconstruction without increasing the total bit width of a single index word, while reducing the risk of data inconsistency during concurrent updates, enabling the index structure to balance storage overhead, retrieval accuracy, and dynamic maintenance stability. Attached Figure Description
[0027] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a flowchart of the method steps of the present invention; Figure 3 This is a schematic diagram of the data parsing and feature extraction process according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the memory management and initialization structure according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the principle of dynamic index word interleaving writing according to an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the structural principle of multi-branch tree addressing and snapshot encapsulation according to an embodiment of the present invention; Figure 7 This is a timing flowchart of node dynamic reassembly and bit width permutation according to an embodiment of the present invention; Figure 8 This is a schematic diagram illustrating the structural principle of retrieval query and distance calculation according to an embodiment of the present invention.
[0028] Among them, 100 is the data parsing module; 200 is the memory management module; 300 is the mask compilation and bit interleaving module; 400 is the dynamic reassembly module; and 500 is the retrieval and query module. Detailed Implementation
[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] See attached document Figure 1 , Figure 1 This is a system architecture diagram according to an embodiment of the present invention. The present invention provides a classification index construction system for heterogeneous judicial data, comprising: The data parsing module 100 is used to access multimodal judicial case file data. The data parsing module 100 utilizes a preset hash mapping and feature extraction model to convert structured attribute labels into hash codes and unstructured multimodal data into floating-point feature vectors.
[0031] The memory management module 200 is connected to the data parsing module 100. The memory management module 200 allocates static routing words and dynamic index words for multimodal judicial case file data, decoupling the static routing words and dynamic index words at the physical and logical levels. The memory management module 200 initializes and maintains a fixed-length memory allocator aligned to cache lines, while also maintaining a global multi-scale residual codebook pool.
[0032] The mask compilation and bit interleaving module 300 is connected to the memory management module 200. The mask compilation and bit interleaving module 300 is used to maintain the global mask layout epoch. Based on processor microarchitecture detection, the module 300 calls bit manipulation instructions or software lookup tables to mutually exclusive interleave the hash code and the quantization code corresponding to the floating-point feature vector into non-contiguous target bits in the fixed-length logical bit space of the dynamic index word.
[0033] The dynamic reassembly module 400 is connected to the mask compilation and bit interleaving module 300. The dynamic reassembly module 400 monitors the homogeneous redundancy status of the index multi-way tree nodes. Based on a write-ahead log and copy-on-write mechanism, the dynamic reassembly module 400 performs dynamic physical permutations of scalar bits to vector residual bits. The dynamic reassembly module 400 calls compare and swap atomic instructions to publish node snapshot descriptors and freezes the homogeneous routing boundaries of released nodes.
[0034] The retrieval query module 500 is connected to the dynamic reassembly module 400. The retrieval query module 500 receives retrieval requests and compiles them into a set of query masks adapted to different layout epochs. The retrieval query module 500 introduces an alignment decoding buffer at the leaf nodes and performs distance metric and hash collision verification through batch bit extraction and vector instructions.
[0035] See attached document Figure 2 , Figure 2 This is a flowchart of a method according to an embodiment of the present invention. The present invention provides a method for constructing a classification index for heterogeneous judicial data, comprising the following steps: S1, accesses judicial multimodal case file data, uses a preset hash mapping and feature extraction model to convert structured attribute labels into hash hash codes, and converts unstructured multimodal data into floating-point feature vectors; S2, request memory from the fixed-length memory allocator, establish a separate static routing word and dynamic index word architecture for judicial multimodal case file data, and initialize the global multi-scale residual codebook pool; S3, divide the Boolean mutually exclusive bit space, and use bit manipulation instructions to write the hash code and the quantization code corresponding to the floating-point feature vector into the non-contiguous target bits in the fixed-length logical bit space of the dynamic index word through mutual exclusion interleaving. S4. Use static routing words to establish multi-way tree addressing paths, and encapsulate the isomorphic state of the intermediate nodes of the multi-way tree and the child node reference array into a snapshot descriptor. S5, when the intermediate nodes of the multi-way tree satisfy the isomorphism condition, uses the global multi-scale residual codebook pool to generate residuals, performs comparison and atomic switching after writing the log to disk through write-ahead, and dynamically replaces scalar bits with vector residual bits. S6 compiles the retrieval request into a set of query masks adapted to different layout epochs and pushes down the multi-branch tree for pruning. At the leaf nodes, it performs batch distance calculation by aligning the decoding buffer and outputs the retrieval results after hash collision verification.
[0036] See attached document Figure 3 , Figure 3 This is a schematic diagram of a data parsing and feature extraction process according to an embodiment of the present invention. In this embodiment, the specific implementation of step S1 may include: The data parsing module 100 receives externally input multimodal judicial case file data. This multimodal judicial case file data can be mathematically defined as a dataset. Among them, any judicial multimodal case file data Both consist of two parts. Here This is a structured set of attribute tags, containing multiple discrete descriptive tags for the case file, such as the cause of action, the court hearing the case, and the identities of the parties involved; while This refers to raw, unstructured data, such as court transcripts and images of evidence.
[0037] The data parsing module 100 is internally equipped with a structured attribute processing unit and an unstructured feature extraction unit.
[0038] The structured attribute processing unit processes the set of structured attribute tags. The data is processed to generate a fixed-width hash code, and the normalized tag ID corresponding to each structured attribute tag is persistently written into the case file metadata as the basis for subsequent accurate verification of hash collisions. In this embodiment, the structured attribute processing unit calls a preset, deterministic hash function. For structured attribute tag sets Different tag types in the data are normalized, mapped, and compressed to obtain a structured encoded string composed of multiple field codes. The structured encoded string It should include at least one or more of the following: case type code, court level code, year of filing code, and applicable legal provision code. This process can be represented by the following formula: ; in, It is the set of structured attribute tags input. It is a hash function. This is the output hash code. Hash function. For the choice of hash encoding, those skilled in the art can employ various industry-known implementations, such as MurmurHash or CityHash, whose specific implementations are well-known technologies in the field and will not be elaborated upon here. The bit width is determined by the size of the bit space reserved for structured attributes in the subsequent dynamic index word, and the two remain consistent.
[0039] The unstructured feature extraction unit then processes the original unstructured data. The process involves converting the data into a floating-point feature vector and its corresponding quantization code. This process further includes: The unstructured feature extraction unit utilizes a pre-trained deep learning feature extraction model. Transform the raw unstructured data Transform into a high-dimensional floating-point feature vector This process can be represented by the following formula: ; in, It is the input raw unstructured data. It is a feature extraction model. It is output. 3D floating-point eigenvectors, i.e. .
[0040] As a preferred method, when When it is a legal document text, The specific implementation is a Transformer model based on the BERT architecture. This model contains multiple encoder layers, each consisting of a multi-head self-attention mechanism and a feedforward neural network. During processing, the input is the legal document text. First, the tokens are segmented and a special token (such as [CLS]) is added. Then, they are input into the BERT model, and the final output is a floating-point feature vector. It is the hidden state vector corresponding to the [CLS] token in the output of its last encoder layer, and its dimension is... It is usually 768.
[0041] To better adapt this BERT model to the judicial domain, it can be fine-tuned based on a general pre-trained model using a large number of labeled judicial documents. The fine-tuning process targets the cross-entropy loss function and uses existing labels on the judicial documents (such as case type) as supervision signals, thereby improving the vector representation learned by the model. It can capture the semantic information of judicial texts more accurately.
[0042] Obtaining this high-dimensional floating-point feature vector Subsequently, the unstructured feature extraction unit performs a product quantization operation on it to generate a quantization code that matches the bit space reserved for vector information in the dynamic index word. Specifically, 3D floating-point eigenvectors Divided along the dimension There are n subvectors, each with dimension n. .
[0043] For each sub-vector space, the system utilizes a containing The pre-defined codebooks for each cluster center are quantized, meaning the cluster center of the codebook closest to the given sub-vector is found, and the index ID of that cluster center is recorded. Finally, the... The indices ID of each subvector are concatenated to form the final quantization code. This process can be represented as: ; in, It is the input floating-point feature vector. Represents the product quantization function. This is the output quantization encoding. Here... and These are all preset hyperparameters, and their values are determined based on a trade-off between system storage overhead and quantization accuracy loss.
[0044] The data parsing module 100 will generate a hash encoding. With quantization coding Output to memory management module 200 for subsequent double-word architecture allocation and memory initialization.
[0045] See attached document Figure 4 , Figure 4 This is a schematic diagram of memory management and initialization according to an embodiment of the present invention. In this embodiment, after feature extraction of judicial multimodal case file data is completed, the memory management module 200 executes step S2, the specific implementation of which may include: During the system initialization phase, the memory management module 200 builds and maintains a dedicated fixed-length memory allocator. This design aims to effectively alleviate memory fragmentation and performance jitter caused by repeated calls to the operating system's standard memory allocation functions during high-frequency data operations.
[0046] As a preferred approach, the fixed-length memory allocator is implemented as a Slab allocator. During system startup, the memory management module 200 requests one or more large, contiguous virtual address spaces or optional large page memory regions from the operating system and organizes them into Slabs. These Slabs are then pre-divided into several memory blocks of equal size.
[0047] To improve hardware affinity for data access, the starting address of each memory block is aligned to the CPU's cache line boundary, which is typically a multiple of 64 bytes in modern x86 architecture processors. This alignment strategy effectively avoids cache line misses and performance penalties caused by false sharing during multi-core concurrent access. The memory management module 200 tracks the allocation status of these memory blocks by maintaining a bitmap or free list, thereby transforming memory allocation and deallocation operations into efficient internal pointer or bit operations, avoiding expensive system calls.
[0048] After the memory allocator is ready, the memory management module 200 receives the hash code output by the data parsing module 100. With quantization coding At that time, for each piece of multimodal judicial case file data Establish a phase-separated two-word architecture, which includes a static routing word. and a dynamic index .
[0049] In this embodiment, in order to match the memory block aligned with the aforementioned cache line, the bit width of these two words is... All are set to 512 bits (64 bytes). Static routing word Its content remains unchanged after creation, dedicated to subsequently building stable, immutable multi-way tree routing paths. Dynamic index word Then, a memory block is requested from the fixed-length memory allocator for storage, and its contents will be updated through copy-on-write during the subsequent dynamic reorganization process.
[0050] To ensure concurrent and secure data updates, the system updates each dynamic index key. A logical reference identifier was established. This identifier is a persistent and stable identifier, such as an offset in a persistent storage file. It forms an indirect layer for data access: the system locates data through this logical reference identifier. During runtime, the memory management module 200 maintains a mapping table for... Dynamic parsing as The current runtime access pointer or virtual address in memory.
[0051] To support efficient dynamic reorganization operations in subsequent steps, the memory management module 200 also offline constructs a global multi-scale residual codebook pool during the system initialization phase. The construction of this codebook pool avoids computationally intensive dynamic clustering training during periods of high system write load. In this embodiment, the codebook pool... The structure is a set of multiple independent codebooks, which can be represented as: ; in, It is a preset set of bit width specifications. As an example, its values can be: These values represent the different residual quantization precision levels supported by the system. For each bit width in the set... , It is the corresponding residual codebook, which itself contains Cluster centers.
[0052] These codebooks are pre-generated through cluster analysis of a large-scale, domain-specific vector dataset, rather than being dynamically trained at runtime. Specifically, for each bit-width specification... Each codebook was trained independently using the K-Means clustering algorithm. The specific implementation of the K-Means algorithm is well-known in this field and will not be elaborated upon here. In this way, when the system needs to perform subsequent adjustments... When performing residual quantization of bits, it can be directly obtained from... Search and reuse pre-trained codebooks This transforms the reorganization operation into an efficient table lookup process.
[0053] See attached document Figure 5 , Figure 5 This is a schematic diagram illustrating the principle of dynamic index word bit-interleaving writing according to an embodiment of the present invention. In this embodiment, after allocating a double-word architecture for judicial multimodal case file data, step S3 is executed by the mask compilation and bit-interleaving module 300. Its specific implementation may include: For a single fixed-width dynamic index word It can accommodate structured hash codes from different sources and with different meanings without conflict. With vector quantization coding The mask compilation and bit interleaving module 300 constructs a mutually exclusive mask layout system. In this embodiment, for a bit width of... The dynamic index word is defined by the system as having three bits of equal width. Mask: Structured mask Vector initial quantization mask and reserved verification mask Structured mask Bits with a median value of 1 are specifically used for storage. Vector initial quantization mask Bits with a median value of 1 are specifically used for storage. Reserved verification mask This leaves room for future dynamic restructuring.
[0054] To ensure that any bit is assigned only a single data meaning at any given time, the layout of the mask above needs to follow the following Boolean algebra constraints: ; ; ; ; in, This represents a bitwise AND operation. This represents a bitwise OR operation, where 0 represents a string of all zero bits. Representing a string of all-one bits, this constraint logically guarantees that the bit spaces of the three elements are mutually exclusive, and their union completely covers the entire dynamic index word.
[0055] After establishing the mask layout, the system needs to fill the continuous encoded string into the non-contiguous specified bits within the dynamic index word. In principle, this process maps the input bit stream to specific offset positions in the target memory word according to the valid bit flags set in the mask, while keeping the positions marked as invalid bits as zero.
[0056] Mask compilation and bit interleaving module 300 call to non-contiguous bit assembly function This function receives a continuous source encoded string. With target mask To avoid logical dead zones caused by data overflow or truncation, the source encoded string is required to be... The effective bit length must not exceed the mask. The total number of bits with a binary value of 1; before performing the write operation, if the source encoded string exists... If the length is insufficient, the system will trigger alignment preprocessing logic, that is, in the source encoded string... The high-order bits are automatically padded with zeros to a length that matches the number of valid bits in the mask.
[0057] As a preferred approach, the underlying execution logic of this non-contiguous bit assembly function relies on dynamic probing of hardware features. Upon system startup, the mask compilation and bit interleaving module 300 queries the CPUID instruction set support status of the central processing unit. If the probing result indicates support for the BMI2 instruction set, then... The functions are directly mapped to the hardware-native PDEP instructions, accelerating bit assembly through hardware bit-push. When the dynamic index word width exceeds the processor's single machine word width, the system segments the dynamic index word according to the machine word width and performs PDEP or equivalent software bit-push operations on each segment. If the underlying hardware does not support this instruction set, the system downgrades to a software simulation path, using a pre-built lookup table in conjunction with shift and bitwise OR operation sequences to achieve equivalent functionality, ensuring the algorithm's portability.
[0058] Final dynamic index The generation process involves merging the structured encoding and quantization encoding, respectively, by writing them into a dedicated bit space using the aforementioned bit manipulation instructions. The calculation formula is expressed as: ; in, and These are the structured hash code and its corresponding mask, respectively. and These are vector quantization codes and their corresponding masks. Static routing words. This logic is also reused, based on the macroscopic structured encoding and its routing mask bit interleaving writing, which is used to construct the subsequent tree index addressing path.
[0059] See attached document Figure 6 , Figure 6 This is a schematic diagram illustrating the structure of multi-branch tree addressing and snapshot encapsulation according to an embodiment of the present invention. In this embodiment, after the bitwise interleaving of data features is completed, the dynamic reassembly module 400 executes step S4 to construct a tree index. Specific implementation details include: The dynamic reorganization module 400 calls its internal multi-branch tree construction unit to construct a multi-branch tree addressing path based on the static routing words generated in the previous steps. This construction process significantly reduces the time overhead of a single routing by segmenting the long macroscopic structured encoding into multiple local array offsets along the tree structure from top to bottom, thus transforming the conventional one-time global key-value comparison into multiple local array offsets along the tree structure from top to bottom.
[0060] In this embodiment, static routing words As the unique and immutable identifier of case file data in the logical space, its contained macroscopic structured coded segments are directly used as the basis for addressing rules for dividing multi-way tree node levels and branch paths. Multi-way tree construction units follow a preset fixed bit step size. The effective bit width of the static routing word is logically sliced from the most significant bit to the least significant bit. The fixed bit step size is used here. This is a preset system hyperparameter, whose value is determined based on the trade-off between the memory block size caused by the number of branches in a single-level node and the maximum retrieval depth of the entire tree. It is usually set to 4 or 8.
[0061] When a new judicial case file needs to be inserted into the index tree, the system performs a level-order traversal starting from the root node of the multi-way tree. For the first... At the hierarchical level, the system extracts the corresponding first level from the static route word through bit operations. Each bit segment is converted into a decimal integer and directly mapped to the physical index offset in the current node's child node reference array. This addressing process is precisely represented by the following bitwise operation formula: ; in, Representative at the Sub-branch index number at the intermediate node of the layer; Indicates the total effective bit width of a static routing word; This represents the depth of the current tree level, and its value is limited by the total bit width and the slice step size. This boundary constraint eliminates the algorithm dead zone caused by negative displacement values leading to undefined hardware behavior. This is the right shift operator; This is the bitwise AND operator; This is the left shift operator; This indicates the floor function.
[0062] As judicial data is continuously mounted to corresponding nodes along the addressing path, the data distribution under the jurisdiction of intermediate nodes will dynamically evolve. To manage this evolution process and support lock-free updates in a high-concurrency environment, the snapshot management unit built into the dynamic reorganization module 400 encapsulates the current layout state of intermediate nodes into an independent data structure, namely, a snapshot descriptor. The snapshot descriptor, as the operational entity of the copy-on-write mechanism, remains contiguous and read-only in the physical memory space.
[0063] As a preferred approach, a snapshot descriptor for node layout. Internally, it encapsulates several core fields to accurately describe the node state. The primary field is the isomorphic bitmask. This is used to mark the bit range in which all subordinate case files under the jurisdiction of the current intermediate node have maintained consistency in structured attributes.
[0064] Regarding the specific generation logic of the isomorphic bitmask, the system dynamically maintains a bitwise AND aggregation value and a bitwise OR aggregation value for all mounted data static routing words within the current node. The bitwise AND result at a certain bit position is equivalent to the bitwise OR result if and only if that bit position remains consistent across all mounted data. In this case, the isomorphic bitmask... The corresponding bit is then set to 1. This screening logic, based on strict Boolean algebra, effectively avoids false positives and false negatives in attribute determination. Another field logically related to this is the release bitmask. It is used to identify the corresponding information redundancy caused by attribute isomorphism, thereby defining the boundary of the available bit space that can be safely released and used to store the precision of subsequent vector residuals. At the underlying logic level, the system uses isomorphic bit masks... The structured mask of the current node's epoch The release bitmask is generated by performing a bitwise AND operation, i.e., the calculation formula is: This operation can accurately filter out redundant bits that belong to the structured coding range and have achieved isomorphism at the current node, and mark their physical location as freeable.
[0065] In addition to the mask identifiers mentioned above, snapshot descriptors Internally, a residual codebook identifier is also defined. , child node physical reference array , and data block reference collection The isomorphic bit takes values Used for recording The common values of the isomorphic structured bits identified within the subtree of this node are used for precise comparison with the query conditions during the query phase. The residual codebook identifier records the specific number of the global multi-scale residual codebook bound to the node when isomorphic spatial permutation occurs, ensuring that the system can correctly address the corresponding codeword during the retrieval and decoding phase. The child node physical reference array is a fixed-length array... The pointer list internally stores reference labels pointing to the physical memory addresses of the snapshot descriptors of each child node in the next level.
[0066] During system operation, when the relevant attributes of the intermediate node change, the snapshot management unit does not modify the data in the old memory address in place. Instead, it requests a new memory block from the fixed-length memory allocator and assembles it into a new snapshot descriptor object according to the changed state. This prepares for complete data isolation at the data level for subsequent calls to atomic comparison swap instructions to perform pointer replacement.
[0067] See attached document Figure 7 , Figure 7 This is a timing flowchart of node dynamic reorganization and bit-width permutation according to an embodiment of the present invention. In this embodiment, after constructing a preliminary multi-branch tree structure, the dynamic reorganization module 400 executes step S5. This step improves the fineness of feature representation without increasing the total memory overhead by converting the redundant storage space occupied by the same structured attributes within nodes into the precision space for storing vector residuals.
[0068] The dynamic reorganization module 400 continuously monitors the status of each intermediate node in the multi-way tree to identify and trigger bit-width replacement operations. In this embodiment, intermediate nodes must meet two dependent triggering conditions to perform bit-width replacement. To avoid performing high-cost reorganization on sparse nodes with unstable data distribution, the number of judicial case file data samples directly attached to the node must reach a preset scale threshold. The threshold The value is usually determined based on a comprehensive evaluation of the system's computational overhead for reorganization and the gains in retrieval accuracy, and its engineering value range is generally between 128 and 512.
[0069] Once the sample size requirement is met, the system utilizes the population bit counting function natively supported by the hardware. Release bitmask in compute node snapshot descriptor The number of significant digits, i.e. Here The size of the freed redundant bit space must be greater than or equal to the global multi-scale residual codebook pool. The minimum bit width of the codebook ensures that the permutation operation brings substantial accuracy gains.
[0070] Once the above triggering conditions are met, the dynamic reorganization module 400 initiates a reorganization process based on copy-on-write. The system then determines the size of the free space. Global multi-scale residual codebook pool Internal selection of optimal codebook .
[0071] As a preferred approach, the codebook selection strategy is to select codebooks based on the following conditions: From the codebook set, select the bit width The target codebook with the largest value. Determine the specific bit width. Then, the system releases the bitmask. Mark out the valid bits marked Each bit is defined as the residual-specific positioning mask of the current node in the new epoch. To generate residual data, the system reads the judicial case file data under this node from the underlying persistent storage. The corresponding original high-dimensional floating-point feature vector Based on the initial quantization code stored in the index, the initial cluster center vector is reconstructed by looking up a table. After obtaining these two basic data points, the residual vector... The calculation can be performed using the following formula: ; in, The calculated residual vector, This is the original high-dimensional floating-point feature vector. This is the initial cluster center vector.
[0072] System call selected codebook For residual vector Perform a requantization operation to generate a length of Bit residual quantization coding After quantization is complete, the system's self-defined long memory allocator requests new memory blocks for each data entry, and uses a non-contiguous bit assembly function to quantize and encode the fixed structured information and the newly generated residuals. Write it according to the updated mask layout. This updated mask layout includes the newly introduced residual-specific positioning mask. The redundant structured mask markers that previously occupied these bits are removed accordingly, thus achieving a seamless handover of the logical bit space. A new snapshot descriptor is also created simultaneously, internally updated to reference the new dynamic index word and recording the residual codebook identifier used. .
[0073] After all new data blocks and snapshot descriptors are constructed in memory, the system introduces a write-ahead log combined with atomic instructions to ensure concurrency safety. The system appends log entries containing key recovery information, including pointers to the old and new snapshot descriptors and addresses of newly allocated data blocks, to the write-ahead log file and then calls a disk flush command to force the write to the physical storage medium. After confirming successful log writing to disk, the system performs a core pointer switch, using a single-point compare and swap instruction to atomically change the parent node's pointer from pointing to the old snapshot descriptor to pointing to the new snapshot descriptor. This timing arrangement ensures the recoverability of data structures under extreme crash scenarios.
[0074] A successful bit-width permutation by an intermediate node means that its structured routing boundary is permanently frozen, and the isomorphic bitmask is used. It transitions to an immutable state. For newly inserted case data that theoretically belongs to this node but disrupts existing isomorphic conditions, the system executes an outlier diversion defense mechanism. Such data that disrupts the isomorphic boundary is identified as an outlier sample. The system no longer triggers reverse reorganization for the current node, but instead forcibly guides it to a preset outlier node at the same level as the current node for isolation and containment, thereby maintaining the efficient addressing structure of the optimized node.
[0075] See attached document Figure 8 , Figure 8 This is a schematic diagram illustrating the structural principle of retrieval query and distance calculation according to an embodiment of the present invention. In this embodiment, after the dynamic reorganization and data mounting of the multi-branch tree are completed, the retrieval execution module 500 executes step S6 to respond to the externally input joint retrieval request and output accurate results. This step maps the query operation in the high-dimensional space to low-level hardware-friendly bit operations and batch calculations, thereby achieving low-latency accurate recall in an index structure where multiple version masks coexist.
[0076] Given that the system continuously performs bit-width permutations during dynamic operation, node data from different mask layout epochs often coexist within the multi-way tree. To address this heterogeneous state, the retrieval execution module 500 calls its internal version compilation unit to process the joint retrieval request. In this embodiment, the joint retrieval request includes structured query conditions and unstructured query vectors to be compared. The system maintains a global version registry in memory, which fully records all mask layout versions currently active in the runtime environment, including the structured masks corresponding to each version. ,in Represents the version era number.
[0077] The version compilation unit hashes the structured query conditions into basic hash codes upon request. Based on the global version registry, this basic hash code is then synchronously compiled into a set of query masks adapted to multiple mask layouts. In specific implementation, this is applied to any live version. The system uses a non-contiguous bit assembly function to construct a query word for a specific epoch, and its operation can be represented as: ; The generated cross-version query set forms a unified comparison benchmark for subsequent tree traversal operations.
[0078] After establishing a unified comparison benchmark, the traversal and pruning unit built into the retrieval execution module 500 initiates a pushdown search from the root node of the multi-branch tree. When traversing to any intermediate node, the system needs to determine whether the current query conditions match the data feature space governed by that node. Before making this determination, to ensure that the query mask version is strictly aligned with the current node layout, the traversal and pruning unit reads the epoch version number from the current node's snapshot descriptor. Based on this, the corresponding version of the query term is extracted from the query term set. .
[0079] As a preferred approach, the system extracts the isomorphic bitmask recorded in the node snapshot descriptor. Combine the static routing words of any representative data within the node This involves performing bitwise pruning based on hard logic. The core judgment formula for this branch removal rule is: ; in, This is the bitwise XOR operator. For bitwise AND operator, This represents a string of all zero bits. This formula determines whether there is a difference between the query word and the node's static routing word within the homogeneous bit range. If the result is not a string of all zero bits, it indicates that the query conditions conflict with the node's fixed homogeneous attributes, and the system immediately removes the intermediate branch and all child nodes attached to it.
[0080] For addressing paths that are effectively pushed down to the leaf node level, the system needs to perform vector feature recovery on the dynamic index words stored within the node for spatial distance calculation. To overcome the memory access bottleneck caused by bit-by-bit decoding in discrete memory, the decoding calculation unit inside the retrieval execution module 500 allocates a contiguous aligned decoding buffer in the CPU's L1 cache. The starting address of this buffer is forcibly aligned according to the CPU's standard cache line boundaries.
[0081] Facing the dynamic index under the leaf node The decoding computing unit invokes the hardware architecture's native parallel bit extraction instructions to perform batch-level information extraction. This extraction process is handled by the extraction function. The implementation, its function is based on the input mask The bit that is 1 in the middle will be the source data. The corresponding discrete bits are continuously aggregated and output. The system extracts residual codes respectively. With initial quantization encoding ,in and These are dedicated positioning masks assigned to the residual and initial quantization under the current node layout. This parallel bit extraction instruction can compactly arrange non-contiguous bits into the alignment decoding buffer within a single clock cycle, effectively avoiding the execution cycle delay caused by high-frequency shift instructions.
[0082] After the relevant encoding and alignment decoding buffer are ready, the decoding computation unit performs feature reconstruction based on the residual codebook identifier recorded by the node snapshot descriptor. The specific feature recovery principle is manifested as an additive reconstruction process, that is, the system performs initial quantization encoding... The corresponding basic cluster center vector With residual coding The corresponding residual cluster center vector By adding them together, an approximate feature vector for distance measurement is synthesized. The reconstruction formula is expressed as: ; System calls to the Single Instruction Multiple Data Extended Instruction Set concurrently execute query vectors and reconstruct vector groups within a buffer. The system calculates the distance between data points. After batch measurement, the system categorizes data that meet the preset distance threshold into the approximate recall set. This distance threshold is generally based on the business's requirement for a balance between recall and precision, and is empirically calibrated through offline replay testing of historical search logs.
[0083] Considering the inherent collision probability of hash reduction mechanisms, the system performs final-precision hash collision verification on the approximate recall set. This logic involves reading the uncrunted original hash identifier associated with each data point in the recall set at the underlying persistence layer and performing a strict bit-by-bit equality comparison with the original hash mapped from the retrieval request. Only if the original hashes match completely is the corresponding case file data confirmed as a valid recall and output as the retrieval result. The specific generation mechanism of the hash value and the underlying interface call mode of the SIMD instruction set can be implemented using recognized cryptographic components and compiler built-in macros by those skilled in the art; their specific forms are well-known technologies in this field and will not be elaborated upon here.
[0084] This embodiment uses a court's electronic case file retrieval platform as an application scenario. This platform accesses criminal, civil, administrative, and enforcement case file data. Data sources include basic case information tables, judgments, court transcripts, evidence photos, scanned files, and electronic service records. Each case file contains two types of information: structured attribute tags and unstructured data. Structured attribute tags include the cause of action, the court of trial, the level of jurisdiction, the year the case was filed, the applicable legal provisions, and the type of party. Unstructured data includes the main text of the judgment, the text of the court transcript, and explanatory text for some image evidence.
[0085] In this embodiment, the system accessed a total of 1,200,000 case files. Structured attribute tags, after normalization, were used to generate structured hash codes via a deterministic hash function. Unstructured text data was input into a BERT feature extraction model fine-tuned for the judicial field, generating a 768-dimensional floating-point semantic feature vector. For evidence images and scanned materials, the system first extracted searchable text through layout analysis and text recognition modules, then input it along with judgments and court records into the feature extraction model to form a unified case file semantic vector representation. Subsequently, the system used product quantization to divide the 768-dimensional floating-point feature vector into 16 sub-vectors, each corresponding to a 256-center codebook, ultimately forming a vector quantization code.
[0086] The memory management module allocates static routing words and dynamic index words for each case file, both with a bit width of 512 bits. The static routing word primarily stores macro-level structured codes such as the cause of action, court level, year of filing, and trial level, used to construct a stable multi-branch tree addressing path. The dynamic index word stores structured hash codes, initial vector quantization codes, and subsequent residual codes. The bit space of the dynamic index word is divided into a structured coding area, a vector quantization coding area, and a reserved check area. The masks corresponding to these three areas are mutually exclusive to avoid conflicts between different semantic fields on the same bit.
[0087] During the index building phase, the multi-way tree slice step size The bit slice is set to 8, and the bit slice result is directly mapped to the offset of the child node reference array of the current node. As case file data is continuously written, some intermediate nodes gradually exhibit obvious isomorphic properties. For example, under the node corresponding to "Basic Court - Civil First Instance - Contract Dispute - 2023", a large number of case files maintain consistency in court level, trial level, and cause of action coding. The system calculates the isomorphic bitmask for this node and marks the structured bits that have formed a stable isomorphic state as freeable space.
[0088] When an intermediate node has 256 case files mounted on it, and the number of freeable bits in the release bitmask is not less than 8 bits, the dynamic reassembly module triggers a bit-width replacement process. The system selects the codebook with the largest bit width that satisfies the current release space from the global multi-scale residual codebook pool, replacing the originally repeatedly stored homogeneous structured bits with residual quantization encoding. This process records the old and new snapshot descriptors, the new dynamic index word address, and the residual codebook identifier through a write-ahead log, and publishes the new snapshot descriptor by comparing and exchanging atomic instructions after the log is written to disk. Thus, the system improves the expression accuracy of the semantic vector within the node without increasing the total bit width of the index word of a single case file.
[0089] During the retrieval phase, users input joint retrieval requests such as "judgments similar to construction project payment arrears in contract dispute cases in grassroots courts in 2023." The system first maps structured query conditions to hash query codes, and then generates a query mask set based on the currently active mask layout epoch. The retrieval execution module pushes down the multi-branch tree layer by layer, pruning branches that do not meet the isomorphic bit matching conditions. In the leaf nodes, the system extracts the initial quantization code and residual code through parallel bit extraction instructions, and reconstructs the approximate semantic vector in the alignment decoding buffer. Finally, the system performs original hash identifier verification on the approximate recall results, filters out false recall results caused by hash collisions, and outputs a list of case files that meet the structured conditions and semantic similarity requirements.
[0090] The comparison includes three schemes: The first approach is a combination of traditional inverted index and independent vector index, where structured conditions are filtered by the inverted index and semantic vectors are recalled by the independent ANN vector index. The second method is the ordinary product quantization vector indexing scheme, which only performs external filtering on structured fields and does not perform isomorphic bit release and residual reassembly. The third approach, as described in this embodiment, employs a classification index construction method that utilizes static routing words, dynamic index words, mutual exclusion bit interleaving, multi-way tree isomorphic pruning, and residual bit-width permutation. The experimental hardware environment consisted of a 32-core CPU, 256GB of memory, and NVMe solid-state storage. All approaches were run under the same data scale, the same query set, and the same hardware environment.
[0091] The test data is shown in the table below: Comparison of Experimental Results Referring to the table above, under the same scale of judicial case file data, the average retrieval latency of the present invention's solution is 18.9ms, lower than the 42.8ms of the inverted index and independent vector index combination scheme, and also lower than the 31.6ms of the ordinary product quantized vector index scheme. The present invention's solution establishes a multi-way tree addressing path through static routing words and performs pruning at intermediate nodes using isomorphic bitmasks, eliminating many branches that do not meet the structured conditions before entering the leaf nodes, thus reducing the data scale for subsequent vector distance calculations.
[0092] Regarding recall, the Top-10 recall rate of the proposed solution reaches 94.7%, which is higher than the 90.3% of the ordinary product-quantized vector indexing solution. This result indicates that releasing the isomorphic structured bits and converting them into a residual coding space can improve the approximate reconstruction accuracy of semantic vectors with a fixed index word width. Meanwhile, the hash collision false recall rate of the proposed solution is 0.18%, lower than the other two solutions, indicating that the joint verification mechanism of structured hash encoding and the original normalized tag ID can effectively suppress the false matching problem caused by hash dimensionality reduction.
[0093] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for constructing a classification index of heterogeneous data for a judiciary, characterized in that, Includes the following steps: S1. Access judicial multimodal case file data containing structured attribute tags and unstructured data; use a hash function to process the structured attribute tags into hash hash codes, and use a feature extraction model to process the unstructured data into floating-point feature vectors; S2. Establish separate static routing words and dynamic index words for the aforementioned multimodal judicial case file data; S3. Based on the bit space preset for structured information and vector information, define a structured mask, a vector initial quantization mask, and a reserved check mask, and ensure that the bit spaces of the three are not intersecting pairwise, and that their union covers the logical bit space of the dynamic index word; according to the layout of the structured mask and the vector initial quantization mask, write the hash code and the initial quantization code generated after quantizing the floating-point feature vector into the non-contiguous target bits in the logical bit space of the dynamic index word in a mutually exclusive interleaving manner; S4. Construct a multi-branch tree addressing path based on the static routing words, and encapsulate the isomorphic state information of the intermediate nodes of the multi-branch tree and the child node reference array into a snapshot descriptor; the isomorphic state information includes an isomorphic bitmask and a release bitmask; the isomorphic bitmask is generated by performing bitwise AND aggregation and bitwise OR aggregation operations on the static routing words of all data mounted under the current intermediate node to obtain bitwise AND aggregation values and bitwise OR aggregation values, and setting the corresponding bit in the isomorphic bitmask to 1 when the bitwise AND aggregation value on a certain bit is equal to the bitwise OR aggregation value; the release bitmask is generated by performing a bitwise AND operation on the isomorphic bitmask and the structured mask of the epoch to which the current intermediate node belongs; S5. When the intermediate node of the multi-branch tree meets the preset isomorphic conditions, the preset isomorphic conditions include that the number of judicial multimodal case file data samples directly mounted under the intermediate node reaches a preset scale threshold, and the size of the freeable bit space obtained by performing a group bit counting function on the release bit mask in the snapshot descriptor is not less than the bit width of the smallest codebook in the global multi-scale residual codebook pool; based on the release bit mask, identify the structured bit bits that belong to the preset bit space of structured information corresponding to the structured mask and are redundant because all mounted data under the current intermediate node have the same value in the bit bits corresponding to the structured attribute; generate residual quantization code representing the difference between the floating-point feature vector and the basic cluster center vector reconstructed by the initial quantization code through a lookup table; and use a copy-on-write mechanism to reallocate the freeable bit space corresponding to the redundant structured bit bits to store the vector residual bit bits of the residual quantization code. S6. In response to the retrieval request, the structured query conditions in the retrieval request are hashed to generate a basic hash code. Based on the global version registry that records the effective mask layout versions, the basic hash code is synchronously compiled into query words that are adapted to different mask layout versions or layout epochs. The retrieval request is compiled into a query mask set. Pushdown pruning is performed along the multi-branch tree addressing path. At the leaf nodes, the residual quantization code and initial quantization code extracted from the dynamic index word are gathered using the alignment decoding buffer defined in the CPU cache with the starting address aligned with the standard cache line boundary of the CPU. Feature reconstruction and batch distance calculation are performed. The uncrunted original hash identifiers associated with each data in the approximate recall set that meet the preset distance threshold requirements are compared with the original hash mapped by the retrieval request to complete the hash collision verification. The retrieval result that has passed the hash collision verification is output. 2.The method of claim 1, wherein, In step S2, establishing separate static routing words and dynamic index words for the judicial multimodal case file data includes: Initialize and maintain a fixed-length memory allocator aligned to cache line boundaries; A static routing word and a dynamic index word are allocated for each piece of judicial multimodal case file data, wherein the storage space for the dynamic index word is requested from the fixed-length memory allocator. 3.The method of claim 1, wherein, In step S3, according to the layout of the structured mask and the initial quantization mask, the hash code and the initial quantization code generated after quantizing the floating-point feature vector are written into the non-contiguous target bits in the logical bit space of the dynamic index word in a mutually exclusive interleaving manner, including: The non-contiguous bit assembly function is called respectively, and the hash code and the quantization code are written into the non-contiguous target bits of the dynamic index word according to the layout of the structured mask and the vector initial quantization mask; The non-contiguous bit assembly function is implemented by detecting the instruction set support status of the central processing unit. When the BMI2 instruction set is detected, the PDEP hardware instruction is called to perform the bit assembly operation. When the BMI2 instruction set is not detected, a software lookup table is used in conjunction with shift and bit OR operations to complete the equivalent bit assembly operation. 4.The method of claim 1, wherein, In step S4, constructing a multi-way tree addressing path based on the static routing word includes: According to a preset fixed bit step size, the effective bit width of the static routing word is segmented from the high bit to the low bit to generate bit fragments; traversing the multi-ary tree at a first level, intercepting a corresponding first bit segment of the static route word; The intercepted bit segment is converted to an integer index value, and the integer index value is used as a physical index offset into the child reference array of the current intermediate node to determine the mount path. The intercepted bit segment is converted to an integer index value, and the integer index value is used as a physical index offset into the child reference array of the current intermediate node to determine the mount path.
5. The method for constructing a classification index for heterogeneous judicial data according to claim 1, characterized in that, In step S5, the reallocation of the freeable bit space corresponding to the redundant structured bits to store vector residual bits for residual quantization encoding further includes: Recovery information, including pointers to old and new snapshot descriptors and addresses of newly allocated data blocks, is recorded through a write-ahead log. After confirming that the write-ahead log has been written to disk, the compare and swap atomic instruction is invoked to atomically update the pointer in the parent node that points to the old snapshot descriptor to point to the new snapshot descriptor.
6. The method for constructing a classification index for heterogeneous judicial data according to claim 1, characterized in that, In step S6, the pushdown pruning along the multi-branch tree addressing path includes: The query word aligned with the current intermediate node epoch version is XORed with the static routing word of any representative data in the current intermediate node, and then the XOR result is ANDed with the isomorphic bitmask of the current intermediate node. If the final result is not a string of all zero bits, then the entire branch under the current intermediate node will be removed from the search path.
7. The method for constructing a classification index for heterogeneous judicial data according to claim 1, characterized in that, In step S6, the step of using an aligned decoding buffer defined within the CPU cache at the leaf node, with its starting address aligned to the CPU's standard cache line boundaries, to aggregate the residual quantization code and initial quantization code extracted from the dynamic index word to perform feature reconstruction and batch distance calculation includes: The parallel bit extraction instruction is invoked. Based on the residual-specific positioning mask and vector initial quantization mask under the current leaf node layout, the residual quantization code and initial quantization code are extracted from the dynamic index word respectively, and the two extracted codes are merged into the alignment decoding buffer. By adding the basic cluster center vector corresponding to the initial quantization encoding to the residual cluster center vector corresponding to the residual quantization encoding, an approximate feature vector for distance measurement is synthesized.
Citation Information
Patent Citations
Object matching method based on bitmap index
CN121786243A
Location Based Full Text Search
US20130132398A1
