A method for automatic parsing of military scenario text based on deep learning

By automatically parsing military scenario texts through deep learning technology, the problems of inconsistent content and inefficient parameter configuration in military scenario development are solved, and efficient and standardized scenario file generation is achieved to meet the needs of large-scale simulation.

CN115659952BActive Publication Date: 2025-09-12BEIJING SIMULATION CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111515766.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-09-12
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

The existing military scenario development has problems such as inconsistent content, poor reusability and low parameter configuration efficiency, which makes it difficult to meet the needs of large-scale system confrontation simulation.

Method used

A deep learning-based method is used to process and tag military scenario text data samples, perform word frequency analysis, extract keywords and classify them, and use a Bi-LSTM-CRF model to supplement keyword extraction to generate a standard format scenario file that meets the requirements of the national military standard.

Benefits of technology

The development efficiency, reusability and scalability of military scenario files have been improved. The generated files meet the requirements of cross-platform use and can meet the development needs of large-scale system confrontation simulation scenario files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659952B_ABST
    Figure CN115659952B_ABST
Patent Text Reader

Abstract

This application embodiment discloses a method for automatically parsing military scenario text based on deep learning, including: processing and labeling military scenario text data samples to obtain labeled samples; performing word frequency analysis on topics related to military scenarios in web resources to obtain a first parsing dictionary, then traversing the labeled samples to obtain a second parsing dictionary, and combining the first and second parsing dictionaries to generate a parsing dictionary; extracting keywords from the military scenario text to be parsed based on the parsing dictionary, and using a Bi-LSTM-CRF model to perform supplementary keyword extraction to obtain extracted keywords; classifying and estimating the extracted keywords to obtain keyword classifications; and generating a military scenario file based on the extracted keywords and keyword classifications. This application improves the development efficiency, reusability, and scalability of large-scale military scenario files, and to a certain extent, addresses the shortcomings of traditional scenario development methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automatic text recognition, and more specifically, to a method for automatic parsing of military scenario text based on deep learning. Background Art

[0002] Military operations research is fundamental to improving military combat capabilities and a means to enhance the combat capabilities of military personnel, weapons, and equipment. With the DARPA Strategic Technology Office's formal proposal of the "Mosaic Warfare" concept in 2017, the concepts of systemic competition and confrontation have been further deepened. Asymmetric advantages in combat are achieved through the combination and collaboration of cross-domain resources across land, sea, air, space, electronic warfare, and cyberspace. Against this backdrop, military combat systems will become extremely complex. Traditional military exercises, with their high costs and long cycles, are no longer sufficient to meet the demands of combat and equipment research. With the advancement of computer technology, simulation-based combat simulations and equipment capability verification have become highly effective. Scenario generation is a crucial step in the military simulation process. Through these scenarios, the force deployments and combat plans of both sides are configured, thereby establishing relationships between all entities to meet the requirements of military combat simulation. Therefore, military scenarios serve as a crucial medium for communication between military personnel and computers. Standardizing and formalizing the description of military scenarios so that they can be understood and processed by computers is a crucial prerequisite for successful military simulation.

[0003] Currently, my country's military scenario development faces two challenges: 1) The scenarios themselves: inconsistent scenario content across universities and units leads to incomplete scenarios, poor reusability, and poor scalability. 2) Scenario generation methods: Traditionally, military scenario generation relies on military personnel collecting and organizing relevant data based on the issues being studied in a combat simulation and then developing them according to a development plan. In the context of system-of-systems confrontation, exemplified by "mosaic warfare," military scenarios must encompass global battlefield information, combat entity information, inter-entity coordination, command, confrontation, battlefield situation analysis, combat plan selection, and operational effectiveness analysis. This process requires extensive parameter configuration, but manual parameter configuration is extremely inefficient and cannot meet the demands of large-scale system-of-systems confrontation simulations. Summary of the Invention

[0004] In recent years, the emergence of deep learning and natural language processing (NLP) technologies has provided an effective solution for the automated generation of military scenarios. Natural language processing (NLP) is the theory and methodology for studying the communication between computers and human language. With the development of machine learning and big data technologies, computers are now able to capture key information from human language. In summary, this application applies NLP technology to the field of military scenario development to address the shortcomings of traditional scenario development methods.

[0005] Therefore, this application provides a deep learning-based automatic parsing method for military scenario text, which can improve the development efficiency, reusability and scalability of large-scale military scenario files.

[0006] In order to achieve at least one of the above objectives, the present application adopts the following technical solutions:

[0007] The first aspect of the present application provides a method for automatically parsing military scenario text based on deep learning, comprising:

[0008] S1. Process and label military scenario text data samples to obtain labeled samples;

[0009] S2. Performing a word frequency analysis on topics related to military scenarios in Web resources to obtain a first parsing dictionary, then traversing the labeled samples to obtain a second parsing dictionary, and combining the first parsing dictionary and the second parsing dictionary to generate a parsing dictionary;

[0010] S3, extracting keywords from the labeled sample according to the parsing dictionary, and using the Bi-LSTM-CRF model to perform supplementary keyword extraction to obtain extracted keywords;

[0011] S4, classifying and estimating the extracted keywords to obtain keyword classification;

[0012] S5. The military scenario text to be parsed is subjected to steps S1-S4 to extract parsed keywords and categorize parsed keywords, and then filled into a parameterized template to generate a military scenario file.

[0013] In a specific embodiment, the S1 further includes:

[0014] S11. Obtain military scenario text data samples;

[0015] S12, deduplicating, cleaning, and screening the military scenario text data sample to obtain a screened sample;

[0016] S13, dividing the screened samples into four parts, one as a validation set, and three as training sets, namely the first training set, the second training set, and the third training set;

[0017] S14. Manually label the first training set in a labeling format of <label, term>, label the second training set and the third training set using a generative adversarial network method, and compare and verify them with the validation set to obtain labeled samples.

[0018] In a specific embodiment, the S12

[0019] Using a clustering algorithm to remove duplicates and clean the military scenario text data samples;

[0020] Using an unbalanced data evaluation method to screen the military scenario text data sample to obtain a screened sample;

[0021] The cleaning step is to remove paragraphs that do not contain scenario information from the military scenario text data sample.

[0022] In a specific embodiment, the S2 includes:

[0023] S21. Setting weights for topics in military scenario-related fields to form topic feature vectors;

[0024] S22, screening out relevant web pages from the web resources according to the subject feature vector, and extracting relevant content from the web pages to obtain extracted resources;

[0025] S23, using HTML tidy tool to perform standardization processing on the extracted resources to generate corresponding XML format files;

[0026] S24, performing word frequency analysis on the XML format file, extracting domain terms with high occurrence frequency to obtain a first parsing dictionary in the form of <domain, term>;

[0027] S25, traversing the tags in the tag sample, obtaining the domain terms in the tags to obtain a second parsing dictionary in the form of <domain, term>;

[0028] S26: The first parsing dictionary and the second parsing dictionary are combined to form a parsing dictionary.

[0029] In a specific embodiment, the S22 further includes:

[0030] Setting a threshold for the relevance of web resources to the topic;

[0031] Use search engines to search for topics related to military scenarios and obtain relevant web resources.

[0032] generating a weight vector of the Web based on the weight set for the topic and content related to the topic in the Web resources;

[0033] The cosine value of the topic feature vector and the weight vector is calculated, and the corresponding Web resource information whose cosine value exceeds a set threshold is retained to obtain the extracted resource.

[0034] In a specific embodiment, the S3 further includes:

[0035] S31, constructing a Trie tree according to the parsing dictionary, and extracting keywords from the labeled sample according to the Trie tree to obtain first extracted keywords;

[0036] S32. Convert the labeled sample into a first word vector in matrix form using a word2vector model, as input to a Bi-LSTM-CRF model, where the first word vector includes context information of the keyword;

[0037] S33. Use the Bi-LSTM-CRF model to extract supplementary keywords from the first word vector to obtain second extracted keywords;

[0038] S34: The first extracted keyword and the supplementary keyword are combined to obtain an extracted keyword.

[0039] In a specific embodiment, the S32 further includes:

[0040] S321. Select entries from Baidu Encyclopedia as word2vector samples, and segment the word2vector samples using an LTP word segmentation tool to obtain labeled word2vector training samples.

[0041] S322, using CBOW and skip-gram algorithms to train the word2vector model using the word2vector training sample to obtain a target word vector;

[0042] S323. Use the trained word3vector model to convert the labeled sample into a first word vector in matrix form.

[0043] In a specific embodiment, the S33 further includes:

[0044] S331, splitting the first word vector into individual characters using a character model, and annotating the character sequence using a BIOE annotation system to obtain an annotated character sequence set;

[0045] S332, converting the word sequence set into a training format that conforms to the Bi-LSTM model input to obtain a word sequence training set;

[0046] S333, inputting the word sequence training set into the Bi-LSTM model, and training the word sequence training set to obtain a labeled word vector matrix;

[0047] S334: Input the labeled word vector matrix into the CRF model for training, and output a combination of the text sequence and the label sequence to obtain supplementary keywords.

[0048] In a specific embodiment, the S4 further includes:

[0049] S41, using the word2vector model to vectorize the extracted keywords and organize them into a second word vector in matrix form;

[0050] S42. Use the trained MLPCNN model to classify the second word vector to obtain keyword classification.

[0051] In a specific embodiment, the S5 further includes:

[0052] Fill the parsed extracted keywords and the parsed keyword categories into a parameterized template to generate a scenario file in XML format;

[0053] The parameterized template is <category, keyword, value>.

[0054] The beneficial effects of this application are as follows:

[0055] In response to the problems existing in the current existing technology, this application provides a method for automatic parsing of military scenario texts based on deep learning, which can automatically and quickly extract entity information from scenario text files and generate scenario files that can be recognized by simulation software, thereby improving the development efficiency, reusability and scalability of large-scale military scenario files. This application is based on deep learning and natural language processing methods. It effectively improves the accuracy of word segmentation results and information extraction results through multi-model fusion methods and extended annotation methods, intelligently analyzes the scenario description file, extracts key information therein, and automatically generates a type of scenario file in a standard format, effectively improving the efficiency of scenario file generation, thereby solving the problems of large workload and low efficiency caused by manual configuration of a large number of parameters in the development process of traditional scenario files; at the same time, the scenario files generated using the method provided by this application all meet the standard specifications required by the national military standards, can meet the needs of cross-platform use, have strong versatility, and improve the reusability of the scenario files; the generated scenario files do not depend on the simulation platform and can be further edited, and elements can be added or deleted according to military simulation needs, so that the scenario files have strong scalability, can meet the current large-scale system confrontation simulation scenario file development needs, and to a certain extent improve the defects of traditional scenario development methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0057] Figure 1 A flowchart of a method for automatic parsing of military scenario text based on deep learning in one embodiment of the present application is shown.

[0058] Figure 2A flowchart of a method for performing word frequency analysis on topics in the field of military scenarios related to web resources to obtain a first parsing dictionary is shown in an embodiment of the present application, in which a method for automatically parsing military scenario text based on deep learning is used.

[0059] Figure 3 A flowchart of a method for extracting keywords from a method for automatic parsing of military scenario text based on deep learning in one embodiment of the present application is shown.

[0060] Figure 4 A Bi-LSTM-CRF model architecture diagram of a deep learning-based military scenario text automatic parsing method in one embodiment of the present application is shown.

[0061] Figure 5 An MLPCNN model architecture diagram of an automatic military scenario text parsing method based on deep learning in one embodiment of the present application is shown.

[0062] Figure 6 An example of generating corresponding word vectors for a military scenario text to be parsed is shown in an embodiment of the present application using a method for automatic parsing of military scenario texts based on deep learning. DETAILED DESCRIPTION

[0063] In the following description, for the purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more embodiments. However, it will be apparent that these embodiments may be practiced without these specific details.

[0064] In the description of this application, it should be noted that the terms "upper" and "lower" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be internal communication between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0065] It should also be noted that, in the description of the present application, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0066] In order to solve the problems existing in the prior art, an embodiment of the present application provides a method for automatically parsing military scenario text based on deep learning, such as Figure 1 Shown, including:

[0067] S1. Process and label military scenario text data samples to obtain labeled samples;

[0068] In a specific embodiment, the S1 includes:

[0069] S11. Obtain military scenario text data samples;

[0070] In a specific embodiment, the military scenario text data samples are obtained through various channels such as network collection, various situation forums, daily accumulation of military scenario text data given by Party A during work, and various commercial software such as CMANO.

[0071] S12, deduplicating, cleaning, and screening the military scenario text data sample to obtain a screened sample;

[0072] In a specific embodiment,

[0073] A clustering algorithm is used to remove duplicates and clean non-required data from the military scenario text data sample, for example, to remove overview or summary paragraphs of certain texts in the military scenario text data sample that do not contain scenario information.

[0074] Using an unbalanced data evaluation method to screen the military scenario text data sample to obtain a screened sample;

[0075] S13, dividing the screened samples into four parts, one as a validation set, and three as training sets, namely the first training set, the second training set, and the third training set;

[0076] S14. Manually label the first training set in the format of <label, term>, and label the second and third training sets using a generative adversarial network method to obtain labeled samples;

[0077] In a specific embodiment, the accuracy of labeling can be improved by manually correcting the labeling results and then iterating repeatedly.

[0078] S2. Perform word frequency analysis on topics related to military scenarios in Web resources to obtain the first parsing dictionary, such as Figure 2 As shown, the labeled samples are traversed to obtain a second parsing dictionary, and the first parsing dictionary and the second parsing dictionary are combined to generate a parsing dictionary;

[0079] In a specific embodiment, the S2 includes:

[0080] S21. Setting weights for topics in military scenario-related fields to form topic feature vectors;

[0081] In a specific embodiment, topics in related fields are assumed based on the situation determined by the national military standard, such as place names, weather, combat and equipment names, etc., and weights are manually set for each topic to form a topic feature vector.

[0082] S22, screening out relevant web pages from the web resources according to the subject feature vector, and extracting relevant content from the web pages to obtain extracted resources;

[0083] In a specific embodiment, a threshold value of the relevance between the web resource and the topic is set;

[0084] In a specific embodiment, the threshold is generally 0.5 to 0.9;

[0085] Use search engines to search for topics related to military scenarios and obtain relevant web resources.

[0086] generating a weight vector of the Web based on the weight set for the topic and content related to the topic in the Web resources;

[0087] Calculating the cosine value of the topic feature vector and the weight vector, retaining the corresponding Web resource information whose cosine value exceeds a set threshold, and obtaining the extracted resource;

[0088] In a specific embodiment, the closer the cosine value is to 1, the closer the information contained in the Web resource is to the subject. The calculation result is compared with a set threshold. If the threshold is exceeded, the corresponding Web resource information is retained as the extracted resource.

[0089] S23, using HTML tidy tool to perform standardization processing on the extracted resources to generate corresponding XML format files;

[0090] In a specific embodiment, an HTML tidy tool is used to delete original comments, irrelevant tags, blank tags and other contents in the Web resource to generate a standardized XML format file;

[0091] S24, performing word frequency analysis on the XML format file, extracting domain terms with high occurrence frequency to obtain a first parsing dictionary in the form of <domain, term>;

[0092] In a specific embodiment, all words that appear more than once in an XML format file are obtained, some irrelevant words, such as some adjectives, are deleted, and the words are sorted according to the number of times they appear. The words ranked in the top 10% to 30% are defined as high-frequency words, and a first parsing dictionary in the form of <field, term> is generated.

[0093] S25, traversing the tags in the tag sample, obtaining the domain terms in the tags to obtain a second parsing dictionary in the form of <domain, term>;

[0094] S26: The first parsing dictionary and the second parsing dictionary are combined to form a parsing dictionary.

[0095] S3, extract keywords from the labeled sample according to the parsing dictionary, and use the Bi-LSTM-CRF model to extract supplementary keywords to obtain extracted keywords, such as Figure 3 shown.

[0096] In a specific embodiment, it includes:

[0097] S31, constructing a Trie tree according to the parsing dictionary, and extracting keywords from the labeled sample according to the Trie tree to obtain first extracted keywords;

[0098] A Trie tree is a multi-linked list representation, also known as a dictionary tree. It is suitable for fast lookups of certain types of keywords and is an efficient dictionary keyword matching method. A Trie tree consists of two types of nodes: InsertNode and LeafNode. Each InsertNode contains several LeafNodes, each of which contains a complete keyword and a pointer field to a record.

[0099] In a specific embodiment, the parsing dictionary content is constructed as a Trie tree for extracting keywords from the labeled sample to obtain first extracted keywords;

[0100] In a specific embodiment, the algorithm for constructing a Trie tree is as follows:

[0101] Read the contents of the parsing dictionary, extract character information, and create a leaf node LeafNode;

[0102] Create an index based on the leaf node, traverse the index, and find the current character:

[0103] If the current character does not exist in the current index, create a leaf node for the current character and insert it into the root node of the current index to complete the index update;

[0104] If the current character exists in the current index, the last node of the same part is used as the position to be inserted, and the InsertNode type of the node to be inserted is determined:

[0105] If it is a leaf node, determine whether the characters in the node InsertNode are consistent with the characters in the current leaf node. If they are consistent, determine whether the document information of the current leaf node exists in the node InsertNode. If it exists, end. If not, insert the leaf node into the current position; if they are inconsistent, generate a new branch node for the same operator in the InsertNode and LeafNode characters until different parts appear and insert the LeafNode.

[0106] If it is a branch node, determine the child node type of the branch node InsertNode.

[0107] If it is a leaf node, determine whether the characters in the node InsertNode are consistent with the characters in the current leaf node. If they are consistent, determine whether the document information of the current leaf node exists in the node InsertNode. If so, end the process. If not, insert the leaf node into the current position. If they are inconsistent, generate a new branch node for the same operator in the InsertNode and LeafNode characters, until different parts appear, and insert the LeafNode.

[0108] If it is a branch node, the current leaf node LeafNode is inserted as a child node under this branch node.

[0109] S32. Convert the labeled sample into a first word vector in matrix form using a word2vector model, as input to a Bi-LSTM-CRF model, where the first word vector includes context information of the keyword;

[0110] In a specific embodiment, the word2vector model needs to be trained first, and the various parameter values ​​and initial vector values ​​in the word2vector model need to be continuously updated through repeated training until the objective function reaches a maximum value. At this time, the training of the word2vector model is completed, and the value of the updated word vector obtained is the word2vector model word vector after the word2vector model training, that is, the target word vector is determined by the maximum probability;

[0111] In a specific embodiment, a total of approximately 5 million entries in Baidu Encyclopedia are used as training samples for the word2vector model. The specific training steps include:

[0112] S321. Select entries from Baidu Encyclopedia as word2vector samples, and segment the word2vector samples using an LTP word segmentation tool to obtain labeled word2vector training samples.

[0113] S322, using CBOW and skip-gram algorithms to train the word2vector model using the word2vector training sample to obtain a target word vector;

[0114] S323. Use the trained word3vector model to convert the labeled sample into a first word vector in matrix form.

[0115] In a specific embodiment, assuming C represents the labeled sample, N Indicates the total number of texts, | W |The vocabulary obtained by training the word vectors for the entire labeled sample, d is the dimension of the word vector, w i is any word in the vocabulary.

[0116] Any word w i The word vector can be expressed as:

[0117]

[0118] in, d is the dimension of the word vector, For any word in the vocabulary, Represents any word The word vector of express In dimension dThe probability value of each element represents a probability value, then the matrix of word vectors output by the word2vec model will be converted from the labeled sample Expressed as:

[0119]

[0120] S33. Use the Bi-LSTM-CRF model to extract supplementary keywords from the first word vector to obtain second extracted keywords;

[0121] In a specific embodiment, if the keyword results extracted based solely on the parsing dictionary are difficult to meet the needs of actual applications, firstly, considering the limited integrity and comprehensiveness of the dictionary, it may not be possible to extract all the content in the sample through matching; secondly, the dictionary-based keyword extraction method relies on templates and also has stricter requirements on the scale and type of training samples. Therefore, preferably, this application uses the Bi-LSTM-CRF model to supplement keyword extraction to enhance the generalization of keyword extraction capabilities.

[0122] The Bi-LSTM model plays an important role in the field of natural language processing. It is composed of a forward LSTM and a backward LSTM. The output of the Bi-LSTM model is related to the data at the previous moment and the data predicted at the next moment. At the same time, it solves the gradient vanishing problem that exists in the training process of traditional recurrent neural networks. However, after learning the contextual association information, the output layer of the Bi-LSTM independently labels each word and cannot guarantee the correct output result. Therefore, this application further solves this problem through the conditional random field model (CRF).

[0123] In a specific embodiment, the S33 includes:

[0124] S331, splitting the first word vector into individual characters using a character model, and annotating the character sequence using a BIOE annotation system to obtain an annotated character sequence set;

[0125] Among them, in the BIOE annotation system, B (begin) is the beginning character of the keyword, E (end) is the ending character of the keyword, I (inside) is all the words between B and E of the keyword, and O represents non-entity words.

[0126] S332, converting the word sequence set into a training format that conforms to the Bi-LSTM model input to obtain a word sequence training set;

[0127] S333, inputting the word sequence training set into the Bi-LSTM model, and training the word sequence training set to obtain a labeled word vector matrix;

[0128] S334: Input the labeled word vector matrix into a CRF model for training, and output a combination of a text sequence and a label sequence to obtain supplementary keywords;

[0129] S34: The first extracted keyword and the second keyword are combined to obtain an extracted keyword.

[0130] S4, classifying and estimating the extracted keywords to obtain keyword classification;

[0131] In a specific embodiment, it includes:

[0132] S41, using the word2vector model to vectorize the extracted keywords and organize them into a second word vector in matrix form;

[0133] S42. Use the trained MLPCNN model to classify the second word vector to obtain keyword classification.

[0134] S5. Analyze the military scenario text to be analyzed using steps S1-S4 to extract keywords and classify the keywords, then fill in the parameterized template to generate a military scenario file.

[0135] In a specific embodiment, it includes:

[0136] Use the Trie tree to extract keywords based on the parsing dictionary from the military scenario text to be parsed, and obtain the first extracted keywords;

[0137] The military scenario text to be parsed is converted into a first word vector in matrix form using the word2vector model, that is, the text is converted into a fixed-dimensional digital vector as the input of the Bi-LSTM-CRF model;

[0138] Use the Bi-LSTM-CRF model to extract supplementary keywords from the first word vector to obtain the second extracted keywords;

[0139] The first extracted keywords and the second extracted keywords are combined as the final parsing and extraction keyword results;

[0140] Use the word2vector model to convert the extracted keywords into a second word vector in matrix form;

[0141] Use the MLPCNN model to classify the second word vector to obtain the parsed keyword classification;

[0142] Fill the parsed extracted keywords and the parsed keyword categories into a parameterized template to generate a scenario file in XML format;

[0143] In a specific embodiment, the parameterized template is <category, keyword, value>.

[0144] This application also provides a specific embodiment to illustrate the present application:

[0145] In a specific embodiment,

[0146] S1. Collect some military scenario text data samples from the CMANO software online. Use a clustering algorithm to deduplicate and cleanse the military scenario text data samples, removing all special symbols from the documents. Use an imbalanced data evaluation method to filter the samples to obtain a filtered sample. Due to the small number of samples and the absence of duplication, the deduplication and filtering steps are relatively ineffective in this example. The filtered sample is randomly divided into four parts, one of which serves as a validation set and the remaining three as training sets. Take one of the training sets as an example. The filtered sample is divided into six sections: situation description, friendly and enemy force deployment, mission, execution, and logistics. The friendly and enemy force deployment section contains the required equipment entity type, model, name, and other information. The mission, execution, and logistics sections contain equipment deployment location, route, and movement information.

[0147] Before generating the parsing dictionary and extracting information, the samples need to be marked to indicate the content to be extracted in each paragraph and the classification of the content. If there is no clear content to be extracted in a paragraph, it is marked as NULL at the end. Subsequently, the content of each paragraph is extracted in turn according to the labels such as entity type, entity name, entity model, force, deployment location, waypoint, speed, payload type, and payload, and marked after the paragraph. The label content refers to GJB 9364-2018 "Content and Format of Electronic Countermeasure Combat Simulation Scenario Data Exchange" to obtain the marked sample.

[0148] Taking the military scenario text data sample "Anti-submarine formation A: M-type ship a (G class), VK-type ship b (W class), N-type ship c (X class), T-type ship d (L class)" as an example, it contains the names of four enemy entities (M, VK, N, T), four entity types (type a ship, type b ship, type c ship, type d ship) and four entity models (G class, W class, X class, L class). This sentence sample is marked with the format of <label, term>.

[0149] The marked sample is: "Anti-submarine formation A: M-type a-ship (G-class), VK-type b-ship (W-class), N-type c-ship (X-class), T-type d-ship (L-class) Entity types: a-type ship, b-type ship, c-type ship, d-type ship; Entity names: M, VK, N, T; Entity models: G-class, W-class, X-class, L-class;".

[0150] The remaining two data sets are labeled using a generative adversarial network method. By manually correcting the labeling results and iterating repeatedly, the accuracy of labeling can be improved to obtain labeled samples.

[0151] Preferably, when there are fewer samples, all samples can be manually labeled.

[0152] S2. Based on the military scenario-related topics identified in the GJB 9364-2018 standard, such as place names, weather, combat operations, and equipment names, weights are manually assigned to each topic to form a topic feature vector. Relevant web pages are screened from the web resources based on the topic feature vector, and relevant content is extracted from the web pages to obtain extracted resources.

[0153] The threshold of the relevance between web resources and the topic is set to 0.9;

[0154] Using a search engine to search for topics in the field related to military scenarios to obtain web resources related to the topics; generating a web weight vector based on the weight set for the topics and the content related to the topics in the web resources; calculating the cosine value of the topic feature vector and the weight vector, retaining web resource information corresponding to cosine values ​​exceeding a set threshold of 0.9, and obtaining extracted resources;

[0155] Using the HTML tidy tool to delete existing comments, irrelevant tags, and blank tags in the Web resource to generate a standardized XML format file; performing a word frequency analysis on the XML format file to extract domain terms that appear more than three times, and obtaining a first parsing dictionary in the form of <domain, term>;

[0156] Traverse the tags in the tag sample, obtain the domain terms in the tags to obtain a second parsing dictionary in the form of <domain, term>; that is, add the terms "type a ship, type b ship, type c ship, type d ship, M number, VK number, N number, T number, G class, W class, X class, L class" to the first parsing dictionary to generate a parsing dictionary.

[0157] S3. Construct a Trie tree based on the parsing dictionary. The Trie tree is used to store the keywords in the labeled sample "Entity Type: Type A Ship, Type B Ship, Type C Ship, Type D Ship; Entity Name: M, VK, N, T; Entity Model: G Class, W Class, X Class, L Class;", ignoring the category information therein, and completing the extraction of the first extracted keyword through the constructed Trie tree;

[0158] The labeled sample is converted into a first word vector in matrix form by a word2vector model as input to the Bi-LSTM-CRF model, where the first word vector contains context information of the keyword;

[0159] First, the word2vector model is trained. It is necessary to continuously update the parameter values ​​and initial vector values ​​in the word2vector model through repeated training until the objective function reaches the maximum value. At this time, the training of the word2vector model is completed, and the value of the updated word vector is the word2vector model word vector after the word2vector model training, that is, the target word vector is determined by the maximum probability;

[0160] Entries in Baidu Encyclopedia are selected as word2vector samples, and the word2vector samples are segmented using the LTP word segmentation tool to obtain labeled word2vector training samples; the word2vector model is trained using the word2vector training samples using the CBOW and skip-gram algorithms to obtain the target word vector; the trained word3vector model is used to convert the labeled sample into the first word vector in matrix form.

[0161] Using the Bi-LSTM-CRF model, the Bi-LSTM-CRF model architecture is as follows Figure 4 As shown, the first word vector is supplemented with keywords to obtain second extracted keywords;

[0162] The method includes: splitting the first word vector into single words using a character model, annotating the character sequence using the BIOE annotation system, and obtaining an annotated character sequence set; character-based core entity recognition is to separate each character in the text into a line, with a blank line as the end mark of a text, and the character model marking method of the marked sample is as follows:

[0163] Anti-submarine formation A: M-type a-ship (G-class), VK-type b-ship (W-class)...

[0164] OOOOOOOOOO BIIIIIEBIIIIEOBIEOO BIIIIIIIIIIIIEBIIIEOBIEO…

[0165] The word sequence set is converted into a training format that conforms to the input of the Bi-LSTM model to obtain a word sequence training set; the word sequence training set is input into the Bi-LSTM model, and the word sequence training set is trained to obtain a labeled word vector matrix; the labeled word vector matrix is ​​input into the CRF model for training, and a combination of a text sequence and a label sequence is output to obtain a supplementary keyword; the first extracted keyword and the supplementary keyword are combined to obtain an extracted keyword.

[0166] S4. Use the word2vector model to represent the extracted keywords in vector form, generating a 128-dimensional digital vector. The input dimension of the MLPCNN model can be set according to requirements; the classification of keywords is a 9-dimensional vector representing the probability of the keyword corresponding category, including "entity type", "entity name", "entity model", "deployment location", "munition model", "munition load", "waypoint", "speed", and "force" contained in the training samples. For example, if the output is [1, 0, 0, 0, 0, 0, 0, 0, 0], it means that the input keyword belongs to the category of "entity type", and the second word vector is obtained;

[0167] In this way, the labeled samples are generated into a sample that can be used for the MLPCNN model, and the MLPCNN model is trained using the algorithm described in Table 1. The architecture diagram of the MLPCNN model is as Figure 5 shown. Use the trained MLPCNN model to classify the second word vector to obtain the keyword classification;

[0168]

[0169] Table 1

[0170] S5. Use the steps of S1 - S4 for the military scenario text to be parsed to obtain the parsed extracted keywords and parsed keyword classifications, and fill them into the parameterized template to generate the military scenario file; [[ID=??]]

[0171] In a specific embodiment, the military scenario text to be parsed is "Our ship of type a, model M (G - class) is deployed at port Y";

[0172] Use the Trie tree to perform keyword extraction based on the parsing dictionary for the military scenario text to be parsed, and obtain the first extracted keywords as follows:

[0173] "I": None;

[0174] "Side": None;

[0175] "M": Model M;

[0176] ……

[0177] "a": Ship of type a;

[0178] "G": G - class;

[0179] "Deploy": None;

[0180] * ……

[0181] "Port": None;

[0182] "Entrance": None.

[0183] Note: There seems to be a problem with the "??" in the translation of line 15. It should be the same as the original ID number in the source text, but it's not clear in the original what it should be. Here it's just marked as "??" for the purpose of showing the translation process.Through the Trie tree-based keyword extraction, only the first extracted keywords of "M-number," "Type A ship," and "G-class" were obtained. Subsequently, the military scenario text to be parsed needs to be further extracted using the Bi-LSTM-CRF model method.

[0184] The military scenario text to be parsed is converted into a first word vector in matrix form using the word2vector model. In this embodiment, the dimension of the first word vector is selected to be 64, and the military scenario text to be parsed is mapped into a 21*64 matrix and stored in CSV format. Each dimension of data represents a probability value, such as Figure 6 shown.

[0185] The generated first word vector is further extracted through the Bi-LSTM-CRF model, and the content of the first word vector is labeled with "BIEO". That is, the Bi-LSTM-CRF model classifies the 64-dimensional vector mapped by each word to determine which category the current word belongs to: "B", "I", "E", or "O". The final model output is: OOBIIIIIIIIIEOOOBIIIE, and the corresponding words between B and E are extracted to obtain the second extracted keywords: "M-type a ship (G-class)" and "Y port".

[0186] The first extracted keyword and the second extracted keyword are combined to obtain "M", "type a ship", "G class" and "Y port" as the final parsing and extraction keyword results;

[0187] The extracted keywords are mapped to the second word vector through the word2vector model to generate two probability matrices of 17*128 and 5*128 as the input of MLPCNN. The second word vector is obtained by classification by the trained MLPCNN:

[0188] Size M:

[0189] [0.236676991,0.990701335,0.312799426,0.771184323,0.638589681, ,0.416547964,0.404660951,0.83289697,0.552704564]T

[0190] "Type A ship":

[0191] [0.90636108,0.456646717,0.584541486,0.62832397,0.836246207,0.036200725,0.343498579,0.539183493,0.463275529] T

[0192] G-Class:

[0193] [0.695382797,0.835350484,0.734542345,0.59778005,0.273224896,0.638435311,0.497535578, 0.7263865,0.463701787] T

[0194] "Y Port":

[0195] [0.555368431,0.682628259,0.302897041,0.933334087,0.041093825,0.392510565,0.196316132,0.696371686,0.91906671] T

[0196] According to the result corresponding to the highest probability, the classification result of each keyword can be determined, and the final extracted content is: <Entity Name: M>, <Entity Type: Type A Ship>, <Entity Model: G Class>, <Deployment Location: Y Port>.

[0197] Fill in the corresponding categories and keywords into the template <category, keyword, value> to generate the corresponding XML file:

[0198] <?xml version = "1.0" encoding="UTF-8"?>

[0199] <Scenario Version="1.0">

[0200] <Basic Information Name=" " Time="">

[0201] <task task="">

[0202] <Entity>

[0203] <Faction ID="">

[0204] <Equipment Name="M" ID="1">

[0205] <Model Name="G Class" Type="a-Type Ship">

[0206] <Deploy our deployment position="Y port" longitude="" latitude="" altitude="">

[0207] <Weapon Information="" Quantity="">

[0208] <Route Information>

[0209] <Equipment\>

[0210] <Faction\>

[0211] <Entity\>

[0212] <Scenario\>

[0213] This application can automatically and quickly extract entity information from scenario text files and generate scenario files that can be recognized by simulation software, improving the development efficiency, reusability, and scalability of large-scale military scenario files. Based on deep learning and natural language processing methods, this application effectively improves the accuracy of word segmentation and information extraction results through multi-model fusion methods and extended annotation methods. It intelligently parses scenario description files, extracts key information, and automatically generates a type of scenario file in a standard format, effectively improving the efficiency of scenario file generation, thereby solving the problems of heavy workload and low efficiency caused by manual parameter configuration in traditional scenario file development. At the same time, the scenario files generated using the method provided by this application all meet the standard specifications required by the national military standards, can meet the needs of cross-platform use, have strong versatility, and improve the reusability of scenario files. The generated scenario files are independent of the simulation platform and can be further edited to add or delete elements according to military simulation needs, making the scenario files highly scalable and able to meet the current needs of large-scale system confrontation simulation scenario file development, to a certain extent improving the defects of traditional scenario development methods.

[0214] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for automatic parsing of military scenario text based on deep learning, characterized by: include: S1. Process and label military scenario text data samples to obtain labeled samples; S2. Performing a word frequency analysis on topics related to military scenarios in Web resources to obtain a first parsing dictionary, then traversing the labeled samples to obtain a second parsing dictionary, and combining the first parsing dictionary and the second parsing dictionary to generate a parsing dictionary; S3, extracting keywords from the labeled sample according to the parsing dictionary, and using the Bi-LSTM-CRF model to perform supplementary keyword extraction to obtain extracted keywords; S4, classifying and estimating the extracted keywords to obtain keyword classification; S5. Analyze the military scenario text to be analyzed using steps S1-S4 to extract keywords and classify the keywords, then fill in the parameterized template to generate a military scenario file. Said S3 further comprises: S31, constructing a Trie tree according to the parsing dictionary, and extracting keywords from the labeled sample according to the Trie tree to obtain first extracted keywords; S32. Convert the labeled sample into a first word vector in matrix form using a word2vector model, as input to a Bi-LSTM-CRF model, where the first word vector includes context information of the keyword; S33. Use the Bi-LSTM-CRF model to extract supplementary keywords from the first word vector to obtain second extracted keywords; S34: The first extracted keyword and the supplementary keyword are combined to obtain an extracted keyword.

2. The method according to claim 1, characterized in that Said S1 further comprises: S11. Obtain military scenario text data samples; S12, deduplicating, cleaning, and screening the military scenario text data sample to obtain a screened sample; S13, dividing the screened samples into four parts, one as a validation set, and three as training sets, namely the first training set, the second training set, and the third training set; S14. Manually label the first training set in a labeling format of <label, term>, label the second training set and the third training set using a generative adversarial network method, and compare and verify them with the validation set to obtain labeled samples.

3. The method according to claim 2, characterized in that The S12 further includes: Using a clustering algorithm to remove duplicates and clean the military scenario text data samples; Using an unbalanced data evaluation method to screen the military scenario text data sample to obtain a screened sample; The cleaning step is to remove paragraphs that do not contain scenario information from the military scenario text data sample.

4. The method according to claim 1, wherein The S2 includes: S21. Setting weights for topics in military scenario-related fields to form topic feature vectors; S22, screening out relevant web pages from the web resources according to the subject feature vector, and extracting relevant content from the web pages to obtain extracted resources; S23, using HTML tidy tool to perform standardization processing on the extracted resources to generate corresponding XML format files; S24, performing word frequency analysis on the XML format file, extracting domain terms with high occurrence frequency to obtain a first parsing dictionary in the form of <domain, term>; S25, traversing the tags in the tag sample, obtaining the domain terms in the tags to obtain a second parsing dictionary in the form of <domain, term>; S26: The first parsing dictionary and the second parsing dictionary are combined to form a parsing dictionary.

5. The method according to claim 4, characterized in that The S22 further includes: Setting a threshold for the relevance of web resources to the topic; Use search engines to search for topics related to military scenarios and obtain relevant web resources. generating a weight vector of the Web based on the weight set for the topic and content related to the topic in the Web resources; The cosine value of the topic feature vector and the weight vector is calculated, and the corresponding Web resource information whose cosine value exceeds a set threshold is retained to obtain the extracted resource.

6. The method according to claim 1, wherein The S32 further includes: S321. Select entries from Baidu Encyclopedia as word2vector samples, and segment the word2vector samples using an LTP word segmentation tool to obtain labeled word2vector training samples. S322, using CBOW and skip-gram algorithms to train the word2vector model using the word2vector training sample to obtain a target word vector; S323. Use the trained word3vector model to convert the labeled sample into a first word vector in matrix form.

7. The method according to claim 6, characterized in that The S33 further includes: S331, splitting the first word vector into individual characters using a character model, and annotating the character sequence using a BIOE annotation system to obtain an annotated character sequence set; S332, converting the word sequence set into a training format that conforms to the Bi-LSTM model input to obtain a word sequence training set; S333, inputting the word sequence training set into the Bi-LSTM model, and training the word sequence training set to obtain a labeled word vector matrix; S334: Input the labeled word vector matrix into the CRF model for training, and output a combination of the text sequence and the label sequence to obtain supplementary keywords.

8. The method according to claim 7, characterized in that Said S4 further comprises: S41, using the word2vector model to vectorize the extracted keywords and organize them into a second word vector in matrix form; S42. Use the trained MLPCNN model to classify the second word vector to obtain keyword classification.

9. The method according to claim 1, characterized in that The S5 further includes: Fill the parsed extracted keywords and the parsed keyword categories into a parameterized template to generate a scenario file in XML format; The parameterized template is <category, keyword, value>.

Citation Information

Patent Citations

  • Network configuring method and system based on scenario distribution type simulation

    CN106878095A

  • Text processing method and device, server and computer readable storage medium

    CN112307175A