A small town virtual environment construction method based on digital twin technology

CN122886152APending Publication Date: 2026-10-09CHINESE PEOPLES LIBERATION ARMY ARMY INFANTRY ACAD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610906570.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0003]现有小型城镇对抗演练多依赖静态场景建模与人工态势记录,空间要素,参演状态和区域规则分散处理,演练区域边界与对象状态难以形成稳定联动,事件触发常依靠人工判读,调度路径随临场经验调整,过程数据记录零散,回放复盘缺少统一时空依据,导致态势呈现滞后,区域处置偏差增大,推演依据偏弱,演练评估难以追溯事件因果,训练结果对后续方案优化和跨场景复用支撑不足

Benefits of technology

[0015]与现有技术相比,本发明的优点和积极效果在于:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886152A_ABST
    Figure CN122886152A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of digital twinning, in particular to a small town virtual environment construction method based on digital twinning technology, comprising the following steps: acquiring town space elements and generating a town model according to a drill plan; binding a participating role state to form a situation map; setting a fence and rules; combining an occupancy relationship, a state criterion and a disposal attribute to form a trigger condition; recording event task data after triggering; deducing a route and generating a dispatch instruction; recording a state, a trajectory and an execution result to form playback data. In the present application, the model state, real-time data, regional rules and dispatch results are associated in a unified space-time chain, the regional occupancy relationship and the object state jointly constrain event triggering, the situation change can be synchronously presented, the disposal route can be adjusted according to the event development, the playback data can continuously restore the role trajectory, the trigger cause and effect and the instruction execution result, thereby reducing the regional disposal deviation, enhancing the basis for review and evaluation and subsequent scheme optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twin technology, and in particular to a method for constructing a virtual environment of a small town based on digital twin technology. Background Technology

[0002] The field of digital twin technology involves software processing methods that render virtual images from the 3D models, textures, lighting, and viewpoint data corresponding to real-world town objects. Traditionally, building a virtual environment for a small town involves a graphics processing device reading town building models, road models, surface models, and texture maps from a scene database, and then performing coordinate transformations, visible surface processing, texture mapping, and image frame output based on camera viewpoint parameters.

[0003] Existing small-town confrontation exercises mostly rely on static scene modeling and manual situation recording. Spatial elements, participant status, and regional rules are handled in a scattered manner. It is difficult to form a stable linkage between the boundary of the exercise area and the status of the objects. Event triggering often relies on manual interpretation. The dispatch path is adjusted according to on-site experience. Process data records are scattered. Replay and debriefing lack a unified spatiotemporal basis, resulting in a lag in situation presentation, increased deviation in regional handling, weak inference basis, difficulty in tracing the cause and effect of events in exercise evaluation, and insufficient support for subsequent scheme optimization and cross-scenario reuse of training results. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method for constructing a virtual environment for small towns based on digital twin technology.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for constructing a virtual environment of a small town based on digital twin technology, comprising the following steps: Acquire spatial elements of small towns and confrontation exercise plans, generate virtual town models, and determine exercise units according to town spatial relationships; acquire real-time status data of participating roles and bind them to the virtual town model to generate dynamic exercise situation diagrams; For the training unit, electronic fences and area training rules are set. The area training rules are broken down into rule objects, area boundary conditions, object status criteria, and handling attributes. The area occupancy relationship is determined based on the location of the rule objects and the area boundary conditions. The area occupancy relationship, the object status criteria, and the handling attributes are combined to construct event triggering conditions. When the real-time status data of the participating characters matches the event triggering conditions, event task data including real-time location and participating characters is recorded; the event development is deduced by combining the dynamic exercise situation map, the exercise handling route is determined, and scheduling and adjustment instructions are generated; Record the status of the virtual town model, the trajectory of participating characters, the event triggering process, and the execution results of scheduling and adjustment instructions. Generate exercise replay data, conduct a review and evaluation, and output a comprehensive exercise report.

[0006] As a further aspect of the present invention, the generation process of the training unit includes: Obtain the road outlines, building outlines, public open areas, and administrative boundaries from the spatial elements of the small town; perform unified coordinate registration on the road connectivity, building adjacency, and regional accessibility relationships; and establish the town's spatial relationship topology. The participating roles, mission start and end areas, confrontation areas and access restrictions in the confrontation exercise plan are analyzed and associated with spatial nodes and spatial edges in the urban spatial relationship topology to generate exercise constraint mapping relationships. Based on the urban spatial relationship topology and the exercise constraint mapping relationship, spatial partitions with continuous access boundaries and independent exercise constraints are determined, and each spatial partition is determined as the exercise unit.

[0007] As a further aspect of the present invention, the dynamic exercise situation diagram generation process includes: Acquire the participating characters, real-time location data, motion status data, and data acquisition time, and output them as object status records; The real-time location data in the object status record is converted to the coordinate system of the virtual town model. Based on the converted real-time location data, road sections, building areas or public open areas are matched to generate spatial location results. Based on the spatial positioning results, the object status records, and the data acquisition time, the object layer is updated to generate the dynamic exercise situation map.

[0008] As a further aspect of the present invention, the process of setting the electronic fence and the area drill rules includes: Obtain the spatial boundary, unit type, accessible entrances, and participating role permissions of the training unit; establish a fence closure boundary based on the spatial boundary and accessible entrances; and associate the fence closure boundary with the corresponding training unit identifier to generate the electronic fence. The control area identifier, corresponding participating role, entry status, stay status, departure status, and disposal action identifier in the regional exercise rules are obtained. The corresponding participating role is determined as the object of the rule. The control area identifier and the electronic fence are determined as the regional boundary conditions. The entry status, stay status, and departure status are determined as the object status criteria. The disposal action identifier is determined as the disposal attribute.

[0009] As a further aspect of the present invention, the process of constructing the event triggering condition includes: The real-time location data of the object affected by the rule, the corresponding participating role in the area, and the boundary conditions of the area are obtained. The real-time location data is compared with the spatial landing point of the electronic fence boundary in the boundary conditions of the area to determine the boundary status of the object that has entered the boundary, is located inside the boundary, is located outside the boundary, or has left the boundary. Based on the participating roles in the corresponding region, the boundary state of the object is filtered, and the boundary state of the object is associated with the corresponding control area identifier to generate the region occupancy relationship; The region occupancy relationship is compared with the object state criterion, and the disposal attribute is synchronously associated when the state hit comparison is successful, thus constructing the event triggering condition.

[0010] As a further aspect of the present invention, the process of recording the event task data includes: Acquire the participating roles, real-time location data, control area identifier, trigger time and handling attributes that match the event triggering conditions, compare the data acquisition time of the real-time location data with the trigger time for time consistency, and determine the records that pass the time consistency comparison as valid trigger records; The real-time location data in the valid trigger record is associated with the corresponding control area identifier, and the participating role, real-time location data, control area identifier and trigger time are written into the event task to generate the event task data.

[0011] As a further aspect of the present invention, the process of generating the scheduling adjustment instruction includes: Extract the real-time location, participating roles, control area identifiers and handling attributes from the event task data, and obtain the road accessibility status, participating role distribution status and electronic fence of the corresponding exercise unit from the dynamic exercise situation map, and record the initial state of the event; Based on the initial state of the event, the affected training units are determined, and candidate handling routes are screened according to the road connectivity, handling attributes and participating role permissions between the affected training units. The candidate handling routes that meet the passage conditions and role permission conditions are determined as the training handling routes. Based on the exercise response route, participating roles, and affected exercise units, the scheduling adjustment instruction is generated, which includes the scheduling object, target area, travel path, and execution action.

[0012] As a further aspect of the present invention, the process of selecting the drill response route specifically includes: Obtain the road node sequence, road closure status, electronic fence restriction status, and role access permissions between the affected exercise unit and the schedulable participating role. Remove road segments in the road node sequence that have a road closure status or do not meet the role access permissions to obtain a set of passable routes. When there are multiple routes in the set of passable routes, the routes are sorted according to the number of road nodes, the number of times the electronic fence is crossed, and the order of arrival at the target area. The routes are sorted in order of priority of handling attributes, from the fewest to the most road nodes, from the fewest to the most electronic fences crossed, and the order of arrival at the target area. When the sorting results are the same, the exercise handling route is determined according to the distance between the current position of the participating character and the target area.

[0013] As a further aspect of the present invention, the process of generating the integrated exercise report includes: The virtual town model status, the trajectory of the participating characters, the event triggering process, and the execution result of the scheduling and adjustment instructions are obtained. A unified timeline is established according to the recorded time, and the model status, character position, event status, and instruction status at the same time node are associated to generate a replay frame sequence. Based on the replay frame sequence, the event response duration, route arrival status, instruction completion status, and area rule hit status are extracted and written into the debriefing and evaluation table, and the comprehensive exercise report is output.

[0014] As a further aspect of the present invention, the process of recording the trajectory of the participating character includes: Acquire the participating roles, real-time location data, data acquisition time, and the unit in which they are located, and arrange the real-time location data in chronological order according to the participating roles to generate a single-object trajectory record; When a participating character crosses the boundary of a training unit, the boundary crossing time and direction are written to generate the trajectory of the participating character with a training unit switching identifier.

[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: A virtual town model is generated by combining urban spatial elements and adversarial exercise plans. The scope is divided according to spatial relationships, so that the scene, participating status and regional rules are expressed collaboratively under the same spatiotemporal reference. Regional rules are broken down into objects, boundaries, status and disposal attributes. Regional occupancy relationships are determined by location and boundary conditions. Triggering conditions are generated by combining occupancy relationships, status criteria and disposal attributes. When the status is matched, event task data with location and role association is formed. Combined with dynamic situational analysis, event development is deduced and disposal routes are determined. The scheduling execution results are continuously recorded with the model status, trajectory and triggering process, thereby improving situational synchronization, reducing regional disposal deviation, and enhancing the ability of review and evaluation to support event causality and plan optimization. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method for constructing a small-town training environment based on digital twins according to the present invention. Figure 2 This is a schematic diagram illustrating the construction effect of the virtual town model and training unit of the present invention; Figure 3 This is a schematic diagram illustrating the triggering effect of the electronic fence and area rules of the present invention; Figure 4 This is a schematic diagram illustrating the effect of event deduction and scheduling instruction generation in this invention; Figure 5 This is a schematic diagram illustrating the effect of the exercise playback and debriefing evaluation of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0018] Example Please see Figures 1 to 5 This embodiment provides a method for constructing a virtual environment of a small town based on digital twin technology. In practical applications, such as during the continuous access to town geographic data, exercise plan data, and participant role positioning data in a small town confrontation exercise command environment, this method continuously processes the virtual town model, electronic fence, area rules, event tasks, scheduling instructions, and debriefing records, including the following steps: S1: Acquire spatial elements of small towns and adversarial exercise plans, generate virtual town models, and determine exercise units according to town spatial relationships; acquire real-time status data of participating roles and bind them to the virtual town model to generate dynamic exercise situation maps. Small town spatial elements refer to the data set used to describe the physical spatial objects of the town, including road outlines, building outlines, public open areas, administrative boundaries, road connectivity, building adjacency relationships, regional accessibility relationships, and coordinate reference information. Adversarial exercise plans refer to the task data issued by the exercise command terminal and entered into the processing queue after plan verification, including participating roles, task start and end areas, adversarial areas, access restrictions, and role permission information. The virtual town model is a digital twin carrier object formed by coordinate registration, topology organization, and object encoding of spatial elements, internally storing road objects, building objects, open area objects, boundary objects, and accessibility relationships. An exercise unit is a spatial partition jointly divided by spatial topology and exercise constraints, capable of independent rule configuration, situation updates, and event handling.

[0019] S101: Acquire road outlines, building outlines, public open areas, and administrative boundaries from the spatial elements of a small town. Perform coordinate registration on road connectivity, building adjacency, and regional accessibility to establish the town's spatial relationship topology. The coordinate registration process reads the coordinate reference fields, data source fields, and boundary closure status fields carried by various spatial objects, converting the spatial objects entering the model to the unified town coordinate system used by the virtual town model. Road outlines are processed into road endpoints, intersections, and road segments through node-based processing; building outlines are verified for closure to form building area objects; public open areas are refined to form accessible area objects; administrative boundaries serve as model outer constraints in determining the attribution of spatial objects. Road connectivity is defined by the reachability between road segments; building adjacency is defined by the boundary contact or spacing between building areas; and regional accessibility is defined by the accessible paths between road segments, building entrances, and public open areas. Spatial objects that fail registration are written into the spatial verification record and marked as objects to be corrected; these objects are not included in the exercise unit division, but their source fields and anomaly reason fields are retained for traceability by the model maintenance end.

[0020] S102: Analyze the participating roles, task start and end areas, confrontation areas, and access restrictions in the adversarial exercise plan, and associate them with spatial nodes and edges in the urban spatial relationship topology to generate exercise constraint mapping relationships. Participating roles are objects that participate in the exercise and can generate real-time status data. Role records include role identifier, role category, permission level, current location source, and range of executable actions. Task start and end areas are the starting and target areas of the exercise task in the spatial topology. Confrontation areas are the event occurrence spaces specified in the exercise plan. Access restrictions are the control rules for access permissions to road sections, building entrances, fence boundaries, or areas. The parsing process first verifies the integrity of the plan fields, then matches the area name, area code, or boundary description to spatial nodes, and matches road restrictions, entrance restrictions, and boundary restrictions to spatial edges. Areas that cannot be matched generate plan placement anomaly records, carrying the original plan fields, the reason for the matching failure, and a manual review identifier. Matchable fields are written into the exercise constraint mapping relationship as input for subsequent exercise unit division, electronic fence settings, and route selection.

[0021] S103: Based on the urban spatial relationship topology and exercise constraint mapping relationship, spatial partitions with continuous access boundaries and independent exercise constraints are determined, and each spatial partition is identified as an exercise unit. Continuous access boundaries refer to traceable access connections between roads, entrances, and public open areas within a partition, and the boundary can be closed by road boundaries, building boundaries, open area boundaries, or administrative boundaries. Independent exercise constraints refer to the fact that applicable access restrictions, role permissions, and adversarial tasks within a partition can be configured separately from adjacent partitions and triggered independently. The partitioning process first forms candidate partitions based on topological connections, then overlays the exercise constraint mapping relationship onto the candidate partitions. When incompatible access restrictions exist within the same candidate partition, the candidate partition is split according to the restriction boundary; when adjacent candidate partitions have the same constraints and continuous boundaries, their partition relationship is preserved and an adjacent access relationship is established. The generated exercise unit record includes unit identifier, spatial boundary, unit type, accessible entrances, associated road segments, associated building areas, associated public open areas, and applicable rule index, and serves as the spatial carrier for dynamic situation updates, fence configuration, and event simulation.

[0022] S104: Acquire participating roles, real-time location data, motion status data, and data acquisition time, outputting an object status record. Real-time location data comes from the positioning terminal carried by the role or the positioning interface accessed by the training platform. Motion status data comes from the positioning terminal, training equipment, or command terminal input interface. The data acquisition time is used to confirm the update order of the status records in the situation diagram. The object status record is the status data structure corresponding to a participating role at a certain acquisition time, including role identifier, role category, location source, valid location identifier, motion status, acquisition time, access channel, and verification status. During the acquisition process, duplicate reported records are deduplicated according to role identifier and acquisition time. Records with missing role identifiers, missing location fields, or unresolvable acquisition times are written into abnormal access records, and the previous valid status is retained as the inherited status for short-term situation display. The valid location identifier is jointly determined by acquisition completeness, coordinate resolvability, time sequence consistency, and source channel reliability. Only valid status records enter spatial positioning processing.

[0023] S105: Convert the real-time location data in the object status record to the coordinate system of the virtual town model. Based on the converted real-time location data, match road segments, building areas, or public open areas to generate spatial location results. The spatial location result is the spatial attribution record of the object status record in the virtual town model, including role identifier, matching area type, matching object identifier, location status, boundary relationships, and accessibility status. The conversion process reads the location source field and coordinate reference field, converts the positioning point to the model coordinate system, and then compares the location point according to the boundary rules of the spatial object. When the location point is within a road range, match the road segment; when the location point is within a building's closed boundary, match the building area; when the location point is within the boundary of a public open area, match the public open area. When the location point is close to the boundaries of multiple spatial objects, combine the previous valid location result, road accessibility relationships, and role movement status to determine the current location object and write a boundary proximity identifier. When no spatial object can be matched, generate a location anomaly status. This status retains the original location and the index of the nearest available spatial object for display on the situation map and manual verification.

[0024] S106: Update object layers based on spatial positioning results, object status records, and data acquisition time to generate a dynamic exercise situation map. The dynamic exercise situation map is a situation data object with a virtual town model as the base map and the status of participating roles and area rules as dynamic layers. It includes object layers, road status layers, electronic fence layers, area rule layers, event identifier layers, and dispatch instruction layers. Object layers are updated according to role identifiers. Statuses acquired earlier than the current valid record are not overwritten; they are only written to the trajectory cache. Statuses acquired at a valid time and successfully positioned are updated with the role's position, movement status, and the exercise unit they belong to. The situation map also maintains layer version identifiers and update source identifiers for event trigger condition judgment, event development deduction, and replay recall. When a layer update fails, the previous valid layer version is retained, and the reason for the update failure is written to avoid subsequent steps reading incomplete situation data.

[0025] S2: Set up electronic fences and area drill rules for the drill unit. Break down the area drill rules into rule-applicable objects, area boundary conditions, object status criteria, and handling attributes. Determine the area occupancy relationship based on the location of the rule-applicable objects and the area boundary conditions. Combine the area occupancy relationship, object status criteria, and handling attributes to construct the event triggering conditions. The electronic fence is a boundary control object that binds the spatial boundary of the drill unit to accessible entrances. The area drill rules are rule data that constrains the entry, stay, departure, and handling actions of characters within a specific area. The rule-applicable objects refer to the participating characters or character categories to which the rules apply; the area boundary conditions refer to the fence boundaries and area identifiers used to determine the spatial relationship between characters and the controlled area; the object status criteria refer to the match between the character's state (entering the boundary, being inside the boundary, being outside the boundary, or leaving the boundary) and the rule requirements; the handling attributes refer to the action identifier, scheduling type, and handling requirements to be invoked after the event is triggered.

[0026] S201: Obtain the spatial boundary, unit type, accessible entrances, and participating role permissions of the exercise unit. Establish a closed fence boundary based on the spatial boundary and accessible entrances, and associate the closed fence boundary with the corresponding exercise unit identifier to generate an electronic fence. The closed fence boundary is formed by the outer edge boundary of the exercise unit and the open / closed state of the entrances. The spatial boundary provides the fence body, and the entrance state provides traversable and restricted points. The establishment process first verifies whether the exercise unit boundary is closed, then writes the accessible entrances into the fence entrance field, writes the role permissions into the fence permission field, and binds the fence to the exercise unit identifier. When the boundary is not closed, find adjacent boundaries to complete the path based on the urban spatial relationship topology; if the complete path cannot be confirmed, the fence record is marked as pending confirmation, and the area rules can only enter the pre-configured cache and do not participate in the formal triggering. The generated electronic fence is added to the electronic fence layer of the dynamic exercise situation map and provided for use in the area boundary comparison and route selection process.

[0027] S202: Obtain the control area identifier, corresponding participating role, entry status, dwell status, departure status, and action identifier from the regional exercise rules. Identify the corresponding participating role as the rule's target; identify the control area identifier and the electronic fence as regional boundary conditions; identify the entry status, dwell status, and departure status as object status criteria; and identify the action identifier as the action attribute. The control area identifier points to the exercise unit bound to the electronic fence or the control sub-area within the exercise unit. The corresponding participating role limits the rule's applicable objects. The entry status, dwell status, and departure status describe the dynamic relationship between the role and the boundary. The action identifier points to the action category in the scheduling strategy library. The splitting process generates a rule record for each regional exercise rule. The rule record includes a rule identifier, target field, boundary condition field, status criterion field, action attribute field, activation status, and version identifier. If a rule field is missing, a rule configuration exception record is written. If the fields are complete but the electronic fence has not yet been confirmed, the rule record enters the pending activation state. If the fields are complete and the fence is valid, the rule record enters the trigger condition construction queue.

[0028] S203: Obtain the real-time location data of the object affected by the rule, the corresponding participating roles in the area, and the area boundary conditions. Compare the real-time location data with the area boundary conditions to determine the object's boundary status: entering the boundary, located within the boundary, located outside the boundary, or leaving the boundary. The object boundary status is the spatial status identifier of the role relative to the electronic fence boundary, determined jointly by the current spatial placement result and the previous valid spatial placement result. When the current placement changes from outside the boundary to inside the boundary, it is identified as entering the boundary; when the current placement remains within the boundary, it is identified as being within the boundary; when the current placement is outside the boundary and there is no entry record, it is identified as being outside the boundary; when the current placement changes from inside the boundary to outside the boundary, it is identified as leaving the boundary. When the previous status is missing upon first entering the operating cycle, the previous valid situation map record is used as the inheritance basis; if the historical status is still missing, an initial boundary status is generated according to the relationship between the current placement point and the boundary, and an initialization identifier is written into the status record. When the location data is invalid or the placement is abnormal, no formal boundary status is generated; instead, the system enters the boundary pending verification status and feeds it back to the situation map.

[0029] S204: Based on the participating roles in the corresponding regions, the boundary states of objects are filtered, and the boundary states of objects are associated with the corresponding control area identifiers to generate region occupancy relationships. Region occupancy relationships are state association records between the rule-affected object and the control area, including role identifier, role category, control area identifier, object boundary state, state source, state update time, and candidate identifier. The filtering process first matches the participating roles in the corresponding regions using role identifier and role category, then removes boundary states outside the scope of the rule-affected object. For cases where the same role generates states simultaneously in multiple control areas, the corresponding region is determined based on the boundary relationships in the spatial positioning results, the affiliation of the exercise unit, and the entry crossing records. The associated region states are retained for review and traceability. Role states that fail permission verification are not entered into the region occupancy relationship hit queue, but are written to the permission exception record for the command center to confirm the role permission configuration.

[0030] S205: Compare the region occupancy relationship with the object status criteria for a status match, and synchronously associate the disposal attribute when the status match is successful, constructing the event trigger condition. The event trigger condition is an executable trigger record composed of the region occupancy relationship, object status criteria, and disposal attribute, including the trigger condition identifier, control area identifier, role condition, boundary status condition, disposal attribute, activation status, and subsequent call location. The status match comparison is performed according to the status criterion field in the rule record. When the object boundary status in the region occupancy relationship matches the criterion, the trigger condition enters the candidate trigger queue. If the same role continuously generates the same boundary status in the same control area, the candidate trigger record is updated according to the collection time order, and unconfirmed events are not generated repeatedly. The disposal attribute is synchronously written to the candidate trigger record when a match is found, and serves as the action source for event task data and scheduling adjustment instructions. When the rule version is updated, unconfirmed trigger records are rebound to the currently enabled rule version, and confirmed trigger records retain the original version index for retrospective analysis.

[0031] S3: When the real-time status data of participating roles matches the event triggering conditions, event task data including real-time location and participating roles is recorded. Combined with the dynamic exercise situation map, event development is simulated to determine the exercise response route and generate dispatch adjustment instructions. Event task data is a task record formed after the event is triggered, including participating roles, real-time location data, controlled area identifier, trigger time, response attributes, and task status. Event development simulation is a process of continuously judging affected exercise units, dispatchable participating roles, road accessibility, and fence restriction status, using event task data and the dynamic exercise situation map as input. Dispatch adjustment instructions are control data issued to the exercise command terminal or participating role terminals, including the dispatch object, target area, travel path, and execution action.

[0032] S301: Acquire the participating roles, real-time location data, control area identifier, and trigger time matching the event trigger conditions. Perform a time consistency comparison between the data acquisition time of the real-time location data and the trigger time, and determine the records that pass the time consistency comparison as valid trigger records. The trigger time comes from the trigger condition confirmation process, and the data acquisition time comes from the object status record. The time consistency comparison is based on the order in which the status records enter the trigger judgment queue, the validity of the acquisition time, and the correlation with the situation map version, and is used to confirm that the trigger event and the location status belong to the same situation update link. When the acquisition time is missing, the order is reversed, or it is inconsistent with the current situation map version, the record enters the trigger cache to be verified and is not written to the formal event task; after receiving the supplementary fields or the situation map version confirmation result, the cached record re-enters the consistency comparison. The records that pass the comparison are written into the valid trigger record, and the original access channel, rule version, and boundary status are retained for subsequent event task generation and invocation.

[0033] S302: Associate the real-time location data in the valid trigger records with the corresponding control area identifier, and write the participating roles, real-time location data, control area identifier, and trigger time into the event task to generate event task data. The association process reads the spatial positioning results from the valid trigger records, binds the real-time location to the electronic fence and exercise unit corresponding to the control area identifier, forming the event occurrence location field. When writing the event task, the handling attributes, trigger condition identifier, situation map version identifier, and task status identifier are recorded simultaneously. The task status is initially written to the pending simulation state. If the event task writing fails, the trigger record remains in the pending write state and is written to the storage exception log; after write recovery, it is rewritten in the order of trigger time to avoid event sequence disorder. The generated event task data enters the event development simulation queue and sends an event display update to the event identifier layer of the dynamic exercise situation map.

[0034] S303: Extract real-time location, participating roles, control area identifiers, and handling attributes from the event task data. Obtain the road accessibility status, participating role distribution status, and geofence of the corresponding exercise unit from the dynamic exercise situation map, and record the initial event state. The initial event state is the starting data packet for event simulation, containing the event occurrence area, triggering role, affected geofences, road accessibility relationships, adjacent exercise units, schedulable role locations, and handling attributes. Road accessibility status comes from the road status layer of the dynamic exercise situation map, participating role distribution status comes from the object layer, and geofences come from the geofence layer. The extraction process verifies the situation map version against the version identifier in the event task record. If the versions are inconsistent, read the valid situation version corresponding to the trigger time; if a corresponding version is missing, use the most recent valid situation version and write the version replacement identifier. The initial event state is written to the event simulation cache for use by affected exercise units for identification and candidate handling route selection.

[0035] S304: Based on the initial state of the event, identify the affected exercise units and filter candidate disposal routes according to the road connectivity, handling attributes, and participating role permissions between the affected exercise units. The candidate disposal routes that meet the passage conditions and role permission conditions are determined as the exercise disposal routes. An affected exercise unit is a set of spatial units jointly determined by the event occurrence area, adjacent accessible areas, fenced-off areas, and the area covered by the disposal action. Candidate disposal routes consist of a sequence of road nodes from the current location of the dispatchable participating role to the target area. The route record includes the starting role, target area, exercise units traversed, road closure status, fence crossing status, and role permission verification status. The filtering process first eliminates road segments that are impassable due to road closure status, then eliminates road segments whose fenced-off status does not match the role permissions, and confirms whether the target area and the action to be executed are consistent with the role permissions based on the handling attributes. If a passable route cannot be formed, the event task enters a pending manual dispatch state, the dynamic exercise situation map displays route anomaly indicators, and the reason for the missing route is reported to the command center.

[0036] S305: Obtain the road node sequence, road closure status, electronic fence restriction status, and role access permissions between the affected exercise units and the schedulable participating roles. Remove road segments with road closure status or those that do not meet role access permissions from the road node sequence to obtain a set of passable routes. The road node sequence comes from the urban spatial relationship topology, the closure status comes from the road status layer of the situation map, the fence restriction status comes from the electronic fence layer, and the role access permissions come from the role permission field in the exercise plan. The removal process checks each segment segment according to the accessibility order of the node sequence. When a closure segment is encountered, that segment and subsequent routes dependent on it are marked as impassable. When a fence restriction is inconsistent with the role permission, the corresponding crossing segment is marked as permission denied. The set of passable routes stores the route records that have passed through the accessibility and permission checks, and retains the area traversed, the arrival order of the target area, and the fence crossing record for each route. When the road status or permission status is updated during the filtering process, the current filtering record is written with a status change flag, and the updated situation map version is reread for route confirmation.

[0037] S306: When multiple routes exist in the set of passable routes, they are sorted according to the number of road nodes, the number of times the route crosses the electronic fence, and the order of arrival at the target area. The route with the highest ranking is determined as the exercise response route. The number of road nodes indicates the complexity of the topological nodes traversed by the route, the number of times the route crosses the electronic fence indicates the degree to which the route is affected by the fence rules, and the order of arrival at the target area indicates whether the route can approach the target area according to the response attribute requirements. The sorting process reads the road node sequence, fence crossing status, and target area order fields from the route record. Routes inconsistent with the response attributes are first excluded, and then the sorting result is formed according to the continuity of the nodes traversed by the route, the fence crossing status, and the order of reachability to the target area. The sorting result is written to the route selection record, which retains the sorting basis field and the rule version identifier. If multiple routes have the same sorting status, the route consistent with the status of the schedulable role in the current situation diagram is selected, and the remaining routes are reserved as backup routes for rollback in case of command execution failure.

[0038] S307: Based on the exercise response route, participating roles, and affected exercise units, generate a scheduling adjustment instruction including the scheduling object, target area, travel path, and execution action. The scheduling object comes from the screening results of schedulable participating roles, the target area comes from the control area identifier and response attribute in the event task data, the travel path comes from the exercise response route, and the execution action comes from the response action identifier. During the instruction generation process, the above fields are written into the scheduling instruction record and bound to the event task identifier, route selection record, and situation map version identifier. Before the instruction is issued, execution permission and path validity are verified. If the verification passes, it is written to the pending execution status and sent to the command terminal or participating role terminal; if the verification fails, an instruction abnormal status is written, which includes the failure field, the source of the abnormality, and the rollback processing entry. After the instruction is sent, it waits for execution confirmation information. If no confirmation information is received, it remains in the pending confirmation status and is marked on the situation map. After receiving execution confirmation, the instruction status is updated to the executing or completed status, and the update result is entered into the review record link.

[0039] S4: Record the virtual town model status, participating character trajectories, event triggering processes, and the execution results of scheduling and adjustment commands to generate exercise replay data. The exercise replay data is a sequence of replay frames built according to the recording time, including model status, character positions, event status, command status, fence status, and road status. The virtual town model status comes from the model version and situation map layer; the participating character trajectories are arranged chronologically from the object status records; the event triggering process comes from triggering conditions, valid trigger records, and event task data; and the execution results of scheduling and adjustment commands come from command status receipts and situation map update records.

[0040] S401: Acquire participating roles, real-time location data, data acquisition time, and the corresponding training unit. Arrange the real-time location data chronologically according to participating roles to generate a single-object trajectory record. The single-object trajectory record is a trajectory data structure aggregated according to role identifiers, including role identifier, location sequence, acquisition time sequence, training unit, valid location identifier, landing status, and source channel. During the arrangement process, status records for the same role are sorted sequentially by acquisition time. Duplicate records are retained as valid records based on source priority and valid identifier. Missing location records are written to trajectory breakpoints as missing status; breakpoints do not participate in route judgment but are included in the replay display. Records with abnormal acquisition time order are written to the trajectory error cache and associated with the original access record; after verification and restoration of the order, they are merged into the single-object trajectory record. The generated single-object trajectory record is simultaneously provided for playback frame sequences, boundary crossing identification, and command execution verification.

[0041] S402: When a participating character crosses the boundary of a training unit, the boundary crossing time and direction are written, generating a trajectory of the participating character with a training unit switching identifier. The boundary crossing time comes from the acquisition time in the trajectory record when the character's position changes from one training unit to an adjacent training unit. The crossing direction is determined by the starting training unit, the target training unit, and the corresponding entry boundary. The crossing identification process reads the training unit field and boundary relationship field of the continuous trajectory record, and writes a switching identifier when confirming that the character enters an adjacent unit from inside the boundary or returns to the current unit from an adjacent unit. If the continuous trajectory record is insufficient to determine the crossing direction, the direction is confirmed by combining the electronic fence entry status, the previous valid placement result, and the next valid placement result; if it still cannot be confirmed, a direction verification identifier is written. The trajectory with the training unit switching identifier is used to review and demonstrate the character's movement path, verify the execution process of scheduling instructions, and verify the hit status of area rules.

[0042] S403: Acquire the virtual town model status, participating character trajectories, event triggering processes, and scheduling adjustment command execution results. Establish a unified timeline based on recording time, and associate the model status, character position, event status, and command status at the same time node to generate a replay frame sequence. The unified timeline is a replay index that merges model status records, trajectory records, event records, and command records according to recording time. The establishment process uses the acquisition time, trigger time, command issuance time, and execution confirmation time of each record as the time field source, grouping records that enter the same situation version at the same time node into the same replay frame. Model status includes spatial object version and layer status; character position comes from participating character trajectories; event status comes from event task data; and command status comes from execution result receipts. When a certain type of record is missing, the replay frame retains that type of field as empty and writes the missing source, without blocking the association of other fields. The generated replay frame sequence is stored in the replay data area, and a traceable original record index is retained.

[0043] S404: When recording the event triggering process, the trigger condition identifier, area occupancy relationship, object status criterion hit result, handling attribute, valid trigger record, and event task status are linked in a chain. This chained record is used to reconstruct the complete process of the event from area occupancy to task generation, including rule version, role status source, fence boundary status, status hit result, and task write status. When the trigger condition is not hit, only candidate trigger records and the reason for the miss are retained, and the event task is not entered; when the trigger condition is hit but the task write is abnormal, valid trigger records are retained and entered into the rewrite queue. This chained record is connected to the event status field in the playback frame sequence, allowing tracing back from the event display node to the trigger rule, role location, and fence status during review.

[0044] S405: When recording the execution results of scheduling adjustment instructions, the instruction issuance status, execution confirmation status, route following status, target area arrival status, and abnormal feedback status are written to the instruction execution record. The route following status is obtained by verifying the consistency between the participating character's trajectory and the travel path in the scheduling instruction. The target area arrival status is obtained by comparing the character's landing result with the target area boundary. When an instruction is not confirmed, a pending confirmation status is written; when the path deviates, a route deviation status is written; when the target area is not reached, a non-reached status is written; and when an interface abnormality is reported, an interface abnormality status is written. All of the above statuses retain the source record and processing time fields and are invoked by the instruction status field of the replay frame sequence. The execution result record is bound to the event task data, forming a closed recording link from triggering, deduction, instruction, execution to review.

[0045] S5: Conduct a post-exercise review and evaluation based on the replay data, and output a comprehensive exercise report. The comprehensive exercise report is a document of exercise results data generated from the replay frame sequence and the post-exercise evaluation table. It includes event response time status, route arrival status, command completion status, area rule hit status, trajectory anomaly status, fence anomaly status, and command anomaly status. The post-exercise evaluation table is a structured evaluation record generated for the report. Fields are derived from the replay frame sequence, event task data, trajectory records, and command execution records. The report generation process does not alter the original exercise records; it only reads traceable records and forms the evaluation conclusion fields, which are available for viewing, exporting, and archiving by the command center.

[0046] S501: Extract event response duration, route arrival status, instruction completion status, and area rule hit status based on the replay frame sequence, and write them into the debriefing evaluation table, outputting a comprehensive exercise report. Event response duration includes the first response duration and the confirmation response duration. The first response duration is determined by the difference between the dispatch instruction issuance time and the event trigger time, and the confirmation response duration is determined by the difference between the execution confirmation time and the dispatch instruction issuance time. The calculation results and corresponding response statuses are written into the debriefing evaluation table. Route arrival status is determined by the target area arrival status field, instruction completion status is determined by the completion identifier in the instruction execution record, and area rule hit status is determined by the trigger condition identifier and the object status criterion hit result. The debriefing evaluation table establishes an evaluation record for each event task. The evaluation record includes the event task identifier, trigger area, participating roles, handling attributes, route status, instruction status, rule hit status, and anomaly identifier. When outputting the comprehensive exercise report, the report generation process reads the evaluation record and replay frame index, organizing the event process, role trajectory, dispatch instructions, and execution results into traceable content.

[0047] S502: During the debriefing and evaluation process, consistency checks are performed on the virtual town model status, participating character trajectories, event triggering processes, and command execution results. Model status consistency checks read the model version and situation map version to confirm that the spatial boundaries and fence boundaries used in the replay frames come from the same model version. Trajectory consistency checks read the character's position, acquisition time, and the training unit they belong to, confirming that the trajectory records correspond to the replay frames. Event consistency checks read the triggering conditions, valid trigger records, and event task data to confirm that the event display status can be traced back to the rule hit record. Command consistency checks read the scheduling adjustment commands and execution receipts to confirm that the command status can be traced back to the issuance and confirmation records. If the checks fail, the debriefing and evaluation table writes the anomaly category and source record index, and the comprehensive training report retains the anomaly description field and references the corresponding replay frame.

[0048] S503: After the comprehensive exercise report is output, the report records, debriefing evaluation forms, replay frame sequences, event task data, and instruction execution records are archived. Archived records include report identifiers, exercise plan identifiers, model version identifiers, rule version identifiers, generation source, and access permissions. Access permissions are determined based on role permissions in the exercise plan and command-line authorization records; unauthorized access requests only return a permission verification status. The archiving process also saves the original record index. During subsequent debriefing queries, the evaluation form is read using the report identifier, the exercise replay data is read using the replay frame index, and the triggering process and scheduling execution chain are read using the event task identifier. If archiving fails, the report output status remains pending archiving, and the reason for the failure is written to the storage exception record; after archiving is restored, the reports are rewritten in the order they were generated. This archiving chain enables the virtual town model status, participating role trajectories, event triggering processes, and scheduling adjustment instruction execution results to be traced, reviewed, and reused within the same exercise record.

[0049] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for constructing a virtual environment of a small town based on digital twin technology, characterized in that, Includes the following steps: Acquire spatial elements of small towns and confrontation exercise plans, generate virtual town models, and determine exercise units according to the spatial relationships of towns; Acquire real-time status data of participating characters and bind it to the virtual town model to generate a dynamic exercise situation diagram; For the training unit, electronic fences and area training rules are set, and the area training rules are broken down into rule objects, area boundary conditions, object status criteria and handling attributes. Based on the location of the object affected by the rule and the boundary conditions of the region, the region occupancy relationship is determined, and the region occupancy relationship, the object state criterion, and the disposal attribute are combined to construct the event triggering condition; When the real-time status data of the participating character matches the event triggering condition, event task data including real-time location and participating character is recorded; By combining the dynamic exercise situation map, the event development is simulated, the exercise response route is determined, and dispatch and adjustment instructions are generated; Record the status of the virtual town model, the trajectory of participating characters, the event triggering process, and the execution results of scheduling and adjustment instructions. Generate exercise replay data, conduct a review and evaluation, and output a comprehensive exercise report.

2. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The generation process of the training unit includes: Obtain the road outlines, building outlines, public open areas, and administrative boundaries from the spatial elements of the small town; perform unified coordinate registration on the road connectivity, building adjacency, and regional accessibility relationships; and establish the town's spatial relationship topology. The participating roles, mission start and end areas, confrontation areas and access restrictions in the confrontation exercise plan are analyzed and associated with spatial nodes and spatial edges in the urban spatial relationship topology to generate exercise constraint mapping relationships. Based on the urban spatial relationship topology and the exercise constraint mapping relationship, spatial partitions with continuous access boundaries and independent exercise constraints are determined, and each spatial partition is determined as the exercise unit.

3. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The process of generating the dynamic exercise situation diagram includes: Acquire the participating characters, real-time location data, motion status data, and data acquisition time, and output them as object status records; The real-time location data in the object status record is converted to the coordinate system of the virtual town model. Based on the converted real-time location data, road sections, building areas or public open areas are matched to generate spatial location results. Based on the spatial positioning results, the object status records, and the data acquisition time, the object layer is updated to generate the dynamic exercise situation map.

4. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The process of setting up the electronic fence and the area drill rules includes: Obtain the spatial boundary, unit type, accessible entrances, and participating role permissions of the training unit; establish fence boundary data containing accessible entrance nodes and entrance access attributes based on the spatial boundary and accessible entrances; associate the fence closing boundary with the corresponding training unit identifier to generate the electronic fence. The control area identifier, corresponding participating role, entry status, stay status, departure status, and disposal action identifier in the regional exercise rules are obtained. The corresponding participating role is determined as the object of the rule. The control area identifier and the electronic fence are determined as the regional boundary conditions. The entry status, stay status, and departure status are determined as the object status criteria. The disposal action identifier is determined as the disposal attribute.

5. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 4, characterized in that, The process of constructing the event triggering conditions includes: The real-time location data of the object affected by the rule, the corresponding participating role in the area, and the boundary conditions of the area are obtained. The real-time location data is compared with the spatial landing point within the electronic fence defined by the boundary conditions of the area. Based on the current sampling position, the previous sampling position, and the boundary conditions of the area, the boundary status of the object is determined as entering the boundary, being inside the boundary, being outside the boundary, or leaving the boundary. Based on the participating roles in the corresponding region, the boundary state of the object is filtered, and the boundary state of the object is associated with the corresponding control area identifier to generate the region occupancy relationship; The region occupancy relationship is compared with the object state criterion, and the disposal attribute is synchronously associated when the state hit comparison is successful, thus constructing the event triggering condition.

6. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The process of recording the event task data includes: Acquire the participating roles, real-time location data, control area identifier, trigger time and handling attributes that match the event triggering conditions, compare the data acquisition time of the real-time location data with the trigger time for time consistency, and determine the records that pass the time consistency comparison as valid trigger records; The real-time location data in the valid trigger record is associated with the corresponding control area identifier, and the participating role, real-time location data, control area identifier and trigger time are written into the event task to generate the event task data.

7. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The process of generating the scheduling adjustment instruction includes: Extract the real-time location, participating roles, control area identifiers and handling attributes from the event task data, and obtain the road accessibility status, participating role distribution status and electronic fence of the corresponding exercise unit from the dynamic exercise situation map, and record the initial state of the event; Based on the initial state of the event, the affected training units are determined, and candidate handling routes are screened according to the road connectivity, handling attributes and participating role permissions between the affected training units. The candidate handling routes that meet the passage conditions and role permission conditions are determined as the training handling routes. Based on the exercise response route, participating roles, and affected exercise units, the scheduling adjustment instruction is generated, which includes the scheduling object, target area, travel path, and execution action.

8. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 7, characterized in that, The selection process for the drill response routes specifically includes: Obtain the road node sequence, road closure status, electronic fence restriction status, and role access permissions between the affected exercise unit and the schedulable participating role. Remove road segments in the road node sequence that have a road closure status or do not meet the role access permissions to obtain a set of passable routes. When there are multiple routes in the set of passable routes, the routes are sorted according to the number of road nodes, the number of times the electronic fence is crossed, and the order of arrival at the target area. The routes are sorted in order of priority of handling attributes, from the fewest to the most road nodes, from the fewest to the most electronic fences crossed, and the order of arrival at the target area. When the sorting results are the same, the exercise handling route is determined according to the distance between the current position of the participating character and the target area.

9. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 1, characterized in that, The process of generating the comprehensive exercise report includes: The virtual town model status, the trajectory of the participating characters, the event triggering process, and the execution result of the scheduling and adjustment instructions are obtained. A unified timeline is established according to the recorded time, and the model status, character position, event status, and instruction status at the same time node are associated to generate a replay frame sequence. Based on the replay frame sequence, the event response duration, route arrival status, instruction completion status, and area rule hit status are extracted and written into the debriefing and evaluation table, and the comprehensive exercise report is output.

10. The method for constructing a virtual environment of a small town based on digital twin technology according to claim 9, characterized in that, The process of recording the trajectory of the participating characters includes: Acquire the participating roles, real-time location data, data acquisition time, and the unit in which they are located, and arrange the real-time location data in chronological order according to the participating roles to generate a single-object trajectory record; When a participating character crosses the boundary of a training unit, the boundary crossing time and direction are written to generate the trajectory of the participating character with a training unit switching identifier.