Chinese electronic medical record information extraction method based on brainstorming neural architecture search
By using a brainstorming optimization algorithm to automatically search for BiLSTM network parameters, the training challenges in entity recognition and relation extraction in Chinese electronic medical records were solved, simplifying the doctor training process and improving the structured representation effect.
Patent Information
- Application Number
- CN202311166009.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-09-11
AI Technical Summary
In existing technologies, entity recognition and relation extraction methods for Chinese electronic medical records rely on training neural network models, which requires a lot of parameter tuning and manual labor costs. Furthermore, doctors lack prior knowledge, making effective training difficult, and there is a lack of evolutionary algorithms for automatic search strategies of mixed parameters in BiLSTM networks.
A brainstorming optimization algorithm is used to automatically search for the hybrid parameters of the BiLSTM network, design encoding strategies, individual optimization and update strategies, and evolutionary selection. The structure and parameters of the BiLSTM network are automatically adjusted through the BSO algorithm to achieve entity recognition and relation extraction in Chinese electronic medical records.
It simplifies the training process of neural network models for doctors, reduces computing resources and labor costs, improves the structuring effect of Chinese electronic medical records, and achieves accuracy in entity recognition and relation extraction.
Smart Images

Figure CN117194661B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information extraction technology, and in particular to a method for extracting Chinese electronic medical record information based on brainstorming neural architecture search. Background Technology
[0002] In clinical practice, patient information recorded by doctors in text form is called an electronic medical record (EMR). It typically includes descriptions of past medical history, family history, symptoms, diagnoses, examinations, and tests. A high-quality EMR helps ensure the quality and safety of medical services, maintain good doctor-patient relationships and protect rights. A robust EMR quality control system can improve record quality, reduce the number of on-site examination experts, minimize human interference, and enhance the reliability of test results. However, currently, most hospitals in my country record EMRs with characteristics such as template-based documentation, regional dialects, diverse formats, and inconsistent terminology. Furthermore, EMRs suffer from document gaps and missing descriptions; inconsistencies in descriptions, excessive repetition, and discrepancies between the patient's initial description and the overall medical record description; and in terms of manual quality control, there are insufficient experts, low sample coverage, lack of specialized tools, and low timeliness. These characteristics lead to a large number of EMRs in hospitals facing difficulties in automatic analysis of patient conditions, extraction of potential information, and construction of robust medical record systems.
[0003] The aforementioned issues cannot be addressed on a large scale by relying solely on manual expert work to ensure the quality of electronic medical records. Information extraction (IE) technology is needed to support this, enabling the identification of relevant entities and the extraction of relationships from unstructured electronic medical records (such as TXT files, Excel spreadsheets, and Word documents), laying the foundation for downstream tasks. Specifically, the entity recognition task involves identifying entities present in the medical record (such as symptom names, locations, physical signs, birthplaces, residences, and drug names) and their associated attribute values (such as time of occurrence, number of miscarriages, test values, number of transfusions, and duration), and predicting the entity's category (such as symptoms, examinations, tests, drugs, medical history, and genetic history). The relationship extraction task involves classifying two extracted entities. For example, the entity for childhood migraine and brain CT scan represents the relationship of imaging examination; the entity for childhood migraine and bradycardia represents the relationship of clinical symptoms; and the entity for childhood migraine and focal neurological deficits represents the relationship of pathological staging. By accurately extracting information (including entity recognition and relation extraction), key information can be extracted from unstructured and complex electronic medical records for downstream tasks such as intelligent medical question answering, online consultation, and medical insurance quality assurance verification.
[0004] Currently, the common models used for building entity recognition and relation extraction are BERT-BiLSTM-CRF and BiLSTM, which essentially use neural network models to process character vectors, segment vectors, position vectors, low-dimensional vectors, and relation classifications of Chinese medical text. However, training neural network models requires extensive parameter tuning, rich domain expert knowledge, and high labor costs. Furthermore, many hospitals require doctors to train the neural network models to protect patient privacy, making this process extremely difficult.
[0005] In the field of neural network model technology, even professionals need to undergo numerous trials and errors and extensive parameter tuning. This process requires significant prior knowledge, as well as time and labor costs. Especially due to the sensitivity and privacy concerns of medical information, doctors are often forced to perform structured analysis of Chinese electronic medical records, which further increases the difficulty of training network models. For example, few doctors understand the characteristics of optimization methods such as SGD, Momentum, Adagrad, Adam, and RMSprop, and do not know when to use which optimization method; doctors do not know what learning rate to set as the initial value, nor are they sure whether to increase or decrease it; doctors do not know how many forward and backward LSTM network layers to set, nor whether to increase or decrease the number of network layers; similarly, there is the issue of the number of neurons in the hidden layers.
[0006] In the field of evolutionary neural networks, BSO (Browser-Oriented Search), as an evolutionary algorithm, possesses characteristics such as global search, guaranteed convergence, and simulation of human discussion, making it applicable to automatic architecture search in neural networks. However, currently, there is no design scheme for this algorithm, including encoding strategies, initialization strategies, individual optimization and update strategies, evolutionary selection, and training schemes. For example, regarding encoding strategies, how can we ensure that BSO individuals simultaneously contain effective information such as optimization methods, learning rates, the number of layers in the BiLSTM network, and the number of hidden neurons? Regarding individual optimization, how can we design the information interaction behavior of BSO individuals to simultaneously search for training parameters and structural parameters and find the optimal individual, i.e., the optimal combination of network parameters? Regarding evolutionary selection and training schemes, how can we balance time costs and model performance to maximize the structured effect of Chinese electronic medical records?
[0007] As mentioned above, whether it is the limitation of the user's background or the design scheme of automatic search for neural network models, there is an urgent need for a novel technical design method to make up for the above defects and get rid of the current technical dilemma.
[0008] The general process of existing entity recognition and relation extraction methods for Chinese electronic medical records involves obtaining the sum of character vectors, segment vectors, and bit vectors using a BERT pre-trained model, then processing the text output sequence using forward and backward LSTM (BiLSTM), and finally feeding it into a CRF layer for entity annotation to complete the entity recognition process. Conversely, a low-dimensional vector representation of the text is obtained through an embedding layer, then processed and concatenated using forward and backward LSTM to obtain the output sequence, which is finally classified using a Softmax classifier to complete the relation extraction process. In this process, training the BiLSTM network requires continuous adjustment of multiple hybrid parameters (i.e., structural parameters and training parameters), which consumes significant computational resources and labor costs. Furthermore, most doctors lack understanding of neural network model training processes and prior knowledge, making it difficult to choose suitable training methods. In addition, there is a current lack of evolutionary algorithms for automatic search of hybrid parameters in BiLSTM networks, especially brainstorming optimization strategies for neural architecture search, including encoding strategies, individual optimization and update strategies, evolutionary selection, and training schemes. Summary of the Invention
[0009] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a method for extracting Chinese electronic medical record information based on brainstorming neural architecture search. The method uses a brainstorming optimization algorithm to automatically search for mixed parameters in a BiLSTM network and applies them to entity recognition and relation extraction in Chinese medical electronic medical records, thereby assisting doctors in training neural network models.
[0010] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for extracting Chinese electronic medical record information based on brainstorming neural architecture search, comprising the following steps:
[0011] Step 1: Design the encoding strategy of the BSO algorithm based on the parameters of the BiLSTM network model to be searched;
[0012] The parameters of the BiLSTM network model to be searched include the optimization method, learning rate, batch size, number of hidden layer neurons, and number of BiLSTM layers.
[0013] The encoding strategy includes an encoding method and a decoding method; the decoding method is the inverse form of the encoding method.
[0014] The encoding method includes:
[0015] Set the parameter range and type of the predefined BiLSTM model;
[0016] Randomly extract parameters from the defined range to form each individual in the population, and continue to perform this operation until the maximum population value is reached;
[0017] Different individual codes are designed using a variable-length coding method;
[0018] Step 2: Perform the initialization population operation to map the hybrid parameters of the BiLSTM network to individuals of the BSO algorithm, and construct a trainable BiLSTM-based BERT-BiLSTM-CRF entity recognition and BiLSTM relation extraction model.
[0019] Step 2.1: Based on the preset set of mixed parameters such as optimization method, learning rate, batch size and number of hidden neurons, randomly select and construct the initial set O_L_B_neuro_list;
[0020] Step 2.2: Randomly select integers from the sets of input forward LSTM layers and backward LSTM layers respectively, as the size of the BiLSTM for the current individual;
[0021] Step 2.3: After placing a forward LSTM layer into the first layer of the LSTM network, generate random numbers in the range [0,1] to select LSTM layers in different directions and incorporate them into the encoding of the entire individual until the layer limit of the LSTM network is reached.
[0022] Step 2.4: Merge the above mixed parameters into the encoding of the entire individual; at this point, the encoding operation of the individual has been completed.
[0023] Step 2.5: Repeat steps 2.2 to 2.4 for N iterations to complete the initialization of all individuals;
[0024] Step 3: Train the LSTM network model using the training set, test set, and validation set. Use the F1 score of the model as the fitness score of the initial individual and evaluate the fitness and training strategy.
[0025] First, evaluate and train the individual using n epochs. As the number of iterations and epochs increases, the individuals in the population gradually move closer to the global optimum. At this point, perform deep training on the current best individual, i.e., train the current best individual using m epochs, where m>n, and the optimal architecture of the BiLSTM model can be searched.
[0026] Step 4: Divide the population into regions according to the k-means clustering operation, set the "leader" of each population, that is, the local optimum and the alternative cluster center, design the individual optimization and update operation according to the evolutionary mechanism within and between populations in the brainstorming algorithm, and complete one complete iteration.
[0027] Step 4.1: Divide the population into regions according to the k-means clustering operation, and update the cluster centers of the population in each iteration;
[0028] In each iteration, a roulette wheel strategy is used to select an individual to replace the cluster center of its cluster, thereby updating the population cluster center.
[0029] Step 4.2: Design individual optimization and update operations based on the evolutionary mechanisms within and between populations in the brainstorming algorithm;
[0030] Individual encoding is considered to consist of three parts: hyperparameters, forward LSTM, and backward LSTM. In the forward LSTM part: (1) When the selected individual is one of two random individuals in the cluster, the length of the individual with better fitness value is used as the standard. If the individual with poor fitness is too long, a truncation operation is used, that is, the forward LSTM part that exceeds the maximum length of the current individual encoding is removed. If the individual is too short, a completion operation is used, that is, the structure of each network layer of the individual is repeated until it matches the length of another individual. (2) When the selected individual is one of two cluster center individuals in the cluster, the longer individual is used as the standard. In this case, the shorter individual only needs to be completed. (3) When the selected individual is a random individual in the cluster or a cluster center, the number of a certain layer of the LSTM network only needs to be adjusted according to the individual update step size.
[0031] Similarly, the update operation of the reverse LSTM layer is the same as that of the forward LSTM layer;
[0032] Finally, the optimization of the hyperparameter individual part is achieved by using the crossover and mutation operation in the genetic algorithm;
[0033] Step 5: Repeat step 4. When the maximum number of iterations is reached, the resulting individual, i.e., the LSTM network model, is the current optimal electronic medical record text entity recognition and relation extraction model.
[0034] Step 6: Use the optimal electronic medical record text entity recognition and relation extraction model to extract information from Chinese electronic medical records.
[0035] The beneficial effects of adopting the above technical solution are as follows: The Chinese electronic medical record information extraction method based on brainstorming neural architecture search provided by this invention draws on the advantages of the Brainstorming Optimization Algorithm (BSO), such as global search, automatic optimization, and a small number of parameters. It designs an automatic neural architecture search method for entity recognition and relation extraction models (BERT-BiLSTM-CRF and BiLSTM) of Chinese medical electronic medical records. It automatically adjusts the training parameters and structural parameters of the BiLSTM network of the above-mentioned general models to achieve automatic neural network architecture search, and automatically obtains the optimal neural network architecture after training. This facilitates the training process of models in this field, especially for non-AI professionals such as doctors, bringing convenience to doctors in the application of structured Chinese electronic medical records. Specifically, the method of this invention can automatically determine the number of layers and hidden neurons of the BiLSTM network, select appropriate optimization methods, and adjust the learning rate. Doctors do not need professional knowledge of the network model, enabling them to easily and conveniently train BERT-BiLSTM-CRF and BiLSTM network models.
[0036] Brainstorming optimization algorithms, particularly in individual encoding design and individual update optimization, are significant challenges in neural architecture search. To address this, this invention employs a variable-length hybrid encoding strategy. This strategy aims to encode model parameters into individuals through flexible encoding methods, allowing each individual to express a rich variety of network structures. Furthermore, the individual update optimization strategy improves the search quality of the BSO algorithm, ensuring a balance between development and exploration.
[0037] Using the method of this invention, doctors can easily train and verify neural network models, and search for the optimal network structure through brainstorming optimization algorithms, thereby more accurately identifying entities in the text of medical electronic medical records and extracting the relationships between entity pairs. Attached Figure Description
[0038] Figure 1 A flowchart of a method for extracting information from Chinese electronic medical records based on brainstorming neural architecture search, provided in an embodiment of the present invention;
[0039] Figure 2 A comparative diagram of three examples of individual coding strategies provided in embodiments of the present invention;
[0040] Figure 3 This is a schematic diagram of an update operation between two individuals provided in an embodiment of the present invention;
[0041] Figure 4 This is a schematic diagram of an update operation between two cluster centers provided in an embodiment of the present invention;
[0042] Figure 5This is a schematic diagram illustrating the update operation of a single individual or cluster center provided in an embodiment of the present invention. Detailed Implementation
[0043] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0044] In this embodiment, the information extraction method for Chinese electronic medical records based on brainstorming neural architecture search is as follows: Figure 1 As shown, the overall process pseudocode is shown in Table 1:
[0045] Table 1. BiLSTM network method optimized based on brainstorming.
[0046]
[0047]
[0048] First, the population is initialized according to the encoding strategy (Step 1) (Step 2). Then, the fitness value of each individual is obtained based on the pre-divided dataset (Step 3), which is the accuracy of each network model, and each individual is clustered. Further, brainstorming begins until the iteration termination condition is met (lines 5 to 24) (Step 4). Finally, the output optimal network model is subjected to deep training (Step 2).
[0049] The method specifically includes the following steps:
[0050] Step 1: Design the encoding strategy of the BSO algorithm based on the parameters of the BiLSTM network model to be searched;
[0051] During the population initialization phase, the algorithm generates individuals according to the encoding method until the preset population size is reached. Generally, the conversion between individuals and the BiLSTM network model in BSO should include encoding and decoding methods. The encoding method consists of the number of BiLSTM network layers, the number of hidden layer neurons, the optimization method, the learning rate, and the batch size. The decoding method is the inverse form of the encoding method; therefore, this section only needs to describe the encoding method. Since all parameters are not fixed, the resulting BiLSTM structure is quite flexible.
[0052] Next, the parameter range and type of the predefined BiLSTM model are set. Since the parameters of each individual are different, this means that the structure and size of the represented BiLSTM model will be different. During the initialization phase, parameters within the defined range are randomly extracted and used to form each individual in the population. This process is repeated until the maximum population value is reached. For example, the various parameters encoded by an individual and their value ranges are shown in Table 2.
[0053] Table 2. Range of values for structural parameters and training parameters
[0054] parameter Range of values BiLSTM layers [2,20] Number of neurons in the BiLSTM hidden layer {32,64,128,…,1024} Optimization methods {1,2,3,4,5} Learning rate N(0.001,0.001) batch_size {20,50,100,200,300,400,500}
[0055] At this point, if the individual expression is {8,64,1,0.001,100}, it means that the network has 8 layers of LSTM network (forward and backward LSTM freely arranged), 64 hidden neurons in each layer, and adopts the first optimization method (the optimization method is preset to 1 to 5), with a learning rate of 0.001 and a batch size of 100 (100 samples are trained in each batch).
[0056] Since the structure of the optimal BiLSTM model is unknown, and imposing a fixed-length encoding constraint on the network structure actually limits the discovery of the optimal structure. Specifically, if a traditional fixed-length encoding strategy is adopted, a maximum network length needs to be pre-set, which is very difficult in actual optimization. This is because a larger maximum length increases computational overhead and leads to worse experimental results when performing the same number of iterations in evolutionary computation; the optimal network structure constructed with a smaller maximum length will be significantly less efficient in solving application problems. In addition, combining and arranging two different types of network layers, forward and backward LSTM, also increases the difficulty of fixed-length encoding. Therefore, this embodiment designs different individuals through a variable-length encoding method, which can cleverly represent different network structures in the method of this invention. During the optimization process, the individual evolution update operations within and between populations of the BSO algorithm are performed, realizing exploration in the global space and development operations in the local space. Figure 2 Three examples of individual coding strategies are given.
[0057] Step 2: Perform the initialization population operation to map the hybrid parameters of the BiLSTM network to individuals of the BSO algorithm, and construct a trainable BiLSTM-based BERT-BiLSTM-CRF entity recognition and BiLSTM relation extraction model.
[0058] In this embodiment, the pseudocode for the population initialization strategy is shown in Table 3:
[0059] Table 3 Population Initialization Strategy
[0060]
[0061] Step 2.1: Based on the preset set of mixed parameters such as optimization method, learning rate, batch size and number of hidden neurons, randomly select and construct the initial set O_L_B_neuro_list (lines 6-10);
[0062] Step 2.2: Randomly select integers from the sets of input forward LSTM layers and backward LSTM layers respectively, as the size of the BiLSTM for the current individual (lines 11 and 12);
[0063] Step 2.3: After placing the forward LSTM layer in the first layer of the LSTM network (line 13), generate random numbers in the range [0,1] to select LSTM layers in different directions and incorporate them into the encoding of the entire individual until the layer limit of the LSTM network is reached (lines 15 to 23).
[0064] Step 2.4: Merge the above mixed parameters into the encoding of the entire individual (line 24); at this point, the encoding operation of the individual has been completed;
[0065] Step 2.5: Repeat steps 2.2 to 2.4 for N iterations (i.e., population size) to complete the initialization of all individuals;
[0066] Step 3: Train the LSTM network model using the training set, test set, and validation set. Use the F1 score of the model as the fitness score of the initial individual and evaluate the fitness and training strategy.
[0067] As in the algorithm flow Figure 1 As shown, obtaining the fitness value of an individual is necessary for subsequent operations. Traditional gradient descent-based optimization of neural network weights requires substantial computational resources, such as deploying multiple RTX 2080Ti or RTX 3090Ti graphics cards, or even Tesla V100 or Tesla A100 graphics cards. Evolutionary computation requires optimization of multiple individuals and iterative operations compared to traditional methods, leading to even greater computational demands for neural architecture search based on evolutionary algorithms.
[0068] Therefore, the method of this invention first uses n epochs (e.g., 10 epochs) to evaluate and train individuals; as the number of iterations and epochs increases, the individuals in the population gradually move towards the global optimum; at this point, the current best individual is subjected to deep training, that is, the current best individual is trained using m epochs (e.g., 50 epochs), where m>n, and the optimal architecture of the BiLSTM model can be searched; this method has the characteristics of accelerating the convergence speed of the algorithm, saving computational overhead, and at the same time ensuring the performance of the algorithm.
[0069] Step 4: Divide the population into regions according to the k-means clustering operation, set the "leader" (i.e., local optimum and alternative cluster center) for each population, design individual optimization and update operations based on the evolutionary mechanism within and between populations in the brainstorming algorithm, and complete one complete iteration.
[0070] Step 4.1: Divide the population into regions according to the k-means clustering operation, and update the cluster centers of the population in each iteration;
[0071] After the initialization of the population fitness evaluation, in order to avoid the population convergence oscillation caused by the complete randomness of replacing the cluster center, a roulette wheel strategy is used in each iteration to select individuals to replace the cluster center of their respective cluster, thereby updating the population cluster center.
[0072] During the update process, the roulette strategy first calculates the probability of an individual being selected and the cumulative probability of each part, as shown in Formula 1 and Formula 2:
[0073]
[0074] Where p(x) i f(x) represents the probability that the i-th individual is selected. i ) represents the fitness value of the i-th individual (the accuracy of the BiLSTM model), and N represents the population size;
[0075]
[0076] Where q(x) i () represents the cumulative probability of each part;
[0077] Then, based on rand, it is decided whether to select the individual to replace the cluster center of its cluster;
[0078] Step 4.2: Design individual optimization and update operations based on the evolutionary mechanisms within and between populations in the brainstorming algorithm;
[0079] During the population optimization process, the encoding length of each individual is not the same. To better adapt the new encoding method to the original BSO individual update, this patent redesigns the individual optimization operation. Specifically, the individual encoding is considered to consist of three parts (explained in step 2), namely hyperparameters (optimization method, learning rate, batch size, number of hidden neurons), forward LSTM, and backward LSTM; in the forward LSTM part: (1) when the selected individuals are two random individuals in the cluster, the length of the individual with better fitness value is used as the standard; at this time, if the length of the individual with poor fitness is longer, a truncation operation is used, that is, the forward LSTM part exceeding the maximum length of the current individual encoding is removed; if the length of the individual is shorter, a completion operation is used, that is, the structure of each network layer of the individual is repeated until it matches the length of another individual; (2) when the selected individuals are two cluster center individuals in the cluster, the longer individual is used as the standard; at this time, the shorter individual only needs to be completed; (3) when the selected individuals are random individuals in the cluster or cluster center, only the number of a certain layer of the LSTM network needs to be adjusted according to the individual update step size (the number of hidden neurons in the forward LSTM network layer can also be adjusted).
[0080] Similarly, the update operation of the reverse LSTM layer is the same as that of the forward LSTM layer;
[0081] Finally, the optimization of the hyperparameter individual part is achieved by using the crossover and mutation operation in the genetic algorithm;
[0082] In operation (1), the length alignment method takes into account that the network structure with a better fitness value has better reference value. In operation (2), both network structures are relatively good, and may even be local optima. Therefore, all information of the two network structures is considered. The combination of operations (1) and (2) ensures the diversity of individual lengths and does not lose the exploration ability of the original BSO algorithm. Operation (3) performs random step size updates near the space where the individual is located without length restrictions, thus preserving the development ability of the original BSO algorithm. Different cases of individual update operations are as follows: Figures 3 to 5 As shown.
[0083] In this embodiment, the pseudocode for the population individual update alignment strategy is shown in Table 4. Lines 2 to 11 represent individual layer update operations. Line 12 updates the three type layers and then uses a predefined r... d The parameters are updated using the BSO algorithm. Similarly, updating two cluster centers only requires a completion operation, and updating a single individual only requires updating a specific network layer using the BSO algorithm.
[0084] Table 4 Population Individual Update Alignment Strategies
[0085]
[0086] Step 5: Repeat step 4. When the maximum number of iterations is reached, the resulting individual, i.e., the LSTM network model, is the current optimal electronic medical record text entity recognition and relation extraction model.
[0087] Step 6: Use the optimal electronic medical record text entity recognition and relation extraction model to extract information from Chinese electronic medical records.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A Chinese electronic medical record information extraction method based on brainstorming neural architecture search, characterized by: The method comprises the following steps: Step 1: design the encoding strategy of the BSO algorithm according to the BiLSTM network model parameters to be searched; Step 2: perform the initialization population operation, map the BiLSTM network mixed parameters to the individuals of the BSO algorithm, and construct the trainable entity recognition model and relationship extraction model based on the BiLSTM-based BERT-BiLSTM-CRF; Step 2.1: randomly select and construct the initial set O_L_B_neuro_list according to the mixed parameter set of the preset optimization method, learning rate, batch_size and number of hidden neurons; Step 2.2: randomly select an integer from the set of the input forward LSTM layer number and the reverse LSTM layer number as the BiLSTM size of the current individual; Step 2.3: after putting the forward LSTM layer in the first layer of the BiLSTM network, generate a random number in the interval [0, 1] to select the LSTM layer in different directions and include it in the encoding of the entire individual until the number of layers of the BiLSTM network is reached; Step 2.4: combine the above mixed parameters into the encoding of the entire individual; at this time, the encoding operation of the individual is completed; Step 2.5: repeat steps 2.2 to 2.4, and complete the initialization operation of all individuals after N iterations; Step 3: train the BiLSTM network model according to the training set, test set and validation set, take the F1 value of the model as the fitness value of the initial individual and perform fitness evaluation and training strategy; Step 4: divide the population into regions according to the k-means clustering operation, set the local optimal value and the replaced cluster center of each population, design the individual optimization update operation according to the evolution mechanism of the population inside and between the population in the brainstorming algorithm, and complete a complete iteration; Step 5: repeat step 4, and when the maximum number of iterations is reached, the obtained individual is the current optimal electronic medical record text entity recognition model and relationship extraction model; Step 6: use the optimal electronic medical record text entity recognition model and relationship extraction model to perform information extraction on the Chinese electronic medical record.
2. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 1, characterized in that: The BiLSTM network model parameters to be searched include optimization method, learning rate, batch_size, number of hidden layer neurons and BiLSTM layer number.
3. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 2, characterized in that: The encoding strategy includes encoding mode and decoding mode; the decoding mode is the inverse form of the encoding mode; The encoding mode includes: setting the parameter range and type of the predefined BiLSTM model; randomly extracting the parameters in the defined range to form each individual in the population, and continuously performing this operation until the maximum population value is reached; adopting variable-length encoding mode to design the encoding of different individuals.
4. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 3, characterized in that: The specific method of step 3 is: First, the individual is trained for n epochs; as the number of iterations and epochs increases, the population gradually approaches the global optimal solution; at this time, the current optimal individual is deeply trained, that is, the current optimal individual is trained for m epochs, m>n, and the optimal architecture of the BiLSTM model can be searched.
5. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 4, characterized in that: The specific method of step 4 is: Step 4.1: The population is regionally divided according to the k-means clustering operation, and the cluster center of the population is updated in each iteration; Step 4.2: The individual optimization update operation is designed according to the evolution mechanism of the population inside and between the population in the brainstorming algorithm.
6. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 5, characterized in that: The step 4.1 adopts the roulette strategy to select the individual for replacing the cluster center of the cluster in each iteration, so as to realize the update of the cluster center of the population.
7. The Chinese electronic medical record information extraction method based on brainstorming neural architecture search according to claim 6, characterized in that: The specific method of step 4.2 is: The individual code is regarded as consisting of three parts, i.e. hyperparameters, forward LSTM and reverse LSTM; in the forward LSTM part: (1) when the selected individual is two random individuals in the cluster, the length of the individual with better fitness value is taken as the standard; at this time, if the length of the individual with poor fitness value is longer, the truncation operation is adopted, that is, the forward LSTM part exceeding the maximum length of the current individual code is removed; if the length of the individual is shorter, the completion operation is adopted, that is, the structure of each network layer of the individual is repeated until it matches the length of the other individual; (2) when the selected individual is two cluster center individuals in the cluster, the individual with longer length is taken as the standard; at this time, the individual with shorter length only needs to adopt the completion operation; (3) when the selected individual is a random individual or a cluster center in the cluster, only the number of a layer of the BiLSTM network can be adjusted according to the individual update step; Similarly, the update operation of the reverse LSTM layer is the same as that of the forward LSTM; Finally, the cross variation operation in the genetic algorithm is adopted for the update optimization of the hyperparameter individual part.
Citation Information
Patent Citations
Electronic medical record named entity identification method and system fusing deep learning and rules
CN112001177A