Intelligent agent task-oriented data retrieval method and equipment and storage medium

By using attention mechanisms and random forest classifiers to filter feature importance and combining them with a pre-defined index database, the relevance of heterogeneous data source fields to the task is dynamically quantified, solving the problems of low efficiency and insufficient accuracy in traditional data retrieval methods and achieving efficient and accurate data retrieval.

CN120910109AActive Publication Date: 2025-11-07ZHONGDIAN DATA IND CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional data retrieval methods are inefficient and error-prone, and cannot meet the accurate matching requirements of heterogeneous data sources. When manually defining fields, omissions or misselections may occur, resulting in retrieval results that do not meet the task requirements.

Method used

An attention mechanism is used to dynamically quantify the relevance of heterogeneous data source fields to the task. The most relevant fields are selected for data retrieval by sorting through attention weights. A random forest classifier is used to filter feature importance, and a pre-defined index database is used to accurately retrieve the target dataset.

Benefits of technology

It improves the efficiency and accuracy of data retrieval, adapts to different task requirements, enhances the robustness of data retrieval, avoids the subjectivity and inefficiency of manual rules, and ensures that retrieval results match the task.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910109A_ABST
    Figure CN120910109A_ABST
Patent Text Reader

Abstract

The invention discloses an agent task-oriented data retrieval method and device and a storage medium, and relates to the technical field of data retrieval, the method comprises the following steps: obtaining a to-be-processed task in an agent; on the basis of an attention mechanism, attention weights of a plurality of preset available fields to the to-be-processed task are determined, and the preset available fields are available fields contained in a heterogeneous data source connected with the agent; sorting the attention weights according to a sequence from large to small to obtain a sorting queue, and selecting at least one attention weight in the front column in the sorting queue as a target attention weight; and determining a 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. According to the method, the data retrieval efficiency and retrieval accuracy of the heterogeneous data source are improved.
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: obtaining a to-be-processed task in an intelligent agent; determining attention weights of a plurality of preset available fields for 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; sorting each attention weight in descending order to obtain a sorting queue, and selecting at least one attention weight located in the front row of the sorting queue as a target attention weight; determining that the target 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.

[0007] In an embodiment, the step of determining the attention weights of the plurality of preset available fields for the to-be-processed task based on the attention mechanism comprises: encoding processing on the to-be-processed task to obtain a first encoding vector, and encoding processing on the plurality of preset available fields respectively to obtain second encoding vectors; taking the first encoding vector as a query vector and taking each of the second encoding vectors as a key vector, calculating similarities between the query vector and the key vectors through an attention function; normalizing each of the similarities to obtain normalized similarities, and determining that each of the normalized similarities is an attention weight of each of the preset available fields on the to-be-processed task.

[0008] In an embodiment, before the step of determining, based on the attention mechanism, the attention weights of the plurality of preset available fields on the to-be-processed task, the method further comprises: 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; filtering, from the plurality of preset available fields, preset available fields whose feature importance values are greater than or equal to a preset threshold; based on the filtered preset available fields, performing the step of determining, based on the attention mechanism, the attention weights of the plurality of preset available fields on the to-be-processed task.

[0009] In an embodiment, the step of retrieving, based on the target field, the heterogeneous data source to obtain a target data set comprises: finding, in a preset index database, a target index feature vector matching the target field, 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; retrieving the heterogeneous data source based on the target index feature vector, and combining the retrieved original data to obtain a target data set.

[0010] In an embodiment, the step of finding, in a preset index database, a target index feature vector matching the target field comprises: vectorizing the target field to obtain a target vector; for each index feature vector in the preset index database, calculating an Euclidean distance and a 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; filtering, from the fusion distances, a target fusion distance satisfying a preset approximate nearest neighbor retrieval condition, and determining that an index feature vector corresponding to the target fusion distance is a target index feature vector.

[0011] In an embodiment, the step of summing the Euclidean distance and the Manhattan distance to obtain a fusion distance comprises: multiplying the Euclidean distance by a first preset coefficient to obtain a first distance; multiplying the Manhattan distance by a second preset coefficient to obtain a second distance, wherein the second preset coefficient is less than the first preset coefficient; calculating a sum value between the first distance and the second distance to obtain a fusion distance.

[0012] 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: obtaining 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; performing 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; performing feature extraction on the cleaned data to obtain feature vectors, and performing L2 normalization processing on each of the feature vectors to obtain an index feature vector corresponding to each of the raw data; creating or updating the preset index database based on the index feature vector corresponding to each of the raw data.

[0013] In an embodiment, the step of performing feature extraction on the cleaned data to obtain feature vectors comprises: if the cleaned data includes single-modal text data, performing 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; if the cleaned data includes single-modal image data, performing feature extraction on the single-modal image data by using a ResNet-50 model to obtain a feature vector corresponding to the single-modal image data; if the cleaned data includes multi-modal image-text data, performing feature extraction on text data in the multi-modal image-text data by using a LayoutLMv3 model, performing feature extraction on image data in the multi-modal image-text data by using a ResNet-50 model, and splicing feature extraction results of the LayoutLMv3 model and the ResNet-50 model to obtain a feature vector corresponding to the multi-modal image-text data; if the cleaned data includes sensor data, performing feature extraction on the sensor data by using a preset time-series feature extraction model to obtain a feature vector corresponding to the sensor data.

[0014] Further, to achieve the above object, the present application provides a data retrieval device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the data retrieval method for agent task as described above.

[0015] Further, to achieve the above object, the present application provides a readable storage medium, which is a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the data retrieval method for agent task as described above.

[0016] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the data retrieval method for agent task as described above.

[0017] The one or more technical solutions proposed by the present application have at least the following technical effects: The present application introduces an attention mechanism to dynamically quantify the relevance of heterogeneous data source fields and tasks, improving the efficiency and accuracy of data retrieval. 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 for the current task, avoiding the subjectivity and inefficiency of traditional manual definition of relevant fields, and automatically identifying the most relevant fields 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 target fields are used to accurately retrieve the heterogeneous data source 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 selection results adapt to different task requirements in real time, without relying on predefined static rules, and can maintain the accuracy of selection when the heterogeneous data source is expanded, thereby solving the problem that manual rules are difficult to adapt to business changes and improving the robustness of data retrieval. BRIEF DESCRIPTION OF DRAWINGS

[0018] 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.

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

[0020] Figure 1 The flowchart of the first embodiment of the data retrieval method for the agent task of the present application; Figure 2 The flowchart of the third embodiment of the data retrieval method for the agent task of the present application; Figure 3 The retrieval flowchart related to the first embodiment of the data retrieval method for the agent task of the present application; Figure 4 The system structure diagram of the agent of the present application; Figure 5 The device structure diagram of the hardware running environment related to the data retrieval method device for the agent task in the embodiment of the present application.

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

[0022] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.

[0023] It should be noted that the execution subject of each embodiment of the data retrieval method for the agent task of 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 of the present application does not make specific limitation on this.

[0024] Based on this, the first embodiment of the data retrieval method for the agent task is proposed in the present application, as shown in the figure, the data retrieval method for the agent task comprises the following steps S10-S40: Figure 1 Step S10, obtaining a to-be-processed task in an agent; ​An agent refers to an intelligent system or software entity that can autonomously perceive the environment and dynamically adjust its behavior according to task requirements. For example, an intelligent command system for disaster monitoring and resource allocation in a flood rescue scenario, 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.

[0025] A to-be-processed task refers to a specific data processing task that the agent needs to perform at present, such as a resource allocation task, a disaster area assessment task, or a risk assessment task in a flood rescue scenario. These tasks are usually initiated by system users or automatically triggered by the system.

[0026] Step S20, 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 agent; A preset available field refers to a pre-defined field set in a heterogeneous data source connected to the agent that can be used for data retrieval and processing. In a flood rescue scenario, these fields may come from structured databases (such as geographic information of disaster areas, inventory information of rescue materials), unstructured documents (such as real-time images and video descriptions of disaster areas), or real-time sensor data (such as real-time water level data from water level sensors, rainfall data from weather sensors).

[0027] An attention mechanism is an algorithm that simulates human attention allocation, which assigns an attention weight value to each preset available field by calculating the relevance of each field to the to-be-processed task. This weight value reflects the importance of the field to the current task, for example, in a 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.

[0028] Step S30, sorting the attention weights in descending order to obtain a sorted queue, and selecting at least one attention weight in the front of the sorted queue as a target attention weight; All calculated attention weights are sorted in descending order to form a sorted queue. Then, at least one attention weight 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 target attention weights. The number of target attention weights selected can be flexibly adjusted according to task requirements and system resources to ensure that the number of selected fields meets the task requirements and does not introduce excessive redundant data.

[0029] In step S40, it is determined that the preset available field corresponding to the target attention weight is a target field, the target data set is obtained by searching the heterogeneous data source based on the target field, and the to-be-processed task is processed based on the target data set.

[0030] According to the selected target attention weight, it is determined that the corresponding preset available field is a 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 source is searched to obtain data related to the target field to form a target data set.

[0031] After obtaining the target data set, the to-be-processed task in the agent is processed using the target data set. For example, if the to-be-processed task is flood control dispatching, 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 of rescue resources and the dispatching path are optimized according to these data 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 in 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 these data to ensure that personnel can safely and quickly evacuate from 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.

[0032] In this embodiment, the attention mechanism is introduced to dynamically quantify the relevance of the fields of the heterogeneous data source to the task, 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 using the attention mechanism, so as to dynamically determine the attention weight of each field to the current task, thereby avoiding the subjectivity and inefficiency of traditional manual definition of related fields, and automatically identifying the most relevant fields 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 the target fields, so that the most valuable data fields for the current task are screened out, and the retrieval range is accurately compressed to the field subset related to the task. Finally, the heterogeneous data source is accurately searched based on the target field to obtain the target data set that matches 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 manual rules are difficult to adapt to business changes and improving the robustness of data retrieval.

[0033] 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 embodiment one can be referred to the above introduction, and the subsequent will not be described. On this basis, the step of determining the attention weight of the plurality of preset available fields to the to-be-processed task based on the attention mechanism comprises: Step A10, encoding processing the to-be-processed task to obtain a first encoding vector, and encoding processing a plurality of preset available fields to obtain a second encoding vector; The to-be-processed task is encoded and processed to convert it into a fixed dimension vector, called the first encoding vector. Natural language processing technology or machine learning algorithm, such as BERT (Bidirectional Encoder Representations from Transformers, based on Transformer bidirectional encoder representation), RoBERTa (ARobustly Optimized BERT Approach, a robustly optimized BERT), Transformer and other models, can be used for encoding processing to convert the semantic information or feature information of the task into a numerical vector form. For example, in the flood rescue scene, the to-be-processed task may be "to evaluate the water level change of a certain disaster area", and after encoding processing, 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".

[0034] At the same time, each preset available field is also encoded and processed 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 coordinate" field of the geographic information system.

[0035] Step A20, taking 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; The first encoding vector is taken as a query vector (Query), and each second encoding vector is taken as a key vector (Key). The similarity between the query vector and each key vector is calculated by using an attention function. The attention function is a function for calculating the relevance or matching degree between the query vector and the key vector, such as dot product attention function.

[0036] Specifically, the dot-product attention function calculates the dot product of the query vector and the key vector to obtain a scalar value representing the degree of matching between the query vector and the key vector. For example, if the task to be processed is to evaluate water level changes, and a certain 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 semantically more relevant. In this way, the relevance of each field to the task to be processed can be quantified.

[0037] Step A30, normalizing each of the similarities to obtain normalized similarities, and determining that each of the normalized similarities is an attention weight of each of the preset available fields for the task to be processed.

[0038] The calculated similarities are normalized. The 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 for the current task to be processed.

[0039] In a possible implementation, before the step of determining the attention weights of the plurality of preset available fields for the task to be processed based on the attention mechanism, the method further includes: 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; 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.

[0040] 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; 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 a flood rescue 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, fields that may have an important impact on the current task can be preliminarily screened, reducing the amount of data for subsequent processing, and improving the efficiency and accuracy of the system.

[0041] Step B30, based on the filtered preset available fields, performing the step of determining the attention weight of the preset available fields to the to-be-processed task based on the attention mechanism.

[0042] Based on the filtered preset available fields, further perform the weight determination step based on the attention mechanism. This step is the core processing process, which dynamically evaluates the relevance of each field to the to-be-processed task through the attention mechanism, and assigns an attention weight to each field. Since the fields with high feature importance values have been filtered 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 scenario, the filtered 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, providing more accurate basis for subsequent data retrieval and task processing.

[0043] The present embodiment uses a random forest classifier to preliminarily filter the fields, and combines the attention mechanism to more carefully evaluate the filtered fields, thereby achieving efficient and accurate processing of fields in heterogeneous data sources to adapt to dynamic task requirements in complex scenarios (such as flood relief).

[0044] Based on the first and / or second embodiments of the present application, in the third embodiment of the present application, the same or similar content as the above embodiments one and two can refer 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: 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 to index original data in the heterogeneous data source, and different index feature vectors index different original data. Search for a target index feature vector matching the target field in a preset index database. The preset index database is a pre-constructed index system used to quickly locate the original data in the heterogeneous data source. Each index feature vector is a multidimensional vector that contains feature information related to a specific field, used to uniquely identify and locate the original data in the heterogeneous data source.

[0045] 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.

[0046] 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 rescue 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.

[0047] 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 rescue 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.

[0048] 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: Step D10, vectorizing the target field to obtain a target vector; 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.

[0049] 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; 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 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.

[0050] In one possible implementation, the step of performing weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance comprises: Step D201, multiplying the first preset coefficient by the Euclidean distance to obtain a first distance; 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; Step D203, calculating the sum of the first distance and the second distance to obtain a fusion distance.

[0051] 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 a 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 a 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.

[0052] For example, 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, i.e. the fusion distance is 0.6*Euclidean distance+0.4*Manhattan distance, the capture ability of significant abnormalities is effectively amplified by giving a higher weight (0.6) to the Euclidean distance, such as when the target vector has a sudden peak in the "transaction volume" dimension in financial transaction data, the square characteristic of the Euclidean distance will significantly amplify the difference in this dimension, while the sensitivity to multi-dimensional small fluctuations is maintained by retaining the weight (0.4) of the Manhattan distance. 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, and is especially suitable for multi-dimensional data with large differences in the distribution of each dimension.

[0053] Step D30, screening a target fusion distance meeting a 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 a target index feature vector.

[0054] According to the preset approximate nearest neighbor search condition, the target fusion distance meeting 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 distances less than the threshold are selected; or a ranking threshold can be set, and the first K index feature vectors with the smallest fusion distances 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.

[0055] The embodiment improves the accuracy and robustness of the matching of the index feature vectors by fusing the dual measurement mechanisms of the Euclidean distance and the Manhattan distance. Specifically, after the target field is vectorized to generate the target vector, the Euclidean distance (reflecting the absolute offset in the multi-dimensional space) and the Manhattan distance (capturing the cumulative effect of the dimension difference) of the target vector and each vector in the preset index library are calculated synchronously. Since the field characteristics of heterogeneous data sources have different dimension sensitivities, such as the numerical field which needs to pay attention to the overall offset and the category field which needs to pay attention to the dimension change, a single distance measurement is easy to cause misjudgment: 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 the fusion distance, the ability to capture significant abnormal dimensions of the Euclidean distance is retained, such as the sudden transaction volume peak in the financial field, and the cumulative effect of the small changes in multiple dimensions is balanced by the Manhattan distance, such as the scattered inventory fluctuations in the supply chain, thereby avoiding the missed detection caused by single dimension mutation (guaranteed by the Euclidean distance) and preventing the scattered small offset from being ignored (guaranteed by the Manhattan distance), achieving accurate index hit across heterogeneous data sources, such as the "real-time water level" field vector matching 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.

[0056] 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 contents as the above-mentioned first embodiment, second embodiment and third embodiment can be referred to the above introduction, and the subsequent will not be repeated. On this basis, before the step of searching the target index feature vector matching the target field in the preset index database, the method further comprises: Step E10, obtaining 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; Data is obtained 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. Data source heterogeneity refers to differences in data format, structure, and / or storage method, etc. in the data sources. For example, in a flood relief scenario, 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.

[0057] Step E20, data preprocessing is performed on the multi-source heterogeneous data to obtain cleaned data, wherein the data preprocessing includes unifying timestamp format and unifying physical parameter units; Specifically, all raw data in the multi-source heterogeneous data is preprocessed to ensure data consistency and comparability. This data preprocessing includes but is not limited to unifying timestamp format and unifying physical parameter units, such as data de-sensitization processing.

[0058] Unifying timestamp format 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.

[0059] 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.

[0060] Data de-sensitization processing refers to technical processing of sensitive information to enable safe use 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.

[0061] Step E30, feature extraction is performed on the cleaned data to obtain feature vectors, and L2 normalization processing is performed on each of the feature vectors to obtain an index feature vector corresponding to each of the raw data; Feature extraction is performed on the cleaned data to convert the data into feature vectors. The process of feature extraction can choose different methods according to the type of data and application scenarios. 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.

[0062] Subsequently, L2 normalization is performed on the extracted feature vectors. L2 normalization is a common normalization method that divides each element of the feature vector by the L2 norm of the vector (i.e., the 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, and the accuracy and efficiency of subsequent calculations can be improved.

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

[0064] The normalized index feature vectors are stored in the preset index database. The preset index database is an index system for quickly retrieving and locating data, which organizes and manages the original data through the 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.

[0065] In one possible implementation, the step of performing feature extraction on the cleaned data to obtain feature vectors includes: 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; If the cleaned data includes single-modal text data, use the LayoutLMv3 (Layout Language Modeling version 3) model 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 that can effectively represent the core semantics and structural features of the text. For example, in the anti-flood disaster 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.

[0066] Step F20, if the single-modal image data is included in the cleaned 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; If the single-modal image data is included in the cleaned data, a ResNet-50 (Residual Network with 50 layers) model will be used for feature extraction of 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.

[0067] Step F30, if the multi-modal image-text data is included in the cleaned data, feature extraction is performed on the text data in the multi-modal image-text data by a LayoutLMv3 model, feature extraction is performed on the 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. If the multi-modal image-text data is included in the cleaned data, the LayoutLMv3 model and the ResNet-50 model will be used to extract features of 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.

[0068] Step F40, if the sensor data is included in the cleaned data, feature extraction is performed on the sensor data by a pre-set time-series feature extraction model to obtain a feature vector corresponding to the sensor data.

[0069] 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.

[0070] 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 which reference is made to Figure 3 As shown in the figure, the data retrieval process includes: 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.

[0071] 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, and a preset index database is constructed based on Faiss and the index feature vectors.

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

[0073] 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.

[0074] 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 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.

[0075] 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.

[0076] In addition, the present embodiment also proposes an agent, as shown in Figure 4 The agent comprises: An acquisition module 10 is configured to acquire a to-be-processed task in an agent. A determination module 20 is configured to determine 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 agent. A screening module 30 is configured to sort each attention weight in descending order to obtain a sorting queue, and select at least one target attention weight in the front row of the sorting queue. A retrieval module 40 is configured to determine a target field corresponding to the target attention weight as the preset available 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.

[0077] 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-oriented task data retrieval method as described above.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] It should be understood that various 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.

[0083] 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.

[0084] In addition, in order 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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).

[0089] 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

[0090] 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.

[0091] 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.

[0092] 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 data retrieval method for an agent task as described above.

[0093] The computer program product of the present application has the same implementation as the above-mentioned embodiments of the data retrieval method for an agent task, and thus is not described here again.

[0094] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or systems that comprise a list of elements do not include only those elements recited, but also other elements that are not expressly listed or inherent to such processes, methods, articles, or systems. Without more limitations, an element defined by the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or system that includes the element.

[0095] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0096] 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, and of course 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 a ROM / RAM, a magnetic disc, an optical disc) as described above, and includes a plurality of instructions for making a data retrieval device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the embodiments of the present application.

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

Claims

1. An agent task-oriented data retrieval method, characterized in that, The agent task-oriented data retrieval method comprises the following steps: Obtaining a to-be-processed task in an agent; Determine the attention weight of a plurality of preset available fields on the to-be-processed task based on an attention mechanism, wherein the preset available field is an available field contained in a heterogeneous data source connected with the agent; Sort each attention weight in descending order to obtain a sorting queue, and select at least one attention weight in the front row of the sorting queue as a target attention weight; Determine the preset available field corresponding to the target attention weight as 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.

2. The method of claim 1, wherein the data retrieval is directed to an agent task. The step of determining the attention weight of a plurality of preset available fields on the to-be-processed task based on an attention mechanism comprises: Encode the to-be-processed task to obtain a first encoding vector, and encode a plurality of preset available fields to obtain a second encoding vector; Using the first encoding vector as a query vector and each second encoding vector as a key vector, calculate the similarity between the query vector and each key vector through an attention function; Normalize each similarity to obtain a normalized similarity, and determine that the normalized similarity of each preset available field is the attention weight of the to-be-processed task.

3. The agent-task oriented data retrieval method of claim 1, wherein, Before the step of determining the attention weight of a plurality of preset available fields on the to-be-processed task based on an attention mechanism, the method further comprises: Input a plurality of preset available fields into a preset random forest classifier to output a feature importance value corresponding to each preset available field; Filter the preset available fields with a feature importance value greater than or equal to a preset threshold from each preset available field; Based on the filtered preset available fields, perform the step of determining the attention weight of a plurality of preset available fields on the to-be-processed task based on an attention mechanism.

4. The method of claim 1, wherein the data retrieval is directed to an agent task. The step of retrieving the heterogeneous data source based on the target field to obtain a target data set comprises: Find 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 to index original data in the heterogeneous data source, and different index feature vectors index different original data; Retrieve the heterogeneous data source based on the target index feature vector, and combine the retrieved original data to obtain a target data set.

5. The agent-task oriented data retrieval method of claim 4, wherein, The step of finding a target index feature vector matching the target field in a preset index database comprises: Vectorize the target field to obtain a target vector; For each index feature vector in the preset index database, calculate the Euclidean distance and Manhattan distance between the target vector and the index feature vector, and perform weighted summation on the Euclidean distance and Manhattan distance to obtain a fusion distance; Screening a target fusion distance meeting a preset approximate nearest neighbor search condition in each of the fusion distances, and determining an index feature vector corresponding to the target fusion distance as a target index feature vector.

6. The agent-task oriented data retrieval method of claim 5, wherein, The step of performing weighted summation on the Euclidean distance and the Manhattan distance to obtain a fusion distance comprises: multiplying a first preset coefficient by the Euclidean distance to obtain a first distance; multiplying a second preset coefficient by the Manhattan distance to obtain a second distance, wherein the second preset coefficient is smaller than the first preset coefficient; calculating a sum value between the first distance and the second distance to obtain a fusion distance.

7. The agent-task oriented data retrieval method of claim 4, wherein, Before the step of searching for a target index feature vector matching the target field in the preset index database, the method further comprises: obtaining multi-source heterogeneous data from heterogeneous data sources, wherein the heterogeneous data sources comprise at least two heterogeneous data sources, and the multi-source heterogeneous data comprises original data from each of the data sources; performing data preprocessing on the multi-source heterogeneous data to obtain cleaned data, wherein the data preprocessing comprises unifying timestamp formats and unifying physical parameter units; performing feature extraction on the cleaned data to obtain feature vectors, and performing L2 normalization processing on each of the feature vectors to obtain an index feature vector corresponding to each of the original data; creating or updating the preset index database based on the index feature vector corresponding to each of the original data.

8. The agent-task oriented data retrieval method of claim 7, wherein, The step of performing feature extraction on the cleaned data to obtain feature vectors comprises: if the cleaned data comprises single-modal text data, performing 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; if the cleaned data comprises single-modal image data, performing feature extraction on the single-modal image data by using a ResNet-50 model to obtain a feature vector corresponding to the single-modal image data; if the cleaned data comprises multi-modal image-text data, performing feature extraction on text data in the multi-modal image-text data by using a LayoutLMv3 model, performing feature extraction on image data in the multi-modal image-text data by using a ResNet-50 model, and splicing feature extraction results of the LayoutLMv3 model and the ResNet-50 model to obtain a feature vector corresponding to the multi-modal image-text data; if the cleaned data comprises sensor data, performing feature extraction on the sensor data by using a preset time-series feature extraction model to obtain a feature vector corresponding to the sensor data.

9. A data retrieval apparatus, characterized by comprising: comprise: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is executed by the processor to implement the data retrieval method for intelligent agent tasks according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a data retrieval program, and the data retrieval program is executed by the processor to implement the steps of the data retrieval method for intelligent agent tasks according to any one of claims 1 to 8.

Citation Information

Patent Citations

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

    CN117009456A

  • Erasure code compatible read-write method and system based on bidirectional data access proxy

    CN119620957A

  • Multi-mode heterogeneous data query method and device

    CN119903073A

  • Data retrieval method and device, storage medium and electronic equipment

    CN120632075A

  • Search result reordering method and apparatus, device, storage medium, and program product

    US20240211512A1