Method, device, equipment and readable storage medium for generating rice knowledge graph
By generating a rice knowledge map, the problem of inconsistent data forms of the existing rice gene database is solved, and the standardized integration of data and the improvement of research efficiency is achieved.
Patent Information
- Application Number
- CN202210441977.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing rice gene database data form is not unified, and there is a problem of multiple meanings of one word or multiple meanings, which leads to incomplete acquisition of genetic information by researchers.
By obtaining multiple rice gene data and trait data, data annotation and merging are used for field public ontology and top-level link ontology to generate rice knowledge maps.
The standardized integration of rice gene and trait data has been achieved, which improves the availability and research efficiency of data, and helps researchers better understand the relationship between genes and traits.
Smart Images

Figure CN114741534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data technology, and in particular to a method, device, equipment and readable storage medium for generating a rice knowledge graph. Background Art
[0002] Rice is a food crop that more than half of the world's population depends on for survival. It is of vital importance to human life and food security. The construction of a rice gene-trait database is the premise and basis for improving rice quality and increasing rice yield. At the same time, since rice is a model organism of gramineous crops and has synteny in gene arrangement with gramineous crops such as wheat and corn, the construction of a rice gene-trait database will also promote the research and application development of other important crops such as corn and wheat. However, the rice gene databases that have been successfully constructed are complicated, and the data forms presented are different. There are also phenomena of polysemy or polysemy of one meaning. The accumulated data has the characteristics of multi-source heterogeneity, and also presents structured, semi-structured, and unstructured phenomena. For researchers, there are many problems such as incomplete acquisition of gene information. Therefore, the automatic generation of rice gene-trait agricultural biological knowledge graph as a key technology for the integration of standardized data sources has become an important research topic in the field of bioinformatics. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device, equipment and readable storage medium for generating a rice knowledge graph to improve the above-mentioned problems.
[0004] In order to achieve the above objectives, the present application provides the following technical solutions:
[0005] On the one hand, an embodiment of the present application provides a method for generating a rice knowledge graph, the method comprising:
[0006] Acquire first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are acquired from a data source, each data source includes at least one structured data table, and each structured data table includes at least one of the rice gene data or the rice trait data;
[0007] Based on the first data, a domain public ontology related to the rice gene data and the rice trait data is obtained, and a top-level link ontology corresponding to the rice gene data and the rice trait data is constructed;
[0008] Using the top-level link ontology, annotating the structured data table to generate a first knowledge graph including rice gene data and rice trait data;
[0009] The domain public ontology is merged with the first knowledge graph using a domain public ontology linking algorithm to generate the rice knowledge graph.
[0010] Optionally, obtaining a domain public ontology related to the rice gene data and the rice trait data based on the first data, and constructing a top-level link ontology corresponding to the rice gene data and the rice trait data, comprises:
[0011] Based on the rice gene data and the rice trait data, obtaining domain public ontologies related to the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology;
[0012] For each of the data sources, use an ontology design tool to design a top-level ontology of the data source, wherein the top-level ontology includes classes or data attributes designed specifically for linking with the domain public ontology;
[0013] All of the top-level ontologies are merged to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
[0014] Optionally, the structured data table is annotated using the top-level link ontology to generate a first knowledge graph containing rice gene data and rice trait data, including:
[0015] Using data semantic annotation software, using the top-level link ontology as a public semantic model, annotating each of the structured data tables, and generating an RDF file corresponding to each of the structured data tables;
[0016] Using an entity linking algorithm, all of the RDF files are merged into one RDF file, and the merged RDF file is used as the first knowledge graph.
[0017] Optionally, using an entity linking algorithm, all of the RDF files are merged into one RDF file, and the merged RDF file is used as the first knowledge graph, including:
[0018] Collecting all the RDF files to obtain an RDF file collection;
[0019] Generate an empty directed graph;
[0020] Each edge of the knowledge graph corresponding to each RDF file in the RDF file set is traversed in turn, and the nodes at both ends of each edge and the edge are added to the directed graph, wherein when adding the nodes, semantics is used to determine whether there are nodes with the same meaning in the directed graph, and if so, the data attributes of the nodes with the same meaning are merged, and if not, the nodes are added to the directed graph; when adding the edges, semantics is used to determine whether the directed graph contains edges with the same meaning, and if so, there is no need to add them to the directed graph, and if not, the edges are added to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
[0021] Optionally, using a domain public ontology linking algorithm to merge the domain public ontology with the first knowledge graph to generate the rice knowledge graph includes:
[0022] Generate a copy of the first knowledge graph;
[0023] Each edge of each public ontology in the domain public ontology is traversed in turn, and the nodes at both ends of each edge and the edge are added to the copy, wherein when adding the node, semantics is used to determine whether there are nodes with the same meaning in the copy, if so, the data attributes of the nodes with the same meaning are merged, and if not, the node is added to the copy; when adding the edge, semantics is used to determine whether the copy contains edges with the same meaning, if so, there is no need to add them to the copy, and if not, the edge is added to the copy; the copy finally obtained after traversing is the rice knowledge graph.
[0024] Optionally, after generating the rice knowledge graph, the method further includes:
[0025] Storing the rice knowledge graph in JSON file format;
[0026] Use the graph visualization toolkit to convert the JSON file to GXEF or CSV format files;
[0027] Use graph visualization software to open the GEXF or CSV format file, and use a visualization layout algorithm to arrange the generated graphs in order to achieve a visual display of the rice knowledge graph.
[0028] In a second aspect, an embodiment of the present application provides a device for generating a rice knowledge graph, the device comprising an acquisition module, a construction module, a labeling module and a merging module.
[0029] an acquisition module, configured to acquire first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are acquired from a data source, each of which includes at least one structured data table, and each of which includes at least one of the rice gene data or the rice trait data;
[0030] A construction module, used for obtaining a domain public ontology related to the rice gene data and the rice trait data based on the first data, and constructing a top-level link ontology corresponding to the rice gene data and the rice trait data;
[0031] A labeling module, used to use the top-level link ontology to label the structured data table and generate a first knowledge graph including rice gene data and rice trait data;
[0032] A merging module is used to merge the domain public ontology with the first knowledge graph using a domain public ontology linking algorithm to generate the rice knowledge graph.
[0033] Optional, building blocks, including:
[0034] an acquisition unit, for acquiring domain public ontologies related to the rice gene data and the rice trait data based on the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology;
[0035] A design unit, for designing a top-level ontology of each data source using an ontology design tool, wherein the top-level ontology includes classes or data attributes designed specifically for linking with a common ontology in the domain;
[0036] The first merging unit is used to merge all the top-level ontologies to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
[0037] Optional, annotation modules, including:
[0038] A labeling unit, used to use data semantic labeling software, use the top-level link ontology as a public semantic model, perform data labeling on each of the structured data tables, and generate an RDF file corresponding to each of the structured data tables;
[0039] The second merging unit is used to merge all the RDF files into one RDF file by using an entity linking algorithm, and use the merged RDF file as the first knowledge graph.
[0040] Optionally, the second merging unit includes:
[0041] A collection subunit, used for collecting all the RDF files to obtain an RDF file collection;
[0042] A generating subunit, used to generate an empty directed graph;
[0043] A traversal subunit is used to traverse each edge of the knowledge graph corresponding to each RDF file in the RDF file set in turn, and add the nodes at both ends of each edge and the edge to the directed graph, wherein when adding the nodes, semantics is used to determine whether there are nodes with the same meaning in the directed graph, if so, the data attributes of the nodes with the same meaning are merged, and if not, the nodes are added to the directed graph; when adding the edges, semantics is used to determine whether the directed graph contains edges with the same meaning, if so, there is no need to add them to the directed graph, and if not, the edges are added to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
[0044] Optionally, merge modules including:
[0045] A generating unit, configured to generate a copy of the first knowledge graph;
[0046] A traversal unit is used to traverse each edge of each public ontology in the domain public ontology in turn, and add the nodes at both ends of each edge and the edge to the copy, wherein when adding the node, it is determined by semantics whether there are nodes with the same meaning in the copy, if so, the data attributes of the nodes with the same meaning are merged, and if not, the node is added to the copy; when adding the edge, it is determined by semantics whether the copy contains edges with the same meaning, if so, there is no need to add them to the copy, and if not, the edge is added to the copy; the copy finally obtained after traversal is the rice knowledge graph.
[0047] Optionally, the device further includes:
[0048] A storage module, used for storing the rice knowledge graph in JSON file format;
[0049] The conversion module is used to convert JSON files into GXEF or CSV format files using the graph visualization toolkit;
[0050] An arrangement module is used to use graph visualization software to open the GEXF or CSV format file, and use a visualization layout algorithm to arrange the generated graphs in order to achieve a visual display of the rice knowledge graph.
[0051] In a third aspect, an embodiment of the present application provides a device for generating a rice knowledge graph, the device comprising a memory and a processor. The memory is used to store a computer program; the processor is used to implement the steps of the method for generating the rice knowledge graph when executing the computer program.
[0052] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating the above-mentioned rice knowledge graph are implemented.
[0053] The beneficial effects of the present invention are:
[0054] 1. The present invention makes full use of the existing data sources and domain public ontologies, automatically generates a rice knowledge graph, and realizes the integration of data sources. At the same time, the present invention integrates the knowledge graph with the domain public ontology, introduces the standardized controlled vocabulary and entity relationships of the domain public ontology into the knowledge graph, and is conducive to the mining of implicit information in the knowledge graph.
[0055] 2. In the present invention, the introduction of domain public ontology can make full use of controlled vocabulary, standardize domain vocabulary, eliminate the problem of semantic inconsistency in research, and facilitate communication among researchers.
[0056] 3. In the present invention, the knowledge graph is visualized to form a biological network of the knowledge graph based on rice gene data and trait data, thereby more intuitively reflecting the interaction relationship between genes, proteins or traits.
[0057] 4. The knowledge graph constructed by the present invention can achieve the sharing of comprehensive rice information resources, realize rapid response and reasoning of knowledge, greatly save cross-platform retrieval time of scientific researchers, and improve efficiency.
[0058] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0060] Figure 1is a schematic flow chart of a method for generating a rice knowledge graph according to an embodiment of the present invention;
[0061] Figure 2 is a schematic diagram of the structure of a device for generating a rice knowledge graph according to an embodiment of the present invention;
[0062] Figure 3 It is a schematic diagram of the structure of the device for generating the rice knowledge graph described in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0064] It should be noted that similar reference numerals or letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0065] Example 1
[0066] like Figure 1 As shown, this embodiment provides a method for generating a rice knowledge graph, which includes step S1, step S2, step S3 and step S4.
[0067] Step S1, obtaining first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are obtained from a data source, each data source includes at least one structured data table, and each structured data table includes at least one piece of the rice gene data or the rice trait data;
[0068] Step S2, obtaining domain public ontologies related to the rice gene data and the rice trait data based on the first data, and constructing top-level link ontologies corresponding to the rice gene data and the rice trait data;
[0069] Step S3: using the top-level link ontology to annotate the structured data table, and generate a first knowledge graph including rice gene data and rice trait data;
[0070] Step S4: Use a domain public ontology linking algorithm to merge the domain public ontology with the first knowledge graph to generate the rice knowledge graph.
[0071] In this embodiment, the data source in step S1 includes the following data sources:
[0072] Oryzabase, The Rice Annotation Project (RAP), FunRiceGenes, Gramene, TheUniversal Protein Resource (UniProt), Rice Expression Database (RED), MSU Rice Genome Annotation Project (RGAP), Predicted Rice Interactome Network (PRIN), TAS (Trait Associated Site) and Rice Gene Index (RGI). Rice gene data and rice trait data are obtained from these data sources;
[0073] After step S1, filtering conditions can be formulated according to user needs to filter useless data. After filtering, invalid values and missing values can be processed to ensure data consistency.
[0074] The top-level link ontology in step S2 is the common top-level ontology of all data sources, and the knowledge graph generated by using the link ontology has the ability to link with the domain public ontology; the domain public ontology linking algorithm in step S4 should be able to identify nodes in the first knowledge graph that have the same meaning as the domain public ontology and link them;
[0075] This embodiment gives full play to the role of existing data sources and domain public ontologies, automatically generates a rice knowledge graph, realizes the integration of data sources, and also solves the problems of data collection, labeling, entity merging and visualization corresponding to the generation of the rice knowledge graph; at the same time, this embodiment integrates the knowledge graph with the domain public ontology, introduces the standardized controlled vocabulary and entity relationships of the domain public ontology into the knowledge graph, which is conducive to the mining of implicit information in the knowledge graph.
[0076] In a specific implementation of the present disclosure, the step S2 may further include step S21, step S22 and step S23.
[0077] Step S21, based on the rice gene data and the rice trait data, obtaining domain public ontologies related to the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology;
[0078] Step S22: for each of the data sources, use an ontology design tool to design a top-level ontology of the data source, wherein the top-level ontology includes classes or data attributes designed specifically for linking with the domain public ontology;
[0079] Step S23: merge all the top-level ontologies to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
[0080] In this embodiment, the domain public ontologies in step S21 are directly input by the user, and the domain public ontologies are Gene Ontology (GO), Plant Ontology (PO) and Trait Ontology (TO);
[0081] In this embodiment, both step S22 and step S23 are implemented manually, wherein the ontology design tool used is Protégé; the top-level link ontology obtained by step S23 should meet the following requirements:
[0082] a. Accurately represent the corresponding columns in the data source. Each column of the data source can and can only correspond to one data attribute in the top-level link ontology, and synonymous classes or data attributes in the top-level link ontology do not appear repeatedly;
[0083] b. Standardize the classes or data attributes of the top-level link ontology, and use industry-standardized standard terms as the names of the classes or data attributes to avoid ambiguity in the communication process among researchers;
[0084] c. The top-level link ontology must contain classes or data attributes that can be linked to the domain public ontology and have the ability to link to the domain public ontology;
[0085] d. The top-level link ontology can fully represent the relationship between various data attributes, and can be used as a public semantic model to automatically generate a correct knowledge graph.
[0086] In a specific implementation of the present disclosure, the step S3 may further include step S31 and step S32.
[0087] Step S31: using data semantic annotation software, using the top-level link ontology as a public semantic model, annotating each structured data table, and generating an RDF file corresponding to each structured data table;
[0088] Step S32: Use the entity linking algorithm to merge all the RDF files into one RDF file, and use the merged RDF file as the first knowledge graph.
[0089] In this embodiment, the data semantic annotation software used is the open source software Karma; the entity linking algorithm used should be able to identify the same nodes and merge them, and can reasonably handle different information corresponding to repeated data attributes.
[0090] In a specific implementation of the present disclosure, the step S32 may further include step S321, step S322 and step S323.
[0091] Step S321, collect all the RDF files to obtain an RDF file collection;
[0092] Step S322, generating an empty directed graph;
[0093] Step S323, traverse each edge of the knowledge graph corresponding to each RDF file in the RDF file set in turn, and add the nodes at both ends of each edge and the edge to the directed graph, wherein, when adding the nodes, determine whether there are nodes with the same meaning in the directed graph through semantics, if so, merge the data attributes of the nodes with the same meaning, if not, add the nodes to the directed graph; when adding the edges, determine whether the directed graph contains edges with the same meaning through semantics, if so, there is no need to add them to the directed graph, if not, add the edges to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
[0094] In a specific implementation of the present disclosure, the step S4 may further include step S41 and step S42.
[0095] Step S41, generating a copy of the first knowledge graph;
[0096] Step S42, traverse each edge of each public ontology in the domain public ontology in turn, and add the nodes at both ends of each edge and the edge to the copy, wherein, when adding the node, determine whether there are nodes with the same meaning in the copy by semantics, if so, merge the data attributes of the nodes with the same meaning, if not, add the node to the copy; when adding the edge, determine whether the copy contains edges with the same meaning by semantics, if so, do not need to add them to the copy, if not, add the edges to the copy; the copy finally obtained after traversing is the rice knowledge graph.
[0097] In a specific implementation of the present disclosure, after step S4, step S5, step S6 and step S7 may also be included.
[0098] Step S5, storing the rice knowledge graph in JSON file format;
[0099] Step S6: Use a graph visualization toolkit to convert the JSON file into a GXEF or CSV format file;
[0100] Step S7: Use graph visualization software to open the GEXF or CSV format file, and use a visualization layout algorithm to arrange the generated graphs in order to achieve a visual display of the rice knowledge graph.
[0101] In this embodiment, the graph visualization toolkit is gexf4j; the graph visualization software is Gephi; after the rice knowledge graph is automatically generated, a biological network can be generated using visualization methods to more intuitively reflect the interaction between the genes, proteins or traits under study. A graph link prediction algorithm can also be used to mine implicit information on the knowledge graph, giving full play to the role of the rice gene-trait knowledge graph.
[0102] Example 2
[0103] like Figure 2 As shown, this embodiment provides a device for generating a rice knowledge graph, which includes an acquisition module 701, a construction module 702, a labeling module 703 and a merging module 704.
[0104] The acquisition module 701 is used to acquire first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are acquired from a data source, each of which includes at least one structured data table, and each of which includes at least one of the rice gene data or the rice trait data;
[0105] A construction module 702 is used to obtain a domain public ontology related to the rice gene data and the rice trait data based on the first data, and to construct a top-level link ontology corresponding to the rice gene data and the rice trait data;
[0106] The annotation module 703 is used to use the top-level link ontology to perform data annotation on the structured data table to generate a first knowledge graph including rice gene data and rice trait data;
[0107] The merging module 704 is used to merge the domain public ontology with the first knowledge graph using a domain public ontology linking algorithm to generate the rice knowledge graph.
[0108] This embodiment gives full play to the role of existing data sources and domain public ontologies, automatically generates a rice knowledge graph, realizes the integration of data sources, and also solves the problems of data collection, labeling, entity merging and visualization corresponding to the generation of the rice knowledge graph; at the same time, this embodiment integrates the knowledge graph with the domain public ontology, introduces the standardized controlled vocabulary and entity relationships of the domain public ontology into the knowledge graph, which is conducive to the mining of implicit information in the knowledge graph.
[0109] In a specific implementation of the present disclosure, the construction module 702 further includes an acquisition unit 7021 , a design unit 7022 and a first merging unit 7023 .
[0110] An acquisition unit 7021 is used to acquire domain public ontologies related to the rice gene data and the rice trait data based on the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology;
[0111] A design unit 7022, for designing a top-level ontology of each data source using an ontology design tool, wherein the top-level ontology includes classes or data attributes designed specifically for linking with the domain public ontology;
[0112] The first merging unit 7023 is used to merge all the top-level ontologies to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
[0113] In a specific implementation of the present disclosure, the labeling module 703 further includes a labeling unit 7031 and a second merging unit 7032 .
[0114] The annotation unit 7031 is used to use the data semantic annotation software, use the top-level link ontology as a public semantic model, perform data annotation on each of the structured data tables, and generate an RDF file corresponding to each of the structured data tables;
[0115] The second merging unit 7032 is used to merge all the RDF files into one RDF file by using an entity linking algorithm, and use the merged RDF file as the first knowledge graph.
[0116] In a specific implementation of the present disclosure, the second merging unit 7032 further includes a collection subunit 70321 , a generation subunit 70322 and a traversal subunit 70323 .
[0117] The collection subunit 70321 is used to collect all the RDF files to obtain an RDF file collection;
[0118] A generating subunit 70322, for generating an empty directed graph;
[0119] The traversal subunit 70323 is used to traverse each edge of the knowledge graph corresponding to each RDF file in the RDF file set in turn, and add the nodes at both ends of each edge and the edge to the directed graph, wherein when adding the nodes, it is determined by semantics whether there are nodes with the same meaning in the directed graph, if so, the data attributes of the nodes with the same meaning are merged, and if not, the nodes are added to the directed graph; when adding the edges, it is determined by semantics whether the directed graph contains edges with the same meaning, if so, there is no need to add them to the directed graph, and if not, the edges are added to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
[0120] In a specific implementation of the present disclosure, the merging module 704 further includes a generating unit 7041 and a traversing unit 7042 .
[0121] A generating unit 7041, used to generate a copy of the first knowledge graph;
[0122] The traversal unit 7042 is used to traverse each edge of each public ontology in the domain public ontology in turn, and add the nodes at both ends of each edge and the edge to the copy, wherein when adding the node, it is determined by semantics whether there are nodes with the same meaning in the copy, if so, the data attributes of the nodes with the same meaning are merged, and if not, the node is added to the copy; when adding the edge, it is determined by semantics whether the copy contains edges with the same meaning, if so, there is no need to add them to the copy, and if not, the edge is added to the copy; the copy finally obtained after traversal is the rice knowledge graph.
[0123] In a specific implementation of the present disclosure, the device further includes a storage module 705 , a conversion module 706 and an arrangement module 707 .
[0124] A storage module 705 is used to store the rice knowledge graph in a JSON file format;
[0125] A conversion module 706 is used to convert the JSON file into a GXEF or CSV format file using a graph visualization toolkit;
[0126] The arrangement module 707 is used to use graph visualization software to open the GEXF or CSV format file, and use a visualization layout algorithm to arrange the generated graphs in order to achieve a visual display of the rice knowledge graph.
[0127] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0128] Example 3
[0129] Corresponding to the above method embodiment, the embodiment of the present disclosure also provides a device for generating a rice knowledge graph. The device for generating a rice knowledge graph described below and the method for generating a rice knowledge graph described above can be referenced to each other.
[0130] Figure 3 FIG. 8 is a block diagram of a device 800 for generating a rice knowledge graph according to an exemplary embodiment. Figure 3 As shown, the rice knowledge graph generation device 800 may include: a processor 801, a memory 802. The rice knowledge graph generation device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.
[0131] The processor 801 is used to control the overall operation of the rice knowledge graph generation device 800 to complete all or part of the steps in the above-mentioned rice knowledge graph generation method. The memory 802 is used to store various types of data to support the operation of the rice knowledge graph generation device 800, which may include instructions for any application or method operating on the rice knowledge graph generation device 800, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the rice knowledge graph generation device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0132] In an exemplary embodiment, the rice knowledge graph generation device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned rice knowledge graph generation method.
[0133] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned method for generating a rice knowledge graph are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the rice knowledge graph generation device 800 to complete the above-mentioned method for generating a rice knowledge graph.
[0134] Example 4
[0135] Corresponding to the above method embodiment, the embodiment of the present disclosure also provides a readable storage medium. The readable storage medium described below and the method for generating the rice knowledge graph described above can be referenced to each other.
[0136] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for generating a rice knowledge graph of the above method embodiment.
[0137] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating a rice knowledge graph, characterized in that: include: Acquire first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are acquired from a data source, each data source includes at least one structured data table, and each structured data table includes at least one of the rice gene data or the rice trait data; Based on the first data, a domain public ontology related to the rice gene data and the rice trait data is obtained, and a top-level link ontology corresponding to the rice gene data and the rice trait data is constructed; Using the top-level link ontology, annotating the structured data table to generate a first knowledge graph including rice gene data and rice trait data; The domain public ontology is merged with the first knowledge graph using a domain public ontology linking algorithm to generate the rice knowledge graph.
2. The method for generating a rice knowledge graph according to claim 1, characterized in that: Based on the first data, a domain public ontology related to the rice gene data and the rice trait data is obtained, and a top-level link ontology corresponding to the rice gene data and the rice trait data is constructed, including: Based on the rice gene data and the rice trait data, obtaining domain public ontologies related to the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology; For each of the data sources, use an ontology design tool to design a top-level ontology of the data source, wherein the top-level ontology includes classes or data attributes designed specifically for linking with the domain public ontology; All of the top-level ontologies are merged to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
3. The method for generating a rice knowledge graph according to claim 1, characterized in that: Using the top-level link ontology, the structured data table is annotated to generate a first knowledge graph containing rice gene data and rice trait data, including: Using data semantic annotation software, using the top-level link ontology as a public semantic model, annotating each of the structured data tables, and generating an RDF file corresponding to each of the structured data tables; Using an entity linking algorithm, all of the RDF files are merged into one RDF file, and the merged RDF file is used as the first knowledge graph.
4. The method for generating a rice knowledge graph according to claim 1, characterized in that: Using an entity linking algorithm, all of the RDF files are merged into one RDF file, and the merged RDF file is used as the first knowledge graph, including: Collecting all the RDF files to obtain an RDF file collection; Generate an empty directed graph; Each edge of the knowledge graph corresponding to each RDF file in the RDF file set is traversed in turn, and the nodes at both ends of each edge and the edge are added to the directed graph, wherein when adding the nodes, semantics is used to determine whether there are nodes with the same meaning in the directed graph, and if so, the data attributes of the nodes with the same meaning are merged, and if not, the nodes are added to the directed graph; when adding the edges, semantics is used to determine whether the directed graph contains edges with the same meaning, and if so, there is no need to add them to the directed graph, and if not, the edges are added to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
5. A device for generating a rice knowledge graph, characterized in that: include: an acquisition module, configured to acquire first data, wherein the first data includes a plurality of rice gene data and a plurality of rice trait data, wherein the rice gene data and the rice trait data are acquired from a data source, each of which includes at least one structured data table, and each of which includes at least one of the rice gene data or the rice trait data; A construction module, used for obtaining a domain public ontology related to the rice gene data and the rice trait data based on the first data, and constructing a top-level link ontology corresponding to the rice gene data and the rice trait data; A labeling module, used to use the top-level link ontology to label the structured data table and generate a first knowledge graph including rice gene data and rice trait data; A merging module is used to merge the domain public ontology with the first knowledge graph using a domain public ontology linking algorithm to generate the rice knowledge graph.
6. The device for generating a rice knowledge graph according to claim 5, characterized in that: Building blocks, including: an acquisition unit, for acquiring domain public ontologies related to the rice gene data and the rice trait data based on the rice gene data and the rice trait data, wherein the domain public ontologies include gene ontology, plant ontology and trait ontology; A design unit, for designing a top-level ontology of each data source using an ontology design tool, wherein the top-level ontology includes classes or data attributes designed specifically for linking with a common ontology in the domain; The first merging unit is used to merge all the top-level ontologies to obtain a top-level linked ontology, wherein when merging, synonymous classes or data attributes are merged, and classes or data attributes with the same name but different meanings are separated.
7. The method for generating a rice knowledge graph according to claim 5, characterized in that: Annotation module, including: A labeling unit, used to use data semantic labeling software, use the top-level link ontology as a public semantic model, perform data labeling on each of the structured data tables, and generate an RDF file corresponding to each of the structured data tables; The second merging unit is used to merge all the RDF files into one RDF file by using an entity linking algorithm, and use the merged RDF file as the first knowledge graph.
8. The method for generating a rice knowledge graph according to claim 7, characterized in that: The second merging unit comprises: A collection subunit, used for collecting all the RDF files to obtain an RDF file collection; A generating subunit, used to generate an empty directed graph; A traversal subunit is used to traverse each edge of the knowledge graph corresponding to each RDF file in the RDF file set in turn, and add the nodes at both ends of each edge and the edge to the directed graph, wherein when adding the nodes, semantics is used to determine whether there are nodes with the same meaning in the directed graph, if so, the data attributes of the nodes with the same meaning are merged, and if not, the nodes are added to the directed graph; when adding the edges, semantics is used to determine whether the directed graph contains edges with the same meaning, if so, there is no need to add them to the directed graph, and if not, the edges are added to the directed graph; the directed graph finally obtained after traversal is the first knowledge graph.
9. A device for generating a rice knowledge graph, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for generating a rice knowledge graph as claimed in any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a rice knowledge graph as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Knowledge map-based Chinese tourism domain knowledge service platform construction method
CN110347843A
Ningxia rice knowledge graph construction method
CN111538847A