Data processing method and device of battlefield system and electronic equipment
By constructing a multi-level entity architecture of teams, soldier cards, and soldiers, and adopting a hierarchical instruction parsing and distribution mechanism, the contradiction between the performance of large-scale units on the same screen and the simulation of individual behavior in the cold weapon battlefield system is resolved, and a balance between battlefield realism and performance is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-07
AI Technical Summary
Existing cold weapon battlefield systems are unable to maintain the performance of large-scale units on the same screen while achieving realistic simulation of individual behaviors, resulting in battlefield performance deviating from realistic cognition or insufficient computing performance.
A hierarchical instruction parsing and distribution mechanism is adopted. By constructing a multi-level entity architecture of team-soldier card-soldier, strategic instructions are parsed and distributed to soldier entities layer by layer, thereby achieving refined simulation of individual behavior.
While ensuring the performance of large-scale unit scheduling, it achieves refined simulation of individual behavior, resolves the contradiction between the rigidity of macroscopic models and the inefficiency of microscopic models, and achieves a unity between the grand visual representation of the cold weapon battlefield and the realism of individual behavior.
Smart Images

Figure CN121796901A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer software engineering, and particularly relate to a data processing method and device of a battlefield system and an electronic device. BACKGROUND
[0002] With the development of cold weapon themed games, players' demand for the grand scale of the battlefield and the realism of individual behavior is increasing. The ideal battlefield system needs to achieve two core goals at the same time: one is to present a grand war scene composed of thousands of combat units, to ensure visual impact and immersion; the second is to ensure that each soldier unit has autonomous behavior logic consistent with real cognition, such as individual movement, attack response and tactical cooperation. However, in a real-time computing environment, the number of units and the complexity of behavior grow exponentially, and how to balance the allocation of computing resources between large-scale unit rendering and fine-grained behavior simulation has become a fundamental technical challenge faced by the industry for a long time.
[0003] The current mainstream solutions mainly fall into two categories: one is the "legion abstraction model", which processes the entire legion as the smallest combat unit, and the individual soldiers only exist as visual accessories, their behavior does not participate in substantive battle calculation, and the interaction between legions is represented as abstract group mutual hacking; the second is the "individual unit fine-grained model", each soldier is an independent entity with a complete state machine and behavior logic, and can directly participate in battle determination and strategy execution, which can achieve high-precision individual behavior simulation. These two models try to solve the design requirements of the battlefield system from the macro efficiency and micro realism directions respectively.
[0004] Although the legion abstraction model can support large-scale unit display on the same screen, it has stripped away the interaction logic of individual soldiers, resulting in a battlefield performance that is far from real cognition - soldiers' behavior is stiff and tactical execution is rigid, and cannot reflect key elements such as formation change and local cooperation in cold weapon wars; while the individual unit fine-grained model has made breakthroughs in behavior realism, it is difficult to support thousands of units on the same screen due to the performance overhead of independent calculation of each unit, which inevitably leads to a decrease in frame rate or a reduction in the number of units, thereby restricting the visual scale and immersion of the battlefield. Therefore, the existing cold weapon battlefield system cannot maintain large-scale unit performance while achieving individual fine-grained behavior simulation consistent with real cognition. SUMMARY
[0005] The present application provides a data processing method and device of a battlefield system and an electronic device to achieve fine-grained simulation of individual behavior while ensuring large-scale unit scheduling performance through a hierarchical instruction analysis and distribution mechanism, solving the contradiction between macro model stiffness and micro model inefficiency.
[0006] In a first aspect, embodiments of this application provide a data processing method for a battlefield system, the battlefield system including at least one team entity, each team entity being associated with at least one soldier card entity, and each soldier card entity being associated with at least one soldier entity, the method comprising:
[0007] In response to a user's tactical intent operation targeting a target team entity, the tactical intent operation is converted into a strategic instruction; wherein the strategic instruction defines the overall action objective of the target team entity.
[0008] Based on the hierarchical structure among the target team entity, the soldier card entity, and the soldier entity, the strategic instructions are parsed layer by layer and distributed to each of the soldier entities under the target team entity, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
[0009] Secondly, embodiments of this application also provide a data processing apparatus for a battlefield system, the battlefield system including at least one team entity, each team entity being associated with at least one soldier card entity, and each soldier card entity being associated with at least one soldier entity, the apparatus comprising:
[0010] A strategic instruction generation module is used to convert tactical intention operations of an operator targeting a target team entity into strategic instructions in response to such tactical intention operations.
[0011] The soldier behavior control module is used to parse and distribute the strategic instructions layer by layer to each of the soldier entities under the target team entity according to the hierarchical structure between the target team entity, the soldier card entity, and the soldier entities, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
[0012] Thirdly, embodiments of this application also provide an electronic device, which includes:
[0013] One or more processors;
[0014] Storage device for storing one or more programs.
[0015] When one or more programs are executed by one or more processors, the one or more processors implement a data processing method for a battlefield system as described in any of the embodiments of this application.
[0016] Fourthly, embodiments of this application also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a data processing method for a battlefield system as described in any of the embodiments of this application.
[0017] This application provides a data processing method for a battlefield system, which includes at least one team entity, each team entity being associated with at least one soldier card entity, and each soldier card entity being associated with at least one soldier entity. The method includes: responding to a user's tactical intent operation on a target team entity, converting the tactical intent operation into a strategic instruction, wherein the strategic instruction defines the overall action objective of the target team entity; and then, according to the hierarchical structure between the target team entity, soldier card entities, and soldier entities, parsing the strategic instruction layer by layer and distributing it to each soldier entity under the target team entity, so as to control each soldier entity to execute individual soldier behavior corresponding to the strategic instruction. The technical solution of this application constructs a multi-level entity architecture of team-soldier-card-soldier. While preserving the complete behavioral logic of individual soldiers, it parses and distributes macro-strategy instructions level by level through intermediate layers. This achieves unified and efficient scheduling of thousands of combat units and ensures that each soldier entity can execute refined behaviors that conform to realistic cognition based on the local situation. Thus, while maintaining the performance of large-scale simultaneous combat, it effectively solves the core contradiction between the rigid behavior of macro-abstract models and the insufficient performance of micro-refined models in existing technologies, achieving a unity between the grand visual representation of the cold weapon battlefield and the realism of individual behaviors. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the exemplary embodiments of this application, the accompanying drawings used in describing the embodiments are briefly introduced below. Obviously, the accompanying drawings described are only a portion of the embodiments to be described in this application, and not all of them. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0019] Figure 1 A schematic flowchart illustrating a data processing method for a battlefield system provided in an embodiment of this application;
[0020] Figure 2 A flowchart illustrating another data processing method for a battlefield system provided in this application embodiment;
[0021] Figure 3 This is a flowchart illustrating the implementation process of a data processing method for a battlefield system provided in this embodiment.
[0022] Figure 4 This refers to the specific content included in the transition relationship of each level of instruction state in this embodiment;
[0023] Figure 5 This is a schematic diagram of a data processing method for a battlefield system provided in an embodiment of this application;
[0024] Figure 6This is a schematic diagram of a data processing device for a battlefield system provided in an embodiment of this application;
[0025] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0027] Before introducing the technical solution provided in this application, the application scenario of the solution can be explained first. This embodiment is applicable to application scenarios in cold weapon-themed games that require a balance between realistic large-scale battlefield representation and high-efficiency performance. Currently, game systems generally adopt two models: legion abstraction or individual unit refinement. The former sacrifices tactical details and realism due to the lack of independent soldier interaction logic, while the latter, although capable of simulating refined behavior, is limited by computing performance and cannot support high-density unit combat on the same screen. In practical applications, since the battlefield needs to simultaneously process the tactical intentions and individual behaviors of thousands of combat units, the lack of an effective command parsing and distribution mechanism can easily lead to excessive system load or behavior that deviates from realistic cognition, affecting the immersion of the battlefield and the efficiency of strategy execution. Therefore, there is an urgent need for a method that can decompose user tactical intentions into individual soldier behaviors layer by layer through a hierarchical structure and coordinate the large-scale unit cooperative combat to improve the realism of battlefield simulation and system performance. This embodiment aims to dynamically parse and distribute strategic instructions along the entity level from team and troop card to soldier by responding to the user's tactical intention operation, and control each soldier entity to perform individual behaviors that conform to the overall goal, thereby achieving a realistic reproduction of the grand battlefield environment and a precise expression of tactical details while maintaining smooth operation.
[0028] Example 1
[0029] Figure 1 This is a flowchart illustrating a data processing method for a battlefield system provided in an embodiment of this application. This embodiment is applicable to situations in cold weapon-themed games where a balance between realistic large-scale battlefield representation and high-efficiency performance is required. The method can be executed by a data processing device for the battlefield system. This device can be implemented in the form of software and / or hardware. The hardware can be a controller, such as a mobile terminal, a PC, or a server.
[0030] This data processing method is applied to a battlefield system, which includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity.
[0031] The battlefield system refers to a software architecture and logical framework within a computer software environment specifically designed to simulate, manage, and drive large-scale military confrontations in the era of cold weapons. This system constructs a functional virtual battlefield environment by defining and maintaining hierarchical relationships and data associations between entities such as teams, soldier cards, and soldiers. The team entity is the top-level logical unit and core command object in this battlefield system. It represents a military group that can be independently identified and uniformly commanded at the tactical level. This entity does not directly handle the specific actions of individual soldiers but acts as an abstract aggregation container, defining its internal force composition by associating with one or more soldier card entities. The soldier card entity is a crucial logical level in the battlefield system, acting as a management unit for soldier groups. It belongs to a specific team entity above it and aggregates one or more soldier entities with the same attributes and types below it. The core function of this entity is to visualize and distribute macro-level strategic instructions from the team level based on the common characteristics of the soldier group represented by the soldier card.
[0032] In this embodiment, the battlefield system adopts a hierarchical data model structure. The battlefield system has a top-down, macro-to-micro entity inclusion and management relationship: at the top level of the battlefield system, there are one or more team entities as independent command units; each team entity contains one or more soldier card entities, which serve as the intermediate management layer and are responsible for grouping soldiers; and each soldier card entity further manages one or more bottom-level soldier entities, which are the final executors of specific actions, thus constructing a three-layer tree-like logical architecture of "team-soldier card-soldier", providing a data organization foundation for the layer-by-layer parsing and distribution of strategic instructions.
[0033] like Figure 1 As shown, the method includes:
[0034] S110, In response to the tactical intent operation of the operating user targeting the target team entity, the tactical intent operation is transformed into a strategic command.
[0035] In this context, the target team entity specifically refers to the particular team entity selected by the user's tactical intent operation within the current data processing flow, serving as the starting point for subsequent instruction generation and parsing. Tactical intent operation refers to macro-level command actions initiated by the user on the system interface, targeting a specific target team entity.
[0036] Strategic instructions, in particular, embody and formally define the overall action objectives and macro-level tasks that the target unit entity needs to accomplish. They define the overall action objectives of the target unit entity. Strategic instructions do not involve the behavioral details of specific individual soldiers, but rather serve as a high-level, abstract action plan, providing a unified and authoritative logical basis and data source for subsequent layer-by-layer analysis and concrete distribution within the "unit-soldier-card" hierarchical structure.
[0037] In this embodiment, the system can continuously monitor and capture the tactical intentions of users towards specific target teams. Then, the built-in logic parser translates this abstract user interaction intention into a structured, machine-readable strategic instruction data object. This process transforms the user's subjective and vague tactical thinking into precise commands that define the overall action objective and can be recognized and processed by the system, laying the data foundation for subsequent hierarchical instruction distribution and execution.
[0038] For example, when a user selects a team entity named "First Legion" on the game interface and clicks the "Attack" button at the enemy stronghold location on the map, this series of interactions constitutes a "tactical intention operation". At this time, this operation can be responded to, parsed and transformed into a "strategic instruction" with the content "Attack specified coordinates (X,Y)". This instruction does not specify the specific movement path or attack action of each soldier, but clearly defines the overall action goal of the target team entity "First Legion", that is, to capture the target point.
[0039] S120. Based on the hierarchical structure between the target team entity, the soldier card entity, and the soldier entity, the strategic instructions are parsed layer by layer and distributed to each soldier entity under the target team entity, so as to control each soldier entity to execute individual soldier behaviors corresponding to the strategic instructions.
[0040] Among them, individual soldier behavior refers to a series of specific actions and state changes independently executed by the lowest-level soldier entity after receiving specific instructions parsed at the hierarchical level, driven by its own behavioral logic and state machine.
[0041] In this embodiment, based on a predetermined three-level hierarchical relationship of team entity - soldier card entity - soldier entity, the strategic instructions defining the overall action objective are taken as a top-level input. First, at the target team entity level, analysis and macro-state decisions are performed to generate soldier card instructions that guide the next level. Subsequently, the soldier card instructions are distributed to the respective soldier card entities, which then perform further state decisions and refinements at the group level, transforming them into specific soldier instructions. Finally, the soldier instructions are issued to each soldier entity, driving them to execute micro-level individual soldier behaviors, including movement and / or attack. Thus, through this layer-by-layer analysis and distribution, the macro-level tactical intent is transformed into specific actions that are coordinated and consistent across all subordinate soldier entities.
[0042] Based on the above embodiments, optionally, when multiple soldier entities perform corresponding individual soldier behaviors, the execution logic of multiple soldier entities is calculated in parallel computing mode.
[0043] In the data processing of the battlefield system, when multiple soldier entities under the target force entity simultaneously execute their individual behavioral logic according to strategic instructions, parallel computing technology can be used to synchronously process the behavioral calculation tasks of these soldier entities. This means that the execution logic of multiple soldier entities can be decomposed into independent computing units, and the calculations can be performed simultaneously in the same time period through multi-threading, distributed or concurrent processing mechanisms, instead of being processed sequentially one by one. This improves the overall computing efficiency and system response speed, ensuring that the behavior of a large number of soldier entities can be simulated and executed in real time and in a coordinated manner, without causing delays or performance bottlenecks due to serial processing.
[0044] This application provides a data processing method, apparatus, and electronic device for a battlefield system. The battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The method includes: responding to a user's tactical intent operation on a target team entity, converting the tactical intent operation into a strategic instruction, wherein the strategic instruction defines the overall action objective of the target team entity; and then, according to the hierarchical structure between the target team entity, soldier card entities, and soldier entities, parsing the strategic instruction layer by layer and distributing it to each soldier entity under the target team entity, so as to control each soldier entity to perform individual soldier behavior corresponding to the strategic instruction. The technical solution of this application constructs a multi-level entity architecture of team-soldier-card-soldier. While preserving the complete behavioral logic of individual soldiers, it parses and distributes macro-strategy instructions level by level through intermediate layers. This achieves unified and efficient scheduling of thousands of combat units and ensures that each soldier entity can execute refined behaviors that conform to realistic cognition based on the local situation. Thus, while maintaining the performance of large-scale simultaneous combat, it effectively solves the core contradiction between the rigid behavior of macro-abstract models and the insufficient performance of micro-refined models in existing technologies, achieving a unity between the grand visual representation of the cold weapon battlefield and the realism of individual behaviors.
[0045] Example 2
[0046] Figure 2 This is a schematic diagram of a data processing method for a battlefield system provided in an embodiment of this application. Based on the foregoing embodiments, this embodiment provides a more detailed description of step S120. For specific implementation details, please refer to the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0047] In this embodiment, the battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity.
[0048] like Figure 2 As shown, the method specifically includes the following steps:
[0049] S210, In response to the tactical intent operation of the operating user targeting the target team entity, the tactical intent operation is transformed into a strategic command.
[0050] Among them, strategic instructions define the overall action objectives of the target team entity.
[0051] S220: Issue strategic instructions to the target team entity to control the target team entity to make state decisions at the team level, and convert the state decision results into soldier card instructions.
[0052] Among them, the state decision result refers to the internal decision made by a team entity in the battlefield system after receiving instructions from the upper level, based on its current environmental conditions, its own attributes, internal rules, and the objectives of the instructions, regarding what state it should enter next and what specific actions it needs to take to achieve that state.
[0053] Among them, soldier card instructions refer to specific, intermediate-level action commands generated and issued by a target unit entity to its subordinate soldier card entities based on the overall action objectives of strategic instructions. As the hub connecting upper-level unit strategy and lower-level soldier execution, soldier card instructions transform macro-level unit status decisions into specific tasks and behavioral requirements for individual soldier card units (such as squads or groups) at the soldier card level. This guides soldier card entities in making the next level of status decisions and ultimately generates soldier instructions that can be understood and executed by individual soldier entities.
[0054] In this embodiment, strategic instructions representing macro-tactical intentions can be transmitted to designated team entities, triggering the team entity as a whole to perform internal logical operations and judgments based on its current battlefield environment, its own attributes and capabilities, and the final goal defined by the instructions, in order to determine what macro-behavioral state the entire team should enter (e.g., attack, defense, or relocation). This macro-state decision result is then concretized and refined into a series of more operational action commands for its subordinate unit entities, namely unit commands, thereby completing the decomposition and transition of instructions from the macro-strategic level to the meso-tactical level.
[0055] Optionally, the specific implementation steps of S220 may include:
[0056] S2201. Make state decisions at the team level based on strategic instructions and determine the first state decision result.
[0057] The first-state decision result refers to the core conclusion reached by the target team entity after receiving strategic instructions, through comprehensive analysis and judgment at the team level, regarding the macro-level basic behavioral pattern that the entire team will adopt. The first-state decision result includes movement or attack behavior. It signifies the team's basic direction of action (e.g., movement or attack) within the current tactical cycle and serves as the fundamental basis for generating all subsequent specific instructions. It contains key decision data derived from this basic behavior (such as the overall path during movement or the overall target during an attack), thus providing a clear decision-making basis and parameters for decomposing and transforming instructions to the next level of entity.
[0058] In this embodiment, after receiving a strategic instruction that defines the overall action objective, the target team entity's internal logic system performs a comprehensive analysis and judgment based on the macro requirements of the instruction, combined with the team's own state attributes and external battlefield environment information. This results in the selection of a fundamental action type (such as movement or attack) that represents the team's overall behavior pattern and is currently the highest priority to be executed. This selection result is the first state decision result, which signifies that the core action direction of the team in the current tactical cycle has been established and provides a basis for subsequent detailed decisions such as generating specific path planning or target designation.
[0059] S2202. If the first state decision result is a movement behavior, then calculate the overall path of the target team entity from its current location to the target location.
[0060] In this context, the target location refers to the spatial coordinates or area that the entire team entity ultimately needs to reach, determined by the first state decision of the team entity's movement behavior based on strategic instructions in the battlefield system. It is a geographical point or range that is precisely defined in the virtual battlefield environment, serving as the ultimate destination for path calculation and the spatial guidance basis for the team's overall movement behavior.
[0061] The overall path refers to one or more macroscopic and coherent route plans from the team's current spatial location to the final target location. It defines the spatial trajectory framework that the entire team entity should follow when making collective movements in the virtual battlefield environment.
[0062] Specifically, when the state decision at the team level determines that the team's core action mode is movement, the system will use internal algorithms to plan a coherent and feasible macro-route from the starting point to the destination in the virtual environment space, based on the destination information implied or explicitly specified in the strategic instructions. This overall path, as a key decision data, does not involve the specific movement details of individual soldiers, but rather provides a top-level spatial movement framework and directional guidance for subsequent levels to further decompose instructions and coordinate the collective movement of all subordinate units.
[0063] S2203. If the first state decision result is an attack behavior, then determine the overall attack target of the target team entity.
[0064] Among them, the overall attack target refers to one or more enemy units or key strategic points that need to be attacked collectively by the entire team entity when the target team entity makes a state decision at the team level and determines that the first state decision result is an attack behavior. It is a macro action target defined by the strategic instructions. It clarifies the unified firepower direction or tactical suppression target of the team in the attack behavior mode. It is a concentrated manifestation of the team-level attack intention and provides a macro and unified attack focus for the subsequent decomposition of attack instructions to subordinate unit card entities and soldier entities.
[0065] In this embodiment, when the core conclusion of the team-level state decision is to take offensive action, the system will, based on the overall action objective given by the strategic instructions, analyze the battlefield situation and the status of both sides, and clearly designate an enemy unit, position, or key point for the team entity to concentrate its firepower or tactical actions to strike. This determined overall attack target represents the unified focus and ultimate purpose of all offensive actions of the team in the current tactical cycle, and is the fundamental basis for subsequently decomposing the macro-attack intention and transforming it into specific troop card instructions and soldier instructions.
[0066] S2204. The state decision result, along with the overall path or overall attack target, is converted into a soldier card instruction issued to the soldier card entity.
[0067] In this embodiment, after the state decision is completed at the team level and corresponding macro data is generated, namely the first state decision result and the overall path corresponding to the movement behavior or the overall attack target corresponding to the attack behavior, these data are used as input and integrated and translated into a more operational command form that can be understood and executed by the next level (vehicle entity). This process is essentially to concretize the high-level strategic intent and planning into tactical instructions that guide each vehicle unit to make the next independent state decision and coordinated action, thereby realizing the effective transmission and task decomposition of instruction information from the team level to the vehicle level.
[0068] S230. Send soldier card instructions to at least one corresponding soldier card entity to control each soldier card entity to make state decisions at the soldier card level and convert the decision results into soldier instructions.
[0069] Among them, soldier commands refer to atomic, executable behavioral commands generated by a soldier card entity after completing its own state decision-making, based on received soldier card commands, and ultimately issued to a single soldier entity. Soldier commands are the final link in the entire command hierarchy decomposition chain, transforming the tactical tasks at the soldier card level into the most basic behavioral actions that soldier entities can directly understand and execute, thereby directly driving the individual behavior of every smallest combat unit in the virtual battlefield environment.
[0070] Specifically, the instructions from the unit entity, which contain macro-level task requirements, can be transmitted to one or more subordinate unit entities. Each unit entity is then triggered to independently perform internal logical judgments based on its role in the unit, its current state, and the content of the received instructions to determine the specific tactical actions it should perform. This decision result is further refined and translated into atomic action commands that can be directly recognized and executed by the lowest-level soldier entities, thereby completing the final transformation and assignment of instructions from the unit tactical level to the soldier execution level.
[0071] S240. Issue soldier instructions to the soldier entities under each soldier card entity to control each soldier entity to execute the corresponding individual soldier behavior when receiving soldier instructions.
[0072] Individual soldier behavior includes movement and / or attack behavior.
[0073] Specifically, the most specific and atomized soldier instructions generated by the soldier card entity can be transmitted to all the underlying soldier entities belonging to that soldier card. After receiving the instructions, each soldier entity's internal logic will directly parse the instructions and drive it to execute the basic actions that are clearly defined by the instructions in the virtual battlefield environment. These actions constitute the soldier's micro-behavioral performance on the battlefield, thereby ultimately transforming the upper-level tactical intentions into individual-level interactions that can be directly observed and calculated, and executing the individual soldier behaviors corresponding to each soldier entity.
[0074] Optionally, the specific implementation steps of S240 may include:
[0075] S2401. Control each soldier entity to parse and make decisions on soldier instructions based on its individual state machine, and determine the second state decision result.
[0076] Among them, the individual state machine refers to a computational model designed for each soldier entity. It defines that the entity can only be in one of a limited number of preset states (such as moving, attacking, waiting) at a specific time. It drives the transition between states based on received external instructions (such as soldier instructions), internal conditions (such as health points, number of skill uses), and environmental events (such as encountering enemies or obstacles). Thus, it autonomously controls what specific behavior the soldier entity should perform in the current state and decides when to switch to another state. It is the core logical mechanism for realizing the intelligent and autonomous behavioral decision-making of individual soldiers.
[0077] The second-state decision result refers to the final decision made by the soldier entity's internal state machine after receiving a soldier's instruction, based on the instruction's requirements, its current state, and information about the surrounding environment, regarding which basic behavioral pattern it should immediately execute. The second-state decision result includes either movement or attack behavior.
[0078] In this embodiment, each soldier entity can be driven to use its internally preset logical model, consisting of finite states and transition conditions, i.e., an individual state machine, to perform semantic analysis and contextual understanding on the received soldier instructions. At the same time, it comprehensively considers its own current state and external environmental factors. Through the operation mechanism of the state machine, it automatically judges and selects the basic behavior type (movement behavior or attack behavior) that is most prioritized and most suitable for execution at the current moment. This selection conclusion is the second state decision result, which serves as the direct basis for the soldier individual to transition from receiving instructions to executing specific behaviors, realizing the final transformation from macro-instructions to micro-individual autonomous responses.
[0079] S2402. If the second state decision result is a movement behavior, then control the soldier entity to move along the specified overall path, and realize the formation maintenance and local obstacle avoidance of individual soldiers by calling the autonomous navigation behavior module.
[0080] The autonomous navigation behavior module is a functional component integrated within the soldier entity that is specifically responsible for handling movement logic. After the soldier entity determines to execute a movement behavior, it can automatically calculate and generate the soldier's specific movement trajectory and pace control at the micro level based on the macro path specified by the upper layer (such as the overall path) and real-time environmental information (such as obstacles and friendly positions). At the same time, it dynamically coordinates behaviors such as formation maintenance and local obstacle avoidance through built-in algorithm logic, thereby ensuring that the soldier can intelligently, flexibly and collaboratively complete the autonomous movement process from the starting point to the destination while following the overall movement instructions.
[0081] Among them, formation maintenance refers to the process by which a soldier entity dynamically calculates and adjusts its own movement speed and direction through its autonomous navigation behavior module while moving according to the overall path, so as to ensure that it always maintains the preset relative position and spatial relationship with other friendly soldier entities in its team.
[0082] Local obstacle avoidance refers to the process by which a soldier entity, during its movement, uses its autonomous navigation behavior module to perceive and analyze static or dynamic obstacles (such as buildings or other units) within a short distance along its route in real time, and automatically and instantly calculates and adjusts its movement path and actions to avoid these obstacles.
[0083] In this embodiment, when the internal decision-making mechanism of a soldier entity determines that its current core behavior mode is movement, the system will drive the soldier to move using the overall path planned by its upper layer as a macro-movement framework. At the same time, it will activate its built-in autonomous navigation behavior module. This module can dynamically calculate the specific movement details of the soldier while following this macro-path, intelligently coordinate its relative position with friendly forces to maintain the overall formation of the team, and perceive and avoid nearby obstacles on the route in real time. Thus, under the premise of ensuring the consistency of collective action and the stability of the tactical structure, it can complete an efficient and flexible individual movement process.
[0084] S2403. If the second state decision result is an attack behavior, then move towards the attack target and perform the attack behavior on the attack target after entering the attack range.
[0085] The attack target refers to a specific enemy unit or strategic point designated by higher-level instructions or autonomous decision-making, which requires the soldier entity to use its attack capabilities to strike it. It clarifies the specific target of the soldier's individual action in the attack behavior mode.
[0086] In this embodiment, when a soldier entity determines through its internal state machine that it should perform an attack, the system will first drive the soldier entity to move along a path toward the designated attack target to approach the target. During this movement, the system will continuously detect the distance between itself and the target. Once it is determined that the target has entered the effective range (i.e., the attack range) that its attack capability can cover, the system will immediately trigger the attack logic, stop moving, and perform a specific attack action on the target, thereby completing the complete sequence of actions from approaching the enemy to launching an attack.
[0087] Optionally, the movement towards the target may also include the following steps:
[0088] (1) Continuously detect the status of neighboring friendly soldier entities within a predetermined range around the soldier entity.
[0089] The predetermined range refers to a fixed or configurable spatial detection area set for the soldier entity. This area is a sphere centered on the soldier entity itself and serves as the boundary for its perception and interaction. Only changes in the state of friendly or enemy entities within this boundary will be detected by the soldier entity and may trigger corresponding behavioral responses. Optionally, the size parameters of the predetermined range can be configured according to actual conditions.
[0090] Among them, neighboring friendly soldier entities refer to other soldier individuals in the virtual space of the battlefield system who belong to the same faction or team as the current soldier entity and whose spatial location is within a preset detection distance around the current soldier entity. These entities are key environmental factors that the current soldier needs to consider when making cooperative behavior decisions and tactical maneuvers.
[0091] Among them, the state of neighboring friendly soldier entities refers to the abstract representation of the current behavior pattern or survival status of individual soldiers of the same faction within the preset perception range of the current soldier entity, which is determined by their internal state machine and manifested externally as a state that can be detected by the system or other entities, such as a dead state or an attacking state.
[0092] In this embodiment, it means that during the process of a soldier entity moving toward the target, it will continuously scan and acquire the current behavior patterns or survival status (such as death, attack, etc.) of all soldiers of the same camp within a circular area (or other geometric area) centered on its own position and with a preset distance as the radius, in a cyclical or event-triggered manner. This serves as the core environmental perception basis for the soldier entity to adjust its tactical behavior in real time.
[0093] (2) When a nearby friendly soldier is detected to be in a dead state, control the soldier entity to interrupt the current action and move to the position of the nearby friendly soldier to fill the gap.
[0094] In this context, "death state" refers to an irreversible, final state assigned to a soldier entity by the system after its health points reach zero due to an attack or other fatal injury, or after triggering a specific death condition. "Current action" refers to the main sequence of actions that the soldier entity is actively executing, driven by its individual state machine, when the "death state" detection event is received. This action is determined by previous instructions or state decisions and constitutes the core activity the soldier is performing at the time of the trigger.
[0095] Specifically, when a nearby friendly soldier in a dead state is detected near the current soldier entity, if the soldier is in a standby state (i.e. not performing other tasks and is in an idle state), a new movement command is immediately issued to him, causing him to move to the spatial coordinates of the fallen friendly soldier. The tactical purpose is to maintain the integrity of the overall formation and the coverage of tactical positions of the team through dynamic position adjustment, so as to avoid a defensive or offensive vacuum due to casualties.
[0096] (3) When a nearby friendly soldier is detected to be in an attacking state, control the soldier entity to perform a maneuver to avoid the attacking nearby friendly soldier.
[0097] Among them, maneuvering refers to a controlled, non-linear tactical displacement performed by a soldier in response to a specific battlefield situation (such as avoiding friendly forces). Its path is specially calculated to distinguish it from a direct charge or retreat, aiming to achieve specific tactical objectives (such as maintaining a safe distance or finding a better attack position) without affecting the overall offensive posture.
[0098] Optionally, the maneuver can be either arc-shaped or lateral. When executing evasion tactics, the soldier entity does not move directly toward the target or retreat in a straight line. Instead, it uses a calculated curved trajectory (arc-shaped movement) to bypass the obstacle area, or moves laterally to the left or right while maintaining its facing direction. This achieves a refined displacement method that maintains the enemy posture and continues to carry out the engagement mission without spatial conflict with friendly forces.
[0099] In this embodiment, when a friendly soldier in an attacking state is detected near the current soldier entity, the soldier's evasion logic is triggered, automatically calculating and executing a non-linear tactical displacement (such as arc or lateral movement) to ensure that its movement path does not interfere with the friendly forces' attack lines or fire range, thereby achieving spatial coordination and tactical cooperation between individuals while maintaining the overall offensive posture.
[0100] For example, Figure 3 This is a flowchart illustrating the implementation process of a data processing method for a battlefield system provided in this embodiment. Figure 3 As shown, after the battlefield battle begins, the system continuously monitors the player's input operations and converts them into strategic commands targeting specific teams. The target team entity then makes state decisions at the team level, generates soldier card commands, and issues them to subordinate soldier card entities. Each soldier card entity performs state decisions at the soldier card level in parallel, converting the decision results into soldier commands. Finally, all soldier entities receive commands, make individual decisions, and execute corresponding movement or attack actions in parallel. The system continuously iterates through this process to drive the battle forward until the battlefield end conditions are met, at which point it exits. As an extended implementation, the specific content of the command state transformation relationships at each level in this embodiment can be found in [reference needed]. Figure 4 .
[0101] The technical solution of this application embodiment, when controlling each soldier entity to execute individual soldier behaviors corresponding to strategic instructions, sends strategic instructions to the target team entity to control the target team entity to make state decisions at the team level and converts the state decision results into soldier card instructions; sends soldier card instructions to at least one corresponding soldier card entity to control each soldier card entity to make state decisions at the soldier card level and converts the decision results into soldier instructions; sends soldier instructions to the soldier entities under each soldier card entity to control each soldier entity to execute corresponding individual soldier behaviors when receiving soldier instructions; wherein, individual soldier behaviors include movement behaviors and / or attack behaviors. The technical solution of this application, based on a multi-level instruction parsing and distribution mechanism of team-soldier-vehicle, can efficiently and accurately transform macro-level strategic instructions into specific behaviors of underlying soldier entities. This ensures a high degree of consistency between overall actions and high-level tactical intentions, while effectively sharing the computational burden and reducing system complexity through intermediate-level state decisions. At the same time, it endows individual soldiers with autonomy and flexibility in responding to local battlefield changes. Thus, while maintaining the coordination and unity of large-scale units, it significantly improves the realism of battlefield simulation, the efficiency of system operation, and the robustness of command and control.
[0102] Example 3
[0103] Figure 5 This illustration shows a data processing method for a battlefield system provided in this application embodiment. Based on the aforementioned embodiments, this embodiment can further pre-allocate contiguous memory space according to the maximum number of battlefield personnel to store data for each team entity, each soldier card entity, and each individual soldier entity. This space is used to centrally store the status data and attribute information generated by all team entities, soldier card entities, and individual soldiers during operation. This pre-allocation mechanism aims to reduce the overhead of dynamic memory allocation and release during system operation, reduce memory fragmentation, and thereby improve data access efficiency and overall system performance. Specific implementation details can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0104] like Figure 5 As shown, the method specifically includes the following steps:
[0105] S310: Pre-allocate contiguous memory space based on the maximum number of battlefield personnel to store data for each team entity, each soldier card entity, and each soldier entity.
[0106] Among them, the maximum number of battlefield personnel refers to the maximum total number of soldier entities that can exist simultaneously in the entire virtual battlefield environment, which is pre-configured before the battlefield system is designed and operated. This value is the core basis for the system to pre-allocate resources (especially memory space) and optimize performance, and is used to limit the scale of the battlefield and ensure the stability of the system operation.
[0107] In this context, contiguous memory space refers to a storage area in the physical or virtual memory of a computer system that is contiguous in address and not divided by other data. This area is reserved for centralized storage of specific types of data structures. In this context, it specifically refers to a complete block of memory pre-allocated for all entity data in the battlefield system to achieve efficient data access and management.
[0108] The data of a team entity refers to the set of information used to fully describe all the attributes and states of a team entity in memory. It usually includes its unique identifier, faction, total health, current tactical status, references or indexes to the list of subordinate unit entities, and internal variables such as action objectives determined by upper-level strategic instructions. These data together define the existence and behavioral logic of the team entity in the virtual battlefield.
[0109] The data of a soldier card entity refers to the set of information used to completely describe all the attributes and states of a soldier card entity in memory. It usually includes its unique identifier, reference to the unit entity to which it belongs, current tactical state, reference or index to the list of subordinate soldier entities, and internal variables such as specific mission objectives determined by soldier card instructions. These data together define the existence, role and behavior logic of the soldier card entity in the virtual battlefield.
[0110] The data of a soldier entity refers to the set of information used to completely describe all the attributes and states of a soldier entity in memory. It usually includes its unique identifier, reference to the soldier card entity to which it belongs, spatial coordinates, health points, current behavior state (such as moving, attacking, or waiting), individual mission objectives determined by soldier commands, and internal variables such as the current state of its individual state machine. These data together define the microscopic existence and specific behavioral logic of the soldier entity in the virtual battlefield.
[0111] Specifically, during the battlefield system initialization phase, the required total number of teams, soldier cards, and soldier entities can be calculated based on the preset maximum number of soldiers on the battlefield. Based on this, a memory area with contiguous addresses and fixed capacity can be requested from the operating system before the program runs. This area is divided into several parts and is used to store the attribute and status data required by all team entities, soldier card entities, and soldier entities during their life cycle, thereby achieving centralized management and efficient access to memory.
[0112] For example, assuming the maximum number of players on the battlefield is set to 1000, the system first calculates the required 10 team entities and 100 soldier card entities based on the preset organization rules (e.g., 100 people per team and 10 people per soldier card). Then, during initialization, the system requests three contiguous memory spaces from the operating system to store all attribute data (such as coordinates, health points, status, etc.) of these 10 teams, 100 soldier cards, and 1000 soldiers, respectively. This ensures that the storage locations of all entities are fixed before the game runs, avoiding the overhead and fragmentation caused by repeatedly requesting and releasing memory during runtime.
[0113] Optionally, the specific implementation steps of S310 may include:
[0114] S3101. Calculate the maximum number of team entities, unit card entities, and soldier entities based on the configurable maximum number of battlefield personnel.
[0115] In this embodiment, during the battlefield system initialization phase, the required total number of teams, soldier cards, and soldier entities is calculated based on the preset maximum number of soldiers on the battlefield. Accordingly, a memory region with contiguous addresses and fixed capacity is requested from the operating system before the program runs. This region is divided into several parts and is used to store the attribute and status data required by all team entities, soldier card entities, and soldier entities during their lifecycle, thereby achieving centralized management and efficient access to memory.
[0116] S3102. Based on the maximum quantity, allocate independent contiguous memory blocks for team entities, soldier card entities, and soldier entities respectively.
[0117] Specifically, after calculating the upper limit of the number of the three types of entities, three independent memory allocation requests will be sent to the operating system. Each request will obtain a memory area with a contiguous address and a size large enough to hold all entity data of the corresponding type, thereby establishing dedicated linear storage space for teams, soldier cards and soldier entities respectively, ensuring that the data of the same type of entity is centrally stored in physical memory.
[0118] S3103. When the battlefield system initializes and generates each team entity, each soldier card entity, and each soldier card entity, memory space is allocated from a contiguous memory block for each entity to store all data during the operation of each entity.
[0119] In this embodiment, during the process of creating all entity instances at system startup, the program will precisely allocate a fixed storage location for each newly generated team, soldier card, and soldier entity from a pre-allocated independent contiguous memory area according to the data structure size corresponding to the entity type. This location will continuously carry all attribute variables and dynamic status information of the entity throughout the entire running cycle.
[0120] S320, in response to the tactical intent operation of the operator targeting the target unit entity, translates the tactical intent operation into a strategic command.
[0121] Among them, strategic instructions define the overall action objectives of the target team entity.
[0122] S330. Based on the hierarchical structure between the target team entity, the soldier card entity, and the soldier entity, the strategic instructions are parsed layer by layer and distributed to each soldier entity under the target team entity, so as to control each soldier entity to execute individual soldier behaviors corresponding to the strategic instructions.
[0123] The technical solution of this application, during the system initialization phase, pre-allocates contiguous memory space for storing data of each team entity, each soldier card entity, and each soldier entity based on the maximum number of battlefield personnel. This pre-allocation of contiguous memory space during system initialization, by centrally allocating and managing the storage resources of all entities in advance, significantly reduces the frequency of dynamic memory allocation and release during system runtime, effectively reducing memory fragmentation. This improves the locality of data access and caching efficiency, ensuring the efficiency and stability of large-scale battlefield entity data read / write operations, and providing crucial memory performance guarantees for the smooth operation of the entire battlefield system under high load.
[0124] Example 4
[0125] Figure 6 This is a schematic diagram of a data processing device for a battlefield system provided in an embodiment of this application. The battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The device includes:
[0126] The strategic instruction generation module 410 is used to convert the tactical intention operation of the operating user into a strategic instruction in response to the tactical intention operation of the target team entity.
[0127] The soldier behavior control module 420 is used to parse and distribute the strategic instructions layer by layer to each of the soldier entities under the target team entity according to the hierarchical structure between the target team entity, the soldier card entity, and the soldier entities, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
[0128] This application provides a data processing method, apparatus, and electronic device for a battlefield system. The battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The method includes: responding to a user's tactical intent operation on a target team entity, converting the tactical intent operation into a strategic instruction, wherein the strategic instruction defines the overall action objective of the target team entity; and then, according to the hierarchical structure between the target team entity, soldier card entities, and soldier entities, parsing the strategic instruction layer by layer and distributing it to each soldier entity under the target team entity, so as to control each soldier entity to perform individual soldier behavior corresponding to the strategic instruction. The technical solution of this application constructs a multi-level entity architecture of team-soldier-card-soldier. While preserving the complete behavioral logic of individual soldiers, it parses and distributes macro-strategy instructions level by level through intermediate layers. This achieves unified and efficient scheduling of thousands of combat units and ensures that each soldier entity can execute refined behaviors that conform to realistic cognition based on the local situation. Thus, while maintaining the performance of large-scale simultaneous combat, it effectively solves the core contradiction between the rigid behavior of macro-abstract models and the insufficient performance of micro-refined models in existing technologies, achieving a unity between the grand visual representation of the cold weapon battlefield and the realism of individual behaviors.
[0129] Based on the above-mentioned device, optionally, the soldier behavior control module 420 includes:
[0130] The team-level decision-making unit is used to issue the strategic instructions to the target team entity to control the target team entity to make state decisions at the team level and convert the state decision results into soldier card instructions.
[0131] The soldier card level decision unit is used to issue the soldier card instructions to the corresponding at least one soldier card entity, so as to control each soldier card entity to make state decisions at the soldier card level and convert the decision results into soldier instructions;
[0132] The soldier-level decision-making unit is used to issue the soldier instructions to the soldier entities under each of the soldier card entities, so as to control each soldier entity to execute the corresponding individual soldier behavior when receiving the soldier instructions; wherein, the individual soldier behavior includes movement behavior and / or attack behavior.
[0133] Based on the above-mentioned device, optionally, the data processing device of the battlefield system also includes: a continuous memory allocation module;
[0134] The contiguous memory allocation module is used to pre-allocate contiguous memory space for storing the data of each of the team entities, the data of each of the soldier card entities, and the data of each of the soldier entities, based on the maximum number of people on the battlefield.
[0135] Based on the above-mentioned device, optionally, it is specifically used to calculate the maximum number of team entities, soldier card entities, and soldier entities according to the configurable maximum number of battlefield personnel; according to the maximum number, apply for independent contiguous memory blocks for each team entity, soldier card entity, and soldier entity; when the battlefield system initializes and generates each team entity, each soldier card entity, and each soldier card entity, allocate memory space from the contiguous memory blocks for each entity to store all data during the operation of each entity.
[0136] Based on the above-mentioned device, optionally, a team-level decision-making unit is used to make a team-level state decision based on the strategic instructions, and determine a first state decision result; wherein, the first state decision result includes movement behavior or attack behavior; if the first state decision result is movement behavior, then the overall path of the target team entity from its current position to the target position is calculated; if the first state decision result is attack behavior, then the overall attack target of the target team entity is determined; the state decision result and the overall path or the overall attack target are combined into a soldier card instruction issued to the soldier card entity.
[0137] Based on the aforementioned device, optionally, a soldier-level decision-making unit is configured to control each soldier entity to parse and make decisions on the soldier's instructions based on its individual state machine, and determine a second state decision result; wherein, the second state decision result includes movement behavior or attack behavior; if the second state decision result is movement behavior, the soldier entity is controlled to move along a specified overall path, and the formation maintenance and local obstacle avoidance of the individual soldier are achieved by calling the autonomous navigation behavior module; if the second state decision result is attack behavior, the soldier entity moves towards the attack target, and performs an attack behavior on the attack target after entering the attack range.
[0138] Based on the above-mentioned device, optionally, the soldier-level decision unit is further configured to continuously detect the status of neighboring friendly soldier entities within a predetermined range around the soldier entity during the movement towards the attack target; when a neighboring friendly soldier is detected to be in a dead state, the soldier entity is controlled to interrupt its current action and move to the position of the neighboring friendly soldier to fill the gap; when a neighboring friendly soldier is detected to be in an attacking state, the soldier entity is controlled to perform a maneuver to avoid the attacking neighboring friendly soldier; wherein, the maneuver is an arc movement or a lateral movement.
[0139] Based on the above-mentioned device, optionally, when multiple soldier entities perform corresponding individual soldier behaviors, the execution logic of multiple soldier entities is calculated in parallel computing mode.
[0140] The battlefield system data processing device provided in this application embodiment can execute the battlefield system data processing method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing the method.
[0141] It is worth noting that the various units and modules included in the above system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this application.
[0142] Example 5
[0143] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 A block diagram is shown of an exemplary electronic device 50 suitable for implementing embodiments of the present application. Figure 7 The electronic device 50 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0144] like Figure 7 As shown, the electronic device 50 is represented in the form of a general-purpose computing device. The components of the electronic device 50 may include, but are not limited to: one or more processors or processing units 501, system memory 502, and bus 503 connecting different system components (including system memory 502 and processing unit 501).
[0145] Bus 503 represents one or more of several bus architectures, including memory buses or memory electronics, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0146] Electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 50, including volatile and non-volatile media, removable and non-removable media.
[0147] System memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. Electronic device 50 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 506 may be used to read and write non-removable, non-volatile magnetic media (…Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 503 via one or more data media interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0148] A program / utility 508 having a set (at least one) of program modules 507 may be stored, for example, in memory 502. Such program modules 507 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 507 typically perform the functions and / or methods described in the embodiments of this application.
[0149] Electronic device 50 can also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), and with one or more devices that enable a user to interact with electronic device 50, and / or with any device that enables electronic device 50 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 511. Furthermore, electronic device 50 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 512. As shown, network adapter 512 communicates with other modules of electronic device 50 via bus 503. It should be understood that, although... Figure 7 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0150] The processing unit 501 executes various functional applications and page processing by running programs stored in the system memory 502, such as implementing the data processing method of the battlefield system provided in the embodiments of this application.
[0151] Example 6
[0152] This application embodiment also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a data processing method for a battlefield system. The battlefield system includes at least one troop entity, each troop entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The method includes:
[0153] In response to a user's tactical intent operation targeting a target team entity, the tactical intent operation is converted into a strategic instruction; wherein the strategic instruction defines the overall action objective of the target team entity.
[0154] Based on the hierarchical structure among the target team entity, the soldier card entity, and the soldier entity, the strategic instructions are parsed layer by layer and distributed to each of the soldier entities under the target team entity, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
[0155] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0156] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0157] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0158] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0159] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A data processing method for a battlefield system, characterized in that, The battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The method includes: In response to a user's tactical intent operation targeting a target team entity, the tactical intent operation is converted into a strategic instruction; wherein the strategic instruction defines the overall action objective of the target team entity. Based on the hierarchical structure among the target team entity, the soldier card entity, and the soldier entity, the strategic instructions are parsed layer by layer and distributed to each of the soldier entities under the target team entity, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
2. The method according to claim 1, characterized in that, The step of parsing and distributing the strategic instructions layer by layer to each soldier entity under the target team entity according to the hierarchical structure among the target team entity, the soldier card entity, and the soldier entity, so as to control each soldier entity to execute individual soldier behaviors corresponding to the strategic instructions, includes: The strategic instructions are issued to the target team entity to control the target team entity to make state decisions at the team level, and the state decision results are converted into soldier card instructions; The soldier card instruction is sent to the corresponding at least one soldier card entity to control each soldier card entity to make state decisions at the soldier card level and convert the decision results into soldier instructions; The soldier instructions are issued to the soldier entities under each soldier card entity to control each soldier entity to execute the corresponding individual soldier behavior when it receives the soldier instructions; wherein, the individual soldier behavior includes movement behavior and / or attack behavior.
3. The method according to claim 1, characterized in that, The method further includes: Based on the maximum number of people on the battlefield, a contiguous memory space is pre-allocated for storing the data of each of the aforementioned team entities, the data of each of the aforementioned soldier card entities, and the data of each of the aforementioned soldier entities.
4. The method according to claim 3, characterized in that, The contiguous memory space pre-allocated according to the maximum number of battlefield personnel for storing data of each of the aforementioned team entities, data of each of the aforementioned soldier card entities, and data of each of the aforementioned soldier entities includes: Based on the configurable maximum number of battlefield personnel, calculate the maximum number of team entities, soldier card entities, and soldier entities respectively; Based on the aforementioned maximum quantity, apply for independent contiguous memory blocks for the team entity, the soldier card entity, and the soldier entity respectively; When the battlefield system initializes and generates each of the aforementioned team entities, each of the aforementioned soldier card entities, and each of the aforementioned soldier card entities, memory space is allocated from the contiguous memory block for each entity to store all the data generated during the operation of each entity.
5. The method according to claim 2, characterized in that, The control of the target team entity to make state decisions at the team level and to convert the state decision results into soldier card instructions includes: Based on the strategic instructions, a team-level state decision is made to determine a first state decision result; wherein, the first state decision result includes movement behavior or attack behavior; If the first state decision result is a movement behavior, then calculate the overall path of the target team entity from its current location to the target location; If the first state decision result is an attack behavior, then the overall attack target of the target team entity is determined; The state decision result, along with the overall path or the overall attack target, are combined and transformed into soldier card instructions that are issued to the soldier card entity.
6. The method according to claim 2, characterized in that, The control of each soldier entity to execute corresponding individual soldier actions upon receiving the soldier's instructions includes: Each of the aforementioned soldier entities parses and makes decisions on the soldier's instructions based on its individual state machine, and determines a second state decision result; wherein, the second state decision result includes movement behavior or attack behavior; If the second state decision result is a movement behavior, then the soldier entity is controlled to move along the specified overall path, and the formation maintenance and local obstacle avoidance of individual soldiers are realized by calling the autonomous navigation behavior module; If the second state decision result is an attack behavior, then move towards the attack target and perform an attack behavior on the attack target after entering the attack range.
7. The method according to claim 6, characterized in that, During the movement toward the target, the method further includes: Continuously monitor the status of neighboring friendly soldier entities within a predetermined range around the soldier entity; When a nearby friendly soldier is detected to be in a dead state, the soldier entity is controlled to interrupt its current action and move to the position of the nearby friendly soldier to fill the gap; When a nearby friendly soldier is detected to be in an attacking state, the soldier entity is controlled to perform a maneuver to avoid the attacking nearby friendly soldier; wherein, the maneuver is an arc movement or a lateral movement.
8. The method according to claim 1, characterized in that, When multiple soldier entities perform corresponding individual soldier actions, the execution logic of multiple soldier entities is calculated using a parallel computing method.
9. A data processing device for a battlefield system, characterized in that, The battlefield system includes at least one team entity, each team entity is associated with at least one soldier card entity, and each soldier card entity is associated with at least one soldier entity. The device includes: A strategic instruction generation module is used to convert tactical intention operations of an operator targeting a target team entity into strategic instructions in response to such tactical intention operations. The soldier behavior control module is used to parse and distribute the strategic instructions layer by layer to each of the soldier entities under the target team entity according to the hierarchical structure between the target team entity, the soldier card entity, and the soldier entities, so as to control each soldier entity to perform individual soldier behaviors corresponding to the strategic instructions.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data processing method of the battlefield system according to any one of claims 1-8.