Automated Data Retrieval Methods and Systems Based on Artificial Intelligence Technology
By using a dual-branch autoencoder neural network for data encoding and decoding, combined with quantum entanglement measurement and optimization of various loss functions, the problem of insufficient accuracy and efficiency of existing data retrieval methods in handling complex problems is solved, and efficient and accurate question-and-answer matching is achieved.
Patent Information
- Application Number
- CN202410942722.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Existing data retrieval methods lack a deep semantic understanding of questions and answers when dealing with complex or ambiguous problems, resulting in low accuracy. Furthermore, traditional autoencoders are inefficient in information compression and transmission, failing to effectively preserve important information.
We employ a dual-branch autoencoder neural network based on artificial intelligence technology. Data encoding and decoding are performed through quantum entanglement measurement and autoencoder layers. Combined with pooling layers and mapping layers, fine-grained vector matching and interaction are achieved. The training process is optimized using multiple loss functions and dynamically adjusted learning rates.
It improves the accuracy and speed of data processing, can accurately identify and match relevant question-answer pairs, enhances the stability and efficiency of the model when processing complex data, and simplifies the calculation process.
Smart Images

Figure CN118467712B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent healthcare, specifically to an automated data retrieval method, system, device, and computer-readable storage medium based on artificial intelligence technology. Background Technology
[0002] In today's information age, data acquisition and processing have become crucial, especially in scenarios involving rapid and accurate information retrieval, such as online customer service, medical consultation, and legal aid. Traditional data retrieval methods often rely on simple keyword matching or basic semantic processing techniques, which are often inadequate when dealing with complex queries and requirements. For example, existing technologies often fail to provide satisfactory answers to questions with ambiguity or context dependence because they lack the ability to understand and accurately match the deep semantics of the questions. To overcome these shortcomings, researchers and engineers have been exploring more efficient technical solutions, particularly how to better integrate artificial intelligence into automated data retrieval systems to improve system response speed and answer relevance. However, existing technologies still have shortcomings in the following aspects: Traditional data retrieval methods may not employ fine-grained vector matching, resulting in low accuracy in the question-answer matching process and an inability to effectively handle semantically complex or ambiguous questions. Existing technologies rely excessively on keyword matching and lack the ability to understand and process the deep semantics of questions and answers. Traditional autoencoders are inefficient in information compression and transmission, failing to retain important information effectively while reducing data dimensionality. Summary of the Invention
[0003] To address the above problems, this invention proposes an automated data retrieval method based on artificial intelligence technology, specifically including:
[0004] Obtain the problem data;
[0005] The question data is input into a relational network to obtain an answer;
[0006] The generation process of the relationship network is as follows:
[0007] S1: Obtain the question dataset and the answer dataset;
[0008] S2: Input the question dataset and the answer dataset into a dual-branch autoencoder neural network. The dual-branch autoencoder neural network includes a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The question dataset obtains a question vector through the embedding layer and autoencoder layer in the question encoding module, and the answer dataset obtains an answer vector through the embedding layer and autoencoder layer in the answer encoding module.
[0009] S3: The question vector and the answer vector are input to the question matching layer to calculate the matching score between the vectors and obtain the matching relationship network.
[0010] Furthermore, the autoencoder layer in the question encoding module and the answer encoding module includes an encoder and a decoder. The encoder encodes data using quantum entanglement measurement to obtain a compressed vector, and the decoder reconstructs the data from the compressed vector to obtain a question vector / answer vector.
[0011] Furthermore, the function of the quantum entanglement metric Represented as:
[0012]
[0013] in, The output of the activation function, In the Gaussian mixture model, the first The weights of each component; For the first The mean of a Gaussian distribution; For the first The standard deviation of a Gaussian distribution; denoted as the number of Gaussian distributions.
[0014] The data reconstruction also includes calculating the reconstruction error and the sparsity error; the reconstruction error is calculated using a mean squared error function, and the sparsity error is calculated using a topological sparsity loss function; the topological sparsity loss function... The calculation method is expressed as follows:
[0015]
[0016] in, This represents the encoder output. For the sparsity objective value, For the first The average activation value of each node in the coding layer; This represents the total number of nodes.
[0017] The question encoding module and the answer encoding module also include a pooling layer, which feeds the output vector of the autoencoder layer to the pooling layer and aggregates them through an attention mechanism to obtain the question vector / answer vector.
[0018] The question encoding module and the answer encoding module also include a mapping layer. The vector is input to the mapping layer and mapped to obtain a question vector / answer vector. The mapping layer optimizes the parameters using the Tianhui algorithm. The parameters constitute the initial position and mass of celestial bodies in the simulation space of the Tianhui algorithm. The algorithm calculates the velocity and direction of motion of celestial bodies under gravity by simulating the interaction between celestial bodies. The updated parameters are then obtained by updating the parameters using the velocity and direction of motion.
[0019] The question matching layer reduces the redundancy of the question vector / answer vector through regularization terms, and then calculates the matching score between the question vector and the answer vector through fine-grained vector matching to obtain the answer to the question; wherein, the calculation method of the regularization terms is as follows:
[0020]
[0021] in, Represents a regular term, Indicates the redundancy of a vector. This is presented as a question. This is represented as the standard answer to the question, i.e., a positive sample. This is represented as a non-standard answer, i.e., a negative sample.
[0022] The question data is sequentially passed through an embedding layer, an autoencoder layer, a pooling layer, and a mapping layer to obtain a question vector. The question vector is then matched with the answer vector in the relational network to calculate the score and obtain the answer.
[0023] The purpose of this invention is to provide an automated data retrieval system based on artificial intelligence technology, comprising:
[0024] Acquisition Unit: Acquires problem data;
[0025] Retrieval unit: Inputs the question data into the relational network to obtain the answer;
[0026] The generation process of the relationship network is as follows:
[0027] S1: Obtain the question dataset and the answer dataset;
[0028] S2: Input the question dataset and the answer dataset into a dual-branch autoencoder neural network. The dual-branch autoencoder neural network includes a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The question dataset obtains a question vector through the embedding layer and autoencoder layer in the question encoding module, and the answer dataset obtains an answer vector through the embedding layer and autoencoder layer in the answer encoding module.
[0029] S3: The question vector and the answer vector are input to the question matching layer to calculate the matching score between the vectors and obtain the matching relationship network.
[0030] The purpose of this invention is to provide an automated data retrieval device based on artificial intelligence technology, comprising:
[0031] The system includes a memory and a processor. The memory stores program instructions, and the processor invokes the program instructions. When the program instructions are executed, the automated data retrieval method based on artificial intelligence technology is implemented.
[0032] The purpose of this invention is to provide a computer-readable storage medium having a computer program stored thereon, comprising:
[0033] When the computer program is executed by the processor, it implements the automated data retrieval method based on artificial intelligence technology.
[0034] Advantages of this invention:
[0035] 1. By using a dual-branch autoencoder matching network model, the representation of questions and answers is optimized independently, while fine-grained interaction and matching score calculation are performed, which can accurately identify and match relevant question-answer pairs.
[0036] 2. An autoencoder based on quantum entanglement metric is adopted. In the autoencoder layer, the entanglement metric of quantum states is used to evaluate and optimize the information compression and transmission efficiency. This effectively reduces the data dimensionality while preserving important information as much as possible, improves the quality of data processing, and enhances the stability of the model when processing complex data.
[0037] 3. The shared parameter design of the dual-branch structure reduces model complexity and accelerates the training and retrieval process. Furthermore, the pooling and mapping layer design simplifies the computation process through fixed-length vectors and dot products between vectors, improving data processing speed.
[0038] 4. The model employs multiple loss functions, including quantum information topological sparsity loss, as well as dynamically adjusted learning rates and other training parameters, to help the model better adapt to the characteristics of the training data and optimize training performance.
[0039] 5. In the question-answering matching layer, the model not only calculates the similarity between overall vectors, but also performs more granular interactions, allowing the model to be more precise in matching questions and answers, thus improving the relevance and accuracy of retrieval. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A schematic diagram of an automated data retrieval method based on artificial intelligence technology provided in an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of an automated data retrieval system based on artificial intelligence technology provided in an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of an automated data retrieval device based on artificial intelligence technology provided in an embodiment of the present invention;
[0044] Figure 4 This is a diagram of a dual-branch self-encoding structure provided in an embodiment of the present invention. Detailed Implementation
[0045] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0046] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as S101, S102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0047] Figure 1 An embodiment of the present invention provides a schematic diagram of an automated data retrieval method based on artificial intelligence technology, which specifically includes:
[0048] S101: Obtain problem data;
[0049] In one embodiment, the training data for the artificial intelligence technology model used in this invention is in the form of question-and-answer pairs, preferably, the questions and answers are question-and-answer pair texts in the format of a knowledge graph.
[0050] In one embodiment, the problem data is text data in the medical field.
[0051] In one specific embodiment, the knowledge graph is composed of the following ontology:
[0052] entity:
[0053] {
[0054] patient,
[0055] Nutrients
[0056] Dietary recommendations
[0057] }
[0058] relation:
[0059] {suffering from,
[0060] Adjustment,
[0061] Limit intake,
[0062] Increase intake,
[0063] Moderate intake
[0064] }
[0065] In this embodiment, the six triples of are:
[0066] The patient suffers from hypertension;
[0067] Dietary recommendations for hypertension;
[0068] Dietary recommendations: Limit salt (sodium) intake;
[0069] Dietary recommendations: Increase vegetable intake;
[0070] Dietary recommendations: Reduce intake of saturated fat;
[0071] Dietary recommendations: Consume whole grains in moderation.
[0072] Furthermore, question-and-answer pairs are constructed based on triples. In this embodiment, two examples of question-and-answer pairs are as follows:
[0073] Question: What should people with high blood pressure eat more of?
[0074] Answer: People with high blood pressure need to increase their intake of vegetables.
[0075] Question: What foods should people with high blood pressure eat less of?
[0076] Answer: People with high blood pressure need to reduce their intake of saturated fats.
[0077] S102: Input the question data into the relationship network to obtain the answer;
[0078] The generation process of the relationship network is as follows:
[0079] S1: Obtain the question dataset and the answer dataset;
[0080] S2: Input the question dataset and the answer dataset into a dual-branch autoencoder neural network. The dual-branch autoencoder neural network includes a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The question dataset obtains a question vector through the embedding layer and autoencoder layer in the question encoding module, and the answer dataset obtains an answer vector through the embedding layer and autoencoder layer in the answer encoding module.
[0081] S3: The question vector and the answer vector are input to the question matching layer to calculate the matching score between the vectors and obtain the matching relationship network.
[0082] In one embodiment, quantum entanglement metric is a physical quantity used to quantitatively describe quantum entanglement. Quantum entanglement is a phenomenon in quantum mechanics where, after several particles interact with each other, the properties of each particle become integrated into the properties of the whole system, making it impossible to describe the properties of each particle individually, but only the properties of the overall system. This phenomenon is called quantum entanglement.
[0083] In one embodiment, the question dataset and the answer dataset are medical question-and-answer text data.
[0084] In one embodiment, the autoencoder layer in the question encoding module and the answer encoding module includes an encoder and a decoder. The encoder encodes data using a quantum entanglement metric to obtain a compressed vector, and the decoder reconstructs the compressed vector to obtain a question vector / answer vector.
[0085] In one embodiment, the function of the quantum entanglement metric Represented as:
[0086]
[0087] in, The output of the activation function, In the Gaussian mixture model, the first The weights of each component; For the first The mean of a Gaussian distribution; For the first The standard deviation of a Gaussian distribution; denoted as the number of Gaussian distributions.
[0088] In one embodiment, the data reconstruction further includes calculating reconstruction error and sparsity error; the reconstruction error is calculated using a mean squared error function, and the sparsity error is calculated using a topological sparsity loss function; the topological sparsity loss function... The calculation method is expressed as follows:
[0089]
[0090] in, This represents the encoder output. For the sparsity objective value, For the first The average activation value of each node in the coding layer; This represents the total number of nodes.
[0091] In one embodiment, the question encoding module and the answer encoding module further include a pooling layer, which feeds the output vector of the autoencoder layer to the pooling layer and aggregates it through an attention mechanism to obtain the question vector / answer vector.
[0092] In one embodiment, the question encoding module and the answer encoding module further include a mapping layer, whereby the vector is input to the mapping layer to obtain a question vector / answer vector; the mapping layer optimizes parameters using the Tianhui algorithm, whereby the parameters constitute the initial position and mass of celestial bodies in the simulation space of the Tianhui algorithm, calculates the velocity and direction of motion of celestial bodies under gravity by simulating the interaction between celestial bodies, and then updates the parameters by using the velocity and direction of motion.
[0093] The vectors input to the mapping layer to obtain the question vector / answer vector include: the output vectors of the embedding layer and the autoencoder layer are used as the input vectors of the mapping layer to obtain the question vector / answer vector; and the output vectors of the embedding layer, the autoencoder layer and the pooling layer are used as the input vectors of the mapping layer to obtain the question vector / answer vector.
[0094] In one embodiment, the question matching layer reduces the redundancy of the question vector / answer vector using regularization terms, and then calculates a matching score between the question vector and the answer vector using fine-grained vector matching to obtain the answer to the question; wherein, the regularization terms are calculated as follows:
[0095]
[0096] in, Represents a regular term, Indicates the redundancy of a vector. This is presented as a question. This is represented as the standard answer to the question, i.e., a positive sample. This is represented as a non-standard answer, i.e., a negative sample.
[0097] In one embodiment, the question data is sequentially passed through an embedding layer, an autoencoder layer, a pooling layer, and a mapping layer to obtain a question vector. The question vector is then matched with the answer vector in the relational network to calculate a score and obtain the answer.
[0098] In one specific embodiment, the structure of the dual-branch autoencoder matching network model is as follows: Figure 4 As shown, the dual-branch autoencoder matching network model has a dual-branch architecture, consisting of a question retrieval branch and an answer retrieval branch. These two branches share parameters and are used to extract vector representations of the question and answer, respectively. Each autoencoder in the dual-branch autoencoder matching network model includes an embedding layer, an autoencoder layer, a pooling layer, a mapping layer, and a question-answering matching layer.
[0099] The embedding layer and autoencoder layer structure are used to convert the input sentence into an embedded initial representation and encode the hidden state of each token position. The token is a common term in the art, which usually refers to a basic unit in a text sequence. It can be a word, a character or any other text fragment that can be processed by the model. This invention is designed with each commonly used Chinese word as a token.
[0100] The pooling layer extracts a fixed number of initial sentence vectors from a sequence of hidden states of variable length;
[0101] The mapping layer maps the pooled vectors to feature vectors within a specific interval, resulting in the final input sentence representation vector;
[0102] The question-answering matching layer performs fine-grained interactions between the representation vectors from the question and the answer and calculates a matching score.
[0103] In one specific embodiment, the embedding layer is the word embedding layer of the BERT model, which is used to convert the input sentence into an embedded representation of the initial state. It consists of three parts: word embedding layer, segment embedding layer and position embedding layer.
[0104] For an input sentence, preprocessing is first performed, breaking it down into a token sequence. If the sentence is too long, truncation is performed. Then, tokens are added to the beginning and end of the sequence. [CLS] and [SEP] Two special tokens are used to obtain the preprocessed sentence. ,in, The sequence length is given.
[0105] Furthermore, for The first in Each token, i.e. Find its word embedding vector at the word embedding layer. The search method is based on word segmentation and word indexing, and performs search matching in the embedded matrix obtained through training.
[0106] Furthermore, different segment numbers are assigned based on the type of the input sentence; a question is assigned a number of 0, while an answer is assigned a number of 1. The segment embedding vector is then retrieved at the segment embedding layer based on the segment number. .
[0107] Furthermore, according to the first The number is used to find its position embedding in the position embedding layer. ,final Embedded vector It can be represented as:
[0108]
[0109] Furthermore, the embedded representation of the entire input sentence is as follows: .
[0110] In one specific embodiment, the autoencoder layer employs an autoencoder structure, specifically a quantum entanglement-based autoencoder neural network. This network comprises an encoder and a decoder. The encoder utilizes quantum entanglement metrics to compress data, reducing its dimensionality; the decoder then attempts to reconstruct the original data from the compressed data. This invention evaluates and optimizes the information compression and transmission efficiency between nodes in the autoencoder neural network by constructing a quantum state entanglement metric.
[0111] The encoder of the autoencoder neural network based on quantum entanglement measurement is a 5-layer fully connected neural network with the following number of neurons: 100, 50, 100 The decoder is a 5-layer fully connected neural network with the following number of neurons: 100, 50, 100 Specifically, the training process for the autoencoder neural network based on quantum entanglement measurement is as follows:
[0112] (1) Initialize the weights and biases of the encoder and decoder with small random numbers and set the initial learning rate, which can be expressed as:
[0113]
[0114]
[0115] in, The initial weight matrix; The initial bias vector; For the dimensions of the input data; This refers to the dimensions of the output data.
[0116] (2) The input feature vector enters the encoder and is converted into an intermediate compressed representation through the activation function, which can be expressed as:
[0117]
[0118] in, It is a nonlinear dynamic system function, determined by parameters. Control, specifically the calculation method, can be expressed as:
[0119]
[0120] Among them, the arctangent function is used. Achieving nonlinear dynamic characteristics can effectively amplify small changes in input data and improve the overall sensitivity of the system; It is a non-linear adjustment factor; It is an adaptive feature association metric function. Preferably, the parameters... The value is set to 0.5.
[0121] Furthermore, the adaptive feature association metric function From parameter set Control, its calculation method can be expressed as:
[0122]
[0123] in, This represents the feature combination operation. It is a feature and The correlation weights between them belong to the parameter set. .
[0124] Furthermore, the definition and parameter adjustment method of feature combination operation can be expressed as follows:
[0125]
[0126]
[0127] in, express and dot product operation, express and The square of the L2 norm, express and The square of the L2 norm, Indicates the first One characteristic, Indicates the first One characteristic, Indicates the first One characteristic, Indicates the first One characteristic, The number of eigenvalues in the feature combination operation. It is the square of the L2 norm.
[0128] Furthermore, the intermediate representation, after quantum entanglement metric transformation, optimizes information compression efficiency and improves data dimensionality reduction quality, and can be expressed as:
[0129]
[0130] in, The output of the activation function; For quantum entanglement measurement function; for Layer output.
[0131] In one specific embodiment, the quantum entanglement function The calculation method can be expressed as:
[0132]
[0133] in, In the Gaussian mixture model, the first The weights of each component; For the first The mean of a Gaussian distribution; For the first The standard deviation of a Gaussian distribution; denoted as the number of Gaussian distributions.
[0134] Furthermore, the compressed data is fed into the decoder to attempt to reconstruct the original data.
[0135] (3) A quantum information topological sparse loss function is used, which includes reconstruction error and sparse metric error, to guide model optimization. The reconstruction error helps ensure that the dimensionality-reduced data retains as many characteristics as possible of the original data, and the sparse metric error is used to optimize the information compression process in the encoder, so that the model improves the efficiency and accuracy of data processing while achieving dimensionality reduction. Preferably, the reconstruction error adopts the mean squared error function, and the sparse metric error adopts the topological sparse loss function. Then, the calculation method of the total loss function can be expressed as:
[0136]
[0137] in, This is the total loss function; This represents the mean square error function, used to calculate the input. With reconstruction output The error between; This represents the topological sparse loss function, used to evaluate the output of the coding layer. sparsity; and These are the weighting coefficients for the first loss term and the second loss term, respectively.
[0138] In one specific embodiment, the topological sparsity loss function The calculation method can be expressed as:
[0139]
[0140] in, The sparsity target value is preferably set to a small value close to 0; For the first The average activation value of each node in the coding layer; This represents the total number of nodes.
[0141] Furthermore, the weighting coefficient of the first loss term Weighting coefficients of the second loss term and sparsity objective value The settings are configured using an adaptive dynamic adjustment method. Specifically, in the t-th iteration, the weight coefficient of the first loss term is... The calculation method can be expressed as:
[0142]
[0143] Similarly, in the t-th iteration, the weight coefficient of the second loss term... The calculation method can be expressed as:
[0144]
[0145] Furthermore, the sparsity objective value The calculation method can be expressed as:
[0146]
[0147] in, Let be the sparsity objective value for the t-th iteration (i.e., the current iteration). Let be the weight coefficient of the second loss term in the t-th iteration (i.e., the current iteration). The weight coefficients of the first loss term in the t-th iteration (i.e., the current iteration); As a regulating factor; This is the time offset; The maximum and minimum values of the sparse objective from previous iterations are used to determine the range of sparsity adjustment. Preferably, Set it to 4.
[0148] (4) Based on the error calculated from the loss function, update the weights and biases in the network using the chain rule. Preferably, this invention uses gradient descent to optimize the parameters and minimizes the total loss through backpropagation, which can be expressed as:
[0149]
[0150]
[0151] in, and These represent the gradients with respect to the weights and biases, respectively. Indicates the l-th layer. This is the sign for the partial derivative.
[0152] Furthermore, the quantum entanglement metric function is dependent on the input derivative The calculation method can be expressed as:
[0153]
[0154] (5) After each iteration, update the parameters based on the learning rate and the calculated gradient, and adjust them using gradient descent. and To minimize the loss function , can be represented as:
[0155]
[0156]
[0157] in, and These are the updated weights and biases, respectively. and These are the weights and biases before the update. Let the learning rate be . Preferably, the learning rate is . Set to 0.01.
[0158] (6) Repeat the above steps until the preset stopping iteration condition is met, which indicates that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching the preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0159] The autoencoder layer extracts the hidden state sequence of the sentence. Its length is consistent with the number of tokens in the preprocessed sentence and is of variable length. Therefore, after the autoencoder neural network based on quantum entanglement metric is trained, the output of the encoder in the autoencoder layer is the hidden state sequence representation of the sentence. .
[0160] In one specific embodiment, the purpose of the pooling layer is to aggregate information from a sequence of hidden states of variable length to obtain a sentence vector representation of fixed length. The pooling layer is configured with... A learnable query vector Query is used as a network parameter. Query=[quer y 1 ,quer y 2 ,⋯,quer y i ,⋯,quer y k ] The output of the encoder Process each query vector The dimensions are consistent with the hidden state dimensions, query From the hidden state sequence via attention mechanism The corresponding initial sentence vector is obtained by aggregation. The overall calculation process can be represented as follows:
[0161]
[0162]
[0163]
[0164]
[0165] in, There are three projection matrices, all of which are learnable parameters. The dimension of the hidden state. The initial sentence vector obtained by pooling Dimensions.
[0166] In one specific embodiment, the mapping layer is used to map each initial sentence vector. Mapping to feature vectors within a specific interval, in a two-branch autoencoder matching network model, the matching relationship between a question and an answer is achieved by calculating the cosine similarity of their vectors; a higher cosine similarity indicates a better match. The purpose of mapping the pooled vectors is that the dot product of the mapped vectors is equivalent to the cosine similarity before mapping, and the dot product can be easily converted into matrix multiplication for calculation, supporting efficient approximate nearest neighbor search.
[0167] The mapping layer of this invention employs a neural network optimized based on the Tianhui algorithm. This optimized neural network is a three-layer fully connected neural network, with each layer containing a specific number of neurons. In existing technologies, some solutions use neural networks for feature extraction. However, certain neural network structures may encounter problems such as vanishing gradients, exploding gradients, or getting trapped in local optima, affecting training stability and model performance. Inspired by the interaction between planetary trajectories and gravity, the Tianhui algorithm does not rely on traditional gradient descent methods. Instead, it uses the simulation of celestial motion to find optimal paths, achieving efficient parameter optimization in the neural network.
[0168] Specifically, the training process for the neural network optimized based on the Tianhui algorithm is as follows:
[0169] (1) Initialize the parameters of the neural network, including the weights. and bias These parameters will be represented in the simulation space as the initial position and mass of the celestial body, with the position of each parameter... The calculation method can be expressed as:
[0170]
[0171]
[0172] in, It is the distance from the origin of the parameter space to the position of the parameter. It is the angle of the parameter in the parameter space. Preferably, the parameter is initialized randomly.
[0173] (2) Based on the initial position of the parameters, define a virtual gravitational field. The movement of each parameter is affected by the gravitational force of other parameters, simulating the interaction between celestial bodies. Each parameter point The gravitational force experienced can be calculated as follows:
[0174]
[0175] in, It is a parameter point and The gravitational force between them It is the gravitational constant. and It is the parameter quality. It is the distance between two points.
[0176] Furthermore, The calculation is based on Euclidean distance and can be expressed as:
[0177]
[0178] in, and These are parameter points. and The coordinate position in the parameter space.
[0179] (3) Calculate the acceleration and velocity of each parameter under the influence of gravity, update its motion state according to the laws of physics, and the parameter points acceleration The calculation method can be expressed as:
[0180]
[0181] Furthermore, the velocity of the parameter points and location The update method can be represented as:
[0182]
[0183]
[0184] in, This refers to the time step. Preferably, the calculation is performed every 3 iterations, i.e., The value is 3.
[0185] Furthermore, acceleration The calculation is based on all pairs The cumulative gravitational force at a point can be expressed as:
[0186]
[0187] Further calculations are as follows:
[0188]
[0189] Among them, synergy The direction is determined by the direction of gravity, which can be further decomposed into components in the x and y directions:
[0190]
[0191]
[0192] in, and respectively resultant force about shaft and The decomposition vector of the axis.
[0193] In each iteration cycle, all parameters are updated according to their velocity and direction. and The update method can be represented as:
[0194]
[0195]
[0196] in, It is the learning rate hyperparameter. and These are the increments for the weights and biases, respectively. Preferably, Set to 0.01.
[0197] (5) Dynamically adjust the gravitational constant according to the current optimization progress to simulate celestial behavior under different environments and optimize search efficiency. Specifically, the gravitational constant... The adjustment method can be expressed as:
[0198]
[0199] in, Adjusted gravitational constant, The gravitational parameters before adjustment. For learning rate, For the total loss function, Let be the total loss function value in the t-th iteration. Preferably, the parameters... It was set to 0.01.
[0200] (6) Repeat the above steps until the preset stopping iteration condition is met, which indicates that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching the preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0201] Based on this, the pooled vector sequence After mapping, the final result is obtained. A sequence of sentence vectors ,in, The calculation method is as follows:
[0202]
[0203] in, for The length of the module.
[0204] In one specific embodiment, the question-answering matching layer performs fine-grained interaction on the representation vectors from the question and answer and calculates a matching score. In one embodiment, let the question... and answer After processing by the preprocessor network, the following results were obtained: dimensional representation vector , respectively corresponding to and If the dot product of vectors is approximately equivalent to the cosine similarity score, then the mean of the matching scores for all features is the final matching score. , can be represented as:
[0205]
[0206] Compared to traditional representational models that can only match single vectors between sentences, the dual-branch autoencoder matching network model obtains multiple vector representations of a sentence through attention pooling, providing fine-grained interactions between features. Furthermore, because... and Calculating the dot product of each vector and then summing them is equivalent to first... and Each vector is concatenated separately to obtain and Then, calculating the dot product of the concatenated vectors can be expressed as:
[0207]
[0208]
[0209]
[0210] Here, concat represents the vector concatenation operation.
[0211] Furthermore, the mapping layer and the question-answering matching layer are trained together, therefore the same loss function is used. To impose constraints, assume that the format of each training sample during the training of the two-branch autoencoder matching network model is as follows: In the form of, For the question, This is the standard answer to the question, i.e., the positive sample. These are non-standard answers, i.e., negative samples. During training, for each... It will include other training samples within the same batch. and If all samples are used as negative samples to improve data utilization and accelerate model convergence, then the main loss function of the dual-branch autoencoder matching network model is:
[0212]
[0213] in, Indicates batch size, score This represents the matching score calculated by the model. The temperature coefficient is used as the loss function, and the idea is to increase the matching score between the question and positive sample answers, and decrease the matching score between the question and negative sample answers. Preferably, the temperature coefficient... Set it to 5.
[0214] The two-branch autoencoder matching network model extracts from each sentence. Multiple vectors can be used to achieve fine-grained matching of multiple feature vectors; however, if the extracted vectors... If vectors are too similar, the matching becomes meaningless. To increase the differences between vectors of the same sentence and reduce redundancy, this invention uses a regularization term to force multiple vectors to be as pairwise orthogonal as possible. Specifically, let the model be a sentence. Extracted representation vectors Then define The redundancy of the representation vector is for:
[0215]
[0216] Redundancy is defined as the average of the absolute values of the pairwise dot products of all vectors; a smaller redundancy indicates that the vectors are closer to orthogonality. During training, the dual-branch autoencoder matching network model processes each training sample... Redundancy is calculated for each sentence in the code, and the average of the three values is taken as the regularization term, which can be expressed as:
[0217]
[0218] Based on this, the total loss function of the dual-branch autoencoder matching network model The sum of the principal loss and the regularization term can be expressed as:
[0219]
[0220] In one embodiment, the process of generating the relationship network is as follows:
[0221] S1: Obtain the question dataset and labels, and the answer dataset and labels;
[0222] S2: Input the question dataset and labels, the answer dataset and labels into a dual-branch autoencoder neural network. The dual-branch autoencoder neural network includes a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The question dataset obtains a question vector through the embedding layer and autoencoder layer in the question encoding module. The answer dataset obtains an answer vector through the embedding layer and autoencoder layer in the answer encoding module.
[0223] S3: The question vector and the answer vector are input to the question matching layer to calculate the matching score between the vectors, and the matching score is compared with the label. Based on the comparison result, the trained dual-branch autoencoder neural network is obtained; the answer encoding module of the trained dual-branch autoencoder neural network is frozen to obtain the matching relationship network.
[0224] In one embodiment, when training with question data and answer data, the model passes through a dual-branch encoding module and a question matching layer in sequence to obtain a dual-branch autoencoder neural network. The model parameters are saved, and the saved model is frozen or the answer branch is removed to obtain a relationship network.
[0225] In one embodiment, the relational network is obtained based on a two-branch autoencoder neural network. The relational network is obtained by freezing / removing the answer branches of the two-branch autoencoder neural network and using the remaining structure. The network structure consists of an embedding layer, an autoencoder layer, a pooling layer, a mapping layer, and a question matching layer. The training of the two-branch autoencoder neural network is obtained through multiple rounds of training iterations. After each round of training results, a primary relational network can be obtained by saving the model data and removing the answer branches. After multiple rounds of training iterations, the training of the two-branch autoencoder neural network model is completed. The relational network is obtained by removing the answer branches of the trained two-branch autoencoder neural network.
[0226] In one specific embodiment, after the model training is completed, the answer to the question is retrieved. First, the input question is preprocessed and vectorized, including word segmentation and using an embedding layer to obtain a comprehensive vector representation; further, these vectors are compressed and decoded through an autoencoder layer to extract features and optimize the representation; further, a pooling layer integrates these features into a fixed-length sentence vector through an attention mechanism; further, a mapping layer processes this vector to optimize subsequent matching calculations; finally, a question matching layer calculates the matching score between the question vector and each answer vector in the pre-stored answer database, and selects the answer with the highest score as the final answer.
[0227] In one embodiment, the automated data retrieval method based on artificial intelligence technology uses a dual-branch autoencoder neural network model consisting of a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The encoding module sequentially includes an embedding layer, an autoencoder layer, a pooling layer, and a mapping layer. The training scheme includes any of the following:
[0228] A two-branch autoencoder neural network is obtained by performing quantum entanglement metric encoding optimization training on the encoder of the autoencoder layer.
[0229] A two-branch autoencoder neural network is obtained by calculating the reconstruction error and sparsity error of the decoder data reconstruction of the autoencoder layer;
[0230] A dual-branch autoencoder neural network is obtained by optimizing the encoder and decoder of the autoencoder layer by performing quantum entanglement measurement and calculation of reconstruction error and coefficient error;
[0231] Attention pooling is applied to the pooling layers to train a dual-branch autoencoder neural network.
[0232] A dual-branch autoencoder neural network is obtained by optimizing the mapping layer parameters based on the Tianhui algorithm;
[0233] The mapping layer parameters are optimized based on the Tianhui algorithm, and attention pooling training is performed to obtain a dual-branch autoencoder neural network.
[0234] A dual-branch autoencoder neural network is obtained by fine-grained matching optimization of the problem matching layer using regularization terms;
[0235] The autoencoder layer is optimized for quantum entanglement, reconstruction error, and sparsity error. An attention pooling layer, a regularization term, and a fine-grained matching problem matching layer are then applied to obtain a dual-branch autoencoder neural network.
[0236] The autoencoder layer is optimized by quantum entanglement, reconstruction error, and sparsity error. Attention pooling layer is used, the mapping layer parameters are optimized based on the Tianhui algorithm, and a problem matching layer with regularization term and fine-grained matching is added to obtain a dual-branch autoencoder neural network.
[0237] Figure 2 An embodiment of the present invention provides a schematic diagram of an automated data retrieval system based on artificial intelligence technology, which specifically includes:
[0238] Acquisition Unit: Acquires problem data;
[0239] Retrieval unit: Inputs the question data into the relational network to obtain the answer;
[0240] The generation process of the relationship network is as follows:
[0241] S1: Obtain the question dataset and the answer dataset;
[0242] S2: Input the question dataset and the answer dataset into a dual-branch autoencoder neural network. The dual-branch autoencoder neural network includes a dual-branch encoding module and a question matching layer. The dual-branch encoding module consists of a parallel question encoding module and an answer encoding module. The question dataset obtains a question vector through the embedding layer and autoencoder layer in the question encoding module, and the answer dataset obtains an answer vector through the embedding layer and autoencoder layer in the answer encoding module.
[0243] S3: The question vector and the answer vector are input to the question matching layer to calculate the matching score between the vectors and obtain the matching relationship network.
[0244] Figure 3An embodiment of the present invention provides a schematic diagram of an automated data retrieval device based on artificial intelligence technology, specifically including:
[0245] A memory and a processor; the memory is used to store program instructions; the processor is used to invoke the program instructions, and when any one of the program instructions is executed, an automated data retrieval method based on artificial intelligence technology is described above.
[0246] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, is any one of the above-mentioned automated data retrieval methods based on artificial intelligence technology.
[0247] The verification results of this verification embodiment show that assigning inherent weights to indications can improve the performance of this method compared to the default settings. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated; the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of this embodiment. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0248] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0249] The computer device provided by the present invention has been described in detail above. For those skilled in the art, there will be changes in the specific implementation and application scope based on the ideas of the embodiments of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An automated data retrieval method based on artificial intelligence technology, characterized by, The method comprises: acquiring question data; feeding the question data into a relationship network to obtain an answer; wherein the generation process of the relationship network is: S1: acquiring a question data set and an answer data set; S2: feeding the question data set and the answer data set into a double-branch self-encoding neural network, the double-branch self-encoding neural network comprising a double-branch encoding module and a question matching layer, the double-branch encoding module being composed of parallel question encoding modules and answer encoding modules, the question data set being converted into a question vector through an embedding layer and a self-encoding layer in the question encoding modules, and the answer data set being converted into an answer vector through an embedding layer and a self-encoding layer in the answer encoding modules; the question encoding modules and the answer encoding modules further comprising a pooling layer and a mapping layer, the output vector of the self-encoding layer being fed into the pooling layer to be aggregated through an attention mechanism and then fed into the mapping layer to be mapped to obtain the question vector / answer vector; the self-encoding layer in the question encoding modules and the answer encoding modules comprising an encoder and a decoder, the encoder converting data into a compressed vector through quantum entanglement measurement, and the decoder reconstructing the compressed vector to obtain the question vector / answer vector; the feature vector is input into the encoder, converted into an intermediate compressed representation through an activation function, and converted into a compressed vector through quantum entanglement; Intermediate compressed representation z (l) The formula is: represents a nonlinear dynamic system function, is a nonlinear adjustment factor; data reconstruction uses a quantum information topology sparse loss function, the quantum information topology sparse loss function comprising a reconstruction error and a sparsity measurement error, and parameters are updated according to a learning rate and a calculated gradient to minimize the quantum information topology sparse loss function; the pooling layer aggregates information of an indefinite-length hidden state sequence through an attention mechanism to obtain a fixed-length vector representation; the mapping layer optimizes parameters through a n-body algorithm, the parameters constituting initial positions and masses of celestial bodies in a simulation space of the n-body algorithm, calculating velocities and directions of the celestial bodies under gravity through simulation of interactions between the celestial bodies, and updating the parameters to obtain updated parameters through the velocities and directions; S3: the question vector and the answer vector are fed into the question matching layer to calculate a matching score between the vectors to obtain a matched relationship network. 2.The AI technology-based automated data retrieval method of claim 1, wherein, a function of the quantum entanglement measure is represented as: wherein, is an output of an activation function, is a weight of the th component in a Gaussian mixture model; is a mean of the th Gaussian distribution; is a standard deviation of the th Gaussian distribution; is a number of Gaussian distributions. 3.The AI technology-based automated data retrieval method of claim 1, wherein, The reconstruction error is calculated by a mean square error function, and the sparsity error is calculated by a topological sparsity loss function; the topological sparsity loss function is calculated in a manner represented as: wherein, represents the output of the encoder, is a sparsity target value, is the average activation value of the th node at the encoding layer; is the total number of nodes. 4.The AI technology-based automated data retrieval method of claim 1, wherein, The question matching layer reduces the redundancy of the question vector / answer vector through a regularization term, and then calculates a matching score of the question vector and the answer vector through vector fine-grained matching to obtain an answer to the question; wherein the regularization term is calculated in the following manner: wherein, denotes a regularizer, denotes the redundancy of the vector, denotes the problem, denotes the standard answer to this problem, i.e. the positive sample, denotes the non-standard answer, i.e. the negative sample. 5.The AI technology-based automated data retrieval method of claim 1, wherein, The question data is sequentially converted into a question vector through an embedding layer, a self-encoding layer, a pooling layer, and a mapping layer, and a matching score of the question vector and an answer vector in the relationship network is calculated to obtain an answer.
6. An automated data retrieval system based on artificial intelligence technology, characterized by, comprises: an acquisition unit that acquires question data; a retrieval unit that feeds the question data into a relationship network to obtain an answer; wherein the generation process of the relationship network is: S1: acquiring a question data set and an answer data set; S2: input the question data set and the answer data set into a double-branch self-encoding neural network, the double-branch self-encoding neural network comprising a double-branch encoding module and a question matching layer, the double-branch encoding module being composed of a question encoding module and an answer encoding module in parallel, the question data set being converted into a question vector through an embedding layer and a self-encoding layer in the question encoding module, and the answer data set being converted into an answer vector through an embedding layer and a self-encoding layer in the answer encoding module; the question encoding module and the answer encoding module further comprising a pooling layer and a mapping layer, the output vector of the self-encoding layer being input into the pooling layer, aggregated through an attention mechanism, and then input into the mapping layer to obtain the question vector / answer vector; the self-encoding layer in the question encoding module and the answer encoding module comprising an encoder and a decoder, the encoder encoding data through quantum entanglement measurement to obtain a compressed vector, and the decoder reconstructing data from the compressed vector to obtain the question vector / answer vector; The feature vector is input into the encoder, converted into an intermediate compressed representation through an activation function, and converted into a compressed vector through quantum entanglement; represents a nonlinear dynamic system function, is a nonlinear adjustment factor; Data reconstruction uses a quantum information topology sparse loss function, the quantum information topology sparse loss function comprising a reconstruction error and a sparsity measurement error, and parameters are updated according to a learning rate and a calculated gradient to minimize the quantum information topology sparse loss function; The pooling layer aggregates information of an indefinite-length hidden state sequence through an attention mechanism to obtain a fixed-length vector representation; The mapping layer optimizes parameters through a N-body algorithm, the parameters constituting initial positions and masses of celestial bodies in a simulation space of the N-body algorithm, calculating movement speed and direction of the celestial bodies under gravity through simulation of interactions between the celestial bodies, and updating the parameters to obtain updated parameters through the movement speed and direction; S3: the question vector and the answer vector are input into the question matching layer to calculate a matching score between the vectors to obtain a matched relationship network.
7. An automated data retrieval device based on artificial intelligence technology, characterized by, Comprise: a memory and a processor, the memory being used to store program instructions; the processor being used to call the program instructions, when the program instructions are executed, realizing the automatic data retrieval method based on artificial intelligence technology in any one of claims 1-5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, Comprise: the computer program being executed by the processor realizes the automatic data retrieval method based on artificial intelligence technology in any one of claims 1-5.
Citation Information
Patent Citations
Robot vision SLAM closed-loop detection method based on stack type combined auto-encoder
CN111753789A
Question and answer text matching method based on multilayer semantic feature extraction structure
CN111831789A