CN-122019590-A - Index data query method and device and electronic equipment
Abstract
The disclosure provides a query method of index data, relates to the technical field of data processing, and particularly relates to the technical fields of intelligent agents, knowledge maps, multi-source heterogeneous data processing and the like. The method comprises the steps of responding to an index data query request sent by an application layer and aiming at a target index entity, obtaining a unified descriptor bound with the target index entity from a knowledge graph layer, wherein the unified descriptor is a predefined set of query configurations for obtaining target index data corresponding to the target index entity, analyzing the unified descriptor to determine the query configurations of the target index data corresponding to the index data query request, initiating a data obtaining request to corresponding external data sources based on the query configurations to obtain original index data, processing the original index data to obtain processed standard index data, and returning the processed standard index data to the application layer. The method provided by the disclosure can enable the user to efficiently inquire the index data of the index entity.
Inventors
- LIU RUI
- LIN XINGYU
Assignees
- 百度(中国)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260108
Claims (14)
- 1. A method of querying index data, wherein the method comprises: in response to an index data query request sent by an application layer and aiming at a target index entity, acquiring a unified descriptor bound with the target index entity from a knowledge graph layer, wherein the unified descriptor is a predefined set of query configurations for acquiring target index data corresponding to the target index entity; analyzing the unified descriptor and determining the query configuration of the target index data corresponding to the index data query request; Based on the query configuration, initiating a data acquisition request for a corresponding external data source to acquire original index data; and processing the original index data to obtain processed standard index data and returning the processed standard index data to the application layer.
- 2. The method of claim 1, wherein the query configuration of the unified descriptor includes at least an identification of one or more external data sources, query parameters for each of the external data sources, and a parameter dimension conversion rule for each of the external data sources, wherein the parameter dimension conversion rule is used to convert an original parameter dimension contained in the index data query request into a data source parameter dimension identifiable by the external data source; the step of initiating a data acquisition request to a corresponding external data source based on the query configuration to acquire original index data comprises the following steps: based on the query configuration, acquiring an external data source corresponding to the target index data, the query parameters of each external data source and the parameter dimension conversion rule for each external data source; converting the original parameter dimension in the index data query request into the data source parameter dimension according to the parameter dimension conversion rule; And initiating a data acquisition request to the corresponding external data source and acquiring original data based on the identification of each external data source, the query parameters of each external data source and the converted data source parameter dimension of each external data source.
- 3. The method of claim 2, wherein the parameter dimension conversion rules include at least one of parameter dimension name mapping rules and parameter dimension value conversion rules; the converting the original parameter dimension in the index data query request into the data source parameter dimension according to the parameter dimension conversion rule includes: Mapping the parameter dimension names of the original parameter dimensions contained in the index data query request into parameter dimension names of the data source parameter dimensions corresponding to the external data source according to the parameter dimension name mapping rule; And/or converting the parameter dimension value of the original parameter dimension contained in the index data query request into the parameter dimension value of the data source parameter dimension corresponding to the external data source according to the parameter dimension value conversion rule.
- 4. The method of claim 3, wherein the converting the parameter dimension value of the original parameter dimension included in the index data query request into the parameter dimension value of the data source parameter dimension corresponding to the external data source according to the parameter dimension value conversion rule includes: And calling a conversion function preset in the parameter dimension value conversion rule, and converting the parameter dimension value of the original parameter dimension into the parameter dimension value of the data source parameter dimension.
- 5. The method of any of claims 1-4, wherein the query configuration of the unified descriptor includes at least data processing rules; The processing the original index data to obtain processed standard index data and returning the processed standard index data to the application layer comprises the following steps: And processing the original index data according to the data processing rule obtained by analyzing the unified descriptor to obtain processed standard index data and returning the processed standard index data to the application layer.
- 6. The method of claim 5, wherein the data processing rules include at least data calculation expressions, and/or format processing rules; The processing the original index data according to the data processing rule obtained by analyzing the unified descriptor includes: calculating the original index data according to the data calculation expression; And/or processing the format of the original index data according to the format processing rule.
- 7. The method according to any one of claims 1-6, wherein, before the obtaining, from a knowledge-graph layer, a unified descriptor bound to a target entity in response to an index data query request sent by an application layer for the target entity, the method further comprises: constructing a knowledge graph containing a plurality of index entities in the knowledge graph layer; the unified descriptor is added to the attributes of at least part of the index entities.
- 8. The method of claim 7, wherein the method further comprises, after the knowledge-graph layer builds a knowledge graph comprising a plurality of index entities, before adding the unified descriptor in the attributes of at least some of the index entities: And establishing an association relation between one index entity and at least one service entity through an entity association field.
- 9. The method of any of claims 1-8, wherein the unified descriptor is encapsulated as structured format information.
- 10. The method according to any of claims 1-9, applied at an intelligent query layer, the intelligent query layer being connected between the application layer and the knowledge graph layer; And the application layer calls a unified service interface provided by the intelligent query layer and sends an index data query request aiming at a target index entity to the intelligent query layer.
- 11. An index data query device, wherein the device comprises: the descriptor acquisition module is used for responding to an index data query request sent by an application layer and aiming at a target index entity, and acquiring a unified descriptor bound with the target index entity from a knowledge graph layer, wherein the unified descriptor is a predefined set of query configuration for acquiring target index data corresponding to the target index entity; the descriptor analysis module is used for analyzing the unified descriptor and determining the query configuration of the target index data corresponding to the index data query request; The data acquisition module is used for initiating a data acquisition request to a corresponding external data source based on the query configuration to acquire original index data; and the data processing module is used for processing the original index data to obtain processed standard index data and returning the processed standard index data to the application layer.
- 12. An electronic device, comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
- 13. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-10.
- 14. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-10.
Description
Index data query method and device and electronic equipment Technical Field The disclosure relates to the technical field of data processing, in particular to the technical fields of intelligent agents, knowledge maps, multi-source heterogeneous data processing and the like. Background Currently, knowledge graph technology is widely applied to constructing a domain knowledge system to realize semantic association and query of entity relationships. However, the conventional knowledge graph is generally used as a static knowledge base, and data thereof is imported through an offline extraction, conversion and loading (ETL) process, so that it is difficult to directly interface with and reflect index data continuously changing in an external data source. While schemes exist for integrating multi-source data by building a unified data warehouse or logical view, these schemes tend to focus on the centralized storage or virtual aggregation of data and do not give the knowledge-graph itself the ability to actively query external index data in real-time. The knowledge graph can only answer the static relation problem among the entities, and cannot directly acquire real-time index data corresponding to the entities. Disclosure of Invention The disclosure provides a query method and device for index data for solving at least one of the technical problems and electronic equipment. According to a first aspect of the present disclosure, there is provided a query method of index data, wherein the method includes: in response to an index data query request sent by an application layer and aiming at a target index entity, acquiring a unified descriptor bound with the target index entity from a knowledge graph layer, wherein the unified descriptor is a predefined set of query configurations for acquiring target index data corresponding to the target index entity; analyzing the unified descriptor and determining the query configuration of the target index data corresponding to the index data query request; Based on the query configuration, initiating a data acquisition request for a corresponding external data source to acquire original index data; and processing the original index data to obtain processed standard index data and returning the processed standard index data to the application layer. According to a second aspect of the present disclosure, there is provided an index data query apparatus, wherein the apparatus includes: the descriptor acquisition module is used for responding to an index data query request sent by an application layer and aiming at a target index entity, and acquiring a unified descriptor bound with the target index entity from a knowledge graph layer, wherein the unified descriptor is a predefined set of query configuration for acquiring target index data corresponding to the target index entity; the descriptor analysis module is used for analyzing the unified descriptor and determining the query configuration of the target index data corresponding to the index data query request; The data acquisition module is used for initiating a data acquisition request to a corresponding external data source based on the query configuration to acquire original index data; and the data processing module is used for processing the original index data to obtain processed standard index data and returning the processed standard index data to the application layer. According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above. According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to the above. According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to the above. It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification. Drawings The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein: FIG. 1 is a schematic diagram of an exemplary index data query system constructed in accordance with the present disclosure; fig. 2 is a flow chart of a query method of index data according to a first embodiment of the present disclosure; FIG. 3 is a schematic flow diagram of an exemplary S102; Fig. 4 is a schematic s