Carbon emission factor matching method based on multi-granularity semantic embedding and multidirectional semantic interaction

By employing multi-granular semantic embedding and multi-directional semantic interaction methods, the accuracy and efficiency of carbon emission factor matching are improved, solving the problems of insufficient semantic representation and inadequate inter-sentence interaction in existing technologies, and achieving high-precision automatic matching of carbon emission factors.

CN121524952APending Publication Date: 2026-02-13CENT SOUTH UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511749442.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing carbon emission factor matching methods have shortcomings in semantic representation level, inter-sentence interaction mechanism and out-of-vocabulary word processing, resulting in high dependence on manual intervention, low matching accuracy and difficulty in meeting the real-time requirements of engineering applications.

Method used

We employ multi-granular semantic embedding and multi-directional semantic interaction methods. By fusing character-level and word-level semantic representations and combining character-level BiLSTM and attention mechanisms, we achieve semantic alignment between sentences and utilize a domain-fine-tuned pre-trained model for text matching.

Benefits of technology

It improves the accuracy and efficiency of carbon emission factor matching, reduces human intervention, can handle multi-source heterogeneous data and new domain terms, and supports real-time response for large-scale projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121524952A_ABST
    Figure CN121524952A_ABST
Patent Text Reader

Abstract

The invention relates to a carbon emission factor intelligent matching method and system based on multi-granularity semantic embedding and multidirectional semantic interaction, and belongs to the technical field of carbon emission accounting and intelligent semantic matching. Comprising the following steps: preprocessing collected activity data and carbon emission factor data to generate a standard word sequence and a character sequence; constructing word-level and word-level combined multi-granularity semantic embedding by fusing a character level and a domain fine-tuning model; extracting a context feature sequence by using BiLSTM; multidirectional semantic interaction and alignment are realized through a cosine similarity matrix, attention weighting and the like; a feedforward network is adopted for comparison and feature fusion, and time step information is aggregated; and finally, outputting a matching score through a full connection layer and a Softmax function. According to the method, the problems of single semantic representation granularity, lack of an inter-sentence interaction mechanism and low matching precision caused by unregistered words in the prior art are effectively solved, and the accuracy, robustness and efficiency of carbon emission factor matching are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a matching method, in particular to a carbon emission factor intelligent matching method based on multi-granularity semantic embedding and multi-directional semantic interaction, belonging to the technical field of carbon emission accounting and intelligent semantic matching, and suitable for building full life cycle carbon emission accounting. BACKGROUND

[0002] At present, the accounting method based on the product of activity data and carbon emission factor is widely used at home and abroad, and the data sources include national standards (such as GB / T51366-2019 "Building Carbon Emission Calculation Standard"), industry guidelines and enterprise internal data systems. However, the existing carbon emission factor matching technology mainly relies on manual retrieval or fuzzy matching based on keywords, and the automation and intelligence level is low. Under the background of carbon emission accounting informatization and digitalization, the traditional matching method is difficult to meet the following new trend demands:

[0003] a. New materials, new technologies and new energy are emerging, resulting in the lack of carbon emission factors for some materials;

[0004] b. Carbon emission accounting scenarios require higher requirements for data automatic matching, semantic understanding and intelligent recommendation;

[0005] c. Building engineering data presents diversified and unstructured characteristics, containing a large number of non-standard terms and professional abbreviations.

[0006] In recent years, the rapid development of semantic understanding and natural language processing (NLP) technology provides a new solution for carbon emission factor intelligent matching. Text similarity calculation based on pre-trained language models (such as BERT, ERNIE and RoBERTa) has been widely used in question and answer matching, information retrieval and semantic reasoning tasks. Specifically, the existing technical scheme adopts a carbon emission factor dynamic matching method based on large language model, which realizes efficient and accurate matching through multi-step optimization: first, carbon emission factors and activity data are collected from multiple sources, and the data are cleaned and standardized; then, a large language model pre-trained and fine-tuned in the field is used for deep semantic analysis of the data to generate high-quality semantic vectors; the system unifies the data format and completes the physical quantity conversion through unit identification and conversion mechanism; in the matching process, the system calculates the cosine similarity of the semantic vectors for intelligent matching, and in the case of similar similarity, the weighted average mechanism is used to optimize the results, further improving the matching accuracy; at the same time, the system uses the factor library dynamic updating mechanism to analyze the relevance of newly submitted data, dynamically expands the factor library, and continuously optimizes the matching performance; the overall method improves the matching accuracy and efficiency, reduces the manual intervention and error, and reduces the carbon emission calculation cost.

[0007] However, there are still obvious deficiencies in directly applying these general models to carbon emission accounting scenarios. First, the existing technical solutions directly calculate the cosine similarity between the semantic vectors of project activity data and the semantic vectors of the factor library, quantifying the semantic similarity between texts. This solution simply encodes each sentence into a vector to model sentence pairs, and then directly calculates the similarity between the two vectors as the matching degree between texts. The single-grained vector cannot well represent a piece of text. Second, there is no explicit interaction between two sentences, which may lead to the loss of some important information, and there is a lack of effective inter-sentence interaction mechanism.

[0008] In addition, there is still an important problem in the text matching task, namely the Out of Vocabulary (OOV) problem. There are only 2500 commonly used Chinese characters in daily life, and the number of words composed of these characters is huge. Under the current technical conditions, we cannot get the word vector representation of each word. For the trained model, if the input new sentence contains untrained words, the model cannot get the word vector representation of the untrained words, which will affect the performance of the whole model. The specific performance is:

[0009] a. Lack of domain corpus training, making it difficult for the model to recognize engineering professional terms;

[0010] b. Single-grained semantic representation cannot fully capture the multi-layer semantic relationship between material names and process descriptions;

[0011] c. The model has a large number of parameters and complex calculations, making it difficult to meet the real-time requirements of engineering applications.

[0012] Therefore, constructing an intelligent matching method for the carbon emission field with multi-grained semantic expression and efficient interaction mechanism has become the focus and development direction of current research. The existing carbon emission factor matching method has the following obvious limitations:

[0013] a. High dependence on manual operation: Some building materials lack corresponding carbon emission factors, and usually need to use approximate substitute factors for calculation. These problems lead to high dependence on manual operation in the matching process of the existing method, which requires item-by-item analysis and manual selection of appropriate carbon emission factors;

[0014] b. Insufficient semantic expression ability: One-way vectorization method cannot accurately express multi-level semantic relationship;

[0015] c. Lack of inter-sentence interaction mechanism: There is a lack of bidirectional semantic alignment between activity data and carbon factor descriptions;

[0016] d. OOV problem is prominent: unable to handle field-specific vocabulary and new material and process names.

[0017] Under the dual driving of the current "double carbon" policy and digital management, building carbon emission accounting needs to be realized:

[0018] a. High-precision intelligent matching: automatically identify the semantic relationship between activity data and carbon factors, instead of manual judgment;

[0019] b. High-efficiency computing capability: support large-scale project batch calculation and real-time response;

[0020] c. High robustness model design: can process multi-source heterogeneous data and new words in the field, and maintain long-term applicability.

[0021] In summary, although the existing technology has made some progress in semantic matching, there are still systematic defects in semantic representation hierarchy, inter-sentence interaction mechanism, and out-of-vocabulary word processing, which need to be solved through technical innovation to provide more accurate, efficient and reliable intelligent matching solutions for carbon emission accounting. SUMMARY

[0022] In order to solve the defects in the prior art, the present application discloses a carbon emission factor intelligent matching method based on multi-granularity semantic embedding and multi-directional semantic interaction, and the technical scheme is as follows:

[0023] A carbon emission factor intelligent matching method based on multi-granularity semantic embedding and multi-directional semantic interaction, characterized by comprising the following steps:

[0024] Step A1: data input and input preprocessing: systemically preprocessing the obtained data, unifying data format and unit expression; accepting Chinese activity data text; using a word segmentation tool for word segmentation while preserving character-level representation; constructing a dictionary and a character index table to generate word sequences and character sequences;

[0025] Step A2: word vector and character vector embedding: character vector embedding is performed on the character sequence generated in step A1, the sentence is represented as a character vector matrix, and features are extracted, and an attention mechanism is added to weight the key characters; word vector embedding is performed on the word sequence generated in step A1, and a model fine-tuned based on the building field semantic similarity dataset is used to generate word vectors; the word vectors and character vectors are spliced to obtain a sentence vector representation that integrates word-level and character-level semantics;

[0026] Step A3: feature extraction: input the sentence vector representation obtained in step A2 into the encoder to capture the context dependency of the text, and output a context feature sequence;

[0027] Step A4: Interactive layer fusion interaction information: based on the context feature sequence obtained in step A3, the cosine similarity matrix between sentences is calculated; average pooling and maximum pooling operations are performed on the similarity matrix to obtain overall interaction information and capture the strongest matching signal; the attention weight matrix is calculated, and the attention weighted vector is generated based on the matrix to realize the semantic alignment between sentences;

[0028] Step A5: Comparison function G and time step aggregation: comparison is performed at each time step using the same feedforward network G containing a linear layer and a ReLU activation function, and a comparison vector is obtained; the average pooling vector obtained in step A4, the maximum pooling vector and the comparison vector obtained in this step are concatenated as the final matching result of each time step of the sentence;

[0029] Step A6: Discriminator and loss function: the matching result sequence obtained in step A5 is aggregated into a fixed length matching vector using a BiLSTM layer; after inputting the matching vector into several fully connected layers, the predicted score is output through the Softmax function; the Sigmoid cross entropy loss function is adopted, and the cross entropy between the predicted label and the real label is minimized through back propagation to update and optimize the parameters of the entire network.

[0030] Preferably, the step A1 specifically comprises: step A11: collecting activity data from the human-machine table provided by the engineering case, collecting carbon emission factor data from government-issued reports, industry standards, academic research and enterprise internal records, and systematically preprocessing the obtained data, the preprocessing process including data cleaning and normalization operation, to remove redundant information, correct abnormal or error data, and unify data format and unit expression;

[0031] Step A12: accepts a pair of Chinese activity data P and Q;

[0032] Step A13: use Jieba to perform word segmentation on P and Q respectively, while retaining character-level representation to alleviate the problem of semantic loss of short text; clean up stop words and special symbols, and unify the text format;

[0033] Step A14: construct a dictionary and a character index table to generate a word sequence and a character sequence.

[0034] Preferably, the step A2 specifically comprises: step A21: character vector embedding, representing each character in a sentence of length n as the index position of the character in the dictionary, and then representing the sentence as a character vector matrix of n*k, where k is the dimension of each character vector; input the matrix into the LSTM to extract features, and add an attention mechanism to weight the key characters to capture character-level features;

[0035] Step A22: word vector embedding, inputting the sentence P and the sentence Q using the T-BERT-ARCH model fine-tuned by the semantic similarity dataset in the architectural field to obtain the word vector matrix of the two sentences;

[0036] Step A23: concatenating the character vector obtained in step A21 with the word vector obtained in step A22 to obtain the final vector representation of the sentences P and Q.

[0037] Preferably, the step A4 specifically comprises:

[0038] Step A41: cosine similarity average and maximum pooling, calculating the cosine similarity for each pair of time steps to form a similarity matrix; performing average pooling and maximum pooling on the matrix, respectively;

[0039] Step A42: attention weight matrix calculation, calculating the attention weight matrix based on the context feature sequence and calculating the weighted sum of the attention weights to obtain the attention weighted vector;

[0040] Step A43: deep interaction, calculating the difference and element product between the context feature sequence and the attention weighted vector, and concatenating the original vector with the difference and element product features to obtain the vector after deep interaction.

[0041] Preferably, the step A5 specifically comprises:

[0042] Step A51: comparison function G(·), using the same feedforward network G containing a linear layer and a ReLU activation function to compare the deep interaction vector obtained in step A43 at each time step to obtain a comparison vector;

[0043] Step A52: time step aggregation, concatenating the average pooling vector, the maximum pooling vector obtained in step A41, and the comparison vector obtained in step A51 as the final matching result of each time step of the sentence.

[0044] Preferably, the step A6 specifically comprises:

[0045] Step A61: using a BiLSTM layer to aggregate the matching results of the two sequences into a fixed-length matching vector; inputting the matching vector into several fully connected layers and outputting the predicted score through the Softmax function;

[0046] Step A62: using a Sigmoid cross-entropy loss function to minimize the cross-entropy between the predicted label and the true label through backpropagation to update the network parameters.

[0047] The application also discloses a carbon emission factor intelligent matching system based on multi-granularity semantic embedding and multi-directional semantic interaction.

[0048] The data input and preprocessing module is used for executing step A1.

[0049] The word vector and character vector embedding module is used for executing step A2.

[0050] The feature extraction module is used for executing step A3.

[0051] The interaction layer fusion interaction information module is used for executing step A4.

[0052] The comparison and time step aggregation module is used for executing step A5.

[0053] The discrimination and output module is used for executing step A6.

[0054] Preferably, the data input and preprocessing module is further configured to execute steps A11, A12, A13 and A14.

[0055] Preferably, the word vector and character vector embedding module is further configured to execute steps A21, A22 and A23.

[0056] Preferably, the interaction layer fusion interaction information module is further configured to execute steps A41, A42 and A43.

[0057] The application also discloses a non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program controls a device in which the non-volatile storage medium is located to execute the method when running.

[0058] The application also discloses a terminal device, characterized in that the terminal device comprises a processor, a memory, a communication interface and a bus; the processor, the memory and the communication interface are connected through the bus and complete communication among each other; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method.

[0059] (1) Multi-granularity semantic fusion, improving the integrity and robustness of semantic expression:

[0060] Existing methods usually only rely on single-granularity text vector representation, and it is difficult to fully capture multi-level semantic information in sentences. The application proposes a multi-granularity semantic embedding mechanism of word level and word level fusion, which simultaneously captures fine-grained structural features by using character sequences and captures global semantic features by using domain fine-tuning word vectors.

[0061] (2) Multi-directional semantic interaction structure, realizing bidirectional information coupling and deep semantic alignment:

[0062] The traditional model lacks an explicit interaction mechanism when encoding between sentences, resulting in insufficient semantic information alignment. The present application proposes a multi-directional semantic interaction structure that fuses the average pooling, maximum pooling and attention mechanism three channels, realizing multi-layer semantic alignment from global trends to local strong matching.

[0063] (3) Systematic solution to the problem of out-of-vocabulary (OOV):

[0064] Traditional methods cannot generate stable vectors when facing new or rare words in the field, resulting in matching failure. The present application realizes semantic-level word complementation through character-level BiLSTM and attention weighting mechanism. BRIEF DESCRIPTION OF DRAWINGS

[0065] Figure 1 The figure is a schematic diagram of the transfer learning process of the present application;

[0066] Figure 2 The figure is a schematic diagram of the process of the present application. DETAILED DESCRIPTION

[0067] A carbon emission factor intelligent matching method based on multi-granularity semantic embedding and multi-directional semantic interaction, comprising the following steps:

[0068] Step A1: data input and input preprocessing: systematizing preprocessing of the obtained data, unifying data format and unit expression; accepting Chinese activity data text; using a word segmentation tool for word segmentation while retaining character-level representation; constructing a dictionary and a character index table to generate word sequences and character sequences:

[0069] Step A11: data preprocessing: collecting activity data from the human-machine table provided by the engineering case, collecting carbon emission factor data from government-issued reports, industry standards, academic research and enterprise internal records, etc., and systematizing preprocessing of the obtained data. The preprocessing process includes data cleaning and standardization operations to remove redundant information, correct abnormal or erroneous data, unify data format and unit expression, and ensure the accuracy, consistency and integrity of the data content, providing a reliable data basis for subsequent dynamic matching of carbon emission factors and model calculation.

[0070] Step A12: input: accepting a pair of Chinese activity data P and Q, wherein:

[0071] (1)

[0072] (2)

[0073] wherein: and are the m, n-th characters of sentences P, Q respectively, and m and n are the lengths of sentences P and Q respectively.

[0074] Step A13: Tokenization and character split: Tokenize P, Q using Jieba, while retaining the character-level representation to alleviate the problem of semantic loss of short text. Clean up stop words and special symbols, and unify the text format; ensure data consistency and integrity.

[0075] Step A14: Output: Build a dictionary and character index table, generate word sequences and character sequences, clean up stop words and special symbols, and unify the text format; ensure data consistency and integrity.

[0076] Step A2: Word vector and character vector embedding: Character vector embedding is performed on the character sequence generated in step A1, and the sentence is represented as a character vector matrix to extract features, and an attention mechanism is added to weight the key characters; word vector embedding is performed on the word sequence generated in step A1, and a model fine-tuned on the architectural field semantic similarity dataset is used to generate word vectors; the word vectors and character vectors are spliced to obtain a sentence vector representation that integrates word-level and word-level semantics:

[0077] Step A21: Character vector embedding. Each character in a sentence of length n is represented as the index position of the character in the dictionary, and then the sentence is represented as a matrix n*k, where k is the dimension of each character vector. We set the character vector dimension to 100. Then input the matrix into the LSTM to extract features, and add an attention mechanism to weight the key characters, capturing character-level features (for short text enhancement). It can analyze and capture the features of the text sequence at a finer granularity level, further solving the OOV problem.

[0078] Step A22: Word vector embedding. Model and training based on transfer learning. The BERT model first uses the transfer learning strategy to pre-train the model in the general field text to extract semantic features, then copies the learned semantic features to the architectural field, and fine-tunes the training in the architectural field semantic similarity dataset to obtain the T-BERT-ARCH model. The word vector dimension is set to 100. Input sentences P, Q, then get the word vector matrix of the two sentences and where d is the dimension of the word vector, and m and n are the lengths of sentences P and Q respectively.

[0079] Step A23: Output: Splice the word vector and character vector to get the vector representation of sentences P and Q

[0080] Step A3: Feature extraction: input the sentence vector representation obtained in step A2 into the encoder to capture the contextual dependency of the text, output the context feature sequence:

[0081] Step A31: input P, Q into the BiLSTM encoder respectively to obtain the context feature sequence:

[0082] (3) (4)

[0083] In the formula: is the i-th element vector of the BiLSTM encoded sentence P, is the j-th element vector of the BiLSTM encoded sentence Q. is the i-th word vector of the sentence P, is the j-th word vector of the sentence Q.

[0084] The main structure of BiLSTM is composed of two unidirectional LSTMs. LSTM is a special recurrent neural network used to solve long-term dependency problems. The unit of LSTM is called memory block, which is composed of three gates and a memory cell. The cell state in the memory block is used to control the transmission of information to the next time step. The three gates are forget gate, input gate and output gate. The input gate controls how much information in the current input is written to the cell state, the forget gate controls how much information is forgotten from the previous cell state, and the output gate controls how much information from the cell state is output to the final hidden state. The formula of LSTM in this step is as follows:

[0085] (5)

[0086] (6)

[0087] (7)

[0088] (8)

[0089] (9)

[0090] (10)

[0091] wherein, , and represent the input gate, the forget gate and the output gate, , and are the weight matrices of the input gate, the forget gate and the output gate, , and bias matrices for the input gate, the forget gate, and the output gate, is the current time, is the previous time, and denote the state of the previous hidden layer and the current hidden layer, respectively, is an activation function. The input gate takes the current input and the previous final hidden state as inputs. The value of the forget gate is 0, which means that the information obtained from will not be transferred into the calculation of . The value of the forget gate is 1, which means that all the information from will be transferred into the calculation of . The output gate controls how much information is output from the cell state to the final hidden state, which is called the candidate value, is used to calculate the current cell state. Equation (8) is the update method of the current cell state, and x(t) and h(t) are the current input sequence and the output sequence, respectively. and the calculation formula of tanh is as follows: (11)

[0092] (12)

[0093] Step A32: Output: Contextual sequence: (13)

[0094] (14)

[0095] wherein: and are the contextual feature sequences of the sentences P and Q, respectively.

[0096] Step A4: Interaction layer fuses interaction information: based on the contextual feature sequences obtained in step A3, a cosine similarity matrix between sentences is calculated; average pooling and maximum pooling operations are performed on the similarity matrix to obtain overall interaction information and capture the strongest matching signal; an attention weight matrix is calculated, and an attention weighted vector is generated based on the matrix to realize semantic alignment between sentences:

[0097] Step A41: Cosine similarity average and maximum pooling

[0098] Step A411: Calculate the cosine similarity for each pair of time steps (i, j):

[0099] (15)

[0100] wherein: cosine similarity between position i of sentence P and position j of sentence Q.

[0101] Step A412: Average pooling (taking average over rows / columns) to get overall interaction information, average similarity of each position i of sentence P to Q, similarly average pool over Q:

[0102] (16) (17)

[0103] where: is the average similarity of each position i of sentence P to Q. is the average similarity of each position j of sentence Q to Q.

[0104] Step A413: Max pooling (taking most similar match) can capture the strongest matching signal:

[0105] (18) (19)

[0106] where: is the maximum similarity of each position i of sentence P to Q, is the maximum similarity of each position j of sentence Q to Q.

[0107] Step A42: Attention weight matrix (alignment)

[0108] The attention weight matrix is denoted as Based on the attention weight matrix S, the related semantics between the two sentences are calculated. The purpose is to accurately match the related semantic information in sentence P and sentence Q. The formula is as follows:

[0109] (20) (21)

[0110] where is the weighted alignment vector of attention weight, which represents the relevance between the words in sentence P and each word in sentence Q. The same is true for Q in formula 21.

[0111] Step A43: Deep interaction

[0112] In order to obtain more information, we perform deep interaction between the context representation and the attention vector. By calculating the difference and element product between the context representation vector and the attention vector, it is evaluated whether the connection between the two sentences is close enough, and then the original vector is spliced with the embedding according to the following formula. Such operation can help sharpen semantic information and capture semantic relationship

[0113] (22) (23)

[0114] where: is the multi-channel fusion semantic vector of the i-th time step of sentence P, is the multi-channel fusion semantic vector of the j-th time step of sentence Q

[0115] Step A5: Comparison function G and time step aggregation: comparison is performed at each time step using the same feedforward network G containing linear layers and ReLU activation functions, resulting in a comparison vector; the average pooling vector, the maximum pooling vector obtained in step A4, and the comparison vector obtained in this step are concatenated as the final matching result of each time step of the sentence:

[0116] Step A51: Comparison function G(·): the same feedforward network G (containing linear layers + ReLU activation) is used on the above concatenation vector at each time step to obtain a comparison vector:

[0117] (24) (25)

[0118] The activation function of G is a ReLU activation function. and are comparison vectors, is the output dimension of the neural network G.

[0119] Step A52: concatenate the average pooling, maximum pooling, and context representation and the interaction vector obtained by deep interaction with the attention vector as the final matching result of each time step of the sentence. Its formula is as follows:

[0120] (26) (27)

[0121] where: is the final matching result of sentence P, is the final matching result of sentence Q

[0122] Step A6: discriminator and loss function: the matching result sequence obtained in step A5 is aggregated into a fixed-length matching vector using a BiLSTM layer; after inputting the matching vector into several fully connected layers, the Softmax function is used to output the predicted score; the Sigmoid cross-entropy loss function is used to minimize the cross-entropy between the predicted label and the true label through backpropagation to update and optimize the parameters of the entire network:

[0123] Step A61: The matching results of the two sequences are aggregated into a fixed-length matching vector using a BiLSTM layer. The BiLSTM is used for the two matching sequences, and then the BiLSTM last time step vector is connected to obtain the final matching vector. Finally, the After inputting several fully connected layers, the predicted score is output :

[0124] (28)

[0125] where, is a weight matrix, is a bias matrix, is a predicted score. The symbol represents a Softmax function, which is used to map the real value vector output by the fully connected layer to a probability distribution, and the specific calculation formula is as follows:

[0126] (29)

[0127] where is the number of categories, is the probability that the input sample belongs to the category. The Softmax function ensures that the components of the output vector are non-negative and the sum is 1, which is suitable for multi-classification tasks.

[0128] Step A62: Loss function: This paper adopts the sigmoid cross-entropy loss function. The goal of training is to minimize the cross-entropy between the predicted label and the true label. And get the network parameters. The formula can be expressed as:

[0129] (30)

[0130] where is the true label, is the predicted probability. The entire network minimizes this loss through backpropagation to update the network parameters.

[0131] The present application effectively solves the problems of insufficient semantic information, insufficient inter-sentence interaction and high model complexity in traditional short text matching models by fusing multi-granularity semantic representations of word level and word level, establishing a multi-path semantic interaction mechanism (pooling, attention, difference multiplication feature), and using a lightweight neural network structure for semantic aggregation, significantly improving the precision and generalization ability of Chinese semantic matching.

[0132] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only the principles of the present application. Various changes and improvements can be made without departing from the spirit and scope of the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.

Claims

1. A carbon emission factor intelligent matching method based on multi-granularity semantic embedding and multi-directional semantic interaction, characterized in that, Comprising the following steps: Step A1: data input and input preprocessing: systematic preprocessing of the acquired data, unified data format and unit expression; Accepting Chinese activity data text; using a word segmentation tool for word segmentation while retaining character-level representation; building a dictionary and character index table to generate word sequences and character sequences; Step A2: word vector and character vector embedding: character vector embedding is performed on the character sequence generated in step A1, and the sentence is represented as a character vector matrix to extract features and add an attention mechanism to weight the key characters; word vector embedding is performed on the word sequence generated in step A1, and a model fine-tuned on a building field semantic similarity dataset is used to generate word vectors; the word vectors and character vectors are spliced to obtain a sentence vector representation that integrates word-level and word-level semantics; Step A3: feature extraction: input the sentence vector representation obtained in step A2 into the encoder to capture the context dependency of the text, and output a context feature sequence; Step A4: interactive layer fusion of interaction information: based on the context feature sequence obtained in step A3, calculate the cosine similarity matrix between sentences; Perform average pooling and max pooling operations on the similarity matrix to obtain overall interaction information and capture the strongest matching signal; Calculate the attention weight matrix and generate an attention weighted vector based on the matrix to achieve sentence semantic alignment; Step A5: comparison function G and time step aggregation: use the same feedforward network G containing a linear layer and a ReLU activation function at each time step to obtain a comparison vector; concatenate the average pooling vector, max pooling vector obtained in step A4, and the comparison vector obtained in this step to obtain the final matching result of each time step of the sentence; Step A6: discriminator and loss function: use a BiLSTM layer to aggregate the matching result sequence obtained in step A5 into a fixed-length matching vector; input the matching vector into several fully connected layers, and then output the predicted score through the Softmax function; use the Sigmoid cross-entropy loss function to minimize the cross-entropy between the predicted label and the true label through backpropagation to update and optimize the parameters of the entire network.

2. The method of claim 1, wherein, The step A1 specifically comprises: step A11: collecting activity data from the human-machine table provided by the engineering case, collecting carbon emission factor data from government-issued reports, industry standards, academic research and enterprise internal records, and performing systematic preprocessing on the acquired data, the preprocessing process includes data cleaning and normalization operations to remove redundant information, correct abnormal or incorrect data, and unify data format and unit expression; Step A12: accepting a pair of Chinese activity data P and Q; Step A13: using Jieba to perform word segmentation on P and Q respectively while retaining character-level representation to alleviate the problem of semantic loss in short text; clean up stop words and special symbols to unify the text format; Step A14: build a dictionary and character index table to generate word sequences and character sequences.

3. The method of claim 1, wherein, The step A2 specifically comprises: step A21: character vector embedding, representing each character in the sentence of length n as the index position of the character in the dictionary, and then representing the sentence as a character vector matrix of n*k, where k is the dimension of each character vector; inputting the matrix into LSTM to extract features, and adding an attention mechanism to weight the key characters to capture character-level features; Step A22: word vector embedding, inputting the sentence P and the sentence Q into the T-BERT-ARCH model fine-tuned by the architectural field semantic similarity dataset to obtain the word vector matrix of the two sentences; Step A23: concatenating the character vector obtained in step A21 with the word vector obtained in step A22 to obtain the final vector representation of the sentences P and Q.

4. The method of claim 1, wherein, The step A4 specifically comprises: Step A41: cosine similarity average and maximum pooling, calculating the cosine similarity for each pair of time steps to form a similarity matrix; performing average pooling and maximum pooling on the matrix respectively; Step A42: attention weight matrix calculation, calculating the attention weight matrix based on the context feature sequence, and calculating the weighted sum of the attention weights to obtain an attention weighted vector; Step A43: deep interaction, calculating the difference and element product between the context feature sequence and the attention weighted vector, and concatenating the original vector with the difference and element product features to obtain the vector after deep interaction.

5. The method of claim 4, wherein, The step A5 specifically comprises: Step A51: comparison function G(·), using the same feedforward network G on the deep interaction vector obtained in step A43 at each time step, the feedforward network G comprising a linear layer and a ReLU activation function, to obtain a comparison vector; Step A52: time step aggregation, concatenating the average pooling vector, the maximum pooling vector obtained in step A41, and the comparison vector obtained in step A51 as the final matching result of each time step of the sentence.

6. The method of claim 1, wherein, The step A6 specifically comprises: Step A61: using a BiLSTM layer to aggregate the matching results of the two sequences into a fixed-length matching vector; inputting the matching vector into several fully connected layers, and then outputting the predicted score through the Softmax function; Step A62: using a Sigmoid cross-entropy loss function to minimize the cross-entropy between the predicted label and the true label through backpropagation to update the network parameters.

7. A carbon emission factor intelligent matching system based on multi-granularity semantic embedding and multi-directional semantic interaction, used to implement the method of any one of claims 1 to 6, characterized in that, The system comprises: a data input and preprocessing module for performing the step A1 of claim 1; a word vector and character vector embedding module for performing the step A2 of claim 1; a feature extraction module for performing the step A3 of claim 1; an interaction layer fusion interaction information module for performing the step A4 of claim 1; a comparison and time step aggregation module for performing the step A5 of claim 1; a discrimination and output module for performing the step A6 of claim 1.

8. The system of claim 7, wherein, The data input and preprocessing module is further configured to perform steps A11, A12, A13 and A14 of claim 2.

9. The system of claim 7, wherein, The word vector and character vector embedding module is further configured to perform steps A21, A22 and A23 of claim 3.

10. The system of claim 7, wherein, The interaction layer fusion interaction information module is further configured to perform steps A41, A42 and A43 of claim 4.

11. A non-volatile storage medium, comprising: The non-volatile storage medium comprises a stored program, wherein the program, when executed, controls a device in which the non-volatile storage medium is located to perform the method of any one of claims 1 to 6.

12. A terminal device, comprising: The terminal device comprises a processor, a memory, a communication interface and a bus; the processor, the memory and the communication interface are connected through the bus and complete communication with each other; the memory stores executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, to execute the method of any one of claims 1-6.