Method, device, equipment and medium for constructing knowledge graph based on power grid data
By building a grid data knowledge graph, analyzing target requirements and obtaining corresponding grid data, the problem of difficulty in obtaining target data from massive grid data is solved, and rapid acquisition and efficiency are achieved.
Patent Information
- Application Number
- CN202111077726.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-14
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-09-14
AI Technical Summary
It is difficult to obtain target grid data from massive power grid data, resulting in inefficiency.
By receiving the target needs input by users, analyzing and determining the relationship between the target entity and the target, building a grid data knowledge graph framework, and obtaining corresponding grid data based on the target entity for fusion processing, and generating a target grid data knowledge graph.
It realizes the rapid acquisition of target grid data from massive power grid data, improving the acquisition efficiency.
Smart Images

Figure CN113806556B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing, and in particular, to a method, device, equipment and medium for constructing a knowledge graph based on power grid data. Background Art
[0002] The power grid is composed of hardware equipment and software systems for power generation, transmission and distribution. The power grid data includes not only the hardware data and software data of the power grid itself when it is static, but also the operating data generated when the power grid is running.
[0003] However, due to the large amount of power grid data, the large number of data categories, and the diverse forms of data presentation, there is a technical problem that it is difficult to obtain the required power grid data from the massive power grid data. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and medium for constructing a knowledge graph based on power grid data, so as to realize rapid acquisition of target power grid data in massive power grid data, thereby improving the efficiency of acquiring the target power grid data.
[0005] In a first aspect, an embodiment of the present invention provides a method for constructing a knowledge graph based on power grid data, the method comprising:
[0006] Receive target requirements input by users for building a knowledge graph of power grid data;
[0007] Parsing the target demand, determining each target entity and the target relationship between the target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities;
[0008] According to each target entity, obtaining target power grid data corresponding to each target entity;
[0009] The target power grid data corresponding to each target entity is fused with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0010] In a second aspect, an embodiment of the present invention further provides a device for constructing a knowledge graph based on power grid data, the device comprising:
[0011] A target demand receiving module, used to receive target demands input by a user for constructing a power grid data knowledge graph;
[0012] A power grid data knowledge graph framework construction module is used to parse the target demand, determine each target entity and the target relationship between the target entities contained in the target demand, and construct a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities;
[0013] A target power grid data acquisition module is used to acquire target power grid data corresponding to each target entity according to each target entity;
[0014] The target power grid data knowledge graph generation module is used to fuse the target power grid data corresponding to each target entity with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] A storage device for storing one or more programs;
[0018] When the program is executed by the processor, the processor implements a method for constructing a knowledge graph based on power grid data as provided in any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for constructing a knowledge graph based on power grid data as provided in any embodiment of the present invention.
[0020] The technical solution of this embodiment receives the target requirements for constructing a power grid data knowledge graph input by the user. The target requirements are parsed to determine each target entity and the target relationship between the target entities included in the target requirements, and a power grid data knowledge graph framework is constructed based on each target entity and the target relationship between the target entities. According to each target entity, the target power grid data corresponding to each target entity is obtained. The target power grid data corresponding to each target entity is fused with the power grid data knowledge graph framework to generate a target power grid data knowledge graph. The technical solution of the embodiment of the present invention solves the technical problem in the prior art that it is difficult to obtain target power grid data when obtaining target power grid data from massive power grid data, and realizes the rapid acquisition of target power grid data from massive power grid data, achieving the technical effect of improving the efficiency of obtaining target power grid data. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 It is a schematic diagram of a flow chart of a method for constructing a knowledge graph based on power grid data provided in the first embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram of a method for constructing a knowledge graph based on power grid data provided in the second embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of a module of a device for constructing a knowledge graph based on power grid data provided in the third embodiment of the present invention;
[0025] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] Embodiment 1
[0028] Figure 1 It is a flow chart of a method for constructing a knowledge graph based on power grid data provided in the first embodiment of the present invention. This embodiment is applicable to the situation where a target power grid data knowledge graph is obtained according to the target requirements for constructing a power grid data knowledge graph. The method can be executed by a construction device for a knowledge graph based on power grid data. The device can be implemented by software and / or hardware and integrated in electronic devices such as computers or servers.
[0029] like Figure 1 As shown, the method of this embodiment includes:
[0030] S110, receiving target requirements input by a user for constructing a power grid data knowledge graph.
[0031] Among them, the target demand can be understood as the demand for building a knowledge graph of power grid data.
[0032] Specifically, the target requirements for constructing the power grid data knowledge graph input by the user based on the input device are received. For example, the user can enter the target requirements in the set input box through a physical input device (such as a mouse, handwriting device and / or keyboard, etc.) or a touch device (such as a virtual keyboard and / or handwriting area, etc.).
[0033] In order to facilitate users to input target requirements more quickly and improve user experience, users can input target requirements by voice. Specifically, after receiving the target requirements input by the user in voice, the input voice can be converted into text.
[0034] S120, parsing the target demand to determine each target entity and the target relationship between the target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities.
[0035] The target entity may be an entity included in the target requirement, such as a substation, etc. The number of target entities included in the target requirement may be two or more. The target relationship may be a relationship between a target entity and a target entity in the target requirement. The target relationship may include a subordinate relationship, a parallel relationship, etc. The power grid data knowledge graph framework may be a knowledge graph framework constructed based on the target entities included in the target requirement and the relationship between the target entities.
[0036] Specifically, after receiving the target requirements input by the user, the target requirements input by the user can be parsed, each target entity contained in the target requirements can be determined, and the relationship between the target entities can be determined, and the relationship between the target entities can be used as the target relationship. Then, a power grid data knowledge graph framework can be constructed based on each target entity and target relationship.
[0037] Optionally, the target requirement is parsed in the following manner to determine each target entity and the target relationship between the target entities included in the target requirement:
[0038] A word segmenter of a semantic search engine is pre-configured, and the target demand is parsed based on the pre-configured word segmenter. Further, each target entity included in the target demand and the target relationship between the target entities can be determined.
[0039] Optionally, a knowledge graph framework of power grid data is constructed based on each target entity and the target relationship between target entities through the following steps:
[0040] Step 1: Treat each target entity as an independent node, and treat the target relationship between target entities as the connection relationship between corresponding independent nodes.
[0041] Specifically, after determining each target entity and the target relationship between target entities included in the target requirement, each target entity can be used as an independent node, and the target relationship between target entities can be used as the connection relationship between the corresponding independent nodes. The corresponding relationship between the target entity and the independent node is one-to-one.
[0042] Step 2: Construct a power grid data knowledge graph framework based on independent nodes and the connection relationships between independent nodes.
[0043] Specifically, after determining the independent nodes and the connection relationship between the independent nodes, the independent nodes with connection relationship are connected according to the connection relationship between the independent nodes, thereby obtaining a knowledge graph framework of power grid data.
[0044] S130. According to each target entity, obtain target power grid data corresponding to each target entity.
[0045] The target power grid data may be power grid data corresponding to the target entity. The number of the target power grid data may be one or more.
[0046] Specifically, after determining each target entity included in the target demand, the target grid data corresponding to each target entity can be determined based on the correspondence between the target entity and the target grid data. After determination, the corresponding target grid data can be obtained.
[0047] S140. The target power grid data corresponding to each target entity is integrated with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0048] Among them, the target power grid data knowledge graph can be a knowledge graph obtained by fusing the target power grid data corresponding to each target entity with the power grid data knowledge graph framework.
[0049] Specifically, after obtaining the target power grid data corresponding to each target entity, the target power grid data corresponding to each target entity can be fused with the constructed power grid data knowledge graph, that is, the target power grid data corresponding to each target entity is imported into the independent node corresponding to the corresponding target entity in the constructed power grid data knowledge graph. After the fusion process is completed, that is, after the import is completed, the target power grid data knowledge graph can be obtained.
[0050] In order to meet the diverse needs of users for the target power grid data knowledge graph, generating the target power grid data knowledge graph may include: generating a tree-like or mesh-like target power grid data knowledge graph. Optionally, after generating the target power grid data knowledge graph, the generated tree-like or mesh-like target power grid data knowledge graph may be displayed so that the user can intuitively view each target entity contained in the target demand and the corresponding relationship between the target entities.
[0051] The technical solution of this embodiment receives the target requirements for constructing a power grid data knowledge graph input by the user. The target requirements are parsed to determine each target entity and the target relationship between the target entities included in the target requirements, and a power grid data knowledge graph framework is constructed based on each target entity and the target relationship between the target entities. According to each target entity, the target power grid data corresponding to each target entity is obtained. The target power grid data corresponding to each target entity is fused with the power grid data knowledge graph framework to generate a target power grid data knowledge graph. The technical solution of the embodiment of the present invention solves the technical problem in the prior art that it is difficult to obtain target power grid data when obtaining target power grid data from massive power grid data, and realizes the rapid acquisition of target power grid data from massive power grid data, achieving the technical effect of improving the efficiency of obtaining target power grid data.
[0052] Embodiment 2
[0053] Figure 2 It is a flow chart of a method for constructing a knowledge graph based on power grid data provided in the second embodiment of the present invention. On the basis of the above-mentioned embodiment, optionally, before obtaining the target power grid data corresponding to each target entity, it also includes: storing each original power grid data in a data cluster corresponding to the data type of the original power grid data; obtaining the target power grid data corresponding to each target entity includes: obtaining the target power grid data corresponding to each target entity from the data cluster.
[0054] Among them, technical terms that are the same as or corresponding to the above embodiments are not repeated here.
[0055] like Figure 2 As shown, the method of this embodiment may specifically include:
[0056] S210 , storing each piece of original power grid data into a data cluster corresponding to the data type of the original power grid data.
[0057] The original power grid data may include but is not limited to hardware data of the power grid, software data of the power grid and operation data of the power grid. The data type of the original power grid data may be a structured data type or an unstructured data type. Optionally, the structured data type may include but is not limited to a text type and a numerical type. The unstructured data type may include but is not limited to an image type and an audio type.
[0058] The data cluster can be understood as a data cluster for storing raw power grid data, wherein the number of data clusters can be one or more. When there are multiple data clusters, different data clusters store raw power grid data of different data types, that is, one data cluster stores power grid data of one data type.
[0059] Specifically, each piece of original power grid data is obtained, and the data type of each piece of original power grid data is determined. After the data type of each piece of original power grid data is determined, a data cluster corresponding to the data type of each piece of original power grid data is determined. After the data cluster corresponding to the data type of each piece of original power grid data is determined, each piece of original power grid data can be stored in the data cluster corresponding to the data type of the original power grid data.
[0060] Optionally, before storing each piece of raw power grid data in a data cluster corresponding to the data type of the raw power grid data, the raw power grid data may be collected and stored in a database for storing the collected power grid data.
[0061] In order to facilitate the rapid identification of the original power grid data of the unstructured data type, the original power grid data of the unstructured data type may be marked. Optionally, the original power grid data of the unstructured data type may be marked in a preset marking form. The preset marking form may be a combination of the identifier of the original power grid data, the name of the original power grid data, and time information.
[0062] S220, receiving target requirements input by the user for constructing a power grid data knowledge graph.
[0063] S230, parsing the target demand to determine each target entity and the target relationship between target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between target entities.
[0064] S240 . According to each target entity, original power grid data corresponding to each target entity is obtained from the data cluster as target power grid data of each target entity.
[0065] Specifically, after determining each target entity included in the target demand, the original power grid data corresponding to each target entity can be obtained from the data cluster based on each determined target entity. Furthermore, the obtained original power grid data corresponding to each target entity can be used as the target power grid data corresponding to the corresponding target entity.
[0066] Optionally, after the target power grid data corresponding to each target entity is acquired, the target power grid data may be stored in a temporary database, wherein the temporary database may be used to store the target power grid data.
[0067] Further, the target power grid data is stored in a temporary database through the following steps:
[0068] Step 1: Determine the data type of the target power grid data.
[0069] The data type of the target power grid may be a structured data type or an unstructured data type.
[0070] Specifically, after the target power grid data corresponding to each target entity is acquired, the data type of each target power grid data may be determined, that is, whether the data type of each target power grid data is a structured data type or an unstructured data type may be determined.
[0071] Step 2: store the target power grid data into a temporary database according to the data type of the target power grid data.
[0072] Specifically, after determining the data type of the target power grid data, the target power grid data can be stored in a temporary database according to the data type of the target power grid data. Specifically, if the data type of the target power grid data is a structured data type, the target power grid data of the structured data type is stored in a preset two-dimensional data table in the temporary database. If the data type of the target power grid data is an unstructured data type, the target power grid data of the unstructured data type is stored in the file system of the temporary database in the form of a file, and a link or path to the file corresponding to the target power grid data of the unstructured data type is stored in the preset two-dimensional data table.
[0073] The preset two-dimensional data table may be a data table pre-created in a temporary database, and may be used to store target power grid data of structured data types and to store links or paths to files corresponding to target power grid data of unstructured data types.
[0074] S250. The target power grid data corresponding to each target entity is integrated with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0075] The technical solution of this embodiment, by storing each original power grid data in a data cluster corresponding to the data type of the original power grid data, obtains the original power grid data corresponding to each target entity from the data cluster as the target power grid data of each target entity, and then fuses the target power grid data corresponding to each target entity with the power grid data knowledge graph framework to generate a target power grid data knowledge graph, thereby realizing rapid acquisition of target power grid data from massive power grid data and achieving the technical effect of improving the efficiency of acquiring target power grid data.
[0076] Embodiment 3
[0077] Figure 3 It is a schematic diagram of a module of a device for constructing a knowledge graph based on power grid data provided in Example 3 of the present invention. The present invention provides a device for constructing a knowledge graph based on power grid data, and the device includes: a target demand receiving module 310, a power grid data knowledge graph framework construction module 320, a target power grid data acquisition module 330 and a target power grid data knowledge graph generation module 340.
[0078] The target demand receiving module 310 is used to receive the target demand input by the user for constructing the power grid data knowledge graph;
[0079] A power grid data knowledge graph framework construction module 320 is used to parse the target demand, determine each target entity and the target relationship between the target entities included in the target demand, and construct a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities;
[0080] The target power grid data acquisition module 330 is used to acquire the target power grid data corresponding to each target entity according to each target entity;
[0081] The target power grid data knowledge graph generation module 340 is used to fuse the target power grid data corresponding to each target entity with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0082] The technical solution of this embodiment receives the target demand input by the user for constructing the power grid data knowledge graph through the target demand receiving module. The target demand is parsed through the power grid data knowledge graph framework construction module to determine each target entity and the target relationship between the target entities contained in the target demand, and the power grid data knowledge graph framework is constructed based on each target entity and the target relationship between the target entities. The target power grid data acquisition module obtains the target power grid data corresponding to each target entity according to each target entity. The target power grid data knowledge graph generation module fuses the target power grid data corresponding to each target entity with the power grid data knowledge graph framework to generate the target power grid data knowledge graph. The technical solution of the embodiment of the present invention solves the technical problem in the prior art that it is difficult to obtain the target power grid data when obtaining the target power grid data from the massive power grid data, realizes the rapid acquisition of the target power grid data from the massive power grid data, and achieves the technical effect of improving the efficiency of obtaining the target power grid data.
[0083] Optionally, the power grid data knowledge graph framework construction module 320 is used to treat each target entity as an independent node, and treat the target relationship between the target entities as the connection relationship between the corresponding independent nodes; and construct the power grid data knowledge graph framework based on the independent nodes and the connection relationship between the independent nodes.
[0084] Optionally, before obtaining the target power grid data corresponding to each target entity, the device also includes: an original power grid data storage module, used to store each original power grid data in a data cluster corresponding to the data type of the original power grid data; accordingly, a target power grid data acquisition module 330, used to obtain the original power grid data corresponding to each target entity from the data cluster as the target power grid data of each target entity.
[0085] Optionally, after acquiring the target power grid data corresponding to each target entity, the device further includes a target power grid data storage module for storing the target power grid data in a temporary database.
[0086] Optionally, the target power grid data storage module includes: a first type target power grid data storage unit, used to determine the data type of the target power grid data; if the data type of the target power grid data is a structured data type, then storing the target power grid data of the structured data type in a preset two-dimensional data table in the temporary database.
[0087] Optionally, the target power grid data storage module includes: a second type target power grid data storage unit, which is used to store the target power grid data of the unstructured data type in the form of a file in the file system of the temporary database if the data type of the target power grid data is an unstructured data type, and store the link or path to the file corresponding to the target power grid data of the unstructured data type in the preset two-dimensional data table.
[0088] Optionally, generating the target power grid data knowledge graph includes: generating a target power grid data knowledge graph in a tree or mesh style.
[0089] The above-mentioned device can execute the method for constructing a knowledge graph based on power grid data provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method for constructing a knowledge graph based on power grid data.
[0090] It is worth noting that the various units and modules included in the above-mentioned knowledge graph construction device based on power grid data are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0091] Embodiment 4
[0092] Figure 4 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary electronic device 12 suitable for implementing any of the embodiments of the present invention is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The device 12 is typically an electronic device that is responsible for processing configuration information.
[0093] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting the various components (including the memory 28 and the processing unit 16).
[0094] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0095] The electronic device 12 typically includes a variety of computer readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0096] The memory 28 may include computer device readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 Not shown, usually referred to as a "hard drive"). Although not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) can be provided. In these cases, each drive can be connected to the bus 18 via one or more data medium interfaces. The memory 28 can include at least one program product 40, which has a set of program modules 42, which are configured to perform the functions of various embodiments of the present invention. The program product 40 can be stored in, for example, the memory 28, and such program modules 42 include but are not limited to one or more application programs, other program modules and program data, each of which or some combination of these examples may include the implementation of a network environment. The program module 42 generally performs the functions and / or methods in the embodiments described in the present invention.
[0097] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) devices, tape drives, and data backup storage devices.
[0098] The processing unit 16 executes various functional applications and data processing by running the program stored in the memory 28, for example, implementing the method for constructing a knowledge graph based on power grid data provided in the above embodiment of the present invention, the method comprising:
[0099] Receive target requirements input by users for building a knowledge graph of power grid data;
[0100] Parsing the target demand, determining each target entity and the target relationship between the target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities;
[0101] According to each target entity, obtaining target power grid data corresponding to each target entity;
[0102] The target power grid data corresponding to each target entity is fused with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0103] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the method for constructing a knowledge graph based on power grid data provided in any embodiment of the present invention.
[0104] Embodiment 5
[0105] Embodiment 5 of the present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, for example, the method for constructing a knowledge graph based on power grid data provided in the above embodiment of the present invention includes:
[0106] Receive target requirements input by users for building a knowledge graph of power grid data;
[0107] Parsing the target demand, determining each target entity and the target relationship between the target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities;
[0108] According to each target entity, obtaining target power grid data corresponding to each target entity;
[0109] The target power grid data corresponding to each target entity is fused with the power grid data knowledge graph framework to generate a target power grid data knowledge graph.
[0110] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0111] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0112] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0113] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for constructing a knowledge graph based on power grid data, characterized in that: include: Receive target requirements input by users for building a knowledge graph of power grid data; Parsing the target demand, determining each target entity and the target relationship between the target entities included in the target demand, and constructing a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities; According to each target entity, obtaining target power grid data corresponding to each target entity; The target power grid data corresponding to each target entity is integrated with the power grid data knowledge graph framework to generate a target power grid data knowledge graph; The step of parsing the target requirement to determine each target entity and the target relationship between target entities contained in the target requirement includes: A word segmenter of a semantic search engine is preconfigured, and the target demand is parsed based on the word segmenter to determine each target entity included in the target demand and a target relationship between target entities; Before acquiring the target power grid data corresponding to each target entity, the method further includes: storing each piece of raw power grid data into a data cluster corresponding to the data type of the raw power grid data; The acquiring target power grid data corresponding to each target entity includes: Acquire original power grid data corresponding to each target entity from the data cluster as target power grid data of each target entity; After acquiring the target power grid data corresponding to each target entity, the method further includes: Determine the data type of the target power grid data; If the data type of the target power grid data is a structured data type, storing the target power grid data of the structured data type in a preset two-dimensional data table in a preset temporary database; If the data type of the target power grid data is an unstructured data type, the target power grid data of the unstructured data type is stored in the file system of the temporary database in the form of a file, and a link or path to the file corresponding to the target power grid data of the unstructured data type is stored in the preset two-dimensional data table.
2. The method according to claim 1, characterized in that The power grid data knowledge graph framework is constructed based on each target entity and the target relationship between target entities, including: Each target entity is respectively regarded as an independent node, and the target relationship between the target entities is regarded as the connection relationship symbol between the corresponding independent nodes; A power grid data knowledge graph framework is constructed based on the independent nodes and the connection relationship symbols between the independent nodes.
3. The method according to claim 1, characterized in that The generating of the target power grid data knowledge graph includes: Generate a tree-like or mesh-like knowledge graph of the target power grid data.
4. A device for constructing a knowledge graph based on power grid data, characterized in that: include: A target demand receiving module, used to receive target demands input by a user for constructing a power grid data knowledge graph; A power grid data knowledge graph framework construction module is used to parse the target demand, determine each target entity and the target relationship between the target entities contained in the target demand, and construct a power grid data knowledge graph framework based on each target entity and the target relationship between the target entities; A target power grid data acquisition module is used to acquire target power grid data corresponding to each target entity according to each target entity; A target power grid data knowledge graph generation module is used to fuse the target power grid data corresponding to each target entity with the power grid data knowledge graph framework to generate a target power grid data knowledge graph; The step of parsing the target requirement to determine each target entity and the target relationship between target entities contained in the target requirement includes: A word segmenter of a semantic search engine is preconfigured, and the target demand is parsed based on the word segmenter to determine each target entity included in the target demand and a target relationship between target entities; Before acquiring the target power grid data corresponding to each target entity, the device further includes: An original power grid data storage module, used for storing each original power grid data into a data cluster corresponding to the data type of the original power grid data; Correspondingly, the target power grid data acquisition module is used to acquire the original power grid data corresponding to each target entity from the data cluster as the target power grid data of each target entity; After acquiring the target power grid data corresponding to each target entity, the device further includes: A target power grid data storage module is used to determine the data type of the target power grid data; if the data type of the target power grid data is a structured data type, the target power grid data of the structured data type is stored in a preset two-dimensional data table in a preset temporary database; if the data type of the target power grid data is an unstructured data type, the target power grid data of the unstructured data type is stored in the form of a file in the file system of the temporary database, and a link or path to the file corresponding to the target power grid data of the unstructured data type is stored in the preset two-dimensional data table.
5. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the program is executed by the processor, the processor implements the method for constructing a knowledge graph based on power grid data as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the method for constructing a knowledge graph based on power grid data as described in any one of claims 1-3.
