WebXR-based digital twinning extension method in highway scene

By constructing a digital twin expansion method for highway scenarios in the WebXR system, classification encoding and incremental updates of static constructs, dynamic objects and timing variables are realized, which solves the problems of interaction delay and resource update in the existing WebXR system in the highway scenario, and improves the system's response efficiency and immersive experience.

CN120353345AActive Publication Date: 2025-07-22ANHUI TRANSPORT CONSULTING & DESIGN INST

Patent Information

Application Number
CN202510854842.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-07-22
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

In the highway scenario, existing WebXR systems are difficult to realize visual reconstruction of multi-dimensional perceived data, real-time incident response and synchronous model updates, and have high interaction delays and low response accuracy, and the resource scheduling and model update mechanisms are inflexible, making it difficult to meet the needs of smart transportation systems.

Method used

Build a digital twin expansion method based on WebXR, integrate highway scene structure, traffic state and environmental monitoring data, adopt multi-layer packaging structure and event mapping mechanism to realize the classification encoding of static structures, dynamic objects and timing variables, and support incremental updates and synchronous rendering of perspectives to ensure the system response is real-time and interactive immersion.

Benefits of technology

It improves the scalability and rendering efficiency of the three-dimensional model in the Web environment, realizes the accurate perception and dynamic interaction response of user perspective, spatial position and operation behavior, enhances the universality of the device and the flexibility of interactive configuration, and ensures the real-time, continuity and robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353345A_ABST
    Figure CN120353345A_ABST
Patent Text Reader

Abstract

The invention discloses a WebXR-based digital twinning extension method in a highway scene, and aims to solve the problems of poor interaction adaptability between a three-dimensional twinning model and a Web end XR, high interaction response delay, inflexible resource updating mechanism and the like in an existing system. The method comprises the following steps: constructing a three-dimensional twinborn model based on highway scene structure information, traffic state information and environment monitoring data; formatting the model into an analyzable data structure suitable for a Web end; starting an operation instance through a WebXR session, loading XR equipment capability, collecting and analyzing user space positioning, head posture and control input information, and generating an interaction control instruction; and the incremental resource replacement of the three-dimensional twin model is realized according to the updating instruction of the server side. According to the method, the adaptability, the interactivity and the real-time performance of the Web end XR system in the traffic digital twin environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital twin and virtual reality interaction, and in particular to a digital twin extension method based on WebXR in a highway scenario. Background Art

[0002] Against the backdrop of the rapid development of digital and intelligent transportation, how to achieve immersive visualization and real-time interactive control of highway scenes on the Web has become a key technical issue in the construction of intelligent transportation systems. With the introduction of the concept of digital twins and their widespread application in urban governance, infrastructure management, and traffic monitoring, the construction and interaction of three-dimensional twin models have gradually shifted from static presentation to dynamic fusion and real-time response. However, existing systems generally rely on high-performance local devices, which makes it difficult to meet the Web's needs for visual reconstruction of multi-dimensional perception data, real-time event response, and synchronous model updates in a resource-constrained environment, restricting the promotion and deployment of digital twins in a wider range of transportation scenarios.

[0003] As a cross-platform XR operating framework for browser environments, WebXR has good compatibility and portability, and has gradually become an important tool for building immersive experiences on the Web. However, in practical applications, there are still many challenges in how to efficiently integrate heterogeneous perception data, complex three-dimensional models and WebXR systems, and build a scalable XR interactive system with type recognition, event mapping and incremental resource update capabilities. On the one hand, the existing WebXR system has certain limitations in device adaptation, input parsing and rendering efficiency, resulting in high interaction delays and low response accuracy; on the other hand, traditional three-dimensional models lack parseable structures and event binding mechanisms, making it difficult to meet the dynamic response requirements of the Web side for high-frequency data input and control logic changes.

[0004] In addition, in terms of resource scheduling and model update mechanisms, existing solutions mostly adopt overall replacement or manual management strategies, lacking incremental update support for dynamic changes in the network environment and evolution of system status, making it difficult to achieve real-time evolution of models and interaction logic without interrupting services.

[0005] Therefore, how to build a digital twin extension method based on WebXR in highway scenarios has become a technical problem that needs to be urgently solved in the current field of smart transportation. Summary of the invention

[0006] An object of the present invention is to propose a digital twin extension method based on WebXR in a highway scenario. The present invention integrates multi-source data such as road structure, traffic status, and environmental monitoring, constructs a three-dimensional twin model including static structures, dynamic objects, and time-series variables, and generates a multi-layer encapsulation structure suitable for Web-side parsing through formatting processing; dynamically loads device capability parameters in a WebXR running instance, collects and parses user XR input information, and generates model interaction control instructions through an event mapping mechanism; at the same time, supports incremental updates of model resources and perspective synchronous rendering to ensure real-time system response and immersive interaction. The present invention has the advantages of accurate model component recognition, flexible interaction control, efficient resource update, and strong Web-side adaptability, and is applicable to various intelligent transportation scenarios such as traffic simulation, remote monitoring, and XR intelligent command.

[0007] The digital twin extension method based on WebXR in a highway scenario according to an embodiment of the present invention includes the following steps: S1. Generate a corresponding three-dimensional twin model based on the obtained highway scenario structure information, traffic status information, and environmental monitoring data; S2. Perform formatting processing on the three-dimensional twin model and convert it into a Web-parsable data structure suitable for the Web-side operating environment; S3. Start a WebXR session on the browser side, construct a WebXR running instance that can recognize the Web-parsable data structure, and call the XR device capability query interface provided by the browser operating environment to load input tracking parameters and display configuration parameters matching the terminal type; S4. Based on the XR device input data received by the WebXR running instance, collect the user's spatial positioning information, head pose information, and control input information, and encapsulate them into an input event stream according to the time series; S5. Parse the spatial positioning information, head pose information, and control input information in the input event stream, and map them to interaction control instructions for the three-dimensional twin model according to predefined event response rules; S6. During the running process of the WebXR running instance, according to the update instruction from the server, load the corresponding resource file and perform incremental replacement on the three-dimensional twin model; S7. Load the updated three-dimensional twin model into the browser graphics rendering engine, and the browser graphics rendering engine generates the current frame image according to the user's head pose information and spatial positioning information in the WebXR running instance, and outputs the current frame image to the XR display device.

[0008] Optionally, the S1 specifically includes: S11. Extract road boundaries, building outlines, and ancillary facilities based on the highway scene structure information, and set them as static structures; S12. Identify data objects with location and status change attributes according to the traffic status information, and set them as dynamic objects; S13. Extract data items with time series characteristics from the environmental monitoring data, and set them as time series variables; S14. Classify and code the static structures, dynamic objects, and time series variables respectively according to the preset prefixes "C-", "D-", and "T-" to form unique identifiers of three-dimensional twin model components with type identifiers; S15. Write the unique identifiers of the three-dimensional twin model components as component type information into the attribute fields of each component in the three-dimensional twin model to represent the category to which the three-dimensional twin model components belong; S16. The category to which the three-dimensional twin model components belong is used to automatically identify different component categories during the Web-side formatting process, and participate in the binding of event response rules and the generation of interaction control instructions as a type basis.

[0009] Optionally, the specific steps of S2 include: S21. During the formatting process of the three-dimensional twin model, construct a Web-parsable data structure, and embed an event mapping rule sub-structure in the Web-parsable data structure. The event mapping rule sub-structure is used to describe the binding relationship between user input and system response; S22. The event mapping rule sub-structure is a JSON-format data object with a field-level structure and is stored in the interaction definition field in the Web-parsable data structure; S23. The event mapping rule sub-structure includes: An event identification field for identifying a unique event number; A trigger condition field for setting the input status required for the response event to take effect; A response action field for specifying the specific operations to be performed by the system after the event is triggered; A status transition field for indicating the target status identifier that the system needs to enter after the event is executed; S24. After the WebXR running instance loads the Web-parsable data structure, parse the fields of the event mapping rule sub-structure, extract the binding relationship, and establish an event trigger mapping table.

[0010] Optionally, the Web-parsable data structure constructed in S2 includes the following aspects in terms of encapsulation structure and format organization: In the process of formatting a 3D twin model, according to the category to which the components of the 3D twin model belong and the uses of the data in the highway scene structure information, traffic state information, and environmental monitoring data, static constructs, dynamic objects, and time-series variables are respectively encapsulated into different structural formats. The encapsulation includes: encapsulating static constructs into the glTF format, encapsulating dynamic objects into the JSON format, and encapsulating time-series variables into a custom binary format; In the above encapsulation process, an encapsulation type identification field is set in each component encapsulation unit, which is used to represent the category to which the 3D twin model component belongs, the encapsulation format type, and the resolvable data indicator; All component encapsulation units are uniformly mounted in the index directory of the Web resolvable data structure to form an encapsulation list structure that can be retrieved by type and dynamically resolved; When the WebXR running instance is loaded, the corresponding decoder is called according to the encapsulation list structure. The glTF data is used for graphics rendering, the JSON format components are used for event trigger recognition and status control, and the binary data is used for system variable update and simulation synchronization processing.

[0011] Optionally, the S3 specifically includes: S31. Call the XR device capability query interface in the browser environment to obtain the feature information of the current XR terminal. The feature information of the current XR terminal includes the terminal type identifier, input interface protocol type, spatial tracking ability index, and display output support parameters; S32. Search for the corresponding entry in the preset terminal capability adaptation rule table according to the feature information of the current XR terminal. The terminal capability adaptation rule table uses the terminal type identifier as the index primary key and associates the corresponding input tracking parameter set and display configuration parameter set; S33. The input tracking parameter set includes: the number of spatial degrees of freedom, input event types, attitude data refresh frequency, and multi-source input synchronization strategy; S34. The display configuration parameter set includes: the maximum supported resolution, the upper limit of the refresh frame rate, the field of view angle parameter, and the device rendering delay threshold; S35. After matching the target entry, the WebXR running instance sets the interactive input processing rules according to the input tracking parameter set. The interactive input processing rules include the input event parsing format, status update period, and synchronization control strategy, and sets the XR view rendering parameters according to the display configuration parameter set, including the frame update rate, image resolution, and display output angle; S36. The interactive input processing rules are used to establish a mapping relationship between the XR device input and the control instruction generation logic; S37. The XR view rendering parameter setting is used to construct the basic display configuration of the WebXR view output, including setting the viewpoint synchronization logic, perspective projection range and refresh rhythm control.

[0012] Optionally, the S4 specifically includes: S41, after the WebXR running instance receives the user's spatial positioning information, head posture information, and control input information from the XR device, it encapsulates it into an input event stream in the order of input collection time; S42: The input event stream is composed of multiple input event units, each of which includes the following fields: The timestamp field is used to identify the time when the input data was collected; The device identification field is used to indicate the XR terminal from which the input data comes; The spatial positioning field is used to record the three-dimensional position coordinate value; The posture information field is used to represent the head orientation data; Control operation field, used to indicate input trigger type and parameter value; S43, performing time alignment processing on the input event stream according to the system unified time reference during the encapsulation process; S44. The encapsulated input event stream can be accessed and parsed by the event parsing mechanism in the WebXR running instance that is the same as the event mapping rule substructure.

[0013] Optionally, the S5 specifically includes: S51, the WebXR running instance parses the input event unit in the input event stream, and extracts the spatial positioning field, the posture information field, and the control operation field; S52, comparing the extracted information with the event identification field in the event mapping rule substructure, and preliminarily determining the event response rule entry to be verified; S53, deeply combining the current interaction state parameters of the WebXR running instance as auxiliary conditions for judging the applicability of the event rule, wherein the interaction state parameters include the user's current position, the user's viewing angle state, and the most recent triggering event information; S54, comparing the trigger condition fields of each event response rule entry to be verified one by one, comprehensively judging whether the event type, interaction state and input timing matching requirements are met, and determining the event response rule entry that meets the conditions; S55. Constructing an interactive control instruction according to the response action field in the selected predefined event response rule, wherein the interactive control instruction includes: a type identifier of the target component, an interactive action type, and required execution parameters.

[0014] Optionally, the interaction control instruction includes a control field for the user's perspective state and has the following perspective transformation mechanism: When the type of the interaction control instruction is a perspective transformation instruction, extract the target perspective control field from the perspective transformation instruction, and the perspective transformation instruction includes the target focus position coordinates, rotation angle value, and field of view width setting parameter; Calculate the difference between the target perspective control field and the current user perspective state of the WebXR running instance, and construct a perspective transition vector and a rotation transformation matrix to implement the transition path from the current perspective state to the target state; During the process of constructing the perspective transformation path, apply an interpolation algorithm to smooth the movement process of the user's viewpoint; Apply the perspective transformation path to the virtual camera node in the WebXR running instance, and update the real-time three-dimensional scene view by updating the viewing direction, position coordinates, and projection parameters of the camera; After the perspective update is completed, the WebXR running instance adjusts the subsequent control strategy according to the current user interaction feedback, and records the perspective switching behavior in the interaction event log for behavior chain tracking and immersive control rhythm scheduling.

[0015] Optionally, the specific steps of S6 are as follows: S61. After the WebXR running instance receives the update instruction from the server, parse the resource identification field and the resource type field in the update instruction; The resource identification field is used to uniquely identify the resource module to be replaced in the Web-parsable data structure, and the resource type field includes structural resource type, behavioral resource type, and script resource type; S62. The WebXR running instance locates the resource module to be replaced according to the resource identification field, and loads the corresponding update resource package content according to the resource type field. The update resource package content is module-level incremental data, which only contains structural difference data, behavioral logic change information, and script function update code segments; S63. During the resource replacement process, the WebXR running instance retains the current running state and embeds it into the original running path by mounting the update resource package to achieve dynamic coverage of the three-dimensional twin model and control logic; S64. The incremental update mechanism supports independent replacement of the following three types of resource units: Structural resource unit, used to update the model component structure and spatial layout; Behavioral resource unit, used to update the event mapping rule and control reaction path; Script resource unit, used to update the front-end logic function, rendering scheduling strategy, and input behavior processing code; After the incremental update is completed, the WebXR running instance updates the resource index directory and synchronizes the updated corresponding resource modules to the event parsing mechanism and the interactive control instruction generation logic path.

[0016] Optionally, the reference path corresponding to the resource identification field of each resource module in the Web-parsable data structure includes a two-level structure of a main path and a backup path, and has the following path scheduling mechanism: The WebXR running instance maintains a resource reference path in the resource index directory for each resource identification field. The resource reference path includes main path and backup path information. The main path is the default priority loading path, and the backup path is used for resource fault-tolerant loading after the main path fails to load. The resource reference path supports a dynamic redefinition mechanism. The WebXR running instance determines whether to switch to the backup path based on the load status feedback conditions. The status feedback conditions include main path loading timeout, main path resource integrity verification failure, resource package parsing error or verification exception associated with the main path. During the path redefinition process, the WebXR running instance updates the path priority flag field in the resource index directory, sets the backup path as the current main path, and records the switching reason and status information. After the resource reference path redefinition is completed, continue to load the content of the updated resource package pointed to by the updated path and execute the incremental replacement process. The path switching mechanism supports a resource hot loading method that does not interrupt the system running state.

[0017] The beneficial effects of the present invention are: (1) The present invention constructs an efficient digital twin modeling mechanism for the Web side. By heterogeneously fusing the structural information, traffic status, and environmental monitoring data in the highway scene, a classification and coding method for static constructs, dynamic objects, and time-series variables is proposed, and three-dimensional model data is organized in multiple encapsulation formats, realizing structured modeling and efficient parsing of different types of data in complex traffic scenes, and significantly improving the scalability and rendering efficiency of three-dimensional models in the Web environment.

[0018] (2) The present invention introduces an event mapping rule substructure, establishes a binding relationship between user input and system response in the Web-parsable data, can generate and parse an input event stream in real time based on the input acquisition result of the XR device, thereby realizing accurate perception and dynamic interaction response to the user's perspective, spatial position, and operation behavior, and effectively improving the interaction fluency, response timeliness, and consistency of the immersive experience in the WebXR environment.

[0019] (3) The present invention designs a dynamic configuration mechanism for XR terminals based on device capability adaptation rules. During the establishment of a WebXR session, it can intelligently set input parsing and image rendering strategies according to the spatial tracking capabilities and display parameters of XR devices, ensuring a consistent operation experience and high-quality picture output on multi-type terminal devices, and enhancing the device versatility and interactive configuration flexibility of the system.

[0020] (4) The present invention constructs an incremental update mechanism at the resource module level, supporting dynamic replacement of model structures, behavioral logics, and rendering scripts without interrupting the system operation. It also ensures the stability of resource scheduling through a dual-reference system of the main path and the backup path, achieving a significant enhancement in the real-time, continuous, and robust aspects of the digital twin system, and is applicable to traffic visualization application scenarios with frequent changes and high reliability requirements. Description of the Drawings

[0021] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, but do not constitute a limitation to the present invention. In the drawings: Figure 1 is the overall flowchart of the WebXR-based digital twin extension method in the highway scenario proposed by the present invention; Figure 2 is the schematic diagram of the three-dimensional twin model data encapsulation structure of the WebXR-based digital twin extension method in the highway scenario proposed by the present invention; Figure 3 is the flowchart of user input event collection and interactive control instruction generation of the WebXR running instance of the WebXR-based digital twin extension method in the highway scenario proposed by the present invention. Specific Embodiments

[0022] Now, the present invention will be further described in detail with reference to the drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.

[0023] Refer to Figures 1 - 3 , the WebXR-based digital twin extension method in the highway scenario includes the following steps: S1. Generate a corresponding three-dimensional twin model based on the obtained highway scenario structure information, traffic state information, and environmental monitoring data; In this embodiment, the specific content of S1 includes: S11. Extract road boundaries, building outlines, and ancillary facilities according to the highway scenario structure information and set them as static structures; S12. Identify data objects with location and status change attributes based on traffic state information and set them as dynamic objects; S13. Extract data items with time series characteristics from environmental monitoring data and set them as time series variables; S14. Classify and code the static construct, dynamic objects, and time series variables respectively according to the preset prefixes "C-", "D-", and "T-" to form a unique identifier for the three-dimensional twin model component with type identification; S15. Write the unique identifier of the three-dimensional twin model component as component type information into the attribute fields of each component in the three-dimensional twin model to represent the category to which the three-dimensional twin model component belongs; S16. The category to which the three-dimensional twin model component belongs is used to automatically identify different component categories during the Web-side formatting process and participate in the binding of event response rules and the generation of interaction control instructions as a type basis.

[0024] In the present invention, by hierarchically abstracting the structural information, traffic state, and environmental monitoring data in the highway scenario, setting them as static constructs, dynamic objects, and time series variables respectively, and introducing a classification and coding mechanism during the construction of the three-dimensional twin model, the standardized modeling of multi-source heterogeneous perception data is realized. This solution not only improves the structural clarity and type recognition of the three-dimensional model components, but also provides a basis for the automatic identification of components and the generation of subsequent interaction logic in the Web-side formatting process. Using the preset prefixes "C-", "D-", and "T-" to mark different types of components enables the system to quickly locate, parse, and respond to data changes of specific types in data encapsulation and running instances, significantly improving the accuracy and efficiency of interaction processing. Further, the unique identifier of each model component is embedded in the attribute field, ensuring the consistency and traceability of the model during network transmission, incremental update, and state mapping. Through this mechanism, the present invention effectively solves the problems of difficult model component identification, fuzzy data binding, and delayed interaction response in the existing WebXR system, laying a solid foundation for realizing dynamic modeling and real-time control in the highway digital twin scenario.

[0025] S2. Perform formatting processing on the three-dimensional twin model and convert it into a Web-parsable data structure suitable for the Web-side running environment; In this embodiment, the S2 specifically includes: S21. During the formatting process of the three-dimensional twin model, construct a Web-parsable data structure and embed an event mapping rule sub-structure in the Web-parsable data structure, where the event mapping rule sub-structure is used to describe the binding relationship between user input and system response; S22. The event mapping rule sub-structure is a JSON format data object with a field-level structure and is stored in the interaction definition field of the Web-parsable data structure; S23. The event mapping rule sub-structure includes: An event identification field for identifying a unique event number; A trigger condition field for setting the input state required for the response event to take effect; A response action field for specifying the specific operations to be performed by the system after the event is triggered; A state transition field for indicating the target state identifier that the system needs to enter after the event execution is completed; S24. After the WebXR running instance loads the Web-parsable data structure, field parsing is performed on the event mapping rule sub-structure to extract the binding relationship and establish an event trigger mapping table.

[0026] The Web-parsable data structure constructed in S2 includes, in terms of encapsulation structure and format organization: During the process of formatting the 3D twin model, according to the categories to which the components of the 3D twin model belong and the uses of the data in the highway scene structure information, traffic state information, and environmental monitoring data, the static constructs, dynamic objects, and time-series variables are respectively encapsulated into different structural formats. The encapsulation includes: encapsulating the static constructs into the glTF format, encapsulating the dynamic objects into the JSON format, and encapsulating the time-series variables into a custom binary format; In the above encapsulation process, an encapsulation type identification field is set in each component encapsulation unit to characterize the category to which the 3D twin model component belongs, the encapsulation format type, and the parsable data indicator; All component encapsulation units are uniformly mounted in the index directory of the Web-parsable data structure to form an encapsulation list structure that can be retrieved by type and dynamically parsed; When the WebXR running instance loads, the corresponding decoder is called according to the encapsulation list structure. The glTF data is used for graphic rendering, the JSON format components are used for event trigger recognition and state control, and the binary data is used for system variable update and simulation synchronization processing.

[0027] In the process of formatting the 3D twin model, the present invention introduces a Web-parsable data structure with clear structure and complete functions. By embedding an event mapping rule sub-structure in the model data, it realizes the direct binding between user input and system response, providing a standard mechanism for instant interaction in the WebXR environment. The event mapping structure adopts a JSON hierarchical format, clearly defining keyword fields such as event identifiers, trigger conditions, response actions, and state transitions, enabling the system to quickly identify input events and execute corresponding actions during operation, greatly improving the maintainability of interaction rules and the certainty of system response. In terms of model encapsulation, by encapsulating static constructs, dynamic objects, and temporal variables into glTF, JSON, and custom binary formats respectively, and adding an encapsulation type identifier field in the encapsulation unit to form a data list organized by category, it realizes the dynamic parsing and precise scheduling of model components. When the system loads, it calls a dedicated decoder according to the encapsulation list, and completes rendering, event recognition, and state synchronization according to the component category, effectively improving the modularity and operation efficiency of the system. Overall, this method solves the problems in the prior art such as unclear parsing of complex 3D model structures on the Web side, incomplete event interaction binding, and cumbersome model data update, providing strong technical support for the efficient parsing, real-time interaction, and scalable deployment of the highway digital twin system.

[0028] S3. Start a WebXR session on the browser side, construct a WebXR running instance that can recognize the Web-parsable data structure, and call the XR device capability query interface provided by the browser running environment to load input tracking parameters and display configuration parameters matching the terminal type. In this embodiment, the S3 specifically includes: S31. Call the XR device capability query interface in the browser environment to obtain the feature information of the current XR terminal, where the feature information of the current XR terminal includes a terminal type identifier, an input interface protocol type, a spatial tracking ability index, and a display output support parameter. S32. Search for corresponding entries in the preset terminal capability adaptation rule table according to the feature information of the current XR terminal. The terminal capability adaptation rule table uses the terminal type identifier as the index primary key and associates the corresponding input tracking parameter set and display configuration parameter set. The input tracking parameter set includes: the number of spatial degrees of freedom, the input event type, the attitude data refresh frequency, and the multi-source input synchronization strategy. The display configuration parameter set includes: the maximum supported resolution, the upper limit of the refresh frame rate, the field of view angle parameter, and the device rendering delay threshold. S35. After matching the target entry, the WebXR running instance sets the interactive input processing rules according to the input tracking parameter set. The interactive input processing rules include the input event parsing format, the status update period, and the synchronization control strategy, and set the XR view rendering parameters according to the display configuration parameter set, including the frame update rate, the image resolution, and the display output angle; S36. The interactive input processing rule is used to establish a mapping relationship between the XR device input and the control instruction generation logic; S37. The setting of the XR view rendering parameters is used to construct the basic display configuration for the WebXR view output, including setting the viewpoint synchronization logic, the perspective projection range, and the refresh rhythm control.

[0029] In the initialization stage of the WebXR session, the present invention introduces the terminal capability adaptation rule table mechanism. By calling the XR device capability query interface through the browser running environment, it accurately identifies parameters such as the type identifier, input protocol, and spatial tracking characteristics of the current XR terminal, and matches the corresponding input tracking parameters and display configuration parameters according to the terminal type. This mechanism effectively realizes the adaptive scheduling of the system to different XR device characteristics, ensuring that all types of terminals can obtain a consistent interactive experience and high-quality visual output in the Web-side running environment. The input tracking parameter set covers the spatial degrees of freedom, event types, and refresh frequency strategies, while the display configuration parameters include key display performance indicators such as the maximum resolution, frame rate limit, and field of view angle, further ensuring the smoothness of interactive operations and the clarity of image rendering. On this basis, the WebXR running instance can automatically configure the XR view rendering parameters and set the input event parsing and synchronization control strategies according to the input tracking parameters, thereby constructing an efficient mapping path between the internal input and response of the system. In addition, through this mechanism, the system can perceive changes in terminal capabilities in real time, dynamically adjust the image resolution and frame rate control logic, and effectively reduce the resource occupancy and latency risks. This method significantly improves the interactive consistency, response efficiency, and running stability of the digital twin system in multi-terminal and multi-network environments, providing strong support for Web-side immersive traffic simulation and visualization control.

[0030] S4. Based on the XR device input data received by the WebXR running instance, collect the user's spatial positioning information, head pose information, and control input information, and encapsulate them into an input event stream according to the time series; In this embodiment, the S4 specifically includes: S41. After the WebXR running instance receives the user's spatial positioning information, head pose information, and control input information from the XR device, it encapsulates them into an input event stream according to the input acquisition time sequence; S42. The input event stream is composed of multiple input event units, and each input event unit includes the following fields: A timestamp field for identifying the acquisition moment of the input data; A device identification field for indicating the XR terminal from which the input data originates; A spatial positioning field for recording three-dimensional position coordinate values; An attitude information field for representing head orientation data; A control operation field for representing the input trigger type and parameter values; S43. The input event stream is time-aligned during the encapsulation process according to the unified time reference of the system; S44. The input event stream after encapsulation can be accessed and parsed by the event parsing mechanism in the WebXR running instance that is the same as the event mapping rule sub-structure.

[0031] The present invention establishes a complete XR device input data encapsulation mechanism in the WebXR running instance, which can construct a structured input event stream based on user spatial positioning, head attitude, and control input information, significantly improving the expression accuracy and processing efficiency of user behavior information in the system. This input event stream is based on a time series and is sequentially encapsulated into multiple input event units, each unit including key fields such as timestamp, device identification, spatial positioning, attitude information, and control operations, ensuring the all-round expression of data and the rigor of the acquisition order. By establishing a unified time reference system, all input events are time-aligned during the encapsulation process, ensuring the temporal consistency of interaction behaviors in subsequent parsing and control logics. At the same time, the encapsulated event stream is directly connected to the event mapping rule structure and is accessed and parsed by the WebXR running instance, thus realizing the seamless connection from "data acquisition" to "interaction response". This event-driven mechanism enables the system to make quick and accurate feedback on user behaviors in a complex traffic environment, greatly improving the immediacy of system response and the immersion of interactive control. This mechanism not only solves the problems of fragmented input information processing and lack of time dimension in traditional systems, but also provides a solid structural basis for subsequent multi-source input fusion and behavior chain tracking analysis.

[0032] S5. Parse the spatial positioning information, head attitude information, and control input information in the input event stream, and map them to interaction control instructions for the three-dimensional twin model according to predefined event response rules; In this embodiment, the S5 specifically includes: S51. The WebXR running instance parses the input event units in the input event stream and extracts the spatial positioning field, attitude information field, and control operation field; S52. Compare the extracted information with the event identification field in the event mapping rule sub-structure to preliminarily determine the event response rule entries to be verified; S53, deeply combining the current interaction state parameters of the WebXR running instance as auxiliary conditions for judging the applicability of the event rule, wherein the interaction state parameters include the user's current position, the user's viewing angle state, and the most recent triggering event information; S54, comparing the trigger condition fields of each event response rule entry to be verified one by one, comprehensively judging whether the event type, interaction state and input timing matching requirements are met, and determining the event response rule entry that meets the conditions; S55. Constructing an interactive control instruction according to the response action field in the selected predefined event response rule, wherein the interactive control instruction includes: a type identifier of the target component, an interactive action type, and required execution parameters.

[0033] The interactive control instruction includes a control field for the user's viewing angle state and has the following viewing angle change mechanism: When the type of the interactive control instruction is a perspective change instruction, extracting a target perspective control field from the perspective change instruction, wherein the perspective change instruction includes a target focus position coordinate, a rotation angle value, and a field of view width setting parameter; Calculate the difference between the target view control field and the current user view state of the WebXR running instance, and construct a view transition vector and a rotation transformation matrix to implement a transition path from the current view state to the target state; In the process of constructing the perspective transformation path, an interpolation algorithm is applied to smooth the user's viewpoint movement process; Apply the perspective transformation path to the virtual camera node in the WebXR running instance, and update the three-dimensional scene view in real time by updating the camera's viewing direction, position coordinates, and projection parameters; After the perspective update is completed, the WebXR running instance adjusts the subsequent control strategy based on the current user interaction feedback, and records the perspective switching behavior in the interaction event log for behavior chain tracking and immersive control rhythm scheduling.

[0034] Through the parsing and response of the WebXR input event stream, the present invention constructs an efficient and refined interactive control instruction generation mechanism, significantly improving the interactive response accuracy and immersive experience quality of the three-dimensional twin system. During the operation of the system, the WebXR instance can real-time parse the spatial positioning, attitude information, and operation control fields in the input event unit, and perform multi-level comparison and adaptation judgment according to the predefined event response rules to dynamically identify the user's current operation intention. At the same time, this mechanism deeply integrates user interaction state parameters, such as the current position, viewing angle state, and historical event information, and through multi-condition matching and temporal relationship reasoning, realizes accurate judgment of high-frequency and complex interactive events. In particular, the present invention further introduces a viewing angle transformation mechanism. When it is recognized that the user operation type is viewing angle adjustment, the system takes the target position, rotation angle, and field of view width parameters set in the viewing angle control field as the input of the viewing angle switching instruction, smoothly generates a transition path through the interpolation algorithm, and drives the virtual camera node to complete the viewing angle update. During this process, the system will also dynamically adjust the control strategy according to the user interaction feedback, and record each viewing angle transformation into the interactive event log to provide support for behavior chain tracking and system response rhythm scheduling. This solution effectively avoids problems such as sudden viewing angle jumps and inconsistent field of view switching, greatly enhancing the coherence, controllability, and immersion of the three-dimensional scene interaction, and improving the realism and response efficiency of user operations in the digital twin environment.

[0035] S6. During the operation of the WebXR running instance, according to the update instruction from the server, load the corresponding resource file and perform incremental replacement on the three-dimensional twin model; In this embodiment, the S6 specifically includes: S61. After the WebXR running instance receives the update instruction from the server, parse the resource identification field and resource type field in the update instruction; The resource identification field is used to uniquely identify the resource module to be replaced in the Web-parsable data structure, and the resource type field includes structural resource type, behavioral resource type, and script resource type; The WebXR running instance locates the resource module to be replaced according to the resource identification field, and loads the content of the corresponding update resource package according to the resource type field. The content of the update resource package is module-level incremental data, which only includes structural difference data, behavioral logic change information, and script function update code segments; During the resource replacement process, the WebXR running instance retains the current running state, and embeds it into the original running path by mounting the update resource package to achieve dynamic coverage of the three-dimensional twin model and control logic; The incremental update mechanism supports independent replacement of the following three types of resource units: A structural resource unit for updating the structure and spatial layout of model components; A behavioral resource unit for updating event mapping rules and controlling reaction paths; A script resource unit for updating front-end logic functions, rendering scheduling policies, and input behavior processing code; S66. After the incremental update is completed, the WebXR running instance updates the resource index directory and synchronizes the updated corresponding resource modules to the event parsing mechanism and the interactive control instruction generation logic path.

[0036] The reference path corresponding to the resource identification field of each resource module in the Web-parsable data structure includes a two-level structure of a main path and a backup path, and has the following path scheduling mechanism: The WebXR running instance maintains a resource reference path in the resource index directory for each resource identification field. The resource reference path includes main path and backup path information. The main path is the default priority loading path, and the backup path is used for resource fault-tolerant loading after the main path loading fails; The resource reference path supports a dynamic redefinition mechanism. The WebXR running instance judges whether to switch to the backup path according to the load status feedback conditions. The status feedback conditions include main path loading timeout, main path resource integrity verification failure, resource package parsing error or verification exception associated with the main path; During the path redefinition process, the WebXR running instance updates the path priority marking field in the resource index directory, sets the backup path as the current main path, and records the switching reason and status information; After the resource reference path redefinition is completed, continue to load the content of the updated resource package pointed to by the updated path and execute the incremental replacement process; The path switching mechanism supports a resource hot loading method that does not interrupt the system running state.

[0037] The present invention proposes a highly flexible WebXR system resource incremental update mechanism that supports uninterrupted operation. By parsing the update instructions sent by the server, the system can automatically identify the resource identifier field and the resource type field, accurately locate the module to be updated, and load the structural difference data, logical change information, or code patches at the module level to achieve fine-grained replacement of the three-dimensional twin model structure, behavior response path, and rendering control logic. During the update process, the WebXR running instance can be embedded into the running path through the resource package mounting method without interrupting the existing interaction state, maintaining the continuity of the system state, and greatly enhancing the stability and usability of the system in dynamic scenarios. The system adopts an independent replacement strategy for three types of resource units: structure, behavior, and script, enabling different levels of updates to be triggered as needed, effectively reducing the complexity of resource scheduling and version control. At the same time, the present invention innovatively constructs a resource reference structure composed of a main path and a backup path, and introduces a path dynamic redefinition mechanism. When the main path fails to load or the verification is abnormal, the system can automatically switch to the backup path to complete the hot loading, ensuring the robustness and system security of the update process. All path scheduling behaviors are recorded in the resource index directory, supporting fault tracking and loading status analysis, providing key technical guarantees for the digital twin system to achieve stable and efficient resource updates and functional evolution in large-scale traffic simulation or remote monitoring applications.

[0038] S7. Load the updated three-dimensional twin model into the browser graphics rendering engine, and the browser graphics rendering engine generates the current frame image based on the user's head pose information and spatial positioning information in the WebXR running instance, and outputs the current frame image to the XR display device.

[0039] In the process of implementing the present invention, when the three-dimensional twin model completes resource replacement after receiving the update instruction from the server, the system will load the updated model into the graphics rendering engine on the browser side. This rendering engine is a graphics processing component that supports the WebXR running environment and can respond to the user's XR interaction behavior in real time. During the rendering process, the system generates real-time images of the three-dimensional scene through the viewpoint position, viewing direction, and perspective projection matrix based on the user's head pose information and spatial positioning information collected in the WebXR running instance and the generation logic of the current frame image.

[0040] Specifically, the rendering engine dynamically constructs an observation matrix and field-of-view culling parameters centered on the user's current perspective to generate high-quality frame images with depth perception and spatial consistency. Subsequently, this image is transmitted to the XR device through the WebXR interface to achieve the final output of the immersive graphics screen. The entire process is synchronized in the system graphics rendering pipeline, and the frame image refresh rate is automatically aligned with the display parameters supported by the XR device, ensuring high consistency in display clarity, update speed, and interaction feedback of the output content.

[0041] The present invention realizes a complete closed-loop from model data to immersive image output by loading a three-dimensional twin model into a browser graphics rendering engine and generating images based on the user pose information and spatial positioning of a WebXR running instance. This mechanism effectively integrates the three-dimensional model rendering and XR device output processes, enabling the image content to match the user interaction behavior and the current perspective state in real time, greatly enhancing the coherence of visual perception and the sense of spatial immersion. Compared with the traditional static rendering method, this solution has significant advantages such as short response time, strong frame synchronization, and accurate rendering of the picture, which can significantly improve the XR visualization experience in high-speed changing scenarios. Especially in scenarios with extremely high requirements for image update efficiency, such as traffic simulation, emergency response, and remote dispatching, this mechanism can ensure that users always obtain visual feedback highly matching the actual interaction state, improving the overall interaction quality and perception credibility of the system. In addition, the rendering engine has strong compatibility with XR display devices and supports automatic adaptation of multi-terminal resolutions and refresh rates, further enhancing the scalability and usability of the system under multi-platform deployment.

[0042] Embodiment: To verify the feasibility of the present invention, the present invention is applied to the intelligent highway platform in City G, an intelligent transportation pilot city in a coastal province in southern China. This platform covers a total of 186 kilometers of highway sections within the city's jurisdiction and is responsible for round-the-clock traffic monitoring, early warning response, and dispatching and command. The traffic information center in City G has long been troubled by problems such as low efficiency in processing multi-source traffic data, slow response in three-dimensional model interaction, and unstable release of updated resources, seriously restricting the actual operation and maintenance ability of the city's intelligent transportation system.

[0043] To solve these problems, City G decides to introduce the WebXR-based digital twin extension method of the present invention to build a highly adaptable, low-latency, and strongly real-time Web-based traffic digital twin system, realizing an XR immersive visualization command system under heterogeneous data fusion, three-dimensional dynamic modeling, cross-platform interaction, and hot update support.

[0044] In the initial stage of system implementation, first, information such as road boundaries, bridge contours, toll station locations, and tunnel layouts is extracted from the highway structure information database in City G, and modeling is carried out through a static structure model generation module. At the same time, traffic status data from road monitoring cameras, ETC devices, and mobile terminals are accessed, and vehicle flow, running speed, and abnormal events are uniformly managed as dynamic objects. Environmental data provided by air quality monitoring stations and meteorological sensors, such as PM2.5 concentration, wind speed and direction, visibility, etc., are set as time series variables by the system.

[0045] The system uses a three - segment prefix of "C -", "D -", and "T -" to uniquely encode the above - mentioned three types of model components, and writes them into the twin model attribute fields to ensure the rapid identification and classification response of model components in Web - end formatting processing and event mapping binding. After formatting, the system encapsulates the static construct into the glTF format, the dynamic object into the JSON format, and the time - series variable into the binary format, and generates a unified encapsulation list structure to be mounted to the Web - resolvable data index directory.

[0046] After the user logs in to the system through the WebXR terminal, the browser will start the XR running instance. The system automatically calls the XR device capability interface and identifies that the current terminal is an Oculus Quest 2, with 6 - degree - of - freedom tracking and 120Hz refresh support. In the terminal capability adaptation rule table, the system automatically matches the spatial positioning parameters, the upper limit of image resolution, and the synchronization refresh strategy, and sets the XR view rendering parameters and event parsing paths.

[0047] During the running stage, the system real - time collects the user's spatial position, head posture, and gesture inputs, generates a time - series input event stream, and aligns the system time. Subsequently, the input event stream is compared with the field - level structure in the event mapping rules to determine whether the current operation matches the established trigger conditions, and an interaction control instruction is generated according to the response action field. For example, if the user gazes at the location of a high - speed accident for more than 3 seconds, the system will automatically focus the view to that location and pop up an accident information card on the virtual console.

[0048] The system also supports a dynamic resource update mechanism. During an emergency drill, the traffic management center needs to replace the road control script and the accident simulation model. It only needs to issue a resource update instruction from the server, and the system can locate the module to be updated based on the resource identifier and hot - load the update package. After the update is completed, the system automatically reconstructs the corresponding model components in the browser rendering engine and synchronizes them to the XR display device to ensure that the operation is not interrupted and the information is updated in real - time.

[0049] In the first quarter after the deployment of the system of the present invention (from December 2024 to February 2025), the operating efficiency of the intelligent high - speed platform in City G has been significantly improved. The specific data is shown in Table 1 below: Table 1: Comparison Table of the Deployment Effects of the WebXR Digital Twin System of the Intelligent High - Speed Platform in City G ; As can be seen from the above table, after the system of the present invention is deployed, the intelligent high-speed platform in City G has achieved significant improvements in multiple key performance indicators. In terms of model loading time, the average loading duration of the system has been compressed from nearly 20 seconds to less than 4 seconds, effectively enhancing the rapid perception ability of operation and maintenance personnel for traffic situations in case of emergencies. For example, in the early morning of January 6, 2025, due to sudden thick fog in the mountainous section, the visibility dropped sharply. The system pushed real-time weather data and traffic flow status through the server, and successfully completed the foggy visual effect replacement of 4 bridge models in only about 3.5 seconds. The rendering results were stably output to the XR terminal, assisting the monitoring center to make a timely decision to close the road.

[0050] In terms of user interaction response time, in the past, the system often had an interaction delay of more than 800 milliseconds due to the long event rule parsing path, seriously affecting the operation coherence. However, the present invention reduces the average response time to less than 80 milliseconds by introducing the optimized configuration of the event mapping rule sub-structure and the input tracking parameter set. In an interaction test, the operation and maintenance personnel clicked on a certain traffic node through gestures to view the congestion details, and the XR device completed the data loading and image switching with only a two-frame delay, ensuring the fluency and immediacy of the immersive experience.

[0051] The model resource update ability has also been greatly enhanced. The system supports independent incremental hot updates of structural resources, behavioral logics, and script codes, avoiding the high cost and risks of the overall replacement update of the original system. On the eve of the Spring Festival return peak in 2025, the traffic information center in City G adjusted the traffic organization in the "North Ring Interchange" area, involving the structural reconstruction of 5 sections, the modification of 2 types of rule logics, and the real-time script refresh. All the changed contents were pushed to the front end at 3:00 am through a single incremental package deployment. The system completed all replacement operations without interrupting the service. The operation and maintenance personnel received the updated images and interaction functions in the XR device in the first time, ensuring the smooth progress of the dispatching during the festival.

[0052] In addition, the rendering accuracy adaptation rate has been increased from the original 72.3% to 96.5%, which means that most XR terminals can obtain a display effect highly consistent with the user's real perspective under different operating systems and graphics processing capabilities. The system introduces dynamic field of view adjustment and interpolation smoothing technology. When the user moves quickly or switches the perspective, the XR camera node can automatically adjust the perspective matrix to prevent problems such as screen stretching and jitter. For example, in a traffic accident replay simulation on January 12, a traffic engineer continuously switched six camera points in the XR environment for virtual inspections, and the system did not experience any frame drops or image distortions, showing excellent display performance.

[0053] The perspective switching interruption rate is reduced to less than 1%. Thanks to the system introducing the difference algorithm and smooth calculation of the rotation matrix when generating the perspective transformation path, and adopting an asynchronous update strategy to buffer and pre-read frame images during the process. During the traffic field drill, when the manager focuses on a certain section in the VR environment and quickly turns to the adjacent section, the system can smoothly transition the visual path and pre-load the next perspective resource in advance, thus avoiding problems such as frame freezing or loading failure, and greatly enhancing the continuity of the visual experience.

[0054] In summary, through the field deployment verification of the high-speed traffic platform in City G, it shows that the WebXR-based digital twin extension method of the present invention demonstrates excellent performance in aspects such as 3D modeling flexibility, real-time interaction response ability, system update mechanism, and view rendering consistency. It is particularly suitable for high-demand application scenarios such as traffic dispatching, accident deduction, and remote supervision, and has extremely high engineering practical value and promotion potential.

[0055] The above is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.

Claims

1. A digital twin extension method based on WebXR in a highway scenario, characterized in that It includes the following steps: S1. Generate a corresponding three-dimensional twin model based on the obtained highway scene structure information, traffic status information, and environmental monitoring data; S2. Perform formatting processing on the three-dimensional twin model and convert it into a Web-parsable data structure suitable for the Web-side operating environment; S3. Start a WebXR session on the browser side, construct a WebXR running instance that can recognize the Web-parsable data structure, and call the XR device capability query interface provided by the browser operating environment to load input tracking parameters and display configuration parameters matching the terminal type; S4. Based on the XR device input data received by the WebXR running instance, collect the user's spatial positioning information, head pose information, and control input information, and encapsulate them into an input event stream in time series; S5. Parse the spatial positioning information, head pose information, and control input information in the input event stream, and map them into interaction control instructions for the three-dimensional twin model according to predefined event response rules; S6. During the operation of the WebXR running instance, according to the update instructions from the server, load the corresponding resource files and perform incremental replacement on the three-dimensional twin model; S7. Load the updated three-dimensional twin model into the browser graphics rendering engine. The browser graphics rendering engine generates the current frame image based on the user's head pose information and spatial positioning information in the WebXR running instance, and outputs the current frame image to the XR display device.

2. The digital twin extension method based on WebXR in a highway scenario according to claim 1, wherein The specific content of S1 includes: S11. Extract road boundaries, building outlines, and ancillary facilities from the highway scene structure information and set them as static constructs; S12. Identify data objects with position and status change attributes according to the traffic status information and set them as dynamic objects; S13. Extract data items with time series characteristics from the environmental monitoring data and set them as time series variables; S14. Classify and code the static constructs, dynamic objects, and time series variables respectively according to the preset prefixes "C-", "D-", and "T-" to form unique identifiers for the three-dimensional twin model components with type identifiers; S15. Write the unique identifier of the three-dimensional twin model component as component type information into the attribute fields of each component in the three-dimensional twin model to represent the category to which the three-dimensional twin model component belongs; S16. The category to which the three-dimensional twin model component belongs is used to automatically identify different component categories during the Web-side formatting process and participate in the binding of event response rules and the generation of interaction control instructions as a type basis.

3. The digital twin extension method based on WebXR in the highway scenario according to claim 1, characterized in that The specific content of S2 includes: S21. During the formatting process of the three-dimensional twin model, construct a Web-parsable data structure and embed an event mapping rule sub-structure in the Web-parsable data structure. The event mapping rule sub-structure is used to describe the binding relationship between user input and system response; S22. The event mapping rule sub-structure is a JSON format data object with a field hierarchy structure and is stored in the interaction definition field in the Web-parsable data structure; S23. The event mapping rule sub-structure includes: Event identification field, used to identify a unique event number; Trigger condition field, used to set the input state required for the response event to take effect; Response action field, used to specify the specific operations to be performed by the system after the event is triggered; State transition field, used to represent the target state identifier that the system needs to enter after the event execution is completed; S24. After the WebXR running instance loads the Web-parsable data structure, parse the fields of the event mapping rule sub-structure, extract the binding relationship, and establish an event trigger mapping table.

4. The digital twin extension method based on WebXR in the highway scenario according to claim 1, wherein The Web-parsable data structure constructed in S2 includes, in terms of encapsulation structure and format organization: In the process of formatting the three-dimensional twin model, according to the category to which the components of the three-dimensional twin model belong and the uses of the data in the highway scene structure information, traffic state information, and environmental monitoring data, encapsulate static constructs, dynamic objects, and time-series variables into different structural formats respectively. The encapsulation includes: encapsulating static constructs into the glTF format, encapsulating dynamic objects into the JSON format, and encapsulating time-series variables into a custom binary format; In the above encapsulation process, set an encapsulation type identification field in each component encapsulation unit, used to characterize the category to which the three-dimensional twin model component belongs, the encapsulation format type, and the parsable data indicator; All component encapsulation units are uniformly mounted in the index directory of the Web-parsable data structure to form an encapsulation list structure that can be retrieved by type and dynamically parsed; When the WebXR running instance is loaded, call the corresponding decoder according to the encapsulation list structure, use the glTF data for graphics rendering, use the JSON format components for event trigger recognition and state control, and use the binary data for system variable update and simulation synchronization processing.

5. The method for digital twin extension based on WebXR in the highway scenario according to claim 1, wherein The specific content of S3 includes: S31. Call the XR device capability query interface in the browser environment to obtain the feature information of the current XR terminal. The feature information of the current XR terminal includes the terminal type identifier, input interface protocol type, spatial tracking ability index, and display output support parameters; S32. Search for the corresponding entry in the preset terminal capability adaptation rule table according to the feature information of the current XR terminal. The terminal capability adaptation rule table uses the terminal type identifier as the index primary key and associates the corresponding input tracking parameter set and display configuration parameter set; S33. The input tracking parameter set includes: the number of spatial degrees of freedom, input event types, attitude data refresh frequency, and multi-source input synchronization strategy; S34. The display configuration parameter set includes: the maximum supported resolution, the upper limit of the refresh frame rate, the field of view angle parameter, and the device rendering delay threshold; S35. After matching the target entry, the WebXR running instance sets the interactive input processing rules according to the input tracking parameter set. The interactive input processing rules include the input event parsing format, the state update period, and the synchronization control strategy, and set the XR view rendering parameters according to the display configuration parameter set, including the frame update rate, the image resolution, and the display output angle; S36. The interactive input processing rules are used to establish a mapping relationship between the XR device input and the control instruction generation logic; S37. The XR view rendering parameter setting is used to construct the basic display configuration of the WebXR view output, including setting the viewpoint synchronization logic, perspective projection range and refresh rhythm control.

6. The method for extending digital twins based on WebXR in a highway scenario according to claim 1, wherein, The S4 specifically includes: S41, after the WebXR running instance receives the user's spatial positioning information, head posture information, and control input information from the XR device, it encapsulates it into an input event stream in the order of input collection time; S42: The input event stream is composed of multiple input event units, each of which includes the following fields: The timestamp field is used to identify the time when the input data was collected; The device identification field is used to indicate the XR terminal from which the input data comes; The spatial positioning field is used to record the three-dimensional position coordinate value; The posture information field is used to represent the head orientation data; Control operation field, used to indicate input trigger type and parameter value; S43, performing time alignment processing on the input event stream according to the system unified time reference during the encapsulation process; S44. The encapsulated input event stream can be accessed and parsed by the event parsing mechanism in the WebXR running instance that is the same as the event mapping rule substructure.

7. The method for digital twin extension based on WebXR in a highway scenario according to claim 1, wherein The S5 specifically includes: S51, the WebXR running instance parses the input event unit in the input event stream, and extracts the spatial positioning field, the posture information field, and the control operation field; S52, comparing the extracted information with the event identification field in the event mapping rule substructure, and preliminarily determining the event response rule entry to be verified; S53, deeply combining the current interaction state parameters of the WebXR running instance as auxiliary conditions for judging the applicability of the event rule, wherein the interaction state parameters include the user's current position, the user's viewing angle state, and the most recent triggering event information; S54, comparing the trigger condition fields of each event response rule entry to be verified one by one, comprehensively judging whether the event type, interaction state and input timing matching requirements are met, and determining the event response rule entry that meets the conditions; S55. Constructing an interactive control instruction according to the response action field in the selected predefined event response rule, wherein the interactive control instruction includes: a type identifier of the target component, an interactive action type, and required execution parameters.

8. The method for digital twin extension based on WebXR in the highway scenario according to claim 7, wherein, The interactive control instruction includes a control field for the user's viewing angle state and has the following viewing angle change mechanism: When the type of the interactive control instruction is a perspective change instruction, extracting a target perspective control field from the perspective change instruction, wherein the perspective change instruction includes a target focus position coordinate, a rotation angle value, and a field of view width setting parameter; Calculate the difference between the target view control field and the current user view state of the WebXR running instance, and construct a view transition vector and a rotation transformation matrix to implement a transition path from the current view state to the target state; In the process of constructing the perspective transformation path, an interpolation algorithm is applied to smooth the user's viewpoint movement process; Apply the perspective transformation path to the virtual camera node in the WebXR running instance, and update the three-dimensional scene view in real time by updating the camera's viewing direction, position coordinates, and projection parameters; After the perspective update is completed, the WebXR running instance adjusts the subsequent control strategy according to the current user interaction feedback, and records the perspective switching behavior in the interaction event log for behavior chain tracking and immersive control rhythm scheduling.

9. The method for digital twin extension based on WebXR in a highway scenario according to claim 1, wherein The specific steps of S6 are as follows: S61. After the WebXR running instance receives the update instruction from the server, it parses the resource identifier field and the resource type field in the update instruction. S62. The resource identifier field is used to uniquely identify the resource module to be replaced in the Web-parsable data structure, and the resource type field includes structural resource type, behavioral resource type, and script resource type. S63. The WebXR running instance locates the resource module to be replaced according to the resource identifier field, and loads the corresponding updated resource package content according to the resource type field. The updated resource package content is module-level incremental data, which only includes structural difference data, behavioral logic change information, and script function update code segments. S64. During the resource replacement process, the WebXR running instance replaces the resources based on the incremental update mechanism, retains the current running state, and embeds it into the original running path by mounting the updated resource package to achieve dynamic coverage of the three-dimensional twin model and control logic. S65. The incremental update mechanism supports independent replacement of the following three types of resource units: Structural resource unit, used to update the model component structure and spatial layout. Behavioral resource unit, used to update the event mapping rule and control reaction path. Script resource unit, used to update the front-end logic function, rendering scheduling strategy, and input behavior processing code. S66. After the incremental update is completed, the WebXR running instance updates the resource index directory, and synchronizes the updated corresponding resource module to the event parsing mechanism and the interactive control instruction generation logic path.

10. The method for extending digital twin based on WebXR in the highway scenario according to claim 9, wherein, The reference path corresponding to the resource identifier field of each resource module in the Web-parsable data structure includes a two-level structure of a main path and a backup path, and has the following path scheduling mechanism: The WebXR running instance maintains a resource reference path for each resource identifier field in the resource index directory. The resource reference path includes main path and backup path information. The main path is the default priority loading path, and the backup path is used for resource fault-tolerant loading after the main path loading fails. The resource reference path supports a dynamic redefinition mechanism. The WebXR running instance determines whether to switch to the backup path according to the loading state feedback condition. The state feedback condition includes main path loading timeout, main path resource integrity verification failure, main path associated resource package parsing error, or verification exception. During the path redefinition process, the WebXR running instance updates the path priority flag field in the resource index directory, sets the backup path as the current main path, and records the switching reason and status information. After the resource reference path redefinition is completed, continue to load the updated resource package content pointed to by the updated path, and execute the incremental replacement process. The path switching mechanism supports a resource hot loading method that does not interrupt the system running state.

Citation Information

Patent Citations

  • Digital twin road network automatic generation method, system and device for XR equipment

    CN117036651A

  • Task-driven geodigital twinning scene enhancement visualization method and system

    CN117237574A

  • Digital twin cross-platform interactive system integrating driving simulation-simulation-VR

    CN117311187A

  • XR service interaction method and system based on digital twinning

    CN118708095A

  • Methods, systems, kits and apparatuses for monitoring and managing industrial settings in an industrial internet of things data collection environment

    US20200225655A1

Cited By

  • Intelligent operation and maintenance method and system for rail transit communication machine room based on digital twinning

    CN121389527A

  • Rail transit machine room intelligent operation and maintenance method and system based on digital twinning

    CN121389527B

  • Low-code digital twin platform development method based on anchor point mechanism

    CN121979515A

  • Green port energy digital management platform based on digital twinning

    CN122243302A