Data retrieval method, device, equipment and medium

By combining knowledge graphs and generative language models, the limitations of existing information retrieval systems in matching and handling complex problems are solved, and more efficient and accurate semantic meaning analysis and data query are achieved.

CN119760051APending Publication Date: 2025-04-04TONGFANG KNOWLEDGE DIGITAL PUBLISHING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411822300.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing information retrieval system based on fuzzy queries can only perform simple matching, and the query is relatively limited; the information retrieval system based on discriminant neural network faces relatively complex problems, has strong dependence on training data, and has low query accuracy.

Method used

By combining the knowledge graph and the generative language model, the target generative language model is used to obtain the initial semantic feature information of the sentence to be retrieved, the knowledge graph is used for recall processing, the first semantic feature information is obtained, and the second semantic feature information is obtained using the generative language model, and finally the knowledge graph is used for querying, and the search results are obtained.

Benefits of technology

It improves the accuracy and efficiency of semantic intent analysis, improves the accuracy of data query, and solves the limitations of information retrieval systems and their dependence on training data in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760051A_ABST
    Figure CN119760051A_ABST
Patent Text Reader

Abstract

The present application discloses a data retrieval method, device, equipment and medium, and relates to the field of natural language processing technology, wherein the method comprises: obtaining the initial semantic feature information of the sentence to be retrieved using a target generative language model according to the acquired sentence to be retrieved; recalling the initial semantic feature information using a target knowledge graph to obtain first semantic feature information; obtaining the second semantic feature information of the sentence to be retrieved using the target generative language model according to the first semantic feature information and the sentence to be retrieved; querying the second semantic feature information using the target knowledge graph to obtain a retrieval result. The present application is applicable to data retrieval scenarios such as power data retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to data retrieval methods, devices, equipment and media. Background Art

[0002] Data retrieval is an advanced form of retrieval in information retrieval systems. It can accurately understand user needs, and accurately retrieve and summarize answers. Traditional information retrieval systems are often implemented using fuzzy queries and discriminant neural networks, and there is a strong division of information retrieval fields. Among them, information retrieval systems based on fuzzy queries use fuzzy matching to retrieve, which can only perform simple matching, with poor query results and inability to summarize; information retrieval systems based on discriminant neural networks can identify user intentions, accurately obtain user input questions by filling in entity slots, but require a large amount of corpus for model training, and when the questions are more complex, the quality of the model response deteriorates, and as the data grows, the model migration and generalization capabilities are poor.

[0003] Therefore, the existing solutions have shortcomings. Specifically, the information retrieval system based on fuzzy query can only perform simple matching, and the query is relatively limited; the information retrieval system based on discriminant neural network faces more complex problems, has a strong dependence on training data, and has low query accuracy. Summary of the invention

[0004] In view of this, the present application provides a data retrieval method, apparatus, equipment and medium, the main purpose of which is to solve the technical problems in the prior art that the information retrieval system based on fuzzy query can only perform simple matching and has great limitations in query, and the information retrieval system based on discriminant neural network faces more complex problems, has a strong dependence on training data, and has low query accuracy.

[0005] According to one aspect of the present application, a data retrieval method is provided, the method comprising:

[0006] According to the acquired sentence to be searched, initial semantic feature information of the sentence to be searched is obtained by using a target generative language model;

[0007] Using the target knowledge graph to perform recall processing on the initial semantic feature information to obtain first semantic feature information;

[0008] According to the first semantic feature information and the sentence to be retrieved, using the target generative language model to obtain second semantic feature information of the sentence to be retrieved;

[0009] The target knowledge graph is used to query the second semantic feature information to obtain a retrieval result.

[0010] According to another aspect of the present application, a data retrieval device is provided, the device comprising:

[0011] A first processing module is used to obtain initial semantic feature information of the sentence to be searched by using a target generative language model according to the sentence to be searched;

[0012] A recall module, used to recall the initial semantic feature information using a target knowledge graph to obtain first semantic feature information;

[0013] A second processing module, configured to obtain second semantic feature information of the sentence to be retrieved by using the target generative language model according to the first semantic feature information and the sentence to be retrieved;

[0014] A query module is used to use the target knowledge graph to query the second semantic feature information to obtain a retrieval result.

[0015] According to another aspect of the present application, a computer storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned data retrieval method is implemented.

[0016] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned data retrieval method when executing the program.

[0017] By means of the above technical scheme, the data retrieval method, device, equipment and medium provided by the present application, compared with the existing information retrieval system based on fuzzy query that can only perform simple matching, and the technical scheme of the information retrieval system based on discriminant neural network, the present application obtains the initial semantic feature information of the sentence to be retrieved based on the acquired sentence to be retrieved using the target generative language model; recalls the initial semantic feature information using the target knowledge graph to obtain the first semantic feature information; obtains the second semantic feature information of the sentence to be retrieved based on the first semantic feature information and the sentence to be retrieved using the target generative language model; and queries the second semantic feature information using the target knowledge graph to obtain the retrieval result. It can be seen that by combining the knowledge graph with the generative language model, the semantic intent analysis of the data to be retrieved is performed based on user needs, and the accuracy of the semantic intent analysis is improved by recalling the semantic feature information, thereby improving the efficiency of the semantic intent analysis and the accuracy of data query.

[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 A schematic diagram of a data retrieval method provided in an embodiment of the present application is shown;

[0021] Figure 2 A schematic diagram showing a flow chart of another data retrieval method provided in an embodiment of the present application is shown;

[0022] Figure 3 A schematic diagram of the structure of a data retrieval device provided in an embodiment of the present application is shown;

[0023] Figure 4 A schematic diagram of the structure of another data retrieval device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0025] In view of the technical problems that the information retrieval system based on fuzzy query in the prior art can only perform simple matching and has great query limitations, and the information retrieval system based on discriminant neural network faces more complex problems, has a strong dependence on training data, and has low query accuracy. This embodiment provides a data retrieval method, which improves the accuracy of semantic intent analysis by considering the combination of knowledge graph and generative language model, and by recalling semantic feature information, thereby improving the efficiency of semantic intent analysis and data query accuracy. Figure 1 As shown, the above method comprises the following steps:

[0026] Step 101: Based on the acquired sentence to be searched, the target generative language model is used to obtain the initial semantic feature information of the sentence to be searched.

[0027] In this embodiment, according to the user's search requirements, the search requirements (i.e., the sentences to be searched) are input into the target generative language model, which is a large language model, and the initial semantic feature information of the sentences to be searched is obtained by using the target generative language model. Among them, the initial semantic feature information includes information such as semantic intent, entity features, keywords (for example, the indicator name of power data), etc. The target generative language model is an initial generative language model obtained by pre-training (first model training) to obtain a first generative language model. In order to improve the accuracy of feature extraction of the generative language model, the model parameters are further fine-tuned (second model training) according to the acquired power data and the knowledge graph feature information of the power data to obtain the second generative language model, i.e., the target generative language model.

[0028] Step 102: Use the target knowledge graph to recall the initial semantic feature information to obtain first semantic feature information.

[0029] Step 103: According to the first semantic feature information and the sentence to be retrieved, the target generative language model is used to obtain second semantic feature information of the sentence to be retrieved.

[0030] In this embodiment, the initial semantic feature information is recalled to extract the first semantic feature information, that is, based on the preset recall strategy, the first semantic feature information (i.e., triple information) matching the target knowledge graph information is extracted from the initial semantic feature information to achieve information recall. Furthermore, the recalled first semantic feature information and the sentence to be retrieved (e.g., question text) are simultaneously input into the target generative language model to extract and infer the second semantic feature information aligned with the target knowledge graph information, including semantic intent, entity features, keywords (e.g., indicator names of power data), and other information. It can be seen that by introducing the first semantic feature information aligned with the target knowledge graph information format as the input data of the target generative language model, the accuracy of feature information extraction of the target generative language model can be improved.

[0031] For example, "the total contract amount of Guizhou State Grid Corporation in the past three years". Based on the data characteristics, the data in the contract table are the company name "Guizhou State Grid", "1577808000" timestamp, "contract" indicator, and "amount" attribute relationship. The recalled feature information and retrieval requirements are jointly input into the target generative language model, and the second semantic feature information aligned with the target knowledge graph is generated through model reasoning, such as the company name "Guizhou State Grid", "1577808000", "1697299200" timestamps, "contract" indicator, "amount" attribute relationship, and "sum" aggregation type.

[0032] Step 104: Use the target knowledge graph to query the second semantic feature information to obtain retrieval results.

[0033] In this embodiment, based on the second semantic feature information extracted by the target generative language model, an aggregate query statement is automatically constructed to query the query results matching the second semantic feature information from the target knowledge graph, and then a visualization report is generated based on the query results, thereby improving the efficiency of querying and analyzing keywords in the retrieval requirements (for example, the indicator names of power data) based on user retrieval requirements, while ensuring the accuracy of querying and analyzing keywords in the retrieval requirements (for example, the indicator names of power data).

[0034] For this embodiment, the above scheme can be followed. According to the acquired sentence to be retrieved, the initial semantic feature information of the sentence to be retrieved is obtained by using the target generative language model; the initial semantic feature information is recalled by using the target knowledge graph to obtain the first semantic feature information; according to the first semantic feature information and the sentence to be retrieved, the second semantic feature information of the sentence to be retrieved is obtained by using the target generative language model; the second semantic feature information is queried by using the target knowledge graph to obtain the retrieval result. Compared with the existing information retrieval system based on fuzzy query which can only perform simple matching, and the technical scheme of the information retrieval system based on discriminant neural network, this embodiment can perform semantic intent analysis on the data to be retrieved based on user needs by combining the knowledge graph with the generative language model, and improve the accuracy of the semantic intent analysis by recalling the semantic feature information, thereby improving the efficiency of the semantic intent analysis and the accuracy of data query.

[0035] Furthermore, as a refinement and expansion of the specific implementation methods of the above-mentioned embodiment, in order to fully explain the specific implementation process of this embodiment, another data retrieval method is provided. This embodiment can solve the technical problems that the information retrieval system based on fuzzy query in the existing technical solution can only perform simple matching and has large query limitations, and the information retrieval system based on discriminant neural network faces more complex problems, has a strong dependence on training data, and has low query accuracy. This embodiment can get rid of the strong dependence of the network model on training data samples based on the data retrieval method of the knowledge graph and the large language model, and effectively extract user intentions, entity features, keywords and other information based on the user's searched sentences, without multi-step reasoning, thereby effectively improving the accuracy and efficiency of data retrieval in question text question and answer scenarios, thereby realizing intelligent retrieval. Figure 2 As shown in the figure, taking the indicator data retrieval scenario in the State Grid power data as an example, the data retrieval method based on the knowledge graph and the generative language model includes:

[0036] Step 201: Perform structured processing on the acquired power data to obtain triplet information.

[0037] Step 202: construct a target knowledge graph of the power data based on the triple information.

[0038] In order to illustrate the specific implementation of step 202, as a preferred embodiment, step 202 includes: constructing a graph ontology according to the triple information; storing the triple information in a database based on the graph ontology to obtain the target knowledge graph of the power data.

[0039] During implementation, the data retrieval device includes a data processing module. Taking the indicator data in the power data of the State Grid as an example, the power data is structured and processed, and the triple information of the power data is obtained. By building a graph ontology, the triple information is imported into the graph ontology, and then a target knowledge graph based on the power data is constructed.

[0040] Specifically, the initial power data of the State Grid is unstructured data, which is processed by data processing tools through data fragmentation, entity extraction and other processing methods to generate a triple-type data format. For example, the text data is "contract payment workflow data, including: approval number, voucher number of invoice voucher, company code, fiscal year, purchase order description, provincial material company payment approval status, current period settlement value, paper invoice number, total number of attachments, payment bank, payment account number, check number, bank account number, bank name, application department, project release document number and other information". The text data is segmented by the fragmentation tool, and the entity and attribute relationship of the segmented text data is extracted and processed, and the sensitive fields are obtained as "approval number", "voucher number of invoice voucher", "company code", "fiscal year", "purchase order description", "provincial material company payment approval status", "current period settlement value", "paper invoice number", "total number of attachments", "payment bank", "payment account number", "check number", "bank account number", "bank name", "application department", "project release document number", and the indicator name is "contract payment". The entity recognition tool is used to extract the entity features such as company name, date, annual interest rate and other entity features related to the logistics service center indicator, and the entity features are combined into triple information, such as (contract payment)-[annual interest rate]->(xxxxx). Furthermore, the combined triple information is used to construct a graph ontology, and the triple information is imported into the graph ontology database to obtain the target knowledge graph of power data.

[0041] Step 203: Obtain a first generative language model obtained through first model training.

[0042] Step 204: Perform second model training on the first generative language model based on the acquired power data and the knowledge graph feature information in the target knowledge graph of the power data to obtain a second generative language model, where the second generative language model is the target generative language model.

[0043] In the implementation, the generative language model is used as a generative neural network model, preferably a large language model (LLM). The initial generative language model is pre-trained with a large amount of natural language text to obtain a first generative language model. The State Grid power data and triple information (the knowledge graph feature information of the power data) are further used as training samples to fine-tune the model parameters of the first generative language model (second model training). During the fine-tuning training, the loss generated by the data is back-propagated, and through the iterative training of the large language model, the large language model LLM can accurately extract the corresponding feature information to obtain the second generative language model, that is, the target generative language model. It can be seen that fine-tuning training based on the general first generative language model can effectively reduce the model training cost, improve the model training efficiency, and at the same time improve the model's understanding and generation capabilities, ensure the accuracy of model training, and by introducing power data and triple information, it is helpful for information completion and data generation in a specific format, reducing the steps of entity linking, format conversion, and knowledge reasoning, and effectively reducing the risk of error accumulation.

[0044] Step 205: According to the feature extraction instruction template, the sentence to be searched is fused to obtain a feature extraction instruction.

[0045] Step 206: According to the feature extraction instruction, the target generative language model is used to obtain initial semantic feature information of the sentence to be retrieved.

[0046] During implementation, when a user raises a query requirement, the user requirement is input into the data retrieval device in natural language to perform information retrieval. Specifically, the data retrieval device fills the text information into the feature extraction instruction template, and inputs the filled feature extraction instruction into the large language model LLM, thereby extracting the initial semantic feature information of the user's requirement. For example, "The total amount of contracts issued by the State Grid Guizhou Branch in 2022 is 1 million" is fused with the feature extraction instruction template, and the feature extraction instruction obtained after fusion is:

[0047] “Feature extraction task: extract features from text input. Here are some examples:

[0048] State Grid's annual interest rate is 100,000 --> State Grid (company name); 100,000 (annual interest rate)

[0049] Please perform feature extraction on the following input: The total amount of contracts issued by State Grid Guizhou Branch in 2022 is 1 million".

[0050] The feature extraction instructions are input into the large language model LLM to extract the initial semantic feature information of the user's needs, including semantic intent, entity features (including attribute relationships), keywords (for example, indicator names of power data), and other information, such as "The total amount of contracts issued by the State Grid Guizhou Branch in 2022 is 1 million - > 2022 (date); State Grid Guizhou Branch (unit name); Contract (indicator name); 1,000,000.00 (total amount)".

[0051] For another example, the target generative language model (large language model LLM) obtained through fine-tuning is used for natural language understanding and reasoning to extract information such as semantic intent, entity features, and indicator names. For example, "the total contract amount of Guizhou State Grid Company in the past three years", the large language model LLM is used for understanding and information extraction, and the extracted semantic intent, entity features, and indicator names are: "Guizhou State Grid Co., Ltd." is the company name, "2020-01-01 00:00:00 to 2023-10-15 00:00:00" is the time period, "amount" is the field information, and "contract" is the indicator name.

[0052] Step 207: Perform multi-level recall processing on the initial semantic feature information using a recall strategy according to the semantic intent, entity features and keywords in the initial semantic feature information to obtain first semantic feature information.

[0053] In implementation, the recall strategy includes the first recall strategy, the second recall strategy, the third recall strategy and the fourth recall strategy. According to the extracted initial semantic feature information, the graph information is recalled based on the preset information recall strategy, which can more systematically judge the accuracy of feature extraction. Specifically, the graph information is the target knowledge graph of the above-mentioned power data, and based on the constructed target knowledge graph of power data, the nodes are connected through attribute relationships with keywords (indicator names) as the center. Furthermore, in order to improve the quality of recalled information, the recall strategy adopts a multi-level recall strategy. For example, if the initial semantic feature information contains semantic intent, entity features (including attribute relationships), and keywords (for example, indicator names of power data), and they are matched with the data in the target knowledge graph respectively, the first recall strategy is used to perform precise matching and recall of the full feature information; if the initial semantic feature information contains keywords (for example, indicator names of power data) but does not contain other feature information, the second recall strategy is used to perform batch recall of keywords (for example, indicator names of power data); if the initial semantic feature information contains semantic intent and entity features (including attribute relationships) but does not contain keywords (for example, indicator names of power data), the third recall strategy is used to recall the semantic intent and entity features; if the initial semantic feature information does not contain semantic intent, entity features (including attribute relationships), and keywords (for example, indicator names of power data), the fourth recall strategy is used for fuzzy recall.

[0054] Step 208: According to the first semantic feature information and the sentence to be retrieved, the target generative language model is used to obtain second semantic feature information of the sentence to be retrieved.

[0055] In the implementation, the first semantic feature information (triplet information) obtained by recall and the sentence to be retrieved (user demand, i.e., question text) are input into the target generative language model, and the second semantic feature information corresponding to the user demand is extracted and inferred, i.e., semantic intent, entity features, and keywords (e.g., indicator names of power data). Among them, the second semantic feature information is aligned with the format of the target knowledge graph in the database, which can reduce the mismatch degree of subsequent data retrieval. Furthermore, the second semantic feature information can be aligned and checked again with the target knowledge graph in the database to improve the accuracy of subsequent data matching.

[0056] For example, "the total amount of contracts issued by the State Grid Guizhou Branch in 2022 is 1 million", the recalled triple information is "(contract)-[year]->(2022)"; "(contract)-[unit name]->(State Grid Guizhou Co., Ltd.)"; "(contract)-[annual interest rate]->(20000)"; "(contract)-[total amount]->(1000)". Again, according to the feature extraction instruction template, the first semantic feature information and the sentence to be retrieved are fused to obtain the feature extraction instruction, where the constructed feature extraction instruction is:

[0057] “Feature extraction task: extract features from text input. Here are some examples:

[0058] State Grid’s annual interest rate is 100,000—>State Grid (company name); 100,000 (annual interest rate)

[0059] Please perform feature extraction on the following input: The total amount of contracts issued by State Grid Guizhou Branch in 2022 is 1 million; (Contract)-[Year]->(2022); (Contract)-[Unit Name]->(State Grid Guizhou Co., Ltd.); (Contract)-[Annual Interest Rate]->(20000); (Contract)-[Total Amount]->(1000000.00)".

[0060] The feature extraction instruction is input into the target generative language model, and the feature extraction result (second semantic feature information) is the total contract amount issued by State Grid Guizhou Branch in 2022 is 1 million - > 2022 (date); State Grid Guizhou Co., Ltd. (unit name); Contract (indicator name); 1,000,000.00 (total amount).

[0061] Step 209: Generate a query instruction using a query instruction template according to the second semantic feature information.

[0062] Step 210: Utilize the query instruction to query from the target knowledge graph to obtain a retrieval result, wherein the retrieval result is generated according to a visualization template corresponding to the second semantic feature information.

[0063] In the implementation, the outputted second semantic feature information is automatically constructed to obtain an aggregate query statement, and the target knowledge graph is used for query and visualization report generation. Specifically, the second semantic feature information is the company name "Guizhou State Grid", "1577808000", "1697299200" timestamps, "contract" indicator, "amount" attribute relationship, and "sum" aggregation type. The automatically constructed aggregation query statement (Cypher statement) is: "MATCH (m)-[r:'amount']->(n), (m)-[r:'timestamp']->(s), (m)-[r:'company']->(c)WHERE m.indicator='contract'and s>'1577808000'and s<'1697299200'and c.name='Guizhou State Grid'RETURN sum(n);", and then the query results are generated according to different scenarios. Visual reports in the form of specified templates are output and displayed.

[0064] By applying the technical solution of this embodiment, the initial semantic feature information of the sentence to be retrieved is obtained by using the target generative language model according to the acquired sentence to be retrieved; the initial semantic feature information is recalled by using the target knowledge graph to obtain the first semantic feature information; the second semantic feature information of the sentence to be retrieved is obtained by using the target generative language model according to the first semantic feature information and the sentence to be retrieved; the second semantic feature information is queried by using the target knowledge graph to obtain the retrieval result. Compared with the existing information retrieval system based on fuzzy query which can only perform simple matching, and the technical solution of the information retrieval system based on discriminant neural network, this embodiment can perform semantic intent analysis on the data to be retrieved based on user needs by combining the knowledge graph with the generative language model, and improve the accuracy of the semantic intent analysis by recalling the semantic feature information, thereby improving the efficiency of the semantic intent analysis and the accuracy of data query.

[0065] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a data retrieval device, such as Figure 3 As shown, the device includes: a first processing module 33, a recall module 34, a second processing module 35, and a query module 36.

[0066] A first processing module 33 is used to obtain initial semantic feature information of the sentence to be searched using a target generative language model according to the sentence to be searched;

[0067] A recall module 34 is used to recall the initial semantic feature information using the target knowledge graph to obtain first semantic feature information;

[0068] A second processing module 35 is used to obtain second semantic feature information of the sentence to be retrieved using the target generative language model according to the first semantic feature information and the sentence to be retrieved;

[0069] The query module 36 is used to use the target knowledge graph to query the second semantic feature information to obtain a retrieval result.

[0070] In specific application scenarios, such as Figure 4 As shown, the device further includes: a data processing module 31.

[0071] The data processing module 31 is used to perform structured processing on the acquired power data to obtain triple information; and to construct a target knowledge graph of the power data based on the triple information.

[0072] In a specific application scenario, the step of constructing the target knowledge graph of the power data based on the triple information includes: constructing a graph ontology based on the triple information; and storing the triple information in a database based on the graph ontology to obtain the target knowledge graph of the power data.

[0073] In a specific application scenario, the device also includes a model training module 32.

[0074] The model training module 32 is used to obtain a first generative language model obtained through first model training; and, based on the acquired power data and the knowledge graph feature information in the target knowledge graph of the power data, perform second model training on the first generative language model to obtain a second generative language model, wherein the second generative language model is a target generative language model.

[0075] In a specific application scenario, the first processing module 33 includes: a fusion submodule 331 and an output submodule 332 .

[0076] The fusion submodule 331 is used to perform fusion processing on the to-be-searched sentence according to the feature extraction instruction template to obtain the feature extraction instruction.

[0077] The output submodule 332 is used to obtain the initial semantic feature information of the sentence to be retrieved using the target generative language model according to the feature extraction instruction.

[0078] In a specific application scenario, the recall module 34 is specifically used to perform multi-level recall processing on the initial semantic feature information according to the semantic intent, entity features and keywords in the initial semantic feature information using a recall strategy to obtain first semantic feature information; wherein the recall strategy includes a first recall strategy, a second recall strategy, a third recall strategy and a fourth recall strategy.

[0079] In a specific application scenario, the query module 36 includes: a first generating submodule 361 and a second generating submodule 362 .

[0080] The first generating submodule 361 is used to generate a query instruction using a query instruction template according to the second semantic feature information.

[0081] The second generation submodule 362 is used to use the query instruction to query from the target knowledge graph to obtain a retrieval result, and the retrieval result is generated according to the visualization template corresponding to the second semantic feature information.

[0082] It should be noted that for other corresponding descriptions of the functional units involved in the data retrieval device provided in the embodiment of the present application, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.

[0083] Based on the above Figure 1 and Figure 2 The method shown in the embodiment of the present application accordingly provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The data retrieval method shown.

[0084] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0085] Based on the above Figure 1 , Figure 2 The method shown, and Figure 3 , Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The data retrieval method shown.

[0086] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.

[0087] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0088] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of a computer device and supports the operation of information processing programs and other software and / or programs. The network communication module is used to achieve communication between components within the storage medium and with other hardware and software in the physical device.

[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, compared with the existing information retrieval system based on fuzzy query that can only perform simple matching, and the technical solution of the information retrieval system based on discriminant neural network, this embodiment can perform semantic intent analysis on the data to be retrieved based on user needs by combining the knowledge graph with the generative language model, and improve the accuracy of the semantic intent analysis by recalling semantic feature information, thereby improving the efficiency of the semantic intent analysis and the accuracy of data query.

[0090] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0091] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A data retrieval method, characterized in that: include: According to the acquired sentence to be searched, initial semantic feature information of the sentence to be searched is obtained by using a target generative language model; Using the target knowledge graph to perform recall processing on the initial semantic feature information to obtain first semantic feature information; According to the first semantic feature information and the sentence to be retrieved, using the target generative language model to obtain second semantic feature information of the sentence to be retrieved; The target knowledge graph is used to query the second semantic feature information to obtain a retrieval result.

2. The method according to claim 1, characterized in that Before the step of obtaining the initial semantic feature information of the sentence to be searched by using the target generative language model according to the acquired sentence to be searched, the method further includes: Perform structured processing on the acquired power data to obtain triplet information; Based on the triple information, a target knowledge graph of the power data is constructed.

3. The method according to claim 2, characterized in that The step of constructing a target knowledge graph of the power data according to the triple information includes: Constructing a graph ontology according to the triple information; The triple information is stored in a database based on the graph ontology to obtain a target knowledge graph of the power data.

4. The method according to claim 1 or 2, characterized in that: Before the step of obtaining the initial semantic feature information of the sentence to be searched by using the target generative language model according to the acquired sentence to be searched, the method further includes: Obtaining a first generative language model obtained by training the first model; According to the acquired power data and the knowledge graph feature information in the target knowledge graph of the power data, a second model training is performed on the first generative language model to obtain a second generative language model, and the second generative language model is a target generative language model.

5. The method according to claim 1 or 2, characterized in that: The step of obtaining the initial semantic feature information of the sentence to be retrieved by using the target generative language model according to the acquired sentence to be retrieved comprises: According to the feature extraction instruction template, the sentence to be searched is fused to obtain a feature extraction instruction; According to the feature extraction instruction, the initial semantic feature information of the sentence to be retrieved is obtained using a target generative language model.

6. The method according to claim 1 or 2, characterized in that: The step of using the target knowledge graph to recall the initial semantic feature information to obtain the first semantic feature information includes: According to the semantic intent, entity features and keywords in the initial semantic feature information, a recall strategy is used to perform multi-level recall processing on the initial semantic feature information to obtain first semantic feature information; The recall strategy includes a first recall strategy, a second recall strategy, a third recall strategy and a fourth recall strategy.

7. The method according to claim 1 or 2, characterized in that: The step of using the target knowledge graph to query the second semantic feature information to obtain a search result includes: Generate a query instruction using a query instruction template according to the second semantic feature information; The query instruction is used to query and obtain retrieval results from the target knowledge graph, and the retrieval results are generated according to the visualization template corresponding to the second semantic feature information.

8. A data retrieval device, characterized in that: include: A first processing module is used to obtain initial semantic feature information of the sentence to be searched by using a target generative language model according to the sentence to be searched; A recall module, used to recall the initial semantic feature information using a target knowledge graph to obtain first semantic feature information; A second processing module, configured to obtain second semantic feature information of the sentence to be retrieved by using the target generative language model according to the first semantic feature information and the sentence to be retrieved; A query module is used to use the target knowledge graph to query the second semantic feature information to obtain a retrieval result.

9. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data retrieval method according to any one of claims 1 to 7 is implemented.

10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the program, the data retrieval method according to any one of claims 1 to 7 is implemented.