A Method for Constructing a Knowledge Base for Power Research Results Based on a Large Language Model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]然而,现有的知识库构建机制多数偏向“增量式扩展”,即持续不断地向知识库中添加新的科研成果节点,却缺乏对历史节点进行系统性清理的机制
[0046]本发明能够根据实际的情况合理的原始知识库中的一些低活跃的节点进行删除,把它从知识库中剔除,减少了存储资源浪费,在用户基于关键词检索时减少出现误导结果的概率,减小对科研参考质量的影响;同时不会盲目删除节点对应的电力科研研究成果;这样一来,能基于合理标准判断节点是否应被删除,并实现对知识库中无效科研成果节点的精准剔除。
Smart Images

Figure CN121434409B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, specifically to a method for constructing a knowledge base for power research results based on a large language model. Background Technology
[0002] In the field of power research, knowledge base construction methods based on large language models have gradually emerged in recent years. This method uses language models to perform semantic parsing and content extraction on the text of power research results, extracting and structurally representing the research content related to keywords as knowledge nodes, ultimately forming a graph-based knowledge base structure. Each node in the knowledge base generally corresponds to a specific power research result, and nodes are connected through semantic associations, citation relationships, or topic coupling relationships, thereby realizing semantic retrieval, research-assisted analysis, and intelligent recommendation based on natural language. This construction method greatly improves the efficiency of knowledge extraction and the flexibility of structural expression, and has been widely used for the organization, reuse, and sharing of power research results.
[0003] However, most existing knowledge base construction mechanisms tend to be "incremental expansion," meaning that new research results nodes are continuously added to the knowledge base, but lack a mechanism for systematically cleaning up historical nodes. Over time, many nodes may gradually lose their value due to outdated research methods, invalid conclusions, broken citations, or no longer being adopted in actual engineering. If these "low-activity" nodes are retained in the knowledge base for a long time, it will not only waste storage resources but may also lead to misleading results when users search based on keywords, affecting the quality of research references. However, blindly deleting nodes may inadvertently delete key results. Therefore, how to judge whether a node should be deleted based on reasonable criteria and achieve accurate removal of invalid research results nodes in the knowledge base is a key technical problem that urgently needs to be solved in current knowledge base management but has not yet been effectively solved. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a method for constructing a knowledge base for power research achievements based on a large language model. By constructing undeletable values and comparing them with preset thresholds, the method reasonably determines whether nodes should be removed from the knowledge base, thereby accurately identifying invalid research achievement nodes. This effectively compresses the knowledge base volume, reduces storage costs, avoids misleading users due to interference from invalid nodes during retrieval, and prevents the blind deletion of important achievements, ensuring the structural and semantic integrity of the knowledge base.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] A method for constructing a knowledge base for power industry research results based on a large language model, the method comprising:
[0007] S1. Perform activity analysis on the nodes in the original knowledge base and calculate the activity value of each node; filter the original knowledge base based on the activity value of each node to obtain a set of potential deletable nodes;
[0008] S2. For each node in the potential deletable node set, analyze the semantic connection degree between each node and other nodes, and calculate the coupling strength value of each node in the potential deletable node set.
[0009] S3. For each node in the potential deletable node set, analyze the knowledge contribution of each node and calculate the knowledge island contribution value of each node in the potential deletable node set.
[0010] S4. Calculate the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node, and delete the nodes in the potential deletable node set according to the non-deletable value to obtain a new knowledge base.
[0011] Furthermore, the steps for performing activity analysis on the nodes in the original knowledge base and calculating the activity value of each node are as follows:
[0012] Calculate the retrieval indirect response rate and misleading retrieval rate for each node in the original knowledge base, and subtract the misleading retrieval rate from the retrieval indirect response rate to obtain the activity value of each node.
[0013] The steps for calculating the retrieval indirect response degree include:
[0014] In the historical retrieval records of the original knowledge base, for each node, the total number of times the corresponding node and the retrieval result are connected by a second-order path is counted. The total number of times the second-order path is connected is divided by the total number of historical retrievals to obtain the indirect triggering ratio.
[0015] For each node, the node is connected to the search result by a second-order path as an indirect trigger. The interval between the two most recent adjacent indirect triggers of each node is counted and recorded as the first interval. The average interval between all adjacent indirect triggers of all nodes is calculated and recorded as the second interval. The first interval is divided by the second interval to obtain the indirect trigger time sequence ratio.
[0016] Subtracting the indirect triggering sequence ratio from the indirect triggering ratio yields the retrieval indirect response rate.
[0017] The steps for calculating the misleading retrieval score are as follows:
[0018] In the historical retrieval records of the original knowledge base, for each node, the total number of times the node was retrieved and the total number of times it was clicked by users are counted. The total number of times the node was clicked by users is divided by the total number of times the node was retrieved to obtain the non-acceptance rate.
[0019] The timestamps of user clicks on the nodes are counted to obtain a click timestamp sequence. The time interval between all two adjacent clicks in the click timestamp sequence is calculated to obtain a time interval sequence. The difference between the maximum and minimum values in the time interval sequence is divided by the sum of the maximum and minimum values to obtain the standardized range.
[0020] For each click on a node, the duration of each click is compared with the preset minimum effective click time. If it is less, the corresponding click is recorded as an invalid click. The total number of invalid clicks is divided by the total number of times the node is clicked by the user to obtain the click bounce rate.
[0021] The misleading retrieval score is obtained by calculating the mean of the non-acceptance rate, standardized range, and click-bounce rate of each node in the original knowledge base.
[0022] Furthermore, the steps for filtering the original knowledge base based on the activity value of each node to obtain a set of potential deletable nodes include:
[0023] Compare the activity value of each node in the original knowledge base with the preset activity value threshold. If the activity value is less than the preset activity value threshold, the corresponding node is recorded as a potential deletable node, and all potential deletable nodes in the original knowledge base are used as a potential deletable node set.
[0024] If the activity value is not less than the preset activity value threshold, the corresponding node will be recorded as an undeletable node, and all undeletable nodes will be retained in the original knowledge base.
[0025] The steps for calculating the coupling strength value of each node in the potential deletable node set include:
[0026] For each node in the original knowledge base, the semantic embedding vector is extracted using a pre-defined large language model, and the semantic embedding vector of each node is subjected to unsupervised semantic clustering to divide it into several semantic clusters: each semantic cluster corresponds to a topic;
[0027] For each node in the potential deletable node set, calculate the cosine similarity between the semantic embedding vector of the node and the center vector of each semantic cluster, and divide the calculated cosine similarity by the sum of all cosine similarities to obtain the normalized similarity between the node and each semantic cluster; subtract the largest normalized similarity from the value of 1 to obtain the semantic topic breadth index of each node.
[0028] The steps for calculating the coupling strength value of each node in the potential deletable node set also include:
[0029] Within each semantic cluster, the cosine similarity between the semantic embedding vectors of each node in the potential deletable node set and all other nodes in the same cluster is calculated, and the mean cosine similarity is used as the average similarity. The semantic consensus coupling density index of each node is then calculated based on the average similarity, using the following formula: In the formula, Indicates the index number of the semantic cluster. Indicates the first The number of nodes in a semantic cluster In semantic clusters In the middle, node With semantic clusters The average cosine similarity of other nodes in the array; Indicates the first Semantic consensus coupling density index of each node; Its purpose is to prevent average dilution caused by excessively large clusters;
[0030] Multiply the semantic topic breadth index of each node in the potential deletable node set by the semantic consensus coupling density index, and take the square root of the multiplication result as the coupling strength value of each node.
[0031] Furthermore, the steps for calculating the knowledge island contribution value of each node in the potential deletable node set are as follows:
[0032] For each node in the original knowledge base, a pre-defined large language model is used to extract its semantic embedding vector, and a set of semantic embedding vectors is constructed. Each vector represents the representation of the corresponding node in the semantic space. Unsupervised semantic clustering is then performed on the semantic embedding vectors of each node to divide them into several semantic clusters: each semantic cluster corresponds to a topic.
[0033] For each node in the potential deletable node set, calculate the cosine similarity between each node and all other nodes based on its semantic embedding vector and the semantic embedding vectors of all other nodes, and take the minimum cosine similarity as the minimum semantic distance.
[0034] The cosine similarity between each node in the potential deletable node set and all other nodes is compared with a preset similarity threshold. The total number of cosine similarities less than the preset similarity threshold is divided by the total number of cosine similarities to obtain the semantic significance factor of each node.
[0035] For each semantic cluster, calculate the cosine similarity between any two nodes in the semantic cluster, and subtract the cosine similarity between any two nodes from the value 1 to obtain the semantic sparsity value between the corresponding two nodes; the mean of all semantic sparsity values is used as the semantic sparsity of each semantic cluster.
[0036] For each node in the potential deletable node set, the semantic sparsity of the semantic cluster to which each node belongs is used as the semantic sparsity factor of the node.
[0037] The remoteness index of each node is obtained by summing the minimum semantic distance, semantic saliency factor, and semantic sparsity factor of each node in the potential deletable node set.
[0038] The remoteness index of each node in the potential deletable node set is normalized by Min-Max, and the normalized result is used as the knowledge island contribution value of each node in the potential deletable node set.
[0039] Furthermore, the steps for calculating the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node are as follows:
[0040] A two-dimensional coordinate system is established based on the coupling strength value and knowledge island contribution value of each node in the potential deletable node set, and the coupling strength value and knowledge island contribution value of each node are mapped to the two-dimensional coordinate system; the coordinate points correspond to the coupling strength value and knowledge island contribution value of each node respectively.
[0041] Calculate the distance from the coordinate point of each node in the two-dimensional coordinate system to the centroid, and use the distance as the non-deletable value of each node in the corresponding potential deletable node set.
[0042] The steps to delete nodes from the set of potentially deletable nodes based on their non-deletable values to obtain a new knowledge base include:
[0043] Compare the non-deletable value with the preset non-deletable value threshold. If the non-deletable value is less than the preset non-deletable value threshold, then the corresponding potential deletable node is recorded as a deleted node, and the power research results corresponding to the deleted node in the original knowledge base are deleted.
[0044] If the non-deletable value is not less than the preset non-deletable value threshold, the corresponding potential deletable node is recorded as a non-deletable node, and the power research results corresponding to the non-deletable node are still retained in the original knowledge base.
[0045] The beneficial effects of this invention are:
[0046] This invention can reasonably delete some inactive nodes in the original knowledge base according to the actual situation, remove them from the knowledge base, reduce the waste of storage resources, reduce the probability of misleading results when users search based on keywords, and reduce the impact on the quality of scientific research references; at the same time, it will not blindly delete the power research results corresponding to the nodes; in this way, it can judge whether the nodes should be deleted based on reasonable standards and achieve accurate removal of invalid scientific research result nodes in the knowledge base. Attached Figure Description
[0047] Figure 1 This is a flowchart of a method for constructing a knowledge base for power research results based on a large language model. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] This invention provides a method for constructing a knowledge base for power industry research results based on a large language model. See also... Figure 1 , Figure 1 A flowchart illustrating a method for constructing a knowledge base for power research results based on a large language model, provided in an embodiment of the present invention. The method includes the following steps:
[0050] S1: Perform activity analysis on the nodes in the original knowledge base and calculate the activity value of each node; filter the original knowledge base based on the activity value of each node to obtain a set of potential deletable nodes;
[0051] S2: For each node in the potential deletable node set, analyze the semantic connection degree between each node and other nodes, and calculate the coupling strength value of each node in the potential deletable node set.
[0052] S3: For each node in the potential deletable node set, analyze the knowledge contribution of each node and calculate the knowledge island contribution value of each node in the potential deletable node set;
[0053] S4: Calculate the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node, and delete the nodes in the potential deletable node set according to the non-deletable value to obtain a new knowledge base.
[0054] Based on the present invention, a method for constructing a knowledge base for power research results based on a large language model can reasonably delete some inactive nodes in the original knowledge base according to the actual situation, thereby removing them from the knowledge base, reducing the waste of storage resources, reducing the probability of misleading results when users search based on keywords, and minimizing the impact on the quality of scientific research references; at the same time, it will not blindly delete the power research results corresponding to the nodes; in this way, it can judge whether a node should be deleted based on reasonable standards and achieve accurate removal of invalid scientific research result nodes in the knowledge base.
[0055] In this embodiment, S1: Perform activity analysis on the nodes in the original knowledge base and calculate the activity value of each node; filter the original knowledge base according to the activity value of each node to obtain a set of potential deletable nodes;
[0056] Specifically, the steps for performing activity analysis on the nodes in the original knowledge base and calculating the activity value of each node are as follows:
[0057] Calculate the retrieval indirect response rate and misleading retrieval rate for each node in the original knowledge base, and subtract the misleading retrieval rate from the retrieval indirect response rate to obtain the activity value of each node.
[0058] Specifically, the steps for calculating the indirect response rate include:
[0059] In the historical retrieval records of the original knowledge base, for each node, the total number of times the corresponding node and the retrieval result are connected by a second-order path is counted. The total number of times the second-order path is connected by the total number of historical retrievals is divided to obtain the indirect trigger ratio. A second-order path refers to a node and the retrieval result node that are not directly connected, but are indirectly connected through an intermediate node.
[0060] For each node, the node is connected to the search result by a second-order path as an indirect trigger. The interval between the two most recent adjacent indirect triggers of each node is counted and recorded as the first interval. The average interval between all adjacent indirect triggers of all nodes is calculated and recorded as the second interval. The first interval is divided by the second interval to obtain the indirect trigger time sequence ratio.
[0061] Subtracting the indirect triggering sequence ratio from the indirect triggering ratio yields the retrieval indirect response rate.
[0062] It's important to note that a second-order path refers to a connection between a node and a search result node that isn't directly linked, but rather indirectly connected through an intermediate node. For example, in the original knowledge base, each node represents a power research achievement, and the connections between nodes indicate their semantic or referential relationships. If a user searches for "distribution network load forecasting methods," the system directly returns node A (short-term load forecasting model), while node B (power load time-series feature extraction) isn't directly matched. In this case, node A and node B aren't directly connected, but node A is connected to node C (neural network model), and node C is connected to node B. Thus, node B is connected to search result A through the intermediate node C. The user's search result node A → intermediate node C → node B forms a connection path of length 2, which is the so-called "second-order path." It indicates that node B isn't directly matched, but maintains an indirect semantic association with the search target through an intermediate node; therefore, it's called "indirect triggering." In calculating the indirect response rate, all relevant data can be obtained by parsing the historical retrieval records of the knowledge base system. These records contain the user's input keywords for each search, the candidate result nodes returned by the system, and the connection path information between the candidate result nodes and other nodes in the knowledge base. By parsing these records, it is possible to count whether each node establishes a connection with the retrieval result node through an intermediate node in each search, thus obtaining the total number of "second-order path connections" and calculating the indirect triggering ratio. During the parsing process, the timestamp information of the nodes being indirectly triggered is also recorded. Based on the timestamps, the time interval between the two most recent adjacent indirect triggers of a node can be determined as the first interval. Simultaneously, the average of all adjacent indirect trigger intervals for all nodes is used to obtain the second interval. Finally, the first interval is divided by the second interval to obtain the indirect triggering time sequence ratio.
[0063] It should be noted that retrieval indirect response degree measures the implicit activity of the corresponding power research results in the semantic structure of the knowledge base. Even if the user does not directly query the node, the node is still indirectly invoked in the context of the user's query. Exploratory indirect response degree refers to the ability of a node to establish an indirect association with the search results through a second-order path in the historical retrieval process, even if the node is not directly hit by the user's search in the original knowledge base. The larger the value, the higher the frequency, the closer the interval, and the more concentrated the path of the node being "indirectly triggered" in the search. When the retrieval indirect response degree is large, it means that although the node does not often appear in the user's direct search results, it maintains a close connection with other frequently searched nodes, indicating that it still plays an important role in the power research knowledge reasoning chain. For example, if a user repeatedly searches for "distribution network load forecasting," although the directly hit nodes may be "short-term load forecasting methods" or "load data cleaning algorithms," a certain node "power load time series feature extraction" is always indirectly triggered through intermediate nodes, which shows that this result is still repeatedly involved in the entire research semantic chain. Simply deleting it would deprive subsequent nodes involving prediction methods and data modeling of crucial semantic support, thereby weakening the overall integrity of the knowledge base. Therefore, a high retrieval indirect response indicates that the node is still active and should not be deleted to ensure the structural rationality of research results in the knowledge base and the accuracy of retrieval results.
[0064] It's important to note that the reason for calculating retrieval indirect response rate by counting the number of second-order path connections and comparing the interval between adjacent indirect triggers with the global average interval, instead of using other simpler methods (such as directly counting clicks or occurrences), is primarily because this approach comprehensively reflects the true activity and semantic value of a node. Traditional click counts or direct hit frequencies only measure explicit usage and cannot reveal the potential value of a node being repeatedly invoked indirectly during retrieval. By introducing the concept of "second-order path connections," we can capture situations where a node, although not a direct result in the semantic network, is associated with the retrieval target through intermediate nodes, which better aligns with the semantic structure of the knowledge base. Furthermore, by recording the time interval between a node's two most recent indirect triggers and comparing it with the global average, we can identify whether certain nodes exhibit abnormally sparse or dense trigger patterns, thus avoiding biases caused by judging solely by the number of occurrences. For example, if a node's total number of occurrences is not high, but its trigger interval is consistently much shorter than the overall average, it indicates that it maintains high-frequency potential activity in recent semantic retrievals and should not be deleted. Calculating the retrieval indirect response degree using the above method enables a dynamic, relative, and structured measurement of the latent activity of nodes. This avoids the accidental deletion of key research results and reduces redundant nodes systematically, thereby ensuring the overall rationality, accuracy, and long-term controllability of the knowledge base.
[0065] In this embodiment, the steps for calculating the misleading retrieval score are as follows:
[0066] In the historical retrieval records of the original knowledge base, for each node, the total number of times the node was retrieved and the total number of times it was clicked by users are counted. The total number of times the node was clicked by users is divided by the total number of times the node was retrieved to obtain the non-acceptance rate.
[0067] The timestamps of user clicks on the node are counted to obtain a click timestamp sequence. The time interval between all two adjacent clicks in the click timestamp sequence is calculated to obtain a time interval sequence. The difference between the maximum and minimum values in the time interval sequence is divided by the sum of the maximum and minimum values to obtain the standardized range. The standardized range indicates whether the click pattern of the node is stable. The closer it is to 1, the more unstable the click behavior is, and the more likely it is to be a trial click.
[0068] For each click on a node, the duration of each click is compared with the preset minimum effective click time. If it is less, the corresponding click is recorded as an invalid click. The total number of invalid clicks is divided by the total number of times the node is clicked by the user to obtain the click bounce rate.
[0069] The misleading retrieval score is obtained by calculating the mean of the non-acceptance rate, standardized range, and click-bounce rate of each node in the original knowledge base.
[0070] It should be noted that during the calculation of misleading search scores, all data can be directly obtained from the historical search logs stored in the knowledge base system. Specifically, the total number of times a node is searched and the total number of times it is clicked by users can be obtained by parsing the candidate result list returned for each search and the user click feedback records; the click timestamp sequence can be extracted from the user click event logs recorded by the system. Each time a user clicks a node, the system automatically writes the corresponding timestamp, thus enabling the calculation of the time interval between any two adjacent clicks and forming a time interval sequence; the duration of a user click can be obtained by recording the difference between the click time and the exit time, and compared with the system's preset minimum effective click time, thereby determining the number of invalid clicks.
[0071] It's important to note that misleading retrieval rate refers to the degree to which a node appears frequently during the retrieval process but is actually rejected or abandoned by users. Essentially, it reflects the node's interference with user retrieval behavior. This indicator consists of three aspects: First, whether the node receives user clicks when returned by the system's retrieval results, i.e., the non-acceptance rate. If a node is retrieved multiple times but rarely clicked, it indicates low relevance to user needs. Second, whether the node's click pattern is stable. The standardized range calculated using timestamps can characterize whether user clicks are concentrated or random. Highly unstable click behavior usually means that users are only tentatively entering the node and do not truly rely on it. Third, the click-bounce rate, used to measure whether a node is clicked, but users stay for insufficient time or immediately exit, indicating that the information provided by the node fails to meet user needs. When a node has a low misleading retrieval rate, it indicates that it is widely accepted by users during the retrieval process, the click pattern is relatively stable, and users tend to stay or continue using the node's information after clicking, suggesting that the power research results corresponding to the node still have practical reference value in the knowledge base. For example, a node related to "basic feature extraction for power load forecasting" indicates that if a user clicks on this node multiple times while searching for load forecasting methods, stays on it for a long time, and subsequently enters related downstream research nodes, it means that the research result is still playing a role in the user's research chain and has a high activity value, making it unsuitable for deletion. Conversely, if a node appears frequently in search results but has a low click rate, a chaotic click pattern, and users quickly leave, its misleading search value is high, indicating that the result has limited practical value and should be included in the potential deletion candidate set.
[0072] It's important to note that calculating the misleading search score using the above method avoids misjudgments caused by relying solely on click counts or recall frequency, comprehensively measuring the actual value of nodes from multiple dimensions. On one hand, the non-acceptance rate reflects whether a node is consistently returned by the system but lacks user acceptance, revealing its relevance to user needs. On the other hand, the standardized range based on click timestamps effectively distinguishes between consistent and sporadic user clicks, preventing the misjudgment of accidental use as high value. Furthermore, the click-bounce ratio directly reflects whether users quickly abandon the node after clicking, revealing whether the node information has substantial reference value. The combination of these three factors allows the misleading search score to more accurately reflect the "interference" and "invalidity" of nodes in retrieval, thus accurately identifying nodes that need to be removed during knowledge base maintenance. Compared to traditional methods based on a single statistical indicator, this method significantly reduces the risk of mistakenly deleting key research results, ensuring that truly valuable nodes are retained, while reducing the interference of invalid nodes on user search results, improving the overall accuracy and reliability of the knowledge base.
[0073] The steps for filtering the original knowledge base based on the activity value of each node to obtain a set of potential deletable nodes include:
[0074] Compare the activity value of each node in the original knowledge base with the preset activity value threshold. If the activity value is less than the preset activity value threshold, the corresponding node is recorded as a potential deletable node, and all potential deletable nodes in the original knowledge base are used as a potential deletable node set.
[0075] If the activity value is not less than the preset activity value threshold, the corresponding node will be recorded as an undeletable node, and all undeletable nodes will be retained in the original knowledge base.
[0076] It should be noted that by comparing the activity value of each node in the original knowledge base with a preset activity value threshold, and accordingly classifying nodes with lower activity values into a potentially deletable node set, preliminary hierarchical management of the knowledge base can be achieved. On the one hand, nodes with activity values below the threshold often lack user acceptance or are highly misleading during retrieval. Long-term retention would lead to knowledge base redundancy and distorted search results. Therefore, this filtering mechanism can effectively mark low-value nodes in advance, facilitating subsequent deletion. On the other hand, nodes with activity values above the threshold can be automatically classified as non-deletable nodes and retained, thus avoiding the accidental deletion of key research results due to indiscriminate cleanup. For example, when the threshold is set to 0.5, nodes with an activity value of 0.3 will be included in the potentially deletable node set, while nodes with an activity value of 0.7 will remain in the knowledge base. This approach can maintain the integrity and practicality of research results while ensuring the conciseness of the knowledge base content, improving the accuracy of search results and the scientific nature of knowledge base maintenance.
[0077] In the embodiment, S2: For each node in the potential deletable node set, analyze the semantic connection degree between each node and other nodes, and calculate the coupling strength value of each node in the potential deletable node set.
[0078] For each node in the original knowledge base, the semantic embedding vector is extracted using a pre-defined large language model, and unsupervised semantic clustering (such as based on sphere, K-Means, etc.) is performed on the semantic embedding vector of each node to divide it into several semantic clusters: each semantic cluster corresponds to a topic;
[0079] For each node in the potential deletable node set, calculate the cosine similarity between the semantic embedding vector of the node and the center vector of each semantic cluster, and divide the calculated cosine similarity by the sum of all cosine similarities to obtain the normalized similarity between the node and each semantic cluster; subtract the maximum normalized similarity from the value 1 to obtain the semantic topic breadth index of each node.
[0080] Within each semantic cluster, the cosine similarity between the semantic embedding vectors of each node in the potential deletable node set and all other nodes in the same cluster is calculated, and the mean cosine similarity is used as the average similarity. The semantic consensus coupling density index of each node is then calculated based on the average similarity, using the following formula: In the formula, Indicates the index number of the semantic cluster. Indicates the first The number of nodes in a semantic cluster In semantic clusters In the middle, node With semantic clusters The average cosine similarity of other nodes in the array; Indicates the first Semantic consensus coupling density index of each node; Its purpose is to prevent average dilution caused by excessively large clusters;
[0081] Multiply the semantic topic breadth index of each node in the potential deletable node set by the semantic consensus coupling density index, and take the square root of the multiplication result as the coupling strength value of each node.
[0082] It should be noted that the semantic embedding vectors of each node in the original knowledge base need to be processed using a pre-defined large language model (such as BERT, RoBERTa, etc.). This semantic content can be knowledge paragraphs represented by the node, text tags, meta-information descriptions, etc., obtained by encoding the text content bound to the node to obtain a vector representation. Using the semantic embedding vectors of all nodes as input, unsupervised clustering methods such as Spherical K-Means are used to cluster them. The K value can be set using silhouette coefficients, adaptive heuristics, etc. The center vector of each semantic cluster is automatically output by the clustering algorithm, representing the semantic center of that topic. Different semantic clusters correspond to different topics, such as wind farm fault diagnosis semantic cluster, load forecasting, power dispatch optimization, substation equipment management, transmission line inspection strategies, smart distribution network reconfiguration methods, etc. These data are obtained through processing using a pre-defined large language model.
[0083] It should be noted that the coupling strength value is a comprehensive indicator in the power research knowledge base that measures the importance and independence of a potentially removable node within its semantic cluster. It is used to determine whether the node has a significant semantic coupling relationship with other nodes. A higher value indicates that the node has broad semantic connections with multiple semantic clusters (large semantic topic breadth) and high semantic consistency with other nodes within its semantic cluster (high semantic consensus coupling density). Therefore, the coupling strength value actually reflects the dual attributes of a node: its "semantic breadth" and its "semantic core position within the cluster." When a node has a large coupling strength value, it indicates that it is highly connected in the semantic network; it may be a bridge node between multiple topics or a representative central node of a particular topic cluster. Deleting such a node will cause a break or distortion in a part of the core semantic structure of the original knowledge base, potentially leading to the risk of "semantic holes" or "knowledge loss." For example, if a node corresponds to research findings such as "intelligent diagnosis of wind turbine vibration signals," it may belong to both the "wind power operation monitoring" semantic cluster and be highly representative of the "intelligent operation and maintenance methods" cluster. Deleting this node would weaken the coupling path between these two key thematic clusters, compromising the integrity of the query results. Therefore, using coupling strength as a key criterion for deletion ensures that only nodes that are semantically marginalized, have minimal contribution, and weak semantic concentration are cleaned up. This allows for knowledge compression and refinement without disrupting the knowledge framework, improving the robustness and maintainability of the knowledge base. In summary, a higher coupling strength value indicates a stronger semantic contribution to the knowledge base, making it less suitable for deletion.
[0084] It should be noted that the reason for using the above calculation method to determine the coupling strength value, rather than using traditional simple metrics (such as node degree, single similarity threshold judgment, or weighted average method), is that this method has higher semantic sensitivity, structural discriminative power, and deletion risk perception capability. First, this method constructs multiple adaptive topic semantic clusters by inputting the semantic embedding vectors of all potential removable nodes into unsupervised clustering algorithms such as Spherical K-Means, avoiding semantic bias caused by artificially setting cluster structures or forced classification, so that the vector of each cluster center has semantic representativeness driven by real data. Second, by calculating the sense of belonging of a node to all cluster centers (i.e., cosine similarity) and finding the maximum value, the strongest semantic projection direction of the node can be identified, constructing its "semantic normalization influence" without introducing artificial weighting. The average semantic distance between a node and other nodes in the same cluster reflects the structural coupling strength of the node within the topic. This step captures its representativeness and coreness in the local semantic subgraph. Finally, the coupling strength value is obtained by the ratio of the two and normalized compression, thus forming a multi-faceted characterization of "semantic breadth" and "degree of consensus within the cluster". The biggest advantage of this approach is that it can simultaneously measure the semantic coverage of nodes to the overall knowledge base (horizontal) and the binding strength of nodes to local semantic structures (vertical), thus avoiding the problem of traditional methods that only focus on local connection density and ignore semantic multidirectionality.
[0085] In this embodiment, S3: For each node in the potential deletable node set, the step of analyzing the knowledge contribution level of each node and calculating the knowledge island contribution value of each node in the potential deletable node set is as follows:
[0086] For each node in the original knowledge base, a pre-defined large language model is used to extract its semantic embedding vector, and a set of semantic embedding vectors is constructed. Each vector represents the representation of the corresponding node in the semantic space. Unsupervised semantic clustering (such as based on sphere, K-Means, etc.) is performed on the semantic embedding vectors of each node to divide them into several semantic clusters: each semantic cluster corresponds to a topic.
[0087] For each node in the potential deletable node set, calculate the cosine similarity between each node and all other nodes based on its semantic embedding vector and the semantic embedding vectors of all other nodes, and take the minimum cosine similarity as the minimum semantic distance.
[0088] The cosine similarity between each node in the potential deletable node set and all other nodes is compared with a preset similarity threshold. The total number of cosine similarities less than the preset similarity threshold is divided by the total number of cosine similarities to obtain the semantic significance factor of each node.
[0089] For each semantic cluster, calculate the cosine similarity between any two nodes in the semantic cluster, and subtract the cosine similarity between any two nodes from the value 1 to obtain the semantic sparsity value between the corresponding two nodes; the mean of all semantic sparsity values is used as the semantic sparsity of each semantic cluster.
[0090] For each node in the potential deletable node set, the semantic sparsity of the semantic cluster to which each node belongs is used as the semantic sparsity factor of the node.
[0091] The remoteness index of each node is obtained by summing the minimum semantic distance, semantic saliency factor, and semantic sparsity factor of each node in the potential deletable node set.
[0092] The remoteness index of each node in the potential deletable node set is normalized by Min-Max, and the normalized result is used as the knowledge island contribution value of each node in the potential deletable node set.
[0093] It's important to note that the knowledge island contribution value is an indicator used to measure whether a potentially removable node is marginal in the overall semantic structure of the knowledge base and whether it independently bears the key expressive responsibility for a rare knowledge topic. A higher value indicates that the node not only has a greater semantic distance from other nodes (i.e., a larger minimum semantic distance), but also that the semantic content corresponding to the node lacks semantic neighbors in the entire knowledge base (i.e., a high semantic significance factor), and that the semantic cluster to which it belongs exhibits high sparsity in its clustering structure (i.e., a high semantic sparsity factor). These three factors combined result in the node forming a relatively independent "knowledge island" that is difficult for other nodes to replace semantically. When the knowledge island contribution value is high, it means that even if the node is isolated in number and has a low frequency, it may still carry the core content of a rare but important research direction, niche technical route, or small-scale application scenario in the entire knowledge base. Directly deleting this node could very likely lead to the overall loss of representative information in that field within the knowledge base, thus creating a knowledge blind spot. For example, in a knowledge base of power research findings, a certain node might only relate to "the impact of wind-induced vibration on the local breakdown of insulators in ultra-high voltage systems." This content is quite obscure in the overall semantic distribution, and there are very few other nodes in its semantic cluster. If it is mistakenly deleted, it will directly lead to a lack of knowledge in a subdomain related to local faults in ultra-high voltage systems, creating a "hole" in subsequent research, reasoning, and recommendation processes. Therefore, the larger the contribution value of a knowledge island, the more irreplaceable, incompressible, and irreconstructable its content position in the knowledge base is, and it should be given priority for retention. By introducing this indicator, we can effectively avoid the "sparse with many" bias caused by relying solely on conventional indicators such as node frequency, connection number, or similarity, thereby enhancing the information integrity and research diversity of the knowledge base in peripheral fields and niche topics.
[0094] It should be noted that calculating the contribution value of knowledge silos using the above method, rather than conventional measurement methods (such as frequency counting, node degree centrality, simple semantic similarity, etc.), has multiple advantages, including multi-dimensional fusion, high accuracy in edge detection, better identification of low-frequency nodes, and avoidance of biased data misleading. Its core benefit lies in the fact that this method progressively identifies the "knowledge independence" and "irreplaceability" of nodes from three semantic levels, corresponding to the node's edge position in the semantic space (minimum semantic distance), the uniqueness of its contribution to the overall knowledge (semantic significance factor), and the rarity of its semantic topic itself (semantic sparsity factor). This method avoids the one-sidedness of measuring the value of knowledge retention solely by "whether it has many connections" or "whether it appears frequently," and is particularly effective when dealing with data in fields such as power research results that have highly long-tail characteristics and specialized niche branch structures. For example, a certain power research finding, though very infrequent and rarely cited in other works, focuses on the "impact mechanism of icing faults on synchronous compensators in polar transmission systems." In the current semantic structure, this is an isolated knowledge node characterized by "remoteness, obscurity, and extremely low redundancy." Conventional methods easily lead to its accidental deletion, while the method described above effectively identifies its importance under multiple indicators of "low semantic similarity, high semantic sparsity, and significant deviation," thus making a retention decision. Therefore, this method possesses high practical value and technological advancement in ensuring that "critical few" are not mistakenly deleted and structural knowledge blind spots are not created during knowledge base compression or cleaning. It also exhibits good scalability and cross-domain applicability.
[0095] In the embodiment, S4: Calculate the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node, and delete the nodes in the potential deletable node set according to the non-deletable value to obtain a new knowledge base.
[0096] The steps for calculating the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node are as follows:
[0097] A two-dimensional coordinate system is established based on the coupling strength value and knowledge island contribution value of each node in the potential deletable node set, and the coupling strength value and knowledge island contribution value of each node are mapped to the two-dimensional coordinate system; the coordinate points correspond to the coupling strength value and knowledge island contribution value of each node respectively.
[0098] Calculate the distance from the coordinate point of each node in the two-dimensional coordinate system to the centroid, and use the distance as the non-deletable value of each node in the corresponding potential deletable node set.
[0099] It should be noted that by mapping the coupling strength value and knowledge island contribution value of each node in the potential deletable node set to a two-dimensional coordinate system, and calculating the distance from each coordinate point to the origin as the non-deletable value, this method essentially achieves the joint evaluation geometry of two types of structural retention value indicators. That is, it comprehensively judges the irreplaceability of a node from two dimensions: "local structural coupling importance (coupling strength)" and "global semantic isolation contribution (knowledge island)". The greatest advantage of this approach is that it avoids artificial setting, making the evaluation process more objective and neutral. At the same time, mapping the two evaluation values to coordinates and taking the Euclidean distance effectively achieves unbiased fusion and compression of two types of heterogeneous information, with clear numerical meaning and strong operability. Specifically, if a node scores high in coupling strength, it is closely related to other knowledge points, and deletion may easily disrupt the connectivity of the knowledge network; if it scores high in knowledge island contribution, it may carry important achievements in obscure semantic domains, and deletion may create knowledge blind spots. Converting these two indicators into spatial distance can efficiently identify nodes that have "high retention value in both dimensions", eliminate redundant nodes that are "low in both dimensions", and retain a fuzzy elastic range for nodes that are "high in one dimension". This greatly improves the conservatism, rationality and generalization ability of the knowledge compression process, and is especially suitable for knowledge base management scenarios with high specialization, low redundancy and strong semantic dependence, such as power research.
[0100] The steps to delete nodes from the set of potentially deletable nodes based on their non-deletable values to obtain a new knowledge base include:
[0101] Compare the non-deletable value with the preset non-deletable value threshold. If the non-deletable value is less than the preset non-deletable value threshold, then the corresponding potential deletable node is recorded as a deleted node, and the power research results corresponding to the deleted node in the original knowledge base are deleted.
[0102] If the non-deletable value is not less than the preset non-deletable value threshold, the corresponding potential deletable node is recorded as a non-deletable node, and the power research results corresponding to the non-deletable node are still retained in the original knowledge base.
[0103] It should be noted that, in the process of screening each node in the potential deletable node set based on the non-deletable value, the non-deletable value corresponding to each node is compared with a preset non-deletable value threshold. If the non-deletable value of a node is less than the threshold, it indicates that its joint retention value in terms of coupling strength and contribution to knowledge silos is low. That is, the node does not have a significant structural connection role, nor does it play an important role in supplementing obscure semantics. Therefore, it can be regarded as a redundant node, and its corresponding knowledge entry is deleted from the original power research results knowledge base to achieve structural lightweighting and semantic cleaning. Conversely, if the non-deletable value of a node is not less than the preset threshold, it is determined that the node still has high retention value, and its corresponding research results should be retained in the knowledge base. The above approach effectively eliminates non-contributing or marginal low-value nodes while ensuring the continuity of the knowledge network structure and the integrity of semantic coverage, thus avoiding knowledge chain breaks or information blind spots caused by the accidental deletion of key achievements. On the other hand, it avoids the subjective risks caused by manually setting multi-factor weights, making the knowledge base compression operation highly faithful, interpretable, and automatically executed. It is particularly suitable for application in domain knowledge bases such as those for electric power research, which are structurally compact, semantically heterogeneous, and have uneven contributions.
[0104] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for constructing a knowledge base for power research results based on a large language model, characterized in that, Includes the following steps: S1. Perform activity analysis on the nodes in the original knowledge base and calculate the activity value of each node; The original knowledge base is filtered based on the activity value of each node to obtain a set of potential deletable nodes; S2. For each node in the potential deletable node set, analyze the semantic connection degree between each node and other nodes, and calculate the coupling strength value of each node in the potential deletable node set. S3. For each node in the potential deletable node set, analyze the knowledge contribution of each node and calculate the knowledge island contribution value of each node in the potential deletable node set. S4. Calculate the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node, and delete the nodes in the potential deletable node set according to the non-deletable value to obtain a new knowledge base. In S2, the steps for calculating the coupling strength value of each node in the potential deletable node set include: For each node in the original knowledge base, the semantic embedding vector is extracted using a pre-defined large language model, and the semantic embedding vector of each node is subjected to unsupervised semantic clustering to divide it into several semantic clusters: each semantic cluster corresponds to a topic; For each node in the potential deletable node set, calculate the cosine similarity between the semantic embedding vector of the node and the center vector of each semantic cluster, and divide the calculated cosine similarity by the sum of all cosine similarities to obtain the normalized similarity between the node and each semantic cluster; subtract the maximum normalized similarity from the value 1 to obtain the semantic topic breadth index of each node. The steps for calculating the coupling strength value of each node in the potential deletable node set also include: Within each semantic cluster, the cosine similarity between the semantic embedding vectors of each node in the potential deletable node set and all other nodes in the same cluster is calculated, and the mean cosine similarity is used as the average similarity. The semantic consensus coupling density index of each node is then calculated based on the average similarity, using the following formula: In the formula, Indicates the index number of the semantic cluster. Indicates the first The number of nodes in a semantic cluster In semantic clusters In the middle, node With semantic clusters The average cosine similarity of other nodes in the array; Indicates the first Semantic consensus coupling density index of each node; Its purpose is to prevent average dilution caused by excessively large clusters; Multiply the semantic topic breadth index of each node in the potential deletable node set by the semantic consensus coupling density index, and take the square root of the multiplication result as the coupling strength value of each node. In S3, the steps for calculating the knowledge island contribution value of each node in the potential deletable node set are as follows: For each node in the original knowledge base, a pre-defined large language model is used to extract its semantic embedding vector, and a set of semantic embedding vectors is constructed. Each vector represents the representation of the corresponding node in the semantic space. Unsupervised semantic clustering is then performed on the semantic embedding vectors of each node to divide them into several semantic clusters: each semantic cluster corresponds to a topic. For each node in the potential deletable node set, calculate the cosine similarity between each node and all other nodes based on its semantic embedding vector and the semantic embedding vectors of all other nodes, and take the minimum cosine similarity as the minimum semantic distance. The cosine similarity between each node in the potential deletable node set and all other nodes is compared with a preset similarity threshold. The total number of cosine similarities less than the preset similarity threshold is divided by the total number of cosine similarities to obtain the semantic significance factor of each node. For each semantic cluster, calculate the cosine similarity between any two nodes in the semantic cluster, and subtract the cosine similarity between any two nodes from the value 1 to obtain the semantic sparsity value between the corresponding two nodes; The mean of all semantic sparse values is used as the semantic sparsity of each semantic cluster; For each node in the potential deletable node set, the semantic sparsity of the semantic cluster to which each node belongs is used as the semantic sparsity factor of the node. The remoteness index of each node is obtained by summing the minimum semantic distance, semantic saliency factor, and semantic sparsity factor of each node in the potential deletable node set. The remoteness index of each node in the potential deletable node set is normalized by Min-Max, and the normalization result is used as the knowledge island contribution value of each node in the potential deletable node set. In S4, the steps for calculating the non-deletable value of each node in the potential deletable node set based on the coupling strength value and knowledge island contribution value of each node are as follows: A two-dimensional coordinate system is established based on the coupling strength value and knowledge island contribution value of each node in the potential deletable node set, and the coupling strength value and knowledge island contribution value of each node are mapped to the two-dimensional coordinate system; the coordinate points correspond to the coupling strength value and knowledge island contribution value of each node respectively. Calculate the distance from the coordinate point of each node in the two-dimensional coordinate system to the centroid, and use the distance as the non-deletable value of each node in the corresponding potential deletable node set.
2. The method for constructing a knowledge base for power research results based on a large language model according to claim 1, characterized in that, In S1, the steps for performing activity analysis on the nodes in the original knowledge base and calculating the activity value of each node are as follows: Calculate the retrieval indirect response rate and misleading retrieval rate for each node in the original knowledge base, and subtract the misleading retrieval rate from the retrieval indirect response rate to obtain the activity value of each node.
3. The method for constructing a knowledge base for power research results based on a large language model according to claim 2, characterized in that, The steps for calculating the retrieval indirect response degree include: In the historical retrieval records of the original knowledge base, for each node, the total number of times the corresponding node and the retrieval result are connected by a second-order path is counted. The total number of times the second-order path is connected is divided by the total number of historical retrievals to obtain the indirect triggering ratio. For each node, the node is connected to the search result by a second-order path as an indirect trigger. The interval between the two most recent adjacent indirect triggers of each node is counted and recorded as the first interval. The average interval between all adjacent indirect triggers of all nodes is calculated and recorded as the second interval. The first interval is divided by the second interval to obtain the indirect trigger time sequence ratio. Subtracting the indirect triggering sequence ratio from the indirect triggering ratio yields the retrieval indirect response rate.
4. The method for constructing a knowledge base for power research results based on a large language model according to claim 2, characterized in that, The steps for calculating the misleading retrieval score are as follows: In the historical retrieval records of the original knowledge base, for each node, the total number of times the node was retrieved and the total number of times it was clicked by users are counted. The total number of times the node was clicked by users is divided by the total number of times the node was retrieved to obtain the non-acceptance rate. The timestamps of user clicks on the nodes are counted to obtain a click timestamp sequence. The time interval between all two adjacent clicks in the click timestamp sequence is calculated to obtain a time interval sequence. The difference between the maximum and minimum values in the time interval sequence is divided by the sum of the maximum and minimum values to obtain the standardized range. For each click on a node, the duration of each click is compared with the preset minimum effective click time. If it is less, the corresponding click is recorded as an invalid click. The total number of invalid clicks is divided by the total number of times the node is clicked by the user to obtain the click bounce rate. The misleading retrieval score is obtained by calculating the mean of the non-acceptance rate, standardized range, and click-bounce rate of each node in the original knowledge base.
5. The method for constructing a knowledge base for power research results based on a large language model according to claim 1, characterized in that, In S1, the steps for filtering the original knowledge base based on the activity value of each node to obtain the set of potential deletable nodes include: Compare the activity value of each node in the original knowledge base with the preset activity value threshold. If the activity value is less than the preset activity value threshold, the corresponding node is recorded as a potential deletable node, and all potential deletable nodes in the original knowledge base are used as a potential deletable node set. If the activity value is not less than the preset activity value threshold, the corresponding node will be recorded as an undeletable node, and all undeletable nodes will be retained in the original knowledge base.
6. The method for constructing a knowledge base for power research results based on a large language model according to claim 1, characterized in that, In S4, the steps to delete nodes from the set of potentially deletable nodes based on their non-deletable values to obtain a new knowledge base include: Compare the non-deletable value with the preset non-deletable value threshold. If the non-deletable value is less than the preset non-deletable value threshold, then the corresponding potential deletable node is recorded as a deleted node, and the power research results corresponding to the deleted node in the original knowledge base are deleted. If the non-deletable value is not less than the preset non-deletable value threshold, the corresponding potential deletable node is recorded as a non-deletable node, and the power research results corresponding to the non-deletable node are still retained in the original knowledge base.
Citation Information
Patent Citations
Method and system for constructing medical accelerator quality control knowledge base by using large language model
CN119416886A