Data retrieval method and device for intelligent agent task, and storage medium

By dynamically quantifying the relevance of heterogeneous data source fields to the task through attention mechanisms and random forest classifiers, the problems of low efficiency and insufficient accuracy in traditional data retrieval methods are solved, and efficient and accurate data retrieval is achieved.

CN120910109BActive Publication Date: 2026-03-27ZHONGDIAN DATA IND CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional data retrieval methods are inefficient and error-prone, and cannot meet the needs of accurate matching and efficient retrieval of heterogeneous data sources.

Method used

An attention mechanism is used to dynamically quantify the relevance of heterogeneous data source fields to the task. Target fields are selected for data retrieval by sorting through attention weights, and accurate matching is achieved by combining a random forest classifier and a pre-set index database.

Benefits of technology

It improves the efficiency and accuracy of data retrieval, adapts to different task requirements, and enhances the robustness and adaptability of data retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910109B_ABST
    Figure CN120910109B_ABST
Patent Text Reader

Abstract

The application discloses an agent task-oriented data retrieval method and device and a storage medium, relates to the technical field of data retrieval, and comprises the following steps: obtaining a to-be-processed task in an agent; determining attention weights of a plurality of preset available fields on the to-be-processed task based on an attention mechanism, wherein the preset available fields are available fields contained in a heterogeneous data source connected with the agent; sorting the attention weights in descending order to obtain a sorting queue, and selecting at least one attention weight located in the front row in the sorting queue as a target attention weight; determining that a preset available field corresponding to the target attention weight is a target field, retrieving the heterogeneous data source based on the target field to obtain a target data set, and processing the to-be-processed task based on the target data set. The application improves the data retrieval efficiency and retrieval accuracy of the heterogeneous data source.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data retrieval, and particularly relates to a data retrieval method for an intelligent agent task, a device and a storage medium. BACKGROUND

[0002] In today's digital era, data has become the core resource of many complex business scenarios, especially in the fields of financial risk control and supply chain management. Accurate matching and efficient retrieval of data are crucial for the normal operation of businesses. These business scenarios often involve multiple data sources, such as structured databases, unstructured documents and real-time sensor data. These data sources are referred to as heterogeneous data sources, which have different formats, storage and update frequencies, bringing challenges to data collaborative processing.

[0003] However, traditional data retrieval relies on manual definition of related fields and then searches for corresponding data from each data source. This method is inefficient and prone to errors. When manually selecting fields, some fields may be missed or selected incorrectly, resulting in data that cannot meet the task requirements.

[0004] Therefore, how to improve the data retrieval efficiency and accuracy of heterogeneous data sources has become a technical problem to be solved in the technical field. SUMMARY

[0005] The main purpose of the present application is to provide a data retrieval method for an intelligent agent task, a device and a storage medium, which aims to solve the technical problem of how to improve the data retrieval efficiency and accuracy of heterogeneous data sources.

[0006] To achieve the above-mentioned purpose, the present application provides a data retrieval method for an intelligent agent task, which comprises the following steps:

[0007] Obtaining a to-be-processed task in an intelligent agent;

[0008] Determining the attention weights of a plurality of preset available fields on the to-be-processed task based on an attention mechanism, wherein the preset available fields are available fields contained in a heterogeneous data source connected to the intelligent agent;

[0009] Sorting each attention weight in descending order to obtain a sorting queue, and selecting at least one target attention weight located in the front row of the sorting queue as a target attention weight;

[0010] Determining the target field corresponding to the target attention weight as a target field, retrieving the heterogeneous data source based on the target field to obtain a target data set, and processing the to-be-processed task based on the target data set.

[0011] In an embodiment, the step of determining the attention weights of the plurality of preset available fields on the to-be-processed task based on the attention mechanism comprises:

[0012] encoding the to-be-processed task to obtain a first encoding vector, and encoding the plurality of preset available fields respectively to obtain second encoding vectors;

[0013] taking the first encoding vector as a query vector and taking each of the second encoding vectors as a key vector, calculating the similarity between the query vector and each of the key vectors through an attention function;

[0014] normalizing each of the similarities to obtain normalized similarities, and determining that each of the normalized similarities is the attention weight of each of the preset available fields on the to-be-processed task.

[0015] In an embodiment, before the step of determining the attention weights of the plurality of preset available fields on the to-be-processed task based on the attention mechanism, the method further comprises:

[0016] inputting the plurality of preset available fields into a preset random forest classifier to output feature importance values corresponding to each of the preset available fields;

[0017] filtering, from the plurality of preset available fields, preset available fields with feature importance values greater than or equal to a preset threshold;

[0018] based on the filtered preset available fields, performing the step of determining the attention weights of the plurality of preset available fields on the to-be-processed task based on the attention mechanism.

[0019] In an embodiment, the step of retrieving the target data set from the heterogeneous data source based on the target field comprises:

[0020] finding a target index feature vector matching the target field in a preset index database, wherein the preset index database comprises at least one index feature vector, each of the index feature vectors is used to index original data in the heterogeneous data source, and different index feature vectors index different original data;

[0021] retrieving the heterogeneous data source based on the target index feature vector, and combining the retrieved original data to obtain a target data set.

[0022] In an embodiment, the step of finding a target index feature vector matching the target field in a preset index database comprises:

[0023] vectorizing the target field to obtain a target vector;

[0024] For each index feature vector in the preset index database, calculate the Euclidean distance and the Manhattan distance between the target vector and the index feature vector, and perform weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance;

[0025] Screen target fusion distances that meet a preset approximate nearest neighbor search condition from the fusion distances, and determine the index feature vector corresponding to the target fusion distance as a target index feature vector.

[0026] In an embodiment, the step of performing weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance comprises:

[0027] Multiply the Euclidean distance by a first preset coefficient to obtain a first distance;

[0028] Multiply the Manhattan distance by a second preset coefficient to obtain a second distance, wherein the second preset coefficient is smaller than the first preset coefficient;

[0029] Calculate the sum value between the first distance and the second distance to obtain a fusion distance.

[0030] In an embodiment, before the step of searching for a target index feature vector matching the target field in a preset index database, the method further comprises:

[0031] Obtain multi-source heterogeneous data from heterogeneous data sources, wherein the heterogeneous data sources include at least two heterogeneous data sources, and the multi-source heterogeneous data includes raw data from each of the data sources;

[0032] Perform data preprocessing on the multi-source heterogeneous data to obtain cleaned data, wherein the data preprocessing includes unifying timestamp formats and unifying physical parameter units;

[0033] Perform feature extraction on the cleaned data to obtain feature vectors, and perform L2 normalization processing on each of the feature vectors to obtain an index feature vector corresponding to each of the raw data;

[0034] Create or update the preset index database based on the index feature vector corresponding to each of the raw data.

[0035] In an embodiment, the step of performing feature extraction on the cleaned data to obtain feature vectors comprises:

[0036] If the cleaned data includes single-modal text data, perform feature extraction on the single-modal text data by using a LayoutLMv3 model to obtain a feature vector corresponding to the single-modal text data;

[0037] If the single-modal image data is included in the cleaning data, feature extraction is performed on the single-modal image data by a ResNet-50 model to obtain a feature vector corresponding to the single-modal image data;

[0038] If the multi-modal image-text data is included in the cleaning data, feature extraction is performed on text data in the multi-modal image-text data by a LayoutLMv3 model, feature extraction is performed on image data in the multi-modal image-text data by a ResNet-50 model, and the feature extraction results of the LayoutLMv3 model and the ResNet-50 model are spliced to obtain a feature vector corresponding to the multi-modal image-text data.

[0039] If the sensor data is included in the cleaning data, feature extraction is performed on the sensor data by a preset time-series feature extraction model to obtain a feature vector corresponding to the sensor data.

[0040] In addition, to achieve the above object, the present application also provides a data retrieval device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the above-mentioned data retrieval method for intelligent agent tasks.

[0041] In addition, to achieve the above object, the present application also provides a readable storage medium, which is a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the steps of the above-mentioned data retrieval method for intelligent agent tasks.

[0042] The present application also provides a computer program product comprising a computer program, which is executed by a processor to implement the steps of the above-mentioned data retrieval method for intelligent agent tasks.

[0043] The one or more technical solutions proposed in the present application have at least the following technical effects:

[0044] The application improves the data retrieval efficiency and accuracy by introducing an attention mechanism to dynamically quantify the relevance of heterogeneous data source fields to tasks. Specifically, after obtaining the to-be-processed task in the agent, the importance of each preset available field is quantitatively evaluated using the attention mechanism, thereby dynamically determining the attention weight of each field to the current task, avoiding the subjectivity and inefficiency of traditional manual definition of relevant fields, and automatically identifying the most relevant field to the task according to the specific requirements of the task. Then, the attention weights are sorted and the top preset number of fields with the highest weights are selected as target fields, so that the most valuable data fields for the current task are filtered out, and the retrieval range is accurately compressed to the field subset related to the task. Finally, the heterogeneous data source is accurately retrieved based on the target field to obtain the target data set that meets the task requirements, thereby improving the efficiency and accuracy of data retrieval. In addition, the dynamic weight calculation mechanism makes the field filtering result adapt to different task requirements in real time, without relying on predefined static rules, and can maintain filtering accuracy when the heterogeneous data source is expanded, thereby solving the problem that artificial rules are difficult to adapt to business changes and improving the robustness of data retrieval. BRIEF DESCRIPTION OF DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0047] Figure 1 Flowchart of the first embodiment of the data retrieval method for agent tasks of the present application;

[0048] Figure 2 Flowchart of the third embodiment of the data retrieval method for agent tasks of the present application;

[0049] Figure 3 Retrieval flowchart involved in the first embodiment of the data retrieval method for agent tasks of the present application;

[0050] Figure 4 System structure diagram of the agent of the present application;

[0051] Figure 5 Device structure diagram of the hardware running environment involved in the data retrieval method device for agent tasks in the embodiments of the present application.

[0052] The objectives, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0053] In order to make the above objectives, features and advantages of the present application more apparent, clear and complete, the technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0054] It should be noted that the execution subject of each embodiment of the data retrieval method for the agent task in the present application can be a computing service device with data processing, network communication and program running functions, such as a server, a tablet computer, a personal computer, a mobile phone, etc., or a data retrieval device capable of realizing the above functions, and each embodiment of the data retrieval method for the agent task in the present application does not make a specific limitation thereon.

[0055] Based on this, the present application proposes a first embodiment of a data retrieval method for an agent task, as shown in Figure 1 The data retrieval method for the agent task includes the following steps S10-S40:

[0056] Step S10, obtaining a to-be-processed task in an agent;

[0057] The agent refers to an intelligent system or software entity capable of autonomously perceiving the environment and dynamically adjusting the behavior according to the task requirements. For example, an intelligent command system for disaster monitoring and resource allocation in a flood fighting and disaster relief scene, an intelligent analysis module for risk assessment in a financial risk control system, or an intelligent scheduling module for inventory optimization in a supply chain management system.

[0058] The to-be-processed task refers to a specific data processing task currently required to be executed by the agent, such as a resource allocation task, a disaster area evaluation task, a risk assessment task, etc. in the flood fighting and disaster relief scene. These tasks are usually initiated by a system user or automatically triggered by the system.

[0059] Step S20, determining attention weights of a plurality of preset available fields to the to-be-processed task based on an attention mechanism, wherein the preset available fields are available fields contained in a heterogeneous data source connected with the agent;

[0060] The preset available fields refer to a set of fields in the connected heterogeneous data sources of the agent that are predefined and available for data retrieval and processing. In the flood rescue scenario, these fields can come from structured databases (such as geographic information of the affected area, rescue material inventory information), unstructured documents (such as real-time images and video descriptions of the affected area), or real-time sensor data (such as real-time water level data from water level sensors, rainfall data from weather sensors).

[0061] The attention mechanism is an algorithm that simulates human attention allocation, which assigns an attention weight value to each field by calculating the relevance of each preset available field to the task to be processed. This weight value reflects the importance of the field to the current task, for example, in the flood rescue task, the "real-time water level" field may be assigned a higher weight, while the "historical event record" field may be assigned a lower weight.

[0062] Step S30, the attention weights are sorted in descending order to obtain a sorted queue, and at least one attention weight located in the front of the sorted queue is selected as a target attention weight;

[0063] All calculated attention weights are sorted in descending order to form a sorted queue. Then, at least one attention weight located in the front of the sorted queue is selected as a target attention weight, for example, the top 5 attention weights in the sorted queue can be selected as the target attention weights. The number of selected target attention weights can be flexibly adjusted according to task requirements and system resources to ensure that the number of selected fields can meet the task requirements and not introduce too much redundant data.

[0064] Step S40, determining the preset available field corresponding to the target attention weight as a target field, retrieving the heterogeneous data source based on the target field to obtain a target data set, and processing the to-be-processed task based on the target data set.

[0065] According to the selected target attention weight, the corresponding preset available field is determined as the target field. These target fields are the most important fields for the current to-be-processed task after screening. Based on these target fields, the connected heterogeneous data sources are retrieved to obtain data related to the target fields to form a target data set.

[0066] After obtaining the target data set, the target data set is used to process the to-be-processed task in the agent. For example, if the to-be-processed task is flood control scheduling, the water level change and material demand of the disaster area can be quickly evaluated based on the retrieved target data set, and the allocation and scheduling path of the rescue resources are optimized according to the data, so as to ensure the efficiency and timeliness of the rescue operation. For another example, if the to-be-processed task is personnel evacuation in the disaster area, the real-time condition of the population distribution and evacuation route of the disaster area can be determined based on the retrieved target data set, and the optimal evacuation path and evacuation order are planned according to the data, so as to ensure that the personnel can safely and quickly evacuate the dangerous area. Specifically, in actual application scenarios, the agent is usually configured with a processing mechanism corresponding to each processing task, so that the to-be-processed task can be processed based on the configured processing mechanism and the target data set. This embodiment does not make specific limitations on this.

[0067] In this embodiment, the relevance of the fields of the heterogeneous data source and the task is dynamically quantified by introducing an attention mechanism, thereby improving the data retrieval efficiency and accuracy. Specifically, after obtaining the to-be-processed task in the agent, the importance of each preset available field is quantitatively evaluated by using the attention mechanism, so as to dynamically determine the attention weight of each field for the current task, thereby avoiding the subjectivity and inefficiency of the traditional manual definition of the relevant fields, and automatically identifying the most relevant field for the task according to the specific requirements of the task. Then, the attention weights are sorted and the top preset number of fields with the highest weights are selected as the target fields, so as to filter out the data fields with the highest value for the current task, and accurately compress the retrieval range to the field subset related to the task. Finally, the heterogeneous data source is accurately retrieved based on the target field, so as to obtain the target data set matching the task requirements, thereby improving the efficiency and accuracy of data retrieval. In addition, the dynamic weight calculation mechanism makes the field screening result adapt to different task requirements in real time, without relying on predefined static rules, and the screening accuracy can be maintained when the heterogeneous data source is expanded, thereby solving the problem that the manual rules are difficult to adapt to business changes and improving the robustness of data retrieval.

[0068] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, the step of determining the attention weight of the plurality of preset available fields for the to-be-processed task based on the attention mechanism comprises:

[0069] Step A10, encoding the to-be-processed task to obtain a first encoding vector, and encoding the plurality of preset available fields to obtain a second encoding vector;

[0070] The to-be-processed task is encoded and converted into a fixed-dimensional vector, referred to as a first encoding vector. The encoding can be performed by natural language processing techniques or machine learning algorithms, such as BERT (Bidirectional Encoder Representations from Transformers), RoBERTa (ARobustly Optimized BERT Approach), Transformer, etc. The semantic information or feature information of the task is converted into a numerical vector form. For example, in the flood rescue scene, the to-be-processed task may be "evaluate the water level change of a certain disaster area", and after encoding, the first encoding vector can reflect the semantic information of the core features of the task, such as the keywords "disaster area" and "water level change".

[0071] At the same time, each preset available field is also encoded to obtain a corresponding second encoding vector. These fields may come from different data sources, such as the "real-time water level" field of the water level sensor data and the "disaster area coordinates" field of the geographic information system.

[0072] Step A20, using the first encoding vector as a query vector and the second encoding vector as a key vector, calculating the similarity between the query vector and the key vector through an attention function;

[0073] The first encoding vector is used as a query vector (Query), and each second encoding vector is used as a key vector (Key). The similarity between the query vector and each key vector is calculated using an attention function. The attention function is a function that calculates the relevance or matching degree between the query vector and the key vector, such as a dot product attention function.

[0074] Specifically, the dot product attention function calculates the dot product of the query vector and the key vector to obtain a scalar value, which represents the matching degree between the query vector and the key vector. For example, if the to-be-processed task is to evaluate the water level change, and a field is "real-time water level", the similarity between the query vector and the key vector of this field will be higher because they are more relevant in semantics. In this way, the relevance of each field to the to-be-processed task can be quantified.

[0075] Step A30, normalizing each similarity to obtain a normalized similarity, and determining that each normalized similarity is the attention weight of each preset available field for the to-be-processed task.

[0076] The calculated similarities are normalized. Normalization can specifically use a Softmax function to convert all similarity values into a probability distribution, so that the similarity value of each field is between 0 and 1, and the sum of the similarity values of all fields is 1. The normalized similarity value is the attention weight of each preset available field to the current task to be processed.

[0077] In a possible implementation, before the step of determining the attention weights of the plurality of preset available fields to the task to be processed based on the attention mechanism, the method further includes:

[0078] Step B10, inputting the plurality of preset available fields into a preset random forest classifier to output a feature importance value corresponding to each of the preset available fields;

[0079] All preset available fields are input into a preset random forest classifier. The random forest classifier is an ensemble learning algorithm that builds multiple decision trees and integrates their results for classification or regression analysis. In this embodiment, the random forest classifier is used to evaluate the importance of each preset available field in the overall data. The classifier outputs a feature importance value for each field, which reflects the contribution of the field to the prediction or classification task.

[0080] Step B20, screening, from the plurality of preset available fields, a preset available field whose feature importance value is greater than or equal to a preset threshold value;

[0081] According to the obtained feature importance values, the preset available fields whose feature importance values are greater than or equal to a preset threshold value are screened. The preset threshold value can be adjusted according to specific application scenarios and task requirements. For example, in the flood control and disaster relief scenario, if the preset threshold value is set to 0.5, only the fields whose feature importance values are greater than or equal to 0.5 are retained. Through this step, the fields that may have an important influence on the current task can be preliminarily screened, the amount of data for subsequent processing is reduced, and the efficiency and accuracy of the system are improved.

[0082] Step B30, based on the screened preset available fields, performing the step of determining the attention weights of the plurality of preset available fields to the task to be processed based on the attention mechanism.

[0083] Based on the screened preset available fields, the weight determination step based on the attention mechanism is further performed. This step is the core processing process, which dynamically evaluates the relevance of each field to the task to be processed through the attention mechanism, and assigns attention weights to each field. Since the fields with high feature importance values have been screened out, the attention mechanism can more efficiently identify the fields that are truly important to the current task when performing the attention mechanism. For example, in the flood relief scene, the screened fields may include "real-time water level" and "population density of disaster area", and the attention mechanism will further evaluate the specific importance of these fields in the current task to provide more accurate basis for subsequent data retrieval and task processing.

[0084] The present embodiment realizes efficient and accurate processing of fields in heterogeneous data sources by using a random forest classifier to preliminarily screen the fields and using an attention mechanism to more carefully evaluate the screened fields, so as to adapt to dynamic task requirements in complex scenarios (such as flood relief).

[0085] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar content as the above-mentioned first embodiment and second embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, the step of retrieving the target data set from the heterogeneous data source based on the target field comprises:

[0086] Step C10, searching for a target index feature vector matching the target field in a preset index database, wherein the preset index database comprises at least one index feature vector, each index feature vector is used for indexing original data in the heterogeneous data source, and different index feature vectors index different original data;

[0087] The target index feature vector matching the target field is searched in the preset index database. The preset index database is a pre-constructed index system for quickly locating the original data in the heterogeneous data source. Each index feature vector is a multi-dimensional vector that contains feature information related to a specific field, which is used to uniquely identify and locate the original data in the heterogeneous data source.

[0088] Step C20, retrieving the heterogeneous data source based on the target index feature vector, and combining the retrieved original data to obtain a target data set.

[0089] The target index feature vector found is used to retrieve the corresponding raw data from the heterogeneous data sources. Since different index feature vectors index different raw data, the corresponding raw data can be retrieved from the structured database, unstructured document, or real-time sensor data, etc. heterogeneous data sources according to the guidance of the index feature vector. For example, in the flood relief scene, real-time water level data can be retrieved from the water level sensor database, geographic information of the disaster area can be retrieved from the geographic information system, and material inventory data can be retrieved from the rescue material management system, etc.

[0090] Further, the retrieved raw data can come from different data sources, and the format and storage method can also be different. Therefore, these data are combined and integrated to form a unified target data set. This target data set will contain all the raw data retrieved based on the target field, providing comprehensive data support for subsequent task processing. For example, in the flood relief scene, the target data set may include real-time water level, geographic information, population distribution, material demand, etc. multi-dimensional data of the disaster area, which will be used for further analysis and decision support.

[0091] In one possible implementation, referring to Figure 2 The step of finding a target index feature vector matching the target field in the preset index database includes:

[0092] Step D10, vectorizing the target field to obtain a target vector;

[0093] The target field is vectorized and converted into a numerical vector, called a target vector. This process can be achieved through natural language processing technology or machine learning algorithms to convert the semantic information or feature information of the field into a numerical vector form. For example, if the target field is "real-time water level", it can be converted into a fixed-dimensional vector through word embedding technology. The purpose of vectorization is to enable mathematical comparison and calculation with the index feature vectors in the preset index database.

[0094] Step D20, for each index feature vector in the preset index database, calculating the Euclidean distance and Manhattan distance between the target vector and the index feature vector, and performing weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance;

[0095] The similarity of each index feature vector in the preset index database is calculated. Specifically, the Euclidean distance and Manhattan distance between the target vector and each index feature vector are calculated. The Euclidean distance measures the straight-line distance between two vectors in a multi-dimensional space, while the Manhattan distance measures the "city block" distance between two vectors in a multi-dimensional space. In order to consider the characteristics of the two distances comprehensively, the system performs weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance. The weight can be adjusted according to the specific application scenario and data characteristics. Through weighted summation, the similarity between the target vector and the index feature vector can be more comprehensively evaluated.

[0096] In one possible implementation, the step of performing weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance comprises:

[0097] Step D201, multiplying the first preset coefficient by the Euclidean distance to obtain a first distance;

[0098] Step D202, multiplying the second preset coefficient by the Manhattan distance to obtain a second distance, wherein the second preset coefficient is less than the first preset coefficient;

[0099] Step D203, calculating the sum value between the first distance and the second distance to obtain a fusion distance.

[0100] The first preset coefficient and the second preset coefficient can be specific values set in advance, and satisfy the condition that the second preset coefficient is less than the first preset coefficient. Further, the first preset coefficient and the second preset coefficient can be values between 0 and 1. The second preset coefficient is less than the first preset coefficient, so as to effectively amplify the capture ability of significant abnormalities by giving higher weight to the Euclidean distance, such as sharp changes in water level or large deviations in geographic coordinates, and maintain the sensitivity to multi-dimensional small fluctuations by giving lower weight to the Manhattan distance, such as subtle changes in population density or small fluctuations in water level. This weighting method can more comprehensively evaluate the similarity between the target vector and the index feature vector, and improve the accuracy and efficiency of data retrieval.

[0101] Exemplarily, in a preferred embodiment, when the weight of the Euclidean distance is set to 0.6 and the weight of the Manhattan distance is set to 0.4, that is, the fusion distance is 0.6*Euclidean distance+0.4*Manhattan distance, the capture ability for significant anomalies is effectively amplified by giving a higher weight (0.6) to the Euclidean distance, for example, in financial transaction data, when the target vector bursts a peak in the "transaction volume" dimension, the square characteristic of the Euclidean distance will significantly amplify the difference in this dimension, while retaining the Manhattan distance weight (0.4) to maintain sensitivity to multi-dimensional small fluctuations, and the weight ratio (0.6:0.4) is verified as the optimal balance point in the heterogeneous data source environment, which can meet the dual needs of key dimension mutation priority response and multi-dimensional gradual change collaborative perception, especially suitable for multi-dimensional data and large differences in the distribution of each dimension.

[0102] Step D30, screening the target fusion distance that meets the preset approximate nearest neighbor search condition from each of the fusion distances, and determining the index feature vector corresponding to the target fusion distance as the target index feature vector.

[0103] According to the preset approximate nearest neighbor search condition, the target fusion distance that meets the condition is screened from all the calculated fusion distances. The preset approximate nearest neighbor search condition can be a distance threshold or a ranking threshold, which is used to determine which index feature vectors are close enough to the target vector and can be regarded as matching items. For example, a distance threshold can be set, and only the index feature vectors with fusion distance less than the threshold will be selected; or a ranking threshold can be set, and the first K index feature vectors with the smallest fusion distance are selected. Finally, the index feature vectors corresponding to the target fusion distance are determined as the target index feature vectors, which will be used for subsequent data retrieval and processing.

[0104] The embodiment improves the accuracy and robustness of index feature vector matching by fusing the dual measurement mechanism of Euclidean distance and Manhattan distance. Specifically, after the target field is vectorized to generate a target vector, the Euclidean distance (reflecting the absolute offset in multi-dimensional space) and the Manhattan distance (capturing the cumulative effect of dimension difference) between the target vector and each vector in the preset index library are calculated simultaneously. Due to the dimension sensitivity difference of field characteristics in heterogeneous data sources, such as numerical fields that need to focus on overall offset and categorical fields that need to focus on dimension changes, a single distance measurement can easily lead to mismatch: for example, when the target vector has a large offset in a few dimensions, the Euclidean distance will be misjudged as a high difference due to the square amplification effect; while the Manhattan distance is more sensitive to uniform small offset, and may ignore the mutation of key dimensions. By weighting and summing the two distances to generate a fused distance, the ability to capture significant abnormal dimensions is retained, such as sudden transaction volume peaks in financial fields, and the cumulative impact of small changes in multiple dimensions is balanced, such as scattered inventory fluctuations in the supply chain, thereby avoiding missed detection due to single dimension mutation (Euclidean distance guarantee) and preventing scattered small offsets from being ignored (Manhattan distance guarantee), achieving accurate index hit across heterogeneous data sources, such as the "real-time water level" field vector matching both the water level threshold in the database and the liquid level fluctuation pattern in the sensor, providing a high-confidence index basis for subsequent data retrieval.

[0105] Based on the first embodiment, the second embodiment and / or the third embodiment of the present application, in the fourth embodiment of the present application, the same or similar content as the above-mentioned embodiment one, embodiment two and embodiment three can be referred to the above introduction, and the subsequent will not be described again. On this basis, before the step of searching for a target index feature vector matching the target field in a preset index database, the method further comprises:

[0106] Step E10, acquiring multi-source heterogeneous data from heterogeneous data sources, wherein the heterogeneous data sources include at least two heterogeneous data sources, and the multi-source heterogeneous data includes raw data from each of the data sources;

[0107] Data is acquired from multiple heterogeneous data sources. These data sources can include structured databases (such as relational databases), unstructured documents (such as text files, images, videos), real-time sensor data (such as output from Internet of Things devices), etc. Heterogeneous data sources refer to differences in format, structure, and / or storage method, etc. of data in the data sources. For example, in the flood relief scene, the data sources can include real-time rainfall data from weather stations, water level data from water level sensors, geographic coordinate data from geographic information systems, and disaster information on social media, etc.

[0108] Step E20, data preprocessing is performed on the multi-source heterogeneous data to obtain cleaned data, wherein the data preprocessing includes unifying timestamp formats and unifying physical parameter units;

[0109] Specifically, all raw data in the multi-source heterogeneous data is preprocessed to ensure consistency and comparability of the data. The data preprocessing includes but is not limited to unifying timestamp formats and unifying physical parameter units, and can also include data desensitization processing.

[0110] Unifying timestamp formats means converting the timestamps of all data into a unified format, such as the ISO 8601 standard format (YYYY-MM-DDTHH:MM:SSZ). This preprocessing ensures that time data from different data sources can be effectively compared and analyzed.

[0111] Unifying physical parameter units means converting physical parameters (such as temperature, water level, rainfall, etc.) in all data into a unified unit. For example, all water level data is converted from meters (m) and centimeters (cm) to meters (m) for unified processing.

[0112] Data desensitization processing means technically processing sensitive information so that it can be safely used without revealing privacy, such as using NER (Named Entity Recognition) technology to automatically identify and mask names, mobile phone numbers, license plate numbers, etc. For image data, call face detection and license plate recognition models to perform Gaussian blur processing on the identified areas to block the leakage of original private information.

[0113] Step E30, feature extraction is performed on the cleaned data to obtain feature vectors, and L2 normalization processing is performed on each feature vector to obtain an index feature vector corresponding to each raw data;

[0114] Feature extraction is performed on the cleaned data to convert the data into feature vectors. The process of feature extraction can select different methods according to the type of data and the application scenario. For example, for text data, word embedding technology can be used to convert text into vectors; for numerical data, numerical features can be directly extracted or dimensionality reduction processing can be performed. The purpose of feature extraction is to convert data into numerical vector form that can reflect its core features, so as to facilitate subsequent processing and analysis.

[0115] Subsequently, L2 normalization processing is performed on the extracted feature vectors. L2 normalization is a common normalization method that divides each element of a feature vector by the L2 norm (i.e. Euclidean length) of the vector, so that the length of the normalized vector is 1. Through L2 normalization, the dimensional difference between different feature vectors can be eliminated, improving the accuracy and efficiency of subsequent calculations.

[0116] Step E40, creating or updating the preset index database based on the index feature vectors corresponding to each of the original data.

[0117] The normalized index feature vectors are stored in the preset index database. The preset index database is an indexing system for quickly retrieving and locating data, which organizes and manages the original data through index feature vectors. If the database already exists, the database is updated according to the new index feature vectors; if the database does not exist, a new index database is created.

[0118] In one possible implementation, the step of feature extraction of the cleaned data to obtain a feature vector includes:

[0119] Step F10, if the cleaned data includes single-modal text data, performing feature extraction on the single-modal text data through a LayoutLMv3 model to obtain a feature vector corresponding to the single-modal text data.

[0120] If the cleaned data includes single-modal text data, a LayoutLMv3 (Layout Language Modeling version 3) model is used to perform feature extraction on the text data. LayoutLMv3 is an advanced natural language processing model designed specifically for processing text data, capable of capturing semantic information and layout information in text. Through the LayoutLMv3 model, text data can be converted into a fixed-dimensional feature vector, which can effectively represent the core semantics and structural features of the text. For example, in the flood relief scenario, single-modal text data may include rescue reports, descriptions of disaster areas, etc., and the feature vector extracted by the LayoutLMv3 model can be used for subsequent similarity calculation and retrieval.

[0121] Step F20, if the cleaned data includes single-modal image data, performing feature extraction on the single-modal image data through a ResNet-50 model to obtain a feature vector corresponding to the single-modal image data.

[0122] If the cleaned data includes single-modal image data, a ResNet-50 (Residual Network with 50 layers) model will be used to extract features from the image data. ResNet-50 is a deep convolutional neural network model widely used in image classification and feature extraction tasks. Through the ResNet-50 model, image data can be converted into a fixed-dimensional feature vector that can effectively represent the visual features of the image. For example, in the flood relief scenario, single-modal image data may include satellite images of disaster areas, on-site photos taken by drones, etc. The feature vector extracted by the ResNet-50 model can be used for subsequent image similarity calculation and retrieval.

[0123] Step F30, if the cleaned data includes multi-modal image-text data, the text data in the multi-modal image-text data is extracted by the LayoutLMv3 model, the image data in the multi-modal image-text data is extracted by the ResNet-50 model, and the feature extraction results of the LayoutLMv3 model and the ResNet-50 model are spliced to obtain a feature vector corresponding to the multi-modal image-text data.

[0124] If the cleaned data includes multi-modal image-text data, the LayoutLMv3 model and the ResNet-50 model will be used to extract features from the text data and the image data, respectively. For multi-modal data, the system needs to process information of both text and image modalities. The semantic features of the text data are extracted by the LayoutLMv3 model, and the visual features of the image data are extracted by the ResNet-50 model. Then, the feature vectors of the two modalities are spliced to form a comprehensive feature vector, which is used to represent the overall features of the multi-modal image-text data. For example, in the flood relief scenario, multi-modal image-text data may include images with descriptions of disaster areas (such as annotated satellite images). Through this multi-modal feature extraction method, the data content can be more comprehensively understood, and the accuracy and efficiency of retrieval can be improved.

[0125] Step F40, if the cleaned data includes sensor data, a pre-set time series feature extraction model is used to extract features from the sensor data, and a feature vector corresponding to the sensor data is obtained.

[0126] If the cleaned data includes sensor data, a preset time series feature extraction model, such as an RNN (Recurrent Neural Network) or an LSTM (Long Short-Term Memory) model, is used to extract features from the sensor data. Sensor data is usually time series data, such as real-time water level sensor data or rainfall sensor data. The time series feature extraction model can capture the time dependence and trend information in the time series data. Through this model, the sensor data can be converted into a fixed-dimensional feature vector that can effectively represent the time characteristics of the sensor data. For example, in a flood rescue scenario, the feature vector extracted by the time series feature extraction model can be used to analyze water level changes and rainfall changes, providing important basis for disaster assessment and resource allocation.

[0127] By way of example, in order to facilitate understanding of the technical concept or technical principle of the data retrieval method for intelligent agents in combination with the first embodiment, the second embodiment, and the third embodiment described above, a specific embodiment is listed as follows. In this specific embodiment, referring to FIG. 1, the data retrieval process includes: Figure 3

[0128] Step 1: Multi-source heterogeneous data acquisition and data preprocessing. Multi-source heterogeneous data is acquired from heterogeneous data sources, and the acquired multi-source heterogeneous data is preprocessed by Apache NiFi to unify the timestamp format and physical parameter unit, laying a unified data benchmark for subsequent cross-domain spatio-temporal correlation analysis and feature fusion.

[0129] Step 2: Multi-modal feature extraction and vectorization representation. Deep feature extraction is performed on the preprocessed data. The LayoutLMv3 model is used to analyze the layout and semantics of the document, and the ResNet-50 model is used to extract key visual features of the image. Finally, the feature vectors of different sources are spliced and L2 normalized to generate index feature vectors with unified dimensions and consistent scales. A preset index database is constructed based on Faiss and the index feature vectors.

[0130] Step 3: Intelligent agent dynamic demand label generation. The current pending task of the emergency command intelligent agent (such as "planning evacuation route") is analyzed. The global importance of each preset available field is evaluated by a random forest model trained on historical data, and then combined with an attention mechanism, the k target fields with the highest attention weight are selected as the dynamic demand label according to the current task context. This label is then used for data retrieval in Faiss.

[0131] ​Fourth step: based on the approximate search of dynamic matching and retrieval, the dynamic demand label of the previous step is vectorized to obtain an agent query vector, and approximate nearest neighbor retrieval is performed in the preset index database based on Faiss. The target data set is retrieved.

[0132] Fifth step: data optimization allocation and abnormal feedback closed loop, the target data set retrieved is allocated to the agent for use to process the to-be-processed task, and at the same time, the use rate and delay of each data source are monitored in real time through Prometheus. If the use rate is lower than the preset threshold or the delay is higher than the preset time length, the standby data source is switched.

[0133] It should be noted that the above examples are only used to assist in understanding the present embodiment and do not constitute a limitation on the data retrieval process of the present embodiment. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0134] In addition, the present embodiment also proposes an agent, as shown in Figure 4 The agent comprises:

[0135] The acquisition module 10 is configured to acquire a to-be-processed task in the agent.

[0136] The determination module 20 is configured to determine attention weights of a plurality of preset available fields to the to-be-processed task based on an attention mechanism, wherein the preset available fields are available fields contained in a heterogeneous data source connected to the agent.

[0137] The screening module 30 is configured to sort each attention weight in descending order to obtain a sorting queue, and select at least one attention weight located in the front row in the sorting queue as a target attention weight.

[0138] The retrieval module 40 is configured to determine that the target field corresponding to the target attention weight is a target field, retrieve the heterogeneous data source based on the target field to obtain a target data set, and process the to-be-processed task based on the target data set.

[0139] In addition, the present embodiment also proposes a data retrieval device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the agent task-oriented data retrieval method as described above.

[0140] Reference Figure 5The diagram illustrates a structural schematic of a data retrieval device suitable for implementing embodiments of this application. The data retrieval device in embodiments of this application may also include, but is not limited to, mobile terminals such as mobile phones, servers, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and fixed terminals such as digital TVs and desktop computers. Figure 5 The data retrieval device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0141] like Figure 5 As shown, the data retrieval device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the data retrieval device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the data retrieval device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show data retrieval devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.

[0142] In particular, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments of the present application are executed.

[0143] The data retrieval device provided by the embodiments of the present application adopts the data retrieval method for intelligent agent tasks in the above embodiments, and can solve the technical problem of how to improve the data retrieval efficiency and retrieval accuracy of heterogeneous data sources. Compared with the prior art, the data retrieval device provided by the present application has the same beneficial effects as the data retrieval method for intelligent agent tasks provided by the above embodiments, and other technical features in the data retrieval device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0144] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.

[0145] The above describes only the specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0146] In addition, to achieve the above-mentioned purpose, the embodiments of the present application also provide a readable storage medium having computer readable program instructions (i.e. computer program) stored thereon, the computer readable program instructions being used to execute the data retrieval method for intelligent agent tasks in the above embodiments.

[0147] The computer readable storage medium provided by the embodiments of the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the embodiments, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination thereof.

[0148] The computer readable storage medium described above may be contained in a data retrieval device, or may exist separately without being assembled into the data retrieval device.

[0149] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the data retrieval device, the data retrieval device: obtains a to-be-processed task in an agent; determines attention weights of a plurality of preset available fields to the to-be-processed task based on an attention mechanism, wherein the preset available fields are available fields contained in a heterogeneous data source connected to the agent; sorts each attention weight in descending order to obtain a sorting queue, and selects at least one attention weight in the front of the sorting queue as a target attention weight; determines the preset available field corresponding to the target attention weight as a target field, retrieves the heterogeneous data source based on the target field to obtain a target data set, and processes the to-be-processed task based on the target data set.

[0150] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0151] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0152] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0153] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., computer programs) for executing the above-mentioned data retrieval method for intelligent agent tasks, and can solve the technical problem of how to improve the data retrieval efficiency and accuracy of heterogeneous data sources. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the data retrieval method for intelligent agent tasks provided by the above-mentioned embodiments, and will not be described here.

[0154] Furthermore, the embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the agent task-oriented data retrieval method as described above.

[0155] The computer program product embodiment of the present application is basically the same as the above-mentioned agent task-oriented data retrieval method embodiments, and will not be described here.

[0156] It should be noted that in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or system including the element.

[0157] The above-mentioned serial numbers of the embodiments of the present application are only for description, not representing the advantages and disadvantages of the embodiments.

[0158] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software sensor, which is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, and includes a number of instructions for making a data retrieval device (which can be a mobile phone, computer, server or network device, etc.) execute the methods described in various embodiments of the present application.

[0159] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation based on the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data retrieval method for intelligent agent tasks, characterized in that, The data retrieval method for agent-oriented tasks includes the following steps: Retrieve the tasks to be processed from the intelligent agent; The task to be processed is encoded to obtain a first encoding vector, and multiple preset available fields are encoded to obtain a second encoding vector, wherein the preset available fields are available fields contained in the heterogeneous data source connected to the agent; Using the first encoded vector as the query vector and each of the second encoded vectors as the key vectors, the similarity between the query vector and each of the key vectors is calculated using an attention function; Normalize each of the similarities to obtain the normalized similarity, and determine that each of the normalized similarities is the attention weight of each of the preset available fields for the task to be processed; The attention weights are sorted in descending order to obtain a sorting queue, and at least one of the attention weights at the top of the sorting queue is selected as the target attention weight. The preset available field corresponding to the target attention weight is determined as the target field, and the target field is vectorized to obtain the target vector; For each index feature vector in the preset index database, the Euclidean distance and Manhattan distance between the target vector and the index feature vector are calculated, and the weighted sum of the Euclidean distance and the Manhattan distance is used to obtain the fusion distance. The preset index database includes at least one index feature vector, and each index feature vector is used to index the original data in the heterogeneous data source. Different index feature vectors index different original data. Filter out the target fusion distances that satisfy the preset approximate nearest neighbor retrieval conditions from each of the fusion distances, and determine the index feature vector corresponding to the target fusion distance as the target index feature vector; The heterogeneous data source is retrieved based on the target index feature vector, and the retrieved raw data is combined to obtain the target dataset, so as to process the task to be processed based on the target dataset.

2. The data retrieval method for intelligent agent tasks as described in claim 1, characterized in that, Before the step of determining the attention weights of multiple preset available fields for the task to be processed based on the attention mechanism, the method further includes: Multiple preset available fields are input into a preset random forest classifier, and the feature importance value corresponding to each preset available field is output. Filter from the preset available fields those whose feature importance value is greater than or equal to a preset threshold; Based on the selected preset available fields, the step of determining the attention weights of multiple preset available fields for the task to be processed based on the attention mechanism is performed.

3. The data retrieval method for intelligent agent tasks as described in claim 1, characterized in that, The step of obtaining the fused distance by weighted summation of the Euclidean distance and the Manhattan distance includes: Multiply the first preset coefficient by the Euclidean distance to obtain the first distance; The second distance is obtained by multiplying the second preset coefficient by the Manhattan distance, wherein the second preset coefficient is less than the first preset coefficient; The fusion distance is obtained by calculating the sum of the first distance and the second distance.

4. The data retrieval method for agent-oriented tasks as described in claim 1, characterized in that, Before the step of searching for the target index feature vector that matches the target field in the preset index database, the method further includes: Acquire multi-source heterogeneous data from heterogeneous data sources, wherein the heterogeneous data sources include at least two heterogeneous data sources, and the multi-source heterogeneous data includes raw data from each of the data sources; The multi-source heterogeneous data is preprocessed to obtain cleaned data, wherein the data preprocessing includes a unified timestamp format and a unified physical parameter unit; Feature vectors are obtained by extracting features from the cleaned data, and L2 normalization is performed on each feature vector to obtain the index feature vectors corresponding to each original data. The preset index database is created or updated based on the index feature vectors corresponding to each of the original data.

5. The data retrieval method for intelligent agent tasks as described in claim 4, characterized in that, The step of extracting features from the cleaned data to obtain feature vectors includes: If the cleaned data includes unimodal text data, then the LayoutLMv3 model is used to extract features from the unimodal text data to obtain the feature vector corresponding to the unimodal text data. If the cleaned data includes unimodal image data, then the ResNet-50 model is used to extract features from the unimodal image data to obtain the feature vector corresponding to the unimodal image data; If the cleaned data includes multimodal image-text data, then the text data in the multimodal image-text data is extracted using the LayoutLMv3 model, and the image data in the multimodal image-text data is extracted using the ResNet-50 model. The feature extraction results of the LayoutLMv3 model and the ResNet-50 model are concatenated to obtain the feature vector corresponding to the multimodal image-text data. If the cleaning data includes sensor data, then the sensor data is used to extract features through a preset time-series feature extraction model to obtain the feature vector corresponding to the sensor data.

6. A data retrieval device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the data retrieval method for an agent-oriented task as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data retrieval program, which, when executed by a processor, implements the steps of the data retrieval method for intelligent agent tasks as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Medical query text processing method and device, equipment, medium and electronic product

    CN117009456A