Knowledge discovery method and device based on large language model and knowledge graph, and medium
By constructing the knowledge graph of scientific and technological literature and analyzing the importance and classification confidence of knowledge entities, the problem of insufficient accuracy and robustness of new knowledge discovery methods in the existing technology in the industry-specific context is solved, and more accurate and Reliable new knowledge discovery.
Patent Information
- Application Number
- CN202411290917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
AI Technical Summary
The existing new knowledge discovery methods are insufficient in accuracy and robustness when dealing with industry-specific contexts and terms, and are prone to false positives and underreporting problems.
Using a method based on large language models and knowledge graphs, a knowledge graph of scientific and technological literature is constructed. By analyzing the semantic relationships and proximity relationships between knowledge entities, the importance of knowledge entities is determined, and the target knowledge entity is screened out using classification confidence.
It improves the accuracy and robustness of new knowledge discovery, ensures the impact of the integrity and importance of knowledge on the discovery of new knowledge, and enhances the consideration of the diversity and deep connections between knowledge entities.
Smart Images

Figure CN119226466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a knowledge discovery method, device and medium based on a large language model and a knowledge graph. Background Art
[0002] With the advancement of technology and changes in the market, new knowledge is constantly being generated in various industries, such as new knowledge concepts and new vocabulary phrases. Discovering new industry knowledge is a necessary means to keep up with industry trends and reflect the latest industry dynamics in a timely manner.
[0003] However, existing new knowledge discovery methods still need to be improved in terms of accuracy and robustness, especially when dealing with industry-specific contexts and terminology, which often lead to problems of false positives and false negatives. Summary of the invention
[0004] The present invention provides a knowledge discovery method, device and medium based on a large language model and a knowledge graph to improve the accuracy and robustness of new knowledge discovery.
[0005] According to one aspect of the present invention, a knowledge discovery method based on a large language model and a knowledge graph is provided, the method comprising:
[0006] Use the big language model to build a scientific and technological knowledge graph corresponding to scientific and technological literature; the scientific and technological knowledge graph includes the proximity relationship between knowledge entities;
[0007] According to the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity, the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined;
[0008] According to the importance and importance threshold of each knowledge entity in the scientific and technological literature, at least one candidate knowledge entity is selected from the scientific and technological knowledge graph;
[0009] According to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs, the classification confidence corresponding to the candidate knowledge entity is determined using a large language model;
[0010] According to the classification confidence corresponding to each candidate knowledge entity, a target knowledge entity is determined from at least one candidate knowledge entity.
[0011] According to another aspect of the present invention, a knowledge discovery device based on a large language model and a knowledge graph is provided, the device comprising:
[0012] A scientific and technological knowledge graph construction module is used to construct a scientific and technological knowledge graph corresponding to scientific and technological literature using a large language model; wherein the scientific and technological knowledge graph includes the proximity relationship between knowledge entities;
[0013] The importance determination module is used to determine the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature according to the number of semantic relationships and the number of adjacent relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity;
[0014] A candidate knowledge entity screening module is used to screen out at least one candidate knowledge entity from the scientific and technological knowledge graph according to the importance and importance threshold of each knowledge entity in the scientific and technological literature;
[0015] A classification confidence determination module is used to determine the classification confidence corresponding to the candidate knowledge entity using a large language model based on the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs;
[0016] The target knowledge entity determination module is used to determine the target knowledge entity from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the knowledge discovery method based on a large language model and a knowledge graph according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the knowledge discovery method based on a large language model and a knowledge graph according to any embodiment of the present invention when executed.
[0022] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the knowledge discovery method based on a large language model and a knowledge graph according to any embodiment of the present invention.
[0023] The technical solution of the embodiment of the present invention uses a large language model to construct a scientific knowledge graph corresponding to scientific and technological literature; wherein the scientific and technological knowledge graph includes proximity relationships between knowledge entities; the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined according to the number of semantic relationships and the number of proximity relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity; at least one candidate knowledge entity is screened out from the scientific and technological knowledge graph according to the importance of each knowledge entity in the scientific and technological literature and the importance threshold; the classification confidence corresponding to the candidate knowledge entity is determined by using a large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs; and the target knowledge entity is determined from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity. The above technical scheme can quickly and fully extract valuable knowledge from scientific and technological literature, ensuring the integrity of knowledge; it comprehensively considers the diversity and deep connections of the relationships between knowledge entities, and the impact of the importance of knowledge entities in scientific and technological literature on the discovery of new knowledge, and determines the target knowledge entity (i.e., new knowledge) according to the classification confidence corresponding to the candidate knowledge entity, so that the determined target knowledge entity is more accurate, thereby improving the accuracy and robustness of new knowledge discovery.
[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flowchart of a knowledge discovery method based on a large language model and a knowledge graph provided according to Embodiment 1 of the present invention;
[0027] Figure 2 is a flow chart of a knowledge discovery method based on a large language model and a knowledge graph provided according to Embodiment 2 of the present invention;
[0028] Figure 3 is a schematic diagram of the structure of a knowledge discovery device based on a large language model and a knowledge graph provided according to Embodiment 3 of the present invention;
[0029] Figure 4It is a structural diagram of an electronic device that implements the knowledge discovery method based on a large language model and a knowledge graph according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "target", "candidate", "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] In addition, it should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the scientific and technological literature, the first prompt word template, the second prompt word template, the third prompt word template and the fourth prompt word template, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0033] Embodiment 1
[0034] Figure 1 This is a flowchart of a knowledge discovery method based on a large language model and a knowledge graph provided in the first embodiment of the present invention. This embodiment can be applied to the case of discovering new industry knowledge in the field of science and technology, and is particularly applicable to the case of discovering new industry knowledge in the field of science, engineering and medicine. The method can be executed by a knowledge discovery device based on a large language model and a knowledge graph, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0035] S101. Use a large language model to construct a scientific knowledge graph corresponding to scientific literature; wherein the scientific knowledge graph includes proximity relationships between knowledge entities.
[0036] Among them, the large language model refers to a large language model with long text question-answering capabilities that has been pre-trained according to actual business needs. Scientific and technological literature refers to literature that reports original empirical and theoretical research in the field of science and technology; optionally, scientific and technological literature includes but is not limited to scientific and technological books, scientific and technological journals, patent documents, conference documents and scientific and technological reports. The scientific and technological knowledge graph includes knowledge entities in scientific and technological literature, semantic relationships between knowledge entities, and proximity relationships between knowledge entities. Among them, the proximity relationship refers to the relationship between knowledge entity i and knowledge entity j appearing in the same scientific and technological text block; wherein i and j are both positive integers, and i and j are not equal. Among them, the scientific and technological text block is the smallest unit of measurement of scientific and technological literature. It should be noted that the edges in the scientific and technological knowledge graph are undirected edges, and the edges in the scientific and technological knowledge graph include edges representing semantic relationships and edges representing proximity relationships.
[0037] Specifically, the scientific and technological literature can be processed through the knowledge graph construction unit in the large language model to obtain the scientific and technological knowledge graph corresponding to the scientific and technological literature.
[0038] Optionally, after constructing the scientific and technological knowledge graph, the Louvain algorithm can be used to calculate the community to which each node (i.e., knowledge entity) in the scientific and technological knowledge graph belongs, so that knowledge with similar attributes, relationships or functions can be processed uniformly in the future, thereby improving the efficiency of knowledge processing.
[0039] S102. Determine the importance of each knowledge entity in the scientific and technological knowledge graph in scientific and technological literature based on the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity.
[0040] Among them, a knowledge entity pair refers to an entity combination consisting of any two knowledge entities in the science and technology knowledge graph. The number of semantic relationships refers to the total number of edges used to represent semantic relationships between knowledge entity pairs in the science and technology knowledge graph. The number of neighboring relationships refers to the total number of edges used to represent neighboring relationships between knowledge entity pairs in the science and technology knowledge graph, and also refers to the number of co-occurrences of knowledge entity pairs in the same science and technology text block. An associated knowledge entity refers to a knowledge entity in the science and technology knowledge graph that has an edge with knowledge entity i; where i is a positive integer.
[0041] Specifically, the overall relationship weight value between each knowledge entity pair in the scientific and technological knowledge graph can be determined based on the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity pair in the scientific and technological knowledge graph, as well as the semantic relationship value, the neighboring relationship value, the first weight corresponding to the semantic relationship value, and the second weight corresponding to the neighboring relationship value; the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature can be determined based on the overall relationship weight value between each knowledge entity pair in the scientific and technological knowledge graph and the degree of associated knowledge entities corresponding to each knowledge entity.
[0042] Among them, the semantic relationship value is used to characterize the strength of the semantic relationship between the knowledge entity pairs; optionally, the semantic relationship value can be determined through a large number of experiments, or it can be pre-set according to the experience of those skilled in the art. For example, the semantic relationship value can be 1, and the embodiment of the present invention does not make specific limitations on it. The proximity relationship value is used to characterize the strength of the proximity relationship between the knowledge entity pairs; optionally, the proximity relationship value can be determined through a large number of experiments, or it can be pre-set according to the experience of those skilled in the art. For example, the proximity relationship value can be 0.5, and the embodiment of the present invention does not make specific limitations on it. It should be noted that the semantic relationship value is not equal to the proximity relationship value. Generally, the semantic relationship value is greater than the proximity relationship value.
[0043] More specifically, for the knowledge entities in the scientific and technological knowledge graph<i,j> , according to the knowledge entity<i,j> The corresponding semantic relationship number, semantic relationship value, and the first weight corresponding to the semantic relationship value are determined by the following formula:<i,j> The overall semantic relationship value between:
[0044] Θ=β 1 (λ ij ×θ);
[0045] Among them, Θ is the knowledge entity pair<i,j> The overall semantic relationship value between ij For knowledge entities<i,j> The corresponding number of semantic relations, θ is the semantic relationship value, β 1 is the first weight corresponding to the semantic relationship value.
[0046] At the same time, according to the knowledge entity<i,j> The corresponding number of neighboring relationships, the neighboring relationship value, and the second weight corresponding to the neighboring relationship value are determined by the following formula:<i,j> The overall proximity value between:
[0047]
[0048] Among them, Φ is the knowledge entity pair<i,j> The overall proximity value between ij For knowledge entities<i,j> The corresponding number of neighboring relationships, is the proximity relationship value, β 2 is the second weight corresponding to the proximity relationship value. It should be noted that the first weight is greater than the second weight.
[0049] Afterwards, the knowledge entity<i,j> The overall semantic relationship value Θ and the overall proximity relationship value Φ are summed to obtain the knowledge entity pair<i,j> The overall relationship weight between:
[0050] E ij =Θ+Φ;
[0051] Among them, E ij For knowledge entities<i,j> Based on the above, the knowledge entity pair<i,j> The principle of the overall relationship weight between entities can be used to determine the overall relationship weight between each pair of knowledge entities in the scientific and technological knowledge graph.
[0052] For example, assuming that the scientific and technological document includes scientific and technological text block A, scientific and technological text block B and scientific and technological text C, the expressions of knowledge entity a and knowledge entity b in scientific and technological text block A, scientific and technological text block B and scientific and technological text C are as follows:
[0053] Technology Text Block A{
[0054] entity_a:"DNA",
[0055] entity_b:"RNA",
[0056] relationship: "DNA is synthesized in the cell nucleus by DNA polymerase, while RNA is synthesized in ribosomes in the cytoplasm under the guidance of DNA. RNA participates in the synthesis of DNA in certain circumstances, such as during transcription."
[0057] }
[0058] Technology Text Block B{
[0059] entity_a:"DNA",
[0060] entity_b:"RNA",
[0061] relationship: "Information transmission DNA is the carrier of genetic information and stores the genetic information of organisms. RNA plays the role of information transmitter in the synthesis of DNA and protein. During transcription, the genetic information of DNA is copied to RNA, and then RNA is responsible for transmitting this information to the cytoplasm to guide protein synthesis."
[0062] }
[0063] Technology Text Block C{
[0064] entity_a:"DNA",
[0065] entity_b:"RNA"
[0066] }
[0067] It should be noted that entity_a represents knowledge entity a, entity_b represents knowledge entity b, and relationship represents the semantic relationship between knowledge entity a and knowledge entity b. Although entity_a and entity_b appear together in the science and technology text block C, the semantic relationship between the two knowledge entities is not expressed in the science and technology text block C.<a,b> The corresponding number of semantic relations λ ab =2, knowledge entity pair<a,b> The corresponding number of neighboring relations μ ab =3.
[0068] Then, for the knowledge entity r in the scientific and technological knowledge graph, determine the associated knowledge entity k corresponding to the knowledge entity r; where k = 1, ..., n; r and k are both positive integers, and n represents the total number of associated knowledge entities k corresponding to the knowledge entity r;<r,k> The overall relationship weight value between the two entities and the degree of the associated knowledge entity k corresponding to the knowledge entity r are used to determine the importance of the knowledge entity r in the scientific and technological literature in the scientific and technological knowledge graph through the following formula:
[0069]
[0070] Among them, V r is the importance of knowledge entity r in scientific and technological literature in the scientific and technological knowledge graph, E rk For knowledge entities<r,k> The overall relationship weight between k is the degree of the associated knowledge entity k corresponding to the knowledge entity r.
[0071] It can be understood that quantifying the strength of the semantic relationship between knowledge entity pairs by semantic relationship values and quantifying the strength of the neighboring relationship between knowledge entity pairs by neighboring relationship values better reflects the deep connection between knowledge entity pairs; by assigning a first weight to the semantic relationship value and a second weight to the neighboring relationship value, and then determining the overall relationship weight value between each knowledge entity pair in the science and technology knowledge graph based on the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity pair in the science and technology knowledge graph, as well as the semantic relationship value, the neighboring relationship value, the first weight corresponding to the semantic relationship value, and the second weight corresponding to the neighboring relationship value, the diversity and strength of the relationships between knowledge entities are comprehensively considered, making the determined overall relationship weight value between knowledge entity pairs more accurate.
[0072] S103. Filter out at least one candidate knowledge entity from the scientific and technological knowledge graph based on the importance of each knowledge entity in the scientific and technological literature and the importance threshold.
[0073] The importance threshold can be determined through a large number of experiments or preset according to the experience of those skilled in the art, and is not specifically limited in the embodiments of the present invention. A candidate knowledge entity refers to a knowledge entity that may be new knowledge in scientific and technological literature.
[0074] Specifically, for each knowledge entity in the scientific and technological knowledge graph, if the importance of the knowledge entity in the scientific and technological literature is greater than the importance threshold, the knowledge entity is determined as a candidate knowledge entity.
[0075] S104. Determine the classification confidence corresponding to the candidate knowledge entity using a large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs.
[0076] The classification confidence refers to the degree of certainty of the model's prediction result about the category to which the candidate knowledge entity belongs. The category to which the candidate knowledge entity belongs can be one of the new knowledge category, new concept category, new vocabulary category, new phrase category, and other categories.
[0077] Specifically, the scientific text segment to which the candidate knowledge entity belongs can be used as the question-answering context of the large language model, and the target prompt word can be determined based on the candidate knowledge entity and the preset prompt word template; the target prompt word is used as the input of the large language model, and the classification confidence corresponding to the candidate knowledge entity is calculated by the classification confidence calculation unit in the large language model. It should be noted that the entity classification principle is pre-configured in the classification confidence calculation unit in the large language model to determine the category to which the candidate knowledge entity belongs.
[0078] S105 . Determine a target knowledge entity from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity.
[0079] Among them, the target knowledge entity refers to the new knowledge in scientific and technological literature.
[0080] Specifically, according to the classification confidence corresponding to each candidate knowledge entity, at least one candidate knowledge entity whose classification confidence is greater than a confidence threshold can be determined as a target knowledge entity. The confidence threshold can be determined through a large number of experiments or can be pre-set based on the experience of those skilled in the art, and the embodiment of the present invention does not specifically limit it.
[0081] Optionally, after determining the target knowledge entity from at least one candidate knowledge entity based on the classification confidence corresponding to each candidate knowledge entity, the large language model outputs the text content, specific interpretation, specific category, classification confidence and classification reason of the target knowledge entity in JSON format, and stores it in a preset database to support subsequent queries.
[0082] The technical solution of the embodiment of the present invention uses a large language model to construct a scientific knowledge graph corresponding to scientific and technological literature; wherein the scientific and technological knowledge graph includes proximity relationships between knowledge entities; the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined according to the number of semantic relationships and the number of proximity relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity; at least one candidate knowledge entity is screened out from the scientific and technological knowledge graph according to the importance of each knowledge entity in the scientific and technological literature and the importance threshold; the classification confidence corresponding to the candidate knowledge entity is determined by using a large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs; and the target knowledge entity is determined from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity. The above technical scheme can quickly and fully extract valuable knowledge from scientific and technological literature, ensuring the integrity of knowledge; it comprehensively considers the diversity and deep connections of the relationships between knowledge entities, and the impact of the importance of knowledge entities in scientific and technological literature on the discovery of new knowledge, and determines the target knowledge entity (i.e., new knowledge) according to the classification confidence corresponding to the candidate knowledge entity, so that the determined target knowledge entity is more accurate, thereby improving the accuracy and robustness of new knowledge discovery.
[0083] Embodiment 2
[0084] Figure 2 This is a flowchart of a knowledge discovery method based on a large language model and a knowledge graph provided in Example 2 of the present invention. Based on the above example, this example further optimizes "using a large language model to construct a scientific knowledge graph corresponding to scientific literature" and provides an optional implementation plan. It should be noted that for the parts not described in detail in the examples of the present invention, please refer to the relevant descriptions of other examples. Figure 2 As shown, the method includes:
[0085] S201, performing text formatting and text segmentation on scientific and technological documents to obtain multiple scientific and technological text segments.
[0086] Specifically, for a scientific document, the text formatting process is performed on the scientific document through the text format conversion unit in the large language model to obtain scientific text data in the markdown file format; then, the scientific text data is segmented according to the maximum text processing length of the large language model to obtain multiple scientific text segments. It should be noted that scientific documents are generally in the PDF file format; the maximum text processing length refers to the number of characters that the large language model can process at one time, for example, the maximum text processing length can be 20,000 characters. It should also be noted that the maximum text processing length depends on the type of the large language model, and the maximum text processing length of different large language models is different.
[0087] S202, dividing the scientific and technological text segment into blocks to obtain a plurality of scientific and technological text blocks.
[0088] Specifically, for each scientific and technological text segment, a preset text segmentation method can be used to segment the scientific and technological text segment into text blocks, thereby obtaining multiple scientific and technological text blocks, and each scientific and technological text block is assigned a block identifier, such as a block ID. Among them, the preset text segmentation method can be pre-set according to actual business needs or the experience of technical personnel in this field. For example, the preset text segmentation method can be a recursive character text segmentation method, which is not specifically limited in the embodiments of the present invention. Similarly, each scientific and technological text segment can be segmented into individual scientific and technological text blocks.
[0089] S203: Determine a first prompt word according to the scientific text block and the first prompt word template.
[0090] The first prompt word template can be pre-set according to actual business needs. For example, the first prompt word template can be "Please help extract the knowledge entities in [block identifier] and the semantic relationships and proximity relationships between knowledge entities?", where [block identifier] is a placeholder for reserving a position for the block identifier. The first prompt word refers to a word used to specify the large language model to perform the task of extracting knowledge information.
[0091] Specifically, for each scientific text block in each scientific text segment, the block identifier of the scientific text block is used to replace the block identifier in the first prompt word template, for example, [block identifier], so as to obtain the first prompt word.
[0092] S204. Extracting knowledge information from the scientific and technological text block using a large language model according to the scientific and technological text block and the first prompt word; wherein the knowledge information includes knowledge entities and entity relationships between knowledge entities.
[0093] Among them, entity relations include semantic relations and proximity relations. Specifically, for each scientific text block in each scientific text segment, the scientific text block is used as the question-answering context of the large language model, the first prompt word is used as the input of the large language model, the knowledge entity is identified from the scientific text block through the entity recognition subunit in the knowledge graph construction unit in the large language model, and the entity relations between the knowledge entities are extracted from the scientific text block through the relationship extraction subunit in the knowledge graph construction unit in the large language model.
[0094] S205. Based on the extracted multiple knowledge entities, knowledge in the scientific and technological text segment is merged to obtain target knowledge information corresponding to the scientific and technological text segment.
[0095] The target knowledge information refers to the knowledge information obtained after knowledge merging in the scientific and technological text segment; optionally, the target knowledge information includes knowledge entities, and semantic relations and proximity relations between knowledge entities.
[0096] Specifically, the second prompt word can be determined based on the extracted multiple knowledge entities and the second prompt word template; based on the scientific text segment and the second prompt word, the entity interpretation of each knowledge entity can be extracted from the scientific text segment using a large language model; the entity interpretation of each knowledge entity is vectorized to obtain the embedding vector corresponding to each knowledge entity; based on the embedding vector corresponding to each knowledge entity, the knowledge entities are entity aligned to obtain the target knowledge information corresponding to the scientific text segment.
[0097] The second prompt word template can be pre-set according to actual business needs. For example, the second prompt word template can be "Please give the entity interpretations of [knowledge entity identifier 1], [knowledge entity identifier 2]... and [knowledge entity identifier n] respectively?" Wherein, [knowledge entity identifier 1], [knowledge entity identifier 2] and [knowledge entity identifier n] are all placeholders used to reserve positions for knowledge entity identifiers. The second prompt word refers to a word used to specify the large language model to perform the task of providing entity interpretation.
[0098] More specifically, for each scientific text segment, the extracted knowledge entities can be grouped according to the total number of knowledge entities extracted from the scientific text segment to obtain at least one knowledge entity group; for each knowledge entity group, the entity identifiers of each knowledge entity in the knowledge entity group are used to replace the knowledge entity identifiers in the second prompt word template, such as [knowledge entity identifier 1], [knowledge entity identifier 2]... and [knowledge entity identifier n], so as to obtain the second prompt word; the scientific text segment is used as the question and answer context of the large language model, and the second prompt word is used as the input of the large language model, and the entity interpretation of each knowledge entity in the knowledge entity group is extracted from the scientific text segment by the entity interpretation extraction unit in the large language model; similarly, the entity interpretation of each knowledge entity extracted from the scientific text segment can be obtained; the entity interpretation of each knowledge entity is vectorized by using the text embedding model to obtain the embedding vector corresponding to each knowledge entity; wherein the text embedding model can be pre-set according to actual business needs or the experience of technicians in this field, and the embodiment of the present invention does not specifically limit it.
[0099] Afterwards, the vector distance between any two knowledge entities is calculated based on the embedding vectors corresponding to each knowledge entity; if the vector distance is less than the vector distance threshold, the knowledge entity pair corresponding to the vector distance is determined as the knowledge entity pair to be merged; based on the knowledge entity pair to be merged and the third prompt word template, the third prompt word is determined; based on the scientific text segment and the third prompt word, the large language model is used to determine the expected merging result of the knowledge entity pair to be merged; based on the expected merging result, each knowledge entity is entity aligned to obtain the target knowledge information corresponding to the scientific text segment.
[0100] Among them, the vector distance threshold can be determined through a large number of experiments, or it can be pre-set according to the experience of technical personnel in this field, and the embodiment of the present invention does not specifically limit it. The knowledge entity pair to be merged refers to the knowledge entity pair to be merged. The third prompt word template can be pre-set according to actual business needs. For example, the third prompt word template can be "Can [knowledge entity identifier 1] and [knowledge entity identifier 2] in the knowledge entity pair be merged?" Among them, [knowledge entity identifier 1] and [knowledge entity identifier 2] are both placeholders used to reserve positions for knowledge entity identifiers. The third prompt word refers to a word used to specify a large language model to perform a knowledge merging task. The expected merging result refers to the merging result of the large language prediction.
[0101] Among them, according to the embedding vectors corresponding to each knowledge entity, the vector distance between any two knowledge entities is calculated; if the vector distance is less than the vector distance threshold, the knowledge entity pair corresponding to the vector distance is determined as the knowledge entity pair to be merged, which can be: for the first embedding vector corresponding to knowledge entity i and the second embedding vector corresponding to knowledge entity j, the cosine similarity between the first embedding vector and the second embedding vector is calculated; the difference between 1 and the cosine similarity is used as the vector distance between knowledge entity i and knowledge entity j; similarly, the vector distance between any two knowledge entities in the scientific text segment can be obtained. If the vector distance between knowledge entity i and knowledge entity j is less than the vector distance threshold, the knowledge entity pair<i,j> It is determined as the knowledge entity pair to be merged. It should be noted that i and j are both positive integers, and i and j are not equal.
[0102] Among them, according to the knowledge entity pair to be merged and the third prompt word template, the third prompt word is determined; according to the third prompt word, the expected merging result of merging the knowledge entities to be merged is determined by using the large language model; according to the expected merging result, the entity alignment of each knowledge entity is performed to obtain the target knowledge information corresponding to the scientific and technological text segment, which can be: for each knowledge entity pair to be merged, the knowledge entity identifier in the third prompt word template is replaced with the entity identifier of the knowledge entity in the knowledge entity pair to be merged, for example, [knowledge entity identifier 1] and [knowledge entity identifier 2], so as to obtain the third prompt word; the scientific and technological text segment is used as the question and answer context of the large language model, the third prompt word is used as the input of the large language model, and the expected merging result of merging the knowledge entity pair to be merged is determined by the knowledge merging judgment unit in the large language model; if the expected merging result is that the merging cannot be performed, the knowledge entities in the knowledge entity pair to be merged are not merged; otherwise, the knowledge entities in the knowledge entity pair to be merged are merged, so that the processing of each knowledge entity pair to be merged can be completed, and then the target knowledge information corresponding to the scientific and technological text segment is obtained.
[0103] It can be understood that by calculating the embedding vector of each entity interpretation and the vector distance between any two knowledge entities, and using a large language model to make entity merging decisions, redundant knowledge is eliminated, and the consistency, availability and accessibility of knowledge are improved, thereby improving the accuracy of the subsequently constructed scientific and technological knowledge graph.
[0104] S206. Construct a scientific and technological knowledge graph based on the target knowledge information corresponding to each scientific and technological text segment.
[0105] Specifically, a scientific and technological knowledge graph is constructed with the help of a graph database based on the obtained knowledge entities, semantic relationships between knowledge entities, and proximity relationships.
[0106] S207. Determine the importance of each knowledge entity in the scientific and technological knowledge graph in scientific and technological literature based on the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity.
[0107] Optionally, each knowledge entity in the scientific knowledge graph and its importance in the scientific literature can be saved in an importance-ranked list in descending order according to the importance of the knowledge entity in the scientific literature, so as to facilitate subsequent reference.
[0108] S208. Filter out at least one candidate knowledge entity from the scientific and technological knowledge graph based on the importance of each knowledge entity in the scientific and technological literature and the importance threshold.
[0109] S209: Determine the classification confidence corresponding to the candidate knowledge entity using a large language model based on the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs.
[0110] Specifically, the fourth prompt word can be determined according to the candidate knowledge entity and the fourth prompt word template; and the classification confidence corresponding to the candidate knowledge entity can be determined using a large language model according to the fourth prompt word and the scientific text segment to which the candidate knowledge entity belongs.
[0111] The fourth prompt word template can be pre-set according to actual business needs. For example, the fourth prompt word template can be "Please give the specific definition, specific category, classification confidence and classification reason of [knowledge entity identifier]?" Wherein, [knowledge entity identifier] is a placeholder for reserving a position for the knowledge entity identifier. The fourth prompt word refers to a word used to specify the large language model to perform the classification confidence calculation task.
[0112] More specifically, for each candidate knowledge entity, the knowledge entity identifier in the fourth prompt word template is replaced with the entity identifier of the candidate knowledge entity, for example, [knowledge entity identifier], thereby obtaining the fourth prompt word; the scientific text segment to which the candidate knowledge entity belongs is used as the question-answering context of the large language model, the fourth prompt word is used as the input of the large language model, and the classification confidence corresponding to the candidate knowledge entity is determined by the classification confidence calculation unit in the large language model. Similarly, the classification confidence corresponding to each candidate knowledge entity can be obtained.
[0113] S210 . Determine a target knowledge entity from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity.
[0114] The technical solution of the embodiment of the present invention obtains multiple scientific text segments by performing text formatting and text segmentation on scientific and technological documents; divides the scientific and technological text segments into text blocks to obtain multiple scientific and technological text blocks; determines the first prompt word according to the scientific and technological text block and the first prompt word template; extracts knowledge information from the scientific and technological text block using a large language model according to the scientific and technological text block and the first prompt word; wherein the knowledge information includes knowledge entities and entity relationships between knowledge entities; merges the knowledge in the scientific and technological text segment according to the extracted multiple knowledge entities to obtain target knowledge information corresponding to the scientific and technological text segment; and constructs a scientific and technological knowledge graph according to the target knowledge information corresponding to each scientific and technological text segment. ; According to the number of semantic relations and the number of adjacent relations corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity, determine the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature; According to the importance of each knowledge entity in the scientific and technological knowledge graph and the importance threshold, select at least one candidate knowledge entity from the scientific and technological knowledge graph; According to the candidate knowledge entity and the scientific and technological text segment to which the candidate knowledge entity belongs, use the large language model to determine the classification confidence corresponding to the candidate knowledge entity; According to the classification confidence corresponding to each candidate knowledge entity, determine the target knowledge entity from at least one candidate knowledge entity. The above technical solution can quickly and fully extract valuable knowledge from scientific and technological literature, ensuring the integrity of knowledge; comprehensively consider the diversity and deep connection of the relationship between knowledge entities, consider the influence of the importance of knowledge entities in scientific and technological literature on the discovery of new knowledge, and determine the target knowledge entity (i.e., new knowledge) according to the classification confidence corresponding to the candidate knowledge entity, so that the determined target knowledge entity is more accurate, thereby improving the accuracy and robustness of new knowledge discovery.
[0115] Embodiment 3
[0116] Figure 3 This is a schematic diagram of the structure of a knowledge discovery device based on a large language model and a knowledge graph provided in the third embodiment of the present invention. This embodiment can be applied to the case of discovering new industry knowledge in the field of science and technology, especially to the case of discovering new industry knowledge in the field of science, engineering and medicine. The device can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 3 As shown, the device comprises:
[0117] A scientific and technological knowledge graph construction module 301 is used to construct a scientific and technological knowledge graph corresponding to scientific and technological literature using a large language model; wherein the scientific and technological knowledge graph includes the proximity relationship between knowledge entities;
[0118] The importance determination module 302 is used to determine the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature according to the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, and the degree of the associated knowledge entity corresponding to each knowledge entity;
[0119] The candidate knowledge entity screening module 303 is used to screen out at least one candidate knowledge entity from the scientific and technological knowledge graph according to the importance of each knowledge entity in the scientific and technological literature and the importance threshold;
[0120] A classification confidence determination module 304 is used to determine the classification confidence corresponding to the candidate knowledge entity using a large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs;
[0121] The target knowledge entity determination module 305 is used to determine a target knowledge entity from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity.
[0122] The technical solution of the embodiment of the present invention uses a large language model to construct a scientific knowledge graph corresponding to scientific and technological literature; wherein the scientific and technological knowledge graph includes proximity relationships between knowledge entities; the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined according to the number of semantic relationships and the number of proximity relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, as well as the degree of the associated knowledge entity corresponding to each knowledge entity; at least one candidate knowledge entity is screened out from the scientific and technological knowledge graph according to the importance of each knowledge entity in the scientific and technological literature and the importance threshold; the classification confidence corresponding to the candidate knowledge entity is determined by using a large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs; and the target knowledge entity is determined from at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity. The above technical scheme can quickly and fully extract valuable knowledge from scientific and technological literature, ensuring the integrity of knowledge; it comprehensively considers the diversity and deep connections of the relationships between knowledge entities, and the impact of the importance of knowledge entities in scientific and technological literature on the discovery of new knowledge, and determines the target knowledge entity (i.e., new knowledge) according to the classification confidence corresponding to the candidate knowledge entity, so that the determined target knowledge entity is more accurate, thereby improving the accuracy and robustness of new knowledge discovery.
[0123] Optionally, the science and technology knowledge graph construction module 301 includes:
[0124] A scientific text segment determination unit is used to perform text formatting and text segmentation on scientific documents to obtain multiple scientific text segments;
[0125] A scientific text block determination unit is used to divide the scientific text segment into text blocks to obtain multiple scientific text blocks;
[0126] A first prompt word determining unit, used to determine the first prompt word according to the scientific text block and the first prompt word template;
[0127] A knowledge information extraction unit is used to extract knowledge information from the scientific and technological text block using a large language model according to the scientific and technological text block and the first prompt word; wherein the knowledge information includes knowledge entities and entity relationships between knowledge entities;
[0128] A target knowledge information determination unit is used to merge the knowledge in the scientific and technological text segment according to the extracted multiple knowledge entities to obtain the target knowledge information corresponding to the scientific and technological text segment;
[0129] The scientific and technological knowledge graph construction unit is used to construct a scientific and technological knowledge graph based on the target knowledge information corresponding to each scientific and technological text segment.
[0130] Optionally, the target knowledge information determination unit includes:
[0131] A second prompt word determination subunit, used to determine a second prompt word according to the extracted multiple knowledge entities and the second prompt word template;
[0132] An entity interpretation extraction subunit is used to extract the entity interpretation of each knowledge entity from the scientific and technological text segment using a large language model according to the scientific and technological text segment and the second prompt word;
[0133] The embedding vector determination subunit is used to vectorize the entity interpretation of each knowledge entity to obtain the embedding vector corresponding to each knowledge entity;
[0134] The target knowledge information determination subunit is used to perform entity alignment on each knowledge entity according to the embedding vector corresponding to each knowledge entity, so as to obtain the target knowledge information corresponding to the scientific and technological text segment.
[0135] Optionally, the target knowledge information determination subunit is specifically used for:
[0136] According to the embedding vectors corresponding to each knowledge entity, the vector distance between any two knowledge entities is calculated;
[0137] If the vector distance is less than the vector distance threshold, the knowledge entity pair corresponding to the vector distance is determined as the knowledge entity pair to be merged;
[0138] Determine the third prompt word according to the knowledge entity pair to be merged and the third prompt word template;
[0139] According to the scientific text segment and the third prompt word, the expected merging result of merging the knowledge entity pair to be merged is determined by using the large language model;
[0140] According to the expected merging results, each knowledge entity is aligned to obtain the target knowledge information corresponding to the scientific text segment.
[0141] Optionally, the importance determination module 302 is specifically configured to:
[0142] Determine the overall relationship weight value between each pair of knowledge entities in the scientific and technological knowledge graph according to the number of semantic relationships and the number of neighboring relationships corresponding to each pair of knowledge entities in the scientific and technological knowledge graph, as well as the semantic relationship value, the neighboring relationship value, the first weight corresponding to the semantic relationship value, and the second weight corresponding to the neighboring relationship value;
[0143] According to the overall relationship weight value between each pair of knowledge entities in the scientific and technological knowledge graph and the degree of the associated knowledge entity corresponding to each knowledge entity, the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined.
[0144] Optionally, the candidate knowledge entity screening module 303 is specifically used to:
[0145] For each knowledge entity in the scientific and technological knowledge graph, if the importance of the knowledge entity in the scientific and technological literature is greater than the importance threshold, the knowledge entity is determined as a candidate knowledge entity.
[0146] Optionally, the classification confidence determination module 304 is specifically configured to:
[0147] Determine the fourth prompt word according to the candidate knowledge entity and the fourth prompt word template;
[0148] According to the fourth prompt word and the scientific text segment to which the candidate knowledge entity belongs, the classification confidence corresponding to the candidate knowledge entity is determined using a large language model.
[0149] The knowledge discovery device based on a large language model and a knowledge graph provided in an embodiment of the present invention can execute the knowledge discovery method based on a large language model and a knowledge graph provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each knowledge discovery method based on a large language model and a knowledge graph.
[0150] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0151] Embodiment 4
[0152] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0153] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0154] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0155] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a knowledge discovery method based on a large language model and a knowledge graph.
[0156] In some embodiments, the knowledge discovery method based on a large language model and a knowledge graph may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the knowledge discovery method based on the large language model and the knowledge graph described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a knowledge discovery method based on a large language model and a knowledge graph by any other appropriate means (e.g., by means of firmware).
[0157] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0158] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0159] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0160] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0161] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0162] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0163] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0164] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A knowledge discovery method based on a large language model and a knowledge graph, characterized in that: include: Using a large language model to construct a scientific and technological knowledge graph corresponding to scientific and technological literature; wherein the scientific and technological knowledge graph includes proximity relationships between knowledge entities; Determine the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature according to the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, and the degree of the associated knowledge entity corresponding to each knowledge entity; According to the importance and importance threshold of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature, at least one candidate knowledge entity is selected from the scientific and technological knowledge graph; Determine the classification confidence corresponding to the candidate knowledge entity using the large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs; According to the classification confidence corresponding to each candidate knowledge entity, a target knowledge entity is determined from the at least one candidate knowledge entity.
2. The method according to claim 1, characterized in that The use of a large language model to construct a scientific knowledge graph corresponding to scientific literature includes: Perform text formatting and text segmentation on scientific and technological documents to obtain multiple scientific and technological text segments; Dividing the scientific and technological text segment into blocks to obtain a plurality of scientific and technological text blocks; Determine a first prompt word according to the scientific text block and the first prompt word template; According to the scientific and technological text block and the first prompt word, knowledge information is extracted from the scientific and technological text block using a large language model; wherein the knowledge information includes knowledge entities and entity relationships between knowledge entities; Based on the extracted multiple knowledge entities, knowledge in the scientific and technological text segment is merged to obtain target knowledge information corresponding to the scientific and technological text segment; Construct a scientific and technological knowledge graph based on the target knowledge information corresponding to each scientific and technological text segment.
3. The method according to claim 2, characterized in that The step of merging the knowledge in the scientific text segment based on the extracted multiple knowledge entities to obtain target knowledge information corresponding to the scientific text segment includes: Determine a second prompt word according to the extracted multiple knowledge entities and the second prompt word template; According to the scientific text segment and the second prompt word, using a large language model to extract entity interpretations of each knowledge entity from the scientific text segment; Vectorize the entity interpretation of each knowledge entity to obtain the embedding vector corresponding to each knowledge entity; According to the embedding vectors corresponding to the knowledge entities, entity alignment is performed on the knowledge entities to obtain the target knowledge information corresponding to the scientific and technological text segment.
4. The method according to claim 3, characterized in that The step of performing entity alignment on each knowledge entity according to the embedding vector corresponding to each knowledge entity to obtain the target knowledge information corresponding to the scientific text segment includes: According to the embedding vectors corresponding to each knowledge entity, the vector distance between any two knowledge entities is calculated; If the vector distance is less than the vector distance threshold, the knowledge entity pair corresponding to the vector distance is determined as the knowledge entity pair to be merged; Determining a third prompt word according to the knowledge entity pair to be merged and the third prompt word template; Determining an expected merging result of merging the pair of knowledge entities to be merged by using the large language model according to the scientific text segment and the third prompt word; According to the expected merging result, entity alignment is performed on each knowledge entity to obtain the target knowledge information corresponding to the scientific and technological text segment.
5. The method according to claim 1, characterized in that: Determining the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature according to the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, and the degree of the associated knowledge entity corresponding to each knowledge entity, includes: Determine the overall relationship weight value between each pair of knowledge entities in the scientific and technological knowledge graph according to the number of semantic relationships and the number of neighboring relationships corresponding to each pair of knowledge entities in the scientific and technological knowledge graph, as well as the semantic relationship value, the neighboring relationship value, the first weight corresponding to the semantic relationship value, and the second weight corresponding to the neighboring relationship value; According to the overall relationship weight value between each pair of knowledge entities in the scientific and technological knowledge graph and the degree of the associated knowledge entity corresponding to each knowledge entity, the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature is determined.
6. The method according to claim 1, wherein the step of selecting at least one candidate knowledge entity from the scientific and technological knowledge graph according to the importance and importance threshold of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature comprises: For each knowledge entity in the scientific and technological knowledge graph, if the importance of the knowledge entity in the scientific and technological literature is greater than an importance threshold, the knowledge entity is determined as a candidate knowledge entity.
7. The method according to claim 1, wherein the step of determining the classification confidence corresponding to the candidate knowledge entity by using the large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs comprises: Determine a fourth prompt word according to the candidate knowledge entity and the fourth prompt word template; According to the fourth prompt word and the scientific text segment to which the candidate knowledge entity belongs, the classification confidence corresponding to the candidate knowledge entity is determined using the large language model.
8. A knowledge discovery device based on a large language model and a knowledge graph, characterized in that: include: A scientific and technological knowledge graph construction module is used to construct a scientific and technological knowledge graph corresponding to scientific and technological literature using a large language model; wherein the scientific and technological knowledge graph includes the proximity relationship between knowledge entities; An importance determination module, used to determine the importance of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature according to the number of semantic relationships and the number of neighboring relationships corresponding to each knowledge entity in the scientific and technological knowledge graph, and the degree of the associated knowledge entity corresponding to each knowledge entity; A candidate knowledge entity screening module, used to screen out at least one candidate knowledge entity from the scientific and technological knowledge graph according to the importance and importance threshold of each knowledge entity in the scientific and technological knowledge graph in the scientific and technological literature; A classification confidence determination module, used to determine the classification confidence corresponding to the candidate knowledge entity using the large language model according to the candidate knowledge entity and the scientific text segment to which the candidate knowledge entity belongs; The target knowledge entity determination module is used to determine the target knowledge entity from the at least one candidate knowledge entity according to the classification confidence corresponding to each candidate knowledge entity.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the knowledge discovery method based on a large language model and a knowledge graph as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the knowledge discovery method based on a large language model and a knowledge graph as described in any one of claims 1 to 7 when executed.
Citation Information
Cited By
Community discovery method and device for mineral product knowledge graph, and storage medium
CN120144780A
Community discovery method, device and storage medium for mineral knowledge graph
CN120144780B
