Data query method and device, equipment, medium and product
The target query tree is constructed through pre-trained language models, which solves the problem of difficult data query in the existing technology, and realizes efficient and accurate data query results acquisition.
Patent Information
- Application Number
- CN202510389526.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, it is impossible to accurately construct a search or query tree, which makes it difficult to query data and find accurate query results.
By obtaining object description information, using the pre-trained language model to extract the index data combination, and constructing a target query tree based on the predetermined query tree, searching the target database to obtain matching search results.
Automatically constructing a target query tree is realized, reducing the difficulty of data query and improving the accuracy and efficiency of query results.
Smart Images

Figure CN120296050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a data query method, device, equipment, medium and product. Background Art
[0002] Currently, it is usually based on a retrieval formula or a query tree to query target objects that meet predetermined conditions in a database. The accuracy of the query result depends on the accuracy of the construction of the retrieval formula or the query tree. Therefore, it is difficult for those who cannot accurately construct an accurate retrieval formula or query tree to use the existing data query methods.
[0003] Therefore, there is a need to provide a more intelligent data query method to reduce the difficulty of data query. Summary of the Invention
[0004] The present invention provides a data query method, device, equipment, medium and product to reduce the difficulty of data query.
[0005] According to one aspect of the present invention, there is provided a data query method, including:
[0006] Obtain object description information;
[0007] Input the object description information and predetermined description information into a pre-trained language model to obtain a first index data combination. The predetermined description information includes prompt information for extracting each predetermined index in an index set and index data of each of the predetermined indexes. The index set includes all predetermined indexes in the object description information. The first index data combination includes at least one predetermined index and index data of each of the at least one predetermined index;
[0008] Determine a target query tree corresponding to the first index data combination according to a predetermined query tree corresponding to the index set;
[0009] Search in a target database based on the target query tree to obtain a search result, where the search result includes at least one target object that matches the first index data combination.
[0010] According to another aspect of the present invention, there is provided a data query device, characterized by including:
[0011] An obtaining module, configured to obtain object description information;
[0012] An extraction module, configured to input the object description information and predetermined description information into a pre-trained language model to obtain a first set of metric data. The predetermined description information includes prompt information for extracting each predetermined metric in a metric set and the metric data of each predetermined metric. The metric set includes all predetermined metrics in the object description information. The first set of metric data includes at least one predetermined metric and the metric data of each predetermined metric in the at least one predetermined metric;
[0013] A query tree module, configured to determine a target query tree corresponding to the first set of metric data according to a predetermined query tree corresponding to the metric set;
[0014] A search module, configured to perform a search in a target database based on the target query tree to obtain a search result, where the search result includes at least one target object that matches the first set of metric data.
[0015] According to another aspect of the present invention, there is provided an electronic device, including:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor. When the computer program is executed by the at least one processor, the at least one processor is enabled to execute the data query method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for enabling a processor to implement the data query method according to any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, there is provided a computer program product including a computer program that implements the data query method according to any embodiment when executed by a processor.
[0021] In the technical solution provided by the embodiment of the present invention, since the predetermined description information includes the prompt information for extracting each predetermined index in the index set and the index data of each predetermined index, the pre-trained language model can extract all the predetermined indexes included in the object description information and the index data of all the predetermined indexes based on the predetermined description information; since the predetermined query tree corresponding to the index set is known, the target query tree corresponding to the first index data combination can be determined according to the predetermined query tree, and the automatic construction of the target query tree is completed; finally, a search result is obtained by searching in the target database based on the automatically constructed target query tree. In this way, the user only needs to input the object description information to obtain the required search result, which reduces the difficulty of data search in the target database.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 is a flowchart of the data query method provided by the embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of the change in the number of objects during the search provided by the embodiment of the present invention;
[0026] Figure 3 is another flowchart of the data query method provided by the embodiment of the present invention;
[0027] Figure 4 is a schematic structural diagram of the data query device provided by the embodiment of the present invention;
[0028] Figure 5 is another schematic structural diagram of the data query device provided by the embodiment of the present invention;
[0029] Figure 6 is another schematic structural diagram of the data query device provided by the embodiment of the present invention;
[0030] Figure 7 is a schematic structural diagram of the electronic device for implementing the data query method of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0032] It should be noted that in the description and claims of the present invention and the above-mentioned accompanying drawings, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing, transfer and other processing of the user's personal information involved all comply with the provisions of relevant laws and regulations, and the user needs to be informed and obtain the consent or authorization of the user. When applicable, technical processing of de-identifying and / or anonymizing and / or encrypting the user's personal information is performed.
[0034] Figure 1 The flowchart of the data query method is provided for the embodiments of the present invention. This embodiment is applicable to the situation where data search is automatically performed in the target database based on the description information of the target object and the predetermined description information, and accurate search results are obtained. This method can be executed by a data query device, which can be implemented in the form of hardware and / or software, and the data query device can be configured in the processor of an electronic device. As Figure 1 shown, the method includes:
[0035] S110. Obtain object description information.
[0036] The object description information can be understood as the diagnosis and treatment information used to describe the conditions met by the target object, which includes at least one target index and the index data of each target index in the at least one target index.
[0037] S120. Input the object description information and the predetermined description information into a pre-trained language model to obtain a first set of metric data. The predetermined description information includes prompt information for extracting each predetermined metric in the metric set and the metric data of each predetermined metric. The metric set includes all the predetermined metrics in the object description information. The first set of metric data includes at least one predetermined metric and the metric data of each predetermined metric in the at least one predetermined metric.
[0038] The predetermined description information is pre-set description information, which includes prompt information for extracting each predetermined metric in the metric set and the metric data of each predetermined metric.
[0039] The target database includes a target database table, and the target database table includes multiple metrics. The metric set includes the multiple metrics or some of the multiple metrics, and the metric set can cover all the predetermined metrics in the object description information.
[0040] A query tree is a tree-shaped data structure. Each node usually contains a keyword and pointers to child nodes, and is sorted and grouped according to certain characteristics of the data so that the required data can be quickly located during query.
[0041] The metric set includes multiple predetermined metrics, and the query trees corresponding to the multiple predetermined metrics are known. Therefore, the relationships between the metrics in the metric set are known.
[0042] After inputting the object description information and the predetermined description information into the pre-trained language model, the pre-trained language model can extract all the predetermined metrics included in the object description information based on the predetermined description information to obtain a first set of metric data.
[0043] Exemplarily, the object description information includes a first metric, a second metric, and a third metric, as well as the metric data of the three metrics. The predetermined description information includes prompt information for extracting the third metric, a fourth metric, a fifth metric, and the metric data of the three metrics. Then, the pre-trained language model can extract the third metric and the metric data of the third metric from the object description information based on the predetermined description information.
[0044] S130. Determine the target query tree corresponding to the first set of metric data according to the predetermined query tree corresponding to the metric set.
[0045] Since the query tree corresponding to the metric set is known, the positions of each predetermined metric in the metric set in the predetermined query tree or the positional relationship between different predetermined metrics in the predetermined query tree are known. Therefore, the target query tree corresponding to the first set of metric data can be determined according to the predetermined query tree corresponding to the metric set. This step achieves the technical effect of automatically determining the target query tree corresponding to the first set of metric data.
[0046] In one embodiment, after the target query tree is determined, the target query tree is displayed; in response to a modification operation on the target query tree, the target query tree is modified according to the modification operation corresponding to the modification operation to update the target query tree.
[0047] Specifically, after the target query tree is determined, the target query tree is displayed on the interaction interface. If the user finds that there is a problem with the target query tree, the target query tree can be modified. For example, modify the content of any node in the target query tree. The processor responds to the modification operation on the target query tree, performs the modification corresponding to the modification operation on the target query tree, determines the modification result, and uses the modification result as the latest target query tree. This embodiment improves the accuracy of the final target query tree by configuring the target query tree as a modifiable query tree, meeting the usage requirements of some users.
[0048] S140. Search in the target database based on the target query tree to obtain a search result, where the search result includes at least one target object that matches the first index data combination.
[0049] After the target query tree is determined, the target database can be retrieved according to the target query tree to obtain a search result. Since the target query tree corresponds to the first index data combination, the search result includes all target objects that meet the conditions defined by the first index data combination.
[0050] The search result includes the number of target objects. Figure 2 This is a schematic diagram of the change process of the number of objects during the search provided by the embodiment of the present invention. In this figure, there are 8,776 patients in the target database who meet the condition of being male, 2,422 patients in the target database who meet the condition of having a systolic blood pressure greater than 200, and 4,392 patients in the target database who meet the condition of having a diastolic blood pressure greater than 110; there are 895 patients who meet all three of these characteristics. Therefore, the target search result includes the object identifiers and object data of 895 target objects.
[0051] In the technical solution provided by the embodiment of the present invention, since the predetermined description information includes prompt information for extracting each predetermined index in the index set and the index data of each predetermined index, the pre-trained language model can extract all the predetermined indexes included in the object description information and the index data of all the predetermined indexes based on the predetermined description information; since the predetermined query tree corresponding to the index set is known, the target query tree corresponding to the first index data combination can be determined according to the predetermined query tree to complete the automatic construction of the target query tree; finally, a search result is obtained by searching in the target database based on the automatically constructed target query tree. In this way, the user only needs to input the object description information to obtain the required search result, reducing the difficulty of searching for data in the target database.
[0052] Figure 3 The flowchart of the data query method provided by the embodiment of the present invention adds a search result display step on the basis of the foregoing embodiment. As Figure 3 shown, the method includes:
[0053] S210. Obtain object description information.
[0054] S220. Input the object description information and the predetermined description information into a pre-trained language model to obtain a first index data combination. The predetermined description information includes prompt information for extracting each predetermined index in the index set and the index data of each predetermined index. The index set includes all predetermined indexes in the object description information. The first index data combination includes at least one predetermined index and the index data of each predetermined index in the at least one predetermined index.
[0055] S230. Determine the target query tree corresponding to the first index data combination according to the predetermined query tree corresponding to the index set.
[0056] S240. Perform a search in the target database based on the target query tree to obtain a search result. The search result includes at least one target object that matches the first index data combination.
[0057] S250. Display the search result in a table form in the visualization interface. The search result includes the object identifier and object data of each target object in the at least one target object. The object data includes the index data of each predetermined index in the first index data combination for the corresponding target object.
[0058] The search result may include all the diagnosis and treatment data of each target object, or may only include the index data of each predetermined index in the first index data combination.
[0059] Exemplarily, the first index data combination includes that the age is less than 3 years old, the body temperature is greater than 39 degrees, and there are moist rales in the lungs. The search result includes a target object with an identifier of 01 and a target object with an identifier of 02. The object data of the target object with an identifier of 01 includes: age 2 years old, body temperature 39.5 degrees, and there are moist rales in the lungs; the object data of the target object with an identifier of 02 includes: age 1.5 years old, body temperature 40 degrees, and there are moist rales in the lungs.
[0060] In one embodiment, the search result may include all the diagnosis and treatment data of each target object, and the object data is added with a set identifier.
[0061] The set identifier may be a color identifier or a line identifier, and the present embodiment does not make specific limitations on it.
[0062] Exemplarily, the first indicator data combination includes being less than 3 years old, having a body temperature greater than 39 degrees, and having moist rales in the lungs. The target table includes a first field and a second field. The first field is the object identifier, corresponding to the first column of the target table, and the second field is the diagnosis and treatment data, corresponding to the second column of the target table. It can be understood that the object identifier and the diagnosis and treatment data of the same object are located in the same row of the target table. The target table includes a target object with an identifier of 01 and a target object with an identifier of 02. The object data of the target object with an identifier of 01 includes: 2 years old, female gender, body temperature of 39.5 degrees, and having moist rales in the lungs. Among them, "2 years old, body temperature of 39.5 degrees, and having moist rales in the lungs" is marked in yellow; the object data of the target object with an identifier of 02 includes: 1.5 years old, male gender, body temperature of 40 degrees, and having moist rales in the lungs. Among them, "1.5 years old, body temperature of 40 degrees, and having moist rales in the lungs" is marked in yellow.
[0063] In one embodiment, the visualization interface further includes a data traceability control for each target object. In response to a trigger operation on the data traceability control, the traceability information of each indicator data of the corresponding target object is displayed. The traceability information includes the source of the indicator data, the acquisition time, and the data governance process. This embodiment enables the user to simply and directly clarify the traceability information of the diagnosis and treatment data of the target object and determine the credibility of the diagnosis and treatment data based on the traceability information.
[0064] In one instance, the visualization interface further includes a data traceability control for all target objects. The user can query the traceability results of the diagnosis and treatment data of all target objects by clicking or touching the data traceability control. Specifically, after the user clicks or touches the data traceability control, the processor responds to the trigger operation on the data traceability control and displays the traceability information of the diagnosis and treatment data of each target object. This embodiment enables the user to query the traceability information of the diagnosis and treatment data of all target objects with one click.
[0065] In one embodiment, the search results are displayed in a table form in the visualization interface, and at least one of the object description information and the target query tree is also displayed. This embodiment facilitates the user to view or compare the object qualification conditions and the search results simultaneously, improving the readability of the search results.
[0066] In one embodiment, the table is configured with at least one of a data filtering control, a paging display control, a data export control, and a sorting control corresponding to each field. The processor, in response to a trigger operation on the sorting control, sorts the metric data under the corresponding field in the search results to update the search results; in response to a trigger operation on the data filtering control, filters the search results to update the search results; in response to a trigger operation on the paging display control, displays the search results in pages; and in response to a trigger operation on the data export control, exports the search results to a set storage location.
[0067] The setting of the sorting control corresponding to each field enables the user to sort the target object by sorting the metric data under the target field based on the sorting control. The setting of the filtering control allows the user to filter the search results based on filtering conditions to complete the object screening operation in the search results. The setting of the paging control can improve the readability of the search results. The setting of the export control can increase the usage scenarios of the search results.
[0068] The technical solution provided by the embodiment of the present invention displays the search results in tabular form in the visualization interface, and the search results include the object identifier and object data of each target object in at least one target object, and the object data includes the metric data under each target metric in the first metric data combination, which improves the readability of the search results.
[0069] Figure 4 It is a schematic structural diagram of the data query device provided by the embodiment of the present invention. As Figure 4 shown, the device includes:
[0070] An acquisition module 31, configured to acquire object description information;
[0071] An extraction module 32, configured to input the object description information and predetermined description information into a pre-trained language model to obtain a first metric data combination, where the predetermined description information includes prompt information for extracting each predetermined metric in the metric set and the metric data of each predetermined metric, the metric set includes all predetermined metrics in the object description information, and the first metric data combination includes at least one predetermined metric and the metric data of each predetermined metric in the at least one predetermined metric;
[0072] A query tree module 33, configured to determine a target query tree corresponding to the first metric data combination according to a predetermined query tree corresponding to the metric set;
[0073] A search module 34, configured to perform a search in the target database based on the target query tree to obtain a search result, where the search result includes at least one target object that matches the first metric data combination.
[0074] In one embodiment, the query tree module 33 is further configured to:
[0075] Display the target query tree;
[0076] In response to a modification operation on the target query tree, perform a modification corresponding to the modification operation on the target query tree to update the target query tree.
[0077] In one embodiment, as Figure 5 shown, the device further includes a display module 35, and the display module 35 is configured to:
[0078] Display the search result in a table form in a visualization interface, where the search result includes the object identifier and object data of each of the at least one target object, and the object data includes the metric data of the corresponding target object under each of the predetermined metrics in the first metric data combination.
[0079] In one embodiment, a set identifier is added to the object data.
[0080] In one embodiment, the visualization interface includes a data traceability control for the diagnosis and treatment data of each target object. As Figure 6 shown, the device further includes a traceability module 36, and the traceability module 36 is configured to:
[0081] In response to a trigger operation on the data traceability control, display the traceability information of the metric data of the corresponding target object, where the traceability information includes the source, acquisition time, and data governance process of the metric data.
[0082] In one embodiment, the display module 35 is further configured to:
[0083] Display at least one of the target query tree and the object description condition in the visualization interface.
[0084] In the technical solution provided by the embodiment of the present invention, since the predetermined description information includes the prompt information for extracting each predetermined index in the index set and the index data of each predetermined index, the pre-trained language model can extract all the predetermined indexes included in the object description information and the index data of all the predetermined indexes based on the predetermined description information; since the predetermined query tree corresponding to the index set is known, the target query tree corresponding to the first index data combination can be determined according to the predetermined query tree, and the automatic construction of the target query tree is completed; finally, the search result is obtained by searching in the target database based on the automatically constructed target query tree. In this way, the user only needs to input the object description information to obtain the required search result, which reduces the difficulty of data search in the target database.
[0085] The data query device provided by the embodiment of the present invention can execute the data query method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0086] Figure 7 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0087] As Figure 7 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor, and the processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0088] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0089] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data query method.
[0090] In some embodiments, the data query method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data query method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the data query method by any other suitable means (e.g., by means of firmware).
[0091] The various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs, the one or more computer programs can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a dedicated or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0092] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0093] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0095] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0096] A computing system can include clients and servers. The clients and servers are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs that run on respective computers and have a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0097] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the data query method provided in any embodiment of the present application.
[0098] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computer, partially on the user computer, executed as a stand-alone software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (e.g., by connecting through the Internet using an Internet service provider).
[0099] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitations are imposed herein.
[0100] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data query method, characterized in that, Including: Obtain object description information; Input the object description information and the predetermined description information into a pre-trained language model to obtain a first set of metric data. The predetermined description information includes prompt information for extracting each predetermined metric in the metric set and the metric data of each of the predetermined metrics. The metric set includes all the predetermined metrics in the object description information. The first set of metric data includes at least one predetermined metric and the metric data of each of the at least one predetermined metric; Determine the target query tree corresponding to the first set of metric data according to the predetermined query tree corresponding to the metric set; Perform a search in the target database based on the target query tree to obtain a search result. The search result includes at least one target object that matches the first set of metric data.
2. The method according to claim 1, wherein After determining the target query tree corresponding to the first set of metric data according to the predetermined query tree corresponding to the metric set, it further includes: Display the target query tree; In response to a modification operation on the target query tree, perform a modification corresponding to the modification operation on the target query tree to update the target query tree.
3. The method according to claim 1, characterized in that After performing a search in the target database based on the target query tree to obtain a search result, it further includes: Display the search result in a table form in a visualization interface. The search result includes the object identifier and object data of each of the at least one target object. The object data includes the metric data of each of the predetermined metrics in the first set of metric data corresponding to the target object.
4. The method according to claim 3, wherein: A set identifier is added to the object data.
5. The method according to claim 3 or 4, characterized in that The visualization interface includes a data traceability control for the diagnosis and treatment data of each target object. After displaying the search result in the visualization interface, it further includes: In response to a trigger operation on the data traceability control, display the traceability information of each metric data of the corresponding target object. The traceability information includes the source, acquisition time, and data governance process of the metric data.
6. The method according to claim 3, wherein While displaying the search result in a table form in the visualization interface, it further includes: Display at least one of the target query tree and the object description condition in the visualization interface.
7. A data query device, characterized in that, Including: An acquisition module for obtaining object description information; An extraction module for inputting the object description information and the predetermined description information into a pre-trained language model to obtain a first set of metric data. The predetermined description information includes prompt information for extracting each predetermined metric in the metric set and the metric data of each of the predetermined metrics. The metric set includes all the predetermined metrics in the object description information. The first set of metric data includes at least one predetermined metric and the metric data of each of the at least one predetermined metric; A query tree module for determining the target query tree corresponding to the first set of metric data according to the predetermined query tree corresponding to the metric set; A search module, configured to perform a search in a target database based on the target query tree to obtain a search result, where the search result includes at least one target object that matches the combination of the first metric data.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the data query method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for implementing the data query method according to any one of claims 1-6 when executed by a processor.
10. A computer program product, characterized in that, The computer program product includes a computer program that implements the data query method according to any one of claims 1-6 when executed by a processor.