Simulation data arranging and packaging method and device, equipment and medium
By automatically arranging simulation training data through sentence processing of military defining files and the analysis of information extraction model, we solve the problem of high overhead and limited analysis accuracy of manual allocation of massive data, and realize automated data preparation and efficient simulation training .
Patent Information
- Application Number
- CN202411109596.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, simulation training requires manual reading and assembly of massive data, resulting in high manual processing overhead and limited parsing accuracy, and the inability to effectively utilize document structure features.
By obtaining military definition files, processing sentences to generate span sequences, using combat element dictionary and span-based information extraction model for analysis, automatically fill in query statements and extracting relevant data from the database, encapsulate them into combat element data units, and build an installation program.
It realizes automated data preparation for simulation training, reduces manual participation, improves data analysis accuracy and efficiency, and can effectively utilize document structure features.
Smart Images

Figure CN118941431A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation technology, and in particular to a method, device, equipment and medium for arranging and packaging simulation data. Background Art
[0002] Mission scenarios are assumptions about the basic situation, intentions, and development of the mission for both parties. They are usually described in semi-structured text form to describe the key elements involved in the real-time process of the mission. All training conducted in the field of training simulation is based on scenarios. In particular, for the construction of simulation training systems, it is necessary to prepare various models and data based on the scenarios before conducting training.
[0003] The data resources constructed through data engineering solve the problem of data sources required for simulation training. However, in order to meet the actual training needs, personnel currently need to manually read the task scenario, search from the massive training-related data according to the task scenario content, and manually arrange and combine the searched data reasonably, and sort out the internal connections between the data, so as to form a data application set to support simulation training. This requires personnel to have a high level of relevant knowledge and literacy, and also consumes a lot of manual processing overhead. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, equipment and medium for arranging and packaging simulation data that can provide automated data preparation support for simulation training in response to the above technical problems.
[0005] A method for arranging and packaging simulation data, the method comprising:
[0006] Obtain military scenario documents;
[0007] Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0008] According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span;
[0009] Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0010] Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates;
[0011] Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0012] The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
[0013] In one embodiment, the combat element dictionary is constructed based on a plurality of historical military documents. When constructing the combat element dictionary:
[0014] Extract all titles from each of the historical military documents, and segment each title to obtain a corresponding string sequence;
[0015] Using the solidification degree, respectively, two adjacent characters in each of the character string sequences are judged whether they need to be merged, to obtain a merged character string sequence;
[0016] The character strings in all the merged character string sequences are constructed into a set, the set is deduplicated, and the remaining character strings are sorted according to word frequency to obtain the combat element dictionary.
[0017] In one embodiment, the combat element framework includes multiple combat elements and the relationship between the combat elements, wherein the multiple combat elements include: basic elements, assessment elements, organization elements, action elements and equipment elements;
[0018] The basic elements include combat area, combat time, combat mission and combat forces of the opposing sides;
[0019] The evaluation elements include evaluation index information and evaluation method information;
[0020] The organizational elements include the organization of troops and the organizational hierarchical relationship;
[0021] The action elements include combat actions and action rules;
[0022] The equipment elements include equipment assigned to the organization unit, equipment combat performance parameters, equipment mounting equipment, and combat performance parameters of the mounting equipment;
[0023] The relationships between the various combat elements include:
[0024] The basic elements are linked to the assessment elements through combat missions and to the organizational elements through the combat forces of the opposing sides;
[0025] The equipment elements are associated with the organization elements through the equipment information assigned to the organization unit;
[0026] The action elements are associated with equipment elements according to combat actions.
[0027] In one embodiment, when training the span-based information extraction model:
[0028] Obtain military scenario training documents;
[0029] Generate a corresponding plurality of span training sequences and paragraph information training sets according to the military scenario training file and the combat element dictionary;
[0030] Based on the combat element framework, an entity type set and a relationship type set are obtained, wherein the entity type set includes various entity types of interest, and the relationship type set includes multiple relationship types of interest that exist before the entity;
[0031] Annotate each training span in each span training sequence with an entity type according to the entity type set to generate an entity type label set;
[0032] According to the relationship type set, relationship type annotation is performed on the training span pairs having relationships in each of the span training sequences to generate a relationship type label set;
[0033] The span-based information extraction model is trained according to the multiple span training sequences, the paragraph information training set, the entity type label set, and the relationship type label set.
[0034] In one embodiment, the span-based information extraction model includes an input layer, an entity classification layer, and a relationship classification layer connected in sequence;
[0035] The input layer vectorizes each of the span sequences and paragraph information sets through a Bert model to generate an input matrix;
[0036] The entity classification layer calculates the score vector of each span sequence belonging to each entity type in the entity type set through the fully connected layer according to the input matrix, and takes the maximum probability value of each span sequence and the entity type corresponding to the maximum probability value as the span entity;
[0037] The relationship classification layer calculates the score vectors of the relationship types between the span sequences belonging to the relationship types in the relationship type set, and takes the maximum probability value and the relationship type corresponding to the maximum probability value as the span relationship.
[0038] In one embodiment, the data dictionary stores relevant information of all entity types in the entity type set in the database, and the relevant information includes the name of the data table where the detailed data of each entity type is located, and the field name corresponding to the character sequence corresponding to the span entity in the data table.
[0039] In one embodiment, after obtaining each data unit and the installation program:
[0040] Executing the installation program, the installation program generates and executes a table creation statement according to a table creation statement template and a template filling rule, and creates a data table corresponding to the combat element data;
[0041] The installation program generates and executes insert statements according to the insert statement template and template filling rules, inserts the data content in each combat element data unit into the data table, so as to obtain simulation application data for training simulation.
[0042] The present application also provides a device for arranging and packaging simulation data, the device comprising:
[0043] Military scenario file acquisition module, used to acquire military scenario files;
[0044] A span sequence generation module, used for performing sentence processing on the military scenario document according to the punctuation marks at the end of the sentence to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0045] A paragraph information set construction module is used to match the title of the military scenario document with the combat element dictionary according to the sentence where each span in the span sequence is located, obtain the combat element corresponding to each span in the combat requirement dictionary, and construct the element word set corresponding to each span, and obtain the paragraph information set according to the element word set of each span;
[0046] An entity extraction module is used to parse the military scenario file according to all the span sequences and paragraph information sets using a trained span-based information extraction model to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0047] A query statement automatic generation module, used to automatically fill in the query statement template according to each of the span entities, span relations and data dictionary, and generate a corresponding query statement according to the filled statement template;
[0048] A data encapsulation module, used for executing the query statement to extract the combat element data related to each of the span entities from the database, and encapsulating the combat element data and the corresponding table building statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0049] The installation program generation module is used to encapsulate the analysis results of the military scenario file, the data dictionary and the data installation script into an installation program.
[0050] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0051] Obtain military scenario documents;
[0052] Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0053] According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span;
[0054] Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0055] Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates;
[0056] Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0057] The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
[0058] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0059] Obtain military scenario documents;
[0060] Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0061] According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span;
[0062] Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0063] Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates;
[0064] Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0065] The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
[0066] The above-mentioned arrangement and packaging method, device, equipment and medium for simulation data, by processing the military scenario file to obtain the span sequence corresponding to each sentence therein, according to the title of the military scenario file where each span in each span sequence is located, matching with the combat element dictionary to construct a paragraph information set, using the trained span-based information extraction model, parsing the military scenario file according to all span sequences and paragraph information sets to obtain multiple span entities and span relationships between each span entity, automatically filling the query statement template according to each span entity, span relationship and data dictionary, generating corresponding query statements according to the filled statement template, executing the query statement to extract combat element data related to each span entity from the database, and encapsulating the combat element data and the corresponding table building statement template and insert statement template into basic element data unit, compilation element data unit, equipment element data unit, action element data unit and evaluation element data unit according to the combat element framework, and encapsulating the parsing results of the military scenario file, the data dictionary and the data installation script into an installation program. The method can provide automated data preparation support for simulation training. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A schematic diagram of a flow chart of a method for arranging and packaging simulation data in one embodiment;
[0068] Figure 2 A schematic diagram of a combat element framework structure in one embodiment;
[0069] Figure 3 A schematic diagram of a training process of a span-based information extraction model in one embodiment;
[0070] Figure 4 is a schematic diagram of the structure of a span-based information extraction model in one embodiment;
[0071] Figure 5 A flowchart of combat training data compilation and packaging in another embodiment;
[0072] Figure 6 is a structural block diagram of a device for arranging and packaging simulation data in one embodiment;
[0073] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0075] In the existing technology, the data resources constructed through data engineering solve the data source problem of data information required for combat training. However, in order to meet the actual combat training needs, combat training planners are currently required to manually read the military assumptions, search from the massive combat training-related data according to the military assumptions, and manually reasonably arrange and combine the searched data, and sort out the internal connections between the data, so as to form a data application set to support combat training. This requires combat training planners to have a high level of military literacy, and also consumes a lot of manual processing overhead.
[0076] At the same time, for the extraction of data information in semi-structured documents, its main task is to extract entities and entity relationships in the document. Based on various recurrent neural networks or transformer structures, an encoder-decoder network architecture is used. The encoder encodes the input text character information, and the decoder decodes it to generate entities and relationships in the document. Military scenario documents themselves have a certain structure, and general methods cannot effectively utilize the structural feature information of the document itself, which to a certain extent restricts the improvement of the accuracy of military scenario analysis.
[0077] In view of the above problems, in this application, Figure 1 As shown, a method for arranging and packaging simulation data is provided, comprising the following steps:
[0078] Step S100, obtaining military scenario files.
[0079] Step S110 , the military scenario document is segmented into sentences according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and a corresponding span sequence is generated according to each sentence.
[0080] Step S120, according to the title of the military scenario file where each span in each span sequence is located, matching is performed with the combat element dictionary to obtain the combat elements corresponding to each span in the combat requirement dictionary, and constructing the element word set corresponding to each span, and obtaining the paragraph information set based on the element word set of each span.
[0081] Step S130, using the trained span-based information extraction model, parse the military scenario file according to all span sequences and paragraph information sets to obtain multiple span entities and span relationships between the span entities, wherein the span entity is determined according to each combat element in the combat element framework.
[0082] Step S140 , automatically filling in the query statement template according to each span entity, span relationship and data dictionary, and generating a corresponding query statement according to the filled statement template.
[0083] Step S150, execute the query statement to extract the combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework.
[0084] Step S160: Encapsulate the analysis results of the military scenario file, the data dictionary, and the data installation script into an installation program.
[0085] In the present application, a method for arranging and packaging combat training data based on military assumptions is provided, which quickly completes the arrangement and packaging of combat training related data based on military assumptions.
[0086] In this embodiment, relying on the formulation of the combat element framework, important information in the military scenario file is extracted, and the combat elements in the combat element framework can be flexibly adjusted according to different application backgrounds. In this embodiment, a specific combat element framework is proposed. While this method is not limited to the combat element framework proposed in this article, adaptive adjustments can also be made based on the framework.
[0087] In one embodiment, if Figure 2 As shown, the combat element framework includes multiple combat elements and the relationship between each combat element, wherein the multiple combat elements include: basic elements, assessment elements, organization elements, action elements and equipment elements.
[0088] Furthermore, the basic elements include the combat area, combat time, combat mission and the combat forces of the opposing sides; the evaluation elements include evaluation index information and evaluation method information; the organization elements include the troop organization and the organization's hierarchical relationship; the action elements include combat actions and action rules; the equipment elements include the equipment assigned to the organization unit, the equipment's combat technical performance parameters, the equipment's mounting equipment and the mounting equipment's combat technical performance parameters.
[0089] Specifically, the data required to support combat training should cover different combat elements, and the combat element framework should be used to describe the composition of combat elements and the relationship between each element. Combat elements include: basic elements, organizational elements, equipment elements, action elements, and evaluation elements. Among them: basic elements mainly include combat area information, combat time information, combat mission information, and combat force information of the red and blue sides. Organization elements mainly include the organizational information of the red and blue forces participating in combat training, and the organizational superior-subordinate relationship information. Equipment elements mainly include the equipment information assigned to the organizational unit, equipment combat performance parameters, equipment mounting equipment, and mounting equipment combat performance parameters. Action elements mainly include combat action process information and action rule information corresponding to combat actions. Evaluation elements mainly include evaluation index information and evaluation method information for evaluating combat effectiveness after combat training.
[0090] Furthermore, the relationships between the various combat elements include: basic elements are associated with evaluation elements through combat tasks, are associated with organizational elements through the combat forces of the opposing sides, equipment elements are associated with organizational elements through the equipment information assigned to organizational units, and action elements are associated with equipment elements based on combat actions.
[0091] Military scenarios are analyzed according to the operational element framework, and specific data content on operational training requirements is obtained from military scenarios. A span-based information extraction model is used to parse the content of military scenario documents. Since military scenario documents are usually semi-structured, different operational elements are described in different paragraphs. For example, the description content under the title of "operational action design" is more likely to extract operational action element information. Therefore, the title of the document can be used as paragraph information to help the model improve the accuracy of information extraction.
[0092] The document title of the military scenario divides different scenario contents into different areas, and is also a summary of the content described under the title. The description content of different combat elements should be in different areas of the document. Therefore, the document title can provide paragraph information of content description for the analysis of the scenario document.
[0093] Based on the above idea, in this method, high-frequency words are first extracted from the titles of multiple historical military scenario files.
[0094] In this embodiment, the combat element dictionary is constructed based on multiple historical military documents, and the combat element dictionary is constructed by extracting high-frequency words from the titles of each historical military document.
[0095] Specifically, when constructing the combat element dictionary: extract all titles in various historical military documents, and segment each title to obtain the corresponding string sequence, use the coagulation degree to determine whether two adjacent characters in each string sequence need to be merged, and obtain the merged string sequence, construct a set of strings in all the merged string sequences, deduplicate the set, sort the remaining strings according to the word frequency, and obtain the combat element dictionary.
[0096] After collecting and arranging multiple historical military scenario documents, a document training set D is generated, the titles in all documents are extracted, and the titles are segmented using word segmentation software. Word segmentation software has a certain error rate. For example, the content "combat action" in the title is segmented into "combat action" and "action". At the same time, the word segmentation software may have the problem of too fine segmentation granularity. For example, "combat action" is segmented into "combat" and "action". In both cases, the word to be extracted is "combat action". Therefore, the word segmentation results are adjusted by word coagulation. The string set of all titles after word segmentation is counted, and the following calculation is performed for any two adjacent strings:
[0097]
[0098]
[0099] In the above formula, tf1 represents the word frequency of the first string, n1 represents the number of times the first string appears in the string set after word segmentation, N represents the number of all strings after word segmentation, and tf2 has the same meaning. 1,2 It indicates the number of times the two strings appear in all titles after being combined. sd indicates the word cohesion of the two strings. When tf1 and tf2 are larger, tf 1,2 When tf1 and tf2 are smaller, sd is smaller, indicating that the possibility of the two strings being a single word is greater. On the contrary, when tf1 and tf2 are smaller, tf 1,2 When is larger, sd is larger, which means that the possibility of the two words being combined into one word is greater.
[0100] In this embodiment, by setting a suitable threshold, when sd is greater than the threshold, two adjacent character strings are merged into one word, otherwise they are not merged. The threshold can be set after manual statistics based on actual conditions.
[0101] For each character string sequence after word segmentation of the title, the word coagulation degree of every two adjacent character strings is calculated in order from left to right, and the character strings are judged whether to be merged based on the coagulation degree. The character string sequences of all the titles after the final merger are added to the same set, and the character strings in the set are removed for duplication to generate a word dictionary. After sorting by word frequency, the word dictionary is manually reviewed, and some words irrelevant to combat elements are deleted to generate the final combat element dictionary.
[0102] In this embodiment, entities in the military scenario file are extracted using the span-based information extraction model with the help of the combat element dictionary and combat element framework pre-constructed above, and the process includes steps S100 to S130.
[0103] In step S110 and step S120, the military scenario file is processed and a paragraph information training set is constructed, respectively. In fact, the process of preparing training data is consistent when training the span-based information extraction model. In order to avoid content duplication, the specific contents of step S110 and step S120 are explained here by describing the model training process.
[0104] In this embodiment, the span-based information extraction model is trained, and the process is as follows: Figure 3 As shown, including:
[0105] Step S200, obtaining military scenario training files.
[0106] Step S210, generating corresponding multiple span training sequences and paragraph information training sets according to the military scenario training file and the combat element dictionary.
[0107] Step S220, obtaining an entity type set and a relationship type set based on the combat element framework, wherein the entity type set includes various entity types of interest, and the relationship type set includes multiple relationship types of interest that existed before the entity.
[0108] Step S230 , annotating each training span in each span training sequence with an entity type according to the entity type set, and generating an entity type label set.
[0109] Step S240 , labeling the training span pairs having relationships in each span training sequence with relationship types according to the relationship type set, and generating a relationship type label set.
[0110] Step S250 , training a span-based information extraction model according to a plurality of span training sequences, a paragraph information training set, an entity type label set, and a relationship type label set.
[0111] In step S210, a corresponding plurality of span training sequences and paragraph information training sets are generated according to the military scenario training file and the combat element dictionary, and the process is the corresponding process in step S110 and step S120.
[0112] In this embodiment, the document body contents of all documents in the document training set D are divided into sentences according to the punctuation marks ".!?;" to generate a sentence training set, and a span sequence is generated for each sentence. The span represents a character sequence of any length in the sentence. For example, the span in "The firepower company equips QN506 fire support vehicle" can be "firepower company" or "equipped with QN506" and other character sequences of any length.
[0113] In this embodiment, find out which title of the military scenario document the sentence of each span is under, match the title with the combat element dictionary to form an element word set, and combine the element word sets of all spans into a paragraph information set K.
[0114] K=(k1,k2,...,k me )
[0115] In the above formula, each element k in K represents a set of element words of the title corresponding to a span, which contains the paragraph information of the document.
[0116] In step S220, the entities and relationships to be extracted from each combat element are sorted out, for example:
[0117] The basic elements mainly need to be analyzed from the military scenario to identify the combat area entity, combat time entity, combat mission entity, and the highest-level troop organization entity of the opposing sides. The organization element mainly needs to be analyzed from the military scenario to identify the troop organization entity of the red and blue sides, and the hierarchical relationship between the organization entities. The equipment element mainly needs to be analyzed from the military scenario to identify the equipment entity, the relationship between the troop organization and the equipment entity. The action element mainly needs to be analyzed from the military scenario to identify the combat action entity, and the execution relationship between the equipment entity and the combat action entity. Some entities should continue to be divided into the next level entity according to needs. For example, the equipment entity can include aircraft entities, tank armor entities, etc.
[0118] Furthermore, after sorting, all entities that need to be extracted are combined into an entity type set:
[0119] TE=(te0,te1,te2,...,te ne-1 )
[0120] In the above formula, te1 to te ne-1 Represents all entity types that need to be extracted. Entities other than the required entity types are uniformly represented as negative entity type te0, and the number of entity types is ne.
[0121] Combine all the relationships that need to be extracted into a relationship type set:
[0122] TR=(tr0,tr1,tr2,...,tr nr-1 )
[0123] In the above formula, tr1 to tr nr-1 Represents all the relationship types that need to be extracted. For relationships other than the required relationship types, they are uniformly represented as negative relationship type tr0. The number of relationship types is nr.
[0124] In this embodiment, each span sequence of each sentence is labeled according to the sorted entity type set and relationship type set.
[0125] In steps S230 and S240, a corresponding label set is constructed as true value data for training the model.
[0126] Specifically, it is labeled as an entity type in the entity type set te. If the span is an entity other than the required entity type, it is uniformly labeled as a negative entity type. The relationship between two spans is labeled as a relationship type in the relationship type set tr. If the relationship between two spans is other than the required relationship type, it is uniformly labeled as a negative relationship type. After labeling, the training data of the information extraction model is generated, which includes three parts. The first is the input of the model, that is, the set X of all span sequences of all sentences:
[0127] X=(x1,x2,...,x me )
[0128] In the above formula, each element in X represents a character sequence corresponding to a span, and there are me spans in total.
[0129] Furthermore, the entity label set (i.e., entity type label set) YE of the annotated spans and the relationship label set (i.e., relationship type label set) YR between the spans are annotated.
[0130] YE=(ye1,ye2,...,ye me ), ye∈TE
[0131] Each element in YE represents an entity type in TE in which a span sequence is annotated, and there are a total of me entity tags.
[0132] YR=(yr1,yr2,...,yr mr ), yr∈TR
[0133] Each element in YR represents a relationship type in a pair of span sequences labeled TR, with a total of mr relationship labels.
[0134] In this embodiment, if Figure 4 As shown, the span-based information extraction model includes an input layer, an entity classification layer, and a relationship classification layer connected in sequence. Among them, the input layer vectorizes each span sequence and the paragraph information set through the Bert model to generate an input matrix. The entity classification layer calculates the score vector of each span sequence belonging to each entity type in the entity type set according to the input matrix through the fully connected layer, and takes the maximum probability value of each span sequence and the entity type corresponding to the maximum probability value as the span entity. The relationship classification layer calculates the score vector of the relationship type between each span sequence belonging to each relationship type in the relationship type set, and takes the maximum probability value and the relationship type corresponding to the maximum probability value as the span relationship.
[0135] Specifically, the input layer receives the input span sequence set X, and vectorizes each span sequence x through the Bert model to generate the input matrix ex:
[0136]
[0137] In the above formula, the matrix element ex ij The jth value of the character vector representing the i-th character in the span sequence. The span sequence has a total of c characters, and the length of the character vector is d. The maximum pooling operation maxpool is performed on ex, that is, the maximum value of each column in the matrix is selected to generate the maximum pooling vector e of the span sequence:
[0138] e = maxpool(ex)
[0139] =[max(ex 11 ,ex 21 ,...,ex c1 ),max(ex 12 ,ex 22 ,...,ex c2 ),...,max(ex 1d ,ex 2d ,...,ex cd )]
[0140] =[e1,e2,...,e d ]
[0141] In the same way, the characters in all words in the feature word set k corresponding to the span sequence are represented as the maximum pooling vector ke. ke contains the paragraph information of the document, which is concatenated with the maximum pooling vector of the span sequence as the final input e .
[0142]
[0143] Specifically, the entity classification layer calculates the score vector eScore of each span sequence belonging to each entity type in TE through a fully connected network:
[0144] eScore=w e input e +b e =(escore1,escore2,...,escore ne )
[0145] In the above formula, each element score in the vector represents the score of the span sequence belonging to a certain entity type, w e is the weight parameter of the entity classification layer, b e is the bias parameter.
[0146] According to the type label ye marked by the span sequence in YE, the sofamax function is used to calculate the probability that the span sequence x belongs to the entity type corresponding to the type label ye using the following formula:
[0147]
[0148] When training the model, the probability of all sequences in the span sequence set X is calculated, and after taking the sum of the log-likelihood, the loss function of the entity classification layer is calculated as:
[0149]
[0150] Specifically, according to the output score eScore of each span of the entity classification layer, the entity type corresponding to the maximum value in eScore is selected as the type prediction of each span by the entity classification layer, and the spans with negative entity types are filtered out according to the results of the type prediction.
[0151] For any two span sequences x′, x″ in the filtered span sequence in each sentence, pairwise combinations are performed to form a relationship, and the maximum pooling vectors e′ and e″ of the two are concatenated as the span relationship vector r:
[0152]
[0153] At the same time, considering that the direction of the relationship is directional, the reverse concatenation is used as the reverse span relationship vector r′:
[0154]
[0155] The forward relation vector, the maximum pooled vector ke′ of the element word corresponding to the span sequence x′, and the maximum pooled vector ke″ of the element word corresponding to the span sequence x″ are concatenated as the input of the relation classification layer. r :
[0156]
[0157] The same process is done for the inverse relationship:
[0158]
[0159] The score vector rScore of each relationship type in TR is calculated by the fully connected network for the forward and reverse relations:
[0160] rScore=w r input r +b r =(rscore1,rscore2,...,rscore nr )
[0161] In the above formula, each element rscore in the vector represents the score of the span relationship belonging to a certain relationship type, w r is the weight parameter of the relation classification layer, b r is the bias parameter.
[0162] According to the type label yr marked by the span relationship in YR, the sofamax function is used to calculate the probability that the span relationship belongs to the span relationship type corresponding to the type label yr:
[0163]
[0164] Calculate the probability of all forward and reverse span relations in the filtered span sequence set X, take the sum of log likelihoods, and calculate the loss of the relation classification layer using the following formula:
[0165]
[0166] In the above formula, mr' is the number of forward and reverse span relationships composed of all span sequences after filtering.
[0167] When training the entire model, the loss of the entity classification layer and the loss of the relationship classification layer are combined as the overall loss function of the overall model, expressed as:
[0168] L=Le+Lr
[0169] In this embodiment, when training the span-based information extraction model, first, for the sentence training set, label it according to the sorted entity relationship type set TE and relationship type set TR to generate a set of span sequences X for training, an entity label set YE, and a relationship label set YR, which together form the training data. Then, the information extraction model randomly initializes the weight parameter w e and the bias parameter b e of the entity classification layer, the weight parameter w r and the bias parameter b r of the relationship classification layer. The training data is input into the extraction model in batches, and forward propagation is performed according to the model structure described above. The model loss is calculated according to the overall model loss function, and all weight parameters and bias parameters are updated through backpropagation. Finally, after multiple rounds of iteration, the model parameters are saved to generate the information extraction model, corresponding to the content of steps S200 to S250 above.
[0170] In this embodiment, when predicting the span-based information extraction model, first, input a scenario document to be parsed, split it into sentences to generate a set of sentences to be parsed, and generate a set of span sequences to be extracted according to the set of sentences. Then, query under which title of the scenario document the sentence where each span to be extracted is located, and match the title with the combat element dictionary to form an element word set. Secondly, input all the span sequences to be extracted and the element word set in each sentence into the trained model in turn. The model calculates the probability that each span sequence belongs to each entity type, and takes the maximum probability value and the entity type corresponding to the maximum probability as the prediction output of the model. After filtering out the negative entity types, calculate the probability that each pair of filtered span sequences belongs to each relationship type, and take the maximum probability value and the relationship type corresponding to the maximum probability as the prediction output of the model. Finally, set the entity probability threshold and the relationship probability threshold, filter out the span entities and span relationships with too small probability values output by the model, and take the filtered span entities and span relationships as the parsing result of the scenario document. Corresponding to the content of steps S100 to S130 above.
[0171] Optionally, the parsing result can be secondarily filtered after manual review.
[0172] In step S140, the data dictionary stores the relevant information of all entity types in the entity type set in the database. The relevant information includes the name of the data table where the detailed data of each entity type is located, and the field name corresponding to the character sequence of the span entity in the data table.
[0173] Specifically, for example, for the extracted equipment entity "WZ-20", its entity type is "armed helicopter". In the data dictionary, the name of the data table where the "armed helicopter" type is located and the corresponding field name of "WZ-20" in the table should be stored.
[0174] Furthermore, according to the operational element framework, some entities should also store the data table where the associated information is located. For example, the extracted equipment entity "Wuzhi-20" can mount "missile" type equipment. In the data dictionary, the data table name of all equipment types that can be mounted by "armed helicopters" should be stored, as well as the table connection field between the "armed helicopter" data table and the mountable data table.
[0175] It also stores the primary key of each table, as well as the name and type of each field.
[0176] In this embodiment, the specific relevant data corresponding to the analysis results in the database can be found through the above-mentioned data dictionary. In order to extract this part of data from the massive data in the database, a query statement module is used to automatically fill in the template according to each span entity, span relationship and data dictionary, generate a corresponding query statement, and extract the corresponding data by executing the query statement.
[0177] Specifically, taking a relational database as an example, the query statement template for a certain combat element is:
[0178] select t1.column1,t1.column2,...,t2.column1,t2.column2
[0179] from[table1]t1 left join[table2]t2
[0180] on t1.[id1]=t2.[id2]
[0181] where t1.[match_column]like[entity]
[0182] The filling rules of this template are as follows:
[0183] The content in the square brackets is what needs to be filled in, where entity is the entity name, which is obtained based on the parsing results of the assumption document.
[0184] table1 is the name of the table where the entity is located, match_column is the name of the field corresponding to the entity name in the table. table2 is the data table where the associated information is located, id1 and id2 are the table connection fields of table1 and table2. The above filled content can be obtained by querying from the data dictionary according to the parsed entity type and entity name.
[0185] The query target fields column1, column2, etc. are filled in by the data resource library administrator according to actual needs and data details of the data resource library, or automatically filled in with "*" to query all content.
[0186] Execute the query statement to obtain the corresponding data content. When an error occurs in the execution of the statement or the data cannot be queried, the data resource library administrator can modify the generated query statement.
[0187] In step S150, the queried data is arranged according to the combat element framework, a table structure for storing various combat element data is generated, and a table creation statement template is constructed. According to the table creation statement template, a table creation statement is generated.
[0188] Specifically, taking a relational database as an example, the table creation statement template for the query result of a certain combat element is:
[0189] CREATE TABLE [tablename] {
[0190] [id]int primary key,
[0191] [column_name][column_type],
[0192] [joinid][joinid_type], ...
[0194] }
[0195] The filling rules of this template are as follows:
[0196] The content in the brackets is what needs to be filled in, and tablename is filled in by the person who needs combat training data. id is the primary key, and a default field name is automatically filled in.
[0197] Column_name and column_type are general fields and their types in the table. The data dictionary is queried by the entity name of the parsed result to obtain its corresponding data table. The field name and field type in the data table are queried and automatically filled according to the query results.
[0198] joinid and joinid_type are the association fields with other combat element query results, indicating the relationship between combat elements, which are divided into assumed association fields and non-imagined association fields. If it is an assumed association field, the relationship between the combat elements corresponding to the association field is mentioned in the assumed content, otherwise it is a non-imagined association field. Determine the name and type of the filled field according to the combat element framework combined with the data dictionary information. For example, for the table creation statement template of the equipment element, according to the combat element framework, the equipment of the equipment element is associated with the troop establishment of the troop establishment element. Match the data table where the troop establishment is located from the data dictionary, and obtain its primary key field and field type as the fill value.
[0199] Furthermore, an insert statement template is constructed, and an insert statement is generated according to the insert statement template. Taking a relational database as an example, the insert statement template for the query result of a certain combat element is:
[0200] INSERT INTO [tablename]
[0201] ([column1,column2,...])
[0202] VALUES([value1,value2,...])
[0203] The filling rules of this template are as follows:
[0204] The content in the square brackets is what needs to be filled in. Tablename is the name of the inserted table, which is filled in by the person who needs the combat training data and should be consistent with the table name in the table creation template.
[0205] Column1, column2, etc. are the target fields to be inserted, which are automatically filled in according to the target fields in the query statement. The order of each field should be consistent with the order in the query statement. Value1, value2, etc. are the values to be inserted, which are automatically filled in according to the values of the query results.
[0206] For the fields in the table that represent associations with other combat elements, there are two ways to determine the inserted values. If it is a hypothetical association field, it is necessary to match the data dictionary according to the entity and relationship analysis results of the hypothetical content to obtain the data table, entity name field, and primary key field, and query to obtain the insertion value of the hypothetical association field. For example, for the insertion statement template of the equipment element, according to the combat element framework, the equipment of the equipment element is associated with the troop establishment of the troop establishment element. According to the equipment entity name parsed from the hypothetical document, the affiliation relationship between the troop establishment and the equipment entity, the corresponding troop establishment name can be known, and the data table where the troop establishment entity is located is matched from the data dictionary, and the primary key value corresponding to the troop establishment name is queried as the insertion value.
[0207] If it is a non-scenarios related field, match the data dictionary according to the entity parsing result of the scenario content to obtain the data table, entity name field, and primary key field, and query to obtain the insertion value of the non-scenarios related field. For example, for the table creation statement template of the basic element, according to the combat element framework, the combat mission of the basic element is associated with the evaluation element. According to the combat mission entity name parsed from the scenario document, match the data table of the evaluation task associated with the combat mission from the data dictionary. After the two tables are associated, query the primary key value of the evaluation task corresponding to the combat mission entity name from the associated table as the insertion value.
[0208] In summary, a corresponding query statement template, table creation statement template and insert statement template are constructed for each combat element, and the statement template is filled in according to the assumed analysis results and data dictionary, and also combined with the manually confirmed content to generate the corresponding statement.
[0209] Furthermore, after executing the query statements generated by the data query templates of each combat element, the data of each combat element is obtained by query. Each combat element data and its corresponding table creation statement template and insert statement template are encapsulated into basic element data units, organization element data units, equipment element data units, action element data units, and evaluation element data units.
[0210] In this embodiment, after obtaining each data unit and the installation program: the installation program is executed, the installation program generates and executes a table creation statement according to a table creation statement template and template filling rules, creates a data table corresponding to the combat element data, and the installation program generates and executes an insert statement according to an insert statement template and template filling rules, inserts the data content in each combat element data unit into the data table, so as to obtain simulation application data for training simulation.
[0211] like Figure 5 FIG. 2 shows a flowchart of combat training data arrangement and packaging in another embodiment.
[0212] In the above-mentioned method for arranging and packaging simulation data, a method for arranging and packaging combat training data based on military assumptions is proposed, and a combat element framework for combat training is designed, which uniformly expresses the composition of data elements and the relationship between data elements required for combat training. The military assumption parsing model is constructed in combination with the combat element dictionary, which can automatically parse the combat element entities and the relationship between combat element entities in the military assumptions. According to the database statement template, the data information related to the combat elements can be semi-automatically obtained from the data resource library according to the parsed content, and automatically arranged and packaged according to the combat element framework to form a data unit. After the data unit is sent to the user who needs the combat training data, the data can be semi-automatically installed and saved to the user's local according to the arranged structure, supporting the user's query of combat training data.
[0213] In summary, this method can semi-automatically complete the screening and compilation of massive data resources to form a combat training data application set, reducing the workload of manual participation. While improving the efficiency of data application set construction, it can accurately and completely cover the actual data resource requirements in the combat training process.
[0214] It should be understood that although Figure 1 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0215] In one embodiment, Figure 6 As shown, a device for arranging and packaging simulation data is provided, including: a military scenario file acquisition module 300, a span sequence generation module 310, a paragraph information set construction module 320, an entity extraction module 330, a query statement automatic generation module 340, a data packaging module 350 and an installation program generation module 360, wherein:
[0216] The military scenario file acquisition module 300 is used to acquire the military scenario file;
[0217] A span sequence generating module 310 is used to process the military scenario document according to the punctuation marks at the end of the sentence to obtain a plurality of sentences, and to generate a corresponding span sequence according to each sentence;
[0218] The paragraph information set construction module 320 is used to match the title of the military scenario document with the combat element dictionary according to the sentence where each span in the span sequence is located, obtain the combat element corresponding to each span in the combat requirement dictionary, and construct the element word set corresponding to each span, and obtain the paragraph information set according to the element word set of each span;
[0219] An entity extraction module 330 is used to parse the military scenario document according to all the span sequences and paragraph information sets using the trained span-based information extraction model to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0220] A query statement automatic generation module 340, for automatically filling in the query statement template according to each of the span entities, span relations and data dictionary, and generating a corresponding query statement according to the filled statement template;
[0221] The data encapsulation module 350 is used to execute the query statement to extract the combat element data related to each of the span entities from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0222] The installation program generation module 360 is used to encapsulate the analysis results of the military scenario file, the data dictionary and the data installation script into an installation program.
[0223] For the specific definition of the arrangement and packaging device for simulation data, please refer to the definition of the arrangement and packaging method for simulation data in the above text, which will not be repeated here. Each module in the above arrangement and packaging device for simulation data can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0224] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store simulation-related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for arranging and packaging simulation data is implemented.
[0225] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0226] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0227] Obtain military scenario documents;
[0228] Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0229] According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span;
[0230] Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0231] Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates;
[0232] Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0233] The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
[0234] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0235] Obtain military scenario documents;
[0236] Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence;
[0237] According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span;
[0238] Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework;
[0239] Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates;
[0240] Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework;
[0241] The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
[0242] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0243] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0244] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for arranging and packaging simulation data, characterized in that: The method comprises: Obtain military scenario documents; Segmenting the military scenario document according to the punctuation marks at the end of the sentences to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence; According to the title of the military scenario document where each span in each span sequence is located, the sentence is matched with the combat element dictionary to obtain the combat element corresponding to each span in the combat requirement dictionary, and the element word set corresponding to each span is constructed, and the paragraph information set is constructed according to the element word set of each span; Using the trained span-based information extraction model, the military scenario document is parsed according to all the span sequences and the paragraph information set to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework; Automatically filling query statement templates according to the span entities, span relationships and data dictionaries, and generating corresponding query statements according to the filled statement templates; Execute the query statement to extract combat element data related to each span entity from the database, and encapsulate the combat element data and the corresponding table creation statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework; The analysis results of the military scenario file, the data dictionary and the data installation script are packaged into an installation program.
2. The method for arranging and packaging simulation data according to claim 1, characterized in that: The combat element dictionary is constructed based on a plurality of historical military documents. When constructing the combat element dictionary: Extract all titles from each of the historical military documents, and segment each title to obtain a corresponding string sequence; Using the solidification degree, respectively, two adjacent characters in each of the character string sequences are judged whether they need to be merged, to obtain a merged character string sequence; The character strings in all the merged character string sequences are constructed into a set, the set is deduplicated, and the remaining character strings are sorted according to word frequency to obtain the combat element dictionary.
3. The method for arranging and packaging simulation data according to claim 1, characterized in that: The combat element framework includes multiple combat elements and the relationship between the combat elements, wherein the multiple combat elements include: basic elements, assessment elements, organization elements, action elements and equipment elements; The basic elements include combat area, combat time, combat mission and combat forces of the opposing sides; The evaluation elements include evaluation index information and evaluation method information; The organizational elements include the organization of troops and the organizational hierarchical relationship; The action elements include combat actions and action rules; The equipment elements include equipment assigned to the organization unit, equipment combat performance parameters, equipment mounting equipment, and combat performance parameters of the mounting equipment; The relationships between the various combat elements include: The basic elements are linked to the assessment elements through combat missions and to the organizational elements through the combat forces of the opposing sides; The equipment elements are associated with the organization elements through the equipment information assigned to the organization unit; The action elements are associated with equipment elements according to combat actions.
4. The method for arranging and packaging simulation data according to claim 3, characterized in that: When training the span-based information extraction model: Obtain military scenario training documents; Generate a corresponding plurality of span training sequences and paragraph information training sets according to the military scenario training file and the combat element dictionary; Based on the combat element framework, an entity type set and a relationship type set are obtained, wherein the entity type set includes various entity types of interest, and the relationship type set includes multiple relationship types of interest that exist before the entity; Annotate each training span in each span training sequence with an entity type according to the entity type set to generate an entity type label set; According to the relationship type set, relationship type annotation is performed on the training span pairs having relationships in each of the span training sequences to generate a relationship type label set; The span-based information extraction model is trained according to the multiple span training sequences, the paragraph information training set, the entity type label set, and the relationship type label set.
5. The method for arranging and packaging simulation data according to claim 4, characterized in that: The span-based information extraction model includes an input layer, an entity classification layer, and a relationship classification layer connected in sequence; The input layer vectorizes each of the span sequences and paragraph information sets through a Bert model to generate an input matrix; The entity classification layer calculates the score vector of each span sequence belonging to each entity type in the entity type set through the fully connected layer according to the input matrix, and takes the maximum probability value of each span sequence and the entity type corresponding to the maximum probability value as the span entity; The relationship classification layer calculates the score vectors of the relationship types between the span sequences belonging to the relationship types in the relationship type set, and takes the maximum probability value and the relationship type corresponding to the maximum probability value as the span relationship.
6. The method for arranging and packaging simulation data according to claim 1, characterized in that: The data dictionary stores relevant information of all entity types in the entity type set in the database, including the name of the data table where the detailed data of each entity type is located, and the field name corresponding to the character sequence corresponding to the span entity in the data table.
7. The method for arranging and packaging simulation data according to any one of claims 1 to 6, characterized in that: After obtaining the data units and installation programs: Executing the installation program, the installation program generates and executes a table creation statement according to a table creation statement template and a template filling rule, and creates a data table corresponding to the combat element data; The installation program generates and executes insert statements according to the insert statement template and template filling rules, inserts the data content in each combat element data unit into the data table, so as to obtain simulation application data for training simulation.
8. A device for arranging and packaging simulation data, characterized in that: The device comprises: Military scenario file acquisition module, used to acquire military scenario files; A span sequence generation module, used for performing sentence processing on the military scenario document according to the punctuation marks at the end of the sentence to obtain a plurality of sentences, and generating a corresponding span sequence according to each sentence; A paragraph information set construction module is used to match the title of the military scenario document with the combat element dictionary according to the sentence where each span in the span sequence is located, obtain the combat element corresponding to each span in the combat requirement dictionary, and construct the element word set corresponding to each span, and obtain the paragraph information set according to the element word set of each span; An entity extraction module is used to parse the military scenario file according to all the span sequences and paragraph information sets using a trained span-based information extraction model to obtain a plurality of span entities and span relationships between the span entities, wherein the span entities are determined according to the combat elements in the combat element framework; A query statement automatic generation module, used to automatically fill in the query statement template according to each of the span entities, span relations and data dictionary, and generate a corresponding query statement according to the filled statement template; A data encapsulation module, used for executing the query statement to extract the combat element data related to each of the span entities from the database, and encapsulating the combat element data and the corresponding table building statement template and insert statement template into basic element data units, organization element data units, equipment element data units, action element data units and evaluation element data units according to the combat element framework; The installation program generation module is used to encapsulate the analysis results, data dictionary and data installation script of the military scenario file into an installation program.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Database-based scenario method and device, electronic equipment and storage medium
CN120255875A
