A method for constructing a knowledge base of power scientific research results based on large language model
The method leverages a large language model and advanced text similarity calculation to improve keyword selection and integration efficiency in power scientific research knowledge bases, ensuring accurate and comprehensive information support.
Patent Information
- Application Number
- CN202410182755.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-19
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-02-19
AI Technical Summary
The existing knowledge bases for power scientific research results suffer from inaccurate keyword selection, insufficient text similarity calculation, and inefficient integration of complex and specialized content, hindering effective utilization and application of power field knowledge.
A method utilizing a large language model, specifically ChatGLM2-6B, for keyword expansion and domain discrimination, combined with a novel text similarity calculation method considering keyword information, context semantics, and text length, to construct a comprehensive knowledge base.
Enhances keyword accuracy and text similarity calculation, improving the integration efficiency and relevance of the knowledge base, providing detailed and flexible information support for power scientific research and applications.
Smart Images

Figure CN118093768B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge base construction, and in particular to a method for constructing an electric power scientific research achievement knowledge base based on a large language model. Background Art
[0002] The power industry is one of the pillar industries of modern society and has accumulated a large number of important research results. These results can promote energy efficiency, reduce pollution, improve grid stability, provide key technical support for the development of sustainable energy and the power industry, and help improve the quality of life and promote economic growth. However, the knowledge system in the power field is complex, including multiple aspects such as power generation, transmission, distribution and utilization, covering a wide range of fields such as motors, circuits, electronic technology, energy management, renewable energy and power systems, and is an interdisciplinary comprehensive knowledge. Therefore, it is difficult to fully utilize the power field knowledge contained in the power research results.
[0003] Knowledge graph is a method of organizing and retrieving information, which connects knowledge through a graphical structure. It enables knowledge to be understood, discovered and applied. In areas such as search engines, natural language processing and recommendation systems, knowledge graphs can improve the efficiency of information retrieval and understanding, and provide users with more accurate information. In addition, knowledge graphs can also support intelligent decision-making, data mining and semantic analysis, and promote search and application in different fields such as medicine, finance, education and scientific research.
[0004] For example, a Chinese patent with publication number CN105205341A discloses a method for implementing a model for the transformation of a power distribution network based on customer demands, firstly, data collection is performed; then an automatic rating model is constructed: indicators are constructed, weights are determined, and score mapping is performed in sequence; then, the transformation demand rating is performed: characteristic data of the target area is extracted, and based on the automatic rating model, the characteristic data is automatically calculated and scores are obtained, and the scores are divided into intervals, and finally the level of the transformation demand of the corresponding substation is obtained; the characteristic data includes the substation, 95598 work order, and marketing archive; then the rating output is performed: the results of the substation transformation demand rating are stored in the corresponding database for query; finally, the rating results are applied to the work of the power supply customer service center and the power operation and maintenance department. The present invention can focus on the distribution network substation with service risks, and guide the investment of distribution network transformation funds accordingly, eliminate service risks in a timely manner, reduce customer complaint rates, and improve customer satisfaction.
[0005] In summary, there are still many drawbacks in the construction of the existing knowledge base for power scientific research results, which are summarized as follows:
[0006] ① The accuracy of keyword selection in traditional methods is obviously insufficient in different fields;
[0007] ②The text similarity calculation effect cannot match the knowledge base of this power scientific research results;
[0008] ③The content of the knowledge base of electric power scientific research results is too large and special, and the current method cannot improve the integration efficiency. Summary of the invention
[0009] In view of the deficiencies in the prior art, the present invention provides a method for constructing an electric power scientific research achievement knowledge base based on a large language model to solve the above problems.
[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions.
[0011] A method for constructing a knowledge base of electric power scientific research results based on a large language model comprises the following steps:
[0012] S1. Build an original knowledge base of power scientific research results;
[0013] S2. Construct a keyword database of power research results based on a large language model;
[0014] S3. Building a knowledge base of power research results based on a large language model.
[0015] By using the prompt word project to use ChatGLM2-6B as a keyword expander and keyword field discriminator, a comprehensive and all-round supplement to keyword information is achieved. Compared with traditional methods, the technology of the present invention not only provides more keyword options, but also ensures the accuracy of these keywords in different fields, providing users with more comprehensive and in-depth information support; in addition, the text similarity calculation method adopted by the present invention demonstrates the superiority of comprehensive feature fusion by cleverly integrating keyword information, context semantics and text length; compared with the traditional cosine similarity calculation method, the present invention integrates multi-dimensional information to achieve an improvement in the text similarity calculation effect. The present invention fully mines the field knowledge contained in the language model, proposes an efficient text similarity calculation method, and ultimately improves the knowledge integration efficiency, enhances the content richness and relevance of the knowledge base, provides strong support for research and application in the power field, and provides a highly reliable solution for power scientific research and information processing.
[0016] S1 uses the Scrapy crawler framework to search for keywords related to the power discipline in HowNet, obtain the content corresponding to each keyword, perform data preprocessing on the obtained content, remove HTML tags and special characters in the text, and process missing data and abnormal characters; perform data deduplication based on the unique identifiers of the literature data, such as title and author, to prevent duplicate information from entering the knowledge base;
[0017] The step S2 is based on the original knowledge base and uses a large language model to expand the keyword information:
[0018] S2-1 includes utilizing the prior knowledge of the large language model as a keyword expander, using the prompt word engineering to expand the associated information of the keyword information in the original knowledge base, applying the large language model to specific tasks through the prompt word engineering, setting the task prompt words for generating associated keywords, giving a question-and-answer example for generating associated keywords, converting the large language model into an electric power keyword expander, and applying it in the keyword information expansion process.
[0019] S2-2 combines the keyword word library obtained in S2-1 with the word embedding model to obtain alias / synonym information and construct a keyword word library for power scientific research results.
[0020] Among them, S2-2 includes using the word embedding model to vectorize the expanded keyword vocabulary, considering the keyword information itself, the keyword context semantic information and the key text length for text similarity analysis, obtaining the keyword's alias / synonym information through a high threshold and classifying them into one category, and based on the BGE-Large-zh model, efficiently and comprehensively representing the keywords in the vector space.
[0021] A text similarity calculation method is also proposed based on the keyword vector, considering the keyword information, keyword context semantic information and key text length information. The proposed text similarity calculation method is as follows:
[0022]
[0023] Where: Similarity represents the text similarity between vectors A and B, V Ai 、V Bi Represents the components of keyword vectors A and B, T A , T B represents the set of keywords of the documents containing keyword A and keyword B, L A ,,L B They represent the length of keyword A and keyword B respectively. α, β, and γ are weight coefficients used to balance the keyword information, keyword context semantic information, and key text length information.
[0024] The similarity threshold selected is 0.95, which is used to implement the classification process of alias / synonymous keywords. The similarity threshold selected in the present invention is 0.95, which is used to implement the classification process of alias / synonymous keywords. Different threshold settings will lead to different synonymous keyword classification results. If it is set too high, some synonymous keywords may be missed. If it is set too low, it may lead to poor classification results. The decision to select a similarity threshold of 0.95 in the present invention is to achieve a balance between adaptability and accuracy in the classification of synonymous keywords. This choice is intended to more accurately capture the relevance of synonymous keywords when constructing the knowledge base, provide more refined and comprehensive information for the system's knowledge representation, and thus improve the adaptability and accuracy of the knowledge base;
[0025] The step S3 is to construct a knowledge base of electric power scientific research achievements based on the large language model, and the specific steps are as follows:
[0026] S3-1: Use large language models and prompt word engineering to obtain domain information of keywords;
[0027] Among them, the S3-1 includes setting a prompt word to convert the large language model into a keyword field discriminator, so that the large language model can determine the field information of the input keyword, and then filter based on the keyword thesaurus of power scientific research results to exclude fields that are not closely related to scientific research activities in the power field.
[0028] S3-2: Build a knowledge base of power scientific research results,
[0029] Among them, the electric power scientific research results knowledge base combines the original knowledge base information of electric power scientific research results keywords, the electric power scientific research results keyword vocabulary information and the domain information of keywords generated by S3-1.
[0030] The present invention proposes a new text similarity calculation method based on keyword vectors, taking into account the keyword information itself, keyword context semantic information and key text length information. The text similarity calculation method based on keyword vectors of the present invention not only fully considers the information of the keyword itself, but also realizes comprehensive consideration of keyword information through comprehensive analysis of keyword context semantic information. Compared with traditional methods, our technology more comprehensively and accurately reflects the complex semantics and context of keywords in text similarity calculation. By combining keyword context semantic information;
[0031] The text similarity calculation method of the present invention can more accurately capture the semantic association of keywords, and improve the accuracy of text similarity calculation. This feature enables the present invention to more accurately measure text similarity in different fields and contexts, and provide users with more accurate information matching. Finally, the consideration of key text length information makes our text similarity calculation more intelligent and flexible. When comparing texts of different lengths, our technology can make trade-offs based on the specific circumstances, ensuring that the similarity calculation results are more objective and reasonable, and providing users with more comprehensive information matching services.
[0032] Preferably, in step S1, keywords are filtered based on the TF IDF statistical model to obtain keywords related to electric power scientific research activities.
[0033] Preferably, the correlation calculation index of the keyword is:
[0034]
[0035] Among them, F keywords is the keyword relevance index, N td N represents the number of times the document keyword t appears in the corresponding document abstract d. d Indicates the number of keywords contained in a document, N indicates the total number of documents, and N t Indicates the number of documents containing keyword t in the abstract.
[0036] Preferably, the F of all keywords obtained keywords The indexes are sorted to get the maximum value F max , the index of keyword i is F keywords (i), then F keywords (i)<0.1F max The original knowledge base of electric power scientific research results was constructed based on keyword filtering.
[0037] Preferably, the large language model of step S2-1 adopts ChatGLM2-6B for keyword expansion, and ChatGLM2-6B is used as a keyword expander. The large language model in the present invention adopts ChatGLM2-6B, which not only has excellent performance in language understanding, but is also successfully applied to keyword expansion in the present invention. By using ChatGLM2-6B as a keyword expander, our technology can use its rich knowledge base to expand keywords in a smarter and more comprehensive way, providing users with more detailed and in-depth information.
[0038] Preferably, the specific method of applying the large language model to a specific task through prompt word engineering in step S2-1 is: firstly, a phrase or sentence is set to provide the model with specific task information to be performed.
[0039] Preferably, the specific method of step S2-1 also provides contextual information related to the task to help the model understand the requirements of the task; and finally provides the text data that actually needs to be processed by the model.
[0040] Preferably, in step S2-2, the keywords are efficiently and comprehensively semantically represented in the vector space based on the BGE-Large-zh model, and the keywords are finally represented in the following form:
[0041] h X =BGE(K)
[0042] H i1 =[h X +p0,...,h X +p N ]
[0043] H i2 =[h X ,e1+p1,...,e N +p N ]
[0044]
[0045] Among them, K represents the keyword, H i1 , H i2 is the input of the word vector, h X is keyword embedding, e i is the Token embedding of keyword characters, p i is the position embedding of the keyword characters, V is the keyword representation vector, n is the number of keyword characters, V i is the character representation vector, W i1 , W i2 , W i3 is the weight.
[0046] Preferably, the step S3-1 provides a question-and-answer example for determining the keyword domain by setting a task prompt word for determining the keyword domain information, converts the large language model into an electric power keyword domain discriminator, and obtains the keyword domain information.
[0047] Preferably, the electric power scientific research achievement knowledge base includes document titles, authors, abstracts, keywords, aliases / synonymous information of keywords and field information.
[0048] Compared with the prior art, the present invention discloses a method for constructing a knowledge base of electric power scientific research achievements based on a large language model, and uses ChatGLM2-6B as a keyword expander and keyword domain discriminator by using prompt word engineering, thereby achieving an all-round and comprehensive supplement to keyword information.
[0049] ① Compared with traditional methods, the technology of the present invention not only provides more keyword options, but also ensures the accuracy of these keywords in different fields, providing users with more comprehensive and in-depth information support;
[0050] ② In addition, the text similarity calculation method adopted by the present invention demonstrates the superiority of comprehensive feature fusion by cleverly integrating keyword information, contextual semantics and text length;
[0051] ③ Compared with the traditional cosine similarity calculation method, the present invention integrates multi-dimensional information and improves the text similarity calculation effect. The present invention fully mines the domain knowledge contained in the language model and proposes an efficient text similarity calculation method, which ultimately improves the knowledge integration efficiency and enhances the content richness and relevance of the knowledge base, providing strong support for research and application in the power field and providing a highly reliable solution for power scientific research and information processing;
[0052] ④ The large language model in the present invention adopts ChatGLM2-6B, which not only has excellent performance in language understanding, but is also successfully applied to keyword expansion in the present invention. By using ChatGLM2-6B as a keyword expander, our technology can use its rich knowledge base to expand keywords in a smarter and more comprehensive way, providing users with more detailed and in-depth information;
[0053] ⑤ The present invention proposes a new text similarity calculation method based on keyword vectors, taking into account the keyword information itself, keyword context semantic information and key text length information. The text similarity calculation method based on keyword vectors of the present invention not only fully considers the information of the keyword itself, but also realizes comprehensive consideration of keyword information through comprehensive analysis of keyword context semantic information. Compared with traditional methods, our technology more comprehensively and accurately reflects the complex semantics and context of keywords in text similarity calculation. By combining keyword context semantic information;
[0054] ⑥ The text similarity calculation method of the present invention can more accurately capture the semantic association of keywords, thereby improving the accuracy of text similarity calculation. This feature enables the present invention to more accurately measure text similarity in different fields and contexts, providing users with more accurate information matching. Finally, the consideration of key text length information makes our text similarity calculation more intelligent and flexible. When comparing texts of different lengths, our technology can make trade-offs based on the specific circumstances, ensuring that the similarity calculation results are more objective and reasonable, and providing users with more comprehensive information matching services;
[0055] ⑦ The similarity threshold selected in the present invention is 0.95, which is used to implement the classification process of alias / synonymous keywords. Different threshold settings will lead to different synonym keyword classification results. If it is set too high, some synonymous keywords may be missed. If it is set too low, it may lead to poor classification results. The decision to select a similarity threshold of 0.95 in the present invention is to achieve a balance between adaptability and accuracy in the classification of synonymous keywords. This choice is intended to more accurately capture the relevance of synonymous keywords when constructing the knowledge base, provide more detailed and comprehensive information for the system's knowledge representation, and thus improve the adaptability and accuracy of the knowledge base. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a method for constructing a knowledge base of electric power scientific research achievements based on a large language model of the present invention;
[0057] Figure 2 It is the prompt word design of the keyword expansion of the present invention and some question and answer results;
[0058] Figure 3 It is the classification result of some synonymous keywords under different thresholds of the present invention;
[0059] Figure 4 It is the prompt word design and part of the question and answer results of the keyword field discrimination of the present invention. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present invention will be described clearly and completely 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, rather than all the embodiments.
[0061] A method for constructing a knowledge base of power scientific research results based on a large language model, such as Figure 1 As shown, the following steps are included:
[0062] S1. Construct the original knowledge base of power scientific research results. The specific methods are as follows:
[0063] By using the Scrapy crawler framework, we searched the power science-related keywords in CNKI and obtained 3,000 documents corresponding to each keyword.
[0064] The present invention performs data preprocessing on the acquired content, removes HTML tags and special characters in the text, and processes missing data and abnormal characters; performs data deduplication based on the unique identifiers of the literature data, such as title and author, to prevent duplicate information from entering the knowledge base; filters keywords based on the TF IDF statistical model to obtain keywords related to power scientific research activities, and the correlation calculation index of the keywords is:
[0065]
[0066] Among them, F keywords is the keyword relevance index, N td N represents the number of times the document keyword t appears in the corresponding document abstract d. d Indicates the number of keywords contained in a document, N indicates the total number of documents, and N t Indicates the number of documents containing keyword t in the abstract.
[0067] The present invention obtains the F of all keywords keywords The indexes are sorted to get the maximum value F max , the index of keyword i is F keywords (i), then F keywords (i)<0.1F max Through keyword filtering, we finally obtained 10,631 documents and 19,879 keywords, and built an original knowledge base of power research results based on them. The knowledge base contains key information such as the unique identifier, title, author, and abstract of the article, providing rich data support for research and application in the power field.
[0068] S2. Construct a keyword database of power research results based on the large language model. The specific steps are as follows:
[0069] S2-1: Based on the original knowledge base, the keyword information is expanded using a large language model;
[0070] Among them, S2-1 includes utilizing the characteristics of the large language model with rich prior knowledge, using it as a keyword expander, and using prompt word engineering to expand the related information of the keyword information in the original knowledge base.
[0071] The present invention applies the large language model to specific tasks through the prompt word engineering. The specific method is: first, set a phrase or sentence to provide the model with specific task information to be performed; second, provide context information related to the task to help the model better understand the requirements of the task; finally, provide the text data that actually needs to be processed by the model. By setting the task prompt words for generating related keywords and giving a question-and-answer example for generating related keywords, the large language model is converted into an electric keyword expander and applied in the keyword information expansion process, such as Figure 2 As shown in the figure, after expansion and deduplication, 63,874 keywords were finally obtained. This process combines the power field expertise contained in the large language model with the keywords, thereby enriching the relevant vocabulary information of the keywords.
[0072] The large language model in this invention adopts ChatGLM2-6B, which not only has excellent performance in language understanding, but is also successfully applied to keyword expansion in this invention. By using ChatGLM2-6B as a keyword expander, our technology can use its rich knowledge base to expand keywords in a smarter and more comprehensive way, providing users with more detailed and in-depth information.
[0073] S2-2: Combine the keyword thesaurus obtained in S2-1 with the word embedding model to obtain alias / synonym information and construct a keyword thesaurus for power research results.
[0074] Among them, S2-2 includes using the word embedding model to vectorize the expanded keyword vocabulary, performing text similarity analysis considering the keyword information itself, keyword context semantic information and key text length, obtaining the keyword's alias / synonym information through a high threshold, and classifying them into one category.
[0075] The present invention uses the BGE-Large-zh model to efficiently and comprehensively represent the keywords in the vector space. The final keywords are represented in the following form:
[0076] h X =BGE(K)
[0077] H i1 =[h X +p0,…,h X +p N ]
[0078] H i2 =[h X ,e1+p1,…,e N +p N ]
[0079]
[0080] Among them, K represents the keyword, H i1 , H i2 is the input of the word vector, h X is keyword embedding, e i is the Token embedding of keyword characters, p i is the position embedding of the keyword characters, V is the keyword representation vector, n is the number of keyword characters, V i is the character representation vector, W i1 , W i2 , W i3 is the weight.
[0081] The present invention proposes a new text similarity calculation method based on keyword vectors, considering the keyword information itself, keyword context semantic information and key text length information. The text similarity calculation method based on keyword vectors of the present invention not only fully considers the information of the keyword itself, but also realizes comprehensive consideration of keyword information through comprehensive analysis of keyword context semantic information. Compared with traditional methods, our technology reflects the complex semantics and context of keywords more comprehensively and accurately in text similarity calculation. By combining keyword context semantic information, the text similarity calculation method of the present invention can more accurately capture the semantic association of keywords and improve the accuracy of text similarity calculation. This feature enables the present invention to measure text similarity more accurately in different fields and contexts, providing users with more accurate information matching. Finally, the consideration of key text length information makes our text similarity calculation more intelligent and flexible. When comparing texts of different lengths, our technology can make a trade-off according to the specific situation, ensure that the similarity calculation results are more objective and reasonable, and provide users with more comprehensive information matching services. The text similarity calculation method proposed in this article is as follows:
[0082]
[0083] Where: Similarity represents the text similarity between vectors A and B, V Ai 、V Bi Represents the components of keyword vectors A and B, T A , T B represents the set of keywords of the documents containing keyword A and keyword B, L A ,,L B They represent the length of keyword A and keyword B respectively. α, β, and γ are weight coefficients used to balance the contribution of keyword information, keyword context semantic information, and key text length information.
[0084] The similarity threshold selected in the present invention is 0.95, which is used to implement the classification process of alias / synonymous keywords. Different threshold settings will lead to different synonym keyword classification results. If it is set too high, some synonym keywords may be missed. If it is set too low, it may lead to poor classification results.
[0085] like Figure 3As shown, in the present invention, by observing the classification results corresponding to different thresholds, it can be clearly seen that a similarity threshold of 0.95 can more accurately capture keywords with high similarity, such as "non-linear optimization method" and "non-linear optimization algorithm". In contrast, the threshold settings of 0.90 and 0.93 may result in more redundant information in the results, while a threshold of 0.96 may result in the omission of some similar keywords. Therefore, the decision to select a similarity threshold of 0.95 in the present invention is to achieve a balance between adaptability and accuracy in the classification of synonymous keywords. This choice is intended to more accurately capture the relevance of synonymous keywords when constructing a knowledge base, provide more refined and comprehensive information for the system's knowledge representation, and thus improve the adaptability and accuracy of the knowledge base.
[0086] The present invention finally undergoes classification of alias / synonymous keywords, and the new keyword thesaurus includes 50,448 keywords and their alias / synonymous information.
[0087] The text similarity calculation method of the present invention is based on keyword vectors, and comprehensively considers the keyword information itself, keyword context semantic information and key text length information. Compared with the traditional cosine similarity calculation method, our technology has achieved remarkable improvement in the accuracy of text matching, providing users with more accurate matching results. At the same time, through the flexible application of keyword vectors, the present invention can achieve efficient adaptability in different fields and scenarios, providing users with more flexible and accurate text similarity calculation services.
[0088] S3. Constructing a knowledge base of power scientific research results based on a large language model. The specific steps are as follows:
[0089] S3-1: Use large language models and prompt word engineering to obtain domain information of keywords;
[0090] Wherein, the S3-1 includes setting a prompt word to convert the large language model into a keyword domain discriminator, so that the large language model can determine the domain information of the input keyword.
[0091] The present invention sets task prompts for distinguishing keyword domain information, gives question-answering examples for distinguishing keyword domains, and transforms the large language model into an electric keyword domain discriminator, which is applied in the process of obtaining keyword domain information, such as Figure 4 As shown. In the present invention, ChatGLM2-6B is not only a keyword expander, but also successfully applied to keyword domain identification. Our technology can use the context understanding ability of ChatGLM2-6B to accurately determine the domain of the keyword, thereby improving the accuracy of keyword domain identification. This feature makes our technology more outstanding when dealing with complex keyword scenarios.
[0092] The present invention is based on the keyword thesaurus of power scientific research results. After filtering, the fields that are not closely related to scientific research activities in the power field are excluded, and finally 40739 keywords are obtained.
[0093] S3-2: Build a knowledge base of power scientific research results.
[0094] Among them, the electric power scientific research results knowledge base combines the original knowledge base information of electric power scientific research results keywords, the electric power scientific research results keyword vocabulary information and the field information of keywords generated by S3-1; among them, the electric power scientific research results knowledge base contains document titles, authors, abstracts, keywords, aliases / synonyms of keywords and field information.
[0095] The present invention combines keyword information with the original knowledge base, and the finally constructed electric power scientific research achievement knowledge base contains information of 10,631 documents such as the unique identifier, title, author and abstract of the article, as well as 40,739 keywords and their corresponding alias / synonymous information and field information.
[0096] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0097] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for constructing a knowledge base of electric power scientific research results based on a large language model, characterized in that , including the following steps: S1. Build an original knowledge base of power scientific research results; S2. Construct a keyword database of power research results based on a large language model; S3. Build a knowledge base of power scientific research results based on a large language model. S1 uses the Scrapy crawler framework to search for keywords related to the power discipline in HowNet, obtain the content corresponding to each keyword, perform data preprocessing on the obtained content, remove HTML tags and special characters in the text, and handle missing data and abnormal characters; perform data deduplication based on the unique identifiers of the literature data, including title and author, to prevent duplicate information from entering the knowledge base; The step S2 is based on the original knowledge base and uses a large language model to expand the keyword information: S2-1 includes utilizing the prior knowledge of the large language model as a keyword expander, using the prompt word engineering to expand the associated information of the keyword information in the original knowledge base, applying the large language model to specific tasks through the prompt word engineering, setting the task prompt words for generating associated keywords, giving a question-and-answer example for generating associated keywords, converting the large language model into an electric power keyword expander, and applying it in the keyword information expansion process. S2-2 combines the keyword word library obtained in S2-1 with the word embedding model to obtain alias / synonym information and construct a keyword word library for power scientific research results. Among them, S2-2 includes using the word embedding model to vectorize the expanded keyword vocabulary, considering the keyword information itself, the keyword context semantic information and the key text length for text similarity analysis, obtaining the keyword's alias / synonym information through a high threshold and classifying them into one category, and based on the BGE-Large-zh model, efficiently and comprehensively representing the keywords in the vector space. A text similarity calculation method is also proposed based on the keyword vector, considering the keyword information, keyword context semantic information and key text length information. The proposed text similarity calculation method is as follows: Where: Similarity represents the text similarity between vectors A and B, V Ai 、V Bi Represents the vector V corresponding to keyword A and keyword B A and V B The i-th component of A , T B represents the set of keywords of the documents containing keyword A and keyword B, L A , L B They represent the length of keyword A and keyword B respectively. α, β, and γ are weight coefficients used to balance the keyword information, keyword context semantic information, and key text length information. The similarity threshold selected is 0.95, which is used to implement the classification process of alias / synonymous keywords; The step S3 is to construct a knowledge base of electric power scientific research achievements based on the large language model, and the specific steps are as follows: S3-1: Use large language models and prompt word engineering to obtain domain information of keywords; Among them, the S3-1 includes setting a prompt word to convert the large language model into a keyword field discriminator, so that the large language model can determine the field information of the input keyword, and then filter based on the keyword thesaurus of power scientific research results to exclude fields that are not closely related to scientific research activities in the power field. S3-2: Build a knowledge base of power scientific research results, Among them, the electric power scientific research results knowledge base combines the original knowledge base information of electric power scientific research results, the keyword vocabulary information of electric power scientific research results and the field information of keywords generated by S3-1.
2. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 1, characterized in that: In the step S1, keywords are filtered based on the TF IDF statistical model to obtain keywords related to electric power scientific research activities.
3. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 2 is characterized in that: The relevance calculation index of the keyword is: Among them, F keywords is the keyword relevance index, N td N represents the number of times the document keyword t appears in the corresponding document abstract d. d Indicates the number of keywords contained in a document, N indicates the total number of documents, and N t Indicates the number of documents containing keyword t in the abstract.
4. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 3 is characterized in that: Get all keywords F keywords The indexes are sorted to get the maximum value F max , the index of keyword k is F keywords (k), then F keywords (k)<0.1F max The original knowledge base of power scientific research results was constructed based on keyword filtering.
5. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 1, characterized in that: The large language model in step S2-1 adopts ChatGLM2-6B for keyword expansion, and ChatGLM2-6B is used as a keyword expander.
6. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 5 is characterized in that: The specific method of applying the large language model to a specific task through the prompt word engineering in step S2-1 is: firstly set a phrase or sentence to provide the model with specific task information to be performed.
7. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 6 is characterized in that: The specific method of step S2-1 also provides contextual information related to the task to help the model understand the requirements of the task; and finally provides the text data that actually needs to be processed by the model.
8. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 7, characterized in that: In step S2-2, the keywords are efficiently and comprehensively semantically represented in the vector space based on the BGE-Large-zh model, and the keywords are finally represented in the following form: Among them, K represents the keyword, H j1 , H j2 is the input of the word vector, h x is keyword embedding, e a is the Token embedding of keyword characters, p a is the position embedding of keyword characters, V is the keyword representation vector, m is the number of keyword characters, V j is a character representation vector, W j1 , W j2 , W j3 is the weight, and BGE() represents the BGE-Large-zh model.
9. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 1, characterized in that: The step S3-1 sets task prompt words for distinguishing keyword domain information, provides question-and-answer examples for distinguishing keyword domains, converts the large language model into an electric power keyword domain discriminator, and obtains keyword domain information.
10. The method for constructing a knowledge base of electric power scientific research achievements based on a large language model according to claim 1, characterized in that: The electric power scientific research achievement knowledge base includes document titles, authors, abstracts, keywords, aliases / synonymous information of keywords and field information.
