Railway work experience text high-precision entity identification method and device and electronic equipment
By constructing a railway-specific annotation system and a BERT-BiLSTM-CRF model, combined with hierarchical learning rate and early stop mechanism, the problem of low entity recognition accuracy in railway human resource management was solved, achieving high-precision named entity recognition and improving the entity recognition effect in the railway field.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-04-07
AI Technical Summary
In railway human resource management, the lack of a targeted annotation system and adaptation model in existing technologies leads to insufficient entity recognition accuracy. General models are poorly adapted to the railway field and are difficult to effectively identify entities that use railway professional terms and flexible expressions.
A railway-specific labeling system was constructed, and entity labels were defined using the BIO labeling method. The system was trained using the BERT-BiLSTM-CRF model, which employed a hierarchical learning rate strategy and an early stopping mechanism. A railway rank mapping rule base and dynamic label smoothing were introduced to optimize the model parameters.
It significantly improves the accuracy of named entity recognition in the railway field, achieving an F1 score of 98%, solving the problems of low entity recognition accuracy and poor adaptability of general models, and providing high-precision entity recognition support for railway human resource management.
Smart Images

Figure CN121093959B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of natural language processing and human resource management technology, in particular to a railway work experience text high-precision entity recognition method, device and electronic equipment. BACKGROUND
[0002] In the huge human resource management system of the railway industry, personnel work experience text is the core carrier for recording the professional history of employees. The traditional management mode relies on manual reading and analysis of text data, which has the problems of low efficiency and easy omission. With the development of natural language processing (NLP) technology, named entity recognition (NER) has become a key basic task for automatic analysis, and its goal is to identify structured entities such as "time", "post", "job level" from text.
[0003] Early NER research is mainly based on traditional methods such as rule matching, hidden Markov model (HMM) and conditional random field (CRF), but it has significant limitations in the railway field: the rules are complicated and rely on manual feature engineering, and have insufficient generalization ability for railway professional terms (such as "regular level" and "signal worker") and flexible expressions (such as "chief researcher / assistant chief researcher"). Although pre-trained language models (such as BERT) have improved text understanding ability through a bidirectional Transformer architecture and have made progress in medical and general field NER (such as Contractor Danish optimizing multi-sentence entity search and Pooja H applying to medical NER), but due to the professional nature and special nature of the text in the field of railway human resources (containing railway exclusive unit names, job terms and job level expression variants), existing general models are difficult to directly apply.
[0004] There are two gaps in existing research: first, the railway field lacks targeted annotation system and adaptive model, although there has been some exploration in the application of personnel archives NLP, but it has not solved the problem of entity recognition in railway text; second, the existing method has insufficient recognition accuracy in the railway scene, and the coverage of entities such as "job level" and "department" is not complete. Therefore, it is urgent to develop high-precision NER technology for railway work experience text to improve the efficiency of human resource management. SUMMARY
[0005] Therefore, it is necessary to provide a railway work experience text high-precision entity recognition method, device and electronic equipment to solve the problems of lack of targeted annotation system and adaptive model in the railway field, and insufficient recognition accuracy and incomplete entity coverage of the existing method in the railway scene.
[0006] The railway work experience text high-precision entity recognition method provided by the present application comprises:
[0007] A special annotation system is constructed based on the characteristics of the railway human resource field, a BIO annotation method is used to define entity labels, including work experience start time, work experience end time, unit and department, position, job level, and non-entities;
[0008] A railway worker work experience text data set is obtained, and manual annotation is performed according to the annotation system;
[0009] A named entity recognition model is trained using the annotated data set, the named entity recognition model is based on a BERT-BiLSTM-CRF model composed of a BERT model, a BiLSTM network and a CRF network, the model parameters are fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism is introduced to obtain, wherein the learning rate of the BERT layer is less than the learning rate of the BiLSTM layer and the CRF layer;
[0010] The text to be recognized is input into the named entity recognition model, and a named entity annotation sequence is output.
[0011] In one of the embodiments, the railway worker work experience text data set is obtained, including:
[0012] Collecting a plurality of original railway human resource text data, desensitizing, obfuscating and exporting;
[0013] Data cleaning operation is performed to remove duplicate data, correct spelling and grammar errors, process special characters and format problems, and filter invalid data;
[0014] The data is divided into a training data set, a validation data set and an evaluation data set, and the proportion is 4:1:1.
[0015] In one of the embodiments, the railway worker work experience text data set is obtained, and then further includes:
[0016] The text data set is preprocessed, including:
[0017] The desensitized text data is collected, and the annotation data set is generated by manual annotation and cross-audit according to the annotation system;
[0018] BertTokenizerFast based on word segmentation is used for word segmentation processing, wherein spaces are ignored and consecutive numbers are treated as whole words.
[0019] In one of the embodiments, the annotation data set is generated by manual annotation and cross-audit according to the annotation system, including:
[0020] Annotation personnel training ensures familiarity with entity type definition and annotation specifications;
[0021] After initial annotation, cross-audit is performed, and different annotators modify errors;
[0022] Conduct consistency checks to unify ambiguous annotations from multiple personnel;
[0023] High-quality labeled datasets were reviewed and confirmed.
[0024] In one embodiment, the step of using BertTokenizerFast for word segmentation, where spaces are ignored and consecutive digits are treated as whole words, includes:
[0025] Based on the character-based word segmentation method, each Chinese character is treated as an independent unit;
[0026] Consecutive numbers and English words are treated as whole words;
[0027] Ignore spaces as word separators.
[0028] In one embodiment, the step of employing a hierarchical learning rate strategy to fine-tune model parameters and introducing an early stopping mechanism includes:
[0029] Set the learning rate of BERT layer to 1e-5, the learning rate of BiLSTM layer to 1e-3, and the learning rate of CRF layer to 1e-3;
[0030] Training is terminated and the optimal model parameters are saved when the loss does not improve after N consecutive training rounds.
[0031] In one embodiment, the method further includes evaluating the named entity recognition model, specifically including:
[0032] Use precision, recall, and F1 score as evaluation metrics;
[0033] The F1 score for each entity type was calculated on the evaluation dataset, with an average F1 score of 98%. The entity types include the start time of work experience, the end time of work experience, the employer and department, and the job title and rank.
[0034] The present invention also provides a high-precision entity recognition device for railway work experience text, the device comprising:
[0035] The annotation system construction module is used to build a dedicated annotation system based on the characteristics of the railway human resources field. It uses the BIO annotation method to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0036] The dataset annotation module is used to obtain a text dataset of railway employees' work experience and manually annotate it according to the annotation system.
[0037] The model training module is used to train a named entity recognition model using a labeled dataset. The named entity recognition model is based on a BERT-BiLSTM-CRF model composed of a BERT model, a BiLSTM network, and a CRF network. The model parameters are fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism is introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer.
[0038] The annotation sequence output module is used to input the text to be recognized into the named entity recognition model and output a named entity annotation sequence.
[0039] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the high-precision entity recognition method for railway work experience text as described above.
[0040] The aforementioned high-precision entity recognition method, device, and electronic equipment for railway work experience text addresses the shortcomings of existing technologies in terms of entity coverage, such as insufficient coverage of domain terminology and expression variations, by constructing a railway-specific annotation system (defining entity labels specific to railway positions, departments, etc.), ensuring that entity definitions align with the needs of railway human resource management. The BERT-BiLSTM-CRF combined architecture leverages the contextual semantic understanding capabilities of BERT, the sequence dependency capture capabilities of BiLSTM, and the label transfer constraint capabilities of CRF to significantly improve the accuracy of complex entity recognition. Furthermore, a hierarchical learning rate strategy is employed to differentiate the optimization of BERT (low learning rate to prevent overfitting) and BiLSTM / CRF (high learning rate to accelerate convergence), and an early stopping mechanism terminates training when the validation loss stalls, avoiding ineffective iterations and improving training efficiency. Ultimately, a 98% F1 score is achieved on a railway domain test set, effectively solving the two major technical problems of low entity recognition accuracy in the railway domain and poor domain adaptability of general models in existing technologies, providing high-precision entity recognition support for railway human resource management. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 A flowchart of a high-precision entity recognition method for railway work experience text, as an example;
[0043] Figure 2 A diagram illustrating Label Studio;
[0044] Figure 3 The input diagram for BERT is shown.
[0045] Figure 4 Diagram of BERT's pre-training and fine-tuning architecture;
[0046] Figure 5 Diagram of the BiLSTM-CRF model architecture;
[0047] Figure 6 This is a diagram of the BERT-BiLSTM-CRF model architecture.
[0048] Figure 7 A graph showing the total loss of the BERT-BiLSTM-CRF model during multiple rounds of batch training;
[0049] Figure 8 A graph showing the total training loss of the BERT-BiLSTM-CRF model across training rounds;
[0050] Figure 9 A graph showing the total loss of batch validation over multiple rounds for the BERT-BiLSTM-CRF model;
[0051] Figure 10 Average loss plot for BERT-BiLSTM-CRF model validation rounds;
[0052] Figure 11 A diagram of the model application architecture;
[0053] Figure 12 A schematic diagram of a high-precision entity recognition device for railway work experience text, as an example;
[0054] Figure 13 This is an internal structural diagram of a computer device according to one embodiment. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] In the vast human resource management system of the railway industry, employee work experience documents are a crucial carrier for recording key data such as employees' work experience and skills. Traditional railway human resource management models require summarizing and organizing large amounts of relevant employee work experience documents at key business nodes such as talent selection, utilization, development, and retention to provide support for related decision-making. In the past, processing these experience documents mainly relied on manual review and analysis, which was inefficient and prone to omissions. With the rapid development of information technology, utilizing Natural Language Processing (NLP) technology to automate the analysis and key information extraction of work experience documents has become an urgent need to improve the efficiency of human resource management and the scientific nature of decision-making.
[0057] Named entity recognition (NAME) of work experience text elements—that is, accurately identifying various meaningful entities from experience texts, such as the start and end dates of work experience, job positions (titles), and job levels—is the foundation and key step in achieving automated work experience analysis. Accurate NAME recognition provides precise data support for subsequent human resource management work such as talent screening, job matching, and employee training and development. It helps railway companies fully tap into their internal human resource potential, optimize human resource allocation, and improve overall operational efficiency and competitiveness.
[0058] In the field of natural language processing, named entity recognition (NER) is a fundamental and important task. Early NER research mainly relied on rule-based and statistical methods, such as dictionary-based and rule-matching methods, Hidden Markov Models (HMMs), and Conditional Random Fields (CRFs). These methods have achieved certain results in specific domains or on small-scale datasets, but they suffer from problems such as cumbersome rule formulation, reliance on manual feature engineering, and poor generalization ability.
[0059] With the emergence of pre-trained language models such as ELMo, GPT, and BERT, the performance of NER has been greatly improved. The proposed BERT (Bidirectional Encoder Representations from Transformers) model, through a bidirectional Transformer architecture and a masked language model (MLM), can capture rich contextual information in text, achieving a deeper understanding of text.
[0060] In the field of human resources, related research has also emerged. For example, OCR and NLP technologies have been attempted in the analysis of hospital personnel files, and the acquisition of entity semantics has been discussed in the construction of organizational personnel file cloud platforms. However, due to the professionalism and special nature of the railway human resources field, the work experience texts of personnel have unique linguistic styles and domain knowledge, making it difficult to directly apply existing research results. Currently, there is relatively little research on named entity recognition of elements in the large amount of personnel work experience text data held in the railway human resources system, and the existing research suffers from problems such as low recognition accuracy and insufficient coverage of specific entity types in the railway field. Therefore, conducting research on named entity recognition technology for railway human resources personnel work experience texts has significant theoretical and practical implications.
[0061] This invention combines BERT with other deep learning models, using BERT, BiLSTM, and CRF to further enhance the performance of NER. BiLSTM (Bidirectional Long Short-Term Memory Network) can process sequence data from both directions, better capturing long-term dependencies in text; CRF can consider dependencies between adjacent labels in sequence labeling tasks, improving labeling accuracy.
[0062] The following is combined with Figures 1-13 This invention describes a method, apparatus, and electronic device for high-precision entity recognition of railway work experience text.
[0063] like Figure 1 As shown, in one embodiment, a high-precision entity recognition method for railway work experience text includes the following steps:
[0064] Step S110: Construct a dedicated labeling system based on the characteristics of the railway human resources field, and use the BIO labeling method to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0065] Based on the professional terminology, standardized format, and flexible expression characteristics of railway human resources work experience documents, the BIO annotation method is adopted to define six types of entity tags, including: work experience start time (B-begintime / I-begintime), work experience end time (B-endtime / I-endtime), unit and department (B-unit / I-unit), position (B-title / I-title), job level (B-level / I-level), and non-entity (O). By defining six types of entity tags for work experience start and end time, unit and department, position, and job level, the method accurately covers entity types unique to railway human resources (such as domain entities that cannot be recognized by general models, such as "co-driver of high-speed trains" and "technical department of railway bureau group"). The BIO annotation method is used to resolve ambiguity issues in entity boundaries (for example, "Beijing Railway Bureau Group Company" is treated as a single unit entity, rather than two entities: "Beijing" + "Bureau Group").
[0066] Step S120: Obtain the text dataset of railway employees' work experience and manually annotate it according to the annotation system. Manual annotation ensures the accurate annotation of special expressions in the railway field (such as treating "locomotive depot operation workshop" as a whole department entity to avoid segmentation errors in automatic annotation), provides a channel for injecting domain knowledge into the model (annotators determine that "senior engineer" belongs to a rank rather than a position based on the railway job level system), thereby ensuring the supply of high-quality training samples, transforming the special annotation system into actual training data, and forming a closed loop of "domain knowledge - annotation rules - training samples".
[0067] A number of raw railway human resources text data entries (e.g., 3000) were collected, anonymized, obfuscated, and exported. Data cleaning was then performed to remove duplicates, correct spelling and grammar errors, handle special characters and formatting issues, and filter invalid data. The data was then divided into training, validation, and evaluation datasets in a 4:1:1 ratio. The training dataset contained 2000 entries, the validation dataset 500 entries, and the evaluation dataset 500 entries. Data cleaning and partitioning strategies reduced noise and improved dataset consistency. This enhanced the model's generalization ability, helping to address the problem of insufficient recognition accuracy in the railway field, and significantly reduced validation set loss.
[0068] After obtaining the work experience text dataset, the dataset underwent preprocessing. First, anonymized text data was collected and, according to the annotation system, a labeled dataset was generated through manual annotation and cross-review. This included: training annotators to ensure familiarity with entity type definitions and annotation specifications; cross-review after initial annotation, with different annotators correcting errors; consistency checks to unify ambiguities in annotations from multiple personnel; and final verification to confirm a high-quality labeled dataset. This structured annotation process (cross-review and consistency checks) ensured the accuracy of the labeled data, directly addressing the problems of cumbersome rule formulation and poor generalization ability, improving the model's F1 score for entity recognition in railway texts to 98%. Second, BertTokenizerFast, a character-based word segmentation method, was used for word segmentation. Spaces were ignored, and consecutive numbers were treated as whole words. The Bert_Base_Chinese pre-trained model was loaded using BertTokenizerFast. Specifically, the segmentation method used characters, treating each Chinese character as an independent unit; consecutive numbers and English words were treated as whole words; and spaces were ignored as segmentation markers. This character-based segmentation method avoids segmentation errors (such as treating consecutive numbers as whole words) and is particularly suitable for railway terminology (such as "signal worker"). This helps to solve the problem of poor adaptability of general models and improve the entity recognition recall rate to 98%.
[0069] Step S130: Train a named entity recognition model using a labeled dataset. The named entity recognition model is based on a BERT-BiLSTM-CRF model composed of a BERT model, a BiLSTM network, and a CRF network. A hierarchical learning rate strategy is used to fine-tune the model parameters, and an early-stop mechanism is introduced during training. The learning rate of the BERT layer is lower than that of the BiLSTM and CRF layers. The BERT layer understands the deep semantics of railway text (e.g., "serving" in "serving as a high-speed train driver" implies a job title), the BiLSTM layer captures long-distance contextual dependencies (e.g., the association between time and unit in "2010~2015 Beijing Railway Locomotive Depot"), and the CRF layer constrains the legality of the label sequence (avoiding illegal sequences such as "rank" appearing before "time").
[0070] When training the named entity recognition model, a hierarchical learning rate strategy is adopted to fine-tune the model: the learning rate of the BERT layer is 1e-5, the learning rate of the BiLSTM layer is 1e-3, the learning rate of the CRF layer is 1e-3, the learning rate of the ERT layer is low to protect the pre-trained semantic knowledge and prevent domain fine-tuning from destroying general language understanding, and the learning rate of the BiLSTM / CRF layers is high to quickly converge to domain-specific patterns (such as the railway job sequence "trainee → assistant engineer → engineer"). An early stopping mechanism is introduced: when the validation loss has not improved for N consecutive training rounds (such as 3), training is terminated and the optimal model parameters are saved. Training is terminated based on the validation loss to prevent overfitting. The training parameters include a maximum input length of 300, a batch size of 16, a stacked number of BiLSTM layers of 2, and a hidden layer dimension of 256. Layered learning rates (BERT's low learning rate prevents overfitting, while BiLSTM / CRF's high learning rate accelerates convergence) and early stopping mechanisms optimize training efficiency, helping to solve the problem of ineffective model training iterations, enabling rapid convergence of validation loss, and jointly addressing the issues of "high sequence labeling error rate" (BiLSTM-CRF constrains label transfer) and "semantic understanding bias" (BERT fine-tuning).
[0071] Step S140: Input the text to be recognized into the named entity recognition model and output a named entity annotation sequence. Input the text of the railway employee's work experience to be recognized into the trained model and output an annotated named entity sequence. This achieves an end-to-end application loop. For example, input the original text (e.g., "2015-2018 served as assistant engineer at the Nanchang Railway Bureau Group Vehicle Depot") and directly output the structured tag sequence: [2015 / B-TIME, 2018 / I-TIME, Nanchang Railway Bureau Group / B-ORG, Vehicle Depot / I-ORG, Assistant Engineer / B-TITLE].
[0072] This embodiment of the high-precision entity recognition method for railway work experience text addresses the shortcomings of existing technologies in terms of entity coverage, such as insufficient coverage of domain terminology and expression variations, by constructing a railway-specific annotation system (defining entity labels specific to railways, such as job titles and departments). This ensures that entity definitions align with the needs of railway human resource management. The BERT-BiLSTM-CRF combined architecture leverages the contextual semantic understanding capabilities of BERT, the sequence dependency capture capabilities of BiLSTM, and the label transfer constraint capabilities of CRF to significantly improve the accuracy of complex entity recognition. Furthermore, a hierarchical learning rate strategy is employed to differentiate the optimization of BERT (low learning rate to prevent overfitting) and BiLSTM / CRF (high learning rate to accelerate convergence), and an early stopping mechanism terminates training when the validation loss stalls, avoiding ineffective iterations and improving training efficiency. Ultimately, a 98% F1 score is achieved on the railway domain test set, effectively solving the two major technical problems of low entity recognition accuracy in the railway domain and poor domain adaptability of general models in existing technologies, providing high-precision entity recognition support for railway human resource management.
[0073] Furthermore, the high-precision entity recognition method for railway work experience text of the present invention also includes the evaluation of the named entity recognition model, specifically including: using accuracy, recall, and F1 score as evaluation indicators; calculating the F1 score for each entity type on the evaluation dataset, with an average F1 score of 98%, wherein the entity types include work experience start time, work experience end time, employing unit and department, and job title and rank. Comprehensive evaluation indicators (F1 score, accuracy, and recall) verify the model's high accuracy (average F1 score of 98%), which is superior to traditional models. This helps solve the core problem of low entity recognition accuracy in the railway field and supports practical applications such as talent assessment.
[0074] In one embodiment, during the training of the BERT-BiLSTM-CRF model, a railway domain knowledge enhancement module is introduced, including: constructing a railway rank mapping rule base, storing equivalent mapping relationships for rank representation variants, such as mapping "deputy director level" to "deputy director level treatment" and mapping "chief clerk" to "appointed chief clerk"; connecting a rule injection layer to the output of the BiLSTM layer, configured to generate a rule embedding vector when the entity type label is a rank entity. in Equivalent representation rules retrieved from the rule base; an attention mechanism is used to calculate the rule weight coefficients. ,in This is the output vector of the BiLSTM layer. and For trainable parameters, Use the Sigmoid activation function; outputs enhanced feature vectors. ; will enhance feature vectors The input is fed into the CRF layer for label sequence decoding. By introducing a railway rank mapping rule base (storing equivalence relations of expressions such as "deputy director level / deputy director treatment") and a rule injection layer, the model's recognition accuracy for railway-specific expressions is significantly improved. Specifically, this is reflected in:
[0075] Resolving semantic ambiguity: Addressing the problem of insufficient recognition of variations in railway job title descriptions (such as "deputy director level / deputy director treatment"), rule embedding vectors. With attention weight The synergistic effect of these factors enables the model to accurately distinguish equivalent representations. The F1 score for level entities reaches 100%, an improvement of 5 percentage points compared to the baseline model without this mechanism.
[0076] Enhancing domain generalization: through trainable parameters The influence of rules is dynamically adjusted, and the model adaptively learns the differences in the descriptions of railway administrative positions ("department-level") and technical positions ("senior engineer"). In actual deployment, the job matching accuracy has improved by 35%, helping to solve the pain point of poor adaptability of general models.
[0077] Before performing label transition probability calculation at the CRF layer, dynamic label smoothing is implemented, specifically including:
[0078] The entity density detection unit is configured to calculate the entity distribution density of the input sequence. ,in
[0079] For the number of entity tags, For sequence length; smoothing intensity adaptive unit, configured as: when When <0.2, set the label smoothing intensity. =0.3, when Set the label smoothing strength when ≥0.2. =0.1; Loss function reconstruction unit, configured to: construct KL regularization term ,in, The number of positions in the sequence. For the first Smoothness label distribution of each location label Indicate the parameter distribution with equal probability for all labels; generate the reconstructed CRF loss function. ,in, This represents the standard negative log-likelihood loss term. Represents a given input sequence (Railway work experience text), predict tag sequence Conditional probabilities (such as B-begintime, I-unit, etc.).
[0080] Based on entity density The adaptive smoothing strategy overcomes two major challenges in railway work experience texts: blurred entity boundaries and imbalanced sample distribution.
[0081] Optimize boundary recognition: Addressing the segmentation challenges of time entities "2010.03~2010.04", density threshold... Strong smoothing is activated when the value is less than 0.2. =0.3), which makes the F1 value of begintime / endtime entities reach 100%, reducing the error rate by 42% compared to the standard CRF.
[0082] Correcting training bias: using KL regularization. Constraining non-entity labels addresses CRF shift bias caused by sample imbalance. (Refer to...) Figure 10After the loss function is reconstructed, the model stops early in the 5th round, saving 10 iterations compared to traditional training.
[0083] This embodiment eliminates ambiguity in job title descriptions by introducing a railway-specific knowledge enhancement module, overcomes temporal entity boundary segmentation through dynamic label smoothing, and collaboratively achieves an average F1 score of 98%, surpassing the traditional NER benchmark (85%-95%). Furthermore, it integrates a railway rule base with an attention mechanism and employs a density-adaptive smoothing strategy, forming an industry-leading NER solution for the railway sector.
[0084] In one embodiment, the present invention constructs an efficient and accurate named entity recognition system for textual elements of railway human resources personnel's work experience based on the BERT-BiLSTM-CRF model. This system can automatically and accurately identify various key entities from the textual data of railway employees' work experience, providing data support for intelligent decision-making in railway human resources management.
[0085] 1. Research Design
[0086] 1.1. Construction of a Textual Analysis and Annotation System for Railway Human Resources Work Experience
[0087] 1.1.1. Analysis of the characteristics of work experience documents
[0088] The work experience documents of railway human resources personnel have the following characteristics:
[0089] (1) Highly specialized: The text contains a large number of professional terms related to the railway industry, such as the names of railway units (Beijing Railway Bureau, Beijing-Shanghai Railway Company, etc.) and railway job types (train driver, signalman, track worker, etc.).
[0090] (2) The format is relatively uniform: Since the work experience of railway personnel mainly comes from the railway organization and personnel management information system and the railway employee management system, the input format is relatively uniform and standardized due to the requirements of management standards. However, there are slight differences in the implementation and understanding of the standards among different units or departments.
[0091] (3) Flexible language expression: For the same type of information, there may be multiple different ways of expressing it due to historical reasons and issues of normative understanding. For example, "chief clerk" and "appointed chief clerk" can both be used to express appointment information; "deputy division level" and "deputy division level treatment" can both be used to describe the personnel's rank.
[0092] 2.1.2. Labeling System Design
[0093] By statistically analyzing standard work experience data (e.g., "2010.03-2010.07 Director of XX Department of Beijing Railway Bureau (at the level of a division chief)"), this study summarizes the actual needs for data analysis in railway human resource management and the characteristics of work experience texts. A BIO annotation system is established using the BIO annotation method (i.e., the starting position of each entity is marked as "B-entity type", the position inside the entity is marked as "I-entity type", and non-entity positions are marked as "O"). The main entity types are defined, as shown in Table 1: Work Experience BIO Annotation System.
[0094]
[0095] Table 1
[0096] For example, for the text "2010.03-2010.04 Director of XX Department of Beijing Railway Bureau (at the level of a division chief)", when the word segmentation strategy adopts the strategies of "ignore spaces", "continuous numbers", and "single Chinese characters", the index value of its annotation result is represented as: "1,2,2,0,3,4,4,5,6,6,6,6,6,6,6,7,8,0,9,10,0".
[0097] 5, 6, 6, 6, 6, 6, 6, 7, 8, 0, 9, 10, 0.
[0098] 1.1.3. Training and Validation Dataset Acquisition and Preprocessing
[0099] To obtain a sufficient quantity and high quality of textual data on the work experience of railway human resources personnel, historical data from the railway employee management information system was anonymized, obfuscated, exported, and cleaned. A total of 3,000 original textual data entries on the work experience of railway human resources personnel were collected, providing rich data resources for subsequent research.
[0100] The original collected work experience text data contained various noises and non-standard information, necessitating data cleaning to improve data quality. The main operations of data cleaning included: removing duplicate data, correcting spelling and grammatical errors, handling special characters and formatting issues, and filtering invalid data. After data cleaning, the quality and consistency of the dataset were effectively improved, providing more reliable data for subsequent data annotation and model training.
[0101] 1.1.4. Design of Matching Word Segmentation Characteristics and Tagging System
[0102] In Chinese natural language processing, word segmentation is the process of dividing a continuous text sequence into individual words or character units. To simplify the mapping procedure for word vector correspondences, the Bert_Base_Chinesesa pre-trained model was loaded using BertTokenizerFast. This model is characterized by its character-based segmentation approach, treating each Chinese character as an independent unit. This is because character-based segmentation avoids the impact of segmentation errors on named entity recognition, making it particularly suitable for handling situations in the railway industry where there are numerous technical terms and out-of-vocabulary words. Furthermore, it treats consecutive numbers and English words as whole words, ignoring spaces as segmentation characters. Therefore, spaces should be ignored during the preprocessing and annotation of the original dataset.
[0103] 1.1.5. BIO annotation
[0104] Choose Label Studio, a professional text annotation tool, to annotate the work experience texts of railway human resources personnel. (See also...) Figure 2 .
[0105] To further regulate the annotation process and improve annotation quality, the project specifies the following annotation workflow:
[0106] (1) Training for annotation personnel: Provide detailed training to the personnel involved in annotation, so that they are familiar with the annotation system, entity type definition, annotation specifications and the use of annotation tools. Through explaining sample texts, conducting annotation exercises and answering questions, ensure that the annotation personnel can accurately understand and perform annotation tasks.
[0107] (2) Initial annotation: Annotators use annotation tools to annotate the work experience text sentence by sentence according to the annotation specifications, marking the starting position and type of various entities.
[0108] (3) Cross-review: After the initial annotation is completed, different annotators are assigned to conduct cross-review. The annotators carefully check the annotation results and make corrections and explanations for any annotation errors, non-standard practices or ambiguities.
[0109] (4) Consistency check: The project leader shall conduct a consistency check on the labeled data to ensure that different labelers maintain consistency in labeling the same type of entities. For any inconsistencies found, the labelers shall be organized to discuss and make unified modifications.
[0110] (5) Final review and confirmation: After cross-review and consistency check, the labeled data undergoes a final review. The data that passes the review is used as a high-quality labeled dataset for subsequent model training and evaluation.
[0111] Through rigorous annotation processes and quality control measures, the accuracy and reliability of the labeled dataset were ensured, providing a solid data foundation for subsequent model training.
[0112] 1.2. Model Co-operation Architecture Construction
[0113] 1.2.1. BERT Model
[0114] BERT is a pre-trained language model whose core innovation lies in its bidirectional Transformer encoder structure. This structure allows for feature extraction by simultaneously utilizing contextual information within the text, effectively overcoming the limitation of traditional language models that can only process text unidirectionally. See also... Figure 3 and Figure 4 During the pre-training phase, BERT is trained on large-scale unsupervised text data through two tasks: Masked Language Model (MLM) and Next Sentence Prediction (NSP), learning rich linguistic knowledge and semantic representations. BERT is input into a pair of unlabeled sentences A and B during pre-training, and the Masked Language Model (MLM) is used to predict the next sentence. Figure 4 The BERT model learns contextual semantics through tasks labeled Mask LM (Mean Masked Learning) and Next Sentence Prediction (NSP). MLM randomly masks parts of the input words, forcing the model to predict missing words from a two-way context, overcoming the limitations of traditional one-way models. NSP enhances cross-sentence reasoning capabilities by judging the coherence of sentence pairs. The pre-trained model can be fine-tuned in real-world applications such as Question Answering (SQuAD), Natural Language Inference (MNLI), and Named Entity Recognition (NER). For question answering fine-tuning, a question pair and content containing answer information can be input for training. The final output is the location of the answer within the content containing the answer (Start / End Span). BERT input embeddings are the sum of labeled embeddings, segmented embeddings, and positional embeddings. In downstream applications, fine-tuning based on the pre-trained model allows for rapid adaptation to various natural language processing tasks. The overall pre-training and fine-tuning process of BERT uses the same architecture for both pre-training and fine-tuning, except for the output layer. The same pre-trained model parameters are used to initialize models for different downstream tasks. During fine-tuning, all parameters are adjusted. [CLS] is a special symbol added before each input example, and [SEP] is a special separator mark (e.g., separating question / answer).
[0115] 1.2.2. BiLSTM-CRF Model
[0116] BiLSTM is an extension of Long Short-Term Memory (LSTM) networks, consisting of a forward LSTM and a backward LSTM. By introducing forget gates, input gates, and output gates, LSTM effectively addresses the vanishing and exploding gradient problems found in traditional Recurrent Neural Networks (RNNs), thus better capturing long-term dependencies in sequential data. BiLSTM processes the input sequence in two directions: the forward LSTM processes the input at each time step sequentially from the beginning of the sequence, while the backward LSTM processes it in reverse order from the end of the sequence. By concatenating the outputs of the forward and backward LSTMs, BiLSTM can obtain more comprehensive contextual information, providing richer feature representations for subsequent tasks.
[0117] Conditional Random Fields (CRFs) are probabilistic graphical models for sequence labeling. They predict the label for each position based on global information about the entire sequence. In named entity recognition tasks, CRFs can leverage the dependencies between adjacent labels; for example, the presence of an entity label often influences the probability of labels in its preceding and following positions, thus improving labeling accuracy. CRFs calculate the probability of the entire label sequence by defining a potential function. Linear chain CRFs are commonly used, and their potential function typically consists of transition features and state features. During decoding, the Viterbi algorithm is usually used to find the label sequence with the highest probability, i.e., the optimal label sequence.
[0118] Combining LSTM and CRF networks forms the LSTM-CRF model BiLSTM-CRF, see [link / reference]. Figure 5 .
[0119] 1.2.3. BERT-BiLSTM-CRF Model Architecture
[0120] The BERT-BiLSTM-CRF model architecture combines the advantages of the three models mentioned above. (See also...) Figure 6 First, the input text describing the work experience of railway human resources personnel is encoded using a BERT model, which outputs word vectors rich in contextual information. These word vectors are then fed into a BiLSTM layer, which further extracts forward and backward dependencies in the text sequence to enhance the feature representation. Finally, the output of the BiLSTM is fed into a CRF layer, which considers the transition probabilities between labels and outputs the optimal entity label sequence. This model architecture fully leverages BERT's powerful semantic understanding capabilities, BiLSTM's ability to model sequence information, and CRF's global optimization capability for label sequences, thereby improving the accuracy of named entity recognition in text describing the work experience of railway human resources personnel.
[0121] 1.3. Model Training
[0122] Although the BERT model is pre-trained on large-scale unsupervised text data, this data is often general in nature and lacks the specific knowledge and language patterns of the railway industry. Therefore, directly using the pre-trained BERT model for named entity recognition of textual elements related to the work experience of railway human resources personnel may not achieve ideal results. Through fine-tuning, the model can be further trained on labeled datasets in the railway domain, adjusting its parameters to better adapt to the textual characteristics of the railway industry and the named entity recognition task.
[0123] 1.3.1. Training Strategy
[0124] (1) Adjusting the learning rate: A strategy of dynamically adjusting the learning rate is adopted. First, the initial learning rates of different models are distinguished, and different initial learning rates are set for BERT, BiLSTM and CRF.
[0125] (2) Multiple training iterations: The training dataset is traversed multiple times to enable the model to quickly adapt to text in the railway field.
[0126] (3) Early stopping: After each training iteration, evaluate the model’s performance on the validation set and adjust the training strategy based on the evaluation results to avoid ineffective training.
[0127] 1.3.2. Training Process
[0128] (1) Data partitioning: The preprocessed labeled dataset is divided into a training dataset, a validation dataset, and an evaluation dataset in a ratio of [4:1:1]. The training dataset is used for training the model, the validation dataset is used to adjust the model's hyperparameters and monitor the training process, and the evaluation dataset is used to evaluate the model's final performance.
[0129] During training, a data loader was used to load the three datasets into memory, and an appropriate batch size was set. The size of the training, evaluation, and validation data in this project is shown in Table 2: Number of Training Data.
[0130]
[0131] Table 2
[0132] (2) Model initialization: Load the pre-trained BERT model and load the corresponding word segmenter as needed, and initialize the parameters of each layer. The main training parameters of BERT, BiLSTM and CRF layers are shown in Table 3: BERT-BiLSTM-CRF training parameters.
[0133]
[0134] Table 3
[0135] (3) Training Cycle: In each training batch, the input text and corresponding labels are input into the model, and the model's loss value is calculated. The Adam optimizer is used to update the model parameters based on the loss value, as shown in Table 4: Adam Optimizer Parameters. After each training cycle, the model's performance is evaluated on the validation set, and the validation set loss value and evaluation metrics (such as accuracy, recall, F1 score, etc.) are recorded. The log-likelihood loss function of the CRF layer is used as the training objective function. The learning rate of the optimizer is specified separately according to the training characteristics of different models.
[0136]
[0137] Table 4
[0138] In each training epoch, each batch of the training set is iterated. Gradients are first zeroed out, then the input text and corresponding labels are fed into the model. The loss value is calculated, and backpropagation is called to calculate the gradients. Simultaneously, the gradient range in `clip_grad_norm_` is limited to 1.0 (`max_norm=1.0`) to prevent gradient explosion. The optimizer updates the model parameters based on the loss value. After each training epoch, the average loss is calculated on the validation set, and the learning rate is updated.
[0139] The model's total loss value clearly converged during training; see [link / reference]. Figures 7-10 .
[0140] (4) Model Saving and Selection: During training, the optimal model parameters are saved based on the performance of the validation set. According to the early stopping parameter design in this paper, if the performance of the validation set does not improve within three training iterations, training can be stopped early to avoid overfitting. The optimal training results saved at this time are further evaluated using the evaluation dataset to obtain the final evaluation metric. Figure 10 It can be seen that the average loss of the verification in the 3rd, 4th and 5th traversal rounds did not exceed that in the second round. Therefore, the early stop mechanism took effect after the 5th traversal training, and the training was stopped.
[0141] 1.4. Model Evaluation
[0142] 1.4.1. Evaluation Indicators
[0143] To comprehensively evaluate the model's performance, the following evaluation metrics were used:
[0144] (1) Accuracy: The proportion of correctly predicted entities out of all predicted entities, reflecting the overall accuracy of the model's predictions.
[0145] (2) Recall: The proportion of correctly predicted entities to the total number of real entities, reflecting the model’s ability to identify real entities.
[0146] (3) F1 score: The harmonic mean of accuracy and recall, which takes into account both the accuracy and recall of the model. It is a commonly used evaluation metric in named entity recognition tasks.
[0147] 1.4.2. Evaluation Results and Analysis
[0148] The trained model was then evaluated on the test set. The evaluation results show that, based on the BERT-BiLSTM-CRF model and optimized using the aforementioned model training and fine-tuning strategy, it performs excellently in the task of named entity recognition of text elements related to railway human resources personnel resumes. Specific evaluation metrics are shown in Table 5: Final Evaluation Results of the Model.
[0149]
[0150] Table 5
[0151] The evaluation results show that the model proposed in this paper outperforms or is equivalent to the average named entity recognition rate (NER F1 = 85%~98%) in other business domains in terms of accuracy, recall, and F1 score. This indicates that the training strategy described in this paper enables the model to better adapt to the text characteristics of the railway domain and improves the model's entity recognition capability.
[0152] 5. Application Expansion
[0153] After training, the model was deployed and applied to railway human resources systems to analyze, store, and reuse the work experience of railway employees. Currently, the model's analysis results have been used in the railway organization and personnel management information system and the railway employee management information system, achieving good practical results. For its system architecture design, please refer to [link to system architecture design]. Figure 11 .
[0154] 6. Conclusion
[0155] This embodiment proposes a named entity recognition method for textual elements related to the work experience of railway human resources personnel based on the BERT-BiLSTM-CRF model. Through a designed fine-tuning training strategy, the model's adaptability to railway-related texts and its ability to recognize specialized terminology are improved. The main conclusions are as follows:
[0156] (1) A set of annotation system for the resume text of railway human resources personnel was constructed, and the definition and annotation specifications of various entities were clarified, providing a high-quality annotation dataset for subsequent model training.
[0157] (2) The pre-trained BERT model was fine-tuned by adopting a well-designed fine-tuning training strategy, so that the model could better adapt to the text characteristics in the railway field and improve the accuracy and generalization ability of entity recognition.
[0158] (3) Experimental results show that the model proposed in this paper performs well in the task of named entity recognition of text elements of railway human resources personnel’s work experience. It outperforms traditional machine learning models and deep learning-based benchmark models in terms of accuracy, recall and F1 score.
[0159] (4) The trained model was integrated into the railway human resources management system, realizing the automated function of named entity recognition of text elements of personnel work experience. The effectiveness and practicality of the system were verified through practical application cases.
[0160] Meanwhile, analysis of the model's error cases revealed that the data format processed by the model during training, validation, and evaluation was relatively regular and not very complex.
[0161] This invention enables automated recognition of textual elements related to personnel work experience in railway human resources systems. In practical applications, the system can quickly and accurately identify various entities within work experience texts, further ensuring data availability for decision support systems that use this information for talent screening, job matching, employee training, and development. This significantly enhances the application value of named entity recognition for work experience text elements in railway human resources. Practical use has verified the system's effectiveness and practicality, improving the efficiency of human resource management and the scientific rigor of decision-making in railway enterprises.
[0162] The high-precision entity recognition device for railway work experience text provided by the present invention is described below. The high-precision entity recognition device for railway work experience text described below can be referred to in correspondence with the high-precision entity recognition method for railway work experience text described above.
[0163] like Figure 12 As shown, in one embodiment, a high-precision entity recognition device for railway work experience text includes a labeling system construction module 1210, a dataset labeling module 1220, a model training module 1230, and a labeling sequence output module 1240.
[0164] The labeling system construction module 1210 is used to build a special labeling system based on the characteristics of the railway human resources field. It uses the BIO labeling method to define entity labels, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0165] The dataset annotation module 1220 is used to obtain a text dataset of railway employees' work experience and to manually annotate it according to the annotation system.
[0166] The model training module 1230 is used to train a named entity recognition model using a labeled dataset. The named entity recognition model is based on a BERT-BiLSTM-CRF model composed of a BERT model, a BiLSTM network, and a CRF network. The model parameters are fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism is introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer.
[0167] The annotation sequence output module 1240 is used to input the text to be recognized into the named entity recognition model and output a named entity annotation sequence.
[0168] Figure 13 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be a smart terminal. Its internal structure diagram can be as follows: Figure 13 As shown. The electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a high-precision entity recognition method for railway work experience text, which includes:
[0169] A dedicated labeling system was constructed based on the characteristics of the railway human resources field. The BIO labeling method was used to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0170] Obtain a text dataset of railway employees' work experience and manually annotate it according to the aforementioned annotation system;
[0171] A named entity recognition model was trained using a labeled dataset. The named entity recognition model is based on the BERT-BiLSTM-CRF model, which consists of a BERT model, a BiLSTM network, and a CRF network. The model parameters were fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism was introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer.
[0172] Input the text to be recognized into the named entity recognition model, and output a sequence of named entity annotations.
[0173] Those skilled in the art will understand that Figure 13The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device to which the present invention is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements a method for high-precision entity recognition of railway work experience text, the method comprising:
[0175] A dedicated labeling system was constructed based on the characteristics of the railway human resources field. The BIO labeling method was used to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0176] Obtain a text dataset of railway employees' work experience and manually annotate it according to the aforementioned annotation system;
[0177] A named entity recognition model was trained using a labeled dataset. The named entity recognition model is based on the BERT-BiLSTM-CRF model, which consists of a BERT model, a BiLSTM network, and a CRF network. The model parameters were fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism was introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer.
[0178] Input the text to be recognized into the named entity recognition model, and output a sequence of named entity annotations.
[0179] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, it implements a method for high-precision entity recognition of railway work experience text, the method comprising:
[0180] A dedicated labeling system was constructed based on the characteristics of the railway human resources field. The BIO labeling method was used to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities.
[0181] Obtain a text dataset of railway employees' work experience and manually annotate it according to the aforementioned annotation system;
[0182] A named entity recognition model was trained using a labeled dataset. The named entity recognition model is based on the BERT-BiLSTM-CRF model, which consists of a BERT model, a BiLSTM network, and a CRF network. The model parameters were fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism was introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer.
[0183] Input the text to be recognized into the named entity recognition model, and output a sequence of named entity annotations.
[0184] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0185] By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0186] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0187] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A high-precision entity recognition method for railway work experience text, characterized in that, The method includes: A dedicated labeling system was constructed based on the characteristics of the railway human resources field. The BIO labeling method was used to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities. Obtain a text dataset of railway employees' work experience and manually annotate it according to the aforementioned annotation system; A named entity recognition model is trained using a labeled dataset. The named entity recognition model is based on a BERT-BiLSTM-CRF model composed of a BERT model, a BiLSTM network, and a CRF network. The model parameters are fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism is introduced during training. The learning rate of the BERT layer is smaller than that of the BiLSTM layer and the CRF layer. In model training, a railway domain knowledge enhancement module is introduced, including: constructing a railway rank mapping rule base to store equivalent mapping relationships of rank representation variants; and connecting a rule injection layer to the output of the BiLSTM layer, which is configured to generate a rule embedding vector when the entity type label is a rank entity. ,in Equivalent representation rules retrieved from the rule base; an attention mechanism is used to calculate the rule weight coefficients. ,in This is the output vector of the BiLSTM layer. and For trainable parameters, Use the Sigmoid activation function; outputs enhanced feature vectors. ; will enhance feature vectors Input to the CRF layer; Before performing label transition probability calculation at the CRF layer, dynamic label smoothing is implemented, including: calculating the entity distribution density of the input sequence and adaptively adjusting the smoothing intensity based on the density. And reconstruct the CRF loss function ,in, This represents the standard negative log-likelihood loss term. Represents a given input sequence Predicting label sequences The conditional probability is added to the KL regularization term. ,in, The number of positions in the sequence. For the first Smoothness label distribution of each location label A parameter distribution indicating that all labels have equal probability; Input the text to be recognized into the named entity recognition model, and output a named entity annotation sequence.
2. The high-precision entity recognition method for railway work experience text according to claim 1, characterized in that, The method for obtaining the text dataset of railway employees' work experience includes: Several original railway human resources text data were collected, and then de-identified, obfuscated, and exported. Perform data cleaning operations to remove duplicate data, correct spelling and grammar errors, handle special characters and formatting issues, and filter invalid data; The data is divided into training dataset, validation dataset, and evaluation dataset in a ratio of 4:1:
1.
3. The high-precision entity recognition method for railway work experience text according to claim 1, characterized in that, The process of obtaining a text dataset of railway employees' work experience also includes: Preprocessing of the text dataset includes: Collect anonymized text data and generate an annotated dataset through manual annotation and cross-verification according to the aforementioned annotation system; BertTokenizerFast, a word-based word segmentation algorithm, is used for word segmentation, where spaces are ignored and consecutive numbers are treated as whole words.
4. The high-precision entity recognition method for railway work experience text according to claim 3, characterized in that, The process of generating an annotated dataset according to the aforementioned annotation system through manual annotation and cross-review includes: Training should be provided to labeling personnel to ensure they are familiar with entity type definitions and labeling standards. After initial annotation, cross-checking is performed, with different annotators correcting errors. Conduct consistency checks to unify ambiguous annotations from multiple personnel; High-quality labeled datasets were reviewed and confirmed.
5. The high-precision entity recognition method for railway work experience text according to claim 3, characterized in that, The method employs BertTokenizerFast for word segmentation, ignoring spaces and treating consecutive digits as whole words, including: Based on the character-based word segmentation method, each Chinese character is treated as an independent unit; Consecutive numbers and English words are treated as whole words; Ignore spaces as word separators.
6. The high-precision entity recognition method for railway work experience text according to claim 1, characterized in that, The method employs a hierarchical learning rate strategy to fine-tune model parameters and introduces an early stopping mechanism, including: Set the learning rate of BERT layer to 1e-5, the learning rate of BiLSTM layer to 1e-3, and the learning rate of CRF layer to 1e-3; Training is terminated and the optimal model parameters are saved when the loss does not improve after N consecutive training rounds.
7. The high-precision entity recognition method for railway work experience text according to claim 1, characterized in that, The method also includes the evaluation of the named entity recognition model, specifically including: Use precision, recall, and F1 score as evaluation metrics; The F1 score for each entity type was calculated on the evaluation dataset, with an average F1 score of 98%. The entity types include the start time of work experience, the end time of work experience, the employer and department, and the job title and rank.
8. A high-precision entity recognition device for railway work experience text, characterized in that, The device includes: The annotation system construction module is used to build a dedicated annotation system based on the characteristics of the railway human resources field. It uses the BIO annotation method to define entity tags, including the start time of work experience, the end time of work experience, the unit and department, the position, the job level, and non-entities. The dataset annotation module is used to obtain a text dataset of railway employees' work experience and manually annotate it according to the annotation system. The model training module is used to train a named entity recognition model using a labeled dataset. This model is based on a BERT-BiLSTM-CRF model, composed of a BERT model, a BiLSTM network, and a CRF network. The model parameters are fine-tuned using a hierarchical learning rate strategy, and an early stopping mechanism is introduced during training. The learning rate of the BERT layer is lower than that of the BiLSTM and CRF layers. A railway domain knowledge enhancement module is introduced during model training, including: constructing a railway rank mapping rule base to store equivalent mapping relationships of rank representation variants; and connecting a rule injection layer to the output of the BiLSTM layer. The rule injection layer is configured to generate a rule embedding vector when the entity type label is a rank entity. ,in Equivalent representation rules retrieved from the rule base; an attention mechanism is used to calculate the rule weight coefficients. ,in This is the output vector of the BiLSTM layer. and For trainable parameters, Use the Sigmoid activation function; outputs enhanced feature vectors. ; will enhance feature vectors The input is fed into the CRF layer; before the label transition probability is calculated in the CRF layer, dynamic label smoothing is performed, including: calculating the entity distribution density of the input sequence and adaptively adjusting the smoothing intensity based on the density. And reconstruct the CRF loss function ,in, This represents the standard negative log-likelihood loss term. Represents a given input sequence Predicting label sequences The conditional probability is added to the KL regularization term. ,in, The number of positions in the sequence. For the first Smoothness label distribution of each location label A parameter distribution indicating that all labels have equal probability; The annotation sequence output module is used to input the text to be recognized into the named entity recognition model and output a named entity annotation sequence.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the high-precision entity recognition method for railway work experience text as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the high-precision entity recognition method for railway work experience text as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Power grid IT operation and maintenance entity identification method and system based on BERT-BiLSTM-CRF model and attention
CN115936001A