Intelligent question answering method and device based on knowledge graph, equipment, storage medium and program product

By acquiring energy knowledge data, designing text semantics, and constructing an energy data knowledge graph, the problem of low retrieval accuracy in traditional intelligent question-answering systems has been solved, achieving more accurate and interactive intelligent question-answering.

CN119692446BActive Publication Date: 2025-12-05HUADIAN SHAANXI ENERGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411699665.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-12-05
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Traditional knowledge graph-based intelligent question-answering systems rely too heavily on templates, resulting in low retrieval accuracy.

Method used

By acquiring energy knowledge data, text semantic design is performed to obtain data entities and relationships, an energy data knowledge graph is constructed, and the energy query entities input by users and the intelligent devices that perform word segmentation are processed. Through word segmentation, query entities and user intent are obtained, and the energy data knowledge graph is used to perform queries and generate target intelligent question-and-answer results.

Benefits of technology

It improves the accuracy and interactivity of queries, and enhances the comprehensiveness of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692446B_ABST
    Figure CN119692446B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent question-answering method and device based on a knowledge graph, equipment, a storage medium and a program product, relates to the technical field of data processing, and the intelligent question-answering method based on the knowledge graph comprises the following steps: acquiring energy knowledge data used for constructing a knowledge graph; performing text semantic design based on the energy knowledge data to obtain data entities and data relationships between the data entities; constructing an energy data knowledge graph based on the data entities and the data relationships; performing word segmentation processing on a user-input energy query sentence to obtain query entities and user intentions; and querying the query entities and the user intentions based on the energy data knowledge graph to obtain a target intelligent question-answering result. Since the text semantic design is performed on the energy knowledge data, the accuracy of the query is improved, and the energy data knowledge graph is constructed, so that the interactivity of the query and the comprehensiveness of the query result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to intelligent question answering methods, devices, equipment, storage media, and program products based on knowledge graphs. Background Technology

[0002] As a fundamental industry, the energy sector is experiencing a growing demand for intelligent question-answering systems amidst the rapid development of information technology. The introduction of knowledge graphs can effectively integrate large-scale data, enabling more systematic utilization of these information resources. Knowledge graph-based intelligent question-answering systems for energy knowledge can provide users with convenient energy knowledge query and usage services.

[0003] Traditional knowledge graph-based intelligent question-answering systems rely too heavily on templates and have large errors in matching, resulting in low retrieval accuracy. Summary of the Invention

[0004] The main purpose of this application is to provide a knowledge graph-based intelligent question answering method, device, equipment, storage medium, and program product, aiming to solve the technical problem of low retrieval accuracy in knowledge graph-based intelligent question answering systems.

[0005] To achieve the above objectives, this application proposes a knowledge graph-based intelligent question answering method, which includes:

[0006] Acquire energy knowledge data for constructing a knowledge graph;

[0007] Based on the energy knowledge data, text semantic design is performed to obtain data entities and the data relationships between them.

[0008] Construct an energy data knowledge graph based on the data entities and the data relationships;

[0009] The energy query statement entered by the user is segmented into words to obtain the query entity and the user intent;

[0010] Based on the energy data knowledge graph, the query entity and user intent are queried to obtain the target intelligent question answering result.

[0011] In one embodiment, the step of querying the query entity and user intent based on the energy data knowledge graph to obtain the target intelligent question-answering result includes:

[0012] Based on the query entity, the target entity is obtained by searching in the energy data knowledge graph;

[0013] Based on the user's intent, a matching template is searched within a preset template;

[0014] The target entity relationship is obtained based on the matching template;

[0015] Based on the target entity and entity relationships, generate target intelligent question-answering results.

[0016] In one embodiment, the method further includes:

[0017] If the matching template cannot be found, the energy query statement is detected based on the entity detection model to obtain an energy knowledge subgraph;

[0018] Based on the energy knowledge subgraph, knowledge graph embedding is performed to obtain entity relationships.

[0019] In one embodiment, the step of finding the target entity in the energy data knowledge graph based on the query entity includes:

[0020] In the energy data knowledge graph, the query entity is matched to obtain the target entity that is successfully matched. The basis for the successful match is that the name of the query entity and the target entity are the same.

[0021] Extract partial names from query entities that fail to match, and obtain sub-entity pairs;

[0022] In the energy data knowledge graph, the sub-entity pairs are matched for entity similarity to obtain target entities with similarity greater than a preset threshold.

[0023] In one embodiment, the step of performing text semantic design based on the energy knowledge data to obtain data entities and the data relationships between the data entities includes:

[0024] Semantic analysis is performed on the energy knowledge data to obtain the data text features of the energy knowledge data;

[0025] Entity relationships are extracted from the data text features to obtain the data entities and the data relationships between them.

[0026] In one embodiment, the step of constructing an energy data knowledge graph based on the data entities and the data relationships includes:

[0027] Construct energy data triples based on the data entities and the data relationships;

[0028] The energy data triples are stored in a preset graph database to obtain an energy knowledge graph.

[0029] Furthermore, to achieve the above objectives, this application also proposes a knowledge graph-based intelligent question-answering device, which includes:

[0030] Furthermore, to achieve the above objectives, this application also proposes a knowledge graph-based intelligent question-answering device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the knowledge graph-based intelligent question-answering method described above.

[0031] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the knowledge graph-based intelligent question answering method described above.

[0032] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the knowledge graph-based intelligent question answering method described above.

[0033] One or more technical solutions proposed in this application have at least the following technical effects:

[0034] This application acquires energy knowledge data for constructing a knowledge graph; performs text semantic design based on the energy knowledge data to obtain data entities and the data relationships between them; constructs an energy data knowledge graph based on the data entities and data relationships; segments user-input energy queries to obtain query entities and user intent; and performs queries based on the energy data knowledge graph to obtain target intelligent question-answering results. Because text semantic design is performed on energy knowledge data, the accuracy of the query is improved; and by constructing the energy data knowledge graph, the interactivity and comprehensiveness of the query results are enhanced. Attached Figure Description

[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating an embodiment of the knowledge graph-based intelligent question answering method of this application.

[0038] Figure 2This is a schematic diagram of the temporal extraction module structure in one implementation of the knowledge graph-based intelligent question answering method of this application;

[0039] Figure 3 This is a schematic diagram of a bidirectional long short-term memory network structure in one implementation of the knowledge graph-based intelligent question answering method of this application;

[0040] Figure 4 This is a flowchart illustrating Embodiment 2 of the knowledge graph-based intelligent question answering method of this application;

[0041] Figure 5 This is a schematic diagram of the module structure of the knowledge graph-based intelligent question-answering device according to an embodiment of this application;

[0042] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the knowledge graph-based intelligent question answering method in the embodiments of this application.

[0043] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0044] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0045] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The main solution of this application embodiment is: to acquire energy knowledge data for constructing a knowledge graph; to perform text semantic design based on the energy knowledge data to obtain data entities and data relationships between data entities; to construct an energy data knowledge graph based on the data entities and data relationships; to perform word segmentation on the energy query statement input by the user to obtain the query entity and the user intent; and to query the query entity and the user intent based on the energy data knowledge graph to obtain the target intelligent question answering result.

[0047] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a computer or server, or an electronic device or virtual device capable of performing the above functions. The following description uses a knowledge graph-based intelligent question-answering device (hereinafter referred to as a question-answering device) as an example to illustrate this embodiment and the subsequent embodiments.

[0048] Based on this, embodiments of this application provide an intelligent question-answering method based on knowledge graphs, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the knowledge graph-based intelligent question answering method of this application.

[0049] In this embodiment, the knowledge graph-based intelligent question answering method includes steps S10 to S50:

[0050] Step S10: Obtain energy knowledge data for constructing the knowledge graph.

[0051] Understandably, a knowledge graph is a semantic network used to describe relationships between entities. It can be a semi-structured data representation method used to describe entities, attributes, and the relationships between entities. Energy knowledge data can be information that records and describes various aspects of the energy industry, such as data on energy production, supply, consumption, reserves, prices, emissions, and related policies and technologies. This data can be collected and organized through various channels, such as statistical reports from energy companies, surveys and monitoring by government departments, and data released by international organizations.

[0052] It should be understood that constructing knowledge graphs based on energy knowledge data can help improve energy resource utilization efficiency and optimize energy structure. By identifying entities in energy knowledge data and extracting the relationships between them, using entities as nodes and relationships as edges between nodes, a knowledge graph can be constructed, providing strong support for decision-making, research, and practice in the energy field.

[0053] In practice, question-answering devices can acquire energy knowledge data for building knowledge graphs.

[0054] Step S20: Based on the energy knowledge data, perform text semantic design to obtain data entities and the data relationships between them.

[0055] It should be noted that text semantic design is a series of designs and methods for semantic analysis and processing of energy knowledge data text during the construction of knowledge graphs. Through text semantic design, the accuracy and completeness of knowledge graph construction can be improved, thereby enabling it to better support various intelligent applications, such as semantic search, intelligent recommendation, and natural language processing.

[0056] In some embodiments of this application, the step of performing text semantic design based on the energy knowledge data to obtain data entities and the data relationships between the data entities includes:

[0057] Semantic analysis is performed on the energy knowledge data to obtain the data text features of the energy knowledge data; entity relationship extraction is performed on the data text features to obtain the data entities and the data relationships between the data entities.

[0058] In this embodiment, the energy knowledge data text can first undergo feature analysis to select the range of the dataset. Then, the collected energy knowledge data text can be preprocessed to obtain an unlabeled energy knowledge dataset. Afterward, entity relationship design and training data labeling of the knowledge graph are performed. Simultaneously, a joint entity relationship model of the energy knowledge data text is selected to extract relevant entities and relationships. Finally, the extracted entities and relationships are imported into a preset graph database (such as the Neo4j graph database).

[0059] Specifically, energy knowledge data text can be collected from energy companies, documents, networks, etc., and may include a large number of energy-related terms and vocabulary. Currently, common entity recognition methods typically use proper nouns such as personal names, place names, and regional names, which can achieve good results using traditional machine learning algorithms. However, the energy field has a large number of entities with diverse expressions, such as equipment names, equipment parts, equipment faults, and rectification measures, making it difficult to include them all in a dictionary. Furthermore, written records are often colloquial and do not fully adhere to grammatical structures, making it difficult to find the core words and perform structural segmentation through syntactic analysis. This application trains a model for knowledge extraction from energy knowledge data entity relationships, namely, an entity relationship joint extraction model.

[0060] It should be noted that since the knowledge graph of energy data belongs to a specific domain, there may not be publicly available labeled data at present. Therefore, before training the entity relationship joint extraction model, data labeling can be carried out first. The labeling can be based on task requirements and data characteristics, and can be determined based on the actual application. This application embodiment does not impose any restrictions on this.

[0061] It is understood that entity relation extraction refers to extracting relations and their corresponding entities from text that has not undergone specific formatting, thereby forming a complete triple (Subject-Predicate-Object, SPO). Here, S represents the head entity, P represents the relation, and P represents the tail entity. The entity relation joint extraction model in this application embodiment may include three modules, specifically an encoder module, a temporal extraction module, and an entity relation extraction module.

[0062] Understandably, the encoder module can encode the input energy knowledge data to obtain input features for input to the timing extraction module.

[0063] In this embodiment, the temporal extraction module may include a bidirectional long short-term memory network and an attention network. The specific module composition can be found in [reference needed]. Figure 2As shown. The bidirectional long short-term memory network (BSSM) integrates the functions of two LSTM layers, forward and backward. It utilizes a known time series and a reversed position sequence, performing bidirectional operations through forward and backward propagation to deepen the extraction of temporal features from the original sequence, thereby improving the accuracy of the model's output. In this embodiment, the network structure of the bidirectional BSSM can be referred to... Figure 3 As shown. Where X1-X N Used to represent input features, O1-O N This indicates the output features.

[0064] It should be noted that the attention network in this application embodiment can adopt a self-attention mechanism. The self-attention mechanism can get rid of the distance limitation of words and realize the weight allocation of each word. By fusing the input features and the results processed by the attention network into a second bidirectional long short-term memory network, it can be used to extract local information.

[0065] In this embodiment, the entity relationship extraction module may include an encoding layer, a head entity recognition layer, and a relationship and tail entity recognition layer. The encoding layer can be used to obtain the encoded sequence of the input text; the head entity recognition layer can directly decode the structure obtained from the encoding layer to identify potential "corpse stealing" entities; the relationship and tail entity recognition layer can be used to identify the head entity and related tail entities under each relationship category. The specific recognition process can be modeled based on machine learning or other methods, and this embodiment does not limit this approach.

[0066] In practical implementation, the question-answering device can extract entities and relationships based on energy knowledge data to obtain energy data triples, and at the same time determine the data entities and the data relationships between them.

[0067] Step S30: Construct an energy data knowledge graph based on the data entities and the data relationships.

[0068] It is understandable that, upon obtaining data entities and data relationships, an energy data knowledge graph can be constructed by using the data entities as nodes in a knowledge graph and the data relationships as edges between nodes. Specifically, the step of constructing an energy data knowledge graph based on the data entities and data relationships includes: constructing energy data triples based on the data entities and data relationships; and storing the energy data triples in a preset graph database to obtain the energy knowledge graph.

[0069] Step S40: Perform word segmentation on the energy query statement entered by the user to obtain the query entity and the user intent;

[0070] Step S50: Based on the energy data knowledge graph, query the query entity and user intent to obtain the target intelligent question answering result.

[0071] It should be noted that when a user needs to make a query, they can input an energy query statement into the question-answering device. The question-answering device can perform word segmentation on the input energy query statement to obtain the query entity and user intent; then, based on the established energy data knowledge graph, it can perform a query on the query entity and user intent to obtain the target intelligent question-answering result.

[0072] Understandably, word segmentation is a fundamental task in natural language processing, referring to the process of dividing a continuous text string into individual words or phrases. Through word segmentation, complex energy queries can be simplified into a series of independent lexical units, facilitating subsequent semantic analysis and processing. Query entities are the specific objects or concepts mentioned in the energy query. Based on query entities, searches can be performed within an energy knowledge graph, enabling question-and-answer sessions for energy queries. User intent refers to the purpose or need of the user's query; user intent can guide the query and optimize answer recommendations.

[0073] For example, if the user enters the energy query "What is solar energy?", the corresponding query entity will be "solar energy". If the user's intent is "what", the concept of solar energy will be returned as the target intelligent question answer result.

[0074] This application's embodiments involve: acquiring energy knowledge data for constructing a knowledge graph; performing textual semantic design based on the energy knowledge data to obtain data entities and data relationships between them; constructing an energy data knowledge graph based on the data entities and data relationships; performing word segmentation on the user-inputted energy query to obtain the query entity and user intent; and performing a query based on the energy data knowledge graph to obtain the target intelligent question-answering result. Because textual semantic design is performed on the energy knowledge data, the accuracy of the query is improved; and by constructing the energy data knowledge graph, the interactivity and comprehensiveness of the query results are enhanced.

[0075] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 In this application, the step of querying the query entity and user intent based on the energy data knowledge graph to obtain the target intelligent question-answering result includes:

[0076] Step S51: Based on the query entity, search in the energy data knowledge graph to obtain the target entity;

[0077] Step S52: Based on the user's intent, search for a matching template in the preset template;

[0078] Step S53: Obtain entity relationships based on the matching template;

[0079] Step S54: Generate target intelligent question-and-answer results based on the target entity and entity relationships.

[0080] It should be noted that the target entity mentioned above, that is, the entity in the knowledge graph, can be an entity with the same name as the query entity, or an entity with a similarity to the query entity name greater than a certain value. This application embodiment does not impose any restrictions on this.

[0081] In one implementation of this application, the step of finding the target entity based on the query entity in the energy data knowledge graph includes: performing entity matching on the query entity in the energy data knowledge graph to obtain a successfully matched target entity, wherein the basis for successful matching is that the names of the query entity and the target entity are consistent; extracting partial names from the unmatched query entities to obtain sub-entity pairs; and performing entity similarity matching on the sub-entity pairs in the energy data knowledge graph to obtain target entities with a similarity greater than a preset threshold.

[0082] It should be noted that if an entity with the same name as the query entity exists in the knowledge graph, then that entity can be used as the target entity; if no entity with the same name as the query entity exists in the knowledge graph, then partial name extraction can be performed on the query entity to obtain sub-entity pairs, and further entity similarity matching can be performed based on the sub-entity pairs.

[0083] It should be explained that the aforementioned sub-entities can be obtained by segmenting the query entity. For example, the query entity obtained after word segmentation is "nuclear kinetic energy". After extracting partial names from it, the sub-entity pairs "nuclear", "kinetic", and "energy" are obtained. By performing similarity matching on the sub-entity pairs, the similarity between them and other entities in the energy data knowledge graph can be determined, and entities with similarity values ​​greater than a similarity threshold are selected as target entities.

[0084] It should be noted that the preset threshold can be different for different query entities. Specifically, the preset threshold is related to the number of characters corresponding to the query entity.

[0085] In some embodiments of this application, when the number of characters in the query entity is two or less, the corresponding preset threshold is 1; when the number of characters in the query entity is three, the corresponding preset threshold is 0.65; and when the number of characters in the query entity is four, the corresponding preset threshold is 0.5.

[0086] It's important to note that query structures or frameworks can be predefined within question-answering devices; these are essentially templates. For example, if the template content is "What is solar energy?" and the user's question is "What is solar energy?", a relationship extraction model can match the user's intent mentioned in the query to the corresponding matching template. Then, based on the matching template and the entity relationships corresponding to the target entity, the target entity relationship is determined. By filling the target entity and entity relationships into the matching template, the target intelligent question-answering result can be generated.

[0087] It should be explained that, based on the content designed in the matching template, the target entity relationships can be determined from the entity relationships of the target entity. For example, a question-and-answer template related to power generation can identify other entities that can generate electricity to obtain the target entity. This application embodiment does not impose any limitations on this.

[0088] In some embodiments of this application, the method further includes:

[0089] If the matching template cannot be found, the energy query statement is detected based on the entity detection model to obtain an energy knowledge subgraph;

[0090] Based on the energy knowledge subgraph, knowledge graph embedding is performed to obtain entity relationships.

[0091] It should be noted that when a matching template cannot be found, the question-answering device can perform entity detection based on the energy query statement entered by the user. The entity detection method can be based on an entity detection model or other methods, and this application embodiment does not limit this.

[0092] Understandably, an entity detection model is used to detect all entities in an energy query statement, assisting in the generation of an energy knowledge subgraph. By embedding the generated energy knowledge subgraph into a knowledge graph, vector representations of entities and relationships can be obtained. By classifying these vector representations into templates, it can be determined which template they belong to, and thus the corresponding matching template and entity relationship can be determined.

[0093] It should be noted that the above entity detection model can be a model based on a neural network. This application does not impose specific restrictions on its construction method, and it can be selected according to the needs of actual application.

[0094] This application's embodiments obtain target entities by searching within an energy data knowledge graph based on the query entity; searching for matching templates within a preset template based on user intent; obtaining target entity relationships based on the matching templates; and generating target intelligent question-and-answer results based on the target entities and entity relationships. If no matching template can be found, the energy query statement is detected using an entity detection model to obtain an energy knowledge subgraph; knowledge graph embedding is then performed based on the energy knowledge subgraph to obtain entity relationships. Because the process involves searching for matching templates within a preset template based on user intent, and then detecting them using an entity detection model to obtain the energy knowledge subgraph when no matching template is found, the accuracy of the question-and-answer results is improved.

[0095] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the knowledge graph-based intelligent question answering method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0096] This application also provides an intelligent question-answering device based on a knowledge graph, please refer to... Figure 5 The knowledge graph-based intelligent question-answering device includes:

[0097] Data acquisition module 10 is used to acquire energy knowledge data for constructing a knowledge graph;

[0098] Relationship design module 20 is used to perform text semantic design based on the energy knowledge data to obtain data entities and data relationships between them;

[0099] Knowledge graph construction module 30 is used to construct an energy data knowledge graph based on the data entities and the data relationships;

[0100] The statement processing module 40 is used to perform word segmentation on the energy query statement input by the user to obtain the query entity and the user intent;

[0101] The intelligent question answering module 50 is used to query the query entity and user intent based on the energy data knowledge graph to obtain the target intelligent question answering result.

[0102] The knowledge graph-based intelligent question-answering device provided in this application employs the knowledge graph-based intelligent question-answering method described in the above embodiments, which can solve the technical problem of low retrieval accuracy in knowledge graph-based intelligent question-answering systems. Compared with the prior art, the beneficial effects of the knowledge graph-based intelligent question-answering device provided in this application are the same as those of the knowledge graph-based intelligent question-answering method provided in the above embodiments, and other technical features in the knowledge graph-based intelligent question-answering device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0103] This application provides a knowledge graph-based intelligent question answering device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the knowledge graph-based intelligent question answering method in Embodiment 1 above.

[0104] The following is for reference. Figure 6 This document illustrates a structural diagram of a knowledge graph-based intelligent question-answering device suitable for implementing embodiments of this application. The knowledge graph-based intelligent question-answering device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The knowledge graph-based intelligent question-answering device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0105] like Figure 6As shown, a knowledge graph-based intelligent question-answering device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the knowledge graph-based intelligent question-answering device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the knowledge graph-based intelligent question-answering device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a knowledge graph-based intelligent question-answering device with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0106] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0107] The knowledge graph-based intelligent question-answering device provided in this application, employing the knowledge graph-based intelligent question-answering method described in the above embodiments, can solve the technical problem of low retrieval accuracy in knowledge graph-based intelligent question-answering systems. Compared with the prior art, the beneficial effects of the knowledge graph-based intelligent question-answering device provided in this application are the same as those of the knowledge graph-based intelligent question-answering method provided in the above embodiments, and other technical features in this knowledge graph-based intelligent question-answering device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0108] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0109] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0110] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the knowledge graph-based intelligent question-answering method in the above embodiments.

[0111] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0112] The aforementioned computer-readable storage medium may be included in a knowledge graph-based intelligent question-answering device; or it may exist independently and not be assembled into a knowledge graph-based intelligent question-answering device.

[0113] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a knowledge graph-based intelligent question-answering device, cause the knowledge graph-based intelligent question-answering device to:

[0114] Acquire energy knowledge data for constructing a knowledge graph;

[0115] Based on the energy knowledge data, text semantic design is performed to obtain data entities and the data relationships between them.

[0116] Construct an energy data knowledge graph based on the data entities and the data relationships;

[0117] The energy query statement entered by the user is segmented into words to obtain the query entity and the user intent;

[0118] Based on the energy data knowledge graph, the query entity and user intent are queried to obtain the target intelligent question answering result.

[0119] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0121] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0122] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described knowledge graph-based intelligent question-answering method, thereby solving the technical problem of low retrieval accuracy in knowledge graph-based intelligent question-answering systems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the knowledge graph-based intelligent question-answering method provided in the above embodiments, and will not be repeated here.

[0123] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the knowledge graph-based intelligent question answering method described above.

[0124] The computer program product provided in this application can solve the technical problem of low retrieval accuracy in knowledge graph-based intelligent question answering systems. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the knowledge graph-based intelligent question answering method provided in the above embodiments, and will not be repeated here.

[0125] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A knowledge graph-based intelligent question answering method, characterized in that, The method comprises: acquiring energy knowledge data for constructing a knowledge graph; performing text semantic design based on the energy knowledge data to obtain data entities and data relationships between the data entities; constructing an energy data knowledge graph based on the data entities and the data relationships; performing word segmentation processing on a user-input energy query statement to obtain query entities and user intentions; querying the query entities and the user intentions based on the energy data knowledge graph to obtain a target intelligent question and answer result; the step of performing text semantic design based on the energy knowledge data to obtain data entities and data relationships between the data entities comprises: performing semantic analysis on the energy knowledge data based on an entity relationship joint extraction model to obtain data text features of the energy knowledge data; performing entity relationship extraction on the data text features to obtain data entities and data relationships between the data entities; the entity relationship joint extraction model comprises an encoder module, a time sequence extraction module, and an entity relationship extraction module; the time sequence extraction module comprises two bidirectional long short-term memory networks and an attention network, a result processed by a first bidirectional long short-term memory network is input to the attention network, input features and a result processed by the attention network are fused and input to a second bidirectional long short-term memory network, the bidirectional long short-term memory network is a network that fuses the functions of forward and backward LSTM layers, uses known time sequences and reverse position sequences, and deepens the extraction of original sequence time sequence features through forward and backward propagation bidirectional operations; the step of querying the query entities and the user intentions based on the energy data knowledge graph to obtain a target intelligent question and answer result comprises: finding target entities in the energy data knowledge graph based on the query entities; finding a matching template in a preset template based on the user intentions; obtaining target entity relationships based on the matching template; generating a target intelligent question and answer result based on the target entities and the entity relationships; the method further comprises: if the matching template cannot be found, detecting the energy query statement based on an entity detection model to obtain an energy knowledge subgraph; performing knowledge graph embedding based on the energy knowledge subgraph to obtain entity relationships; the step of constructing an energy data knowledge graph based on the data entities and the data relationships comprises: constructing energy data triples based on the data entities and the data relationships; storing the energy data triples in a preset graph database to obtain an energy knowledge graph. 2.The knowledge graph-based intelligent question answering method of claim 1, wherein, the step of finding target entities in the energy data knowledge graph based on the query entities comprises: performing entity matching on the query entities in the energy data knowledge graph to obtain target entities that are successfully matched, the matching success being based on the names of the query entities and the target entities being consistent; performing partial name extraction on query entities that are not successfully matched to obtain a pair of sub-entities; performing entity similarity matching on the pair of sub-entities in the energy data knowledge graph to obtain target entities with a similarity greater than a preset threshold.

3. An intelligent question answering device based on a knowledge graph, characterized in that, The knowledge graph-based intelligent question answering device comprises: a data acquisition module configured to acquire energy knowledge data for constructing a knowledge graph; a relationship design module configured to perform text semantic design based on the energy knowledge data to obtain data entities and data relationships between the data entities; a knowledge graph construction module configured to construct an energy data knowledge graph based on the data entities and the data relationships; a sentence processing module configured to perform word segmentation processing on an energy query sentence input by a user to obtain query entities and user intentions; an intelligent question answering module configured to query the query entities and the user intentions based on the energy data knowledge graph to obtain a target intelligent question answering result; The relationship design module is further configured to: perform semantic analysis on the energy knowledge data based on an entity relationship joint extraction model to obtain data text features of the energy knowledge data; extract data entities and data relationships between the data entities from the data text features; The entity relationship joint extraction model comprises an encoder module, a time sequence extraction module, and an entity relationship extraction module; The time sequence extraction module comprises two bidirectional long short-term memory networks and an attention network, a result processed by a first bidirectional long short-term memory network is input to the attention network, input features and a result processed by the attention network are fused and input to a second bidirectional long short-term memory network, the bidirectional long short-term memory network is a network that fuses the functions of forward and backward LSTM layers, uses known time sequences and reverse position sequences, and deepens the extraction of original sequence time sequence features through bidirectional operation of forward and backward propagation; The intelligent question answering module is further configured to: find a target entity based on the query entities in the energy data knowledge graph; find a matching template based on the user intentions in a preset template; obtain a target entity relationship based on the matching template; generate a target intelligent question answering result based on the target entity and the entity relationship; The intelligent question answering module is further configured to: if the matching template cannot be found, detect the energy query sentence based on an entity detection model to obtain an energy knowledge subgraph; perform knowledge graph embedding based on the energy knowledge subgraph to obtain an entity relationship; The knowledge graph construction module is further configured to: construct energy data triples based on the data entities and the data relationships; store the energy data triples in a preset graph database to obtain an energy knowledge graph.

4. An intelligent question-answering device based on a knowledge graph, characterized by, The device comprises a memory, a processor, and a knowledge graph-based intelligent question answering program stored on the memory and executable on the processor, the knowledge graph-based intelligent question answering program being configured to implement the steps of the knowledge graph-based intelligent question answering method according to any one of claims 1 or 2.

5. A storage medium, characterized by The storage medium stores a knowledge graph-based intelligent question answering program, and the knowledge graph-based intelligent question answering program implements the steps of the knowledge graph-based intelligent question answering method according to any one of claims 1 or 2 when executed by a processor.

6. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the steps of the knowledge graph-based intelligent question answering method according to any one of claims 1 or 2.

Citation Information

Patent Citations

  • Knowledge graph-based patient medical record similarity evaluation method and system

    CN112364174A

  • Intelligent question and answer method and system based on tourism knowledge graph

    CN113535917A

  • Intelligent question answering method and device based on industry knowledge graph, equipment and medium

    CN116257610A