Multi-label energy website classification method based on field adaptive alignment
By dividing the high-frequency and low-frequency text datasets from energy website webpages and performing adaptive alignment, the problems of overfitting high-frequency labels and ignoring low-frequency labels in multi-label classification are solved, achieving higher classification accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-27
AI Technical Summary
Existing energy website classification methods suffer from overfitting of high-frequency labels, neglect of low-frequency label features, and failure to effectively utilize metadata within the labels in multi-label classification, resulting in insufficient classification accuracy.
A domain-adaptive alignment-based multi-label classification method is adopted. The web text dataset is split into high-frequency and low-frequency corpora. The feature vectors are updated by bidirectional gated recurrent units and label attention respectively. The features of the labels are deeply fused by the divergent alignment attention mechanism. Global and local alignment is performed by combining GMMD and GLMMD. The multi-label web text class loss and domain-adaptive loss are calculated for model training.
It improved the model's ability to recognize low-frequency tags, solved the problem of tag long tails, achieved accurate and detailed classification of energy websites, and improved the robustness and generalization performance of the classification.
Smart Images

Figure CN121743618A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text classification technology, and in particular to a multi-label energy website classification method based on domain adaptive alignment. Background Technology
[0002] Energy website classification refers to the process of classifying and organizing energy websites on the Internet using computer technology and algorithms. Its purpose is to categorize a massive number of energy websites according to certain standards and rules, enabling users to find the information they need more quickly. Methods used for energy website classification mainly include feature engineering-based methods and deep learning-based methods. Feature engineering-based methods extract features from website domains, digital certificates, HTML structure, WHOIS information, and website traffic, and then classify them using machine learning models such as support vector machines and decision trees. However, feature engineering is not only cumbersome but also heavily reliant on domain knowledge. Furthermore, the number of useful features that can be extracted from energy websites is limited. Therefore, feature engineering is not suitable for high-accuracy classification of massive numbers of energy websites. Deep learning models, on the other hand, learn deep features directly from the webpage text or images of energy websites using recurrent neural networks and convolutional neural networks, without requiring cumbersome feature engineering. Therefore, deep learning can achieve higher classification accuracy. In addition, compared to webpage images, the correlation between webpage text and energy website type is more direct, and training webpage text requires less time and hardware overhead.
[0003] While deep learning models have achieved some success in energy website text classification, the content and functions of energy websites are often diverse and complex. Almost all current text classification methods typically assign only one label to each website, ignoring situations where a website may possess multiple related features or belong to multiple categories. Therefore, there is a need to research multi-label energy website text classification methods based on deep learning.
[0004] Because multi-label energy website text datasets typically suffer from long-tailed labeling, high-frequency labels appear in most of the webpage text, while low-frequency labels appear less frequently. This can lead to overfitting the model to high-frequency labels during training, while ignoring the features of low-frequency labels. Furthermore, the text content within the tags of an energy website is more important than the text within other tags, but current classification methods do not differentiate between text within different tags. This results in the model failing to fully utilize the more general and crucial meta-information within the tags, impacting the accuracy of the final classification.
[0005] In view of this, this invention is hereby proposed. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by proposing a multi-label energy website classification method based on domain adaptive alignment.
[0007] To achieve the above objectives, the present invention also employs the following technical solution: A multi-label energy website classification method based on domain-adaptive alignment includes the following steps: Step 1: Split the energy website webpage text dataset into high-frequency and low-frequency corpora; Step 2: Separate the high-frequency and low-frequency corpus vectors into web page text belonging to tags and web page text belonging to tags respectively, and perform non-linear mapping; Step 3: Update the webpage text feature vector using bidirectional gated recurrent units and label attention respectively; Step 4: Based on the divergent attention method and the improved collaborative attention mechanism, deeply fuse the features of the labels and tags; Step 5: Calculate the text loss for multi-tab web pages on the energy website; Step 6: Construct a domain-adaptive alignment model to align features of high-frequency and low-frequency corpora, and calculate the domain-adaptive alignment loss; Step 7: Calculate the model loss, which includes the multi-tag webpage text class loss and the domain adaptation loss, and train the model; Step 8: Classify websites based on the model trained in Step 7.
[0008] Furthermore, step 1 includes the following steps: Step 1.1: Collect statistics on energy website tags The number of documents corresponding to all tags in the text determines the set of high-frequency tags. and a collection of low-frequency tags ; Step 1.2: Based on the set of high-frequency tags and a collection of low-frequency tags The energy website webpage text dataset was split into high-frequency corpora. and low-frequency corpus ,in, These represent the number of documents in the high-frequency corpus and the low-frequency corpus, respectively.
[0009] Furthermore, step 2 includes the following steps: Step 2.1: Divide the high-frequency corpus D... high Extract the contents of the sum and get ,in ; low-frequency corpus D low Extract the contents of the sum and get ,in ; Step 2.2: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in, , The dimensions are consistent; Step 2.3: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in and These represent the number of high-frequency tags and the number of low-frequency tags, respectively.
[0010] Furthermore, step 3, updating the webpage text feature vector using a bidirectional gated recurrent unit, includes the following steps: Step 3.1: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting into the BIGRU network yields... ,in The calculation process is as follows: ; ; ; Step 3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting into the BIGRU network yields... ,in The calculation process is as follows: ; ; .
[0011] Furthermore, step 3, updating the webpage text feature vector using label attention, includes the following steps: Step 3.3: Let , , , ; Step 3.4: Calculate using dot product respectively , and as well as , and The attention score is calculated using the following formula: ; ; ; .
[0012] Furthermore, in step 4, for high-frequency corpora, the tags and their features are deeply fused through the following steps: Step 4.1: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, This indicates the target distribution for label generation. This represents the optimal attention weight based on KL divergence. This indicates the tag-to-tag fusion output; Indicates average pooling. Represents the weight vector. Indicates the scaling factor. This represents the transpose of a vector. The KL divergence coefficient represents the high-frequency corpus. Step 4.2: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, The target distribution generated for the labels, For optimal attention weights based on KL divergence, This is a tag-to-tag fusion output; Step 4.3: with for , for A divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; for , for The divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; the formula is as follows: ; ; In the formula, This indicates a multi-headed attention mechanism.
[0013] Furthermore, step 5 includes the following steps: Step 5.1: Calculate the multi-label webpage text classification loss for high-frequency corpora, using the following formula: ; In the formula, ; ; Step 5.2: Calculate the multi-label webpage text classification loss for low-frequency corpus, using the following formula: ; In the formula, ; ; Step 5.3: Merge the high-frequency and low-frequency corpora to obtain the fused corpus, and calculate the multi-label webpage text classification loss of the fused corpus, as shown in the following formula: ; In the formula, ; ; In steps 5.1 to 5.3, Represents the weight vector. Indicates the actual label. or , , Indicates the prediction result; Step 5.4: Calculate the text classification loss for multi-tag web pages on the energy website, using the following formula: .
[0014] Furthermore, step 6 includes the following steps: Step 6.1: Construct important weights for the gating mechanism to learn feature dimensions, which are used to adjust the contributions of different feature dimensions in MMD and LMMD. The formula is as follows: ; In the formula, ; ; In the formula, Indicates the gate weight. Represents a weight vector. Indicates the bias term. This represents vector concatenation. Represents the Hadamard product. and These represent the high-frequency and low-frequency features after gated weighting, respectively. Step 6.2: Construct the gated maximum mean difference, and calculate the global domain adaptive loss using the gated weighted features. The calculation formula is as follows: ; Step 6.3: Construct a gated local maximum mean difference and calculate the local neighborhood adaptive loss using gated weighted features. The calculation formula is as follows: ; In steps 6.2 and 6.3, Represents the source domain The number of samples, Represents the target domain The number of samples, Represents a nonlinear transformation. Indicates the number of categories. This indicates that the tag in the source domain is Sample weights, Indicates the target domain label is Sample weights, , , Represents the reproducible kernel Hilbert space; Step 6.4: Calculate the domain adaptive loss, as shown in the following formula: .
[0015] Furthermore, step 7 calculates the model loss using the following formula: .
[0016] Compared with the prior art, the beneficial effects of this invention are as follows: Steps 1 and 2 divide the multi-tag webpage text classification corpus of energy websites into a high-frequency tag source domain and a low-frequency tag target domain. Step 6 uses GMMD and GLMMD to globally and locally align the feature distributions of the high-frequency and low-frequency corpora, thereby improving the model's ability to recognize low-frequency tags and solving the tag long-tail problem. Step 4 introduces a divergent alignment attention mechanism to differentiate and deeply fuse texts with different semantics in tags, using KL divergence as a constraint to guide the attention weight distribution, thus extracting features more effectively. This allows the model to be effectively applied to the accurate and refined classification of energy websites. Attached Figure Description
[0017] Figure 1 A flowchart of a multi-label energy website classification method based on domain adaptive alignment; Figure 2 This is a distribution of the number of documents for the nine categories in the training and test sets of a multi-label Chinese energy webpage text classification dataset. Detailed Implementation
[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0019] Example 1: A multi-label energy website classification method based on domain adaptive alignment, such as Figure 1 As shown, it includes the following steps: Step 1: Split the energy website webpage text dataset into high-frequency and low-frequency corpora.
[0020] In an optional embodiment, step 1 includes the following steps: Step 1.1: Collect statistics on energy website tags The number of documents corresponding to all tags in the text determines the set of high-frequency tags. and a collection of low-frequency tags .
[0021] In this embodiment, a frequency threshold can be set, and the set of high-frequency tags can be determined based on the frequency threshold. and a collection of low-frequency tags .
[0022] Step 1.2: Based on the set of high-frequency tags and a collection of low-frequency tags The energy website webpage text dataset was split into high-frequency corpora. and low-frequency corpus ,in, These represent the number of documents in the high-frequency corpus and the low-frequency corpus, respectively.
[0023] In this embodiment, a document is web page text, and a corpus is a classification dataset of web page text. If a document contains both high-frequency and low-frequency tags, then the document is included in both the high-frequency and low-frequency corpora.
[0024] Step 2: Separate the high-frequency and low-frequency corpus vectors into web page text belonging to the tags and web page text belonging to the tags respectively, and perform non-linear mapping.
[0025] In an optional embodiment, step 2 includes the following steps: Step 2.1: Divide the high-frequency corpus D... high Extract the contents of the sum and get ,in ; low-frequency corpus D low Extract the contents of the sum and get ,in .
[0026] Step 2.2: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in, , The dimensions are consistent.
[0027] Step 2.3: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in and These represent the number of high-frequency tags and the number of low-frequency tags, respectively.
[0028] Step 3: Update the webpage text feature vector using bidirectional gated recurrent units and label attention respectively.
[0029] In an optional embodiment, step 3, updating the webpage text feature vector using a bidirectional gated recurrent unit, includes the following steps: Step 3.1: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting a BIGRU network (Bidirectional Gated Recurrent Unit, BIGRU) yields... ,in The calculation process is as follows: ; ; ; Step 3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting into the BIGRU network yields... ,in The calculation process is as follows: ; ; .
[0030] In an optional embodiment, step 3, updating the webpage text feature vector using label attention, includes the following steps: Step 3.3: Let , , , .
[0031] Step 3.4: Calculate using dot product respectively , and as well as , and The attention score is calculated using the following formula: ; ; ; .
[0032] In this embodiment, label attention is used to enhance the features of label perception. High-frequency label features guide the model to strengthen common semantic patterns, while low-frequency label features guide the model to capture scarce but crucial discriminative information. This alleviates the problem of insufficient feature learning caused by insufficient samples of low-frequency labels in long-tail distribution and improves the model's classification robustness across the entire label range.
[0033] Step 3.6: Update the embedding vector based on the attention score, using the following formula: ; ; ; ; In the formula, This represents the weight vector.
[0034] In this embodiment, step 3 achieves hierarchical feature enhancement from sequence modeling to semantic alignment through a two-stage design of "BiGRU update" and "label attention update". Specifically, steps 3.1 and 3.2 use BiGRU to perform bidirectional sequence encoding on the text and its parts, capturing its local contextual dependencies and long-range semantic associations to form an intermediate representation with temporal structure. Steps 3.3-3.6 further introduce label embedding as an attention query, calculate the association strength between each part of the text and the label semantics through dot product attention, and generate a weighted label-aware feature representation. The significance is that the BiGRU stage ensures the integrity of the text's internal structure learning, while the label attention stage achieves explicit semantic alignment between text features and the label space. The final effect is that the model not only retains the serialization information of the text, but also dynamically focuses on the semantic segments most relevant to high- and low-frequency labels, thereby enhancing the feature representation ability of low-frequency labels, alleviating the semantic sparsity problem under long-tail distribution, and improving the robustness and generalization of classification.
[0035] Step 4: Based on divergent attention methods and improved collaborative attention mechanisms, deeply fuse labels and label features.
[0036] In an optional embodiment, in step 4, for high-frequency corpora, tags and tag features are deeply fused through the following steps: Step 4.1: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, This indicates the target distribution for label generation. This represents the optimal attention weight based on KL divergence. This indicates the tag-to-tag fusion output; Indicates average pooling. Represents the weight vector. Indicates the scaling factor. This represents the transpose of a vector. This represents the KL divergence coefficient of a high-frequency corpus.
[0037] Step 4.2: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, The target distribution generated for the labels, For optimal attention weights based on KL divergence, This is the output for tag-to-tag fusion.
[0038] Step 4.3: with for , for A divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; for , for The divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; the formula is as follows: ; ; In the formula, This indicates a multi-headed attention mechanism.
[0039] In an optional embodiment, in step 4, for low-frequency corpora, the same method as for high-frequency corpora is used to perform deep fusion of tags and tag features to obtain... and .
[0040] In this embodiment, the core principle of step 4 lies in achieving differentiated fusion of different semantic structures through bidirectional attention and distribution constraints. Specifically, firstly, bidirectional collaborative attention is used to interact with features as queries and keys, capturing the semantic relationship between them. Crucially, the average pooling distribution of the features is calculated as the target domain, and its KL divergence is introduced as a regularization term into the attention weight calculation. This ensures that the attention distribution not only focuses on relevance but also aligns with the target semantic distribution, thereby suppressing interference from irrelevant or noisy information and strengthening feature interactions consistent with the dominant semantics. For low-frequency corpora, due to the sparse sample size, a uniform distribution is used as the target, providing stronger constraints to prevent overfitting. Finally, multi-head attention is used to perform multi-level fusion of the bidirectional interaction results, enabling the model to dynamically identify and enhance the representation of significantly semantically different parts between the features, achieving more refined differentiated feature extraction and deep fusion.
[0041] Step 5: Calculate the text loss of multi-tab web pages on the energy website.
[0042] In an optional embodiment, step 5 includes the following steps: Step 5.1: Calculate the multi-label webpage text classification loss for high-frequency corpora, using the following formula: ; In the formula, ; ; Step 5.2: Calculate the multi-label webpage text classification loss for low-frequency corpus, using the following formula: ; In the formula, ; ; Step 5.3: Merge the high-frequency and low-frequency corpora to obtain the fused corpus, and calculate the multi-label webpage text classification loss of the fused corpus, as shown in the following formula: ; In the formula, ; ; In steps 5.1 to 5.3, Represents the weight vector. Indicates the actual label. or , , This indicates the prediction result.
[0043] In this embodiment, , , These represent the sets of prediction results for high-frequency corpus, low-frequency corpus, and fused corpus, respectively.
[0044] Step 5.4: Calculate the text classification loss for multi-tag web pages on the energy website, using the following formula: .
[0045] In this embodiment, the classification loss in step 5 achieves differentiated and collaborative optimization of high-frequency and low-frequency samples under the long-tail label distribution through a hierarchical weighted strategy. Specifically, it independently calculates the binary cross-entropy classification loss for the high-frequency corpus, the low-frequency corpus, and the fused corpus, and introduces a learnable weight vector to adaptively weight the prediction errors of high- and low-frequency labels. The significance is that the high-frequency loss ensures the model's accurate fitting of mainstream labels, the low-frequency loss strengthens feature learning for sparse labels, and the fusion loss promotes the interaction and complementarity of high- and low-frequency semantic information. Finally, by weighting and summarizing these three types of losses, the model can maintain its discriminative power for high-frequency labels while improving its sensitivity to low-frequency labels, thereby mitigating the classification bias caused by the long-tail distribution and enhancing the model's generalization performance and robustness across the entire label range.
[0046] Step 6: Construct a domain-adaptive alignment model to align features of high-frequency and low-frequency corpora, and calculate the domain-adaptive alignment loss.
[0047] In an optional embodiment, step 6 includes the following steps: Step 6.1: Construct important weights for the gating mechanism to learn feature dimensions, which are used to adjust the contributions of different feature dimensions in MMD and LMMD. The formula is as follows: ; In the formula, ; ; In the formula, Indicates the gate weight. Represents a weight vector. Indicates the bias term. This represents vector concatenation. Represents the Hadamard product. and These represent the high-frequency and low-frequency features after gating and weighting, respectively.
[0048] In this optional embodiment, since the Maximum Mean Discrepancy (MMD) and Local Maximum Mean Discrepancy (LMMD) are domain-adaptive aligned from the global and local perspectives, respectively, a gating mechanism is designed to learn the important weights of the feature dimensions after obtaining the high-frequency corpus features and low-frequency corpus features, in order to adjust the contribution of different feature dimensions in MMD and LMMD.
[0049] Step 6.2: Construct the gated maximum mean difference, and calculate the global domain adaptive loss using the gated weighted features. The calculation formula is as follows: .
[0050] In this optional embodiment, GMMD stands for Gating Maximum Mean Difference (GMMD).
[0051] Step 6.3: Construct a gated local maximum mean difference and calculate the local neighborhood adaptive loss using gated weighted features. The calculation formula is as follows: .
[0052] In steps 6.2 and 6.3, Represents the source domain The number of samples, Represents the target domain The number of samples, Represents a nonlinear transformation. Indicates the number of categories. This indicates that the tag in the source domain is Sample weights, Indicates the target domain label is Sample weights, , , This represents the reproducible kernel Hilbert space.
[0053] Step 6.4: Calculate the domain adaptive loss, as shown in the following formula: .
[0054] In this embodiment, step 6 effectively improves the recognition capability of low-frequency labels by aligning with multi-granularity distributions through a gating mechanism. The principle is as follows: First, the contribution of each dimension of high- and low-frequency features is dynamically adjusted through learnable gating weights, allowing the model to focus on semantic dimensions more critical to the task. Then, the global alignment loss (GMMD) and local alignment loss (GLMMD) are calculated using the gating-weighted features. GMMD brings the feature distributions of high-frequency (source domain) and low-frequency (target domain) closer together at the overall distribution level, ensuring their consistency in the global semantic space. GLMMD further aligns at the category granularity level by weighting the distribution differences between the source and target domain features within each category, prompting the model to transfer the semantic structures learned in high-frequency categories to the corresponding low-frequency categories. This alignment strategy, combining global and local approaches, allows low-frequency labels to fully utilize the rich semantic information of high-frequency labels while retaining their unique discriminative features, thus significantly alleviating the problem of insufficient feature learning due to insufficient low-frequency samples and improving the model's adaptability to long-tail distributions.
[0055] Step 7: Calculate the model loss, which includes the multi-tag webpage text class loss and the domain adaptation loss, and train the model.
[0056] In an optional embodiment, step 7 calculates the model loss using the following formula: .
[0057] Step 8: Classify websites based on the model trained in Step 7.
[0058] In summary, this embodiment presents a multi-label energy website classification method based on domain adaptive alignment. Steps 1 and 2 divide the multi-label webpage text classification corpus of energy websites into a high-frequency label source domain and a low-frequency label target domain. Step 6 utilizes GMMD and GLMMD to perform global and local alignment of the feature distributions of the high-frequency and low-frequency corpora, thereby improving the model's ability to recognize low-frequency labels and solving the label long-tail problem. Step 4 introduces a divergent alignment attention mechanism to differentiate and deeply fuse texts with semantically different labels, using KL divergence as a constraint to guide the attention weight distribution, thus extracting features more effectively. This allows the model to be effectively applied to the accurate and refined classification of energy websites.
[0059] To verify the effectiveness of the scheme in this embodiment, a highly reliable multi-label Chinese energy webpage text classification dataset was obtained through manual annotation. The dataset constructed in this embodiment comes from three parts: first, Chinese websites in the Alex Top 1M list; second, websites with the top-level domain ".cn"; and finally, website access records from September 2025 obtained in cooperation with Qi An Xin, from which Chinese websites were selected from the top 1 million websites in terms of access frequency. The statistical results of the multi-label Chinese energy webpage text classification dataset are shown in Table 1, and the meaning of each symbol in Table 1 is shown in Table 2.
[0060] Table 1 - Statistical Results of the Multi-Label Chinese Energy Webpage Text Classification Dataset
[0061] The meanings of different symbols in Table 2-Table 1
[0062] The multi-label Chinese energy webpage text classification dataset contains nine categories: coal, oil, natural gas, thermal power, hydropower, wind power, solar power, nuclear power, and biomass energy. Observing the sample distribution across these nine categories reveals that coal, oil, natural gas, thermal power, and hydropower are high-frequency labels, while wind power, solar power, nuclear power, and biomass energy are low-frequency labels. Figure 2This is a distribution of the number of documents for the nine categories in the training and test sets of a multi-label Chinese energy webpage text classification dataset.
[0063] Since there is a lack of highly reliable multi-tag text classification methods for energy websites, this embodiment selects 10 classic and latest multi-tag text classification methods as benchmark methods.
[0064] LightXML: A lightweight and efficient XML model that combines deep learning with tree-based methods for fast and accurate multi-label classification.
[0065] TAPON: A two-stage attention-based prototype network for short-term learning that leverages attention mechanisms to improve prototype representation and classification.
[0066] APLC-XLNet: An adaptive probabilistic label clustering method using XLNet that enhances extreme multi-label classification by grouping similar labels and reducing computational complexity.
[0067] NAGNN: A neighborhood-aware graph neural network that captures local structural information to improve node representation learning in graph-based tasks.
[0068] EXAM: An interpretable multi-label classification model that provides interpretable predictions by learning label dependencies and generating human-readable explanations.
[0069] BGNN-XML: A bipartite graph neural network for extreme multi-label learning, which improves prediction accuracy by modeling label correlations through a bipartite graph structure.
[0070] BiG: A two-way frame used to align document-to-tag and tag-to-document relationships, reducing ambiguity caused by partial tag overlap in MLTC.
[0071] SKFRL: A novel text segmentation method that uses dynamic programming to alleviate the length constraints imposed by pre-trained language models.
[0072] DLRLA: A multi-label feature selection method based on deep label correlation and label ambiguity. This method has a quasi-correlation matrix that integrates low-order and high-order feature label correlation and label ambiguity.
[0073] S-GCN: A sparse graph convolutional network that leverages sparsity to reduce computational overhead, enabling efficient large-scale graph representation learning.
[0074] In this embodiment, P@K and nDCG@K are selected as evaluation indicators, and their definitions are as follows: ; ; ; in, , It corresponds to the label index of the K items with the highest scores in the current prediction results. yes The number of applicable tags present in the text.
[0075] The method of this embodiment and the baseline method were applied to the classification of a multi-label Chinese energy webpage text classification dataset. The experimental results are shown in Tables 3 and 4. It can be seen that the method of this embodiment achieved the best P@k (k=1, 3, 5) and nDCG@k (k=1, 3, 5) results. Specifically, compared with the baseline method, the P@1, P@3, P@5, nDCG@3, and nDCG@5 of the method of this embodiment were improved by 0.0193-0.0981, 0.024-0.0959, 0.0259-0.1116, 0.0299-0.1154, and 0.0278-0.1225, respectively. Seven baseline methods showed P@1, P@5, and nDCG@3 results that were at least 0.05 lower than the method of this embodiment, and six baseline methods showed P@3 and nDCG@5 results that were at least 0.05 lower than the method of this embodiment. There are two baseline methods with P@5 and nDCG@3, where nDCG@5 is at least 0.1 lower than the method in this embodiment. The mean improvements in P@1, P@3, P@5, nDCG@3, and nDCG@5 of the method in this embodiment are 0.0585, 0.0593, 0.0656, 0.0704, and 0.0688, respectively.
[0076] Table 3 - P@k results of the method in this embodiment and the baseline method on the multi-label Chinese energy webpage text classification dataset.
[0077] All models were run 10 times, and the average value was reported.
[0078] Table 4: Results of the method in this embodiment and the baseline method on the multi-label Chinese energy webpage text classification dataset nDCG@k
[0079] All models were run 10 times, and the average value was reported.
[0080] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A multi-label energy website classification method based on domain-adaptive alignment, characterized in that, Includes the following steps: Step 1: Split the energy website webpage text dataset into high-frequency and low-frequency corpora; Step 2: Separate the high-frequency and low-frequency corpus vectors into web page text belonging to tags and web page text belonging to tags respectively, and perform non-linear mapping; Step 3: Update the webpage text feature vector using bidirectional gated recurrent units and label attention respectively; Step 4: Based on the divergent attention method and the improved collaborative attention mechanism, deeply fuse the features of the labels and tags; Step 5: Calculate the text loss for multi-tab web pages on the energy website; Step 6: Construct a domain-adaptive alignment model to align features of high-frequency and low-frequency corpora, and calculate the domain-adaptive alignment loss; Step 7: Calculate the model loss, which includes the multi-tag webpage text class loss and the domain adaptation loss, and train the model; Step 8: Classify websites based on the model trained in Step 7.
2. The multi-label energy website classification method based on domain adaptive alignment according to claim 1, characterized in that, Step 1 includes the following steps: Step 1.1: Collect statistics on energy website tags The number of documents corresponding to all tags in the text determines the set of high-frequency tags. and a collection of low-frequency tags ; Step 1.2: Based on the set of high-frequency tags and a collection of low-frequency tags The energy website webpage text dataset was split into high-frequency corpora. and low-frequency corpus ,in, These represent the number of documents in the high-frequency corpus and the low-frequency corpus, respectively.
3. The multi-label energy website classification method based on domain adaptive alignment according to claim 2, characterized in that, Step 2 includes the following steps: Step 2.1: Divide the high-frequency corpus D... high Extract the contents of the sum and get ,in ; low-frequency corpus D low Extract the contents of the sum and get ,in ; Step 2.2: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in, , The dimensions are consistent; Step 2.3: Using the pre-trained ALBERT model Convert to embedding vector ,Will Convert to embedding vector ,in and These represent the number of high-frequency tags and the number of low-frequency tags, respectively.
4. The multi-label energy website classification method based on domain adaptive alignment according to claim 3, characterized in that, Step 3, updating the webpage text feature vector using a bidirectional gated recurrent unit, includes the following steps: Step 3.1: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting into the BIGRU network yields... ,in The calculation process is as follows: ; ; ; Step 3.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Inputting into the BIGRU network yields... ,in The calculation process is as follows: ; ; 。 5. The multi-label energy website classification method based on domain adaptive alignment according to claim 4, characterized in that, Step 3, updating the webpage text feature vector using label attention, includes the following steps: Step 3.3: Let , , , ; Step 3.4: Calculate using dot product respectively , and as well as , and The attention score is calculated using the following formula: ; ; ; 。 6. The multi-label energy website classification method based on domain adaptive alignment according to claim 5, characterized in that, In step 4, for high-frequency corpora, tags and tag features are deeply fused through the following steps: Step 4.1: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, This indicates the target distribution for label generation. This represents the optimal attention weight based on KL divergence. This indicates the tag-to-tag fusion output; Indicates average pooling. Represents the weight vector. Indicates the scaling factor. This represents the transpose of a vector. The KL divergence coefficient represents the high-frequency corpus. Step 4.2: Using label features as... The label features are Attention is calculated; in this process, the target distribution is obtained by average pooling the label features, and the KL divergence constraint of this distribution is incorporated into the calculation of the attention weights; the formula is as follows: ; ; ; In the formula, The target distribution generated for the labels, For optimal attention weights based on KL divergence, This is a tag-to-tag fusion output; Step 4.3: with for , for The divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; by for , for The divergent alignment attention result dominated by high-frequency labels is obtained through a multi-head attention mechanism; the formula is as follows: ; ; In the formula, This indicates a multi-headed attention mechanism.
7. The multi-label energy website classification method based on domain adaptive alignment according to claim 6, characterized in that, Step 5 includes the following steps: Step 5.1: Calculate the multi-label webpage text classification loss for high-frequency corpora, using the following formula: ; In the formula, ; ; Step 5.2: Calculate the multi-label webpage text classification loss for low-frequency corpus, using the following formula: ; In the formula, ; ; Step 5.3: Merge the high-frequency and low-frequency corpora to obtain the fused corpus, and calculate the multi-label webpage text classification loss of the fused corpus, as shown in the following formula: ; In the formula, ; ; In steps 5.1 to 5.3, Represents the weight vector. Indicates the actual label. or , , Indicates the prediction result; Step 5.4: Calculate the text classification loss for multi-tag web pages on the energy website, using the following formula: 。 8. The multi-label energy website classification method based on domain adaptive alignment according to claim 7, characterized in that, Step 6 includes the following steps: Step 6.1: Construct important weights for the gating mechanism to learn feature dimensions, which are used to adjust the contributions of different feature dimensions in MMD and LMMD. The formula is as follows: ; In the formula, ; ; In the formula, Indicates the gate weight. Represents a weight vector. Indicates the bias term. This represents vector concatenation. Represents the Hadamard product. and These represent the high-frequency and low-frequency features after gated weighting, respectively. Step 6.2: Construct the gated maximum mean difference, and calculate the global domain adaptive loss using the gated weighted features. The calculation formula is as follows: ; Step 6.3: Construct a gated local maximum mean difference and calculate the local neighborhood adaptive loss using gated weighted features. The calculation formula is as follows: ; In steps 6.2 and 6.3, Represents the source domain The number of samples, Represents the target domain The number of samples, Represents a nonlinear transformation. Indicates the number of categories. This indicates that the tag in the source domain is Sample weights, Indicates the target domain label is Sample weights, , , Represents the reproducible kernel Hilbert space; Step 6.4: Calculate the domain adaptive loss, as shown in the following formula: 。 9. A multi-label energy website classification method based on domain adaptive alignment according to claim 8, characterized in that, Step 7 calculates the model loss using the following formula: 。