Information query method, device, equipment, medium and product

CN122925418APending Publication Date: 2026-10-16ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611147555.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

现有的转换模型通常只能适配单一语法,一旦底层更换数据库,上层转换逻辑需重写,开发成本高

Benefits of technology

[0010] In this embodiment, intent analysis and entity extraction are performed on the query statement to construct a structured statement. This structured statement is then translated into a query language compatible with the graph database. The query language is then used to search the graph database to obtain the target query result. Without constructing a structured statement, developers would need to write a set of query logic for each graph database. However, by constructing the structured statement in the above manner, only one set of general logic needs to be written to obtain the structured statement, which is then translated into the corresponding query language compatible with the graph database, significantly reducing development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925418A_ABST
    Figure CN122925418A_ABST
Patent Text Reader

Abstract

The application discloses an information query method, device, equipment, medium and product. The method comprises the following steps: acquiring a query statement; if the query statement comprises a query filtering condition, performing intention analysis on the query statement to obtain a target intention; performing entity extraction on the query statement to obtain at least one entity, wherein the entity comprises an entity type, an entity attribute, a target value of the entity attribute and an operator; constructing a structured statement according to the target intention and the at least one entity; translating the structured statement into a query language suitable for a graph database; and searching in the graph database by using the query language to obtain a target query result, thereby reducing the development cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and in particular relates to an information retrieval method, apparatus, device, medium and product. Background Technology

[0002] As enterprise data grows in scale, knowledge graphs have become an important tool for data management because they can intuitively represent complex relationships (node-relationship-attribute) between entities. To lower the barrier to entry for users, Natural Language to Query (NL2Q) technology has emerged, aiming to allow users to directly obtain graph database results using natural language (such as "query models with engine speed greater than 3000").

[0003] Current technologies directly convert natural language into graph database query statements, adapting to graph data with nodes, relationships, and attributes. However, due to significant differences in syntax among different graph databases, existing conversion models typically only adapt to a single syntax. If the underlying database is changed, the upper-level conversion logic needs to be rewritten, resulting in high development costs. Summary of the Invention

[0004] This application provides an information query method, apparatus, device, medium, and product that can reduce development costs.

[0005] In a first aspect, embodiments of this application provide an information query method, the method comprising: Retrieve the query statement; If the query statement includes query filtering conditions, then the query statement is subjected to intent analysis to obtain the target intent; The query statement is subjected to entity extraction to obtain at least one entity, the entity including entity type, entity attribute, target value of the entity attribute and operator; Based on the stated target intent and at least one of the stated entities, construct a structured statement; Translate the structured statements into a query language adapted to graph databases; The target query result is obtained by searching the graph database using the query language described above.

[0006] Secondly, embodiments of this application provide an information query device, the device comprising: The retrieval module is used to retrieve query statements; The intent analysis module is used to perform intent analysis on the query statement if the query statement includes query filtering conditions, in order to obtain the target intent; An extraction module is used to extract entities from the query statement to obtain at least one entity, the entity including entity type, entity attribute, target value of the entity attribute and operator; A construction module is used to construct structured statements based on the target intent and at least one of the entities; A translation module is used to translate the structured statements into a query language adapted to the graph database; The search module is used to perform a search in the graph database using the query language to obtain the target query result.

[0007] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the information query method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the information query method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the information query method as described in the first aspect.

[0010] In this embodiment, intent analysis and entity extraction are performed on the query statement to construct a structured statement. This structured statement is then translated into a query language compatible with the graph database. The query language is then used to search the graph database to obtain the target query result. Without constructing a structured statement, developers would need to write a set of query logic for each graph database. However, by constructing the structured statement in the above manner, only one set of general logic needs to be written to obtain the structured statement, which is then translated into the corresponding query language compatible with the graph database, significantly reducing development costs. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the information query method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the information query device provided in the embodiments of this application; Figure 3This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0013] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0014] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0015] In all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. Additionally, when embodiments of this application require access to sensitive personal information, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments obtained.

[0016] To address the problems of the prior art, embodiments of this application provide an information query method, apparatus, device, medium, and product. The information query method provided in this application embodiment will be described first below.

[0017] Figure 1 A flowchart illustrating an embodiment of the information query method provided in this application is shown. Figure 1As shown, the information query method provided in this application embodiment includes the following steps 101-106, wherein: Step 101: Obtain the query statement.

[0018] The query statement is described using natural language, such as "querying car models with engine speed greater than 3000".

[0019] Step 102: If the query statement includes query filtering conditions, then perform intent analysis on the query statement to obtain the target intent.

[0020] If the query statement includes explicit query filtering conditions, such as "price greater than 200,000" or "type is SUV", then the query statement is considered suitable for querying using the structured statement construction query method provided in the embodiments of this application. The intent of the query statement is analyzed, and then subsequent processing is performed.

[0021] Furthermore, if the query statement does not include explicit query filtering conditions, for example, if the query statement is a vague concept or an open question, such as "What are the design concepts of this car", then the query statement is considered unsuitable for querying using the structured statement query method provided in the embodiments of this application. In this case, graph-enhanced retrieval can be performed on the graph database according to the query statement to obtain the query result, which can be fed back to the user as a fallback query result.

[0022] Step 103: Extract entities from the query statement to obtain at least one entity. The entity includes entity type, entity attributes, target values ​​of the entity attributes, and operators.

[0023] The entity extraction method for query statements employs relevant technologies to parse out entity type (Label), attribute name (Key, i.e. entity attribute), operator (such as ">", "LIKE", "RANGE") and target value (value), which can be represented in JSON, key-value pairs, object tree or equivalent structured form.

[0024] For example, for the query "Query vehicles whose names contain 'XX' and whose RPM is greater than 3000, return price and color", entity extraction can identify an entity type "vehicle" with two attributes: {"key": "Rotation speed", / / Entity attribute} "operator": "GT", / / "GT" corresponds to the mathematical symbol ">". "value": 3000, / / Target value of the entity attribute }; {"key": "name", / / entity attribute} "operator": "LIKE", / / Fuzzy matching "value": "XX"} / / Target value of entity attribute Step 104: Construct a structured statement based on the target intent and at least one of the entities.

[0025] For example, the structured query "Query vehicles whose names contain 'XX' and whose RPM is greater than 3000, return price and color, and include a bar chart" can be represented in JSON format as follows: { Objective: Chart generation; Query target: "vehicle", / / Entity type "filters": [ { "key": "Rotation speed", / / Entity attribute "operator": "GT", / / operator> "value": 3000 / / Target value of entity attribute }, { "key": "name", / / Entity attribute "operator": "LIKE", / / Fuzzy matching value: "XX" } ], "return_fields": ["price", "color"] }

[0026] Step 105: Translate the structured statement into a query language adapted to the graph database.

[0027] Different graph databases use different query languages. In this embodiment, structured statements are used as intermediate processing results, including the information needed for the query. In step 105, the structured statements are translated into a query language adapted to the graph database. For example, when the graph database is Neo4j, the structured statements are translated into Cypher statements; when the graph database is Gremlin, the structured statements are translated into Gremlin Traversal statements; when the graph database is other graph databases, the structured statements can be translated into corresponding query interfaces or API calls. Specific translation methods can be adapted using relevant technologies, which are not described in this embodiment.

[0028] The interpreter translates the structured statements into a query language that the graph database can execute (the query language can be a sentence or a graph traversal instruction), and sends it to the graph database execution engine; after the graph database returns the query results, it performs standardized encapsulation based on the query results.

[0029] Step 106: Use the query language to search in the graph database to obtain the target query result.

[0030] The data is stored in the form of a knowledge graph in a graph database. The method of searching in the graph database using a query language can be found in the relevant technical documentation, and will not be elaborated here.

[0031] In this embodiment, through steps 101-106 above, intent analysis and entity extraction are performed on the query statement to construct a structured statement. This structured statement is then translated into a query language compatible with the graph database. The query language is then used to search within the graph database to obtain the target query result. Without constructing a structured statement, developers would need to write a set of query logic for each graph database. However, by constructing the structured statement in the above manner, only one set of general logic needs to be written to obtain the structured statement, which is then translated into the corresponding query language compatible with the graph database, significantly reducing development costs.

[0032] For example, if a business needs to switch from Neo4j to a Gremlin graph database, it only needs to develop or switch to the corresponding Gremlin interpreter. The upper-level business logic does not need to be changed at all, which greatly reduces the cost of system migration.

[0033] In one embodiment of this application, intent analysis is performed on the query statement to obtain the target intent, including: The query statement is analyzed using a pre-trained intent analysis model to obtain at least one first candidate intent and the confidence level of each first candidate intent. If at least one first candidate intent satisfies a first preset condition, a visual interaction component is triggered to display. The visual interaction component is used to display multiple second candidate intents. The multiple second candidate intents are the top M first candidate intents after the confidence of the first candidate intent is sorted from largest to smallest, where M is an integer greater than or equal to 2. In response to the user's selection of any of the second candidate intents, the target intent is obtained; The first preset condition includes one of the following: The confidence level of each of the first candidate intentions is less than the first threshold; The at least one first candidate intent contains multiple third candidate intents, and the confidence level of each third candidate intent is greater than or equal to the first threshold. The difference in confidence levels between any two third candidate intents is less than a first preset difference. The multiple third candidate intents are the N first candidate intents ranked first after the confidence levels of the first candidate intents are sorted from largest to smallest, where N is an integer greater than or equal to 2.

[0034] Specifically, the query statement is cleaned to remove special characters, word segmentation, and case uniformity. A tokenizer is used to encode the cleaned data, converting it into a vector form that the model can recognize. This encoded vector is then input into a pre-trained intent analysis model (such as Bidirectional Encoder Representations from Transformers (BERT), Enhanced Representation through Knowledge Integration (ERNIE), or the Generative Pre-trained Transformer (GPT) series). The intent analysis model uses the Transformer's attention mechanism to capture semantic features in the statement. The final layer of the intent analysis model connects to a classification head, outputting the probability value (i.e., confidence score) of each first candidate intent.

[0035] When the confidence level of the first candidate intent predicted by the intent analysis model is lower than a first threshold (e.g., 0.75), or when there are multiple first candidate intents with similar confidence levels (i.e., meeting the first preset condition), a visual interactive component is triggered. These components include, but are not limited to: intent recommendation cards (displaying the top-3 possible intents and their explanations), quick option bubbles, or specific parameter completion forms. Users can confirm their intent by clicking or giving a brief reply.

[0036] Furthermore, every choice a user makes is recorded and used as a high-quality weakly supervised signal for subsequent reinforcement learning from human feedback (RLHF) training, enabling the intent analysis model to better understand the user's personalized expression habits.

[0037] In this embodiment, if the at least one first candidate intent meets the first preset condition, a visual interaction component is triggered to display the intent, allowing the user to confirm the intent and improving the accuracy of the target intent.

[0038] In another embodiment of this application, intent analysis is performed on the query statement to obtain the target intent, including: The semantic similarity between the query statement and the standard intents in the predefined standard intent library is calculated to obtain the matching degree between the query statement and each standard intent. If multiple matching degrees meet the second preset condition, then obtain the U standard intents that are sorted first by matching degree from largest to smallest; and determine the target intent based on the U standard intents, the historical context of the query statement and the user profile. If multiple matching degrees do not meet the second preset condition, the standard intent corresponding to the maximum matching degree will be taken as the target intent. The second preset condition includes one of the following: The maximum matching degree is less than the second threshold; There are multiple matching degrees greater than or equal to the second threshold, and the difference between each pair of matching degrees is less than the second preset difference.

[0039] Specifically, the standard intent library contains multiple standard intents. The query statement is semantically similar to each standard intent to obtain multiple matching scores. If multiple matching scores do not meet the second preset condition, for example, if only one standard intent has a matching score greater than or equal to the second threshold (e.g., 0.9), then the standard intent is directly determined as the target intent, without proceeding to the next layer. If multiple matching scores are all less than the second threshold, or if multiple matching scores are greater than or equal to the second threshold and multiple matching scores are similar, then the process proceeds to the second layer: based on the U standard intents, the historical context of the query statement, and the user profile, the target intent is further determined.

[0040] In this embodiment, through the above processing, for simple and easily identifiable intents, the target intent can be quickly filtered out by matching degree without consuming a lot of computing resources; for complex and difficult-to-identify intents, multi-layered progressive judgment can be used to ensure the accuracy of intent recognition.

[0041] In another embodiment of this application, determining the target intent based on the U standard intents, the historical context of the query statement, and the user profile includes: The query statement is associated with the historical context, and information is completed and ambiguity is eliminated to obtain the target statement. For each of the U standard intents, a similarity calculation is performed between the standard intent and the target statement to obtain a first similarity score corresponding to the standard intent; and The similarity between the standard intent and the user profile is calculated to obtain a second similarity corresponding to the standard intent; and The target similarity corresponding to the standard intent is obtained by weighted summing the first similarity and the second similarity corresponding to the standard intent; If the similarity of multiple targets meets the third preset condition, then the target statement is classified and slots are filled to determine the target intent; If multiple target similarities do not meet the third preset condition, then the standard intent corresponding to the maximum target similarity is taken as the target intent; The third preset condition includes one of the following: The maximum target similarity is less than the third threshold; There are multiple targets with similarity greater than or equal to the third threshold, and the difference between each pair of targets with similarity is less than the third preset difference.

[0042] By combining the historical context of the query statement, information completion and elimination of referential ambiguity are performed on the query statement. For example, in the query statement "What was its price last month?", the context determines that "it" refers to "the mobile phone with model Y". After eliminating the referential ambiguity of the query statement, the target statement is "What was the price of the mobile phone with model Y last month?".

[0043] For example, the query "What about Beijing?" can be interpreted in context as a recent query for Shanghai's weather on January 1st. After information completion, the target query becomes "What is the weather in Beijing on January 1st?".

[0044] After obtaining the target statement, calculate the similarity between the target statement and each of the U standard intents to obtain the U first similarity scores.

[0045] User profiles include information such as users' historical behavior, preferences, and identity, and prioritize matching intents related to user needs; For example, if a user frequently queries "sales figures," a query like "Please check my sales figures for the last 5 days" will be prioritized for the intent to "query sales figures." Similarly, if a user is a photography enthusiast who frequently queries camera-related information, a query like "Please recommend a camera priced under 20,000" will be prioritized for the intent to "recommend a camera." Specifically, the similarity between the standard intent and the user profile is calculated to obtain a second similarity score corresponding to the standard intent.

[0046] Configure corresponding weights for historical context and user profile. For example, if the weights of historical context and user profile are 0.8 and 0.2 respectively, then for each standard intent, the first similarity and the second similarity of the standard intent are weighted and summed to obtain the target similarity corresponding to the standard intent.

[0047] If multiple target similarities do not meet the third preset condition, for example, if only one standard intent has a target similarity greater than or equal to the third threshold (e.g., 0.9), then the standard intent is directly determined as the target intent, and there is no need to proceed to the next layer; if multiple target similarities are all less than the third threshold, or if multiple target similarities are greater than or equal to the third threshold and multiple target similarities are similar, then proceed to the third layer: perform intent classification and slot filling on the target statement to further determine the target intent.

[0048] Traditional intent identification and slot filling are processed separately: intent is classified first, and then slot filling is performed based on the classification results. The problem with this approach is that errors in intent classification can lead to errors in slot filling. For example, incorrectly classifying "book a flight" as "book a hotel" will cause subsequent slot filling to extract incorrect information. The results of slot filling cannot be fed back to intent classification, making it impossible to verify the accuracy of the intent using slot information. In this embodiment, a joint modeling method is used to perform intent classification and slot filling simultaneously. The results of intent classification guide slot filling, and the results of slot filling are fed back to intent classification, allowing for mutual verification and correction.

[0049] For example, intent-guided slot filling: During the slot filling process, the results of intent classification are introduced as additional features to help the model extract slot information more accurately; Slot feedback intent classification: In the intent classification process, the slot filling results are introduced as additional features to help the model more accurately determine the user's intent.

[0050] For example, if a user says "Help me book a flight to Shanghai for tomorrow", the intent classification result "book a flight" can guide the slot filling model process to more accurately extract slot information such as "departure time = tomorrow" and "destination = Shanghai". At the same time, the slot filling results "departure time = tomorrow" and "destination = Shanghai" can be fed back to the intent classification model to verify the accuracy of the "book a flight" intent.

[0051] For example, a joint modeling approach can be achieved using a BERT encoder, an intent classification head, and a Conditional Random Field (CRF) slot filling head. The BERT encoder encodes the target statement to generate semantic features; the intent classification head uses the semantic features output by the BERT encoder to classify the intent and determine the user's intent; the slot filling head uses the semantic features output by the BERT encoder and performs sequence labeling to extract slot information. The BERT encoder captures contextual semantic information, the intent classification head classifies the intent based on the semantic features output by the encoder, and the CRF slot filling head captures the dependencies between slots. The combination of these three components enables high-precision intent classification and slot filling.

[0052] In this embodiment, by combining historical context and user profile, the problems of context dependence and personalized needs can be solved, making intent judgment more accurate and better at understanding users. If the target intent still cannot be clearly defined with the assistance of historical context and user profile (i.e., when the similarity of multiple targets meets the third preset condition), the target statement is classified and slot filled to determine the target intent. This enables the determination of complex and difficult-to-identify intents through multi-layered progressive judgment, ensuring the accuracy of intent recognition.

[0053] In another embodiment of this application, the query language is used to search the graph database to obtain the target query result, including: The query language is used to search the graph database to obtain the first query result; A second query result is obtained by performing a graph-enhanced retrieval on the graph database based on the query statement. The first query result and the second query result are merged to obtain the target query result.

[0054] In this embodiment, the target query result is obtained by combining two query methods. The first method is to search the graph database using the query language provided in this application embodiment. Specific details of the search method can be found in the preceding embodiments and will not be repeated here. The second method is to perform graph-enhanced retrieval on the graph database based on the query statement. This method belongs to unstructured retrieval. Graph-enhanced retrieval typically includes vectorizing the query statement, recalling relevant nodes in the vector database, obtaining the neighbor node information of the node in the knowledge graph as context information, and generating a summary answer based on the recalled context information. Specific implementation methods of graph-enhanced retrieval can be found in related technologies and will not be repeated here.

[0055] In this embodiment, the query language is used to search the graph database to ensure accuracy; the query statement is used to perform graph-enhanced retrieval on the graph database, utilizing vector retrieval and graph context to provide the answer. This method ensures that a query result is always found, avoiding the situation where no information is returned to the user when no query result is found in the graph database based on the query language, thus ensuring recall. This approach, which integrates the query results from both paths as the target query result, resolves the contradiction between accuracy and recall that cannot be achieved by traditional single-technology approaches (relying solely on Natural Language to Structured Query Language (NL2SQL) or solely on graph-enhanced retrieval).

[0056] In another embodiment of this application, translating the structured statement into a query language adapted to the graph database includes: For each entity in the structured statement, the entity is matched with the ontology defined in the knowledge graph according to the matching strategy to obtain the matching result; If the matching result indicates a successful match, the structured statement is translated into a query language adapted to the graph database. The matching strategy includes: Match the entity type of the entity with the entity type described in the ontology; Match the entity attributes of the entity with the attribute fields of the ontology description; Match the target values ​​of the entity's entity attributes with the constraint information of the attribute fields described in the ontology; The entity's entity attribute operators are matched with the constraint information of the attribute fields in the ontology description.

[0057] Specifically, an ontology is a standardized and structured definition of domain knowledge, essentially the "skeleton" of a knowledge graph. It is not the specific knowledge content itself, but rather defines the organizational structure and rules of knowledge. An ontology typically includes the following: Entity types: for example, "product", "customer", "order", "employee"; Attribute fields: For example, the attributes of "product" can include "brand", "model", "color", "weight", etc.; Relationships: For example, the relationship between the "Customer" class and the "Order" class could be "Place Order," and the relationship between the "Product" class and the "Category" class could be "Belongs to." Constraints: Restrictions can be imposed on attribute fields and / or relationships. For example, the "Price" attribute of the "Product" class can be constrained to have a minimum value of 0, and the "Age" attribute of the "Customer" class can be constrained to have a value range of 18 to 100, ensuring the validity and consistency of knowledge. Another example is that the price is a numeric type, and the name is a string type. Numeric fields support operators such as GT, LT, and EQ; string fields support operators such as EQ and LIKE.

[0058] The entity is matched against the ontology defined in the knowledge graph according to a matching strategy to obtain the matching results. If every item in the matching strategy matches successfully, the matching result indicates a successful match. In this case, the structured statement is translated into a query language adapted to the graph database. This method of forcibly checking whether the generated structured statement exists in the ontology definition of the knowledge graph can prevent illegal field injection.

[0059] Figure 2 A structural diagram of the information query device provided in an embodiment of this application is shown. Figure 2 As shown, the information query device 200 includes: Module 201 is used to retrieve query statements; The intent analysis module 202 is used to perform intent analysis on the query statement if the query statement includes query filtering conditions, so as to obtain the target intent; Extraction module 203 is used to extract entities from the query statement to obtain at least one entity, the entity including entity type, entity attribute, target value of the entity attribute and operator; Module 204 is configured to construct a structured statement based on the target intent and at least one of the entities; Translation module 205 is used to translate the structured statement into a query language adapted to the graph database; The search module 206 is used to perform a search in the graph database using the query language to obtain the target query result.

[0060] The information query device 200 provided in this application embodiment can implement the various processes implemented in the aforementioned information query method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0061] Figure 3 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0062] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.

[0063] Specifically, the processor 601 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0064] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.

[0065] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to the first or second aspect of this disclosure.

[0066] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement any of the information query methods in the above embodiments.

[0067] In one example, the electronic device may also include a communication interface 603 and a bus 610. For example, Figure 3 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 610 and complete communication with each other.

[0068] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0069] Bus 610 includes hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0070] Furthermore, in conjunction with the information query methods described in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the information query methods described in the above embodiments.

[0071] This application provides a computer program product in which the instructions are executed by the processor of an electronic device, causing the electronic device to perform any of the information query methods described in the above embodiments.

[0072] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described as examples. However, the method process of this application is not limited to the specific steps described. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0073] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0074] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0075] The foregoing flowcharts and / or block diagrams of methods, apparatus (systems) according to embodiments of the present disclosure have described various aspects of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0076] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. An information retrieval method, characterized in that, The method includes: Retrieve the query statement; If the query statement includes query filtering conditions, then the query statement is subjected to intent analysis to obtain the target intent; The query statement is subjected to entity extraction to obtain at least one entity, the entity including entity type, entity attribute, target value of the entity attribute and operator; Based on the stated target intent and at least one of the stated entities, construct a structured statement; Translate the structured statements into a query language adapted to graph databases; The target query result is obtained by searching the graph database using the query language described above.

2. The information query method according to claim 1, characterized in that, The query statement is subjected to intent analysis to obtain the target intent, including: The query statement is analyzed using a pre-trained intent analysis model to obtain at least one first candidate intent and the confidence level of each first candidate intent. If at least one first candidate intent satisfies a first preset condition, a visual interaction component is triggered to display. The visual interaction component is used to display multiple second candidate intents. The multiple second candidate intents are the top M first candidate intents after the confidence of the first candidate intent is sorted from largest to smallest, where M is an integer greater than or equal to 2. In response to the user's selection of any of the second candidate intents, the target intent is obtained; The first preset condition includes one of the following: The confidence level of each of the first candidate intentions is less than the first threshold; The at least one first candidate intent contains multiple third candidate intents, and the confidence level of each third candidate intent is greater than or equal to the first threshold. The difference in confidence levels between any two third candidate intents is less than a first preset difference. The multiple third candidate intents are the N first candidate intents ranked first after the confidence levels of the first candidate intents are sorted from largest to smallest, where N is an integer greater than or equal to 2.

3. The information query method according to claim 1, characterized in that, The query statement is subjected to intent analysis to obtain the target intent, including: The semantic similarity between the query statement and the standard intents in the predefined standard intent library is calculated to obtain the matching degree between the query statement and each standard intent. If multiple matching degrees meet the second preset condition, then obtain the U standard intents that are sorted first by matching degree from largest to smallest; and determine the target intent based on the U standard intents, the historical context of the query statement and the user profile. If multiple matching degrees do not meet the second preset condition, the standard intent corresponding to the maximum matching degree will be taken as the target intent. The second preset condition includes one of the following: The maximum matching degree is less than the second threshold; There are multiple matching degrees greater than or equal to the second threshold, and the difference between each pair of matching degrees is less than the second preset difference.

4. The information query method according to claim 3, characterized in that, Based on the U standard intents, the historical context of the query statement, and the user profile, the target intent is determined, including: The query statement is associated with the historical context, and information is completed and ambiguity is eliminated to obtain the target statement. For each of the U standard intents, a similarity calculation is performed between the standard intent and the target statement to obtain a first similarity score corresponding to the standard intent; and The similarity between the standard intent and the user profile is calculated to obtain a second similarity corresponding to the standard intent; and The target similarity corresponding to the standard intent is obtained by weighted summing the first similarity and the second similarity corresponding to the standard intent; If the similarity of multiple targets meets the third preset condition, then the target statement is classified and slots are filled to determine the target intent; If multiple target similarities do not meet the third preset condition, then the standard intent corresponding to the maximum target similarity is taken as the target intent; The third preset condition includes one of the following: The maximum target similarity is less than the third threshold; There are multiple targets with similarity greater than or equal to the third threshold, and the difference between each pair of targets with similarity is less than the third preset difference.

5. The information query method according to claim 1, characterized in that, The query language is used to search the graph database to obtain the target query results, including: The query language is used to search the graph database to obtain the first query result; A second query result is obtained by performing a graph-enhanced retrieval on the graph database based on the query statement. The first query result and the second query result are merged to obtain the target query result.

6. The information query method according to claim 1, characterized in that, Translating the structured statements into a query language adapted to graph databases includes: For each entity in the structured statement, the entity is matched with the ontology defined in the knowledge graph according to the matching strategy to obtain the matching result; If the matching result indicates a successful match, the structured statement is translated into a query language adapted to the graph database. The matching strategy includes: Match the entity type of the entity with the entity type described in the ontology; Match the entity attributes of the entity with the attribute fields of the ontology description; Match the target values ​​of the entity's entity attributes with the constraint information of the attribute fields described in the ontology; The entity's entity attribute operators are matched with the constraint information of the attribute fields in the ontology description.

7. An information query device, characterized in that, The device includes: The retrieval module is used to retrieve query statements; The intent analysis module is used to perform intent analysis on the query statement if the query statement includes query filtering conditions, in order to obtain the target intent; An extraction module is used to extract entities from the query statement to obtain at least one entity, the entity including entity type, entity attribute, target value of the entity attribute and operator; A construction module is used to construct structured statements based on the target intent and at least one of the entities; A translation module is used to translate the structured statements into a query language adapted to the graph database; The search module is used to perform a search in the graph database using the query language to obtain the target query result.

8. An electronic device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the information query method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the information query method as described in any one of claims 1-6.

10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the information query method as described in any one of claims 1-6.