Discretized potential field parallel processing method based on task association
By employing a task-association-based discretized potential field parallel processing method, combined with behavior trees and heatmaps, adaptive mesh partitioning and GPU parallel computing are achieved. This solves the problems of high computational load and poor real-time performance in traditional potential field calculation methods, thereby improving the efficiency and interactivity of situational understanding.
Patent Information
- Application Number
- CN202511740300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-27
AI Technical Summary
Traditional potential field calculation methods suffer from high computational cost and poor real-time performance in complex adversarial environments, and the uneven distribution of attention leads to an exponential increase in computational complexity with spatial dimension and number of entities.
A discretized potential field parallel processing method based on task association is adopted. The adversarial task is displayed through a behavior tree structure. Adaptive mesh partitioning is performed according to the task association degree. GPU parallel computing technology is used to realize parallel computing at the task level and entity level, and heat map is generated for situation display.
It significantly reduces computing resource consumption, enhances the interactivity and intuitiveness of situational awareness, and enables decision-makers to quickly focus on key mission areas, thereby improving the efficiency of situational understanding.
Smart Images

Figure CN121581672A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to a parallel processing method of discretized potential field based on task association. BACKGROUND
[0002] In a complex confrontation environment, the situation awareness and cognitive ability of the confrontation process are the core support of decision-making command. The number of entities in the confrontation space is large and the types are diverse, and it is difficult for decision-makers to quickly understand the current situation from the massive information, so a means is needed to abstract the huge information and present it intuitively. The essence of the situation awareness of the decision-maker is to master the current strength distribution of the red and blue parties in the confrontation space, that is, to judge which party is stronger in a certain area. To achieve this goal, researchers usually use entity ability modeling method to calculate the entity ability of the red and blue parties by using the Lanchester equation and present it in numerical form. The artificial potential field method is an effective situation representation technology, which can abstract the influence and threat degree of space entities into potential field distribution and intuitively display through visualization means such as heat map.
[0003] However, the traditional potential field calculation method faces challenges such as large amount of calculation, poor real-time performance and uneven attention. Most of the current artificial potential field calculation methods use uniform grid division method to calculate the entire confrontation space with equal granularity, which greatly increases the potential field calculation consumption. In addition, considering the different types of entity attributes, in order to fully represent the influence distribution of entities in the confrontation space, the influence of various factors on potential field calculation needs to be considered, which will further increase the complexity of calculation, leading to exponential growth of calculation complexity with space dimension and entity number. SUMMARY
[0004] Therefore, it is necessary to provide a parallel processing method of discretized potential field based on task association to solve the above technical problems. The method comprises the following steps: displaying a behavior tree structure of a confrontation task on an interactive interface, wherein the behavior tree is used to describe action plans of both parties in the confrontation task, and the behavior tree structure comprises task nodes; When a triggering behavior of a user on at least one task node in the behavior tree structure is detected, the task association degrees of each region of the confrontation space of the confrontation task are determined according to the target task node triggered by the user, and the regions of the confrontation space are divided into grids according to the task association degrees; wherein the task association degree is used to represent the association degree of the region and each target task node, and the grid division granularity of the region with higher task association degree is finer; The potential field of each grid of the confrontation space is calculated, and a heat map is generated based on the potential field of each grid and displayed on the interactive interface.
[0005] In an embodiment, any task node in the behavior tree structure is associated with a task entity. The target task node triggered by the user determines the region task correlation degree of the adversarial space of the adversarial task, including: For any region in the adversarial space, the sum of the correlation degrees of the region and all target task nodes is calculated as the task correlation degree of the region; wherein the correlation degree of the region and any target task node is calculated using the following formula: In the formula, is the correlation degree of the region and any target task node, represents the distance relationship between the task entity associated with the task t and the region center point p, and the distance is a Gaussian distance, is an interaction correlation factor, indicating the interaction intensity of the user to the task t, is an importance factor, indicating the priority of the task t, , , is a weight coefficient, satisfying .
[0006] In an embodiment, the task correlation degree is used to divide the regions of the adversarial space into a grid, including: The region information of each adversarial space is represented using the tree structure of an N-ary tree, each node of the N-ary tree being used to represent a region, and the following steps are performed by traversing each layer structure of the N-ary tree: Determine whether the task correlation degree of each region of the current layer is greater than a preset correlation degree threshold; If it is greater than the preset correlation degree threshold, the current region is divided into N regions as the next layer structure of the N-ary tree; If it is less than the preset correlation degree threshold, or the depth of the current division reaches a preset division depth threshold, stop further division.
[0007] In an embodiment, any task node in the behavior tree structure is associated with a space region; and the potential field of each grid of the adversarial space is calculated, including: Determine the grid associated with each target task node to obtain a set of grids associated with each target task node, wherein the association of a target task node with a grid means that the center coordinates of the grid are located within the space region associated with the target task node; Obtain a GPU thread block corresponding to the number of target task nodes, and assign the set of grids corresponding to each target task node to different GPU thread blocks, so that different GPU thread blocks perform parallel calculation of the potential field corresponding to each target task node, realizing task-level parallel calculation.
[0008] In an embodiment, the number of threads in any GPU thread block is equal to the sum of the number of entities in each grid in the set of grids corresponding to the target task node. The different GPU thread blocks perform parallel computation of the potential field corresponding to each target task node, including: For any grid in the grid set corresponding to any target task node, the potential field calculation of different entities within that grid is assigned to different GPU threads to achieve entity-level parallel computing.
[0009] In one implementation, assigning the grid set corresponding to each target task node to different GPU thread blocks includes: Based on the priority of each target task node and the number of grids in the grid set associated with that target task node, the grid set corresponding to the target task node is allocated to GPU thread blocks; among them, GPU thread blocks are allocated to target task nodes with higher priority first, and the more grids in the grid set, the more threads the allocated GPU thread block includes.
[0010] In one embodiment, the potential field calculation model for the entity is used to calculate the potential field. From the basic kernel function and entity capability function It consists of two linearly coupled parts, in which , In the formula and For the domain-generalized scale and power-order kernel parameters.
[0011] In one implementation, the type of the entity includes an attack platform, a detection platform, and a jamming platform; The entity capability function of the detection platform is: The function for attacking platform entities is The interference platform entity capability function is ,in These are the basic capability values of physical equipment. The maximum distance threshold represents the range of distances that an entity's capabilities can cover.
[0012] In one implementation, generating a heatmap based on the potential field of each grid and displaying it in the interactive interface includes: Locate and highlight the spatial region associated with the target task node triggered by the user, and generate a heatmap to display the corresponding potential field distribution.
[0013] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any of the above embodiments.
[0014] By associating grid partitioning with tasks, this approach focuses on calculating potential field changes in the target areas of interest to users, reducing computational resource consumption while meeting users' interactive needs for situational awareness. Simultaneously, a deep linkage mechanism between behavior trees and heatmaps achieves seamless integration between task nodes and potential field calculations. Users can directly access real-time potential field heatmaps of associated areas by clicking on behavior tree nodes, significantly enhancing the interactivity and intuitiveness of situational awareness. This allows decision-makers to quickly focus on critical task areas and improve the efficiency of situational understanding. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a task-association-based discretized potential field parallel processing method in one embodiment. Figure 2 This is a schematic diagram of the behavior tree structure proposed in one embodiment; Figure 3 This is a schematic diagram of an adaptive mesh partitioning method based on task association proposed in one embodiment; Figure 4 This is a logical schematic diagram of the main technical solution proposed in one embodiment; Figure 5 This is a schematic diagram illustrating the specific execution flow of a task-association-based discretized potential field parallel processing method proposed in this application. Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0017] In complex adversarial environments, situational awareness and cognitive capabilities during the adversarial process are core support for decision-making and command. The sheer number and diversity of entities in the adversarial space make it difficult for decision-makers to quickly understand the current situation from a massive amount of information. Therefore, a method is needed to abstract and intuitively present this vast amount of information. The essence of a decision-maker's situational awareness is to grasp the current power distribution between the opposing forces in the adversarial space, that is, to determine which side is stronger in a certain area. To achieve this goal, researchers typically use entity capability modeling methods, employing the Lanchester equations to calculate the entity capabilities of both sides and presenting them numerically. Artificial potential field methods, as an effective situational characterization technique, can abstract the influence and threat level of spatial entities into a potential field distribution and visually represent it through heatmaps and other visualization techniques.
[0018] However, traditional potential field calculation methods face challenges such as high computational cost, poor real-time performance, and uneven attention distribution. Currently, most artificial potential field calculation methods employ uniform grid partitioning, performing uniform-granularity calculations across the entire adversarial space. This method significantly increases the computational cost. Furthermore, considering the different entity attribute types, to comprehensively represent the influence distribution of entities in the adversarial space, the impact of various factors on the potential field calculation needs to be considered. This further increases computational complexity, causing it to grow exponentially with spatial dimension and the number of entities.
[0019] To address the aforementioned issues, researchers introduced an adaptive mesh generation technique. This technique decomposes the adversarial space into meshes of different levels and granularities according to actual needs. By associating the mesh generation with the task, it focuses on calculating the potential field changes in the target region of interest to the user, reducing computational resource consumption while meeting the user's interactive needs for situational understanding. Furthermore, high-performance computing technology is crucial for accelerating potential field calculations. Existing parallel potential field calculation methods mainly target single-type potential fields, and most parallel computing strategies employ single-level parallel architectures.
[0020] Based on the above, this invention proposes a parallel processing method for discretized potential fields based on task association. This method includes real-time calculation and presentation of the potential field in the user-focused task region by associating task nodes with a behavior tree and a heatmap; effectively reducing computational load by implementing fine-grained partitioning of the user-focused region and coarse-grained partitioning of the non-focused region; and fully utilizing GPU computing power to perform parallel computation simultaneously at the task region layer and the entity layer, significantly improving computational efficiency. This invention overcomes the bottlenecks of weak task association, unreasonable mesh partitioning, and low computational efficiency in traditional potential field calculations, providing a universal computational framework for situational representation in complex adversarial environments, realizing "on-demand computation" of situational information, significantly reducing computational overhead while ensuring user experience, and providing strong support for situational understanding in the adversarial space.
[0021] Specifically, such as Figure 1 As shown, this application proposes a parallel processing method for discretized potential fields based on task association, comprising: S101, Display the behavior tree structure of the adversarial task on the interactive interface. The behavior tree is used to describe the action plans of both sides in the adversarial task. The behavior tree structure includes task nodes. S102, when a user triggers a behavior on at least one task node in the behavior tree structure, the task correlation degree of each region in the adversarial space of the adversarial task is determined according to the target task node triggered by the user, and each region in the adversarial space is divided into grids according to the task correlation degree; wherein, the task correlation degree is used to characterize the degree of correlation between the region and each target task node, and the higher the task correlation degree, the finer the granularity of the grid division of the region. S103, Calculate the potential field of each grid in the adversarial space, generate a heat map based on the potential field of each grid and display it in the interactive interface.
[0022] By adopting the above scheme, the grid division is associated with the task, and the potential field changes in the target area of interest to the user are calculated in a focused manner, reducing the consumption of computing resources while meeting the user's interactive needs for situational awareness. Simultaneously, through a deep linkage mechanism between behavior trees and heatmaps, seamless integration between task nodes and potential field calculations is achieved. Users can directly obtain real-time potential field heatmaps of associated areas by clicking on behavior tree nodes, significantly enhancing the interactivity and intuitiveness of situational awareness. This allows decision-makers to quickly focus on key task areas and improve the efficiency of situational understanding.
[0023] The behavior tree structure proposed in this application will be introduced below.
[0024] The behavior tree proposed in this application is a pre-constructed and stored behavior tree used to describe the action plans of both sides in an adversarial task. It can represent the task relationships in the adversarial space using a hierarchical behavior tree structure, specifically including: Behavior tree node definition: Each node represents a task or subtask and includes attributes such as node ID, node type (selection node, sequence node, condition node, behavior node, etc.), execution status, related entity set, and spatial region range; Node relationship definition: Hierarchical, sequential, and parallel relationships between tasks are constructed through parent-child and sibling relationships to form a complete task logical structure; Task entity association: Associate each task node with the corresponding task execution entity (such as ships, aircraft, etc.) and its attribute data (such as position, speed, capability parameters, etc.). Task spatial region association: Define the associated spatial region for each task. The size of the region varies for tasks at different levels. The task node contains the coordinates of the target region.
[0025] like Figure 2 The diagram shown is a schematic of a behavior tree structure proposed in this application. The behavior tree includes task nodes (task 1, task 2 and task 3 in the figure) and action nodes. Since the behavior tree adopts a hierarchical behavior tree structure to represent the task relationship in the adversarial space, the user can trigger the task node that the user is interested in on the behavior tree based on the adversarial task behavior tree displayed in the interactive interface. The user can trigger the task node by clicking or other means. This application does not limit the triggering method.
[0026] In one embodiment, as described above, any task node in the behavior tree structure is associated with a task entity. The step S102, which determines the task association degree of each region in the adversarial space of the adversarial task based on the target task node triggered by the user, specifically includes: For any region in the adversarial space, the sum of the correlation degrees between that region and all target task nodes is calculated as the task correlation degree of that region; wherein, the correlation degree between a region and any target task node is calculated using the following formula: In the formula, The degree of association between the region and any target task node. This represents the distance relationship between the task entity associated with task t and the center point p of the region. This distance is the Gaussian distance. The interaction correlation factor represents the intensity of user interaction with task t. The importance factor represents the priority of task t. , , For the weighting coefficients, satisfying . Based on the above method, the correlation between a target task node and a region can be determined according to the priority of each target task node, the intensity of user interaction (such as click frequency, dwell time, etc.), and the distance relationship between the target task node and the region. The region can be a region evenly divided within the adversarial space; for example, the adversarial space can be evenly divided into four regions.
[0027] In one embodiment, in S102 above, the adversarial space is divided into grids according to the task relevance. Specifically, an N-ary tree data structure can be used to represent the regional information of each adversarial space. Each node of the N-ary tree represents a region. The following steps are performed by traversing each layer of the N-ary tree: Determine whether the task correlation degree of each region in the current layer is greater than the preset correlation degree threshold; If the correlation degree is greater than the preset correlation threshold, and the current partitioning depth has not reached the preset partitioning depth threshold, then the current region is divided into N regions as the next layer of the N-ary tree structure; If the current partitioning depth is less than the preset correlation threshold, or if the current partitioning depth reaches the preset partitioning depth threshold, then the partitioning process will stop.
[0028] In one specific implementation, for example, a quadtree data structure can be used to represent the regional information of each adversarial space, specifically including: The root node represents the entire adversarial space region, and multi-level sub-mesh is formed through recursive splitting; Grid node attributes include: spatial boundary, grid level, associated task set, association degree value, subgrid pointer, etc. Set maximum split depth To control the fineness of mesh generation and prevent excessive meshing from causing memory and computational overhead; Set smoothing constraints for adjacent grids to ensure that the difference between adjacent grid levels does not exceed 1, thus avoiding abrupt changes in grid scale.
[0029] The task-relatedness-guided grid partitioning algorithm is as follows: Initialization: Creates the root mesh representing the entire adversarial space and sets the current depth. ; Relevance assessment: For each grid cell in the current level Calculate its task relevance value This value represents the sum of the correlation between the grid center point and all target task nodes; According to the preset threshold correlation with the current grid Decide whether to further divide: like and Then the grid will be It is split into four sub-grids; like or Then stop working on the grid. The split; For all newly generated submesh, let The above steps are executed recursively. Mesh smoothing: Check the hierarchical difference between adjacent meshes and perform additional subdivisions if necessary to meet smoothing constraints; Grid update: When the task status or user focus changes, the correlation is recalculated and the grid structure is updated.
[0030] This algorithm ensures that computational resources are concentrated in highly correlated regions while maintaining low overall computational complexity.
[0031] Combination Figure 2 ,like Figure 3 The diagram shown illustrates an adaptive mesh partitioning method based on task association proposed in this application. Task 3 is the target task node triggered by the user.
[0032] In one implementation, as described above, any task node in the behavior tree structure is associated with a spatial region. The calculation of the potential field of each grid in the adversarial space in S102 specifically includes: Determine the grid associated with each target task node to obtain the set of grids associated with each target task node. The association between a target task node and a grid means that the center coordinates of the grid are located within the spatial region associated with the target task node. The algorithm acquires GPU thread blocks corresponding to the number of target task nodes. Each target task node's corresponding mesh set is assigned to a different GPU thread block, and these different GPU thread blocks compute the potential field corresponding to each target task node in parallel. In other words, the number of acquired GPU thread blocks equals the number of target task nodes, meaning one GPU thread block can be used to process the potential field corresponding to one target task node, achieving parallel computation. This method enables task-level parallel computation.
[0033] Furthermore, since the potential field actually needs to be calculated for each entity, this application also proposes a finer-grained parallel computing method. That is, this application proposes that the number of threads in the GPU thread block corresponding to any target task node is equal to the sum of the number of entities in each grid in the grid set corresponding to the target task node. The above-mentioned parallel computing of the potential field corresponding to each target task node by different GPU thread blocks specifically includes: for any grid in the grid set corresponding to any target task node, the potential field calculation of different entities in that grid is assigned to different GPU threads to achieve entity-level parallel computing.
[0034] For example, if there are two target task nodes, namely target task node 1 and target task node 2, then two GPU thread blocks need to be obtained, namely GPU thread block 1 and GPU thread block 2, to handle the potential field calculation of target task node 1 and target task node 2 respectively. Among them, the mesh set corresponding to target task node 1 includes mesh 1 and mesh 2. The number of entities in mesh 1 is 2 and the number of entities in mesh 2 is 3. Then GPU thread block 1 needs to include 2 (number of entities in mesh 1) + 3 (number of entities in mesh 2) = 5 threads to process the potential field calculation of all entities in the mesh set corresponding to target task node 1, including mesh 1 and mesh 2, in parallel.
[0035] In another embodiment, this application proposes that the number of threads in any GPU thread block is equal to the maximum number of entities in each grid in the grid set corresponding to the target task node. Different GPU thread blocks calculate the potential field corresponding to each target task node in parallel, including: for any grid in the grid set corresponding to any target task node, the potential field calculation of different entities in the grid is assigned to different GPU threads. That is, the potential field calculation of entities in one grid can be processed in parallel by the GPU thread block, and then the potential field calculation of entities in the next grid can be processed in parallel by the GPU thread block.
[0036] The above scheme enables parallel potential field calculation at two levels (task level and entity level).
[0037] In practical implementation, efficient two-level parallel computing can be achieved using the CUDA architecture, which includes the following steps: (1) Task-mesh mapping: Construct a mapping table between tasks and mesh regions, and determine the set of meshes associated with each task; (2) Task scheduling: Assign tasks to GPU thread blocks based on task priority and the number of associated grids; (3) Grid data structure reorganization: converting the quadtree grid structure into a compact array representation suitable for GPU parallel computing; (4) Kernel function design: Design a two-level nested CUDA kernel function. The outer kernel function handles task region allocation, and the inner kernel function handles entity potential field calculation. (5) Memory optimization: Use GPU shared memory to cache frequently used data to reduce global memory access overhead; (6) Atomic operations: Atomic addition operations are used to combine the potential field contributions of different entities to the same grid point to ensure the correctness of the calculation.
[0038] The innovative two-tier parallel computing architecture described above fully leverages the parallel computing capabilities of GPUs, simultaneously implementing parallel computation at both the task region and entity layers, resulting in a significant increase in computational efficiency. Experimental results show that, compared to traditional single-tier parallel methods, this approach significantly improves the potential field calculation speed, meeting the real-time requirements of situational analysis in complex adversarial environments and providing strong support for rapid decision-making.
[0039] In one embodiment, the grid set corresponding to each target task node is assigned to different GPU thread blocks. Specifically, the grid set corresponding to each target task node is assigned to GPU thread blocks based on the priority of each target task node and the number of grids in the grid set associated with that target task node. Among these, GPU thread blocks are assigned to target task nodes with higher priority, and the more grids in the grid set, the more threads are included in the assigned GPU thread block.
[0040] In one embodiment, this application defines a unified potential field calculation model for different types of entities in the adversarial space, wherein the potential field calculation model for this entity is... From the basic kernel function and entity capability function It consists of two linearly coupled parts, in which , In the formula and This is a domain-wide universal scale and power-order kernel parameter. This hierarchical structure ensures "unified kernel and expandable parameters," facilitating the consistent expression and coupled computation of potential fields from different equipment. In complex adversarial spaces, entity types include strike platforms, detection platforms, and jamming platforms, each with a specific potential field decay function. The capability function for the detection platform entity is: The function for attacking platform entities is The interference platform entity capability function is , These are the basic capability values of physical equipment. The maximum distance threshold represents the range of distances that an entity's capabilities can cover.
[0041] In one implementation, the above-mentioned 103 specifically includes: locating and highlighting the spatial region associated with the target task node triggered by the user, and generating a heat map to display the corresponding potential field distribution.
[0042] In its specific implementation, this application implements a joint interactive interface for behavior tree visualization and heatmap display, which includes: Behavior Tree View: Displays the hierarchical relationship of tasks in a tree structure, using colors and icons to represent node types and execution status; Heatmap view: Displays the potential field distribution using a color gradient; Linked control panel: Provides functions such as parameter adjustment, view synchronization, and display filtering.
[0043] In addition, this application proposes a two-way linkage method between behavior trees and heatmaps: Tree-to-graph linkage: When a user selects a behavior tree node, the spatial region associated with the task is automatically located and highlighted, and the heat map is updated to display the corresponding potential field distribution. Image-to-tree linkage: When a user selects a region or entity on a heatmap, the associated behavior tree nodes are automatically highlighted; Multi-task combination: Supports users to select multiple task nodes at the same time, calculate and display the combined potential field distribution of the combined tasks; Dynamic temporal display: Supports playing the dynamic changes of the potential field during task execution in a time sequence.
[0044] Through the above technical solution, this invention overcomes the limitations of traditional potential field calculation methods, achieving efficient situational awareness calculation and visualization based on task association, and providing a novel solution for situational awareness in complex adversarial environments. This solution not only significantly improves computational efficiency but also enhances the interactivity and relevance of situational understanding, providing decision-makers with more intuitive and accurate situational awareness support.
[0045] To better understand this solution, as follows Figure 4 and Figure 5 As shown, Figure 5 This is a schematic diagram of the main technical solution of this application, showing the overall logical framework of the method. Figure 4 This is a schematic diagram illustrating the specific execution flow of a task-association-based discretized potential field parallel processing method proposed in this application.
[0046] In one embodiment, this application provides a computer device whose internal structure diagram can be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a Chinese event relationship extraction model construction method or a Chinese event relationship extraction method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0047] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0048] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the task-association-based discretized potential field parallel processing method described in any of the above embodiments.
[0049] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the task-association-based discretized potential field parallel processing method described in any of the above embodiments.
[0050] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Claims
1. A method for parallel processing of discretized potential fields based on task association, characterized in that, The method includes: The interactive interface displays the behavior tree structure of the adversarial task. The behavior tree is used to describe the action plans of both sides in the adversarial task. The behavior tree structure includes task nodes. When a user triggers a behavior on at least one task node in the behavior tree structure, the task correlation degree of each region in the adversarial space of the adversarial task is determined according to the target task node triggered by the user, and the region in the adversarial space is divided into grids according to the task correlation degree; wherein, the task correlation degree is used to characterize the degree of association between the region and each target task node, and the higher the task correlation degree, the finer the granularity of the grid division. Calculate the potential field of each grid in the adversarial space, generate a heat map based on the potential field of each grid, and display it in the interactive interface.
2. The method according to claim 1, characterized in that, In the behavior tree structure, each task node is associated with a task entity; The step of determining the task correlation degree of each region in the adversarial space of the adversarial task based on the target task node triggered by the user includes: For any region in the adversarial space, the sum of the correlation degrees between that region and all target task nodes is calculated as the task correlation degree of that region; wherein, the correlation degree between a region and any target task node is calculated using the following formula: In the formula, The degree of association between the region and any target task node. This represents the distance relationship between the task entity associated with task t and the center point p of the region. This distance is the Gaussian distance. The interaction correlation factor represents the intensity of user interaction with task t. The importance factor represents the priority of task t. , , For the weighting coefficients, satisfying .
3. The method according to claim 2, characterized in that, The step of dividing the adversarial space into grids based on task relevance includes: An N-ary tree data structure is used to represent the regional information of each adversarial space. Each node of the N-ary tree represents a region. The following steps are performed by traversing each level of the N-ary tree: Determine whether the task correlation degree of each region in the current layer is greater than the preset correlation degree threshold; If the correlation degree is greater than the preset correlation threshold, and the current partitioning depth has not reached the preset partitioning depth threshold, then the current region is divided into N regions as the next layer of the N-ary tree structure; If the current partitioning depth is less than the preset correlation threshold, or if the current partitioning depth reaches the preset partitioning depth threshold, then the partitioning process will stop.
4. The method according to claim 1, characterized in that, In the behavior tree structure, each task node is associated with a spatial region; the calculation of the potential field of each grid in the adversarial space includes: Determine the grid associated with each target task node to obtain the set of grids associated with each target task node. The association between a target task node and a grid means that the center coordinates of the grid are located within the spatial region associated with the target task node. Obtain GPU thread blocks corresponding to the number of target task nodes, assign the mesh set corresponding to each target task node to different GPU thread blocks, and have different GPU thread blocks compute the potential field corresponding to each target task node in parallel to achieve task-level parallel computing.
5. The method according to claim 4, characterized in that, The number of threads in any GPU thread block is equal to the sum of the number of entities in each grid of the grid set corresponding to the target task node; The different GPU thread blocks perform parallel computation of the potential field corresponding to each target task node, including: For any grid in the grid set corresponding to any target task node, the potential field calculation of different entities within that grid is assigned to different GPU threads to achieve entity-level parallel computing.
6. The method according to claim 4, characterized in that, Assign the grid set corresponding to each target task node to different GPU thread blocks, including: Based on the priority of each target task node and the number of grids in the grid set associated with that target task node, the grid set corresponding to the target task node is allocated to GPU thread blocks; among them, GPU thread blocks are allocated to target task nodes with higher priority first, and the more grids in the grid set, the more threads the allocated GPU thread block includes.
7. The method according to claim 5, characterized in that, Potential field calculation model for the entity From the basic kernel function and entity capability function It consists of two linearly coupled parts, in which , In the formula and Let r be the domain-general scale and power kernel parameter, where r represents the distance between the potential source location and the point of influence on the grid. Represents the equivalent radius of the entity's capability.
8. The method according to claim 7, characterized in that, The types of entities include strike platforms, detection platforms, and jamming platforms; The entity capability function of the detection platform is: The function for attacking platform entities is The interference platform entity capability function is ,in These are the basic capability values of physical equipment. The maximum distance threshold represents the range of distances that an entity's capabilities can cover. Let r represent the equivalent radius of entity e, and r represent the distance between the potential source location and the point of action of the grid.
9. The method according to claim 1, characterized in that, The generation and display of heatmaps based on the potential fields of each grid in the interactive interface includes: Locate and highlight the spatial region associated with the target task node triggered by the user, and generate a heatmap to display the corresponding potential field distribution.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.