Data query method and device, electronic equipment and storage medium

By constructing a relationship graph to be queried and using language processing models and grammatical rules to generate data column labels, the problem of low data query efficiency in existing technologies is solved, and multi-dimensional query and mining of data asset association relationships are realized.

CN120596548APending Publication Date: 2025-09-05SHANGHAI SENYAOXIN MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510760267.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing technologies cannot support multi-dimensional data queries, which makes it difficult to mine the relationships between different data assets and leads to low query efficiency.

Method used

By building a relationship graph to be queried, using language processing models and grammatical rules to generate labels for data columns, and mapping nodes of different data assets, multi-dimensional queries can be achieved.

Benefits of technology

It improves the richness and efficiency of data query and can fully explore the relationship between different data assets without creating new data assets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120596548A_ABST
    Figure CN120596548A_ABST
Patent Text Reader

Abstract

According to the data query method and device, the electronic equipment and the storage medium provided by the invention, the first table information and the second table information from different data assets are firstly obtained, and the to-be-queried relation graph is constructed according to the relation between each first data column associated with the first table information and each second data column associated with the second table information; as the target node in the to-be-queried relational graph can be mapped with each target field in the target field group input by the user, compared with the prior art, the method has the advantages that the independent data asset query is converted into the query on the graph, so that the user does not need to newly build query data in the data assets, and the query efficiency is improved. The to-be-queried relational graph can completely mine the association relationship among different data assets, so that the richness of data query and the data query efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the field of data processing technology, and in particular to a data query method, device, electronic device and storage medium. Background Art

[0002] With the development of information technology, enterprises and organizations have accumulated vast amounts of data assets. Existing methods can find corresponding data assets based on criteria such as name and type, but they cannot support multi-dimensional combined queries. When faced with complex queries, users are often forced to repeatedly execute isolated queries and manually integrate the results, hindering the discovery of relationships between different data assets and resulting in low query efficiency. Summary of the Invention

[0003] The purpose of the present invention is to provide a data query method, device, electronic device and storage medium to solve the above technical problems.

[0004] In a first aspect, a data query method is provided, comprising:

[0005] Obtain information from the first table and the second table from different data assets;

[0006] Constructing a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, wherein each first data column and each second data column have matching fields, and nodes in the relationship graph to be queried are mapped one-to-one to each first data column and each second data column;

[0007] Receive a target field group input by a user, and determine a node mapped to a data column matched by each target field in the target field group as a target node;

[0008] Querying target paths between all target nodes according to the relationship graph to be queried; and

[0009] A query is performed from a database having the different data assets according to the target path to obtain a query result, and the query result is returned to the user.

[0010] In some embodiments, constructing a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information includes:

[0011] Acquire each first tag associated with each first data column and each second tag associated with each second data column, wherein the semantic information indicated by each first tag is different from each other, and the semantic information indicated by each second tag is different from each other;

[0012] Acquire the relationship between the first data columns and the second data columns by matching the first tags with the second tags; and

[0013] A relationship graph to be queried is constructed according to the relationship between the first data columns and the second data columns.

[0014] In some embodiments, obtaining each first tag associated with each first data column and each second tag associated with each second data column includes:

[0015] Performing sampling recognition on the first table information and the second table information respectively according to grammatical rules;

[0016] generating first labels associated with the first data columns according to the samples identified from the first table information; and

[0017] The second labels associated with the second data columns are generated according to the samples identified from the second table information, wherein the samples include: designated field names and / or data features to be identified.

[0018] In some embodiments, obtaining each first tag associated with each first data column and each second tag associated with each second data column includes:

[0019] Processing the first table information through a language processing model to output first labels associated with the first data columns; and

[0020] The second table information is processed by the language processing model to output second labels associated with the second data columns, wherein the language processing model includes an NLP model and an LLM model.

[0021] In some embodiments, obtaining each first tag associated with each first data column and each second tag associated with each second data column includes:

[0022] Determining first tags associated with the first data columns;

[0023] In the case where there is a blood relationship between any first data column and any second data column, a corresponding second label is assigned to the second data column based on the predetermined first label of the first data column, so that the semantic information indicated by the second label of the second data column is consistent with the semantic information indicated by the first label of the first data column.

[0024] In some embodiments, querying target paths between all target nodes according to the relationship graph to be queried includes:

[0025] Querying multiple paths between all target nodes in the relationship graph to be queried;

[0026] Deduplication is performed on the multiple paths found, and the multiple paths are sorted in order of length from shortest to longest; and

[0027] According to the sorting result, a specified number of paths among the multiple paths are confirmed as the target paths.

[0028] In some embodiments, the first table information includes table meta information and table data information of a first table data set, and the second table information includes table meta information and table data information of a second table data set, wherein the first table data set and the second table data set are derived from different data assets, and the table meta information includes at least the table name, table comment, field name and field type of the corresponding table data set.

[0029] In a second aspect, a data query device is provided, comprising:

[0030] An acquisition module, configured to acquire first table information and second table information from different data assets;

[0031] a graph construction module, configured to construct a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, wherein each first data column and each second data column have matching fields, and nodes in the relationship graph to be queried are mapped one-to-one to each first data column and each second data column;

[0032] a receiving module configured to receive a target field group input by a user, and determine a node mapped to a data column matched by each target field in the target field group as a target node;

[0033] A query module is used to query the target path between all target nodes according to the relationship graph to be queried; and to query from the database with the different data assets according to the target path, obtain the query result, and return the query result to the user.

[0034] In a third aspect, an electronic device is provided. The electronic device includes: one or more processors; and one or more memories coupled to the one or more processors and storing instructions thereon. When the instructions are executed individually or collectively by the one or more processors, the electronic device performs the method of the first aspect described above.

[0035] In a fourth aspect, a non-transitory computer-readable storage medium storing machine-executable instructions is provided. The machine-executable instructions, when executed by one or more processors of a machine, cause the machine to perform any one of the above methods.

[0036] The technical effects of the embodiments of this application are as follows:

[0037] The data query method, device, electronic device and storage medium provided in the present application first obtain first table information and second table information from different data assets, and construct a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information. Since the target node in the relationship graph to be queried can be mapped to each target field in the target field group input by the user, compared with the existing technology, the above method converts independent data asset queries into queries on the graph, so that the user does not need to query data in a new data asset. The relationship graph to be queried can fully explore the association relationship between different data assets, thereby improving the richness and efficiency of data queries.

[0038] It should be understood that the invention summary is not intended to identify the key or essential features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings are included to provide a further understanding of the present application. They are incorporated into and constitute a part of this application. The accompanying drawings illustrate embodiments of the present application and, together with this specification, serve to explain the principles of the present application. In the accompanying drawings:

[0040] Figure 1 This is a flowchart of a data query method exemplified in this application;

[0041] Figure 2 is a schematic diagram of a target path exemplified in this application;

[0042] Figure 3 This is a schematic diagram of a data query device exemplified in this application;

[0043] Figure 4 This is a schematic diagram of an electronic device exemplified in this application. DETAILED DESCRIPTION

[0044] The principle of the present disclosure will now be described with reference to some embodiments. It should be understood that the description of these embodiments is merely for illustrative purposes and helps those skilled in the art to understand and implement the present disclosure without placing any restriction on the scope of the present disclosure. The disclosure described herein can be implemented in a manner different from that described below.

[0045] In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.

[0046] References in this disclosure to "one embodiment," "an embodiment," "an exemplary embodiment," etc., indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes the particular feature, structure, or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. In addition, when a particular feature, structure, or characteristic is described in conjunction with an exemplary embodiment, whether or not explicitly described, those skilled in the art will recognize that such feature, structure, or characteristic may be combined with other embodiments.

[0047] The terms involved in this embodiment are explained as follows:

[0048] NLP (Natural Language Processing): natural language processing technology.

[0049] LLM (Large Language Model): Large Language Model.

[0050] In related technologies, users perform isolated queries on different data assets and manually integrate the results. For example, data asset a records patient identity information, including each patient's phone number, while data asset b records electronic medical records, including each patient's diagnosed illness. To learn the diagnosed illness of a patient with a specific phone number, a user can only query data asset a for the phone number, then query data asset b for the diagnosed illness. Finally, a new data asset is created based on the phone number and the diagnosed illness data to facilitate the next query. This approach hinders the discovery of relationships between different data assets, resulting in inefficient user queries.

[0051] Based on this, embodiments of the present application provide a data query method, device, electronic device, and storage medium, which mine potential associations between different data assets to meet the user's data query requirements and data query efficiency.

[0052] Figure 1 1 is a flow chart 100 of an exemplary data query method. Figure 1 , the method comprising:

[0053] S101, obtaining first table information and second table information from different data assets.

[0054] The data range of the first table information includes the table meta information and table data information of the first table data set, and the data range of the second table information includes the table meta information and table data information of the second table data set.

[0055] For example, the first table dataset originates from data asset a, which is used to record patient identity information, and the second table dataset originates from data asset b, which is used to record electronic medical records. The first table dataset's meta-information (such as the table name, table comments, field names, and field types) and its table data information are identified as first table information, while the second table dataset's meta-information (such as the table name, table comments, field names, and field types) and its table data information are identified as second table information.

[0056] S102: Construct a relationship graph to be queried according to the relationship between each first data column associated with the first table information and each second data column associated with the second table information.

[0057] Each first data column and each second data column have matching fields, and the nodes in the relationship graph to be queried are mapped one-to-one with each first data column and each second data column.

[0058] Illustratively, the matching field may be a column name corresponding to the first data column or the second data column, or may be a label generated for the first data column or the second data column.

[0059] After the relationship between each first data column and each second data column is determined, each first data column and each second data column is mapped one by one to a node, and the edge connecting each node is determined based on the relationship between each first data column and the corresponding second data column, thereby constructing a relationship graph to be queried.

[0060] In some embodiments, a relationship graph to be queried is constructed based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, including: obtaining each first label associated with each first data column and each second label associated with each second data column, wherein the semantic information indicated by each first label is different from each other, and the semantic information indicated by each second label is different from each other; obtaining the relationship between each first data column and each second data column by matching each first label with each second label; and constructing the relationship graph to be queried based on the relationship between each first data column and each second data column.

[0061] Each first label is used to distinguish each first data column, and each second label is used to distinguish each second data column. After the labels are generated, an edge is generated between the nodes mapped to two first data columns, an edge is generated between the nodes mapped to two second data columns, and, through label matching, an edge is generated between the nodes mapped to a first label and a second label that can be successfully matched.

[0062] In some embodiments, obtaining each first label associated with each first data column and each second label associated with each second data column includes: sampling and identifying the first table information and the second table information respectively according to grammatical rules; generating each first label associated with each first data column based on the sampling identified from the first table information; and generating each second label associated with each second data column based on the sampling identified from the second table information, wherein the sampling includes: specified field names and / or data features to be identified.

[0063] In other words, for the acquired first table information and second table information, first labels associated with first data columns and second labels associated with second data columns may be generated according to grammatical rules.

[0064] Grammar rules can comprehensively consider factors such as table names, table comments, column names, column comments, column types, sample data, and required ratios. They can also be designed based on data characteristics, such as requiring strings to contain limited fields, limiting field lengths, and specifying data formats. Grammar rules can be expressed using regular expressions or other expressions, with no restrictions.

[0065] For example, see Table 1 below. In this embodiment, the grammatical rules corresponding to some first tags are as follows:

[0066] Table 1

[0067]

[0068]

[0069] In some embodiments, obtaining each first label associated with each first data column and each second label associated with each second data column includes: processing the first table information through a language processing model to output each first label associated with each first data column; and processing the second table information through a language processing model to output each second label associated with each second data column, wherein the language processing model includes an NLP model and an LLM model.

[0070] In other words, the acquired first table information and second table information may also be processed by a language processing model to generate first labels associated with first data columns and second labels associated with second data columns.

[0071] Exemplarily, the annotation information of the first data table is input into the NLP model to obtain first labels associated with first data columns.

[0072] In some embodiments, obtaining each first label associated with each first data column and each second label associated with each second data column includes: determining each first label associated with each first data column; in the case where there is a blood relationship between any first data column and any second data column, assigning a corresponding second label to the second data column based on the predetermined first label of the first data column, so that the semantic information indicated by the second label of the second data column is consistent with the semantic information indicated by the first label of the first data column.

[0073] In other words, for the obtained first table information and second table information, if the first table information has determined the first tag, the second tag required by the second table information can also be determined more quickly through tag transfer.

[0074] For example, if a second data column B1 is generated from a first data column A1, that is, B1 and A1 are related, then according to the semantic information indicated by the first label of A1, a second label with consistent semantic information can be assigned to B1.

[0075] It should be understood that if the second label of the second data column is predetermined, the first label can also be assigned to the corresponding first data column according to the blood relationship, thereby improving the efficiency of constructing the relationship graph to be queried by label transfer.

[0076] S103: Receive a target field group input by the user, and determine a node mapped to a data column that matches each target field in the target field group as a target node.

[0077] The target field group can be reflected in the query conditions entered by the user. For example, if the query condition entered by the user is "Disease code of the disease diagnosed by the patient with phone number XXX," the device can determine that the query condition includes a target field group consisting of two target fields: "Phone number" and "Disease code." A node with a first label that matches the target field "Phone number" is identified as target node 1, and a node with a first label that matches the target field "Disease code" is identified as target node 2.

[0078] S104: Query the target paths between all target nodes according to the relationship graph to be queried.

[0079] Let's use target node 1 and target node 2 as an example. During a graph query, we can use target node 1 as the starting node and target node 2 as the ending node to find the target path between the starting and ending nodes. Similarly, we can use target node 2 as the starting node and target node 1 as the ending node to find the target path between the starting and ending nodes.

[0080] In some embodiments, querying target paths between all target nodes based on the relationship graph to be queried includes: querying multiple paths between all target nodes in the relationship graph to be queried; deduplicating the multiple queried paths, and sorting the multiple paths in order of path length from short to long; and confirming a specified number of paths among the multiple paths as target paths based on the sorting results.

[0081] In other words, during the query process on the graph, if there are multiple paths between target nodes, then the multiple paths can be deduplicated and filtered to select some high-quality paths as target paths.

[0082] For example, see Figure 2 , which is a schematic diagram 200 of an exemplary target path. Assuming that in the query relationship graph, there is only a path of target node 1 - target node 3 - target node 4 - target node 2, where the labels of target node 3 and target node 4 both represent the patient's name, then this path can be confirmed as the target path.

[0083] S105: querying from databases with different data assets according to the target path, obtaining query results, and returning the query results to the user.

[0084] When there are multiple target paths, they can be queried separately in the database, with the results of each query integrated and sorted, and finally returned to the user. It should be understood that because this approach converts independent data asset queries into queries on the graph, even if the database does not have data assets that meet the current query conditions, there is no need to create new data assets, and the user's query requirements can be met.

[0085] Figure 3 300 is a schematic diagram of a data query device provided by this embodiment. The device includes an acquisition module 301, a graph construction module 302, a receiving module 303 and a query module 304.

[0086] An acquisition module 301 is used to acquire first table information and second table information from different data assets;

[0087] A graph construction module 302 is configured to construct a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, wherein each first data column and each second data column have matching fields, and nodes in the relationship graph to be queried are mapped one-to-one to each first data column and each second data column;

[0088] The receiving module 303 is configured to receive a target field group input by a user, and determine a node mapped to a data column that matches each target field in the target field group as a target node;

[0089] The query module 304 is used to query the target paths between all target nodes according to the relationship graph to be queried; and to query from databases with different data assets according to the target paths, obtain query results, and return the query results to the user.

[0090] In some embodiments, a relationship graph to be queried is constructed based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information. The graph construction module 302 is used to:

[0091] Obtain each first label associated with each first data column and each second label associated with each second data column, wherein the semantic information indicated by each first label is different from each other, and the semantic information indicated by each second label is different from each other; obtain the relationship between each first data column and each second data column by matching each first label with each second label; and construct a relationship graph to be queried based on the relationship between each first data column and each second data column.

[0092] In some embodiments, after obtaining each first label associated with each first data column and each second label associated with each second data column, the graph construction module 302 is configured to:

[0093] The first table information and the second table information are sampled and identified respectively according to grammatical rules; first labels associated with each first data column are generated based on the samples identified from the first table information; and second labels associated with each second data column are generated based on the samples identified from the second table information, wherein the samples include: specified field names and / or data features to be identified.

[0094] In some embodiments, after obtaining each first label associated with each first data column and each second label associated with each second data column, the graph construction module 302 is configured to:

[0095] The first table information is processed by a language processing model to output first labels associated with each first data column; and the second table information is processed by a language processing model to output second labels associated with each second data column, wherein the language processing model includes an NLP model and an LLM model.

[0096] In some embodiments, after obtaining each first label associated with each first data column and each second label associated with each second data column, the graph construction module 302 is configured to:

[0097] Determine each first label associated with each first data column; in the case where there is a blood relationship between any first data column and any second data column, assign a corresponding second label to the second data column based on the predetermined first label of the first data column, so that the semantic information indicated by the second label of the second data column is consistent with the semantic information indicated by the first label of the first data column.

[0098] In some embodiments, the query module 304 is used to query the target paths between all target nodes according to the relationship graph to be queried:

[0099] Query multiple paths between all target nodes in the relationship graph to be queried; deduplicate the multiple queried paths and sort the multiple paths in order of path length from short to long; and confirm a specified number of paths among the multiple paths as target paths based on the sorting results.

[0100] In some embodiments, the first table information includes table meta information and table data information of the first table data set, and the second table information includes table meta information and table data information of the second table data set, wherein the first table data set and the second table data set are derived from different data assets, and the table meta information includes at least the table name, table comment, field name and field type of the corresponding table data set.

[0101] Further, if Figure 4 An exemplary embodiment of the present application also provides an electronic device, comprising one or more memories 401 and one or more processors 402, wherein the one or more memories 401 are coupled to the one or more processors 402 and store instructions thereon, and the instructions can be executed individually or collectively by the one or more processors 402, so that the electronic device performs any method as in the first aspect.

[0102] It should be understood that the processor mentioned in the embodiments of the present application may be a CPU, or may be other general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0103] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory, dynamic random access memory, synchronous dynamic random access memory, double data rate synchronous dynamic random access memory, enhanced synchronous dynamic random access memory, synchronously linked dynamic random access memory, and direct memory bus random access memory.

[0104] The present application also provides a non-transitory computer-readable storage medium storing machine-executable instructions, wherein the computer-executable instructions can be executed by one or more processors of a machine. The machine may include the electronic device mentioned above, etc. When the computer-executable instructions are executed by the one or more processors, the machine performs any of the methods mentioned above.

[0105] A computer-readable storage medium may include a propagated data signal embodying computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination thereof. The computer-readable storage medium may be connected to an instruction execution system, device, or apparatus to communicate, propagate, or transmit the program for use. The program code on the computer-readable storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above.

[0106] The basic concepts have been described above. It will be apparent to those skilled in the art that the above disclosures are merely illustrative and do not constitute limitations on this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and amendments to this application. Such modifications, improvements, and amendments are suggested in this application and remain within the spirit and scope of the exemplary embodiments of this application.

[0107] At the same time, this application uses specific terms to describe the embodiments of this application. For example, "one embodiment," "an embodiment," and / or "some embodiments" refer to a certain feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that "one embodiment," "an embodiment," or "an alternative embodiment" mentioned twice or multiple times in different locations in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application may be appropriately combined.

[0108] Some aspects of the present application can be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software can be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program code. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs...), smart cards, and flash memory devices (e.g., cards, sticks, key drives...).

[0109] A computer-readable medium may include a propagated data signal embodying computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination thereof. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium that can be connected to an instruction execution system, apparatus, or device to communicate, propagate, or transmit the program for use. The program code on the computer-readable medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above.

[0110] Similarly, it should be noted that, in order to simplify the presentation of this application and thus facilitate understanding of one or more embodiments of the invention, the foregoing descriptions of the embodiments of this application sometimes combine multiple features into a single embodiment, figure, or description thereof. However, this disclosure method does not mean that the subject matter of this application requires more features than those recited in the claims. In fact, an embodiment may have fewer features than all of the features of a single embodiment disclosed above.

[0111] In some embodiments, numbers are used to describe the quantity of components and attributes. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise stated, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the description and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of the present application are approximate values, in specific embodiments, the settings of such numerical values ​​are as accurate as possible within the feasible range.

[0112] Although the present application has been described with reference to the current specific embodiments, ordinary technicians in this technical field should recognize that the above embodiments are only used to illustrate the present application, and various equivalent changes or substitutions can be made without departing from the spirit of the present application. Therefore, as long as the changes and modifications to the above embodiments are within the scope of the essential spirit of the present application, they will fall within the scope of the claims of the present application.

Claims

1. A data query method, characterized in that: include: Obtain information from the first table and the second table from different data assets; Constructing a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, wherein each first data column and each second data column have matching fields, and nodes in the relationship graph to be queried are mapped one-to-one to each first data column and each second data column; Receive a target field group input by a user, and determine a node mapped to a data column matched by each target field in the target field group as a target node; Query the target paths between all target nodes according to the relationship graph to be queried; as well as A query is performed from a database having the different data assets according to the target path to obtain a query result, and the query result is returned to the user.

2. The method according to claim 1, wherein Constructing a relationship graph to be queried according to the relationship between each first data column associated with the first table information and each second data column associated with the second table information includes: Acquire each first tag associated with each first data column and each second tag associated with each second data column, wherein the semantic information indicated by each first tag is different from each other, and the semantic information indicated by each second tag is different from each other; Acquire the relationship between the first data columns and the second data columns by matching the first tags with the second tags; and A relationship graph to be queried is constructed according to the relationship between the first data columns and the second data columns.

3. The method according to claim 2, wherein Acquiring each first tag associated with each first data column and each second tag associated with each second data column includes: Performing sampling recognition on the first table information and the second table information respectively according to grammatical rules; generating first labels associated with the first data columns according to the samples identified from the first table information; and The second labels associated with the second data columns are generated according to the samples identified from the second table information, wherein the samples include: designated field names and / or data features to be identified.

4. The method according to claim 2, wherein Acquiring each first tag associated with each first data column and each second tag associated with each second data column includes: Processing the first table information through a language processing model to output first labels associated with the first data columns; and The second table information is processed by the language processing model to output second labels associated with the second data columns, wherein the language processing model includes an NLP model and an LLM model.

5. The method according to claim 2, wherein Acquiring each first tag associated with each first data column and each second tag associated with each second data column includes: Determining first tags associated with the first data columns; In the case where there is a blood relationship between any first data column and any second data column, a corresponding second label is assigned to the second data column based on the predetermined first label of the first data column, so that the semantic information indicated by the second label of the second data column is consistent with the semantic information indicated by the first label of the first data column.

6. The method according to any one of claims 1 to 4, characterized in that: Querying target paths between all target nodes according to the relationship graph to be queried includes: Querying multiple paths between all target nodes in the relationship graph to be queried; Deduplication is performed on the multiple paths found, and the multiple paths are sorted in order of length from shortest to longest; and According to the sorting result, a specified number of paths among the multiple paths are confirmed as the target paths.

7. The method according to any one of claims 1 to 4, characterized in that: The first table information includes table meta information and table data information of the first table data set, and the second table information includes table meta information and table data information of the second table data set, wherein the first table data set and the second table data set are derived from different data assets, and the table meta information includes at least the table name, table comment, field name and field type of the corresponding table data set.

8. A data query device, characterized in that: include: An acquisition module, configured to acquire first table information and second table information from different data assets; a graph construction module, configured to construct a relationship graph to be queried based on the relationship between each first data column associated with the first table information and each second data column associated with the second table information, wherein each first data column and each second data column have matching fields, and nodes in the relationship graph to be queried are mapped one-to-one to each first data column and each second data column; a receiving module configured to receive a target field group input by a user, and determine a node mapped to a data column matched by each target field in the target field group as a target node; A query module, configured to query target paths between all target nodes according to the relationship graph to be queried; And querying from the database having the different data assets according to the target path to obtain query results, and returning the query results to the user.

9. An electronic device comprising: one or more processors; as well as One or more memories coupled to the one or more processors and storing thereon instructions, which, when executed individually or collectively by the one or more processors, cause the electronic device to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing machine-executable instructions, which, when executed by one or more processors of a machine, cause the machine to perform the method of any one of claims 1-7.