A civil aviation accident report processing method based on machine learning and rule matching
Through the method based on machine learning and rule matching, civil aviation accident reports are automatically classified and causes are extracted, which solves the problem of inability to effectively analyze Chinese civil aviation accident reports in the existing technology, achieves automated processing and in-depth utilization of resources, and improves analysis efficiency and accuracy.
Patent Information
- Application Number
- CN202111227632.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-10-21
AI Technical Summary
Existing technology is difficult to effectively automatically process and analyze civil aviation accident reports, especially in Chinese text descriptions, and cannot accurately identify the specific causes of accidents, resulting in a waste of resources and the introduction of human errors.
A method based on machine learning and rule matching is used to preprocess civil aviation accident reports, Chinese word segmentation and part-of-speech recognition, select words with high tf-idf values as text features, automatically classify them through a classifier, and establish cause identification rules to extract Cause of accident.
It realizes the automatic classification of civil aviation accident reports and the accurate extraction of accident causes, avoids human errors, improves work efficiency, and classifies accident causes into four categories: equipment, personnel, environment and organization, making profound use of accident report resources and effectively Plane accidents were avoided.
Smart Images

Figure CN114004227B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing methods, and in particular relates to a civil aviation accident report processing method based on machine learning and rule matching. Background Art
[0002] Civil aviation accidents pose a huge threat to the personal and property safety of passengers. Many accidents are caused by multiple unsafe measures. If the causes behind each accident can be extracted and summarized, the key factors that lead to a certain type of accident can be obtained, thereby increasing vigilance. After each accident, the responsible unit will have professionals to make a detailed analysis of its occurrence process and record it in the accident report. Effective analysis of the report can help airlines understand the root cause of a certain type of accident and learn lessons from it. Reports are usually described in text form, mostly unstructured or semi-structured data. There are thousands of reports submitted every month. Traditional manual analysis will not only lead to a waste of resources, but also introduce human errors. Therefore, automated processing through text mining is necessary.
[0003] By using text mining technology, useful information in accident reports can be extracted. The limitation of existing methods is that they cannot identify the specific causes of accidents in reports, so they cannot be used in the next step. In addition, research on text analysis is mostly concentrated in fields such as construction, railways, and industry. They have achieved the classification of reports and the extraction of key factors, and can predict the risks and consequences of accidents based on the factors that appear, but there are fewer text analyses related to aviation accidents, especially those using Chinese descriptions. Summary of the invention
[0004] In view of the deficiencies of the prior art, the present invention provides a civil aviation accident report processing method based on machine learning and rule matching, which realizes the automatic classification of civil aviation accident reports and the automatic extraction of the causes of the accidents.
[0005] In order to achieve the above object, the technical solution provided by the present invention is a civil aviation accident report processing method based on machine learning and rule matching, comprising the following steps:
[0006] Step 1: pre-process the civil aviation accident report data, screen and standardize the reports for processing;
[0007] Step 2: Perform Chinese word segmentation and part-of-speech recognition on the preprocessed report, and remove stop words;
[0008] Step 3, select words with high tf-idf values as text features of the report for classification;
[0009] Step 4: vectorize the report text to form a data set that can be used for classification;
[0010] Step 5, select the best classifier to classify the report text and obtain the accident category;
[0011] Step 6: Establish cause identification rules to extract the cause of the accident.
[0012] Moreover, the preprocessing in step 1 includes two steps: data screening and spelling standardization. Data screening is performed based on whether the report content analyzes the background of the accident, the state of the aircraft at the time of the accident, and the cause of the accident. If the report contains the above content, it can be used as data extracted from the cause of the accident. Spelling standardization is to correct typos in accident reports and standardize abbreviations and synonyms to avoid feature representation errors caused by text description deviations.
[0013] Moreover, in the step 2, the sentence is segmented by word segmentation to make it into words with independent meaning in the current context. In order to avoid separating some complex professional vocabulary during classification, it is also necessary to analyze the text content to construct a professional dictionary in the field of civil aviation. Part-of-speech recognition is required after Chinese word segmentation, and a part-of-speech table corresponding to professional vocabulary is established. Part-of-speech recognition mainly analyzes the part-of-speech of each word in the sentence, and the identified parts of speech include nouns, verbs, gerunds, verb adverbs, adjectives, adverbs, quantifiers, pronouns, conjunctions, prepositions, and auxiliary words. After the part-of-speech recognition is completed, stop words need to be removed, and stop words include pronouns, articles, modal auxiliary words, conjunctions and adverbs.
[0014] Moreover, in step 3, selecting the words that can maximize the representation of text information as the basis for classification can achieve better classification results. Feature selection can achieve data dimensionality reduction. In order to distinguish documents of different categories, the distribution of words as features in texts of different categories must be different. The greater the difference, the more important the word is for classification.
[0015] The importance of a single word is measured by the tf-idf value calculated as follows:
[0016]
[0017] In the formula, x ik is the importance measure of word i in category k, that is, the tf-idf value; f ik is the frequency of word i in documents of category k; N is the total number of documents; n i is the number of documents containing word i, n i The larger the value, the more important the word is to this document.
[0018] Sort the words in the text according to the tf-idf value from large to small, and select the first M words to form the dictionary as the features of the text for classification.
[0019] Moreover, in step 4, each text is represented as a vector of the same length as the number of words in the dictionary, and the numerical vector corresponding to the text is assigned a value according to the number of times a certain word appears in the text, and the value corresponding to the word that does not appear is 0, forming a data set that can be used for classification. The data set is then separated into a training set and a test set, wherein the training set is used to train the alternative classification model, and the test set is used to evaluate the classification effect of the alternative classification model.
[0020] Moreover, in step 5, the classifier and the number of feature words are used as independent variables, and the training set is used to train multiple classifiers first, and then the classification effects of each classifier are compared using the test set. Considering the data imbalance between different accident categories, the index F1 of each type of report is weighted according to the percentage of each type of accident report in the test set in the total reports, and WEIGHTED-F1 is obtained as the performance evaluation of the classifier.
[0021] WEIGHTED-F1 is calculated as follows:
[0022]
[0023] Where k is the number of accident report categories, N is the total number of accident reports, and n is the total number of accident reports. i is the number of reports of category i, F 1i The F1 value of the test machine classification result is reported for the i-th category, and WEIGHTED-F1 is the weighted F1 value.
[0024] F 1i The calculation method is as follows:
[0025]
[0026] In the formula, Precision reflects the proportion of the samples that are judged to belong to the class, Recall reflects the ratio of the number of samples identified to the total number of samples, and F 1i It combines Precision and Recall to ensure that neither is too low.
[0027] The calculation method of Precision and Recall is as follows:
[0028]
[0029]
[0030] Where: TP is the number of correctly classified items in each category, FP is the number of items that do not belong to this category but are incorrectly identified, and FN is the number of items that belong to this category but are identified as other categories.
[0031] After determining the classifier and the corresponding optimal number of feature words, the optimal parameters of the classifier are obtained through grid search.
[0032] Moreover, in step 6, the causes of the accident are classified into four categories: equipment, personnel, environment, and organization, and each of the four categories contains multiple specific causes. Each sentence in the accident report can be regarded as a combination of different elements. According to daily description habits, recognition rules are set based on the appearance of words of different categories in the same description: for environmental causes, only relevant environmental keywords need to be identified, equipment causes are usually directly described, and the descriptions of human causes and organizational causes are mostly combinations of subject, predicate, and complement. In the description of the accident, the subject provides the responsible unit, the predicate indicates a certain action or decision of the subject, and the complement evaluates the predicate to determine whether this behavior will have an impact on the occurrence of the accident.
[0033] Compared with the prior art, the present invention has the following advantages:
[0034] 1) Based on the natural language processing method, batch processing of Chinese civil aviation accident reports is carried out, and the machine learning classifier is used to realize automatic classification of reports. The sentence structure and content are analyzed by rule-based methods, and the cause of the accident is extracted accordingly. Due to the use of automated processing methods, the introduction of human errors is avoided, more accurate results can be achieved, and a large number of reports can be analyzed in a short time, which improves work efficiency.
[0035] 2) The causes of accidents are attributed to four categories: equipment, personnel, environment and organization. Each of the four categories contains multiple specific causes, which realizes the specific classification of the causes of accidents. The classification of accident reports and the subsequent cause extraction make deeper use of this resource and contribute to the effective avoidance of aircraft accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of an embodiment of the present invention.
[0037] Figure 2 Schematic diagram of comparative experimental results of six classifiers in the embodiment of the present invention. DETAILED DESCRIPTION
[0038] The present invention provides a method for processing civil aviation accident reports based on machine learning and rule matching. The following is a detailed description of the technical solution of the present invention by classifying and analyzing the causes of accident investigation reports from various airlines. The data contains 1,775 Chinese reports that can obtain relatively accurate accident category information from the title or content of the report, and the number of words contained ranges from dozens to hundreds. The process of the embodiment of the present invention includes the following steps:
[0039] Step 1: Pre-process the civil aviation accident report data to screen and standardize the reports for processing.
[0040] Preprocessing includes two steps: data screening and spelling standardization. Data screening is based on whether the report content analyzes the background of the accident, the state of the aircraft at the time of the accident, and the cause of the accident. If the report contains the above content, it can be used as data extracted from the cause of the accident. Spelling standardization is to correct typos in accident reports and standardize abbreviations and synonyms. For example, nouns describing engines such as "left engine" and "first engine" are replaced with "engine". This can avoid feature representation errors caused by text description deviations.
[0041] Step 2: Perform Chinese word segmentation and part-of-speech recognition on the preprocessed report and remove stop words.
[0042] Chinese word segmentation is mainly to split the complete report into words with structural order. There is no formal separator between different words in Chinese expression, so it is necessary to segment the sentence through word segmentation to make it a word with independent meaning in the current context. Chinese word segmentation can be completed using the Python software package Jieba. In order to avoid separating some complex professional words during classification, it is necessary to analyze the text content and build a professional dictionary in the field of civil aviation.
[0043] After Chinese word segmentation, part-of-speech recognition is required, and a part-of-speech table corresponding to professional vocabulary is established. Part-of-speech recognition mainly analyzes the part-of-speech of each word in a sentence, and recognizes nouns, verbs, gerunds, adverbs, adjectives, adverbs, quantifiers, pronouns, conjunctions, prepositions, auxiliary words, etc. It can be implemented using Python's jieba package. For example, "situational awareness" often appears as a noun in reports, meaning that the crew lost the ability to perceive the surrounding environment during the flight and could not make a judgment on the next action, while "awareness" is often used as a verb in reports, meaning the awareness of a certain situation. The reasons identified in these two cases will also be different. In the report description, "loss of situational awareness" or "lack of situational awareness" will be identified as H1 pilot misjudgment, and "unawareness" will be identified as H5 pilot distraction and negligence. For example, the adjective "cautious" can be identified as H5 pilot distraction and negligence with corresponding adverbs such as "insufficient" and "not enough".
[0044] After the part-of-speech recognition, stop words need to be removed. Stop words include pronouns, articles, modal particles, conjunctions, adverbs, etc., such as "de" and "yihou". When representing units based on words, stop words do not convey any meaning. The stop word list can be obtained by expanding the word list publicly provided by Harbin Institute of Technology.
[0045] Step 3: Select words with high tf-idf values as the text features of the report for classification.
[0046] Selecting the words that can maximize the representation of text information as the basis for classification can achieve better classification results. Feature selection can achieve dimensionality reduction of data. To distinguish documents of different categories, the distribution of words used as features in texts of different categories must be different. The greater the difference, the more important this word is for classification. The importance of a single word is measured by the tf-idf value calculated by the following formula:
[0047]
[0048] In the formula, x ik is the importance measure of word i in category k, that is, the tf-idf value; f ik is the frequency of word i appearing in the documents of category k; N is the total number of documents; n i is the number of documents containing word i, n i The larger the value, the more important this word is for this type of document.
[0049] Sort the words in the text according to the tf-idf values from large to small. In this embodiment, the first 300 are selected to form a dictionary as the features of this text for classification.
[0050] Step 4: Vectorize the report text to form a dataset available for classification.
[0051] Each text is represented as a vector of the same length as the number of words in the dictionary, and the corresponding numerical vector of the text is assigned a value according to the number of times a certain word appears in the text. The value corresponding to the word that does not appear is 0, forming a dataset available for classification. Subsequently, the dataset is separated into a training set and a test set. The training set is used to train the alternative classification models, and the test set is used to evaluate the classification effect of the alternative classification models.
[0052] Step 5: Select the best classifier to classify the report text to obtain the accident category.
[0053] This embodiment selects a logistic regression classifier, a linear support vector classifier, a support vector classifier, a random forest classifier, a gradient boosting classifier and an XGBoost classifier according to the classifier feature, and the number of feature words increases in units of 10.
[0054] For multi-classification models, Precision reflects the proportion of samples that are judged to belong to the class, Recall reflects the ratio of the number of samples identified to the total number of samples, and F 1i It combines Precision and Recall to ensure that both are not too low. The calculation method of the three indicators is as follows:
[0055]
[0056]
[0057]
[0058] In the formula, TP (True Positive) is the number of correctly classified items in each category, FP (False Positive) is the number of items that do not belong to this category but are mistakenly identified, and FN (False Negative) is the number of items that belong to this category but are identified as other categories.
[0059] Taking the classifier and the number of feature words as independent variables, the six classifiers are first trained using the training set, and then the classification effects of each classifier are compared using the test set. The categories of accidents in the report include bird strikes, deviations from procedures, mechanical failures, ground operations, landing problems, engine shutdowns, environmental accidents, cockpit safety, communication interruptions, floor scraping, and others, a total of ten categories. Considering the data imbalance between different accident categories, the relevant indicators of each type of report are weighted according to the percentage of each type of accident report in the test set in the total report, and WEIGHTED-F1 is obtained as the performance evaluation of the classifier. The calculation method is as follows:
[0060]
[0061] Where k is the number of accident report categories, N is the total number of accident reports, and n is the total number of accident reports. i is the number of reports of category i, F 1i The F1 value of the test machine classification result is reported for the i-th category, and WEIGHTED-F1 is the weighted F1 value.
[0062] like Figure 2 As shown in the figure, the best classifier is XGBoost, and the number of feature words corresponding to the best classification effect is 250. The classification effects of the other classifiers have not changed much. This trend becomes increasingly obvious after the number of words reaches 200, which means that words with low TF-IDF values have no significant effect on text classification, or the classification effect has reached the optimal level, but the classification effect will fluctuate as the number of feature words increases. After determining the classifier and the corresponding optimal number of feature words, the best parameters of the classifier are obtained through grid search.
[0063] Step 6: Establish cause identification rules to extract the cause of the accident.
[0064] The causes of accidents are usually classified into four categories: equipment, personnel, environment and organization. Each of the four categories contains multiple specific causes, as shown in Table 1.
[0065] Table 1 Causes and classification of accidents
[0066]
[0067]
[0068] Each sentence in the accident report can be regarded as a combination of different elements. According to the daily description habits, recognition rules are set based on the occurrence of different categories of words in the same description: for environmental reasons, only relevant environmental keywords need to be identified, equipment reasons are usually directly described, and the descriptions of human and organizational reasons are mostly a combination of subject, predicate and complement. In the description of the accident, the subject provides the responsible unit, the predicate indicates a certain action or decision of the subject, and the complement evaluates the predicate to determine whether this behavior will have an impact on the occurrence of the accident.
[0069] The following is an explanation of the cause extraction process using two examples of reports in Table 2. For example, the subjects in Report 1 include "crew" and "maintenance". After detecting the subject of the cause, words describing the subject's behavior or state are searched within its adaptation range, such as "estimate", "analyze", "check", etc. Since these words cannot indicate whether the behavior is correct or not, further words evaluating the performance are searched. These words usually appear in the same sentence, and are often judged in combination with the spatial distance between words related to the action, such as "not enough", "insufficient", "not timely", etc. For causes such as environmental factors, only keywords need to be identified. For example, the "thunderstorm" in Report 1, even if it is not the main cause of the accident, will be used as the background of the accident. Equipment causes are often described directly. In Report 2, the rapid decline of engine lubricating oil and engine oil leakage mean that the power system is difficult to operate, while thread wear corresponds to component failure.
[0070] It can be seen that if a certain error occurs multiple times during operation, it may be described multiple times in the report, and detecting only one of them is sufficient to determine it, which can ensure a high recognition rate during extraction.
[0071] Table 2 Examples of using rules to identify causes
[0072]
[0073] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A method for processing civil aviation accident reports based on machine learning and rule matching, characterized in that: The steps include: Step 1: pre-process the civil aviation accident report data, screen and standardize the reports for processing; Step 2: Perform Chinese word segmentation and part-of-speech recognition on the preprocessed report, and remove stop words; Step 3, select words with high tf-idf values as text features of the report for classification; Step 4: vectorize the report text to form a data set that can be used for classification; Represent each text as a vector with the same length as the number of words in the dictionary, and assign a value to the numerical vector corresponding to the text according to the number of times a word appears in the text. The value corresponding to the word that does not appear is 0, forming a data set that can be used for classification; Step 5, select the best classifier to classify the report text and obtain the accident category; Step 6: Establish cause identification rules to extract the cause of the accident.
2. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 1, characterized in that: The preprocessing in step 1 includes two steps: data screening and spelling standardization. Data screening is based on whether the report content analyzes the background of the accident, the status of the aircraft at the time of the accident, and the cause of the accident. If the report contains the above content, it can be used as data extracted from the cause of the accident; spelling standardization is to correct typos in the accident report and standardize abbreviations and synonyms to avoid feature representation errors due to text description deviations.
3. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 2, characterized in that: In step 2, the sentence is segmented by word segmentation to make it into words with independent meaning in the current context; in order to avoid separating some complex professional vocabulary during classification, it is also necessary to analyze the text content and construct a professional dictionary in the field of civil aviation; after Chinese word segmentation, part-of-speech recognition is required, and a part-of-speech table corresponding to professional vocabulary is established; part-of-speech recognition mainly analyzes the part-of-speech of each word in the sentence, and the recognized parts of speech include nouns, verbs, gerunds, verb adverbs, adjectives, adverbs, quantifiers, pronouns, conjunctions, prepositions, and auxiliary words. After the part-of-speech recognition is completed, stop words need to be removed, including pronouns, articles, modal auxiliary words, conjunctions, and adverbs.
4. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 3, characterized in that: In step 3, choosing words that can maximize the representation of text information as the basis for classification can achieve better classification results; feature selection can achieve data dimensionality reduction. In order to distinguish documents of different categories, the distribution of words as features in texts of different categories must be different. The greater the difference, the more important the word is for classification; the importance of a single word is measured by the tf-idf value calculated by the following formula: In the formula, x ik is the importance measure of word i in category k, that is, the tf-idf value; f ik is the frequency of word i in documents of category k; N is the total number of documents; n i is the number of documents containing word i, n i The larger the value, the more important the word is to this document; Sort the words in the text according to the tf-idf value from large to small, and select the first M words to form the dictionary as the features of the text for classification.
5. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 4, characterized in that: In step 4, the data set is separated into a training set and a test set, wherein the training set is used to train the alternative classification model, and the test set is used to evaluate the classification effect of the alternative classification model.
6. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 5, characterized in that: The classifiers in step 5 include logistic regression classifier, linear support vector classifier, support vector classifier, random forest classifier, gradient boosting classifier and XGBoost classifier; taking the classifier and the number of feature words as independent variables, firstly use the training set to train multiple classifiers, and then use the test set to compare the classification effects of each classifier; considering the data imbalance between different accident categories, the indicator F1 of each type of report is weighted according to the percentage of each type of accident report in the test set in the total reports, and WEIGHTED-F1 is obtained as the performance evaluation of the classifier, which is calculated as follows: Where k is the number of accident report categories, N is the total number of accident reports, and n is the total number of accident reports. i is the number of reports of category i, F 1i The F1 value of the test machine classification result is reported for the i-th category, and WEIGHTED-F1 is the weighted F1 value; F 1i The calculation method is as follows: In the formula, Precision reflects the proportion of the samples that are judged to belong to the class, Recall reflects the ratio of the number of samples identified to the total number of samples, and F 1i It combines Precision and Recall to ensure that neither is too low; The calculation method of Precision and Recall is as follows: Where: TP is the number of correctly classified items in each category, FP is the number of items that do not belong to this category but are incorrectly identified, and FN is the number of items that belong to this category but are identified as other categories; After determining the classifier and the corresponding optimal number of feature words, the optimal parameters of the classifier are obtained through grid search.
7. A method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 6, characterized in that: In step 6, the causes of the accident are classified into four categories: equipment, personnel, environment and organization. Each of the four categories contains multiple specific causes. Equipment causes include power system failure, component failure, landing gear and tire failure, electrical and control system failure, autopilot failure and sensor failure, communication equipment disconnection, design defects, and cabin equipment failure. Environmental causes include bird strikes, slippery runways, low visibility and bad weather, wind shear, crew disability or passenger discomfort, foreign object attacks, and special terrain. Human causes include pilot misjudgment, pilot violation of regulations, pilot inadequate preparation, poor cockpit resource management, pilot distraction and negligence, ground crew operational errors, and failure of communication between the cockpit and air traffic control due to human causes. Organizational causes include incomplete flight procedures, insufficient supervision of operational practices, and insufficient employee safety training.
8. The method for processing civil aviation accident reports based on machine learning and rule matching as claimed in claim 7, characterized in that: Each sentence in the accident report in step 6 can be regarded as a combination of different elements. According to daily description habits, recognition rules are set based on the occurrence of different category words in the same description: for environmental reasons, only relevant environmental keywords need to be identified, equipment reasons are usually directly described, and the descriptions of human reasons and organizational reasons are mostly combinations of subject, predicate and complement; in the description of the accident, the subject provides the responsible unit, the predicate indicates a certain action or decision of the subject, and the complement evaluates the predicate to determine whether this behavior will affect the occurrence of the accident.
