Terrain key point analysis method based on multi-head attention mechanism

Through the analysis method of topographic key points based on the multi-head attention mechanism, the problem that the topographic analysis method in the existing technology cannot meet the real-time and accuracy of complex topographic information is solved, and the analysis accuracy and robustness are achieved, which is suitable for modern times. Rapid decision-making in complex war environments.

CN119202664APending Publication Date: 2024-12-27NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411345157.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing topographic key points analysis methods rely too much on complex rule definitions and cannot meet the real-time and accuracy requirements of modern complex and rapidly changing large amounts of terrain information.

Method used

Using the topographic key points analysis method based on the multi-head attention mechanism, the auxiliary commander analyzes the topographic key points by building spatial areas, obtaining topographic information, building index systems, and introducing multi-head attention layers for training, obtaining the weight of important feature information in the topographic data, and assisting the commander to analyze the topographic key points .

Benefits of technology

It significantly improves the accuracy and robustness of key point analysis results, provides stronger support, and adapts to the needs of rapid decision-making in complex terrain environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202664A_ABST
    Figure CN119202664A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of computer application, and discloses a terrain key point analysis method based on a multi-head attention mechanism. The method comprises the following steps: (10) constructing a spatial region, and acquiring basic terrain information in the region; and (20) constructing an index system according to expert knowledge rules. (30) constructing a model data set and performing preprocessing; and (40) introducing a multi-head attention layer, and training the model to obtain an attention value of each point. And (50) setting a threshold value according to the attention value, and outputting a key point and a key point analysis result. The method has the beneficial effects that the terrain data set is constructed according to the knowledge rules, and the multi-head attention mechanism is introduced to learn the weight of the important features of the terrain key points, so that the method can accurately identify and pay attention to the important key points in the terrain, scientifically and objectively assist the selection of the terrain key points, and improve the precision and practicability of terrain analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer application, and designs a terrain key point analysis method based on a multi-head attention mechanism. Technical Background

[0002] With the evolution of modern warfare, the analysis of terrain key points has become more complex and critical. Traditional terrain key point analysis methods usually rely on manual experience and expertise, which can no longer meet the needs of accurately grasping key points and making quick decisions in large-scale, complex and changeable terrain environments. Therefore, the introduction of artificial intelligence technology has become a solution. In recent years, algorithms based on multi-head attention mechanisms have achieved remarkable results in fields such as natural language processing and computer vision. This algorithm can effectively focus on different parts of the input data, thereby improving the performance of the model on complex tasks. Applying this algorithm to terrain key point analysis can help military commanders and intelligence analysts better understand the battlefield situation, discover important points, and make strategic decisions.

[0003] The terrain key point analysis method based on the multi-head attention mechanism algorithm will combine natural language processing, data mining and machine learning technologies. By analyzing a large amount of battlefield terrain data, the multi-head attention mechanism algorithm will be used to extract important key points in the data, and then make associations and inferences to reveal the changes and evolution of the battlefield situation. This method can improve the accuracy and real-time nature of intelligence, help commanders make more informed decisions, and improve combat effectiveness and chances of winning. The key point analysis method based on the multi-head attention mechanism has become an important technical background for research in the current war environment, with broad application prospects and military value. Summary of the invention

[0004] The present invention aims to solve the problem that the existing terrain key point analysis is too dependent on complex rule definitions, which cannot meet the real-time and accuracy requirements of a large amount of modern complex and rapidly changing terrain information. Therefore, we propose a key point analysis method based on a multi-head attention mechanism. Specifically, it includes the following steps:

[0005] (10) Construct a spatial region and obtain basic terrain information within the region.

[0006] (11) Construct a spatial region on the map and obtain terrain highland information within the region, including longitude, latitude, elevation, and highland name.

[0007] (12) Obtain basic information on vegetation, rivers, bridges, substations, villages, highlands, roads, and military airports in the area, including location, quantity, area, etc.

[0008] (20) Construct an indicator system based on expert knowledge rules.

[0009] (21) According to the description of expert knowledge rules, the selection of terrain key points needs to take into account many factors, including reconnaissance and defense capabilities, control capabilities, and configuration and deployment capabilities.

[0010] (22) Reconnaissance and defense capabilities. In the selection of key terrain points, high terrain has a broad field of vision, which can accurately observe and understand the enemy's deployment, tactical movements and intentions, help obtain accurate intelligence, situation awareness and battlefield situation, so as to better adjust their own actions and decisions, and provide commanders with a more accurate information and intelligence basis.

[0011] (23) Analysis of control capabilities. The control capabilities of troops are closely related to the distance between key points and the enemy's defense front and the number of surrounding roads. A shorter distance to the front is conducive to close-range fire suppression by troops, which can quickly suppress enemy fortifications, bunkers and personnel, weakening the enemy's combat effectiveness and counterattack capabilities. A large number of roads can provide opportunities for troops to set up defense and blocking facilities. By setting up roadblocks, artillery positions, concealed combat positions, etc. at key locations, it can effectively interfere with the enemy's movement and block the enemy, thereby enhancing the control capabilities of troops.

[0012] (24) Analysis of deployment capabilities. The selection of key points in terrain is affected by the deployment area and slope. A large area can concentrate a variety of arms and units, including infantry, armored forces, artillery, air support, etc., to achieve comprehensive combat capabilities and adapt to various combat missions and environments. A low-slope terrain can provide better mobility conditions, allowing troops and equipment to move and maneuver more quickly, launch combat and make rapid adjustments, and enhance rapid deployment capabilities.

[0013] (30) Build the model dataset and perform preprocessing.

[0014] (31) Select key points based on knowledge rules. Based on reconnaissance and defense capabilities, sort the high ground in the area according to elevation, and select the first n high ground as the key points of the area. Based on control capabilities, establish a circular buffer area with a radius of r km with all high ground in the area as the center, obtain the number of all roads in the area, and normalize the number of roads and the frontier distance. Select the first n high ground with a large number of roads and a short frontier distance as the key points of the area. Based on configuration and deployment capabilities. Establish a circular buffer area with a radius of rkm with all high ground in the area as the center, obtain the slope information in the area, sort the slopes from small to large, and select the first n high ground with the smallest slope in the area as the key points of the area.

[0015] (32) A terrain dataset is constructed based on the indicator system. The dataset includes height (terrain elevation), road_num (number of roads), leading_distance (front distance), and slope (slope).

[0016] (33) The continuous data of terrain elevation, front distance and slope, and the discrete data of road number are standardized so that the data have a similar scale range.

[0017] (40) A multi-head attention layer is introduced to train the model and obtain the attention value of each point.

[0018] (41) Initialize h different heads, each with a dimension of 4. Map the four feature vectors S = [s1, s2, s3, s4] of terrain elevation, frontier distance, number of roads, and slope to the h heads respectively and perform linear transformation. The calculation formula is as follows:

[0019]

[0020]

[0021]

[0022] Among them, Q j , K j and V j Corresponding to the jth attention, is the weight matrix.

[0023] (42) Scaled dot product similarity calculation is performed to obtain the attention weight of each head. The attention score matrix of each feature vector is calculated according to the Q and K of the four feature vectors. The scaled dot product similarity method is used to perform a SoftMax operation on the attention score matrix of each feature data to obtain the attention weight matrix of each feature data. The attention weight matrix is ​​multiplied by the value sequence V. The calculation formula is as follows:

[0024]

[0025] (43) The processed matrices are concatenated together and then linearly transformed to obtain the attention value of each key point, where W O is the weight matrix, and the calculation formula is as follows:

[0026] M v =Concat(head1, head2,..., head j )W O (5)

[0027] (50) According to the attention value, a threshold is set and key points and key point analysis results are output.

[0028] (51) Set the attention threshold to k, and output the terrain highlands with attention values ​​greater than k as key points. And output the key point analysis conclusions according to the knowledge rules.

[0029] Compared with traditional manual analysis methods, the beneficial effects of the present invention are: this method introduces the multi-head attention mechanism in the deep learning algorithm on the basis of prior knowledge rules, constructs a terrain data set through knowledge rules as the input data of the model, and uses multi-head attention to obtain the weight of important feature information in the terrain data, scientifically and objectively assisting commanders in analyzing key points of terrain, significantly improving the accuracy of the key point analysis results.

[0030] By introducing a multi-head attention mechanism, the model can better analyze a large amount of terrain data. The structure and parameters of the multi-head attention layer can be learned and adjusted according to the actual situation, making the model adaptive and flexible, thereby further improving the performance and expression ability of the model. This improvement will enable the model to have higher accuracy and robustness when analyzing terrain data, providing stronger support for comprehensive and in-depth analysis of terrain key points. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The figure is a flow chart of the method of the present invention.

[0032] Figure 2 Schematic diagram of algorithm training loss value.

[0033] Figure 3 Schematic diagram of algorithm evaluation loss value.

[0034] Figure 4 A flow chart is designed for the model of the method of the present invention.

[0035] Figure 5 Flowchart for constructing key analysis indicator system. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] The present invention is a key point analysis method based on a multi-head attention mechanism, and the specific steps are as follows:

[0038] (10) Construct a spatial region and obtain basic terrain information within the region.

[0039] (11) Construct a spatial region on the map and obtain terrain highland information within the region, including longitude, latitude, elevation, and highland name.

[0040] (12) Obtain basic information on vegetation, rivers, bridges, substations, villages, highlands, roads, and military airports in the area, including location, quantity, area, etc.

[0041] (20) Construct an indicator system based on expert knowledge rules.

[0042] (21) According to the description of expert knowledge rules, the selection of terrain key points needs to take into account many factors, including reconnaissance and defense capabilities, control capabilities, and configuration and deployment capabilities.

[0043] (22) Reconnaissance and defense capabilities. In the selection of key terrain points, high terrain has a broad field of vision, which can accurately observe and understand the enemy's deployment, tactical movements and intentions, help obtain accurate intelligence, situation awareness and battlefield situation, so as to better adjust their own actions and decisions, and provide commanders with a more accurate information and intelligence basis.

[0044] (23) Analysis of control capabilities. The control capabilities of troops are closely related to the distance between key points and the enemy's defense front and the number of surrounding roads. A shorter distance to the front is conducive to close-range fire suppression by troops, which can quickly suppress enemy fortifications, bunkers and personnel, weakening the enemy's combat effectiveness and counterattack capabilities. A large number of roads can provide opportunities for troops to set up defense and blocking facilities. By setting up roadblocks, artillery positions, concealed combat positions, etc. at key locations, it can effectively interfere with the enemy's movement and block the enemy, thereby enhancing the control capabilities of troops.

[0045] (24) Analysis of deployment capabilities. The selection of key points in terrain is affected by the deployment area and slope. A large area can concentrate a variety of arms and units, including infantry, armored forces, artillery, air support, etc., to achieve comprehensive combat capabilities and adapt to various combat missions and environments. A low-slope terrain can provide better mobility conditions, allowing troops and equipment to move and maneuver more quickly, launch combat and make rapid adjustments, and enhance rapid deployment capabilities.

[0046] (30) Build the model dataset and perform preprocessing.

[0047] (31) Select key points based on knowledge rules. Based on reconnaissance and defense capabilities, sort the high ground in the area according to elevation, and select the first n high ground as the key points of the area. Based on control capabilities, establish a circular buffer area with a radius of r km with all high ground in the area as the center, obtain the number of all roads in the area, and normalize the number of roads and the frontier distance. Select the first n high ground with a large number of roads and a short frontier distance as the key points of the area. Based on configuration and deployment capabilities. Establish a circular buffer area with a radius of rkm with all high ground in the area as the center, obtain the slope information in the area, sort the slopes from small to large, and select the first n high ground with the smallest slope in the area as the key points of the area.

[0048] (32) A terrain dataset is constructed based on the indicator system. The dataset includes height (terrain elevation), road_num (number of roads), leading_distance (front distance), and slope (slope).

[0049] (33) The continuous data of terrain elevation, front distance and slope, and the discrete data of road number are standardized so that the data have a similar scale range.

[0050] (40) A multi-head attention layer is introduced to train the model and obtain the attention value of each point.

[0051] (41) Initialize h different heads, each with a dimension of 4. Map the four feature vectors S = [s1, s2, s3, s4] of terrain elevation, frontier distance, number of roads, and slope to the h heads respectively and perform linear transformation. The calculation formula is as follows:

[0052]

[0053]

[0054]

[0055] Among them, Q j , K j and V j Corresponding to the jth attention, is the weight matrix.

[0056] (42) Scaled dot product similarity calculation is performed to obtain the attention weight of each head. The attention score matrix of each feature vector is calculated according to the Q and K of the four feature vectors. The scaled dot product similarity method is used to perform a SoftMax operation on the attention score matrix of each feature data to obtain the attention weight matrix of each feature data. The attention weight matrix is ​​multiplied by the value sequence V. The calculation formula is as follows:

[0057]

[0058] (43) The processed matrices are concatenated together and then linearly transformed to obtain the attention value of each key point, where W O is the weight matrix, and the calculation formula is as follows:

[0059] M v =Concat(head1, head2,..., head j )W O (5)

[0060] (50) According to the attention value, a threshold is set and key points and key point analysis results are output.

[0061] (51) Set the attention threshold to k, and output the terrain highlands with attention values ​​greater than k as key points. And output the key point analysis conclusions according to the knowledge rules.

[0062] Compared with traditional manual analysis methods, the beneficial effects of the present invention are: this method introduces the multi-head attention mechanism in the deep learning algorithm on the basis of prior knowledge rules, constructs a terrain data set through knowledge rules as the input data of the model, and uses multi-head attention to obtain the weight of important feature information in the terrain data, scientifically and objectively assisting commanders in analyzing key points of terrain, significantly improving the accuracy of the key point analysis results.

[0063] Example analysis:

[0064] This model uses 250 sets of data for training, adds an attention mechanism layer, the batch_size of each set is 128, the Epoch is set to 200, and the label is standardized using StandardScaler to facilitate loss calculation and parameter optimization. Input net_model, train_data, optimizer, criterion, and use net_model.train() to adjust the model training mode. Declare that train_loss is used to store the average square error loss during training, loop train_data training data, take data, and label target. Use optimizer.zero_grad() to indicate gradient zeroing, outputs=net_model(data) to indicate forward calculation results, loss=criterion(outputs, target) to indicate calculation loss, loss.backward() to indicate backward transmission process, optimizer.step() to optimize weight and bias matrix, and train_loss+=loss.item() to record error. Take train_loss / len(train_data) as the error mean and output train_loss.

[0065] This model uses 63 sets of data for evaluation, with a batch_size of 128 for each set and Epoch set to 200. Use the trained model to make predictions on the evaluation to prevent overfitting or underfitting problems. The evaluation model is as follows. Input net_model, eval_data, and criterion, and use net_model.eval() to adjust the model to evaluation mode. Declare that Eval_loss is used to store the average squared error loss during training, loop eval_data training data, take data, and label target. Use outputs = net_model (data) to indicate obtaining the evaluation results, use loss = criterion (outputs, target) to indicate calculating the loss, and use eval_loss + = loss.item() to record the error. Take eval_loss / len (eval_data) as the error mean and output eval_loss.

[0066] The invention is not limited to the above-mentioned embodiments, and anyone should know that any technical solution identical or similar to the present invention made under the inspiration of the present invention shall fall within the protection scope of the present invention.

Claims

1. A terrain key point analysis method based on a multi-head attention mechanism, characterized in that: The steps of the method are as follows: (10) Construct a spatial region and obtain basic terrain information within the region. (20) Construct an indicator system based on expert knowledge rules. (30) Build the model dataset and perform preprocessing. (40) A multi-head attention layer is introduced to train the model and obtain the attention value of each point. (50) According to the attention value, a threshold is set and key points and key point analysis results are output.

2. According to claim 1, a terrain key point analysis method based on a multi-head attention mechanism is characterized in that: The specific aspects of (10) include the following: (11) Construct a spatial region on the map and obtain terrain highland information within the region, including longitude, latitude, elevation, and highland name. (12) Obtain basic information on vegetation, rivers, bridges, substations, villages, highlands, roads, and military airports in the area, including location, quantity, area, etc.

3. According to claim 1, a terrain key point analysis method based on a multi-head attention mechanism is characterized in that: The specific steps of (20) are as follows: (21) According to the description of expert knowledge rules, the selection of terrain key points needs to take into account many factors, including reconnaissance and defense capabilities, control capabilities, and configuration and deployment capabilities. (22) Reconnaissance and defense capabilities. In the selection of key terrain points, high terrain has a broad field of vision, which can accurately observe and understand the enemy's deployment, tactical movements and intentions, help obtain accurate intelligence, situation awareness and battlefield situation, so as to better adjust their own actions and decisions, and provide commanders with a more accurate information and intelligence basis. (23) Analysis of control capabilities. The control capabilities of troops are closely related to the distance between key points and the enemy's defense front and the number of surrounding roads. A shorter distance to the front is conducive to close-range fire suppression by troops, which can quickly suppress enemy fortifications, bunkers and personnel, weakening the enemy's combat effectiveness and counterattack capabilities. A large number of roads can provide opportunities for troops to set up defense and blocking facilities. By setting up roadblocks, artillery positions, concealed combat positions, etc. at key locations, it can effectively interfere with the enemy's movement and block the enemy, thereby enhancing the control capabilities of troops. (24) Analysis of deployment capabilities. The selection of key points in terrain is affected by the deployment area and slope. A large area can concentrate a variety of arms and units, including infantry, armored forces, artillery, air support, etc., to achieve comprehensive combat capabilities and adapt to various combat missions and environments. A low-slope terrain can provide better mobility conditions, allowing troops and equipment to move and maneuver more quickly, launch combat and make rapid adjustments, and enhance rapid deployment capabilities.

4. According to claim 1, a terrain key point analysis method based on a multi-head attention mechanism is characterized in that: The specific steps of (30) are as follows: (31) Select key points based on knowledge rules. Based on reconnaissance and defense capabilities, sort the high ground in the area according to elevation, and select the first n high ground as the key points of the area. Based on control capabilities, establish a circular buffer area with a radius of r km with all high ground in the area as the center, obtain the number of all roads in the area, and normalize the number of roads and the frontier distance. Select the first n high ground with a large number of roads and a short frontier distance as the key points of the area. Based on configuration and deployment capabilities. Establish a circular buffer area with a radius of r km with all high ground in the area as the center, obtain the slope information in the area, sort the slopes from small to large, and select the first n high ground with the smallest slope in the area as the key points of the area. (32) A terrain dataset is constructed based on the indicator system. The dataset includes height (terrain elevation), road_num (number of roads), leading_distance (front distance), and slope (slope). (33) The continuous data of terrain elevation, front distance and slope, and the discrete data of road number are standardized so that the data have a similar scale range.

5. According to claim 1, a terrain key point analysis method based on a multi-head attention mechanism is characterized in that: The specific steps of (40) are as follows: (41) Initialize h different heads, each with a dimension of 4. Map the four feature vectors S = [s1, s2, s3, s4] of terrain elevation, frontier distance, number of roads, and slope to the h heads respectively and perform linear transformation. The calculation formula is as follows: Among them, Q j , K j and V j Corresponding to the jth attention, is the weight matrix. (42) Scaled dot product similarity calculation is performed to obtain the attention weight of each head. The attention score matrix of each feature vector is calculated according to the Q and K of the four feature vectors. The scaled dot product similarity method is used to perform a SoftMax operation on the attention score matrix of each feature data to obtain the attention weight matrix of each feature data. The attention weight matrix is ​​multiplied by the value sequence V. The calculation formula is as follows: (43) The processed matrices are concatenated together and then linearly transformed to obtain the attention value of each key point, where W O is the weight matrix, and the calculation formula is as follows: M v =Concat(head1,head2,...,head j )W O (5) 6. A terrain key point analysis method based on a multi-head attention mechanism according to claim 1, characterized in that: The specific steps of (50) include the following: (51) The attention threshold is set to k, and the terrain highlands with attention values ​​greater than k are output as key points, and the key point analysis conclusions are output according to the knowledge rules.