Enterprise carbon emission intelligent analysis method based on large language model
Through intelligent analysis methods based on large language models, the company's carbon emission reports are analyzed and evaluated, which solves the problems of enterprises in processing and analyzing carbon emission reports, and achieves more efficient data analysis and professional Q&A.
Patent Information
- Application Number
- CN202411854113.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-25
AI Technical Summary
Enterprises face difficulties in understanding and analysis when dealing with and analyzing carbon emission reports, and large language models lack domain knowledge or latest data when dealing with professional field problems, making it difficult to provide accurate answers.
The intelligent analysis method of enterprise carbon emissions based on large language models is adopted, and the target query data is analyzed and processed, and the intelligent answering mechanism that is suitable for classification results is used to search and answer data, and the enterprise carbon emission reports are searched vector, carbon emission analysis and report evaluation.
It realizes more efficient data analysis and professional Q&A, makes up for the shortcomings of traditional Q&A systems, and improves the understanding and analysis capabilities of enterprise carbon emission reports.
Smart Images

Figure CN119692619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and natural language processing technology, and in particular to an intelligent analysis method for enterprise carbon emissions based on a large language model. Background Art
[0002] In the current context of global climate change, the issue of sustainability has gradually evolved into a critical issue. Therefore, companies need to take transparent measures to monitor sustainable development practices in their operations, improve resource utilization efficiency, reduce carbon emissions, and lower corporate production costs. However, the overly long corporate carbon emission reports and government carbon emission policies have brought difficulties in understanding and analysis for companies themselves, investors, and the general public.
[0003] With the development of large language model (LLM) technology, deep learning models based on massive text data have demonstrated powerful language processing and generation capabilities. However, although large language models have made significant progress in the field of scientific research, they often find it difficult to provide accurate answers when dealing with professional problems due to lack of domain knowledge or the latest data. Therefore, how to achieve more efficient data analysis and professional Q&A and make up for the shortcomings of traditional Q&A systems has become one of the current research focuses.
[0004] Therefore, the present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model. Summary of the invention
[0005] The present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model, which is used to obtain a first classification result by analyzing and processing the acquired target query data; utilizes an intelligent answer mechanism based on a large language model that is compatible with the first classification result to perform data retrieval and intelligent answers based on the first query data; and implements vector retrieval, carbon emission analysis and report assessment operations on the acquired enterprise carbon emission report based on the large language model, thereby achieving more efficient data analysis and professional question and answer, and making up for the shortcomings of traditional question and answer systems.
[0006] The present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model, comprising: Step 1: Analyze and process the currently acquired target query data to obtain a first classification result; Step 2: using an intelligent answering mechanism based on a large language model adapted to the first classification result, to perform data retrieval and intelligent answering based on the first query data; Step 3: Implement vector retrieval, carbon emission analysis and report assessment operations for the currently acquired corporate carbon emission reports based on the large language model.
[0007] Preferably, the currently acquired target query data is analyzed and processed to obtain a first classification result, including: Perform data category judgment on the target query data to obtain the data category; Using the first category to take appropriate specific processing measures, preprocess the target query data to obtain first query data; The first query data is input into a pre-established data classification model to obtain a first classification result.
[0008] Preferably, the first classification result includes two classification results: the query data is in a structured database and a relational database needs to be called to obtain the result; and the query data does not need to call a relational database to obtain the result.
[0009] Preferably, using an intelligent answer mechanism based on a large language model adapted to the first classification result, data retrieval and intelligent answering are performed based on the first query data, including: When the first classification result is that the first query data is in a structured database and a relational database needs to be called to obtain the result, an intelligent question-answering mechanism based on Text2SQL is selected; According to the intelligent question-answering mechanism based on Text2SQL, the intent recognition model is used to perform intent recognition on the first query data to obtain a first intent recognition result; Taking the first intent recognition result as a matching condition, a key SQL template is obtained by screening from a preset Text2SQL template library; Extracting first key metadata from the first intent recognition result and the first query data, and filling the first key metadata into the key SQL template to obtain a first query script; Verifying the first query script, optimizing and repairing the first query script when an anomaly exists, and re-verifying the first query script until the verification is successful; Submitting the first query script after successful verification to the target database, and the target database returns the first query result according to the obtained first query script; After judging and processing the first query result, it is converted into a natural language answer using LLM and then transmitted to the target user; When the first classification result is that the query data does not need to call a relational database to obtain the result, an intelligent question-answering mechanism based on intelligent retrieval and a large language model is selected; According to the intelligent question-answering mechanism based on intelligent retrieval and large language model, the intent recognition model is used to perform intent recognition on the first query data to obtain a second intent recognition result; Determining a first retrieval mode according to the second intention recognition result; Extracting second key metadata from the second intent recognition result and the first query data, using the second key metadata as a matching condition, and screening out a key prompt template from a preset prompt template library; Fill the second key metadata into the key prompt template to obtain a second query script; After verifying and optimizing the second query script using a preset script verification mechanism, intelligent retrieval is performed based on the second query script using a first retrieval mode to obtain a first retrieval result; After sorting the first search results using the preset structured thinking based on BM25+embedding hybrid search, the first search results are rearranged using the set rearrangement model to obtain the second search results; The second search result is converted into a natural language answer using LLM and then transmitted to the target user.
[0010] Preferably, the accuracy of the first query script is verified, and when an abnormality exists, the first query script is optimized and repaired, including: Inputting the first query script into a pre-established script verification model for verification to obtain a first verification result; According to the first verification result, if there is no error in the current first query result, it is determined that the current first query script is successfully verified; If there is an error in the current first query result, the correct part in the first verification result is marked as the first correct part, and the error part is marked as the first misplaced part, and then output as a preliminary abnormal verification result; Using an SQL parser provided by the relational database to perform syntax verification on the first query script to obtain a first syntax verification result; Verifying the first query script using set semantic verification rules to obtain a first semantic verification result; The first syntax verification result, the first semantic verification result and the preliminary abnormality verification result are combined and analyzed to perform accuracy analysis on the current first query script to obtain an accurate analysis result; If the current first query script verification fails, the exception handling priority of the first query script is determined according to the exception coefficient in the accurate analysis result, and the exception class in the accurate analysis result is used as the matching condition to match the corresponding processing strategy for optimization and repair.
[0011] Preferably, the first syntax verification result, the first semantic verification result and the preliminary abnormality verification result are combined for analysis, and the accuracy analysis of the current first query script is performed to obtain an accurate analysis result, including: If there is no first error part of the syntax type in the current preliminary abnormality verification result, and there is no syntax error in the first syntax verification result, it is determined that the syntax of the current first query script is normal; If there is a first error part of the syntax type in the current preliminary abnormality verification result, or there is a syntax error in the first syntax verification result, then it is determined that the syntax of the current first query script is abnormal; Marking the grammatical errors in the first grammar verification result as a first grammar exception class; Marking the first error part of the grammatical class existing in the preliminary abnormality verification result as a second grammatical abnormality class; Divide the first grammatical anomaly class and the second grammatical anomaly class according to a preset division rule to obtain a coincident grammatical error group; Performing grammatical anomaly analysis based on the acquired first grammatical anomaly class, second grammatical anomaly class, and overlapping grammatical error group, obtaining a target grammatical anomaly coefficient; The calculation formula of the target syntax anomaly coefficient is as follows: ; In the formula, Expressed as the target syntax anomaly coefficient; r Represented as the total number of the first grammatical exception class; r It is represented as the total number of the second grammar exception class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target syntax anomaly coefficient; It represents the influence weight of the target syntax anomaly coefficient calculated for model validation; It is represented by the amount of overlap between the first grammatical anomaly class and the second grammatical anomaly class in the oth overlapping grammatical error group, where o=1, 2, 3, , ; It is expressed as the total number of overlapping grammatical error groups; It is expressed as the absolute difference between the content of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group; It is represented as the influence weight of the amount of overlapping contents of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; It is represented as the influence weight of the absolute difference between the first grammatical anomaly category and the second grammatical anomaly category corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; The first grammatical anomaly class, the second grammatical anomaly class and the target grammatical anomaly coefficient are combined to obtain a grammatical anomaly result; If the first error part of the semantic class does not exist in the current preliminary abnormality verification result, and there is no semantic error in the first semantic verification result, it is determined that the semantics of the current first query script is normal; If there is a first error part of the semantic class in the current preliminary abnormality verification result, or there is a semantic error in the first semantic verification result, then it is determined that the current first query script is semantically abnormal; Marking the semantic errors in the first semantic verification result as a first semantic anomaly class; Marking the first error part of the semantic class existing in the current preliminary anomaly verification result as a second semantic anomaly class; Dividing the first semantic anomaly class and the second semantic anomaly class according to a preset division rule to obtain a coincident semantic error group; Based on the obtained first semantic anomaly class, second semantic anomaly class and overlapping semantic error group, semantic anomaly analysis is performed to obtain a target semantic anomaly coefficient; The calculation formula of the target semantic anomaly coefficient is as follows: ; In the formula, It is expressed as the target semantic anomaly coefficient; Represented as the total number of the first semantic anomaly class; m It is represented as the total number of the second semantic anomaly class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target semantic anomaly coefficient; It represents the influence weight of the target semantic anomaly coefficient calculated for model validation; It is represented as the amount of overlap between the first semantic anomaly class and the second semantic anomaly class in the jth overlapping semantic error group, where j=1, 2, 3, , ; It is expressed as the total number of overlapping semantic error groups; It is expressed as the absolute difference between the content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group; It is expressed as the influence weight of the amount of overlapping content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group on the analysis of semantic anomaly; It is expressed as the influence weight of the absolute difference between the first semantic anomaly category and the second semantic anomaly category of the j-th overlapping semantic error group on the analysis of semantic anomaly; The first semantic anomaly class, the second semantic anomaly class, and the target semantic anomaly coefficient are combined to obtain a semantic anomaly result; If the syntax and semantics of the current first query script are normal, the current first query script is determined to be successfully verified and output as an accurate analysis result; If the current first query script only has a grammatical anomaly or only has a semantic anomaly, it is determined that the current first query script has an anomaly, and the corresponding grammatical anomaly result or semantic anomaly result is output as an accurate analysis result; If the current first query script has grammatical anomalies and semantic anomalies, it is determined that the current first query script has anomalies, and the target grammatical anomaly coefficient and the target semantic anomaly coefficient are averaged to obtain a comprehensive anomaly coefficient; The comprehensive anomaly coefficient, grammatical anomaly result and semantic anomaly result are output as accurate analysis results.
[0012] Preferably, the currently acquired corporate carbon emission report is subjected to vector retrieval, carbon emission analysis and report assessment operations based on a large language model, including: Segmenting the enterprise carbon emission report into report text blocks, and then performing vector space representation on the report text blocks to obtain a report vector space; Constructing a first search query based on the GHG Protocol guidelines, using the report suggestion query in the first search query to retrieve the portion related to each GHG Protocol suggestion from the corporate carbon emission report, obtaining a first search content, and marking it as an analysis prompt; Generate a first emission result based on the retrieved first search content and basic background information using a pre-established analysis language model, and establish a carbon emission analysis report based on the first emission result; Using the vector suggestion query in the first search query, searching the report vector space for a portion related to each GHGProtocol suggestion to obtain a first vector content; Compare the corresponding first vector content of each GHG Protocol recommendation with the detailed disclosure guidelines in the GHG Protocol guidelines to obtain a first comparison result; Based on the set paragraph generation rules, combined with the conforming points and non-conforming points in the first comparison result, generate a report analysis paragraph; Based on the first comparison result, analyzing the conformity of the report to obtain a report conformity score; The report analysis paragraphs are combined with the report compliance scores to generate a key assessment report of the current corporate carbon emissions report.
[0013] Preferably, it also includes: Obtain custom questions from target users and perform data preprocessing to obtain custom data; Building a custom search query based on the custom question, and using the custom search query to filter and obtain a target text block from the report vector space; Extracting custom related content directly related to the custom question from the acquired target text block, combining it with the custom data input into the analysis language model, and obtaining a custom answer; The customized answers are combined with customized related content and customized questions to generate a customized analysis report, which is then transmitted to the target user.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The first classification result is obtained by analyzing and processing the acquired target query data; data retrieval and intelligent answers are performed based on the first query data using an intelligent answering mechanism based on a large language model that is compatible with the first classification result; vector retrieval, carbon emission analysis and report assessment operations are implemented for the acquired corporate carbon emission reports based on a large language model, which can achieve more efficient data analysis and professional question and answer, and make up for the shortcomings of traditional question and answer systems.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0016] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of a method for intelligent analysis of enterprise carbon emissions based on a large language model in an embodiment of the present invention; Figure 2 A structural diagram of an intelligent question-answering system in an embodiment of the present invention; Figure 3 It is a flowchart of a preset structured thinking chain in an embodiment of the present invention; Figure 4 This is a flow chart of the mixed retrieval of BM25 and BGE M3-Embedding models in an embodiment of the present invention; Figure 5 It is a flow chart of an intelligent question-answering mechanism based on intelligent retrieval and a large language model in an embodiment of the present invention; Figure 6 It is a flow chart of the SQL system involved in the intelligent question-answering mechanism based on intelligent retrieval and large language model in an embodiment of the present invention; Figure 7 The present invention is a flowchart of a diversified document parsing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0019] The embodiment of the present invention provides a method for intelligent analysis of enterprise carbon emissions based on a large language model. Figure 1 As shown, including: Step 1: Analyze and process the currently acquired target query data to obtain a first classification result; Step 2: using an intelligent answering mechanism based on a large language model adapted to the first classification result, to perform data retrieval and intelligent answering based on the first query data; Step 3: Implement vector retrieval, carbon emission analysis and report assessment operations for the currently acquired corporate carbon emission reports based on the large language model.
[0020] In this embodiment, the target query data refers to the data that the current target user wants to query, such as text or voice; the target user refers to the user who wants to query the data to realize intelligent question and answer; the first classification result refers to the one obtained by classifying and identifying the target query data, including two classification results: the query data is in a structured database and a relational database needs to be called to obtain the result; and the query data does not need to call a relational database to obtain the result.
[0021] In this embodiment, the intelligent answer mechanism refers to the execution steps for realizing intelligent question answering based on the large language model, including two mechanisms, one is the intelligent question answering mechanism based on intelligent retrieval and large language model (such as Figure 5 As shown), the process of the SQL system involved is as follows Figure 6 As shown, one is an intelligent question-answering mechanism based on Text2SQL.
[0022] In this embodiment, for example, a method for intelligent analysis of enterprise carbon emissions based on a large language model can be used in an intelligent question-answering system (such as Figure 2 as shown).
[0023] The beneficial effects of the above technical solution are: by analyzing and processing the acquired target query data, a first classification result is obtained; using an intelligent answer mechanism based on a large language model that is compatible with the first classification result, data retrieval and intelligent answers are performed based on the first query data; vector retrieval, carbon emission analysis and report assessment operations are implemented for the acquired corporate carbon emission reports based on a large language model, which can achieve more efficient data analysis and professional Q&A, and make up for the shortcomings of traditional question-and-answer systems.
[0024] The embodiment of the present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model, which analyzes and processes the currently acquired target query data to obtain a first classification result, including: Perform data category judgment on the target query data to obtain the data category; Using the first category to take appropriate specific processing measures, preprocess the target query data to obtain first query data; The first query data is input into a pre-established data classification model to obtain a first classification result.
[0025] In this embodiment, target query data refers to the data that the current target user wants to query, such as text and voice; data category refers to the category of query data, such as text and voice; data category refers to the category of current target query data; specific processing measures are used to preprocess the target query data, and the processing measures for target query data of different data categories may be different; first query data refers to data obtained by preprocessing the target query data with appropriate specific processing measures; the data classification model is used to classify and identify the first query data, and is by automatically generating training data by extracting metadata information from an existing database, annotating the training data by manually marking whether it exists in the database according to historical data query information, and using the annotated training data to train a neural network to obtain a classification model; the first classification result includes two classification results: the query data is in a structured database, and a relational database needs to be called to obtain the result; and the query data does not need to call a relational database to obtain the result.
[0026] The beneficial effect of the above technical solution is: by analyzing and processing the currently acquired target query data, a first classification result is obtained, which can provide a data basis for the subsequent selection of an appropriate intelligent answer mechanism based on a large language model.
[0027] The embodiment of the present invention provides a method for intelligent analysis of enterprise carbon emissions based on a large language model, characterized in that an intelligent answer mechanism based on a large language model adapted to the first classification result is used to perform data retrieval and intelligent answer based on first query data, including: When the first classification result is that the first query data is in a structured database and a relational database needs to be called to obtain the result, an intelligent question-answering mechanism based on Text2SQL is selected; According to the intelligent question-answering mechanism based on Text2SQL, the intent recognition model is used to perform intent recognition on the first query data to obtain a first intent recognition result; Taking the first intent recognition result as a matching condition, a key SQL template is obtained by screening from a preset Text2SQL template library; Extracting first key metadata from the first intent recognition result and the first query data, and filling the first key metadata into the key SQL template to obtain a first query script; Verifying the first query script, optimizing and repairing the first query script when an anomaly exists, and re-verifying the first query script until the verification is successful; Submitting the first query script after successful verification to the target database, and the target database returns the first query result according to the obtained first query script; After judging and processing the first query result, it is converted into a natural language answer using LLM and then transmitted to the target user; When the first classification result is that the query data does not need to call a relational database to obtain the result, an intelligent question-answering mechanism based on intelligent retrieval and a large language model is selected; According to the intelligent question-answering mechanism based on intelligent retrieval and large language model, the intent recognition model is used to perform intent recognition on the first query data to obtain a second intent recognition result; Determining a first retrieval mode according to the second intention recognition result; Extracting second key metadata from the second intent recognition result and the first query data, using the second key metadata as a matching condition, and screening out a key prompt template from a preset prompt template library; Fill the second key metadata into the key prompt template to obtain a second query script; After verifying and optimizing the second query script using a preset script verification mechanism, intelligent retrieval is performed based on the second query script using a first retrieval mode to obtain a first retrieval result; After sorting the first search results using the preset structured thinking based on BM25+embedding hybrid search, the first search results are rearranged using the set rearrangement model to obtain the second search results; The second search result is converted into a natural language answer using LLM and then transmitted to the target user.
[0028] In this embodiment, a structured database refers to a database in which data is stored according to a certain data structure (such as a table structure), and each data item has its specific location and data type. The structured database allows efficient query, insertion, update and deletion operations on the data; a relational database refers to a database that uses a table to store data, each row in the table represents a record, and each column represents a field. The relational database uses SQL (Structured Query Language) to manage and operate data.
[0029] In this embodiment, the intelligent question-answering mechanism based on Text2SQL refers to understanding the user's natural language query, converting it into a corresponding SQL query statement, and then executing the SQL query to obtain the result in the database; the intention recognition model refers to a model used to identify the user's query intention, and determines the operation the user wants to perform or the type of information to be obtained by analyzing the given query data; the first intention recognition result (according to the intelligent question-answering mechanism based on Text2SQL) is the output of the intention recognition model after processing the user's first query data, which represents the user's query intention; the intention recognition model is established by first using the metadata information of the existing database to automatically generate training data (including information about the database structure, tables, fields, etc.), combining historical query data to generate training data by annotating the query intention or target label (such as query type, required operation, etc.), and then using all the acquired training data to train the neural network.
[0030] In this embodiment, the preset Text2SQL template library consists of SQL templates for different query scenarios and database structures; the first key metadata is extracted from the user's query data and the first intent recognition result, and is used to fill in the key information of the SQL template, such as the query keywords and time range; the first query script refers to the SQL template filled with key metadata, which is represented by the query operation performed on the database; the target database refers to the database that currently returns the corresponding data results according to the provided first query script, including two types: structured databases and relational databases; judging and processing the first query result includes deduplication, sorting, formatting and other processing; LLM refers to a large language model, which is used to understand and generate natural language text.
[0031] In this embodiment, the intelligent question-answering mechanism based on intelligent retrieval and large language model refers to combining the advantages of intelligent retrieval technology and large language model, by retrieving relevant documents and using large language model to understand and generate answers; the second intention recognition result (according to the intelligent question-answering mechanism based on intelligent retrieval and large language model) is the output of the intention recognition model after processing the user's first query data, indicating the user's query intention; the first retrieval mode includes three modes: direct answer to questions, RAG mode retrieval and Text2SQL retrieval; the second key metadata is extracted from the user's query data and the second intention recognition result, and is used to fill in the key information of the SQL template, such as the query keywords; the preset prompt template library is composed of a series of templates for generating retrieval prompts or query suggestions; the key prompt template is a template selected from the preset prompt template library with key metadata as a matching condition, and is used to generate a retrieval prompt or query suggestion; the second query script is generated based on the key prompt template and key metadata, and is used to execute the query statement or condition of intelligent retrieval.
[0032] In this embodiment, the preset script verification mechanism refers to a pre-established mechanism for performing syntax verification on the second query script using set verification indicators, and taking an appropriate strategy to optimize the script according to the cause of failure when the verification fails, wherein the set verification indicators include grammatical correctness, logical accuracy, data consistency and security, and the cause of failure includes grammatical errors, logical errors, data errors and security issues; the processing strategy includes correcting grammatical errors, adjusting logic, verifying data and security protection; the first search result is a result set returned after executing intelligent retrieval, which may contain multiple documents or records related to the query; the purpose of sorting the first search result using BM25+embedding hybrid retrieval and re-ranking the search result using a set re-ranking model is to improve the accuracy and relevance of the retrieval, wherein the set re-ranking model is a predetermined bge-reranker-large re-ranking model; the second search result is a search result set after the first search result is sorted and re-ranked.
[0033] In this embodiment, a structured thinking chain is preset (the flowchart is as follows Figure 3 The specific process is as follows: The user enters a query, and the query is rewritten in a variety of ways to improve the robustness of the search. At the same time, a few sample COT prompts are used to generate pre-answers and extract key sentences. Then, the system performs a hybrid search of BM25+embedding on the rewritten query and the extracted key sentences, respectively, to obtain the top 5 results for each part. Finally, the system concatenates and reorders these results to ensure that the most relevant results are returned to the user.
[0034] In this embodiment, BM25 and BGE M3-Embedding models are used (the flowchart is shown in FIG. Figure 4 Perform mixed search and take the top 5: ;in, is the weight of the BM25 model, is the weight of the BGE M3-Embedding model; and is the ranking of document d in the BM25 and BGE M3-Embedding models; the lower the ranking (i.e. the larger the value), the weaker the document relevance; c is used to prevent the denominator from being zero when the ranking is 0, and to control the smoothness of the ranking, usually with a value of 60. The larger the c value, the smaller the impact of low-ranking documents.
[0035] The beneficial effect of the above technical solution is: by utilizing the intelligent answer mechanism based on the large language model that is compatible with the first classification result, data retrieval and intelligent answering are performed based on the first query data, which can effectively improve the query efficiency and accuracy.
[0036] The embodiment of the present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model, verifies the accuracy of the first query script, and optimizes and repairs the first query script when an abnormality exists, including: Inputting the first query script into a pre-established script verification model for verification to obtain a first verification result; According to the first verification result, if there is no error in the current first query result, it is determined that the current first query script is successfully verified; If there is an error in the current first query result, the correct part in the first verification result is marked as the first correct part, and the error part is marked as the first misplaced part, and then output as a preliminary abnormal verification result; Using an SQL parser provided by the relational database to perform syntax verification on the first query script to obtain a first syntax verification result; Verifying the first query script using set semantic verification rules to obtain a first semantic verification result; The first syntax verification result, the first semantic verification result and the preliminary abnormality verification result are combined and analyzed to perform accuracy analysis on the current first query script to obtain an accurate analysis result; If the current first query script verification fails, the exception handling priority of the first query script is determined according to the exception coefficient in the accurate analysis result, and the exception class in the accurate analysis result is used as the matching condition to match the corresponding processing strategy for optimization and repair.
[0037] In this embodiment, the script verification model refers to a pre-established model for verifying an input query script (such as an SQL script). The script verification model is obtained by preprocessing a large number of collected query scripts, extracting and encoding related features, and training a neural network as training samples, wherein the related features include keywords, grammatical structures, semantic relationships, etc.; the first verification result refers to the result output by the script verification model after verifying the first query script, which includes the correct part and the wrong part of the script; the errors include two types: grammatical errors and semantic errors, wherein the grammatical errors refer to the grammatically incorrect parts in the first query script (such as spelling errors, missing keywords, etc.), and the semantic errors refer to the semantically incorrect parts in the first query script (such as logical errors, field mismatches); the first correct part refers to the script part marked as correct in the first verification result, which complies with grammatical and semantic rules; the first misplaced part refers to the script part marked as incorrect in the first verification result, which needs to be optimized and repaired.
[0038] In this embodiment, the preliminary abnormal verification result refers to the output result including the first correct part and the first error part; the SQL parser refers to the tool provided by the relational database for performing syntax analysis on the SQL script; the first syntax verification result is the result obtained after the syntax verification of the first query script using the SQL parser; the set semantic verification rule is a predefined rule for checking the semantic correctness of the script, including field type matching, logical expression correctness and data integrity constraints; the first semantic verification result refers to the result obtained after the first query script is verified according to the set semantic verification rule; there are four situations for the accurate analysis result, one is that the syntax of the current first query script is normal and the semantics is normal (when it is determined that the current first query script is successfully verified), one is the syntax abnormal result (when it is determined that the current first query script has an abnormality and only the syntax abnormality exists), one is the semantic abnormal result (when it is determined that the current first query script has an abnormality and only the semantic abnormality exists, and one is that the accurate analysis result includes the comprehensive abnormality coefficient, the syntax abnormality result and the semantic abnormality result (when it is determined that the current first query script has an abnormality and both the semantic abnormality and the syntax abnormality exist).
[0039] In this embodiment, the exception coefficient is used to measure the severity and repair difficulty of the error part in the script, including three types: target syntax exception coefficient, target semantic exception coefficient and comprehensive exception coefficient; the exception handling priority refers to the repair order of the script error part determined according to the exception coefficient in the current accurate analysis result. The higher the exception coefficient, the higher the repair order. Among them, when the accurate analysis result includes the comprehensive exception coefficient, the syntax exception result and the semantic exception result at the same time, the repair order of the script error part is determined by the comprehensive exception coefficient; the exception class refers to the error class in the accurate analysis result, including the first syntax exception class, the second syntax exception class, the first semantic exception class or the second semantic exception class.
[0040] The beneficial effect of the above technical solution is: by verifying the accuracy of the first query script and optimizing and repairing the first query script when anomalies exist, the accuracy of the query script can be improved, the error rate and cost can be reduced, and the query efficiency and accuracy can be improved.
[0041] The embodiment of the present invention provides an intelligent analysis method for enterprise carbon emissions based on a large language model, which combines the first syntax verification result, the first semantic verification result and the preliminary abnormality verification result for analysis, performs accuracy analysis on the current first query script, and obtains an accurate analysis result, including: If there is no first error part of the syntax type in the current preliminary abnormality verification result, and there is no syntax error in the first syntax verification result, it is determined that the syntax of the current first query script is normal; If there is a first error part of the syntax type in the current preliminary abnormality verification result, or there is a syntax error in the first syntax verification result, then it is determined that the syntax of the current first query script is abnormal; Marking the grammatical errors in the first grammar verification result as a first grammar exception class; Marking the first error part of the grammatical class existing in the preliminary abnormality verification result as a second grammatical abnormality class; Divide the first grammatical anomaly class and the second grammatical anomaly class according to a preset division rule to obtain a coincident grammatical error group; Performing grammatical anomaly analysis based on the acquired first grammatical anomaly class, second grammatical anomaly class, and overlapping grammatical error group, obtaining a target grammatical anomaly coefficient; The calculation formula of the target syntax anomaly coefficient is as follows: ; In the formula, Expressed as the target syntax anomaly coefficient; r Represented as the total number of the first grammatical exception class; r It is represented as the total number of the second grammar exception class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target syntax anomaly coefficient; It represents the influence weight of the target syntax anomaly coefficient calculated for model validation; It is represented by the amount of overlap between the first grammatical anomaly class and the second grammatical anomaly class in the oth overlapping grammatical error group, where o=1, 2, 3, , ; It is expressed as the total number of overlapping grammatical error groups; It is expressed as the absolute difference between the content of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group; It is represented as the influence weight of the amount of overlapping contents of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; It is represented as the influence weight of the absolute difference between the first grammatical anomaly category and the second grammatical anomaly category corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; The first grammatical anomaly class, the second grammatical anomaly class and the target grammatical anomaly coefficient are combined to obtain a grammatical anomaly result; If the first error part of the semantic class does not exist in the current preliminary abnormality verification result, and there is no semantic error in the first semantic verification result, it is determined that the semantics of the current first query script is normal; If there is a first error part of the semantic class in the current preliminary abnormality verification result, or there is a semantic error in the first semantic verification result, then it is determined that the current first query script is semantically abnormal; Marking the semantic errors in the first semantic verification result as a first semantic anomaly class; Marking the first error part of the semantic class existing in the current preliminary anomaly verification result as a second semantic anomaly class; Dividing the first semantic anomaly class and the second semantic anomaly class according to a preset division rule to obtain a coincident semantic error group; Based on the obtained first semantic anomaly class, second semantic anomaly class and overlapping semantic error group, semantic anomaly analysis is performed to obtain a target semantic anomaly coefficient; The calculation formula of the target semantic anomaly coefficient is as follows: ; In the formula, It is expressed as the target semantic anomaly coefficient; Represented as the total number of the first semantic anomaly class; m It is represented as the total number of the second semantic anomaly class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target semantic anomaly coefficient; It represents the influence weight of the target semantic anomaly coefficient calculated for model validation; It is represented as the amount of overlap between the first semantic anomaly class and the second semantic anomaly class in the jth overlapping semantic error group, where j=1, 2, 3, , ; It is expressed as the total number of overlapping semantic error groups; It is expressed as the absolute difference between the content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group; It is expressed as the influence weight of the amount of overlapping content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group on the analysis of semantic anomaly; It is expressed as the influence weight of the absolute difference between the first semantic anomaly category and the second semantic anomaly category of the j-th overlapping semantic error group on the analysis of semantic anomaly; The first semantic anomaly class, the second semantic anomaly class, and the target semantic anomaly coefficient are combined to obtain a semantic anomaly result; If the syntax and semantics of the current first query script are normal, the current first query script is determined to be successfully verified and output as an accurate analysis result; If the current first query script only has a grammatical anomaly or only has a semantic anomaly, it is determined that the current first query script has an anomaly, and the corresponding grammatical anomaly result or semantic anomaly result is output as an accurate analysis result; If the current first query script has grammatical anomalies and semantic anomalies, it is determined that the current first query script has anomalies, and the target grammatical anomaly coefficient and the target semantic anomaly coefficient are averaged to obtain a comprehensive anomaly coefficient; The comprehensive anomaly coefficient, grammatical anomaly result and semantic anomaly result are output as accurate analysis results.
[0042] In this embodiment, the first grammatical exception class refers to the grammatical errors existing in the first grammatical verification result; the second grammatical exception class refers to the first error part of the grammatical class existing in the preliminary exception verification result; the preset division rule refers to dividing the first grammatical exception class and the second grammatical exception class with the same error category and the same error position into overlapping grammatical error groups, wherein the error category refers to the grammatical error type, such as spelling errors and missing keywords; the overlapping grammatical error group is an exception class combination consisting of the first grammatical exception class and the second grammatical exception class with the same error category and the same error position; the target grammatical exception coefficient is used to quantify the degree of grammatical abnormality of the query script; the grammatical abnormality result is composed of the first grammatical exception class, the second grammatical exception class and the target grammatical exception coefficient.
[0043] In this embodiment, the first semantic anomaly class refers to the semantic error existing in the first semantic verification result; the second semantic anomaly class refers to the first error part of the semantic class existing in the current preliminary anomaly verification result; the target semantic anomaly coefficient is used to quantify the degree of semantic anomaly of the query script; the semantic anomaly result is composed of the first semantic anomaly class, the second semantic anomaly class and the target semantic anomaly coefficient.
[0044] In this embodiment, the weights assigned to SQL parsing verification and model verification are obtained by solving a matrix constructed by pairwise comparison and relative importance scoring using the hierarchical analysis method; the weights assigned to the amount of overlapping content and the absolute difference in content are obtained by solving a matrix constructed by pairwise comparison and relative importance scoring using the hierarchical analysis method; the amount of overlapping content refers to the amount of erroneous content (such as error description, error position) that exists in common between the first grammatical anomaly class and the second grammatical anomaly class in the overlapping grammatical error group, or the amount of erroneous content (such as incorrect reference to a table or field) that exists in common between the first semantic anomaly class and the second semantic anomaly class in the overlapping semantic error group; the absolute difference in content refers to the difference in description (such as the description method of the error, the error range) between the first grammatical anomaly class and the second grammatical anomaly class in the overlapping grammatical error group, or the difference in description (such as the explanation of the cause of the error) between the first semantic anomaly class and the second semantic anomaly class in the overlapping semantic error group.
[0045] The beneficial effect of the above technical solution is: by performing accuracy analysis on the current first query script, accurate analysis results are obtained, which can help improve the accuracy of the query script, reduce error rates and costs, and improve query efficiency and accuracy.
[0046] The embodiment of the present invention provides an intelligent analysis method for corporate carbon emissions based on a large language model, which implements vector retrieval, carbon emissions analysis and report evaluation operations based on the large language model for the currently acquired corporate carbon emissions report, including: Segmenting the enterprise carbon emission report into report text blocks, and then performing vector space representation on the report text blocks to obtain a report vector space; Constructing a first search query based on the GHG Protocol guidelines, using the report suggestion query in the first search query to retrieve the portion related to each GHG Protocol suggestion from the corporate carbon emission report, obtaining a first search content, and marking it as an analysis prompt; Generate a first emission result based on the retrieved first search content and basic background information using a pre-established analysis language model, and establish a carbon emission analysis report based on the first emission result; Using the vector suggestion query in the first search query, searching the report vector space for a portion related to each GHGProtocol suggestion to obtain a first vector content; Compare the corresponding first vector content of each GHG Protocol recommendation with the detailed disclosure guidelines in the GHG Protocol guidelines to obtain a first comparison result; Based on the set paragraph generation rules, combined with the conforming points and non-conforming points in the first comparison result, generate a report analysis paragraph; Based on the first comparison result, analyzing the conformity of the report to obtain a report conformity score; The report analysis paragraphs are combined with the report compliance scores to generate a key assessment report of the current corporate carbon emissions report.
[0047] In this embodiment, the enterprise carbon emission report is a document that records and describes in detail the greenhouse gas emissions generated by the enterprise during its production and operation processes, usually including the calculation of emissions, analysis of emission sources, implementation of emission reduction measures, etc.; the report vector space is a high-dimensional space constructed by dividing the enterprise carbon emission report into text blocks and converting the text blocks into vector form through vectorization technology (for example, bge-m3 embedding). Each vector in the report vector space represents a text block in the report.
[0048] In this embodiment, the enterprise carbon emission report is segmented into report text blocks, and then the report text blocks are represented in vector space, which involves diversified document parsing (such as Figure 7 As shown) and vectorized storage, the specific steps are as follows: (1) Build a document tree, divide it into hierarchical blocks according to the document structure, and divide it into multiple levels according to sentences, paragraphs, and articles. At the same time, extract the key information of articles and paragraphs, and search them in order according to the levels when searching. This algorithm uses explicit stack iteration instead of recursion to search for the title of the node layer by layer, solve the stack overflow problem that may be caused by deep recursion, and perform path compression optimization. By updating the parent node information on the entire path in one calculation, the path length is shortened and the repeated calculation of the title path is reduced, as shown in Algorithm 1: Algorithm 1: Document Tree (ToLC) 1. Initialize the paragraph set S←{}.
[0049] 2. Let: if the node is ni and it is a title, ni=f_title.
[0050]
[0051] 3. Path compression optimization For node ni, its root node path is defined as:
[0052] Update path:
[0053] The header path after path compression optimization is:
[0054] 4. Iteration Let: P(i): the title hierarchy of node ni (the list of title paths from the root node to node ni). parent(i): the parent node of node i. text(i): the title text of node i.
[0055]
[0056]
[0057] Initialize a stack S and push the target node i onto the stack. Take a node j from the stack each time, and if j has a parent node, push its parent node onto the stack. Update P(j) to add j's title to the title level of its parent node.
[0058] 5. Merger
[0059] like True, for each node ni, collect its body content (if ni is a body node). This part of the content is collected as the body part of the current paragraph by traversing all body nodes nj under ni and performing a union operation on their contents C(nj).
[0060]
[0061] 6. The paragraph set S contains the paths and text content of all nodes in the document in the form of:
[0062] 7. Convert the content C(ni) of each node into a vector V(ni):
[0063] (2) Processing long text blocks using sliding block segmentation and recursive block segmentation: Recursive chunking uses a set of delimiters to divide the input text into smaller chunks in a hierarchical and iterative manner. If the initial chunking of the text does not produce chunks of the desired size or structure, the method recursively chunks the resulting chunks using different delimiters or criteria until the desired chunk size or structure is achieved.
[0064] Sliding window chunking is to make each chunk contain a certain amount of repeated document content. When document structure segmentation is not possible, use sliding window segmentation to ensure that each segment is semantically complete.
[0065] Combined with the large language model (LLM) summary generation method, the sliding block generates partially overlapping small blocks of text to preserve context continuity, and then recursive block is used to further refine the text content to ensure the integrity of hierarchical expression and information extraction. On this basis, LLM is used to generate high-quality summaries for each block, and the core keywords in the long text are extracted, and the summary is converted into a vector representation for semantic retrieval. This method solves the problem of information omission in long texts through a multi-layer block mechanism.
[0066] (3) In document recognition and extraction, the following optimization methods are proposed for the processing of structured data (such as tables, pictures, and formulas) to meet practical challenges and improve the accuracy of data extraction: For images, we use multimodal annotation methods to extract key content, and the extracted text generates semantic vectors through the embedding model and is stored in the vector database. Formulas are parsed into LaTeX expressions through the Mathpix tool, and then the semantic information of the formulas is extracted through the large language model and converted into vector storage for subsequent semantic retrieval and analysis; For table data processing, the main difficulties include table cross-page disconnection, no table header, and merged cells. For the problem of table cross-page, the continuity of the table is determined by detecting the table boundary and its context (such as footer and header text), and the layout analysis of the document (such as PDF layout or docx XML attributes) is used to track the table number and title to achieve cross-page connection; For the processing of tables without headers, the header position is predicted through the content-based classification model, and the header fields are automatically completed in combination with context information. The extraction of merged cells depends on the XML attribute parsing of docx, such as reading the gridSpan or vMerge information of the cell, and reclassifying the data after extraction.
[0067] To ensure the accuracy of table extraction, the system combines XML attributes and text extraction information for verification and fusion. The XML structure of the docx file is parsed to obtain the precise row and column data of the table, and then compared and completed with the table fields extracted from the txt file. In case of data conflict, content similarity matching and field verification logic are used to select high-confidence results.
[0068] (4) The processed table content is finally stored in the MySQL database, while the semantic information of images and formulas is stored in the vector database to support efficient semantic retrieval.
[0069] In this embodiment, the GHG Protocol Guidelines are an internationally recognized greenhouse gas accounting and reporting standard that provides guidance to companies and organizations on how to quantify, report and verify their greenhouse gas emissions, including accounting methods for multiple emission sources and emission categories, as well as reporting formats and verification requirements; the first search query is used to retrieve the parts related to the GHG Protocol recommendations from the corporate carbon emission report; the first search content refers to using the first search query constructed based on the GHG Protocol Guidelines to retrieve the text parts directly related to each GHG Protocol recommendation from the corporate carbon emission report in the large language model; the GHG Protocol recommendations refer to the recommendations put forward in the GHG Protocol Guidelines on how to better account for, report and verify greenhouse gas emissions; the analytical language model is used to automatically generate a carbon emission analysis report based on the retrieved first search content and basic background information; the analytical language model is obtained by training a neural network by preprocessing a large amount of text data related to carbon emissions (such as corporate carbon emission reports, GHG Protocol Guidelines, relevant policy documents, academic papers, etc.), performing text vectorization and feature (such as keywords, phrases, sentence structures) extraction as training samples, and generating preliminary carbon emission results.
[0070] In this embodiment, the report suggestion query refers to a part constructed in the first search query, pointing to the various suggestions or requirements in the GHG Protocol, and is used to find relevant content in the report; basic background information refers to basic information related to the corporate carbon emissions report, such as company name, industry type, and reporting year; the first emission result refers to the result calculated by analyzing the retrieved first search content and basic background information using a pre-established analysis language model, such as preliminary carbon emissions and emission trends; the carbon emissions analysis report refers to a report generated based on the first emission result; the vector suggestion query is used to search in the vector space; and the detailed disclosure guidelines refer to the guidelines provided in the GHG Protocol guidelines on how to disclose carbon emissions information in detail.
[0071] In this embodiment, the first vector content is represented by a text block in the corporate carbon emissions report that is directly related to the GHG Protocol recommendations; the first comparison result refers to the result obtained by comparing the corresponding first vector content of each GHG Protocol recommendation with the detailed disclosure guidelines in the GHG Protocol guidelines; setting paragraph generation rules is a series of rules formulated based on the compliance points and non-compliance points in the first comparison result, combined with the content and structure of the report, for generating report analysis paragraphs, wherein compliance points refer to the parts of the report that comply with the GHG Protocol recommendations, and non-compliance points refer to the parts of the report that do not comply with the GHG Protocol recommendations.
[0072] In this embodiment, the report compliance score is a score obtained after quantitatively analyzing the compliance of the report according to a preset scoring system designed according to the evaluation criteria of the GHG Protocol guidelines based on the first comparison result, and is used to reflect the degree of compliance of the report with the GHG Protocol guidelines, wherein the preset scoring system is composed of scoring dimensions (such as completeness, accuracy, transparency, consistency), scoring criteria (for example, the corresponding scoring criteria for the scoring dimension of completeness is that the report covers all key information: full marks, and the report does not cover any key information: zero marks) and scoring methods (for example, weighted average method: after scoring each scoring dimension, different weights are assigned according to the importance of each dimension, and then the weighted average score is calculated); the key assessment report refers to a comprehensive evaluation report on the current corporate carbon emissions report, which is composed of a report analysis paragraph and a report compliance score.
[0073] In this embodiment, for example, Example 1 Enterprise Carbon Emission Analysis and Report Assessment: Policy perspective: Q1: How does a company’s board of directors oversee carbon emissions risks and opportunities relative to existing policies? Analysis1: The disclosure meets the key requirements of how the board monitors carbon emission risks and opportunities. First, the report clearly states that the board is responsible for supervising the company's main strategies, such as the implementation of the company's environmental protection policy, and also monitors the company's annual target achievement. Second, the disclosure mentions that the board and board committees regularly obtain information on carbon emissions and existing policies, and review and guide relevant strategies, action plans and budgets. However, the disclosure does not detail the specific review process and results. Score1: 95 Q2: What role does management play in assessing and managing carbon emissions risks and opportunities related to existing policies? Analysis2: The disclosure provides key information in describing the management's role in the management of carbon emissions and existing policies. The organization has assigned responsibilities for carbon emissions and existing policies to management positions and described how these management positions monitor issues related to carbon emissions and existing policies. However, the sources of carbon emissions and the responsibilities of management are not detailed, which may affect the quality of the disclosure. Score2: 85 Company Strategy: Q3: What are the main carbon emissions risks and opportunities that the company has identified in the short, medium and long term in relation to existing policies? Are these risks clearly associated with a certain time frame? Analysis3: The disclosure provides an overview of Huagang Group's carbon emission risks, but does not provide a detailed description of the carbon emission risks and opportunities faced by the company in the short, medium and long term. Nor does it provide specific information on whether these risks are related to a specific time frame. Score3: 65 Q4: How do carbon emission risks and opportunities under existing policies affect companies’ business strategies, economic and financial performance, and financial planning? Analysis4: The disclosure mentioned that Huagang Group has implemented a number of carbon emission reduction measures, but lacked a detailed discussion of how these measures affect their business, strategy and financial planning. The disclosure also mentioned that Huagang Group will gradually promote carbon capture, utilization and storage technology (CCUS) and plans to reduce carbon emissions by 15% by 2025 compared to 2020, but did not specify how to incorporate these carbon emission targets into the financial planning process. In addition, the disclosure mentioned that Huagang Group strictly abides by national environmental protection laws and regulations and regularly publishes social responsibility reports, but did not clearly explain how carbon emissions issues are used as inputs to the financial planning process and how to prioritize these risks and opportunities. " Score4: 75 Q5: How resilient are companies’ strategies when considering different carbon reduction scenarios? How resilient are companies’ strategies when dealing with the physical risks of climate change? Analysis5: This disclosure meets most of the requirements. First, Huagang Group considered different carbon emission reduction scenarios and described the resilience of its strategy in addressing carbon emission risks and opportunities. Second, they discussed the potential impact of carbon emission issues on financial performance and financial condition and considered scenarios of increased physical climate-related risks. However, the disclosure did not specifically discuss how they believed their strategy might be affected by carbon emission risks and opportunities, and how their strategy might change in response to these potential risks and opportunities. Score5: 85 Risk Management: Q6: What processes does the company use to identify and assess carbon emission risks related to existing policies? Analysis6: According to the sustainability report provided, Huagang Group has identified and assessed the carbon emission risks associated with existing policies. The report describes in detail the sources of carbon emissions, including direct emissions and indirect emissions, as well as other indirect emissions. In addition, Huagang Group has implemented a number of carbon emission reduction measures and complies with national environmental protection laws and regulations. The report mentions the challenges and opportunities faced by the company and emphasizes the importance of continuing to increase technological innovation efforts. Score6: 90 Q7: How do companies manage carbon emission risks related to existing policies? Analysis7: The disclosure describes Huagang Group's carbon emission risk management process, including the implementation of carbon emission reduction measures and future planning, as well as compliance. However, the disclosure lacks a specific description of how to judge the importance of carbon emission risks and the specific process of how to prioritize carbon emission risks within the organization. Score7: 85 Q8: How does an enterprise integrate its process of identifying, assessing and managing carbon emission risks into its overall risk management system? Analysis8: This disclosure section meets the requirements of integrating carbon emission risks into the overall risk management system. The report mentions that Huagang Group has implemented a number of carbon emission reduction measures and clearly defines the sources of carbon emissions and specific emission reduction targets. At the same time, this section also emphasizes that the company strictly abides by environmental protection laws and regulations, has passed the environmental management system certification, and regularly publishes social responsibility reports. However, the disclosure section does not provide detailed information on the specific processes of how to identify, evaluate and manage carbon emission risks, and how these processes are integrated into overall risk management. Score8: 75 Future Development: Q9: What indicators do companies use to assess carbon emissions risks and opportunities in relation to existing policies? How do these indicators ensure that their performance is consistent with the company's strategy and risk management process? Analysis9: The disclosure provides an overview of the main sources and current total amount of Huagang Group's carbon emissions, but more specific indicators on how to assess carbon emission risks and opportunities are needed. In addition, although the disclosure mentions that the company has implemented a number of carbon emission reduction measures, it does not clearly explain how these measures contribute to reducing carbon emissions. Score9: 75 Q10: Does the company disclose its Scope 1, Scope 2 and (if applicable) Scope 3 greenhouse gas (GHG) emissions data? What are the risks associated with these emissions? Do they vary by scope? Analysis10: This disclosure meets some of the TCFD guidelines. The disclosure provides the main sources of carbon emissions and the total annual carbon emissions of Huagang Group, and explains the carbon emissions of specific production links, but does not provide specific carbon emission data classified by scope 1 and scope 2. For example, it does not provide detailed information on the specific carbon emissions of each production link, and does not provide specific numbers or percentages for the generally accepted industry-specific GHG efficiency ratios that should be provided. The specific method for estimating these emissions is also not explained. Overall, the quality and completeness of the disclosure needs to be improved. " Score10: 75 Q11: What targets are companies using to understand, quantify and benchmark carbon emissions risks and opportunities relative to existing policies? How are companies performing against these targets? Analysis11: This disclosure meets some of the requirements of TCFD guidelines. It has described that Huagang Group has implemented a number of carbon reduction measures, including replacing coal with clean energy, updating production equipment, optimizing production processes, etc. In the compliance section, the company also made it clear that it strictly abides by relevant laws and regulations and has passed the environmental management system certification. In addition, the disclosure mentioned the main challenges and opportunities facing Huagang Group, including the high cost of carbon reduction and the accelerated pace of technological updates. However, some details need to be supplemented, such as how to set specific goals, the time frame for the application of goals, and how to measure progress. " Score11: 75 Average score: 80.0 .
[0074] The beneficial effect of the above technical solution is: by realizing vector retrieval, carbon emission analysis and report assessment operations on the currently acquired corporate carbon emission reports based on a large language model, an objective evaluation of the corporate carbon emission situation is provided, thereby enhancing the transparency and credibility of the company.
[0075] The embodiment of the present invention provides a method for intelligent analysis of enterprise carbon emissions based on a large language model, further comprising: Obtain custom questions from target users and perform data preprocessing to obtain custom data; Building a custom search query based on the custom question, and using the custom search query to filter and obtain a target text block from the report vector space; Extracting custom related content directly related to the custom question from the acquired target text block, combining it with the custom data input into the analysis language model, and obtaining a custom answer; The customized answers are combined with customized related content and customized questions to generate a customized analysis report, which is then transmitted to the target user.
[0076] In this embodiment, custom questions refer to specific questions about corporate carbon emission reports that target users ask the system based on their own needs or interests; data preprocessing refers to removing irrelevant characters, word segmentation, and stop words; custom data refers to custom questions after data preprocessing; custom retrieval query refers to a query statement constructed based on the content of the custom question for filtering the target text block from the report vector space; the target text block refers to the text block related to the custom question obtained by filtering from the report vector space using the custom retrieval query; custom associated content refers to the contextual information directly related to the customized question extracted from the retrieved target text block, which can fully answer the user's question and provide the necessary background and support; custom answer refers to the answer to the user's question generated by the analysis language model based on the custom data and custom associated content; custom analysis report refers to a detailed analysis report generated by combining custom answers, custom associated content and custom questions; target user refers to the user who currently asks the custom question.
[0077] In this embodiment, for example, Example 2 user customization question: 'GHG Protocol_summary_source': """Your task is to analyze and summarize the company's sustainability report related to the following<CRITICAL_ELEMENT> Any disclosure related to:<CRITICAL_ELEMENT> : {question}Below is basic information about the company being evaluated:{basic_info}In addition to the above information, the following extracts from the Sustainability Report have been provided to you for review:{summaries}Your task is to summarize the company's<CRITICAL_ELEMENT> Please follow these guidelines in your summary: 1. If your report discloses<CRITICAL_ELEMENT> , please try to summarize by direct excerpt and cite the source in the provided excerpt to confirm its credibility. 2. If the report does not mention<CRITICAL_ELEMENT> , please state this clearly and avoid trying to speculate or make up information. 3. Keep your SUMMARY to {answer_length} words or less. 4. Be skeptical of information disclosed in the report as there may be greenwashing (exaggerating the company's environmental responsibility). Always answer with a critical tone. 5. "Empty talk" refers to statements that are cheap and may not reflect the company's true intentions or future actions. Be critical of all empty talk found in the report. 6. Always acknowledge that the information provided is based on the company's reported opinions. 7. Carefully review whether the report is based on quantifiable, specific data or vague, unverifiable statements, and communicate your findings. {guidelines} Your summary should be presented in JSON format with the following two keys: 1. SUMMARY: This should contain the summary without source citations. 2. SOURCES: This should be a list of source numbers cited in the summary. Your FINAL_ANSWER should be in JSON format (make sure there are no formatting errors): The beneficial effect of the above technical solution is: by generating accurate and personalized analysis reports based on customized questions raised by users, it can meet the diverse needs of users, thereby improving and enhancing the transparency and credibility of the enterprise.
[0078] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for intelligent analysis of enterprise carbon emissions based on a large language model, characterized in that: include: Step 1: Analyze and process the currently acquired target query data to obtain a first classification result; Step 2: using an intelligent answering mechanism based on a large language model adapted to the first classification result, to perform data retrieval and intelligent answering based on the first query data; Step 3: Implement vector retrieval, carbon emission analysis and report assessment operations for the currently acquired corporate carbon emission reports based on the large language model.
2. According to claim 1, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: Analyze and process the currently acquired target query data to obtain a first classification result, including: Perform data category judgment on the target query data to obtain the data category; Using the first category to take appropriate specific processing measures, preprocess the target query data to obtain first query data; The first query data is input into a pre-established data classification model to obtain a first classification result.
3. According to claim 1, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: The first classification result includes two classification results: the query data is in a structured database and needs to call a relational database to obtain the result; and the query data does not need to call a relational database to obtain the result.
4. According to claim 1, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: Using an intelligent answer mechanism based on a large language model adapted to the first classification result, data retrieval and intelligent answering are performed based on the first query data, including: When the first classification result is that the first query data is in a structured database and a relational database needs to be called to obtain the result, an intelligent question-answering mechanism based on Text2SQL is selected; According to the intelligent question-answering mechanism based on Text2SQL, the intent recognition model is used to perform intent recognition on the first query data to obtain a first intent recognition result; Taking the first intent recognition result as a matching condition, a key SQL template is obtained by screening from a preset Text2SQL template library; Extracting first key metadata from the first intent recognition result and the first query data, and filling the first key metadata into the key SQL template to obtain a first query script; Verifying the first query script, optimizing and repairing the first query script when an anomaly exists, and re-verifying the first query script until the verification is successful; Submitting the first query script after successful verification to the target database, and the target database returns the first query result according to the obtained first query script; After judging and processing the first query result, it is converted into a natural language answer using LLM and then transmitted to the target user; When the first classification result is that the query data does not need to call a relational database to obtain the result, an intelligent question-answering mechanism based on intelligent retrieval and a large language model is selected; According to the intelligent question-answering mechanism based on intelligent retrieval and large language model, the intent recognition model is used to perform intent recognition on the first query data to obtain a second intent recognition result; Determining a first retrieval mode according to the second intention recognition result; Extracting second key metadata from the second intent recognition result and the first query data, using the second key metadata as a matching condition, and screening out a key prompt template from a preset prompt template library; Fill the second key metadata into the key prompt template to obtain a second query script; After verifying and optimizing the second query script using a preset script verification mechanism, intelligent retrieval is performed based on the second query script using a first retrieval mode to obtain a first retrieval result; After sorting the first search results using the preset structured thinking based on BM25+embedding hybrid search, the first search results are rearranged using the set rearrangement model to obtain the second search results; The second search result is converted into a natural language answer using LLM and then transmitted to the target user.
5. According to claim 4, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: Verifying the accuracy of the first query script and optimizing and repairing the first query script when an anomaly exists, including: Inputting the first query script into a pre-established script verification model for verification to obtain a first verification result; According to the first verification result, if there is no error in the current first query result, it is determined that the current first query script is successfully verified; If there is an error in the current first query result, the correct part in the first verification result is marked as the first correct part, and the error part is marked as the first misplaced part, and then output as a preliminary abnormal verification result; Using the SQL parser provided by the relational database to perform syntax verification on the first query script to obtain a first syntax verification result; Verifying the first query script using set semantic verification rules to obtain a first semantic verification result; The first syntax verification result, the first semantic verification result and the preliminary abnormality verification result are combined for analysis, and the accuracy analysis of the current first query script is performed to obtain an accurate analysis result; If the current first query script verification fails, the exception handling priority of the first query script is determined according to the exception coefficient in the accurate analysis result, and the exception class in the accurate analysis result is used as the matching condition to match the corresponding processing strategy for optimization and repair.
6. According to claim 5, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: The first syntax verification result, the first semantic verification result and the preliminary abnormality verification result are combined and analyzed to perform accuracy analysis on the current first query script to obtain an accurate analysis result, including: If there is no first error part of the syntax type in the current preliminary abnormality verification result, and there is no syntax error in the first syntax verification result, it is determined that the syntax of the current first query script is normal; If there is a first error part of the syntax type in the current preliminary abnormality verification result, or there is a syntax error in the first syntax verification result, then it is determined that the syntax of the current first query script is abnormal; Marking the grammatical errors in the first grammar verification result as a first grammar exception class; Marking the first error part of the grammatical class existing in the preliminary abnormality verification result as a second grammatical abnormality class; Divide the first grammatical anomaly class and the second grammatical anomaly class according to a preset division rule to obtain a coincident grammatical error group; Performing grammatical anomaly analysis based on the acquired first grammatical anomaly class, second grammatical anomaly class, and overlapping grammatical error group, obtaining a target grammatical anomaly coefficient; The calculation formula of the target syntax anomaly coefficient is as follows: ; In the formula, Expressed as the target syntax anomaly coefficient; r Represented as the total number of the first grammatical exception class; r It is represented as the total number of the second grammar exception class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target syntax anomaly coefficient; It represents the influence weight of the target syntax anomaly coefficient calculated for model validation; It is represented by the amount of overlap between the first grammatical anomaly class and the second grammatical anomaly class in the oth overlapping grammatical error group, where o=1, 2, 3, , ; It is expressed as the total number of overlapping grammatical error groups; It is expressed as the absolute difference between the content of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group; It is represented as the influence weight of the amount of overlapping contents of the first grammatical anomaly class and the second grammatical anomaly class corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; It is represented as the influence weight of the absolute difference between the first grammatical anomaly category and the second grammatical anomaly category corresponding to the o-th overlapping grammatical error group on the analysis of grammatical anomaly; The first grammatical anomaly class, the second grammatical anomaly class and the target grammatical anomaly coefficient are combined to obtain a grammatical anomaly result; If the first error part of the semantic class does not exist in the current preliminary abnormality verification result, and there is no semantic error in the first semantic verification result, it is determined that the semantics of the current first query script is normal; If there is a first error part of the semantic class in the current preliminary abnormality verification result, or there is a semantic error in the first semantic verification result, then it is determined that the current first query script is semantically abnormal; Marking the semantic errors in the first semantic verification result as a first semantic anomaly class; Marking the first error part of the semantic class existing in the current preliminary anomaly verification result as a second semantic anomaly class; Dividing the first semantic anomaly class and the second semantic anomaly class according to a preset division rule to obtain a coincident semantic error group; Based on the obtained first semantic anomaly class, second semantic anomaly class and overlapping semantic error group, semantic anomaly analysis is performed to obtain a target semantic anomaly coefficient; The calculation formula of the target semantic anomaly coefficient is as follows: ; In the formula, It is expressed as the target semantic anomaly coefficient; Represented as the total number of the first semantic anomaly class; m It is represented as the total number of the second semantic anomaly class; It is expressed as the influence weight of SQL parsing verification on the calculation of the target semantic anomaly coefficient; It represents the influence weight of the target semantic anomaly coefficient calculated for model validation; It is represented as the amount of overlap between the first semantic anomaly class and the second semantic anomaly class in the jth overlapping semantic error group, where j=1, 2, 3, , ; It is expressed as the total number of overlapping semantic error groups; It is expressed as the absolute difference between the content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group; It is expressed as the influence weight of the amount of overlapping content of the first semantic anomaly class and the second semantic anomaly class corresponding to the jth overlapping semantic error group on the analysis of semantic anomaly; It is expressed as the influence weight of the absolute difference between the first semantic anomaly category and the second semantic anomaly category of the j-th overlapping semantic error group on the analysis of semantic anomaly; The first semantic anomaly class, the second semantic anomaly class, and the target semantic anomaly coefficient are combined to obtain a semantic anomaly result; If the syntax and semantics of the current first query script are normal, the current first query script is determined to be successfully verified and output as an accurate analysis result; If the current first query script only has a grammatical anomaly or only has a semantic anomaly, it is determined that the current first query script has an anomaly, and the corresponding grammatical anomaly result or semantic anomaly result is output as an accurate analysis result; If the current first query script has grammatical anomalies and semantic anomalies, it is determined that the current first query script has anomalies, and the target grammatical anomaly coefficient and the target semantic anomaly coefficient are averaged to obtain a comprehensive anomaly coefficient; The comprehensive anomaly coefficient, grammatical anomaly result and semantic anomaly result are output as accurate analysis results.
7. According to claim 1, a method for intelligent analysis of enterprise carbon emissions based on a large language model is characterized in that: Based on the large language model, vector retrieval, carbon emission analysis and report assessment operations are implemented for the currently acquired corporate carbon emission reports, including: Segmenting the enterprise carbon emission report into report text blocks, and then performing vector space representation on the report text blocks to obtain a report vector space; Constructing a first search query based on the GHG Protocol guidelines, using the report suggestion query in the first search query to retrieve the portion related to each GHG Protocol suggestion from the corporate carbon emission report, obtaining a first search content, and marking it as an analysis prompt; Generate a first emission result based on the retrieved first search content and basic background information using a pre-established analysis language model, and establish a carbon emission analysis report based on the first emission result; Using the vector suggestion query in the first search query, searching the report vector space for a portion related to each GHGProtocol suggestion to obtain a first vector content; Compare the corresponding first vector content of each GHG Protocol recommendation with the detailed disclosure guidelines in the GHG Protocol guidelines to obtain a first comparison result; Based on the set paragraph generation rules, combined with the conforming points and non-conforming points in the first comparison result, generate a report analysis paragraph; Based on the first comparison result, analyzing the conformity of the report to obtain a report conformity score; The report analysis paragraphs are combined with the report compliance scores to generate a key assessment report of the current corporate carbon emissions report.
8. The method for intelligent analysis of enterprise carbon emissions based on a large language model according to claim 7 is characterized in that: Also includes: Obtain custom questions from target users and perform data preprocessing to obtain custom data; Building a custom search query based on the custom question, and using the custom search query to filter and obtain a target text block from the report vector space; Extracting custom related content directly related to the custom question from the acquired target text block, combining it with the custom data input into the analysis language model, and obtaining a custom answer; The customized answers are combined with customized related content and customized questions to generate a customized analysis report, which is then transmitted to the target user.