Carbon interrogation report generation method and device, equipment, storage medium and program product

By using pre-trained and fine-tuned energy carbon application large models, carbon disc survey reports are automatically generated, which solves the problems of data integration time and poor report quality caused by manual writing in the prior art, and achieves efficient and quality-optimized carbon disc survey reports.

CN120181870APending Publication Date: 2025-06-20SUNGROW ICARBON TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510242619.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The generation of existing carbon inspection reports mainly relies on manual writing, which makes data integration time long, and the quality of the report is easily affected by the degree of professional knowledge mastery, resulting in poor results in carbon reduction and consumption reduction strategies.

Method used

A carbon disc report generation method is provided, using pre-trained and fine-tuned energy carbon application large model to automatically generate carbon disc report based on user intentions. This model generates a high-quality carbon disc survey report by combining interactive information and retrieval enhancement generation system's contextual information retrieved from the energy carbon knowledge base.

Benefits of technology

It greatly improves the generation efficiency and quality of carbon inspection reports, optimizes carbon reduction and consumption reduction strategies, reduces manual intervention and costs, and improves the readability and ease of use of reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181870A_ABST
    Figure CN120181870A_ABST
Patent Text Reader

Abstract

The invention discloses a carbon inventory report generation method and device, equipment, a storage medium and a program product, and relates to the field of artificial intelligence. The method comprises the steps of obtaining interaction information input by a user, wherein the interaction information comprises a user intention indicating generation of a carbon inventory report; based on the interaction information and a pre-constructed energy-carbon application large model, a carbon inventory report corresponding to the user intention is obtained, and the energy-carbon application large model is used for jointly generating the carbon inventory report according to the interaction information and context information retrieved by a retrieval enhancement generation system from a first energy-carbon knowledge base; wherein the energy-carbon application large model is obtained by performing fine adjustment on a pre-trained language large model based on a second energy-carbon knowledge base, the first energy-carbon knowledge base comprises first energy-carbon information of an energy-carbon field, and the second energy-carbon knowledge base comprises second energy-carbon information and template information required for generating a carbon interrogation report. According to the invention, the efficiency and quality of data integration and carbon inventory report generation can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and specifically relates to a method, device, equipment, storage medium and program product for generating a carbon inventory report. Background Art

[0002] Reducing carbon emissions and energy consumption is a complex and long-term task. To address the challenges of carbon emission reduction and energy consumption reduction, each entity responsible for carbon emission reduction and energy consumption reduction can identify the carbon emissions during the operation process and determine carbon emission reduction and energy consumption reduction strategies through a carbon inventory report. A carbon inventory report is a report that details the carbon emissions of an enterprise or organization and is used to evaluate and manage the carbon footprint. Currently, the generation of carbon inventory reports mainly relies on manual writing, which not only takes a long time for data integration but also is easily affected by the degree of professional knowledge, resulting in poor effects of carbon emission reduction and energy consumption reduction strategies. Summary of the Invention

[0003] Embodiments of this application provide a method, device, equipment, storage medium and program product for generating a carbon inventory report to improve the generation efficiency and quality of carbon inventory reports.

[0004] To solve the above technical problems, embodiments of this application disclose the following technical solutions:

[0005] In a first aspect, a method for generating a carbon inventory report is provided, including:

[0006] Obtaining interaction information input by a user, where the interaction information includes a user intention indicating the generation of a carbon inventory report;

[0007] Based on the interaction information and a pre-constructed energy-carbon application large model, obtaining a carbon inventory report corresponding to the user intention, where the energy-carbon application large model is used to jointly generate a carbon inventory report according to the interaction information and context information retrieved by a retrieval augmentation generation system from a first energy-carbon knowledge base;

[0008] Among them, the energy-carbon application large model is obtained by fine-tuning a pre-trained language large model based on a second energy-carbon knowledge base. The first energy-carbon knowledge base includes first energy-carbon information in the energy-carbon field, and the second energy-carbon knowledge base includes second energy-carbon information and template information required for generating a carbon inventory report.

[0009] In some embodiments, the method for fine-tuning the language large model based on the second energy-carbon knowledge base to obtain the energy-carbon application large model includes:

[0010] Based on natural language processing methods and an annotation model, annotating the second energy-carbon information to obtain annotation information;

[0011] Preprocessing the annotation information to obtain training information;

[0012] Based on the training information, the language large model is trained by a supervised fine-tuning method and / or a preset prompt engine, and the trained language large model is determined as the energy and carbon application large model, where the preset prompt engine is used to optimize the training information.

[0013] In some embodiments, the method for training the language large model by the supervised fine-tuning method includes:

[0014] The training information is divided into paragraphs by the language large model to obtain paragraph texts;

[0015] The paragraph texts are converted into vectors, and the vectors are processed to output prediction results;

[0016] The parameters of the language large model are updated based on the loss between the prediction results and the actual labels.

[0017] In some embodiments, the retrieval method of the retrieval-enhanced generation system includes:

[0018] The interaction information and the first energy and carbon information are respectively vectorized to obtain a first vector corresponding to the interaction information and a second vector corresponding to the first energy and carbon information;

[0019] The similarity between the first vector and each of the second vectors is determined, and the first energy and carbon information corresponding to the second vector whose similarity meets the preset condition is determined as the candidate information;

[0020] The context information is generated based on the candidate information.

[0021] In some embodiments, based on the interaction information and a pre-constructed energy and carbon application large model, obtaining a carbon inventory report corresponding to the user intention includes:

[0022] Based on the interaction information and the context information, prediction data is obtained;

[0023] The prediction data is adjusted based on the template information to obtain a carbon inventory report corresponding to the user intention.

[0024] In some embodiments, the second energy and carbon information is obtained based on at least one of an environmental report, an energy and carbon business communication email, and an energy and carbon knowledge system.

[0025] In some embodiments, the method further includes:

[0026] Obtaining feedback information of the user on the carbon inventory report;

[0027] If the feedback information indicates that the carbon inventory report does not meet the expected conditions, optimize the second energy-carbon knowledge base, and re-fine-tune the energy-carbon application large model based on the optimized second energy-carbon knowledge base.

[0028] In a second aspect, a carbon inventory report generation device is provided, including:

[0029] An interaction module, which is used to obtain interaction information input by the user, and the interaction information includes the user intention indicating the generation of a carbon inventory report;

[0030] A generation module, which is used to obtain a carbon inventory report corresponding to the user intention based on the interaction information and a pre-constructed energy-carbon application large model, and the energy-carbon application large model is used to jointly generate a carbon inventory report according to the interaction information and the context information retrieved from the first energy-carbon knowledge base by the retrieval enhancement generation system;

[0031] Among them, the energy-carbon application large model is obtained by fine-tuning a pre-trained language large model based on the second energy-carbon knowledge base. The first energy-carbon knowledge base includes first energy-carbon information in the energy-carbon field, and the second energy-carbon knowledge base includes second energy-carbon information and template information required for generating a carbon inventory report.

[0032] In a third aspect, an electronic device is provided, and the electronic device includes:

[0033] One or more processors;

[0034] A storage device for storing one or more programs;

[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the carbon inventory report generation method according to any one of the first aspect.

[0036] In a fourth aspect, a storage medium containing computer-executable instructions is provided, and the computer-executable instructions are used to execute the carbon inventory report generation method according to any one of the first aspect when executed by a computer processor.

[0037] In a fifth aspect, a computer program product is provided, including a computer program, and the computer program implements the carbon inventory report generation method according to any one of the first aspect when executed by a processor.

[0038] One of the above technical solutions has the following advantages or beneficial effects:

[0039] A method for generating a carbon inventory report according to the present application includes obtaining interaction information input by a user, where the interaction information includes the user's intention to generate a carbon inventory report; based on the interaction information and a pre-constructed energy-carbon application large model, obtaining a carbon inventory report corresponding to the user's intention, and the energy-carbon application large model is used to jointly generate a carbon inventory report according to the interaction information and the context information retrieved from the first energy-carbon knowledge base by the retrieval enhancement generation system; among them, the energy-carbon application large model is obtained by fine-tuning a pre-trained language large model based on the second energy-carbon knowledge base, the first energy-carbon knowledge base includes the first energy-carbon information in the energy-carbon field, and the second energy-carbon knowledge base includes the second energy-carbon information and template information required for generating a carbon inventory report. The method provided by the present application can automatically generate a carbon inventory report based on the user's intention to generate a carbon inventory report, using a pre-trained and fine-tuned energy-carbon application large model, thereby greatly improving the data integration and the generation efficiency of the carbon inventory report, and since the quality of the report generated by the energy-carbon application large model depends on a rich energy-carbon knowledge base, the carbon reduction and consumption reduction strategies can be optimized and the generation quality of the carbon inventory report can be improved.

[0040] A carbon inventory report generation device according to the present application can automatically generate a carbon inventory report based on the user's intention to generate a carbon inventory report, using a pre-trained and fine-tuned energy-carbon application large model, thereby greatly improving the data integration and the generation efficiency of the carbon inventory report, and since the quality of the report generated by the energy-carbon application large model depends on a rich energy-carbon knowledge base, the carbon reduction and consumption reduction strategies can be optimized and the generation quality of the carbon inventory report can be improved. Brief Description of the Drawings

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0042] Figure 1 It is a schematic diagram of the overall process of the carbon inventory report generation method according to the embodiment of the present application;

[0043] Figure 2 It is a schematic diagram of the SFT process in the embodiment of the present application;

[0044] Figure 3 It is a schematic diagram of the RAG process in the embodiment of the present application;

[0045] Figure 4 It is a schematic diagram of the structure of the carbon inventory report generation device according to the embodiment of the present application;

[0046] Figure 5 It is a schematic diagram of the structure of the electronic device according to the embodiment of the present application.

[0047] Reference numerals:

[0048] 401 - Interaction module; 402 - Generation module; 50 - Electronic device; 51 - Processor; 52 - Read-only memory; 53 - Random access memory; 54 - Bus; 55 - Input / output interface; 56 - Input unit; 57 - Output unit; 58 - Storage unit; 59 - Communication unit. Detailed implementation manners

[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0050] In the description of the present application, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present application. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more, and at least one means one, two or more, unless otherwise specifically defined.

[0051] First, some terms in the embodiments of the present application will be explained.

[0052] A carbon inventory report refers to a report that details the carbon emissions of carbon reduction and energy consumption reduction entities (such as enterprises or organizations), including direct emissions and indirect emissions, and is used to evaluate and manage the carbon footprint.

[0053] Large Language Models (LLMs) refer to deep learning models that can process and generate natural language data, such as BERT, Transformer models, etc.

[0054] A carbon inventory report is a document that details and analyzes the greenhouse gas emissions of an organization, project, or product, and is usually used to evaluate and manage the carbon footprint, help carbon reduction and energy consumption reduction entities understand their impact on climate change, and formulate carbon reduction and energy consumption reduction strategies.

[0055] The generation of the current carbon inventory report mainly relies on manual writing, which usually has the following disadvantages:

[0056] The data collection and integration take a long time and are costly, it is difficult to capture all relevant emission sources, and the efficiency of data collection and integration is low; the quality of the report is easily affected by the professional knowledge of the personnel writing the report, and some carbon reduction and consumption reduction strategies are relatively single and of low quality, resulting in uneven quality of the report and carbon reduction and consumption reduction strategies; in addition, there are also drawbacks such as insufficient accuracy of carbon emission calculation and insufficient visualization of the report.

[0057] In view of this, the embodiments of the present application provide a method, device, equipment, storage medium and program product for generating a carbon inventory report. An energy-carbon application large model obtained through pre-training and fine-tuning is used to automatically generate a carbon inventory report based on the user intention of generating a carbon inventory report, so as to improve the generation efficiency and quality of the carbon inventory report and optimize the carbon reduction and consumption reduction strategies, thereby solving at least part of the above technical problems.

[0058] Please refer to Figure 1 , Figure 1 , which is a schematic diagram of the overall process of the method for generating a carbon inventory report according to the embodiments of the present application. The method for generating a carbon inventory report according to the embodiments of the present application specifically includes the following steps:

[0059] Step 101: Obtain the interaction information input by the user, where the interaction information includes the user intention indicating the generation of a carbon inventory report.

[0060] Exemplarily, the device can receive the interaction information input by the user through a pre-set interaction interface. For example, the user can enter "Please provide a carbon inventory report for the HVAC system" at the corresponding position of the interaction interface. It can be understood that the device can extract or recognize the user intention from the interaction information and perform corresponding processing.

[0061] Step 102: Based on the interaction information and a pre-constructed energy-carbon application large model, obtain the carbon inventory report corresponding to the user intention. The energy-carbon application large model is used to jointly generate a carbon inventory report according to the interaction information and the context information retrieved from the first energy-carbon knowledge base by the retrieval enhancement generation system.

[0062] Among them, the energy-carbon application large model is obtained by fine-tuning a pre-trained language large model based on the second energy-carbon knowledge base. The first energy-carbon knowledge base includes the first energy-carbon information in the energy-carbon field, and the second energy-carbon knowledge base includes the second energy-carbon information and template information required for generating a carbon inventory report.

[0063] Exemplarily, the second energy and carbon information can be obtained based on at least one of environmental reports, energy and carbon business emails, and energy and carbon knowledge systems. In this way, the second energy and carbon information can be more closely combined with the actual business scenario, thereby guiding the energy and carbon application large model to output a carbon inventory report that better meets the requirements.

[0064] Specifically, the method for constructing the energy and carbon application large model according to the embodiments of the present application includes:

[0065] Obtain a pre-trained language large model.

[0066] Fine-tune the pre-trained language large model based on the second energy and carbon knowledge base to obtain the energy and carbon application large model.

[0067] Among them, the pre-trained language large model refers to a language large model that has been trained using knowledge in the energy and carbon field, so that the language large model has the ability to understand the language patterns and keywords in the energy and carbon field and reason about problems related to the energy and carbon field. For example, language large models such as Tongyi Qianwen and Zhipu Qingyan can be selected. These models have been trained on large-scale unsupervised datasets. Based on their rich language understanding capabilities, the base model to be optimized, that is, the language large model for further training using knowledge in the energy and carbon field, is comprehensively determined by judging semantic following capabilities, text understanding capabilities, and hallucinations. The knowledge in the energy and carbon field can include system operation management specifications, standards, frequency modulation strategies, etc., and can be various types of relevant knowledge that are relatively extensive and rich.

[0068] In some embodiments, the method for fine-tuning the pre-trained language large model based on the second energy and carbon knowledge base to obtain the energy and carbon application large model includes:

[0069] Step 1, annotate the second energy and carbon information based on natural language processing methods and annotation models to obtain annotation information.

[0070] Specifically, after cleaning and classifying the second energy and carbon information, it can be annotated manually. In this way, the annotation accuracy can be improved. Alternatively, the annotation model can also be used to directly analyze long texts for automatic extraction and question answering, and then perform annotation. In this way, the annotation efficiency can be improved.

[0071] Step 2, preprocess the annotation information to obtain training information.

[0072] Specifically, the preprocessing includes at least one of text cleaning, word segmentation, and data augmentation. Preprocessing the annotation information enables the annotation information to better meet the input requirements of the model. For example, long text-related processing can be performed through phrase vectorization or paragraph vectorization.

[0073] Exemplarily, after obtaining the training information, the training information can be divided into a training set, a validation set, and a test set, for example, divided according to a ratio of 8:1:1. After the division, the training information can be data-encoded to convert the training information into a format acceptable to the model. For example, text can be converted into token IDs (character identifiers), and an attention mask can be generated. After encoding, the encoded data can be encapsulated into a data loader for batch processing during training. Before training, the training process can be predefined, including setting training parameters such as the learning rate, batch size, number of training epochs, etc., and defining an optimizer and a loss function. For example, usually, the cross-entropy loss function can be used to train the model, and the parameters can be optimized through gradient descent.

[0074] Step 3: Based on the training information, train the large language model through the supervised fine-tuning method and / or a preset prompt engine, and determine the trained large language model as the energy-carbon application large model. The preset prompt engine is used to optimize the training information.

[0075] Specifically, the supervised fine-tuning method refers to SFT (Supervised Fine-Tuning), which is used to optimize the performance of the pre-trained model on specific tasks. The preset prompt engine can be a Prompt Engine (optimization engine), which is used to construct and optimize the input prompt to guide the model to generate the desired output.

[0076] Please refer to Figure 2 , Figure 2 which is the schematic flow diagram of SFT in the embodiments of this application. This process can specifically include first obtaining the training information, where the training information includes an optimization data set and an annotation data set (Labeler data set), and then, based on the annotation data set, using the loss between the prediction result of the large language model and the actual label to perform supervised fine-tuning on the large language model. Exemplarily, the optimization data set includes "What is a giant panda", and the annotation data set includes "A giant panda is an animal with black and white markings", "Giant pandas have survived on Earth for...", "Giant pandas are endemic to China, and their main habitats...", "Giant pandas belong to the bear family, giant pandas belong to...", etc.

[0077] In some embodiments, the method for training a large language model through the supervised fine-tuning (SFT) method includes:

[0078] Step 1: Divide the training information into paragraph texts through the large language model.

[0079] Specifically, the language large model can divide paragraphs by a fixed length unit, and this fixed length unit needs to be pre-tested for different overlap lengths, and then a more appropriate overlap length is selected to improve the accuracy of the language large model in capturing keywords in the follow-up.

[0080] In the second step, convert the paragraph text into vectors, process the vectors, and output the prediction results.

[0081] Specifically, the paragraph text can be converted into vectors using token embedding or sentence embedding, and the specific usage can be determined according to the requirements of the business scenario.

[0082] After the vector conversion is completed, the vectors can be stored in a structured manner and stored in the server vector library to build a relatively complete knowledge base. The language large model performs reasoning based on these converted vectors to obtain prediction results.

[0083] In the third step, update the parameters of the language large model based on the loss between the prediction result and the actual label.

[0084] Specifically, a pre-defined loss function can be used to evaluate the loss between the prediction result and the actual label, and the parameters of the language large model can be optimized by the gradient descent method.

[0085] In some other embodiments, the method for training the language large model through a preset prompt engine includes:

[0086] Specifically, the Prompt Engine is used to guide the language large model to extract energy consumption and material data from unstructured text. For example, the Prompt Engine can require the language large model to identify and extract numerical values and descriptions related to energy consumption. The Prompt Engine can be customized and optimized, and combined with the semantic following ability at the bottom layer of the language large model, the steps to be executed can be customized and disassembled and the effects can be adjusted.

[0087] In still some other embodiments, since the Prompt Engine focuses on the design and optimization of the input text, and the SFT method focuses on using labeled data to adjust the parameters of the model, the two can be combined to jointly train the language large model.

[0088] Exemplarily, after completing the training using the training set, the hyperparameters of the model can be verified using the validation set, and the hyperparameters can be adjusted according to the verification results to optimize the model so that it achieves the best performance on the target task. Then, the test set is used to test the model to evaluate the model performance. After passing the test, it can be confirmed that the training is completed, and the current parameters of the model are saved to obtain the energy-carbon application large model for subsequent reasoning or further fine-tuning.

[0089] Through the above technical solution, the language large model is trained to obtain the energy-carbon application large model, so that the energy-carbon application large model can extract high-dimensional high-quality feature vectors, thereby facilitating the optimization of the generation of carbon reduction and energy consumption reduction strategies, and further improving the carbon reduction and energy consumption reduction effects.

[0090] The retrieval-enhanced generation system of the embodiments of the present application will be introduced below.

[0091] Specifically, the RAG (Retrieval-Augmented Generation) system based on the knowledge base is a deep learning model that combines retrieval and generation, aiming to efficiently and accurately obtain information from a large-scale knowledge base and answer users' questions.

[0092] Please refer to Figure 3 , Figure 3 , which is a schematic flowchart of RAG in the embodiments of the present application. The RAG process of the embodiments of the present application may include Data Preparation, retrieval, recall, and answer generation. Data Preparation includes load, vectorization processing, and storing the converted vectors in the database of the server (such as faiss, chrome, etc. can be selected), and the vectorization processing part includes slitter and embedding. Answer similarity comparison includes retrieval and recall, and answer generation can be implemented through the Enhanced LLM.

[0093] Specifically, load the first energy-carbon information from the first energy-carbon knowledge base, perform vectorization processing on the first energy-carbon information to obtain the second vector corresponding to the first energy-carbon information, and store the second vector in the database of the server. Correspondingly, for the received interaction information, vectorization processing can be performed on the interaction information to obtain the first vector corresponding to the interaction information.

[0094] In some embodiments, the retrieval method of RAG includes:

[0095] Determine the similarity between the first vector and each second vector, and determine the first energy-carbon information corresponding to the second vector whose similarity meets the preset condition as the candidate information.

[0096] Generate context information based on the candidate information.

[0097] Exemplarily, a vector similarity retrieval method based on TF-IDF or BM25 can be adopted to retrieve documents or paragraphs related to the user's question from the first energy and carbon knowledge base, calculate the vector similarity, and sort them in reverse order with the top N selected based on the balance of recall rate and accuracy at the answer level. Finally, the retrieval results are sorted based on question relevance, and the most relevant document is selected as the candidate information.

[0098] The types of candidate information can include long texts and text fragments of Q-A (question and answer) pairs. The candidate information can be further analyzed by adjusting the Prompt Engine to enhance the candidate information, that is, by adjusting the Prompt Engine to guide the generation model to generate context information; or using entity linking technology to match the entities in the text with the entities in the knowledge base to improve the accuracy of the answer; or matching the obtained answer with the information in the knowledge base. If the matching threshold exceeds 85%, it is considered usable with a low hallucination rate. In this way, the generation accuracy of context information can be further improved.

[0099] When generating context information based on candidate information, the generation model (Enhanced LLM) will learn how to extract key information from the retrieved documents and organize it into a coherent answer. Finally, through the decoding layer, the retrieved documents and the question are combined to generate an answer in natural language form. Correspondingly, the answer generation effect can be improved by combining and optimizing the prompt engineering.

[0100] Through the above technical solutions, the RAG system can effectively extract answers from a large amount of information, provide fast and accurate information services for the energy and carbon application large model, and thus help improve the generation accuracy of the carbon inventory report.

[0101] In some embodiments, step 102 can be implemented through the following steps:

[0102] Based on the interaction information and context information, prediction data is obtained.

[0103] Based on the template information, the prediction data is adjusted to obtain the carbon inventory report corresponding to the user's intention.

[0104] Specifically, the energy and carbon application large model can combine the interaction information and context information for reasoning and prediction, and organize and adjust the prediction data according to the template information to obtain the carbon inventory report. Among them, the template information can be designed according to business requirements, specifically including the display formats of energy consumption and material data.

[0105] In some embodiments, after obtaining the carbon inventory report corresponding to the user's intention, the method of the embodiments of the present application may further include the following steps:

[0106] Obtain the user's feedback on the carbon inventory report.

[0107] If the feedback indicates that the carbon inventory report does not meet the expected conditions, optimize the second energy-carbon knowledge base, and re-fine-tune the energy-carbon application large model based on the optimized second energy-carbon knowledge base.

[0108] Specifically, if the feedback indicates that the carbon inventory report does not meet the expected conditions, high-quality corpora in the energy-carbon field can be collected, and the energy-carbon application large model can be fine-tuned again (methods such as LoRA, QLoRA, P-tuning, etc. can be used). It can be understood that the effect after model optimization is closely related to the quality of the corpus, the ratio of positive and negative samples, and model parameters.

[0109] If the model after the second fine-tuning still fails to meet the expectations or some bad cases still keep appearing, RLHF (Reinforcement Learning from Human Feedback) tuning can be considered for the answers, so that the output mode (output values) of the model matches the business.

[0110] In addition, post-processing can be performed on each answer in the carbon inventory report, including grammar checking, eliminating redundant information, etc., to improve the readability and accuracy of the answers. The answers can also be scored through a machine learning model to select the best answer.

[0111] It can be understood that the method of the embodiment of the present application can automatically collect and integrate data, improve the efficiency and accuracy of carbon emission reduction and energy consumption reduction calculations; it can also optimize the overall large model in different industry domains in combination with the results after carbon emission prediction, and further optimize the carbon emission reduction and energy consumption reduction strategies by highly extracting high-quality feature vectors through the large model to improve the carbon emission reduction and energy consumption reduction effects; it can also improve the readability and usability of information through intuitive visualization tools and automated report generation; at the same time, reduce manual intervention, lower the cost and technical threshold of generating carbon inventory reports. The whole method can greatly improve the efficiency of data integration and the generation of carbon inventory reports, and since the quality of the reports generated by the energy-carbon application large model depends on the rich energy-carbon knowledge base, the carbon emission reduction and energy consumption reduction strategies can be optimized, the quality of the generated carbon inventory reports can be improved, and thus help the carbon emission reduction and energy consumption reduction entities better manage and reduce carbon emissions.

[0112] Correspondingly, please refer to Figure 4 , Figure 4 which is the structural schematic diagram of the carbon inventory report generation device of the embodiment of the present application. The carbon inventory report generation device includes an interaction module 401 and a generation module 402.

[0113] The interaction module 401 is used to obtain the interaction information input by the user, and the interaction information includes the user intention indicating the generation of a carbon inventory report;

[0114] A generation module 402, which is configured to obtain a carbon inventory report corresponding to the user intention based on the interaction information and a pre-constructed energy-carbon application large model. The energy-carbon application large model is used to jointly generate a carbon inventory report according to the interaction information and the context information retrieved from the first energy-carbon knowledge base by the retrieval-augmented generation system.

[0115] Among them, the energy-carbon application large model is obtained by fine-tuning a pre-trained language large model based on a second energy-carbon knowledge base. The first energy-carbon knowledge base includes first energy-carbon information in the energy-carbon field, and the second energy-carbon knowledge base includes second energy-carbon information and template information required for generating a carbon inventory report.

[0116] In some embodiments, the device includes a model training module, which is configured to fine-tune a language large model based on a second energy-carbon knowledge base to obtain an energy-carbon application large model, including:

[0117] Annotate the second energy-carbon information based on natural language processing methods and an annotation model to obtain annotation information.

[0118] Preprocess the annotation information to obtain training information.

[0119] Based on the training information, train the language large model through a supervised fine-tuning method and / or a preset prompt engine, and determine the trained language large model as the energy-carbon application large model. The preset prompt engine is used to optimize the training information.

[0120] In some embodiments, the method by which the model training module is configured to train the language large model through a supervised fine-tuning method includes:

[0121] Perform paragraph division on the training information through the language large model to obtain paragraph texts.

[0122] Convert the paragraph texts into vectors, process the vectors, and output prediction results.

[0123] Update the parameters of the language large model based on the loss between the prediction results and the actual labels.

[0124] In some embodiments, the retrieval method of the retrieval-augmented generation system includes:

[0125] Vectorize the interaction information and the first energy-carbon information respectively to obtain a first vector corresponding to the interaction information and a second vector corresponding to the first energy-carbon information.

[0126] Determine the similarity between the first vector and each second vector, and determine the first energy-carbon information corresponding to the second vector whose similarity meets the preset conditions as candidate information.

[0127] Generate context information based on the candidate information.

[0128] In some embodiments, the generation module 402 is specifically configured to:

[0129] Based on the interaction information and context information, obtain prediction data.

[0130] Adjust the prediction data based on the template information to obtain a carbon inventory report corresponding to the user intention.

[0131] In some embodiments, the second energy and carbon information is obtained based on at least one of an environmental report, energy and carbon business emails, and an energy and carbon knowledge system.

[0132] In some embodiments, the interaction module 401 is further configured to:

[0133] Obtain feedback information from the user on the carbon inventory report.

[0134] If the feedback information indicates that the carbon inventory report does not meet the expected conditions, optimize the second energy and carbon knowledge base, and re-fine-tune the energy and carbon application large model based on the optimized second energy and carbon knowledge base.

[0135] It can be understood that the device in the embodiments of the present application can automatically generate a carbon inventory report based on the user intention of generating a carbon inventory report, using a pre-trained and fine-tuned energy and carbon application large model, thereby greatly improving the data integration and the generation efficiency of the carbon inventory report. And since the quality of the report generated by the energy and carbon application large model depends on a rich energy and carbon knowledge base, the carbon reduction and consumption reduction strategies can be optimized, and the generation quality of the carbon inventory report can be improved.

[0136] Correspondingly, please refer to Figure 5 , Figure 5 which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described herein and / or claimed.

[0137] The electronic device 50 includes one or more processors 51, and storage devices such as read-only memory (ROM) 52, random access memory (RAM) 53, etc. Among them, the storage devices store one or more programs. When the one or more programs are executed by the one or more processors 51, the one or more processors 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 into the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, ROM 52, and RAM 53 are connected to each other through a bus 54. The input / output (I / O) interface 55 is also connected to the bus 54. Multiple components in the electronic device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a magnetic disk, optical disk, etc.; and a communication unit 59, such as a network card, modem, wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0138] The processor 51 can be various general-purpose and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods described in the foregoing embodiments, such as the carbon inventory report generation method, or the processor 51 can configure the carbon inventory report generation device described in the foregoing embodiments.

[0139] In some embodiments, the carbon inventory report generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 58. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the carbon inventory report generation method described in the foregoing embodiments can be executed, or the processor 51 can be enabled to configure the carbon inventory report generation device described in the foregoing embodiments. Alternatively, in other embodiments, the processor 51 can be configured to execute the carbon inventory report generation method by any other appropriate means (for example, by means of firmware).

[0140] In the context of the embodiments of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] The systems and techniques described herein can be implemented in a computing system that includes backend components (such as, for example, a data server), or a computing system that includes middleware components (such as, for example, an application server), or a computing system that includes frontend components (such as, for example, a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (such as, for example, a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0142] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0143] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the embodiments of the present application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present application can be achieved, and this is not limited herein.

[0144] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, which contains computer-executable instructions. When the computer-executable instructions are executed by a computer processor, the carbon inventory report generation method as described in the foregoing embodiment is implemented.

[0145] Correspondingly, an embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the carbon inventory report generation method as described in the foregoing embodiment is implemented.

[0146] The foregoing has introduced in detail a carbon inventory report generation method, device, equipment, storage medium and program product provided by an embodiment of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating a carbon inventory report, characterized in that: include: Acquiring interactive information input by a user, wherein the interactive information includes a user's intention to generate a carbon inventory report; Based on the interaction information and the pre-built energy-carbon application big model, a carbon inventory report corresponding to the user intention is obtained, and the energy-carbon application big model is used to jointly generate a carbon inventory report according to the interaction information and the context information retrieved by the retrieval enhancement generation system from the first energy-carbon knowledge base; Among them, the energy carbon application big model is obtained by fine-tuning the pre-trained language big model based on the second energy carbon knowledge base, the first energy carbon knowledge base includes the first energy carbon information in the energy carbon field, and the second energy carbon knowledge base includes the second energy carbon information and template information required to generate a carbon inventory report.

2. The method for generating a carbon inventory report according to claim 1, characterized in that: The method of fine-tuning the language macro model based on the second energy carbon knowledge base to obtain the energy carbon application macro model includes: Annotating the second energy carbon information based on a natural language processing method and an annotation model to obtain annotation information; Preprocessing the labeled information to obtain training information; Based on the training information, the language big model is trained through a supervised fine-tuning method and / or a preset prompt engine, and the trained language big model is determined as the energy-carbon application big model, and the preset prompt engine is used to tune the training information.

3. The method for generating a carbon inventory report according to claim 2, characterized in that: The method for training the large language model by the supervised fine-tuning method includes: Divide the training information into paragraphs using the language macro model to obtain paragraph texts; Convert the paragraph text into a vector, process the vector, and output a prediction result; The parameters of the language model are updated based on the loss between the prediction result and the actual label.

4. The method for generating a carbon inventory report according to claim 1, characterized in that: The retrieval method of the retrieval enhancement generation system comprises: Vectorizing the interaction information and the first energy-carbon information respectively to obtain a first vector corresponding to the interaction information and a second vector corresponding to the first energy-carbon information; Determine the similarity between the first vector and each of the second vectors, and determine the first energy carbon information corresponding to the second vector whose similarity meets a preset condition as candidate information; The context information is generated based on the candidate information.

5. The method for generating a carbon inventory report according to claim 1, characterized in that: Based on the interactive information and the pre-built energy-carbon application model, a carbon inventory report corresponding to the user's intention is obtained, including: Obtaining prediction data based on the interaction information and the context information; The predicted data is adjusted based on the template information to obtain a carbon inventory report corresponding to the user's intention.

6. The method for generating a carbon inventory report according to claim 1, characterized in that: The second energy carbon information is obtained based on at least one of an environmental report, energy carbon business correspondence emails, and an energy carbon knowledge system.

7. The method for generating a carbon inventory report according to claim 1, characterized in that: The method further comprises: Obtaining user feedback on the carbon inventory report; If the feedback information indicates that the carbon inventory report does not meet the expected conditions, the second energy-carbon knowledge base is optimized, and the energy-carbon application model is fine-tuned based on the optimized second energy-carbon knowledge base.

8. A carbon inventory report generating device, characterized in that: include: An interaction module, the interaction module is used to obtain interaction information input by a user, the interaction information including a user's intention to indicate the generation of a carbon inventory report; A generation module, the generation module is used to obtain a carbon inventory report corresponding to the user intention based on the interaction information and a pre-built energy-carbon application model, and the energy-carbon application model is used to generate a carbon inventory report based on the interaction information and context information retrieved from the first energy-carbon knowledge base by the retrieval enhancement generation system; Among them, the energy carbon application big model is obtained by fine-tuning the pre-trained language big model based on the second energy carbon knowledge base, the first energy carbon knowledge base includes the first energy carbon information in the energy carbon field, and the second energy carbon knowledge base includes the second energy carbon information and template information required to generate a carbon inventory report.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the carbon inventory report generating method according to any one of claims 1 to 7.

10. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the carbon inventory report generation method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the carbon inventory report generation method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Energy-carbon knowledge assistance method and system based on GraphRAG enhanced large language model

    CN121724125A