CN115269862A - Electric power question-answering and visualization system based on knowledge graph - Google Patents

Electric power question-answering and visualization system based on knowledge graph Download PDF

Info

Publication number
CN115269862A
CN115269862A CN202210724316.XA CN202210724316A CN115269862A CN 115269862 A CN115269862 A CN 115269862A CN 202210724316 A CN202210724316 A CN 202210724316A CN 115269862 A CN115269862 A CN 115269862A
Authority
CN
China
Prior art keywords
knowledge
question
answering
data
graph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210724316.XA
Other languages
Chinese (zh)
Inventor
张琳瑜
李强
刘迪
邱镇
黄晓光
王晓东
崔迎宝
刘璟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Information and Telecommunication Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Information and Telecommunication Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202210724316.XA priority Critical patent/CN115269862A/en
Publication of CN115269862A publication Critical patent/CN115269862A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention provides a power question-answering and visualization system based on a knowledge graph, which comprises: the system comprises a user side, an administrator side and a knowledge question and answer server; a user side acquires a power knowledge graph and performs display processing; the administrator is used by a system administrator, and the administrator performs addition, deletion, modification and check on user information through the administrator, performs addition, deletion, modification and check on the question-answer records of the knowledge map, and processes user feedback information; the knowledge question-answering server is used for realizing electric power question-answering and visual display, and is based on a B/S framework, a development design with front and rear ends separated is adopted, the front end is based on Vue.js, and the rear end adopts a miniature Web framework flash developed by Python; the knowledge question-answering server is provided with a database, and the database stores the knowledge map data by adopting a Neo4j database; the knowledge question-answering server constructs a knowledge map in the power field and provides a knowledge base for realizing a question-answering subsystem. And better user experience can be brought to the user.

Description

Electric power question-answering and visualization system based on knowledge graph
Technical Field
The invention relates to the technical field of power knowledge maps, in particular to a power question-answering and visualization system based on a knowledge map.
Background
With the continuous development of national grid services, the data volume of the accumulated power industry is increased greatly, and the important significance is achieved in obtaining and understanding valuable knowledge from massive information;
at present, data in the power industry are not effectively utilized, and a public Chinese power field knowledge map is lacked. There is a lack of question-answering and visualization systems in the power domain.
The current electric power knowledge map has low standardization degree and cannot meet the requirements of regulation, control and overall management. The power grid operation data are dispersed in different regulating and controlling mechanisms, different specialties and different safety areas, and a unified management mechanism is lacked; each application module is not enough in service encapsulation and lacks of a service calling mechanism; the regulation and control terminology has low standardization degree, and typical events such as power grid faults, important overhaul, operation risks and the like lack a uniform standardized and structured recording mode, so that the further improvement of the regulation and control overall management level is limited.
The structuralization degree of the electric power data is not high, defects, regulations, plans, real-time data and equipment attribute data are difficult to automatically associate, and related information needs to be manually inquired from different systems, so that the regulation and control working efficiency is restricted; the correlation degree among various data is low, the relation among the data does not have automatic calculation and correlation functions, and the problems in the data cannot be found intuitively and simply when a large amount of power grid operation feedback data are faced;
the power data is not high in degree of commonization, a large amount of Word, excel, paper documents and the like can be generated in the running process of a power grid, a large amount of data is mastered in hands of all departments, and the departments are difficult to share or look up history; in the face of a large amount of document information, document tagging management is insufficient, a required file cannot be locked quickly and accurately, in the face of an emergency fault, the searching efficiency of related information is low, and the handling and analysis efficiency of the fault is influenced;
in the prior art, the analysis capability of historical fault information is insufficient, and the historical fault information is difficult to guide a newly-entering dispatcher and a monitor to train and analyze and summarize the historical fault through the expansion of regulation and control service.
Disclosure of Invention
The invention provides a power question-answering and visualization system based on a knowledge graph, which can solve the problems of low data structuring degree, low commonization degree, low intellectualization level and the like in the power industry.
The power question answering and visualization system based on the knowledge graph comprises: the system comprises a user side, an administrator side and a knowledge question-answering server;
the user side is used by a user, the user is in communication connection with the knowledge question and answer server through the user side to obtain the power knowledge graph, and the power knowledge graph is displayed;
the administrator is used by a system administrator, and is in communication connection with the knowledge question-answering server through the administrator, so that the administrator can add, delete, modify and check user information, add, delete, modify and check question-answering records of a knowledge map, and process user feedback information;
the knowledge question-answering server is used for realizing electric power question-answering and visual display, and is based on a B/S framework, a development design with front and rear ends separated is adopted, the front end is based on Vue.js, and the rear end adopts a miniature Web framework flash developed by Python;
the knowledge question-answering server is provided with a database, and the database stores the knowledge map data by adopting a Neo4j database;
the knowledge question-answering server constructs a knowledge map in the power field and provides a knowledge base for realizing a question-answering subsystem.
It should be further noted that the user side has a user interface component; the user interface component home page is composed of four components of HeaderCom, chatReightCom, QALListLeftCom and LoginCom; the HeaderCom is the top of the page and comprises a plurality of links and login buttons; the chatrigtCom is a question and answer module on the right side of the page and consists of two subcomponents, namely a chatInputCom and a chatOutputCom; QALListLeftCom is a question-answering system list on the left side of the page and contains basic information of the question-answering system; loginCom is a login registration module;
the user side has a knowledge graph visualization function;
realizing knowledge graph visualization by using database of D3.Js and Neo4 j;
converting an entity and a relation CSV table used for constructing the knowledge map into JSON format data, wherein a data part of a JSON file comprises two dictionaries, the dictionary names are all and power respectively, and the front end requests back-end data through an AJAX mode and returns the back-end data to the front end for map rendering; the nodes are dragged randomly on a knowledge graph visual interface, the knowledge graph is enlarged and reduced, the detailed information of the nodes can be checked by clicking the nodes, and the nodes can be inquired by inputting the node ID and the node name;
the user side also carries out initialization setting on the knowledge graph; the function of clicking the node to display the related node and the edge is realized by adding a mouse response event; clicking the node to display the attribute and the attribute value through D3; the user side also realizes the node searching function of the knowledge graph;
the user side is provided with a login module which is realized by a LoginCom component, and the LoginCom component is realized by an ElementUI of a component library of Vue.
It is further described that the administrator side is provided with a knowledge graph expansion module and a management function module;
the knowledge base expansion module is realized by a KGExtendedCom component, selects a local file to upload, calls an upload interface of the knowledge question and answer server to send the file to the knowledge question and answer server, and calls an expand interface of the knowledge question and answer server to send an Ajax request to the knowledge question and answer server after uploading is successful;
after receiving the file and the expansion request, the knowledge question-answering server adds the relevant information of the expansion task in an expansion task information table of MySQL, sets the initial value of the task state field as import, and sets the task submission time field according to the current time; then creating a new thread, calling a knowledge graph construction module, and asynchronously finishing the data import of the knowledge graph and the statistics operation of the entity and relationship quantity; after the data import is finished, assigning values to the number of the extended entities, the total number of the extended entities and the task completion time field in the extended task information table according to the statistical result and the end time;
the management function module comprises user information management, question and answer record management and user feedback management functions and provides a visual interface for maintaining system information and user information for an administrator.
According to the technical scheme, the invention has the following advantages:
the power question answering and visualization system based on the knowledge graph can bring better user experience to users. The power domain knowledge graph is used as an answer source, and different from a traditional search engine, the problem that a user inputs natural language description is solved, so that more concise and accurate answers can be obtained. The knowledge-graph-based question-answering system has huge market demands, has strong practicability and advancement, and is an intelligent small assistant for solving the living problems of users.
The invention relates to a power question-answering and visualization system based on a knowledge graph, which is based on a B/S framework, adopts a front-end and back-end separated development technology, the front end is based on Vue.
The power question-answering and visualization system based on the knowledge graph constructs the knowledge graph in the power field based on structured, semi-structured and unstructured data, and provides a power knowledge base for realizing the question-answering system. A question-answering module is constructed based on the AIML framework method, and the method comprises three main processes of question preprocessing, question understanding and answer obtaining.
The power question-answering and visualization system based on the knowledge graph provides a knowledge graph visualization function for a user side, the function is based on HTML, CSS and D3.Js force guide graph rendering knowledge graph, and the user can drag, click, query and the like on graph nodes; and a knowledge map expansion function is provided for an administrator so as to update the knowledge base of the question-answering system in time and provide more accurate answers for users.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description will be briefly introduced, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a knowledge-graph-based electric question answering and visualization system;
fig. 2 is a schematic diagram of an embodiment of a user terminal;
FIG. 3 is a schematic diagram of an embodiment of an administrator side;
FIG. 4 is a diagram of a system architecture;
FIG. 5 is a knowledge graph building architecture diagram.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The power question-answering and visualization system based on the knowledge graph can accurately understand the problems described by the user by using the natural language, can play a key role in the precise question-answering service, and is a more advanced mode of man-machine interaction. The question-answering system can rapidly acquire and understand valuable knowledge from massive information, and can truly realize knowledge retrieval on a semantic level. The knowledge-graph-based question-answering system has wide application prospect and huge market demand in artificial intelligence and related industries, and has advancement and practicability.
The invention relates to design and implementation of a knowledge graph-based electric power question-answering and visualization system, which aims to provide knowledge question-answering in the field of electric power. As shown in fig. 1 to 5, the system includes: a user end 2, an administrator end 3 and a knowledge question and answer server 1;
the system architecture may include a user terminal 2, an administrator terminal 3, a network, and a knowledge question and answer server 1. The network is a medium for providing communication links between the user terminal 2, the administrator terminal 3, and the knowledge-answering server 1. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of user terminals 2, administrator terminals 3, networks and knowledge question and answer servers 1 as in fig. 1 to 5 is merely illustrative. There may be any number of clients 2, administrators 3, networks, and knowledge question-answering servers 1, as desired for the implementation. For example, the knowledge question and answer server 1 may be a server cluster composed of a plurality of servers.
The user may interact with the knowledge question and answer server 1 over a network using the user terminal 2 and the administrator terminal 3 to receive or send messages or the like. The user terminal 2 and the administrator terminal 3 may be various electronic devices having display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
In the related art, for example, a machine learning method, a deep learning method, or the like may be used to form an electric power question-answering process and a visual display based on a knowledge graph.
Specifically, the user end 2 is used by a user, and the user is in communication connection with the knowledge question and answer server 1 through the user end 2 to obtain the power knowledge graph and perform display processing;
the user side 2 has user interface components, and the user interface components are composed of four basic components, namely, headerCom, chatReightCom, QALListLeftCom and LoginCom. HeaderCom is the top of the page, including several links and login buttons; the chatrigchcom is a question and answer module on the right side of the page and consists of two subcomponents, namely a ChatInputCom and a ChatOutputCom; QALListLeftCom is a question-answering system list on the left side of the page and contains basic information of the question-answering system; loginCom is a login and registration module, which is only displayed by clicking a login button in the HeaderCom, and includes a subcomponent register com for implementing the registration function. The knowledge question-answering server 1 realizes the question-answering system list component, and a new question-answering system can be added in the component, so that good expandability is embodied. Each question-answering system in the list includes information such as name, system description, number of entities in the knowledge base, and number of relationships.
The user terminal 2 has a knowledge map visualization function. The knowledgegraph visualization module is implemented using the D3.Js and Neo4j graph databases. Firstly, an entity and a relation CSV table used for constructing the knowledge map are converted into JSON format data, a data part of a JSON file comprises two dictionaries, the dictionary names are all and power respectively, the front end requests rear end data through an AJAX mode, and the POST requests the front end data to be returned to the front end for map rendering. In the knowledge graph visualization interface, nodes can be dragged at will, the knowledge graph can be enlarged and reduced, the detailed information of the nodes can be checked by clicking the nodes, and the nodes can be inquired by inputting the node ID and the node name.
The user end 2 carries out initialization setting on the knowledge graph; the function of clicking the node to display the related node and the edge is realized by adding a mouse response event; then, clicking the node to display the attribute and the attribute value through D3; and finally, realizing the node searching function of the knowledge graph.
The user terminal 2 can implement a login and registration function. The login module is realized by a LoginCom component which is mainly realized by an ElementUI of a component library of Vue.
The administrator terminal 3 is used by a system administrator, and the administrator is in communication connection with the knowledge question-answering server 1 through the administrator terminal 3, and is used for performing addition, deletion, modification and examination on user information, performing addition, deletion, modification and examination on question-answering records of a knowledge map, and processing user feedback information;
the administrator side 3 may implement the knowledge-graph extension function. The knowledge base expansion module is realized by a KGExtendedCom component, a local file is directly selected to be uploaded after clicking 'uploading file', an upload interface of the knowledge question answering server 1 is called to send the file to the knowledge question answering server 1, a 'submit task' button is clicked after the uploading is successful, an expand interface of the knowledge question answering server 1 is called, and an Ajax request is sent to the knowledge question answering server 1. After receiving the file and the expansion request, the knowledge question-answering server 1 firstly adds the relevant information of the expansion task in the MySQL expansion task information table, sets the initial value of the task state field as the import, and sets the task submission time field according to the current time. And then, a new thread is created, a knowledge graph construction module is called, and the operations of introducing knowledge graph data, counting the number of entities and relations and the like are asynchronously completed. And after the data import is finished, assigning values to fields such as the number of the extended entities, the total number of the extended entities, the task completion time and the like in the extended task information table according to the statistical result and the end time.
The administrator terminal 3 further comprises four basic functional modules of user information management, question and answer record management and user feedback management, and provides a visual interface for maintaining system information and user information for an administrator. In addition, the background management system further comprises additional functions of searching, screening and the like, and an administrator can check specified information by using the searching and screening functions as required.
The knowledge question-answering server 1 is used for achieving electric power question-answering and visual display, based on a B/S framework, a front-end and back-end separation development technology is adopted, the front end is based on Vue. The method comprises the steps of constructing a knowledge graph in the power field based on structured, semi-structured and unstructured data, comprising three main processes of knowledge acquisition, knowledge processing and knowledge storage, and providing a power knowledge base for realizing a question-answering system. A question-answering module is constructed based on the AIML framework method, and comprises three main processes of question preprocessing, question understanding and answer obtaining.
On the basis of basic functions realized by the knowledge question-answering server 1, a knowledge graph visualization function is provided for the user side 2, the knowledge graph is rendered based on HTML, CSS and D3.Js force guide graphs, and the user can drag, click, query and the like on graph nodes; and a knowledge map expansion function is provided for the administrator terminal 3, so that the knowledge base of the question-answering system can be updated in time, and more accurate answers can be provided for users.
The knowledge graph-based electric power question-answering mode provided by the embodiment of the application can relate to artificial intelligence computer artificial intelligence cloud service, specifically, artificial intelligence processing is realized by utilizing the computer artificial intelligence cloud service, and the accuracy of knowledge answer can be improved.
Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The cloud computing technology of the invention provides important support for knowledge answers. The background services of the knowledge-answering server 1 require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing. The knowledge question-answering server 1 with the cloud technology realizes the functions of artificial intelligence service, cloud internet of things, cloud education and the like; among them, the so-called artificial intelligence cloud Service knowledge question-and-answer may be referred to as AIaaS (AIas a Service, chinese is "AI as a Service"). The method is a service mode of an artificial intelligence platform, and particularly, the AIaaS platform splits several types of common AI services and provides independent or packaged services at a cloud. This service model is similar to the one opened in an AI theme mall: all developers can access one or more artificial intelligence services provided by the platform through an API (application programming interface), and part of the qualified developers can also use an AI framework and an AI infrastructure provided by the platform to deploy and operate and maintain the self-dedicated cloud artificial intelligence services.
In one embodiment of the invention, a possible example is given below to illustrate, without limitation, a specific embodiment thereof.
The knowledge question-answering server 1 constructs a knowledge map in the power field and provides a knowledge base for realizing a question-answering system; the knowledge question-answering server 1 adopts two technical schemes of an AIML frame and a basic question-answering pair to obtain answers from a knowledge graph; the knowledge question and answer server 1 realizes the functions of knowledge graph visualization, knowledge graph expansion and the like.
In the process of constructing the knowledge graph by the knowledge question and answer server 1, the contents of a construction target, a field, a range, a scene and the like are determined at first. According to research and analysis, the data of the power industry are divided into noun explanation, electrician technology, power grid data, industry dynamic and other contents.
The knowledge question and answer server 1 obtains data for constructing the knowledge graph from a reliable data source in the knowledge graph construction process, wherein the data comprises unstructured, structured and semi-structured data. The structured data can be from a Dammame database, the source of the semi-structured data can be Baidu encyclopedia and electric power field vertical websites, and the source of the unstructured data is national grid internal text literature.
In the knowledge processing process, the knowledge question answering server 1 processes source data into fixed format structured data meeting requirements of knowledge map construction, so that a Neo4j graph database is conveniently imported, the file format of the structured data is a CSV file, and entity and relationship data are respectively stored in different CSV files.
In the knowledge acquisition phase, data for constructing the knowledge graph, including unstructured, structured and semi-structured data, needs to be acquired from reliable data sources.
The structured data come from Dahleng database, and the database of national network storage data is a domestic Dahleng database against the background that strict requirements are met on performance, safety, localization and the like. And connecting and initializing to reach dream, constructing an SQL statement, performing data query, performing data type, structure and attribute conversion, constructing a Neo4j data storage language, determining a superior-inferior relation by combining information extracted by the SQL language, and creating a node.
The source of the semi-structured data is a vertical website in the field of Baidu encyclopedia and electric power, and is mainly obtained in a crawler mode. The crawler model is constructed based on a Scapy framework, and the framework mainly comprises a crawler, a scheduler, a downloader and other components. In the crawler process, initial seeds are selected flexibly at first to prevent crawler operation from failing at the beginning, and anti-crawler detection is avoided to prevent the network area where the crawler is located from being limited by a target server.
The source of the unstructured data related to the invention can be internal text documents of the national network, and is mainly obtained by adopting an entity relation extraction method based on syntactic and semantic features. The text is extracted through a data mining technology, and then the extracted text is subjected to standardized operations such as sentence segmentation and the like through the cleaned rule processing. And finally, performing operations such as corresponding word segmentation, part of speech tagging and the like on the text. And matching the syntactic analysis rules through the syntactic analysis rules defined in advance, judging whether the extraction is successful or not through the judgment sentences, storing corresponding knowledge if the extraction is successful, otherwise, judging whether the extraction is finished or not, and if the extraction is not continued, continuing the extraction. Before extraction, the sentences are divided into separate sentences, and each sentence is continuously extracted and retrieved, so that the extraction process of the unstructured data can be achieved.
After source data are obtained from semi-structured and unstructured data, knowledge needs to be preprocessed, the whole idea is to process the source data into fixed format structured data meeting the requirement of constructing a knowledge map, the Neo4j map database is conveniently imported, the file format of the structured data is a CSV file, and entity and relationship data are respectively stored in different CSV files. Firstly, data cleaning is needed to be carried out on source data, unimportant fields are deleted, and records with null or zero main field values are deleted; secondly, splitting the source data table structure according to the source data table structure, extracting entities, attributes and relations, wherein one entity corresponds to a plurality of attributes, and different entities are distinguished from a source entity and a target entity through a primary key to form relations. The source data is processed through the above steps to become a CSV file containing entity tables and relationship tables.
In the knowledge storage stage of the knowledge question answering server 1, because the Neo4j database has high efficiency of storing map data and is convenient and flexible to use, the Neo4j database is used for storing entities, attributes and relationships of the knowledge map. And finally, constructing a knowledge graph in the power field, and providing a knowledge base for realizing a question-answering system.
In the system, since the data size of the knowledge graph is less than one hundred thousand, and since the system cannot affect the use of the current knowledge graph when importing data, it is necessary to use an importing method capable of inserting data in real time. Based on the above two points, the system imports data by using a LOAD CSV method.
According to the specification of the LOAD CSV method in Neo4j, entity data needs to be imported first, and then relationship data needs to be imported according to the entities in the database. Before importing the entity and the attribute data, the Cypher statement is required to be constructed according to the entity type and the attribute name, the CSV file of the entity data is named according to the entity type, for example, the CSV file of the person entity is named as person. For Cypher statements of relational data, source entities and destination entities are required to be used for construction. And writing the constructed Cypher sentences into a script program, so that one-key storage of entity, attribute and relationship data can be realized. The constructed knowledge graph contains abundant entity and relationship data which are convenient for a computer to read, and can provide a knowledge base for questions and answers, so that a user can obtain more accurate search results. In addition, the module also needs to complete entity relationship increment statistics in the knowledge graph expansion task.
For the construction of the question-answering module of the knowledge question-answering server 1, a basic question-answering sentence is input into a system, and the system performs related operations such as word segmentation, part-of-speech tagging, keyword extraction and the like. And generating corresponding content through the label by combining semantic similarity calculation.
Specifically, the question-answering system of the invention is mainly based on two technical schemes of an AIML framework and a basic question-answering pair. Firstly, inputting basic question-answering sentences into a system, carrying out related operations such as word segmentation, part-of-speech tagging and keyword extraction on the system, combining semantic similarity calculation, generating corresponding contents through tags, carrying out Content retrieval work on the related question-answering sentences in the system, returning the corresponding Content-answering sentences if the retrieval is successful, and returning Null if the retrieval is not successful. And then judging whether the returned content is null or not, if not, indicating that the corresponding data is retrieved, and returning the retrieved data, otherwise, further searching the result through an AIML question-answering system framework, if the data is retrieved successfully, returning a corresponding answer sentence, otherwise, returning a general answer sentence (for example, if your question is too difficult, question can be asked in an alternative way.
The semantic analysis module comprises the contents of word segmentation, part-of-speech tagging, tag label generation, similarity calculation and the like, and the word segmentation technology and the part-of-speech tagging adopted in the text are based on an LTP natural language processing framework of Hadamard.
The method mainly adopts a similarity calculation algorithm based on a cosine algorithm, converts a sentence into a corresponding tag label by using a synonym forest issued by Harbin university of industry after the sentence is divided and keywords are extracted, then carries out hierarchical calculation on the corresponding tag label, adjusts the weights of different layers, and finally calculates the corresponding similarity score.
The single-turn dialogue based on question and answer pairs mainly comprises the steps of performing word segmentation, stop word removal, part-of-speech tagging and other operations on corresponding question sentences, performing tag calculation on obtained contents, searching corresponding matching contents in a database by using the corresponding tags, feeding back corresponding answers when data are inquired, and otherwise, entering other processing flows.
The power question answering and visualization system based on the knowledge graph can bring better user experience to users. The power domain knowledge graph is used as an answer source, and different from a traditional search engine, the problem that a user inputs natural language description is solved, so that more concise and accurate answers can be obtained. The question-answering system based on the knowledge graph has huge market demands, has strong practicability and advancement, and is an intelligent small assistant for solving the living problems of the user.
The invention relates to a power question-answering and visualization system based on a knowledge graph, which is based on a B/S framework, adopts a front-end and back-end separated development technology, the front end is based on Vue.
The power question-answering and visualization system based on the knowledge graph constructs the knowledge graph in the power field based on structured, semi-structured and unstructured data, and provides a power knowledge base for realizing the question-answering system. A question-answering module is constructed based on the AIML framework method, and comprises three main processes of question preprocessing, question understanding and answer obtaining.
The power question-answering and visualization system based on the knowledge graph provides a knowledge graph visualization function for a user side 2, the function is based on HTML, CSS and D3.Js force guide graph rendering knowledge graph, and a user can drag, click, query and the like on graph nodes; and a knowledge map expansion function is provided for the administrator terminal 3, so that the knowledge base of the question-answering system can be updated in time, and more accurate answers can be provided for users.
The knowledge-graph-based power question answering and visualization system to which the present invention relates is the elements and algorithmic steps of the examples described in connection with the embodiments disclosed herein, which may be embodied in electronic hardware, computer software, or combinations of both, the components and steps of the examples having been described generally in terms of functionality in the foregoing description for clarity of explanation of interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A power question answering and visualization system based on a knowledge graph is characterized by comprising: the system comprises a user side, an administrator side and a knowledge question-answering server;
the user side is used by a user, the user is in communication connection with the knowledge question and answer server through the user side to obtain the power knowledge graph, and the power knowledge graph is displayed;
the administrator is used by a system administrator, and is in communication connection with the knowledge question-answering server through the administrator, so that the administrator can add, delete, modify and check user information, add, delete, modify and check question-answering records of a knowledge map, and process user feedback information;
the knowledge question-answering server is used for realizing electric power question-answering and visual display, and is based on a B/S framework, a development design with front and rear ends separated is adopted, the front end is based on Vue.js, and the rear end adopts a miniature Web framework flash developed by Python;
the knowledge question-answering server is provided with a database, and the database stores the knowledge map data by adopting a Neo4j database;
the knowledge question-answering server constructs a knowledge map in the power field and provides a knowledge base for realizing a question-answering subsystem.
2. The knowledge-graph-based power question answering and visualization system according to claim 1,
the knowledge question-answering server acquires answers from the knowledge map based on the AIML frame and question-answering data sent by the user side;
the knowledge question-answering server is also used for expanding the knowledge graph to realize the visualization display function of the knowledge graph.
3. The knowledge-graph-based electric question answering and visualization system according to claim 2,
acquiring a knowledge graph in the process of constructing the knowledge graph by the knowledge question and answer server, and acquiring data for constructing the knowledge graph from a data source in a knowledge acquisition stage, wherein the data comprises unstructured, structured and semi-structured data;
the knowledge question-answering server processes knowledge, and specifically comprises the following steps: processing the source data into fixed format structured data which accords with the requirements of constructing a knowledge graph, wherein the file format of the structured data is a CSV file, and the entity and the relation data are respectively stored in different CSV files;
the knowledge question-answering server stores knowledge; and storing the entity, the attribute and the relation of the knowledge graph by using a Neo4j database, constructing the knowledge graph in the power field, and providing a knowledge base for realizing a question-answering subsystem.
4. The knowledge-graph-based power question answering and visualization system according to claim 1 or 2,
the knowledge question-answering server constructs a question-answering module and preprocesses questions, wherein the question preprocessing process is to input basic question-answering sentences into the knowledge question-answering server, and the knowledge question-answering server performs related operations of word segmentation, part-of-speech tagging and keyword extraction;
the knowledge question-answering server has a question understanding function, and generates corresponding content through tags by combining semantic similarity calculation;
the knowledge question-answering server carries out content retrieval work of related question-answering sentences in the question-answering process, if the retrieval is successful, corresponding answer sentences are returned, otherwise, null is returned;
judging whether the returned content is empty, if not, retrieving corresponding data and returning the data;
otherwise, result retrieval is carried out through the AIML-based question-answering system framework, if the retrieval data is successful, the corresponding answer sentence is returned, otherwise, the general answer sentence is returned.
5. The knowledge-graph-based power question answering and visualization system according to claim 2,
the knowledge question-answering server constructs SQL sentences and carries out data query, converts data types, structures and attributes, constructs Neo4j data storage language, determines the superior-subordinate relation by combining information extracted by the SQL language and creates knowledge map nodes;
the semi-structured data is obtained in a crawler mode; the crawler model is constructed based on a script framework, and the framework comprises a crawler, a scheduler and a downloader;
the unstructured data is obtained by adopting an entity relation extraction method based on syntactic semantic features; extracting a text by a data mining technology, then carrying out sentence segmentation standardization operation on the extracted text by cleaned rule processing, and finally carrying out corresponding word segmentation and part-of-speech tagging operation on the text;
and matching the syntactic analysis rules through the predefined syntactic analysis rules, judging whether the extraction is successful or not through the judgment sentences, if so, storing corresponding knowledge, otherwise, judging whether the extraction is finished or not, and if not, continuing the extraction.
6. The knowledge-graph-based power question answering and visualization system according to claim 1 or 2,
after acquiring source data from the semi-structured and unstructured data, the knowledge question-answering server preprocesses knowledge and processes the source data into fixed format structured data meeting requirements for constructing a knowledge map;
the file format of the structured data is CSV files, and the entity and the relation data are respectively stored in different CSV files; performing data cleaning on the source data, deleting unimportant fields and records with null or zero field values;
secondly, splitting the source data table structure according to the source data table structure, extracting entities, attributes and relations, wherein one entity corresponds to a plurality of attributes, and different entities are distinguished from a source entity and a target entity through a primary key to form relations.
7. A knowledge-graph-based electric question answering and visualization system according to claim 1 or 2,
the database uses the Neo4j database to store the entities, attributes and relationships of the knowledge-graph;
when storing data in the database, importing entity data, and importing relational data according to the entities in the database;
constructing a Cypher statement according to the entity type and the attribute name, wherein the CSV file of the entity data is named according to the entity type;
constructing Cypher sentences of the relational data by using a source entity and a target entity; and writing the constructed Cypher sentences into a script program to realize one-key storage of entity, attribute and relationship data.
8. The knowledge-graph-based power question answering and visualization system according to claim 1 or 2,
the knowledge question-answering server acquires basic question-answering sentences, performs word segmentation, part of speech tagging and keyword extraction operations, combines semantic similarity calculation, generates corresponding contents through tags, and performs content retrieval work on related question-answering sentences;
the knowledge question-answering server is provided with a semantic analysis module, and the semantic analysis module comprises word segmentation, part of speech tagging, tag label generation and similarity calculation;
the knowledge question-answering server extracts sentences and keywords based on a similarity calculation algorithm of a cosine algorithm, converts the sentences into corresponding tag labels by using a synonym forest, performs hierarchical calculation on the corresponding tag labels, adjusts weights of different layers, and finally calculates corresponding similarity scores;
the single-turn dialogue based on the question-answer pair is to divide words of corresponding question sentences, remove stop words and part of speech tagging, perform tag calculation on the obtained contents, then use the corresponding tags to search corresponding matching contents in a database, and feed back corresponding answers if data are searched.
9. A knowledge-graph-based electric question answering and visualization system according to claim 1 or 2,
the user side is provided with a user interface component; the user interface component home page consists of four components of HeaderCom, chatReightCom, QALListleftCom and LoginCom; headerCom is the top of the page, including several links and login buttons; the chatrigchcom is a question and answer module on the right side of the page and consists of two subcomponents, namely a ChatInputCom and a ChatOutputCom; QALListLeftCom is a question-answering system list on the left side of the page and contains basic information of the question-answering system; loginCom is a login registration module;
the user side has a knowledge graph visualization function;
knowledge graph visualization is achieved by using a database of D3.Js and Neo4j graphs;
converting an entity and a relation CSV table used for constructing the knowledge map into JSON format data, wherein a data part of a JSON file comprises two dictionaries, the dictionary names are all and power respectively, and the front end requests back-end data through an AJAX mode and returns the back-end data to the front end for map rendering; the nodes are dragged randomly on a knowledge graph visual interface, the knowledge graph is enlarged and reduced, the detailed information of the nodes can be checked by clicking the nodes, and the nodes can be inquired by inputting the node ID and the node name;
the user side also carries out initialization setting on the knowledge graph; the function of clicking the node to display the related node and the edge is realized by adding a mouse response event; the method comprises the steps that clicking nodes to display attributes and attribute values of the nodes through D3; the user side also realizes the node searching function of the knowledge graph;
the user side is provided with a login module which is realized by a LogiCom component, and the LogiCom component is realized by a component library ElementUI of Vue.
10. The knowledge-graph-based power question answering and visualization system according to claim 1 or 2, wherein a manager side is provided with a knowledge-graph expansion module and a management function module;
the knowledge base expansion module is realized by a KGExtendedCom component, selects a local file to upload, calls an upload interface of the knowledge question and answer server to send the file to the knowledge question and answer server, and calls an expand interface of the knowledge question and answer server to send an Ajax request to the knowledge question and answer server after uploading is successful;
after receiving the file and the expansion request, the knowledge question-answering server adds related information of the expansion task in an expansion task information table of MySQL, sets an initial value of a task state field as a lead-in, and sets a task submission time field according to the current time; then creating a new thread, calling a knowledge graph construction module, and asynchronously finishing the data import of the knowledge graph and the statistical operation of the entity and relationship quantity; after the data import is finished, assigning values to the number of the extended entities, the total number of the extended entities and the task completion time field in the extended task information table according to the statistical result and the end time;
the management function module comprises user information management, question and answer record management and user feedback management functions and provides a visual interface for maintaining system information and user information for an administrator.
CN202210724316.XA 2022-06-24 2022-06-24 Electric power question-answering and visualization system based on knowledge graph Pending CN115269862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210724316.XA CN115269862A (en) 2022-06-24 2022-06-24 Electric power question-answering and visualization system based on knowledge graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210724316.XA CN115269862A (en) 2022-06-24 2022-06-24 Electric power question-answering and visualization system based on knowledge graph

Publications (1)

Publication Number Publication Date
CN115269862A true CN115269862A (en) 2022-11-01

Family

ID=83761486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210724316.XA Pending CN115269862A (en) 2022-06-24 2022-06-24 Electric power question-answering and visualization system based on knowledge graph

Country Status (1)

Country Link
CN (1) CN115269862A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116821304A (en) * 2023-07-07 2023-09-29 国网青海省电力公司信息通信公司 Knowledge intelligent question-answering system of power supply station based on big data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116821304A (en) * 2023-07-07 2023-09-29 国网青海省电力公司信息通信公司 Knowledge intelligent question-answering system of power supply station based on big data
CN116821304B (en) * 2023-07-07 2023-12-19 国网青海省电力公司信息通信公司 Knowledge intelligent question-answering system of power supply station based on big data

Similar Documents

Publication Publication Date Title
CN111753060B (en) Information retrieval method, apparatus, device and computer readable storage medium
CN111753198B (en) Information recommendation method and device, electronic equipment and readable storage medium
US11899681B2 (en) Knowledge graph building method, electronic apparatus and non-transitory computer readable storage medium
US20220004714A1 (en) Event extraction method and apparatus, and storage medium
CN106951558B (en) Data processing method of tax intelligent consultation platform based on deep search
US20190272478A1 (en) Generating feature vectors from rdf graphs
US20220358292A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
JP2022091986A (en) Intelligent interactive method, device, electronic apparatus and storage medium
CN112507076A (en) Semantic analysis searching method and device and storage medium
CN117271767A (en) Operation and maintenance knowledge base establishing method based on multiple intelligent agents
CN114911915A (en) Knowledge graph-based question and answer searching method, system, equipment and medium
CN114840685A (en) Emergency plan knowledge graph construction method
CN115269862A (en) Electric power question-answering and visualization system based on knowledge graph
CN113704420A (en) Method and device for identifying role in text, electronic equipment and storage medium
CN115878818B (en) Geographic knowledge graph construction method, device, terminal and storage medium
CN111931034A (en) Data searching method, device, equipment and storage medium
KR20210129465A (en) Apparatus for managing laboratory note and method for searching laboratory note using thereof
CN115757720A (en) Project information searching method, device, equipment and medium based on knowledge graph
CN115221337A (en) Data weaving processing method and device, electronic equipment and readable storage medium
CN113392220B (en) Knowledge graph generation method and device, computer equipment and storage medium
CN110716994B (en) Retrieval method and device supporting heterogeneous geographic data resource retrieval
Zhang et al. Design and implementation of power question answering and visualization system based on knowledge graph
CN116561288B (en) Event query method, device, computer equipment, storage medium and program product
CN113868322B (en) Semantic structure analysis method, device and equipment, virtualization system and medium
Sukumar et al. Knowledge Graph Generation for Unstructured Data Using Data Processing Pipeline

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination