Power field training set dynamic construction method and system based on BERT and reinforcement learning

By constructing a professional terminology database and knowledge graph for the power industry, and combining BERT and reinforcement learning to dynamically adjust sample selection, the problems of low efficiency in power text annotation and poor model adaptability were solved, achieving efficient and accurate training set construction and improved model performance.

CN121256352APending Publication Date: 2026-01-02安徽明生恒卓科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511297216.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Traditional power data annotation methods are inefficient, struggle to handle complex power data, have poor model generalization ability, and static training set partitioning methods cannot adapt to the dynamic changes in power systems, resulting in high annotation time consumption and poor adaptability.

Method used

A technical terminology database and knowledge graph for the power industry are constructed, embedded with a BERT model, and combined with a reinforcement learning policy network to dynamically select samples and generate pseudo-labels. The training set is iteratively optimized to form a closed-loop optimization process.

Benefits of technology

It improves annotation efficiency and model accuracy, reduces annotation costs, enhances model adaptability and generalization ability, and adapts to new changes and scenarios in the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256352A_ABST
    Figure CN121256352A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power field training set dynamic construction method and system based on BERT and reinforcement learning. The method comprises the following steps: S1, constructing a terminology library and a knowledge graph in the power field; s2, performing power field adaptation on the BERT model by using a terminology library and a knowledge graph to obtain a field adaptation model; s3, designing a strategy network based on reinforcement learning so as to dynamically select unlabeled samples and generate pseudo labels; and S4, based on the domain adaptation model and the strategy network, dynamically constructing and optimizing a training set through an iteration process. According to the method, the training set quality and the model performance are jointly improved, manual labeling is avoided, sample selection can be adaptively adjusted, the labeling cost is low, and the model accuracy is high. According to the method, the pseudo labels are automatically generated through the reinforcement learning strategy network, manual labeling requirements are reduced, labeling efficiency and model performance are improved, the quality of a training set can be optimized, and adaptability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power systems, in particular to a training set dynamic construction method based on BERT and reinforcement learning, and also relates to a training set dynamic construction system based on BERT and reinforcement learning in the field of electric power. BACKGROUND

[0002] The traditional power text labeling method mainly relies on manual labeling or simple rule matching, and has the problems of low efficiency and easy to miss details. The unstructured data management platform of State Grid Corporation has completed the access of more than 100 business systems, covering various professional fields of the company, and adopts a headquarters and provincial (municipal) two-level deployment mode, but manual labeling cannot cope with such a large amount of data. At the same time, there are a large number of professional vocabulary abbreviations and aliases in power text, such as "main transformer" (main transformer) and "transformer" (transformer), which cannot be effectively recognized by existing segmentation tools, resulting in difficulty in semantic understanding.

[0003] In terms of data quality, there are many professional terms in the field of electric power, and the training corpus is small, which leads to poor generalization ability of the model. In the power dispatch text database, the frequency of appearance of entities such as organizations and equipment names is low, and there is a lack of fine-grained description information, making it difficult for the model to accurately capture key information. In addition, traditional machine learning algorithms require manual feature engineering when processing complex power data, which is time-consuming and laborious and requires high feature selection, directly affecting the performance of the model.

[0004] In terms of dynamic adaptability, existing training set division methods are mostly static division, usually divided into training set, validation set and test set in the ratio of 7:2:1, which cannot adjust the sample selection strategy in real time according to the performance of the model. When new types of faults or multi-factor faults occur in the power system, the traditional static method is difficult to adapt, resulting in a decrease in the accuracy of the model. SUMMARY

[0005] To solve the technical problems of existing training set construction methods that are time-consuming and have poor adaptability, the present application provides a training set dynamic construction method and system based on BERT and reinforcement learning in the field of electric power.

[0006] The present application adopts the following technical scheme: a training set dynamic construction method based on BERT and reinforcement learning in the field of electric power, comprising the following steps: S1: constructing a professional term library and a knowledge graph in the field of electric power; S2: adapting the BERT model to the field of electric power using the professional term library and the knowledge graph to obtain a field adaptation model; S3: designing a strategy network based on reinforcement learning for dynamically selecting unlabeled samples and generating pseudo-labels; S4: dynamically constructing and optimizing the training set through an iterative process based on the domain adaptation model and the policy network.

[0007] The application constructs an electric power terminology library and a knowledge graph, and embeds them into a BERT model, so that the model can understand professional terms and knowledge structures in the electric power field. Through a reinforcement learning policy network, the sample selection strategy is dynamically adjusted according to the model performance, the exploration and utilization are balanced, the quality of the pseudo-label generation is improved, and through the knowledge graph embedding and the multi-head attention mechanism, the association between the terms is captured to form a more complete semantic representation of the electric power field. A closed-loop optimization process of model training and sample selection is constructed, the training set is dynamically expanded through an iterative method, the BERT model and the reinforcement learning policy network are optimized, the quality of the training set and the performance of the model are improved together, manual labeling is avoided, the sample selection can be adaptively adjusted, the labeling cost is low, the model accuracy is high, and the technical problems of high labeling time and poor adaptability of the existing training set construction method are solved.

[0008] As a further improvement of the above-mentioned scheme, in step S1, the construction method comprises: extracting professional terms from electric power system related documents; annotating and classifying the professional terms according to electric power professional vocabulary indexing rules to form a terminology library including device names, fault types and operation terms; constructing an electric power field knowledge graph with devices, faults and operations as entities and their relationships.

[0009] As a further improvement of the above-mentioned scheme, in step S2, the adaptation method comprises: adopting a RoBERTa model structure and introducing a dynamic mask mechanism and a whole word mask strategy; embedding the electric power terminology library and knowledge graph information into the embedding layer of the BERT model; pre-training on electric power field corpus to adapt the BERT model to electric power text structure.

[0010] Further, the embedding layer comprises word embedding, block embedding and position embedding; wherein the word embedding is used to process electric power professional terms as independent units, the block embedding is used to encode the category or function to which the professional term belongs, and the position embedding is used to represent the absolute position of the professional term in the text.

[0011] As a further improvement of the above-mentioned scheme, in step S3, the design method comprises: defining a state space comprising text feature vectors output by the domain adaptation model, prediction confidence for samples and current iteration round information; define an action space, which includes an action of'selecting' or'rejecting' the predicted result of the current sample as a pseudo label; design a reward function, which calculates a reward value based on the performance improvement of the model on the validation set and the cost of manual correction; train the policy network using a proximal policy optimization algorithm.

[0012] Further, the calculation formula of the reward function is: In the formula, R is the reward function, ΔF 1 is the performance of the model on the validation set after the current iteration, F 1 value improvement, Cost is the cost of manually correcting the pseudo label, α and β is a weight parameter.

[0013] As a further improvement of the above scheme, in step S4, the construction and optimization method includes: S41, training a base domain adaptation model using labeled data, and constructing an initial knowledge representation; S42, using the current model to predict unlabeled data to obtain prediction results and confidence; S43, the policy network determines whether to add the prediction result as a pseudo label to the training set according to the features and confidence of the sample; S44, retraining the domain adaptation model using the updated training set; S45, evaluating the model performance on the validation set, and updating the policy network according to the evaluation result; S46, repeating steps S42 to S45 until a preset termination condition is met.

[0014] Further, the termination condition is that the value of the validation set F 1 value improvement is less than 1% or the number of iterations reaches a set value.

[0015] As a further improvement of the above scheme, the dynamic training set constructed by the dynamic construction method is used for entity recognition or information extraction tasks in the power field.

[0016] The application also provides a BERT and reinforcement learning-based power field training set dynamic construction system, which applies any of the above-mentioned BERT and reinforcement learning-based power field training set dynamic construction methods. The system comprises: a construction module for constructing a professional term library and a knowledge graph in the power field; a model obtaining module configured to adapt the BERT model to the power field by using the professional term library and the knowledge graph, and obtain a field-adapted model; a policy network module configured to generate a reinforcement learning-based policy network for dynamically selecting unannotated samples and generating pseudo labels; a construction and optimization module configured to dynamically construct and optimize a training set through an iterative process based on the field-adapted model and the policy network.

[0017] Compared with the prior art, the BERT and reinforcement learning-based power field training set dynamic construction method and system has the following beneficial effects: 1. The BERT and reinforcement learning-based power field training set dynamic construction method constructs a power term library and a knowledge graph, embeds them into a BERT model, enables the model to understand professional terms and knowledge structures in the power field, dynamically adjusts sample selection strategies according to model performance through a reinforcement learning policy network, balances exploration and utilization, improves the quality of pseudo label generation, captures the association between terms through knowledge graph embedding and multi-head attention mechanism, forms a more complete semantic representation of the power field, constructs a closed-loop optimization process for model training and sample selection, dynamically expands the training set through an iterative method, optimizes the BERT model and the reinforcement learning policy network, realizes the common improvement of the training set quality and the model performance, avoids manual annotation, can adaptively adjust sample selection, has low annotation cost, high model accuracy, and solves the technical problems of high annotation time and poor adaptability of existing training set construction methods.

[0018] 2. The BERT and reinforcement learning-based power field training set dynamic construction method can improve annotation efficiency. The method automatically generates pseudo labels through a reinforcement learning policy network, reducing the need for manual annotation. Experiments show that the annotation cost can be reduced by more than 40%, and the annotation time can be shortened by more than 30%.

[0019] 3. The BERT and reinforcement learning-based power field training set dynamic construction method can improve model performance. The BERT model that integrates power field knowledge performs well in entity recognition, information extraction, and other tasks. For example, in the power equipment defect detection task, the F1 value can reach 97%, which is more than 15% higher than traditional methods.

[0020] 4. The BERT and reinforcement learning-based power field training set dynamic construction method can optimize the quality of the training set. The dynamic sample selection mechanism of the method ensures the high quality of the pseudo labels and reduces the impact of noise data on the model. Experiments show that the accuracy of the pseudo labels can reach more than 95%, which is significantly higher than existing self-training methods.

[0021] 5. This method for dynamically constructing training sets in the power sector based on BERT and reinforcement learning enhances adaptability. The training set constructed by this method can adapt to new changes and scenarios in the power system, improving the model's generalization ability. When new types of faults occur in the power system, the model can adapt more quickly and identify them accurately.

[0022] 6. The dynamic construction system for training sets in the power field based on BERT and reinforcement learning has the same beneficial effects as the dynamic construction method described above, and will not be elaborated here. Attached Figure Description

[0023] Figure 1 This is a flowchart of the dynamic construction method for training sets in the power field based on BERT and reinforcement learning, according to Embodiment 1 of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0025] Example 1 The following problems exist with existing training set construction methods.

[0026] 1. The contradiction between annotation efficiency and cost. Traditional manual annotation is time-consuming and costly. If not addressed, it will lead to longer model training cycles and increased costs. After the State Grid Corporation's unstructured data management platform completed the integration of more than 100 business systems, manually annotating all the data required a large amount of manpower and resources, and the annotation cycle was long, making it difficult to meet the needs of real-time analysis.

[0027] 2. Insufficient data quality and weak model generalization ability. Power dispatch texts contain numerous technical terms and limited corpus data, making it difficult for models to accurately handle complex fault scenarios. In power dispatch text databases, entities such as organizational structures and equipment names appear infrequently and lack fine-grained descriptive information, making it difficult for models to accurately capture key information and impacting their performance in practical applications.

[0028] 3. Conflict between static data partitioning and dynamic optimization requirements. Traditional methods cannot adaptively adjust sample selection, affecting model performance in new scenarios. When new types of faults or faults caused by multiple factors occur in the power system, traditional static partitioning methods are difficult to adapt, leading to a decrease in model accuracy and failing to meet the requirements for safe and stable operation of the power system.

[0029] For the technical issues mentioned above, please refer to [link / reference]. Figure 1The embodiment provides a BERT and reinforcement learning based power field training set dynamic construction method. The dynamic training set constructed by the method can be used for entity recognition or information extraction tasks of power field texts. The method mainly includes four steps of power field term library and knowledge graph construction, BERT model power field adaptation, reinforcement learning strategy network design, and training set dynamic construction process. Each step is specifically as follows (i.e., steps S1-S4).

[0030] S1, constructing a professional term library and a knowledge graph in the power field. In the embodiment, the construction method includes: (1) extracting professional terms from power system related documents; (2) labeling and classifying the professional terms according to power professional vocabulary indexing rules to form a term library including device names, fault types and operation terms; (3) constructing a power field knowledge graph with devices, faults and operations as entities and their relationships.

[0031] Specifically, first, power system related documents including device manuals, fault reports and operation manuals are collected to extract professional terms. Second, the terms are labeled and classified using power professional vocabulary indexing rules to form a term library containing device names, fault types, operation terms and the like. Meanwhile, a power field knowledge graph is constructed, containing device, fault and operation entities and their relationships. Device entities include transformers, circuit breakers, disconnectors and the like, fault entities include short circuit, ground fault, overload and the like, and operation entities include switching, checking and maintenance and the like. Various relationships exist between these entities, such as a transformer may have an overload fault, a circuit breaker may be used to handle a short circuit fault and the like.

[0032] The implementation purpose of this step is to solve the problem of multiple professional terms and complex semantics in power texts and provide a basis for subsequent power field adaptation of BERT models.

[0033] S2: adapting the BERT model to the power field using the professional term library and the knowledge graph to obtain a field adaptation model and realize semantic understanding and feature extraction of power field texts. In the embodiment, the adaptation method includes: (1) model structure optimization: adopting a RoBERTa model structure and introducing a dynamic mask mechanism and a whole word mask strategy; (2) power information embedding: embedding power term library and knowledge graph information into the embedding layer of the BERT model; (3) multi-task pre-training: pre-training on power field corpus to adapt the BERT model to power text structure.

[0034] In the model structure optimization, RoBERTa model is used instead of traditional BERT, dynamic mask mechanism (data replication 10 times, randomly select 20% of the words for covering training) and full word mask strategy (such as "main variable" as a whole covering, not word by word covering) are introduced to improve the learning ability of the model to power professional vocabulary.

[0035] In the power information embedding, the embedding layer includes word embedding, block embedding and position embedding. Word embedding is used to process power professional terms as independent units, block embedding is used to encode the category or function to which the professional term belongs, and position embedding is used to represent the absolute position of the professional term in the text, avoiding semantic confusion of repeated terms in different positions.

[0036] In the multi-task pre-training, pre-training is performed on the power field corpus, including various mask mechanisms such as character mask, entity mask and segment mask, to improve the adaptability of the model to the complex structure of power text.

[0037] The implementation purpose of this step is to improve the understanding ability of BERT model to power field text, and to provide high quality text feature representation for subsequent reinforcement learning driven sample selection.

[0038] S3: Design a strategy network based on reinforcement learning to dynamically select unlabeled samples and generate pseudo labels. The design method includes: (1) define the state space, which includes the text feature vector output by the domain adaptation model (can be 768 dimensions), the prediction confidence of the sample and the current iteration round information; (2) define the action space, which includes the action of "selecting" or "rejecting" the prediction result of the current sample as a pseudo label, i.e. whether to add the prediction result of the current sample as a pseudo label to the training set; (3) design a reward function based on the performance improvement of the model on the validation set and the cost of manual correction to calculate the reward value; (4) use the proximal policy optimization algorithm to train the strategy network.

[0039] The calculation formula of the reward function is: In the formula, R is the reward function, ΔF 1 is the value of the model on the validation set after the current iteration, F 1 value improvement, Cost is the cost of manual correction of pseudo labels, α and β is the weight parameter, which is adjusted according to actual needs.

[0040] The implementation purpose of this step is to automatically learn the sample selection strategy through reinforcement learning, filter out high-quality pseudo label samples, reduce the demand for manual labeling, and at the same time ensure the quality of the training set.

[0041] S4: Based on the domain adaptation model and the strategy network, the training set is dynamically constructed and optimized through an iterative process to realize the collaborative optimization of the model and the data. In this embodiment, the construction and optimization method comprises: S41, training a basic domain adaptation model using the labeled data, and constructing an initial knowledge representation; S42, predicting the unlabeled data using the current model to obtain the prediction result and the confidence of each sample; S43, causing the strategy network to determine whether to add the prediction result as a pseudo-label to the training set according to the characteristics and the confidence of the sample; S44, retraining the domain adaptation model using the updated training set, that is, adding the selected pseudo-label sample to the training set; S45, evaluating the model performance on the validation set, and updating the strategy network according to the evaluation result; S46, repeating steps S42 to S45 until a preset termination condition is met. The termination condition can be that the value of the validation set F 1 is less than 1% or the number of iterations reaches a set value (10 times), to ensure the stability and effectiveness of the training process. When evaluating, calculate F 1 and the like as the input of the reward function.

[0042] The implementation purpose of this step is to construct a closed-loop optimization process, dynamically expand the training set through iteration, optimize the BERT model and the reinforcement learning strategy network, and realize the common improvement of the quality of the training set and the performance of the model.

[0043] The working principle of this embodiment is based on the collaborative optimization of deep learning and reinforcement learning, and the problem is solved through the following technical means: 1. Power domain knowledge fusion: by constructing a power terminology library and a knowledge graph, and embedding them into the embedding layer and the Transformer layer of the BERT model, the model can understand the professional terms and knowledge structure in the power domain. For example, “main transformer” is treated as a whole word, not split into “main” and “transformer”, to avoid semantic loss.

[0044] 2. Dynamic masking mechanism: the dynamic masking strategy of RoBERTa is adopted, 10 copies of the data are made, and 20% of the words in each copy are randomly selected for masking training to improve the model's ability to learn features of professional words from all angles. At the same time, the full-word masking strategy is combined to ensure the integrity of the professional terms.

[0045] 3. Reinforcement learning driven sample selection: the sample selection is modeled as a Markov decision process, the state includes BERT features and confidence, the action is a space, and the reward function is based on the performance improvement of the model. The PPO algorithm is used to optimize the strategy network to balance exploration and utilization, improve the quality of pseudo-label generation, automatically generate high-quality pseudo-labels, and reduce the demand for manual labeling.

[0046] In summary, compared with existing training set construction methods, the BERT and reinforcement learning-based power field training set dynamic construction method has the following beneficial effects: 1. The BERT and reinforcement learning-based power field training set dynamic construction method constructs a power terminology library and a knowledge graph, and embeds them into a BERT model, so that the model can understand professional terms and knowledge structures in the power field. Through a reinforcement learning strategy network, the sample selection strategy is dynamically adjusted according to the model performance, the exploration and utilization are balanced, and the quality of the pseudo-label generation is improved. This method not only processes power terms as independent units, but also captures the relationship between terms through knowledge graph embedding and multi-head attention mechanism to form a more complete semantic representation of the power field. This method constructs a closed-loop optimization process for model training and sample selection, dynamically expands the training set through iteration, optimizes the BERT model and the reinforcement learning strategy network, realizes the common improvement of the training set quality and the model performance, avoids manual annotation, and can adaptively adjust sample selection, with low annotation cost, high model accuracy, and solves the technical problems of high annotation time and poor adaptability of existing training set construction methods.

[0047] 2. The BERT and reinforcement learning-based power field training set dynamic construction method can improve the annotation efficiency. This method automatically generates pseudo-labels through a reinforcement learning strategy network, reducing the need for manual annotation. Experiments show that the annotation cost can be reduced by more than 40%, and the annotation time can be shortened by more than 30%.

[0048] 3. The BERT and reinforcement learning-based power field training set dynamic construction method can improve the model performance. The BERT model that integrates power field knowledge performs well in entity recognition, information extraction and other tasks. For example, in the power equipment defect detection task, the F1 value can reach 97%, which is more than 15% higher than traditional methods.

[0049] 4. The BERT and reinforcement learning-based power field training set dynamic construction method can optimize the quality of the training set. The dynamic sample selection mechanism of this method ensures the high quality of the pseudo-labels and reduces the impact of noisy data on the model. Experiments show that the accuracy of the pseudo-labels can reach more than 95%, which is significantly higher than existing self-training methods.

[0050] 5. The BERT and reinforcement learning-based power field training set dynamic construction method can enhance adaptability. The training set constructed by this method can adapt to new changes and new scenarios in the power system, improving the model's generalization ability. When new types of faults occur in the power system, the model can quickly adapt and accurately identify.

[0051] Embodiment 2 The embodiment provides a power field training set dynamic construction system based on BERT and reinforcement learning, and the system applies the power field training set dynamic construction method based on BERT and reinforcement learning in the embodiment 1. Wherein, the system comprises a construction module, a model acquisition module, a strategy network module and a construction and optimization module.

[0052] The construction module is used for constructing a professional term library and a knowledge graph in the power field. The model acquisition module is used for adapting the BERT model to the power field by using the professional term library and the knowledge graph, and obtaining a field adaptation model. The strategy network module is used for generating a strategy network based on reinforcement learning, so as to dynamically select unannotated samples and generate pseudo labels. The construction and optimization module is used for dynamically constructing and optimizing the training set through an iterative process based on the field adaptation model and the strategy network. Wherein, the effect of the power field training set dynamic construction system in the embodiment is the same as the effect of the power field training set dynamic construction method in the embodiment 1, and the embodiment will not be described repeatedly.

[0053] Embodiment 3 The embodiment provides a computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the power field training set dynamic construction method based on BERT and reinforcement learning in the embodiment 1 are implemented.

[0054] The method in the embodiment 1 can be applied in the form of software, such as being designed as a program running independently, and being installed on a computer terminal, which can be a computer, a smart phone, a control system and other Internet of Things devices. The method in the embodiment 1 can also be designed as an embedded program running, and being installed on a computer terminal, such as being installed on a single-chip microcomputer.

[0055] Embodiment 4 The embodiment provides a computer readable storage medium, which stores a computer program. When the program is executed by a processor, the steps of the power field training set dynamic construction method based on BERT and reinforcement learning in the embodiment 1 are implemented.

[0056] The method in the embodiment 1 can be applied in the form of software, such as being designed as a program running independently on a computer readable storage medium, which can be a U disk, and being designed as a U disk, and being designed as a program starting the whole method through external triggering by the U disk.

[0057] The above only describes the preferred embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for dynamically constructing training sets in the power industry based on BERT and reinforcement learning, characterized in that, It includes the following steps: S1: Construct a professional terminology database and knowledge graph for the power industry; S2: Use the terminology database and the knowledge graph to adapt the BERT model to the power domain to obtain a domain-adapted model; S3: Design a policy network based on reinforcement learning to dynamically select unlabeled samples and generate pseudo-labels; S4: Based on the domain adaptation model and the policy network, the training set is dynamically constructed and optimized through an iterative process.

2. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 1, characterized in that, In step S1, the construction method includes: Extract technical terms from power system-related documents; The professional terms are labeled and classified according to the power industry terminology index rules to form a terminology database that includes equipment names, fault types and operation terms; Construct a knowledge graph for the power sector, with equipment, faults, and operations as entities and their relationships.

3. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 1, characterized in that, In step S2, the adaptation method includes: The RoBERTa model structure is adopted, and a dynamic masking mechanism and a full-word masking strategy are introduced; The power terminology database and knowledge graph information are embedded into the embedding layer of the BERT model; The BERT model is pre-trained on a corpus of electricity-related texts to adapt it to the structure of electricity-related texts.

4. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 3, characterized in that, The embedding layer includes word embedding, block embedding, and position embedding; wherein, the word embedding is used to treat power industry terms as independent units, the block embedding is used to encode the category or function to which the term belongs, and the position embedding is used to represent the absolute position of the term in the text.

5. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 1, characterized in that, In step S3, the design method includes: Define a state space, which includes the text feature vector output by the domain adaptation model, the prediction confidence of the sample, and the information of the current iteration round; Define the action space, which includes the action of "selecting" or "rejecting" the prediction result of the current sample as a pseudo-label; Design a reward function that calculates the reward value based on the model's performance improvement on the validation set and the cost of manual correction. The policy network is trained using a proximal policy optimization algorithm.

6. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 5, characterized in that, The formula for calculating the reward function is as follows: In the formula, R For the reward function, ΔF 1 represents the model's performance on the validation set after the current iteration. F 1 value increase, Cost The cost of manually correcting fake labels, α and β These are the weight parameters.

7. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 1, characterized in that, In step S4, the construction and optimization method includes: S41. Use labeled data to train and obtain a basic domain-adaptive model, and construct an initial knowledge representation; S42. Use the current model to predict the unlabeled data and obtain the prediction results and confidence levels; S43. The policy network determines whether to add the prediction result as a pseudo-label to the training set based on the features and confidence of the sample. S44. Retrain the domain adaptation model using the updated training set; S45. Evaluate the model performance on the validation set and update the policy network based on the evaluation results; S46. Repeat steps S42 to S45 until the preset termination condition is met.

8. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 7, characterized in that, The termination condition is the verification set. F The value increases by less than 1% or the number of iterations reaches the set value.

9. The method for dynamically constructing training sets in the power field based on BERT and reinforcement learning as described in claim 1, characterized in that, The dynamic training set constructed by the aforementioned dynamic construction method is used for entity recognition or information extraction tasks in the power industry.

10. A dynamic training set construction system for the power industry based on BERT and reinforcement learning, characterized in that, Its application is the dynamic construction method for training sets in the power field based on BERT and reinforcement learning as described in any one of claims 1-9, wherein the system comprises: The building module is used to construct a terminology database and knowledge graph for the power industry. The model acquisition module is used to adapt the BERT model to the power domain using the terminology database and the knowledge graph to obtain a domain-adapted model. The policy network module is used to generate a reinforcement learning-based policy network for dynamically selecting unlabeled samples and generating pseudo-labels. A build and optimize module is used to dynamically build and optimize the training set through an iterative process based on the domain adaptation model and the policy network.

Citation Information

Cited By

  • Construction engineering cost data identification and standardization method and system

    CN121579583A