Archive knowledge editing and research method, system and equipment and storage medium

By constructing a quadruple knowledge graph and using prompt engineering technology, accurately positioning and rewriting the editing and research needs, the problem of insufficient knowledge coverage in the proprietary field of large language models is solved, and more accurate and credible archival knowledge editing and research results are achieved.

CN119623604AActive Publication Date: 2025-03-14STATE GRID TIANJIN ELECTRIC POWER COMPANY +1

Patent Information

Application Number
CN202510148562.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-03-14
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

The insufficient knowledge coverage of large language models in proprietary fields leads to insufficient expression of knowledge characteristics and insufficient knowledge reasoning ability, and prone to knowledge hallucinations.

Method used

By constructing a quadruple-based archive knowledge graph, accurately locate archive materials that match the editing and research needs, use prompt engineering technology to rewrite the editing and research requirements information, generate the editing and research description, determine the target quadruple and associate additional features, and finally input the relevant input information into the large language model to generate the editing and research results.

Benefits of technology

It improves the accuracy of input instructions of the large language model, overcomes the illusion of the large language model, improves the credibility and text quality of the target editing content of the output, and enhances the depth and breadth of the editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623604A_ABST
    Figure CN119623604A_ABST
Patent Text Reader

Abstract

The invention provides an archive knowledge editing and research method, system and device and a storage medium, and the method comprises the steps: obtaining editing and research demand information and an archive knowledge graph, and rewriting the editing and research demand information through employing a prompt engineering technology, and obtaining an editing and research description; in the archive knowledge graph, determining and recalling a target tetrad matched with the editing and research description; determining an additional feature according to a demand type associated with the editing and research description, and associating the additional feature with the target tetrad; and taking the target tetrad, the source text associated with the target tetrad, the additional features associated with the target tetrad and the editing and research description as input information of a large language model, and outputting an archive knowledge editing and research result through the large language model. According to the technical scheme, the accuracy level of the input instruction of the large language model is improved, the illusion of the large language model can be overcome, and the credibility and the text quality of the target editing and research content output by the large language model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of archival data processing, and in particular to an archival knowledge compilation and research method, system, device and storage medium. Background Art

[0002] Archival knowledge is unstructured and fragmented. When compiling and researching archival knowledge, it is necessary to accurately extract core knowledge elements from massive archival texts, images and other resources to reveal the semantic associations between elements. At present, relevant technical personnel directly input archival knowledge analysis requirements into the large language model, and the large language model automatically outputs the corresponding archival knowledge analysis results. Although the large language model has advantages in semantic understanding and generation capabilities, it has insufficient knowledge coverage in proprietary fields, and faces the problems of insufficient expression of knowledge features and insufficient knowledge reasoning capabilities, which makes it easy to have knowledge hallucinations, that is, the generated content does not match the actual situation. Therefore, how to improve the accuracy of archival knowledge compilation and research results has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide an archival knowledge compilation and research method, system, device and storage medium, which are intended to solve the problems of insufficient knowledge coverage of large language models in proprietary fields in related technologies, insufficient expression of knowledge features and insufficient knowledge reasoning capabilities, which easily lead to the phenomenon of knowledge hallucination, that is, the technical problem that the generated content does not match the actual situation.

[0004] In a first aspect, an embodiment of the present application provides a method for compiling and researching archive knowledge, and the method is applicable to a power system and includes: Obtaining editing and research demand information and an archival knowledge graph, and rewriting the editing and research demand information using a prompt engineering technique to obtain an editing and research description, wherein the archival knowledge graph is constructed based on quadruples extracted from the text to be extracted, and the text to be extracted is the archival material obtained in advance; In the archive knowledge graph, determine and recall the target quadruple that matches the editing and research description; Determine additional features according to the type of requirements associated with the compilation and research description, and associate the additional features with the target quadruple, wherein the additional features are used to determine the proportion of the description text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results; The target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple and the compilation description are used as input information of the large language model, and the archive knowledge compilation result is output through the large language model.

[0005] In a second aspect, an embodiment of the present application provides an archive knowledge compilation and research system, which is applicable to a power system and includes: An acquisition module is used to acquire editing and research demand information and an archive knowledge graph, and rewrite the editing and research demand information using a prompt engineering technique to obtain an editing and research description. The archive knowledge graph is constructed based on the quadruple extracted from the text to be extracted, and the text to be extracted is the pre-acquired archive material; A recall module, used to determine and recall a target quadruple matching the editing and research description in the archive knowledge graph; A determination module, used to determine additional features according to the type of requirements associated with the compilation and research description, and associate the additional features with the target quadruple, wherein the additional features are used to determine the proportion of the description text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results; The compilation and research module is used to use the target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple and the compilation and research description as input information of the large language model, and output the archive knowledge compilation and research results through the large language model.

[0006] In a third aspect, an embodiment of the present application provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the method described in the first aspect above.

[0008] The above technical solution, by constructing a quadruple-based archival knowledge graph, accurately locates archival materials that match editing and research needs, rewrites editing and research demand information with the help of prompt engineering technology to generate editing and research descriptions, and then determines the target quadruple and associates additional features, and finally inputs the relevant input information into the large language model to generate editing and research results. This process not only improves the accuracy of the input instructions of the large language model, helps to overcome the illusion of the large language model, and improves the credibility and text quality of the target editing and research content output by the large language model, but also can flexibly adjust the editing and research ideas and perspectives according to different needs, and expand the depth and breadth of editing and research. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0010] Figure 1 A schematic diagram of a method for compiling and researching archive knowledge provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of a method for compiling and researching archive knowledge provided in an embodiment of the present application is shown; Figure 3 A flowchart of a system for compiling and researching archive knowledge according to an embodiment of the present application is shown; Figure 4 A schematic diagram showing a process of generating editing and researching content according to an embodiment of the present application is shown; Figure 5 A block diagram of a computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0011] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0012] This method is applicable to power systems, especially archival knowledge compilation and research in power system scenarios. The archival knowledge compilation and research of power system involves in-depth systematic organization, detailed analysis and comprehensive research of archival materials related to power systems, aiming to transform these materials into knowledge resources with practical application value. These knowledge resources play an important supporting role in all aspects of power system planning, design, operation and maintenance, and can help relevant personnel make decisions and operate more efficiently.

[0013] The archive knowledge graph is a way of organizing information. It visualizes various information elements and their relationships in the power system archives by constructing a graphical data structure. This graph can not only reveal the inherent connections between archival materials, but also provide users with intuitive query and analysis tools, thereby greatly improving the retrieval efficiency and utilization value of archival materials. Through the archival knowledge graph, users can quickly locate the required information and deeply explore the deep knowledge behind the archival materials, thereby providing strong data support for the optimization and innovation of the power system.

[0014] The present application embodiment provides a method for compiling and researching archive knowledge, such as Figure 1 As shown, the method includes: 101. Obtain editing and research demand information and archival knowledge graph, and use prompt engineering technology to rewrite the editing and research demand information to obtain editing and research description. The archival knowledge graph is constructed based on the quadruple extracted from the text to be extracted, and the text to be extracted is the archival material obtained in advance.

[0015] Among them, in the process of building the archives knowledge graph, the quadruple is a basic data structure used to represent entities, relationships and time in the archives. The quadruple can more comprehensively describe the complex information and temporal relationships in the archives, which not only helps to deeply explore the potential value in the archives, but also enhances the understanding and analysis capabilities of the archives content.

[0016] The archival knowledge graph organizes and represents archival materials in the form of a graph. It extracts time, entities and the relationships between them from archival texts through technologies such as entity recognition and relationship extraction, and constructs a knowledge network in the form of nodes and edges. In this technical solution, the archival knowledge graph is constructed based on the quadruple extracted from the text to be extracted. The text to be extracted is the pre-acquired archival material, that is, the currently available archival material. By extracting these materials before specific editing and research needs, preparations can be made for various subsequent specific editing and research. The archival knowledge graph can intuitively display the internal connections and knowledge structure of archival materials, providing strong support for editing and research work.

[0017] Prompt engineering is the process of designing and improving input prompts to guide large language models (LLMs) to generate accurate and insightful outputs. In this solution, by using prompt engineering technology to rewrite the editing and research requirements information and obtain the editing and research description, a clearer and more targeted task instruction can be issued to the large language model. In this way, the model can better understand and focus on the core points of the editing and research requirements, so that in the subsequent archival knowledge graph retrieval and editing and research result generation process, it can more accurately match and extract relevant information, thereby improving the efficiency and quality of editing and research work.

[0018] The results of archival knowledge compilation and research refer to the results formed through in-depth research, analysis and organization of archival materials. They are usually presented in the form of text, charts, etc., and can provide valuable information and insights for specific research topics or practical needs. In this technical solution, with the help of archival knowledge graphs, prompt engineering technology, and large language models, the automatic and intelligent generation of archival knowledge compilation and research results is realized. This kind of compilation and research results are not only more accurate, comprehensive and in-depth in content, but also more readable and practical in form. They can better meet the needs of different users for archival materials and improve the service efficiency and social value of archival work.

[0019] 102. In the archival knowledge graph, identify and recall the target quadruple that matches the editorial description.

[0020] In the embodiment of the present application, the compilation and research description clarifies the theme, focus and other information of the compilation and research. By searching and matching in the archive knowledge graph, the quadruple related to it can be found. The entities, relationships and other information contained in these target quadruple are the core content that is focused on and needs to be deeply explored in the compilation and research work. For example, if the compilation and research description is a study on the technological development status of a certain historical period, then the target quadruple can be a quadruple of entities and their relationships related to the specific time, innovative processes, technical parameters, technological achievements, etc. that match the technological development status of that period. They provide an accurate material basis for the subsequent compilation and research content generation.

[0021] 103. According to the demand type of the compilation and research description association, determine the additional features and associate the additional features with the target quadruple. The additional features are used to determine the proportion of the descriptive text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results.

[0022] In the embodiment of the present application, the additional features are determined according to the type of requirements associated with the compilation and research description, and are used to quantify and guide the proportion of the descriptive text corresponding to the target quadruple in the archival knowledge compilation and research results. The introduction of additional features makes the compilation and research work more efficient and targeted, and also provides a new perspective and method for the in-depth mining and utilization of archival knowledge.

[0023] 104. The target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple, and the compilation and research description are used as input information of the large language model, and the archive knowledge compilation and research results are output through the large language model.

[0024] In the embodiment of the present application, the large language model is a model with powerful language understanding and generation capabilities that is built by training on massive text data based on deep learning technology. It can understand the semantics of input information and generate coherent, accurate, and logical text output based on this information. In this technical solution, the target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple, and the compilation description are used as input information. The large language model will comprehensively consider this information and use its internal complex algorithms and knowledge reserves to generate the final archival knowledge compilation results.

[0025] The archival knowledge compilation and research method provided in this embodiment constructs an archival knowledge graph based on quadruple, accurately locates archival materials that match the compilation and research needs, rewrites the compilation and research demand information with the help of prompt engineering technology to generate a compilation and research description, and then determines the target quadruple and associates additional features, and finally inputs the relevant input information into the large language model to generate the compilation and research results. This process not only improves the accuracy level of the input instructions of the large language model, helps to overcome the illusion of the large language model, and improves the credibility and text quality of the target compilation and research content output by the large language model, but also can flexibly adjust the compilation and research ideas and perspectives according to different needs, and expand the depth and breadth of the compilation and research.

[0026] Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the implementation process of this embodiment, the embodiment of the present application provides a method for compiling and researching archive knowledge, such as Figure 2 As shown, the method includes: 201, obtaining the editing and research requirement information, and rewriting the editing and research requirement information by using the prompt engineering technology to obtain the editing and research description.

[0027] The research demand information for the power system reflects the research demand in the operation and management of the power system. For example, the research demand information can be input into the research system as "the financial status of Company A", etc. In short, the research demand information reflects the subject of the content to be researched.

[0028] Furthermore, for specific research and development requirement information, prompt engineering technology can be used to rewrite its expression into a more targeted research and development description. In the embodiment of the present application, the instruction template of "task description-requirements to be rewritten" is used as the input of each rewriting task of the large model. The Prompt template for pre-formulated requirement rewriting is as follows: "Rewrite the following research requirement information into a suitable research description to facilitate database index query. Note that only the rewritten content is output. Research requirement information: {query_text}." Then use the user's research requirement information Replace the {query_text} placeholder in the template to get the prompt text , the model is rewritten and output as a research description Prompt engineering guides the model to generate the desired output text by providing initial text prompts or questions, allowing users to interact with the model in natural language and guide the model to generate the required text through appropriate prompts.

[0029] 202. Build archival knowledge graph and knowledge index.

[0030] In an embodiment of the present application, the system first reads the archival materials stored in the preset storage space as the text to be extracted. Then, the pre-trained information extraction model is used to identify the entities in the text to be extracted, the relationships between the entities, and the related time information to form a quadruple, that is, the quadruple includes entities, relationships, and time. Among them, time, as an important dimension in the knowledge graph, can record the specific time point or time range of the event, and has important application value. It should be noted that when the text to be extracted is input into the information extraction model for quadruple extraction, the metadata associated with the text to be extracted can also be synchronously input into the information extraction model, so that the information extraction model can better understand the text content of the text to be extracted. Furthermore, based on the quadruple, the knowledge graph is quickly constructed, and the knowledge graph realizes the effective association between different document knowledge, which will serve as the basis for generating content for archive compilation and research, ensuring the integrity and reliability of automatic compilation and research content.

[0031] It should be noted that in order to improve the extraction effect of the information extraction model, the information extraction model is obtained by supervised fine-tuning and / or low-rank adaptive fine-tuning of the model parameters of the historical text information extraction model based on the training set. The training set is obtained by knowledge distillation of the historical information set. The specific training process is as follows: First, we can set up an initial historical text information extraction model, which is basic and used for subsequent processing. Then, we collect a series of historical information, which constitutes a collection. This collection includes the historical archival materials themselves and the metadata information corresponding to these archival materials. In addition, it also includes historical quadruplets corresponding to the historical archival materials, which can provide additional contextual information and help to understand the historical materials more accurately. In this way, we can construct a high-quality unlabeled text dataset. This dataset not only contains rich historical information, but also ensures the diversity and breadth of data coverage due to the diversity of its sources, thus providing a solid foundation for subsequent analysis and research.

[0032] Next, knowledge distillation is performed on the historical information set mentioned above to obtain a training set. Specifically, according to the principle of knowledge distillation, the knowledge possessed by the teacher model is transferred to the student model. In this process, those teacher models with excellent performance, such as the popular GPT series and other closed-source large models, are selected to perform in-depth extraction and annotation work on the high-quality unlabeled text dataset mentioned above, and finally form a training set. The knowledge distillation mentioned above refers to the requirement that the teacher model can provide accurate hard labels for the four-tuple entities, relations, and time in the original text in the absence of available labeled data. The hard label refers to the most likely category label, that is, the predicted probability distribution of all categories. The student model will use these hard labels for training and learn how to identify four-tuple entities, relations, and time in the text. The main advantage of using hard labels is that it simplifies the training process while ensuring that the student model can accurately reproduce the decision-making process of the teacher model. Therefore, by training directly with hard labels, the student model can adapt faster and focus on the execution of core tasks. This approach reduces the complexity required for the model to interpret soft labels, thereby improving training efficiency and model performance.

[0033] Furthermore, based on the training set, the historical text information extraction model is fine-tuned to obtain the information extraction model. In this process, the methods of fine-tuning the historical text information extraction model include supervised fine-tuning (SFT) and low-rank adaptation fine-tuning (LoRA). Among them, supervised fine-tuning is used to adapt the historical text information extraction model to specific goals, and low-rank adaptation fine-tuning is used to achieve efficient parameter fine-tuning of the historical text information extraction model.

[0034] Finally, the vLLM framework is used to deploy the information extraction model.

[0035] The model parameters of the historical text information extraction model are fine-tuned in a supervised manner, including using the following formula 1 to minimize the loss function of the historical text information extraction model on the historical information set. Formula 1:

[0036] in, is the minimum value of the loss function, is the model parameter of the historical text information extraction model, is the number of samples in the training set; and They are respectively The model input information and model output results of samples, express For The predicted output result of the model input information of samples; Indicates the error level between the model output result and the predicted output result.

[0037] Specifically, for a training sample in the training set, let S be S, S consists of two parts: one is the input, let query be query, and the other is the output, let ,Right now , when training the information extraction model, the prediction result for the input is , SFT technology, i.e., sequence-to-sequence fine-tuning technology, will intervene and play a role, which will be based on the prediction results and target results The loss function is calculated, and then through the back-propagation algorithm, the model adjusts the internal parameters according to the value of the loss function in order to minimize the loss function. This process is repeated until the model parameters are adjusted to a relatively ideal level. In the application scenario of the power system, the above training process is repeated on all training samples in the training set, so that the information extraction model can gradually learn and master the mapping relationship between input and output. Through such learning and adjustment, the model can eventually achieve the goal of knowledge distillation, that is, adapt to the knowledge extraction task of the power system, so as to effectively extract information that is critical to the operation of the power system from the data.

[0038] The model parameters of the historical text information extraction model are subjected to low-rank adaptive fine-tuning, including using the following formula 2 to perform low-rank adaptive processing on the model parameters of the historical text information extraction model: Formula 2:

[0039] in, represents the adjustment amount of the model parameters, and is a low-rank matrix, , , and Respectively The number of rows and columns, and Respectively The number of rows and columns, . LoRA is used to perform low-rank decomposition and adjustment of the model's weight matrix to achieve fine-tuning of the model without changing the overall parameter architecture of the model. Specifically, LoRA technology introduces two smaller matrices to replace the original large matrix. This method can reduce the number of parameters that need to be trained while retaining the expressiveness of the model. During calculation, only the parameters of these small matrices are adjusted, while most of the original model parameters remain unchanged. When using LoRA technology, the loss function is usually maintained as cross-entropy loss, which is used to measure the difference between model predictions and actual labels. Parameter updates focus on the low-rank matrix introduced by LoRA rather than the parameters of the entire model. LoRA technology does not directly fine-tune the complete weight matrix W in the large language model, but instead implements the update through the product of two low-rank matrices A and B, reducing the number of parameters.

[0040] In addition, in order to accelerate similarity calculation and query processing when processing large-scale data, and thus facilitate the rapid retrieval and recall of subsequent quadruple groups, the embodiment of the present application also constructs a knowledge index for the quadruple based on the BGE-M3 model and the automation code, and stores the knowledge graph and the knowledge index in the PostgreSQL database, so that the corresponding quadruple group can be addressed and recalled based on the knowledge index in the process of determining the target quadruple group related to the editing and research description. PostgreSQL is an open source object-relational database system. PostgreSQL supports efficient vector storage and retrieval through the pgvector extension. In addition, it has high scalability and flexibility and can handle complex data structures. PostgreSQL's parallel query function greatly accelerates the processing speed of vectors and complex queries. In addition, PostgreSQL can also provide transaction consistency and ACID support, which ensures the integrity and consistency of the data, thereby providing a solid guarantee for data processing.

[0041] It should be noted that the knowledge index includes the vector index of the knowledge graph quadruple, the source text of the knowledge graph quadruple, the source text metadata (source document, etc.), the knowledge graph quadruple text segmentation results, etc., and the vector, original text, metadata, and text segmentation results are stored in PostgreSQL through pgvector. Suppose a knowledge graph quadruple is , correspondingly, there is a corresponding vector index in PostgreSQL 、Knowledge Graph Quadruple Source Original , source text metadata , Knowledge graph quadruple text segmentation results . pgvector is an extension for PostgreSQL, specifically designed to support the storage and retrieval of vector data. For example, there is a specific knowledge graph quadruple. Corresponding to this knowledge graph quadruple, its vector index, its source text, and metadata information of these original texts are stored in the PostgreSQL database. At the same time, the word segmentation results of the knowledge graph quadruple text are also stored. In this way, when it is necessary to retrieve or analyze information in the knowledge graph, these indexes can be used to quickly locate specific data, thereby improving the efficiency and accuracy of data processing.

[0042] 203. In the archival knowledge graph, identify and recall the target quadruple that matches the editorial description.

[0043] In an embodiment of the present application, multiple recall strategies are pre-set, namely, the BM25 algorithm recall strategy, the semantic recall strategy, and the hybrid recall strategy. In the actual operation process, a recall strategy can be randomly selected from multiple recall strategies to perform a first recall on all quadruple groups in the archive knowledge graph to obtain a first quadruple group to be recalled. Next, for the quadruple groups that have not been recalled, that is, the other quadruple groups except the first quadruple group to be recalled, the system randomly selects a recall strategy from the remaining recall strategies again, and uses the recall strategy to perform a second recall on the quadruple groups that have not been recalled to obtain a second quadruple group to be recalled. Finally, the first quadruple group to be recalled and the second quadruple group to be recalled are set as target quadruple groups.

[0044] In addition, the variance of the normalized sparse search relevance score, dense search relevance score and comprehensive score associated with each quadruple can be calculated to obtain the participation evaluation parameter associated with each quadruple. Then, the quadruple whose participation evaluation parameter reaches the first preset threshold is determined and recalled from all quadruple groups as the target quadruple.

[0045] Specifically, when the selected recall strategy is the BM25 algorithm recall strategy, for each quadruple in the archive knowledge graph or each quadruple that has not been recalled, the sparse retrieval relevance score associated with each quadruple is determined based on the following formula 3, and among all quadruple groups or quadruple groups that have not been recalled, the quadruple whose sparse retrieval relevance score reaches the second preset threshold is determined as the first quadruple to be recalled or the second quadruple to be recalled.

[0046] Formula 3:

[0047] in, It is a four-tuple, which is composed of several terms; , To compile and research descriptions, multiple terms are used composition; It is the sparse search relevance between the quadruple and the research description; To compile and research terms in description In the target quad The frequency of occurrence in For the four-tuple Length; is the average length of all quadruples; and To adjust the parameters; is the inverse document frequency, as shown in the following formula 4.

[0048] Formula 4:

[0049] in, is the total number of documents; is the number of texts that contain the term.

[0050] When the selected recall strategy is the semantic recall strategy, for each quadruple in the archive knowledge graph or each quadruple that has not been recalled, the dense retrieval relevance score associated with each quadruple is determined based on the following formula 5, and among all quadruple groups or quadruple groups that have not been recalled, the quadruple whose dense retrieval relevance score reaches the third preset threshold is determined as the first quadruple to be recalled or the second quadruple to be recalled.

[0051] Formula 5: ; in, To compile and research descriptions, embedding vectors are transformed by the BGE-M3 model; , , For the The embedding vector of each quadruple is retrieved from the PostgreSQL database through the knowledge index of the quadruple. The knowledge index is constructed by the BGE-M3 model based on the quadruple, including but not limited to the vector index of the quadruple, the source text of the quadruple, the source text metadata of the quadruple, and the text segmentation result of the quadruple; and All are L2 norms; For the Dense retrieval relevance score of quadruplets.

[0052] When the selected recall strategy is a mixed recall strategy, for each quadruple in the archive knowledge graph or each quadruple that has not been recalled, determine the sparse retrieval relevance score and dense retrieval relevance score associated with each quadruple. The sparse retrieval relevance score and dense retrieval relevance score associated with each quadruple are weighted and summed to obtain a comprehensive score corresponding to each quadruple. Finally, the quadruple whose comprehensive score reaches the fourth preset threshold is determined in all quadruple groups or quadruple groups that have not been recalled as the first quadruple to be recalled. In other words, the sparse retrieval relevance score and dense retrieval relevance score of the quadruple and the editing and research topic are used as the necessary calculation conditions for each quadruple when screening the target group, and the comprehensive score that can comprehensively reflect the relevance between the quadruple and the editing and research description is calculated. Optionally, before calculating the comprehensive score, the sparse retrieval relevance score and dense retrieval relevance score of the quadruple and the editing and research description are normalized so that the two parameters are at the same magnitude, further improving the accuracy of the calculation results.

[0053] It should be noted that when the recall strategy selected in the first recall or the recall strategy selected in the second recall is a mixed recall strategy, the retrieval results may contain some knowledge graph quadruplets that are not completely relevant or not ideally sorted, so a reordering technology is introduced. The reordering technology in the embodiment of the present application is a result reordering technology that integrates the BGE-Reranker-V2 semantic reordering model, which can ensure that the most relevant knowledge graph quadruplets are ranked first. Reordering technology can combine other features to reduce redundant information. Therefore, it is necessary to optimize the editing and research materials provided to the large model through further evaluation and sorting after the mixed recall. The BGE-Reranker-V2 semantic reordering is similar to the aforementioned vector retriever based on BGE-M3. The BGE-Reranker-V2-M3 semantic reordering model is used to convert the query text and the knowledge graph quadruplet into semantic vectors, and the vector similarity is determined by the cosine similarity between the semantic vectors. Specifically, the BGE-Reranker-V2-M3 semantic reordering model is used to vectorize the editing and research description through a mapping function to obtain a high-dimensional vector corresponding to the editing and research description. The embedding vector corresponding to the target quadruple is retrieved in the PostgreSQL database through the knowledge index of the target quadruple. The high-dimensional vector and the embedding vector are input into the preset similarity calculation function to obtain the calculation result output by the preset similarity calculation function. The Sigmoid function is used to map the calculation result to the probability range of (0,1) to obtain the similarity between the high-dimensional vector and the embedding vector. Finally, all target quadruple groups are sorted in descending order according to the similarity between the high-dimensional vector and the embedding vector. In the actual operation process, in order to optimize the system performance and result quality, a relevance score threshold can also be set to eliminate quadruple groups below the threshold, and archive research is performed based on the remaining quadruple groups after elimination. As a result, it helps the large language model to more deeply understand the research needs and even the research topics, improves the accuracy of the input instructions of the large language model, helps to overcome the illusion of the large language model, and improves the credibility and text quality of the target research content output by the large language model.

[0054] 204. Determine additional features based on the requirement type associated with the research description, and associate the additional features with the target quadruple.

[0055] In an embodiment of the present application, in order to further improve the quality of automated research results, additional features can be determined based on the requirement type of the research description, and the additional features can be associated with the target quadruple and used together as input to the large prediction model to highlight the content that is more relevant to the research description.

[0056] Specifically, first determine the additional feature determination method associated with the requirement type. When the additional feature determination method is parameter selection, determine the parameter identifier associated with the requirement type, and select the parameter indicated by the parameter identifier from the sparse retrieval relevance score, dense retrieval relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple as an additional feature, and associate the additional feature with the target quadruple. For example, the editorial description is an overall discussion of the xx business, and its corresponding requirement type is the evaluation characteristic requirement type. Its corresponding additional feature determination method parameter selection, the parameter identifier associated with the requirement type is the sparse retrieval relevance score, and the sparse retrieval relevance score associated with the quadruple is associated with the corresponding quadruple as an additional feature. When the additional feature determination method is parameter calculation, determine the parameter calculation method and at least one parameter identifier associated with the requirement type, and select at least one parameter indicated by at least one parameter identifier from the sparse retrieval relevance score, dense retrieval relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple, and calculate the selected at least one parameter according to the parameter calculation method, use the calculation result as an additional feature, and associate the additional feature with the target quadruple.

[0057] Therefore, these quadruple associations with additional features can more accurately reflect editing and research needs, improve the accuracy level of the input instructions of the large language model, help overcome the hallucinations of the large language model, and improve the credibility and text quality of the target editing and research content output by the large language model.

[0058] 205. The target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple, and the compilation and research description are used as input information of the large language model, and the archive knowledge compilation and research results are output through the large language model.

[0059] also, Figure 3 An archival knowledge compilation and research system of an embodiment of the present application is shown, and the compilation and research system includes an algorithm service module, a resource management module, a graph construction module, a graph index module and a knowledge compilation and research module.

[0060] Among them, the algorithm service module is used to train information extraction models and large language models for editing and research work, and uses the vLLM framework for model deployment, providing other modules with OCR services, knowledge extraction, knowledge indexing, knowledge editing and research and other algorithm services. The resource management module can support uploading, cataloging, and storage of archival files and their metadata to form various types of archival file libraries. The graph construction module uses OCR algorithms and related text processing algorithms to segment and extract texts from archival files, and uses information extraction models to identify time, entities and their relationships in the text to be extracted, and stores them in the Nebula graph database. The graph indexing module uses a knowledge indexing algorithm to construct a vector index for the quadruple in the knowledge graph and stores it in the PostgreSQL database. The knowledge editing and research module uses a knowledge editing and research algorithm to recall relevant knowledge content in the knowledge graph according to the user's editing and research needs, and generates highly readable editing and research results through a large language model.

[0061] The present application will be further described below in combination with the above embodiments using examples from actual power system scenarios.

[0062] Taking the theme of "The deeds of expert B in city A" as an example, Figure 4 As shown, first, collect materials. Specifically, collect text materials related to the editing and research description, such as relevant news documents, relevant official documents and other documents related to expert B, and upload them to the editing and research system in pdf or docx file format.

[0063] Next, build a graph. Based on the graph construction module of the editing and research system, after the file upload is completed, a file set F={f1,f2,…,fn} is formed, where each file is automatically split into several text blocks TB(F(n))={fntb1,fntb2,…,fntbn}, and a quadruple extraction is performed on each text block through the domain-enhanced information extraction model to form a quadruple set. Furthermore, for each text block, the editing and research system will use the Prompt template "Extract knowledge graph fact quadruple for the following text: {tb}" to replace {tb} with the text block text content to form the input of the large language model used for editing and research. The following is an example of the input and output content of the large language model when extracting quadruple from a text block extracted from a news document.

[0064] For example, the input to the information extraction model is: Extract knowledge graph fact triples from the following text: "In 1xxx, xx-year-old B graduated from xx school and joined xx unit in xx city as a power line inspector. B worked hard in the front line of power repair and won many awards, including a, b, and c." The output of the information extraction model is a quadruple extracted from the above information: [{"time":"1xxx","subject":"B", "predicate":"Graduated from", "object": "xx school"}, {"time":"1xxx","subject":"B", "predicate":"Awarded", "object": "Multiple awards, including a, b, c"}, {"time":"1xxx","subject":"B", "predicate":"work", "object": "power lineman"}, ...] Of course, the information input into the information extraction model is diverse, and the number of quadruple output by the information extraction model is also large, and is not limited to the samples given in this example.

[0065] Third, construct a knowledge index. Based on the graph index module of the editing and research system, after completing the quadruple extraction of all text blocks, a triple set is formed. , based on the BGE-M3 model, the above quaternary groups are converted into 1024-dimensional vector representations and stored in the PostgreSQL database together with the text segmentation results.

[0066] Fourth, knowledge compilation and research is performed. For the aforementioned compilation and research description, a set of quadruple groups is recalled through the target quadruple screening method described in the previous embodiment.

[0067] In one possible design, referring to the above embodiment, additional features are determined for the quadruple, and the additional features are associated with the corresponding quadruple and input into the large language model together. The additional features can be in the form of {"Relevance":0.28}. In other words, the size of the Relevance in each group is positively correlated with the proportion of the description content in the compilation and research results.

[0068] The input content of the final large language model is the above-mentioned quadruple, the additional features associated with the quadruple, the original source text associated with the quadruple, and the compilation description.

[0069] The present application embodiment provides an archive knowledge compilation and research system, including: An acquisition module is used to acquire editing and research demand information and an archive knowledge graph, and rewrite the editing and research demand information using a prompt engineering technique to obtain an editing and research description. The archive knowledge graph is constructed based on the quadruple extracted from the text to be extracted, and the text to be extracted is the pre-acquired archive material; A recall module, used to determine and recall a target quadruple matching the editing and research description in the archive knowledge graph; A determination module, used to determine additional features according to the type of requirements associated with the compilation and research description, and associate the additional features with the target quadruple, wherein the additional features are used to determine the proportion of the description text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results; The compilation and research module is used to use the target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple, and the compilation and research description as input information of the large language model, and output the archive knowledge compilation and research results through the large language model In a specific application scenario, the recall module is used to select a recall strategy from a plurality of preset recall strategies to perform a first recall on all quadruple groups in the archive knowledge graph to obtain a first quadruple group to be recalled, and to select a recall strategy from the remaining recall strategies after the selection to perform a second recall on other quadruple groups except the first quadruple group to be recalled to obtain a second quadruple group to be recalled, and to set the first quadruple group to be recalled and the second quadruple group to be recalled as the target quadruple group, wherein the plurality of recall strategies include a BM25 algorithm recall strategy, a semantic recall strategy, and a hybrid recall strategy; or, for any quadruple among all the quadruple groups, calculate the normalized variance of the sparse retrieval relevance score, the dense retrieval relevance score, and the comprehensive score associated with the quadruple group, use the variance as a participation evaluation parameter, and determine and recall the quadruple group whose participation evaluation parameter reaches a first preset threshold value among all the quadruple groups as the target quadruple group.

[0070] In a specific application scenario, the recall module is used to determine the sparse retrieval relevance score associated with each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled based on the following formula when the selected recall strategy is the BM25 algorithm recall strategy, and determine the quadruple whose sparse retrieval relevance score reaches the second preset threshold value among all the quadruple or other quadruple except the first quadruple to be recalled as the corresponding quadruple to be recalled; ; in, is the four-tuple, and the four-tuple consists of a number of terms; , For the compilation and research description, there are multiple terms composition; is the sparse search relevance of the quadruple to the compilation description; For the terms in the research description In the four The frequency of occurrence in For the four-tuple Length; is the average length of all quadruples; and To adjust the parameters; is the inverse document frequency; when the selected recall strategy is the semantic recall strategy, for each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled, based on the following formula, determine the dense retrieval relevance score associated with each quadruple, and among all the quadruple or other quadruple except the first quadruple to be recalled, determine the quadruple whose dense retrieval relevance score reaches the third preset threshold as the corresponding quadruple to be recalled; ; in, The embedding vector of the compilation description after conversion by the BGE-M3 model; , , For the The embedding vector of a quadruple is retrieved from the PostgreSQL database through the knowledge index of the quadruple, wherein the knowledge index is constructed by the BGE-M3 model according to the quadruple, including but not limited to the vector index of the quadruple, the source text of the quadruple, the source text metadata of the quadruple, and the text segmentation result of the quadruple; and All are L2 norms; For the Dense retrieval relevance score of quadruplets.

[0071] In a specific application scenario, the recall module is used to determine the sparse retrieval relevance score and the dense retrieval relevance score associated with each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled when the selected recall strategy is a hybrid recall strategy; perform weighted sum processing on the sparse retrieval relevance score and the dense retrieval relevance score associated with each quadruple to obtain a comprehensive score corresponding to each quadruple; determine the quadruple whose comprehensive score reaches a fourth preset threshold among all the quadruple or other quadruple except the first quadruple to be recalled as the corresponding quadruple to be recalled.

[0072] In a specific application scenario, the recall module is also used to vectorize the compilation and research description to obtain a high-dimensional vector corresponding to the compilation and research description when the recall strategy selected in the first recall or the recall strategy selected in the second recall is a mixed recall strategy; retrieve the embedding vector corresponding to the target quadruple in the PostgreSQL database through the knowledge index of the target quadruple; input the high-dimensional vector and the embedding vector into a preset similarity calculation function to obtain the calculation result output by the preset similarity calculation function; use the Sigmoid function to map the calculation result to the probability range of (0,1) to obtain the similarity between the high-dimensional vector and the embedding vector; sort all the target quadruple in order from high to low according to the similarity between the high-dimensional vector and the embedding vector.

[0073] In a specific application scenario, the determination module is used to determine a method for determining additional features associated with the requirement type; when the additional feature determination method is parameter selection, determine the parameter identifier associated with the requirement type, and select the parameter indicated by the parameter identifier from the sparse retrieval relevance score, dense retrieval relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple as the additional feature, and associate the additional feature with the target quadruple; when the additional feature determination method is parameter calculation, determine the parameter calculation method and at least one parameter identifier associated with the requirement type, and select at least one parameter indicated by the at least one parameter identifier from the sparse retrieval relevance score, dense retrieval relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple, calculate the selected at least one parameter according to the parameter calculation method, use the calculation result as the additional feature, and associate the additional feature with the target quadruple.

[0074] In a specific application scenario, the device also includes: a training module.

[0075] The training module is used to read the archival materials stored in the preset storage space as the text to be extracted; use a pre-built information extraction model to extract multiple quadruples from the text to be extracted to construct the archival knowledge graph, and the quadruples include entities, relationships and time; wherein the information extraction model is obtained by supervised fine-tuning and / or low-rank adaptive fine-tuning of model parameters of the historical text information extraction model based on the training set, and the training set is obtained by knowledge distillation of the historical information set, and the historical information set includes historical archival materials, metadata corresponding to the historical archival materials and historical quadruples corresponding to the historical archival materials; wherein supervised fine-tuning of the model parameters of the historical text information extraction model includes: using the following expression to minimize the loss function of the historical text information extraction model on the historical information set, ; is the minimum value of the loss function, is the model parameter of the historical text information extraction model, is the number of samples in the training set; and They are respectively The model input information and model output results of samples, express For The predicted output result of the model input information of samples; Indicates the error level between the model output result and the predicted output result.

[0076] The method of performing low-rank adaptive fine-tuning on the model parameters of the historical text information extraction model comprises: performing low-rank adaptive processing on the model parameters of the historical text information extraction model,

[0077] represents the adjustment amount of the model parameters, and is a low-rank matrix, , , and Respectively The number of rows and columns, and Respectively The number of rows and columns, .

[0078] The device uses any one of the solutions described in the above embodiments, and therefore has all the above technical effects, which will not be repeated here.

[0079] In an exemplary embodiment, see Figure 5 , and also provides a computer device, which includes a communication bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the archival knowledge compilation and research method in the above embodiment.

[0080] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the archival knowledge compilation and research method.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus necessary general hardware platforms. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0082] It should be understood that although the terms first, second, etc. may be used to describe execution units in the embodiments of the present application, these execution units should not be limited to these terms. These terms are only used to distinguish execution units from each other. For example, without departing from the scope of the embodiments of the present application, the first execution unit may also be referred to as the second execution unit, and similarly, the second execution unit may also be referred to as the first execution unit.

[0083] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0084] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0085] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0086] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0087] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0088] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for compiling and researching archival knowledge, characterized in that: The method is applicable to a power system, comprising: Obtaining editing and research demand information and an archival knowledge graph, and rewriting the editing and research demand information using a prompt engineering technique to obtain an editing and research description, wherein the archival knowledge graph is constructed based on quadruples extracted from the text to be extracted, and the text to be extracted is the archival material obtained in advance; In the archive knowledge graph, determine and recall the target quadruple that matches the editing and research description; Determine additional features according to the type of requirements associated with the compilation and research description, and associate the additional features with the target quadruple, wherein the additional features are used to determine the proportion of the description text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results; The target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple and the compilation description are used as input information of the large language model, and the archive knowledge compilation result is output through the large language model.

2. The method according to claim 1, characterized in that In the archive knowledge graph, a target quadruple matching the editing and research description is determined and recalled, including: A recall strategy is selected from a plurality of preset recall strategies to perform a first recall on all quadruples in the archive knowledge graph to obtain a first quadruple to be recalled, and a recall strategy is selected again from the remaining recall strategies after the selection to perform a second recall on other quadruples except the first quadruple to be recalled to obtain a second quadruple to be recalled, and the first quadruple to be recalled and the second quadruple to be recalled are set as the target quadruples, wherein the plurality of recall strategies include a BM25 algorithm recall strategy, a semantic recall strategy and a hybrid recall strategy; or, for any quadruple among all the quadruples, the normalized variance of the sparse retrieval relevance score, the dense retrieval relevance score and the comprehensive score associated with the quadruple is calculated, the variance is used as a participation evaluation parameter, and the quadruples whose participation evaluation parameters reach a first preset threshold are determined and recalled from all the quadruples as the target quadruples.

3. The method according to claim 2, characterized in that The step of selecting a recall strategy from among a plurality of preset recall strategies to perform a first recall on all quadruple groups in the archive knowledge graph to obtain a first quadruple group to be recalled includes: When the selected recall strategy is the BM25 algorithm recall strategy, for each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled, based on the following formula, determine the sparse retrieval relevance score associated with each quadruple, and among all the quadruple or other quadruple except the first quadruple to be recalled, determine the quadruple whose sparse retrieval relevance score reaches the second preset threshold as the corresponding quadruple to be recalled; ; in, is the four-tuple, and the four-tuple consists of a number of terms; , For the compilation and research description, there are multiple terms composition; is the sparse search relevance of the quadruple to the compilation description; For the terms in the research description In the four The frequency of occurrence in For the four-tuple Length; is the average length of all quadruples; and To adjust the parameters; is the inverse document frequency; When the selected recall strategy is the semantic recall strategy, for each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled, based on the following formula, a dense search relevance score associated with each quadruple is determined, and among all the quadruple or other quadruple except the first quadruple to be recalled, a quadruple whose dense search relevance score reaches a third preset threshold is determined as the corresponding quadruple to be recalled; ; in, The embedding vector of the compilation description after conversion by the BGE-M3 model; , , For the The embedding vector of the quadruple is retrieved from the PostgreSQL database through the knowledge index of the quadruple, wherein the knowledge index is constructed by the BGE-M3 model according to the quadruple, including but not limited to the vector index of the quadruple, the source text of the quadruple, the source text metadata of the quadruple, and the text segmentation result of the quadruple; and All are L2 norms; For the Dense retrieval relevance score of quadruple.

4. The method according to claim 3, characterized in that The method comprises: When the selected recall strategy is a hybrid recall strategy, for each quadruple in the archive knowledge graph or for other quadruple except the first quadruple to be recalled, determine a sparse search relevance score and a dense search relevance score associated with each quadruple; Performing weighted sum processing on the sparse search relevance score and the dense search relevance score associated with each of the quadruple groups to obtain a comprehensive score corresponding to each of the quadruple groups; A quadruple whose comprehensive score reaches a fourth preset threshold is determined from all the quadruple groups or other quadruple groups except the first quadruple group to be recalled as the corresponding quadruple group to be recalled.

5. The method according to claim 4, characterized in that The method further comprises: When the recall strategy selected in the first recall or the recall strategy selected in the second recall is a mixed recall strategy, vectorizing the compilation and research description to obtain a high-dimensional vector corresponding to the compilation and research description; Retrieving the embedding vector corresponding to the target quadruple in the PostgreSQL database through the knowledge index of the target quadruple; Inputting the high-dimensional vector and the embedded vector into a preset similarity calculation function, and obtaining a calculation result output by the preset similarity calculation function; The calculation result is mapped to a probability range of (0, 1) using a Sigmoid function to obtain the similarity between the high-dimensional vector and the embedded vector; All the target quadruple groups are sorted in descending order according to the similarity between the high-dimensional vector and the embedded vector.

6. The method according to claim 1, characterized in that Determining additional features according to the type of requirements associated with the compilation and research description includes: Determine a method for determining additional features associated with the requirement type; When the additional feature determination method is parameter selection, determine the parameter identifier associated with the requirement type, and select the parameter indicated by the parameter identifier from the sparse search relevance score, dense search relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple as the additional feature, and associate the additional feature with the target quadruple; When the additional feature determination method is parameter calculation, the parameter calculation method and at least one parameter identifier associated with the requirement type are determined, and at least one parameter indicated by the at least one parameter identifier is selected from the sparse retrieval relevance score, dense retrieval relevance score, comprehensive score and participation evaluation parameters associated with the target quadruple, and the selected at least one parameter is calculated according to the parameter calculation method, the calculation result is used as the additional feature, and the additional feature is associated with the target quadruple.

7. The method according to claim 1, characterized in that After obtaining the editing and research demand information, the method further includes: Reading the archive data stored in the preset storage space as the text to be extracted; Using a pre-built information extraction model to extract multiple quadruples from the text to be extracted to construct the archive knowledge graph, wherein the quadruples include entities, relations, and time; Wherein, the information extraction model is obtained by subjecting the model parameters of the historical text information extraction model to supervised fine-tuning and / or low-rank adaptive fine-tuning based on the training set, wherein the training set is obtained by subjecting the historical information set to knowledge distillation, wherein the historical information set includes historical archival materials, metadata corresponding to the historical archival materials, and historical quadruplets corresponding to the historical archival materials; The supervised fine-tuning of the model parameters of the historical text information extraction model includes: using the following expression to minimize the loss function of the historical text information extraction model on the historical information set, ; is the minimum value of the loss function, is the model parameter of the historical text information extraction model, is the number of samples in the training set; and They are respectively The model input information and model output results of samples, express For The predicted output result of the model input information of samples; Indicates the error level between the model output result and the predicted output result; The method of performing low-rank adaptive fine-tuning on the model parameters of the historical text information extraction model comprises: performing low-rank adaptive processing on the model parameters of the historical text information extraction model, represents the adjustment amount of the model parameters, and is a low-rank matrix, , , and Respectively The number of rows and columns, and Respectively The number of rows and columns, .

8. An archive knowledge compilation and research system, characterized in that: The archive knowledge compilation and research system is applicable to the power system, including: An acquisition module is used to acquire editing and research demand information and an archive knowledge graph, and rewrite the editing and research demand information using a prompt engineering technique to obtain an editing and research description. The archive knowledge graph is constructed based on the quadruple extracted from the text to be extracted, and the text to be extracted is the pre-acquired archive material; A recall module, used to determine and recall a target quadruple matching the editing and research description in the archive knowledge graph; A determination module, used to determine additional features according to the type of requirements associated with the compilation and research description, and associate the additional features with the target quadruple, wherein the additional features are used to determine the proportion of the description text of the relevant text content corresponding to the target quadruple in the archive knowledge compilation and research results; The compilation and research module is used to use the target quadruple, the source text associated with the target quadruple, the additional features associated with the target quadruple and the compilation and research description as input information of the large language model, and output the archive knowledge compilation and research results through the large language model.

9. A computer device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method of any one of claims 1 to 7.

10. A storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Search recall method and system based on knowledge graph representation learning

    CN115618113A

  • File editing and research method, device and equipment and storage medium

    CN116757172A

  • Search question-answering system and method based on large model and electronic equipment

    CN117708274A

  • Database query statement generation method and device, equipment and storage medium

    CN118227655A

  • Traditional Chinese medicine question-answering system construction method based on large language model and knowledge graph

    CN118838996A

Cited By

  • Document generation method and electronic equipment

    CN120146022A

  • Document generation method and electronic device

    CN120146022B

  • Abnormality recognition method for target video, electronic equipment and storage medium

    CN120234651A