Unstructured data connection query optimization system and method based on twin network

Through the unstructured data connection query optimization system based on twin networks, the accuracy and efficiency problems of unstructured data connection in existing technologies are solved, efficient connection and query optimization of multi-type data are achieved, and the overall performance of the database system is improved.

CN120723958AActive Publication Date: 2025-09-30ZHEJIANG UNIV +1

Patent Information

Application Number
CN202511234631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-09-30
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing unstructured data connection methods have shortcomings in accuracy and efficiency, especially in edge cases, which are prone to misjudgment. They lack a unified feature extraction framework and effective decision-making mechanism, and are difficult to integrate with query optimizers.

Method used

An unstructured data connection query optimization system based on twin networks is adopted, including feature extraction module, twin network module, judgment layer module, threshold decision module and query optimization module. Feature vectors are extracted through deep learning models, mapped to low-dimensional embedding space using twin networks, and automatic decision-making and review area division are performed in combination with threshold decision and dedicated inference models, and integrated with the query optimizer.

Benefits of technology

It implements efficient connection operations for various unstructured data types, improves connection accuracy and efficiency, supports automatic decision-making and review area division, optimizes query execution plans, and improves database query performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723958A_ABST
    Figure CN120723958A_ABST
Patent Text Reader

Abstract

The invention discloses an unstructured data connection query optimization system and method based on a twin network, and belongs to the field of unstructured data processing. Comprising a feature extraction module for extracting feature vectors of different types of unstructured data by using a deep learning model; the twin network module is used for converting the feature vector into a low-dimensional embedding space; the judgment layer module is used for outputting a connection matching probability through a full-connection network after the feature difference and the original features are spliced; the threshold decision module is used for determining an optimal upper and lower threshold pair through adaptive mapping and grid search and dividing a connection matching probability into an automatic decision area and a recheck area, and the recheck area is used for further judging a connection relationship through a special reasoning model; and the query optimization module is used for optimizing a query execution plan of the unstructured data based on the connection matching result. According to the method, efficient unstructured database connection operation can be realized, an automatic decision-making and accurate rechecking mechanism is supported, and the accuracy and efficiency of database query connection operation are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of database systems, query optimization, deep learning and unstructured data processing, and in particular to an unstructured data connection query optimization system and method based on twin networks. Background Art

[0002] With the advent of the big data era, unstructured data (such as text, images, and video) is increasingly accounting for a larger proportion of database systems. Traditional relational databases primarily process structured data and have limited capabilities for handling unstructured data. In particular, when performing join operations on unstructured data, the lack of a clear join key makes traditional join methods based on key-value matching difficult to apply, resulting in low query efficiency.

[0003] In database systems, joins are one of the most fundamental and time-consuming operations, especially when processing large amounts of unstructured data. Existing methods for joining unstructured data primarily rely on manually defined similarity metrics or simple feature extraction techniques. These methods lack accuracy and efficiency in complex scenarios. With the advancement of deep learning technology, feature extraction and matching methods based on deep neural networks are increasingly being applied to database systems, providing new solutions for joining unstructured data.

[0004] Among deep learning methods, the Siamese network, due to its unique structural design, excels in similarity comparison tasks. Composed of two weighted subnetworks, the Siamese network maps input samples into an embedding space where similar samples are closer and dissimilar samples are farther apart. This structure is particularly well-suited for handling the connectivity problem of unstructured data.

[0005] However, existing deep learning-based unstructured data connection systems still have some problems: first, there is a lack of a unified framework for feature extraction of different types of unstructured data (text, images, videos); second, the accuracy of connection operations is not high, especially in edge cases, which are prone to misjudgment; in addition, there is a lack of effective decision-making mechanisms to balance automated processing and manual intervention, as well as a lack of effective methods to integrate connection results with query optimizers.

[0006] Therefore, there is an urgent need for an unstructured data connection optimization system and method that can improve the accuracy of unstructured data connection, support automatic decision-making and review area division mechanism, and can be effectively integrated with the query optimizer. Summary of the Invention

[0007] The purpose of the present invention is to address the problems existing in the prior art and propose an unstructured data connection query optimization system and method based on twin networks. The system can realize efficient unstructured data connection operations, support automatic decision-making and review area division mechanism, and be effectively integrated with the query optimizer.

[0008] The object of the present invention is achieved through the following technical solution: an unstructured data connection query optimization system based on twin networks, comprising:

[0009] A feature extraction module is used to extract raw feature vectors of different types of unstructured data using a deep learning model, wherein the unstructured data includes images, text, and videos;

[0010] A twin network module for converting feature vectors into low-dimensional embedding vectors; the twin network module consists of two weight-sharing sub-networks, each of which includes a three-layer fully connected network, each followed by a batch normalization layer, a ReLU activation function, and a Dropout layer;

[0011] The judgment layer module is used to calculate the feature difference between two low-dimensional embedding vectors of the same type, concatenate the feature difference with the original feature vector, and output the connection matching probability through a fully connected network;

[0012] The threshold decision module is used to determine the optimal upper and lower threshold pairs through adaptive mapping and grid search, and divide the connection matching probability into an automatic decision area and a review area based on the optimal upper and lower threshold pairs. The automatic decision area is used to automatically determine the connection relationship, and the review area uses different types of inference models to further determine the connection relationship for different types of unstructured data;

[0013] The query optimization module is used to optimize the query execution plan of unstructured data based on the connection matching results.

[0014] Furthermore, the feature extraction module includes:

[0015] Image feature extraction unit, used to extract 2048-dimensional feature vectors of images using ResNet50;

[0016] Text feature extraction unit, used to extract feature vectors of text using BERT or Transformer models;

[0017] The video feature extraction unit is used to extract the feature vector of the video using a 3D-CNN or video Transformer model.

[0018] Furthermore, the judgment layer module includes:

[0019] A feature difference calculation unit, used to calculate the feature difference between two low-dimensional embedding vectors;

[0020] A feature splicing unit, used to splice feature differences with original features;

[0021] The fully connected judgment unit is used to process the splicing features through a two-layer fully connected network and output the connection matching probability.

[0022] Furthermore, the threshold decision module includes:

[0023] Threshold pair search unit, used to search for the best upper and lower threshold pairs on the validation set;

[0024] Automatic decision-making unit, used to automatically determine the connection result based on the connection matching probability and threshold;

[0025] The review processing unit is used to make further judgments on samples that fall into the review area using a dedicated reasoning model.

[0026] Furthermore, the threshold pair searching unit includes:

[0027] An adaptive mapping unit, used to map the connection matching probability distribution to a uniform distribution space according to quantile division;

[0028] A grid search unit for searching for the best threshold pair in the mapped probability space;

[0029] an inverse mapping conversion unit, for transforming the threshold pairs in the mapping space back to the original probability space;

[0030] The safety factor adjustment unit is used to adjust the threshold value pair through the safety factor to improve the system reliability.

[0031] Furthermore, the query optimization module includes:

[0032] A connection cost estimation unit, used to estimate the execution costs of different connection methods;

[0033] A connection strategy selection unit, configured to select an optimal connection strategy based on connection matching results and cost estimation;

[0034] The execution plan generation unit is used to generate an optimized query execution plan.

[0035] The present invention also provides a method for optimizing unstructured data connection queries based on twin networks, comprising:

[0036] (1) Use deep learning models to extract raw feature vectors from unstructured data;

[0037] (2) Based on the twin network, the high-dimensional feature vector is input into a three-layer fully connected network with weight sharing. Each layer is followed by a batch normalization layer, a ReLU activation function, and a Dropout layer to obtain a low-dimensional embedding vector, achieving the metric learning goal of similar samples having a distance less than a threshold value in the embedding space and a distance greater than a threshold value for dissimilar samples;

[0038] (3) Calculate the feature difference of the two low-dimensional embedding vectors and concatenate them with the original feature vector to obtain the concatenated feature;

[0039] (4) Process the splicing features through the judgment layer network and output the connection matching probability;

[0040] (5) Determine the optimal upper and lower threshold pairs through adaptive mapping and grid search, and judge the connection matching probability based on the optimal upper and lower threshold pairs. When the connection matching probability is lower than the lower threshold, it is judged as not connected; when the connection matching probability is higher than the upper threshold, it is judged as connected; when the connection matching probability is between the lower and upper thresholds, it is divided into a review area, and the connection relationship is further judged through a dedicated inference model;

[0041] (6) Optimize query execution plans for unstructured data based on join matching results.

[0042] Furthermore, the step of extracting feature vectors of unstructured data using a deep learning model includes:

[0043] For image data, ResNet50 is used to extract 2048-dimensional feature vectors;

[0044] For text data, use BERT or Transformer models to extract feature vectors;

[0045] For video data, 3D-CNN or video Transformer models are used to extract feature vectors.

[0046] Furthermore, the method further includes a threshold pair search step, specifically:

[0047] Calculate the connection matching probability of all sample pairs on the validation set;

[0048] Adaptive mapping is applied to divide the probability space into quantiles to make the number of samples in each interval more uniform;

[0049] Perform a grid search in the mapping space to enumerate and evaluate threshold pairs to find candidate threshold pairs that meet the target accuracy;

[0050] Sort candidate threshold pairs according to the optimization objective and select the best threshold pair;

[0051] The optimal threshold pair is transformed back to the original probability space through inverse mapping;

[0052] Fine-tune the threshold value through the safety factor to improve system reliability;

[0053] Different target accuracy and search strategies can be set for different types of data connection tasks.

[0054] Furthermore, the step of optimizing the query execution plan of unstructured data based on the connection matching result includes:

[0055] Estimate the execution cost of different join methods (such as nested loop join, hash join, sort merge join, etc.);

[0056] Select the optimal connection strategy and execution order based on the connection matching results and cost estimation;

[0057] Generate an optimized query execution plan and provide it to the database execution engine;

[0058] Supports adaptive optimization and dynamically adjusts connection strategies based on actual execution conditions.

[0059] The beneficial effects of the present invention are:

[0060] 1. Unified unstructured data processing framework: supports feature extraction and connection operations for various unstructured data types such as text, images, and videos;

[0061] 2. Efficient connection optimization: The high-dimensional feature vector is mapped to a low-dimensional embedding space through the Siamese network, improving the accuracy and efficiency of the connection operation;

[0062] 3. Automatic decision-making and review zone division mechanism: This mechanism uses a strategy of upper and lower thresholds to effectively divide the automatic decision-making and review zones. The review zone uses a dedicated inference model to further improve judgment accuracy.

[0063] 4. Query optimization integration: effectively integrate connection matching results with the query optimizer to optimize query execution plans and improve overall query performance;

[0064] 5. Adaptive threshold search: Through adaptive mapping and grid search, the optimal threshold pair is found to improve the overall system performance;

[0065] 6. Strong scalability: The system architecture is modularly designed, and each module can be independently optimized and replaced to adapt to different application scenarios and data types. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 The overall architecture diagram of the unstructured data connection optimization system based on twin networks;

[0067] Figure 2 This is a schematic diagram of the multimodal feature extraction module structure;

[0068] Figure 3 Schematic diagram of the twin network structure;

[0069] Figure 4 Schematic diagram of the threshold decision mechanism;

[0070] Figure 5 Schematic diagram of the integration of query optimization module and database system. DETAILED DESCRIPTION

[0071] The present invention will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the features of the following embodiments and implementations may be combined with each other.

[0072] like Figure 1 As shown, an embodiment of the present invention provides an unstructured data connection query optimization system based on a twin network, including a feature extraction module, a twin network module, a judgment layer module, a threshold decision module and a query optimization module. The modules are specifically:

[0073] (1) Feature extraction module

[0074] like Figure 2 As shown, the feature extraction module is used to extract feature vectors from different types of unstructured data, including an image feature extraction unit, a text feature extraction unit, and a video feature extraction unit.

[0075] The image feature extraction unit uses a pretrained ResNet50 network to extract a 2048-dimensional feature vector from the image. ResNet50 is a deep residual network that uses skip connections to address the vanishing gradient problem in deep neural network training and can extract high-level semantic features from images. In this system, the last fully connected layer of ResNet50 is removed, and the 2048-dimensional feature vector from the penultimate layer is used as the image representation.

[0076] The text feature extraction unit uses the BERT or Transformer model to extract feature vectors from text. BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model that generates contextually relevant text representations. By segmenting and encoding text, BERT converts it into a high-dimensional feature vector that captures the text's semantic information.

[0077] The video feature extraction unit uses a 3D-CNN or video transformer model to extract video feature vectors. By extending traditional 2D convolutional neural networks in the temporal dimension, 3D-CNN can simultaneously capture both spatial and temporal features of a video. The video transformer processes video sequences using a self-attention mechanism to generate feature representations that incorporate spatiotemporal information.

[0078] (2) Twin network module

[0079] like Figure 3 As shown in Figure 1, the Siamese network module consists of two weight-sharing sub-networks, each containing three fully connected layers, which are used to map different types of unstructured data feature vectors into the same low-dimensional embedding space. The core feature of the Siamese network is that the two sub-networks share exactly the same weight parameters. This design enables the network to learn the similarities and differences between samples rather than specific sample categories. This structure is particularly suitable for solving unstructured data connection problems, and its main advantages include:

[0080] 1) Parameter sharing mechanism: The two sub-networks share the same weight parameters, ensuring consistent processing of any input pair, reducing the number of model parameters and improving training efficiency;

[0081] 2) Metric learning capability: Through contrastive learning, the Siamese network can map high-dimensional features into a metric space, so that semantically similar samples are closer in the embedding space, while dissimilar samples are farther apart.

[0082] 3) Few-sample adaptability: Compared with traditional classification models, Siamese networks are less dependent on training data and perform well in data-sparse scenarios;

[0083] 4) Cross-modal compatibility: By sharing weight structures, it can effectively handle the connection matching between different types of unstructured data, such as image-image, text-image, and other combinations;

[0084] 5) Easy to optimize: The twin structure makes the network less prone to overfitting during training and has better generalization ability.

[0085] The specific network structure is as follows:

[0086] The first layer takes in a high-dimensional feature vector (e.g., a 2048-dimensional feature vector for an image, or a feature vector for text or video) and outputs a 512-dimensional vector, followed by a batch normalization layer, a ReLU activation function, and a Dropout layer (with a dropout rate of 0.3).

[0087] The second layer takes in a 512-dimensional vector and outputs a 256-dimensional vector, followed by a batch normalization layer, a ReLU activation function, and a Dropout layer (dropout rate 0.3).

[0088] The third layer: inputs a 256-dimensional vector and outputs a 128-dimensional embedding vector, followed by a batch normalization layer, a ReLU activation function, and a Dropout layer (dropout rate 0.3).

[0089] The training of the Siamese network uses a multi-objective loss function to make the distance between similar samples in the embedding space smaller and the distance between dissimilar samples larger, while keeping the embedding vectors of different types of data comparable. The loss function is defined as follows:

[0090] L=α*L_contrastive+β*L_triplet+γ*L_classification;

[0091] Among them, L_contrastive is the contrast loss, which calculates the Euclidean distance between pairs of samples; L_triplet is the triplet loss, which ensures that the distance between the anchor sample and the positive sample is smaller than the distance between the anchor sample and the negative sample; L_classification is the classification loss, which provides additional supervision signal; α, β, and γ are weight coefficients. By adjusting these weight coefficients, we can balance the contributions of different loss terms and optimize the model's performance on different types of unstructured data.

[0092] (3) Judgment layer module

[0093] The judgment layer module is used to calculate the connection matching probability of two embedded vectors and evaluate the connection relationship between unstructured data. It includes the following steps:

[0094] Calculate the difference between two embedding vectors (such as Euclidean distance, cosine similarity, dot product and other similarity metrics);

[0095] Concatenate the difference features with the original embedding vector to form an enhanced feature representation;

[0096] The splicing features are processed through a two-layer fully connected network, and the connection matching probability is output.

[0097] The fully connected network structure is as follows:

[0098] The first layer: inputs the concatenated features, outputs a 64-dimensional vector, and then uses the ReLU activation function;

[0099] The second layer: inputs a 64-dimensional vector and outputs a 1-dimensional probability value, followed by a Sigmoid activation function.

[0100] The judgment layer module supports connection matching evaluation between different types of unstructured data, such as image-image, text-text, image-text, video-image and other combinations, providing reliable similarity evaluation for connection operations in database systems.

[0101] (4) Threshold decision module

[0102] like Figure 4 As shown in the figure, the threshold decision module implements automatic decision-making and review area division mechanism based on the connection matching probability, using the upper and lower threshold pair strategy:

[0103] Lower threshold (lower_threshold): When the connection matching probability is lower than this threshold, it is judged as not connected;

[0104] Upper threshold (upper_threshold): When the connection matching probability is higher than this threshold, it is considered a connection;

[0105] When the connection matching probability is between the lower threshold and the upper threshold, it is divided into a review area, and the connection matching probability is further judged by a dedicated inference model.

[0106] The review area uses a dedicated reasoning model to accurately analyze unstructured data. Different reasoning models are used for different types of data:

[0107] For image data: Use target detection models such as YOLO to extract target objects, attributes, and relationship information in images;

[0108] For text data: Use named entity recognition and relation extraction models to extract entities and relations in text;

[0109] For video data: Use action recognition and scene segmentation models to extract spatiotemporal information from videos.

[0110] The detailed information obtained through the dedicated reasoning model, combined with domain knowledge and connection rules, can make accurate connection judgments on the samples in the review area, effectively reducing misjudgments.

[0111] The threshold pair search uses adaptive mapping and grid search methods:

[0112] Adaptive mapping: The original connection matching probability distribution is divided by quantiles and mapped to a more uniform distribution space to facilitate more refined threshold search;

[0113] Grid search: In the mapped probability space, a grid search with a fixed step size is performed to find the optimal threshold pair that meets the target accuracy.

[0114] Inverse mapping conversion: transform the threshold pairs determined in the mapping space back to the original probability space through inverse mapping;

[0115] Safety factor: The target accuracy is adjusted through the safety factor to improve system reliability.

[0116] The threshold decision module automatically adjusts threshold pairs based on different types of unstructured data join tasks, adapting to varying data distributions and join requirements. Furthermore, by adjusting the verification zone (i.e., the interval between upper and lower thresholds), the system's automation and accuracy requirements can be balanced. Furthermore, the threshold decision module supports online learning and feedback mechanisms, continuously optimizing threshold pair settings based on verification zone results to improve system performance.

[0117] (5) Query optimization module

[0118] like Figure 5 As shown in the figure, the query optimization module is responsible for integrating the connection matching results with the database query optimizer to optimize the query execution plan for unstructured data. It includes the following functions:

[0119] Join cost estimation: Estimate the execution cost of different join methods (such as nested loop join, hash join, sort merge join, etc.) based on the join matching results and data characteristics;

[0120] Connection strategy selection: Based on the cost estimation results, the optimal connection strategy and execution order are selected;

[0121] Execution plan generation: Generates a query execution plan that includes optimal join operations and provides it to the database execution engine.

[0122] The query optimization module integrates tightly with the database system's query optimizer, incorporating the characteristics of unstructured data joins into the overall query optimization process, achieving end-to-end query performance improvements. The module also supports adaptive optimization, dynamically adjusting join strategies based on actual execution to address changes in data distribution and query patterns.

[0123] Based on the above system, an embodiment of the present invention further provides an unstructured data connection query optimization method based on a twin network, comprising the following steps:

[0124] (1) Feature extraction

[0125] Use deep learning models to extract feature vectors from different types of unstructured data. The specific steps are as follows:

[0126] For image data:

[0127] Resize the input image to 224×224;

[0128] Through the forward propagation of the ResNet50 network, the 2048-dimensional feature vector of the penultimate layer is obtained;

[0129] Perform L2 normalization on the feature vector to improve the robustness of the feature.

[0130] For text data:

[0131] Perform word segmentation and encoding on the text;

[0132] Extract text feature vectors through BERT or Transformer models;

[0133] Normalize the feature vector.

[0134] For video data:

[0135] Extract keyframes or temporal features;

[0136] Extract feature vectors through 3D-CNN or video Transformer models;

[0137] Normalize the feature vector.

[0138] (2) Siamese network feature mapping

[0139] The high-dimensional feature vector is mapped to a low-dimensional embedding space through the twin network. The design concept of the twin network is to use a weight-sharing dual-branch structure to learn the similarity measure between samples rather than the absolute classification of samples. The specific steps are as follows:

[0140] Different types of unstructured data feature vectors are input into two identical sub-networks that share weights;

[0141] Each sub-network consists of three fully connected layers, each of which is followed by a batch normalization layer, a ReLU activation function, and a Dropout layer.

[0142] Through the weight sharing mechanism, the two inputs are ensured to undergo the same transformation, thus ensuring the consistency of the feature space;

[0143] Obtain a unified low-dimensional embedding vector (e.g., 128 dimensions) as a compact representation of the data;

[0144] Use contrastive loss and triplet loss to train the network so that the embedding vectors of similar sample pairs are closer and the embedding vectors of dissimilar sample pairs are farther apart;

[0145] Ensure that the embedding vectors of different types of data are comparable in the same feature space, supporting cross-modal matching;

[0146] The embedding space is optimized through metric learning to give it better semantic structure and discriminative ability.

[0147] (3) Feature difference calculation and splicing

[0148] Calculate the difference between the two embedding vectors and concatenate them with the original features. The specific steps are as follows:

[0149] Calculate the Euclidean distance, cosine similarity, dot product and other difference features between two embedding vectors;

[0150] Concatenate the difference features with the original embedding vector to form an enhanced feature representation;

[0151] For the connection of different types of data (such as text-image), a specific feature fusion strategy is adopted to ensure the effectiveness of difference calculation.

[0152] (4) Connection matching probability calculation

[0153] The judgment layer network processes the splicing features and outputs the connection matching probability. The specific steps are as follows:

[0154] Input the concatenated features into a two-layer fully connected network;

[0155] The first layer is fully connected and followed by a ReLU activation function;

[0156] The second fully connected layer is followed by a Sigmoid activation function, which outputs a connection matching probability between 0 and 1;

[0157] According to the characteristics of different types of data connections, different judgment layer network structures can be used.

[0158] (5) Threshold decision

[0159] The connection matching probability is judged based on the preset threshold to achieve automatic decision-making and review area division. The specific steps are as follows:

[0160] When the connection matching probability is lower than the lower threshold, it is judged as not connected;

[0161] When the connection matching probability is higher than the upper threshold, it is determined to be connected;

[0162] When the connection matching probability is between the lower threshold and the upper threshold, it is divided into the review area and further processed by a dedicated inference model;

[0163] For samples in the review area, select an appropriate dedicated inference model based on the data type (such as the YOLO model for image data) to obtain more accurate unstructured data information, and make a final judgment based on domain rules;

[0164] According to the importance and accuracy requirements of different connection tasks, the threshold pairs and review area processing strategies can be dynamically adjusted.

[0165] (6) Threshold pair search

[0166] Search for the best threshold pair on the validation set to achieve the specified accuracy requirement. The specific steps are as follows:

[0167] Calculate the connection matching probability of all sample pairs on the validation set;

[0168] Apply adaptive mapping: divide the probability space by quantiles to make the number of samples in each interval more uniform;

[0169] Perform a grid search in the mapping space to enumerate and evaluate threshold pairs to find candidate threshold pairs that meet the target accuracy;

[0170] Sort candidate threshold pairs according to the optimization objective and select the best threshold pair;

[0171] The optimal threshold pair is transformed back to the original probability space through inverse mapping;

[0172] Fine-tune the threshold value through the safety factor to improve system reliability;

[0173] Different target accuracy and search strategies can be set for different types of data connection tasks.

[0174] (7) Query execution plan optimization

[0175] Optimize the query execution plan for unstructured data based on the connection matching results. The specific steps are as follows:

[0176] Estimate the execution cost of different join methods (such as nested loop join, hash join, sort merge join, etc.);

[0177] Select the optimal connection strategy and execution order based on the connection matching results and cost estimation;

[0178] Generate an optimized query execution plan and provide it to the database execution engine;

[0179] Supports adaptive optimization and dynamically adjusts connection strategies based on actual execution conditions.

[0180] The system and method of the present invention can be applied to a variety of scenarios, such as multimodal database query, cross-media information retrieval, and intelligent data integration. Through the feature mapping, threshold decision mechanism, and query plan optimization of the twin network, it is possible to achieve efficient unstructured data connection operations, significantly improve database query performance, and effectively balance automated processing and manual intervention.

[0181] The above embodiments are intended only to illustrate the design concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. The scope of protection of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design concepts disclosed in the present invention are within the scope of protection of the present invention.

Claims

1. An unstructured data connection query optimization system based on twin networks, characterized by: include: A feature extraction module is used to extract raw feature vectors of different types of unstructured data using a deep learning model, wherein the unstructured data includes images, text, and videos; A twin network module for converting feature vectors into low-dimensional embedding vectors; the twin network module consists of two weight-sharing sub-networks, each of which includes a three-layer fully connected network, each followed by a batch normalization layer, a ReLU activation function, and a Dropout layer; The judgment layer module is used to calculate the feature difference between two low-dimensional embedding vectors of the same type, concatenate the feature difference with the original feature vector, and output the connection matching probability through a fully connected network; The threshold decision module is used to determine the optimal upper and lower threshold pairs through adaptive mapping and grid search, and divide the connection matching probability into an automatic decision area and a review area based on the optimal upper and lower threshold pairs. The automatic decision area is used to automatically determine the connection relationship, and the review area uses different types of inference models to further determine the connection relationship for different types of unstructured data; The query optimization module is used to optimize the query execution plan of unstructured data based on the connection matching results.

2. The system according to claim 1, wherein: The feature extraction module includes: Image feature extraction unit, used to extract 2048-dimensional feature vectors of images using ResNet50; Text feature extraction unit, used to extract feature vectors of text using BERT or Transformer models; The video feature extraction unit is used to extract the feature vector of the video using a 3D-CNN or video Transformer model.

3. The system according to claim 1, wherein: The judgment layer module includes: A feature difference calculation unit, used to calculate the feature difference between two low-dimensional embedding vectors; A feature splicing unit, used to splice feature differences with original features; The fully connected judgment unit is used to process the splicing features through a two-layer fully connected network and output the connection matching probability.

4. The system according to claim 1, wherein: The threshold decision module includes: Threshold pair search unit, used to search for the best upper and lower threshold pairs on the validation set; Automatic decision-making unit, used to automatically determine the connection result based on the connection matching probability and threshold; The review processing unit is used to make further judgments on samples that fall into the review area using a dedicated reasoning model.

5. The system according to claim 4, characterized in that The threshold pair searching unit includes: An adaptive mapping unit, used to map the connection matching probability distribution to a uniform distribution space according to quantile division; A grid search unit for searching for the best threshold pair in the mapped probability space; an inverse mapping conversion unit, for transforming the threshold pairs in the mapping space back to the original probability space; The safety factor adjustment unit is used to adjust the threshold value pair through the safety factor to improve the system reliability.

6. The system according to claim 1, wherein: The query optimization module includes: A connection cost estimation unit, used to estimate the execution costs of different connection methods; A connection strategy selection unit, configured to select an optimal connection strategy based on connection matching results and cost estimation; The execution plan generation unit is used to generate an optimized query execution plan.

7. A method for optimizing unstructured data connection queries based on twin networks, characterized in that: include: (1) Use deep learning models to extract raw feature vectors from unstructured data; (2) Based on the twin network, the high-dimensional feature vector is input into a three-layer fully connected network with weight sharing. Each layer is followed by a batch normalization layer, a ReLU activation function, and a Dropout layer to obtain a low-dimensional embedding vector, achieving the metric learning goal of similar samples having a distance less than a threshold value in the embedding space and a distance greater than a threshold value for dissimilar samples; (3) Calculate the feature difference of the two low-dimensional embedding vectors and concatenate them with the original feature vector to obtain the concatenated feature; (4) Process the splicing features through the judgment layer network and output the connection matching probability; (5) Determine the optimal upper and lower threshold pairs through adaptive mapping and grid search, and judge the connection matching probability based on the optimal upper and lower threshold pairs. When the connection matching probability is lower than the lower threshold, it is judged as not connected; when the connection matching probability is higher than the upper threshold, it is judged as connected; when the connection matching probability is between the lower and upper thresholds, it is divided into a review area, and the connection relationship is further judged through a dedicated inference model; (6) Optimize query execution plans for unstructured data based on join matching results.

8. The method according to claim 7, characterized in that The step of extracting feature vectors of unstructured data using a deep learning model includes: For image data, ResNet50 is used to extract 2048-dimensional feature vectors; For text data, use BERT or Transformer models to extract feature vectors; For video data, 3D-CNN or video Transformer models are used to extract feature vectors.

9. The method according to claim 7, characterized in that The method further includes a threshold pair searching step, specifically: Calculate the connection matching probability of all sample pairs on the validation set; Adaptive mapping is applied to divide the probability space into quantiles to make the number of samples in each interval more uniform; Perform a grid search in the mapping space to enumerate and evaluate threshold pairs to find candidate threshold pairs that meet the target accuracy; Sort candidate threshold pairs according to the optimization objective and select the best threshold pair; The optimal threshold pair is transformed back to the original probability space through inverse mapping; Fine-tune the threshold using the safety factor to improve system reliability.

10. The method according to claim 7, characterized in that The step of optimizing the query execution plan of unstructured data based on the connection matching result includes: Estimate the execution cost of different connection methods; Select the optimal connection strategy based on the connection matching results and cost estimation; Generates an optimized query execution plan.

Citation Information

Patent Citations

  • Collaborative analysis method based on twin neural network

    CN112472136A

  • Information security knowledge entity relationship connection prediction method and system, and medium

    CN114579761A

  • Data intelligence-oriented twin network structure search method and semantic matching method

    CN115114401A

  • Database query optimization method and system, electronic equipment and storage medium

    CN116028528A

  • Earthquake landslide identification method and system based on multi-feature cross fusion twin network

    CN117830871A

Cited By

  • Spatial calibration-based unstructured data connection system and method

    CN122153138A