A dual-mode rendering digital twin application development system and method based on a unified API
By using a unified API abstraction layer and adapter architecture, a single codebase can support both client-side and server-side rendering, solving the problems of high development and maintenance costs and poor deployment flexibility. This provides a seamless switching experience and scene consistency, while reducing the requirements for the technology stack.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DIGITAL HAIL TECH
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to support both client-side and server-side rendering within the same digital twin application, resulting in high development and maintenance costs, poor deployment flexibility, fragmented user experience during switching processes, and stringent technology stack requirements.
A dual-mode rendering digital twin application development system based on a unified API is adopted. The unified API abstraction layer provides JavaScript API interfaces that are independent of the rendering mode. Combined with client-side and server-side rendering adapters, a single codebase supports two rendering modes, and seamless switching is achieved through a state management interface.
Significantly reduce development costs, enhance deployment flexibility, provide a seamless switching experience, lower technical barriers, and ensure scenario consistency and business continuity.
Smart Images

Figure CN122431792A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin and 3D rendering technology, and in particular to a development system and method for digital twin applications based on a unified API dual-mode rendering. Background Technology
[0002] Digital twin technology, by constructing a real-time mapping of the physical world into digital space, is widely used in smart cities, industrial internet, smart parks, property management, and other fields. The core of digital twin applications is the rendering and presentation of 3D scenes. Depending on the location of the rendering computation, it mainly falls into two technical routes: (1) Client-Side Rendering Client-side rendering refers to the rendering and computation of 3D scenes directly using the GPU of a client device (such as a PC browser, mobile phone, or tablet). WebGL, as a browser-side 3D rendering standard, is one of the mainstream technologies for client-side rendering; in native application scenarios, technologies such as OpenGLES and Vulkan can also be used.
[0003] The key features of client-side rendering are: rendering computations are completed on the client side, and the server only needs to provide lightweight scene data services, which can significantly reduce server bandwidth and computing power costs; it can support high-concurrency access; however, the rendering quality is limited by the performance of the terminal device. Typical application scenarios include routine operation and maintenance systems, mobile applications, and mass-market display platforms.
[0004] (2) Server-Side Rendering Server-side rendering refers to performing 3D rendering calculations on cloud or edge servers (usually equipped with high-performance GPUs), encoding the rendering results into audio and video streams, and pushing them to the client via real-time communication protocols (such as WebRTC). The client only needs to decode and display the streams. Typical implementations include cloud rendering and pixel streaming.
[0005] The key features of server-side rendering are: it can overcome the limitations of terminal hardware performance to deliver cinematic-quality images; it supports accessing high-quality scenes on lightweight terminals (such as mobile phones, tablets, and low-spec PCs); however, it requires high server computing power and network bandwidth, and its concurrency capabilities are limited by server resources. Typical application scenarios include high-precision simulation demonstrations, design reviews, high-quality mobile applications, and enterprise-level applications requiring centralized rendering management.
[0006] The current dilemma: In practical business applications, the same digital twin application often needs to adapt to different terminal types and business scenarios simultaneously. For example, a smart park project may need to support both client-side rendering and server-side rendering. However, existing technologies cannot meet both requirements with a single codebase.
[0007] The most similar implementation: Prior to this invention, the industry typically employed a separate development approach for client-side and server-side rendering. Developers used two completely different sets of development tools and technology stacks for client-side and server-side rendering: client-side rendering applications were developed using WebGL frameworks such as Three.js and Babylon.js, rendering the 3D scene directly in the browser; server-side rendering applications were developed using game engines such as Unreal Engine and Unity, pushing the rendered image to the front end via pixel streaming technology. In this approach, the client-side and server-side rendering applications were two completely independent projects, maintaining their own codebases, resource files, and business logic. Developers had to determine which mode to use before compilation, and once selected, it could not be changed.
[0008] Disadvantages of existing technology (1) Fragmented development architecture leads to high development and maintenance costs: In the existing technology, client-side rendering application and server-side rendering application exist as two independent engineering entities. The same business function needs to be implemented and tested separately in two modes, doubling the development workload; when requirements change, two sets of code need to be modified simultaneously, and maintenance costs increase exponentially; the team needs to be familiar with two technology stacks at the same time, making personnel training difficult.
[0009] (2) The rendering mode is statically bound to the code, resulting in poor deployment flexibility: In the existing technology, the rendering mode is selected at compile time or before the application starts. Once selected, it is statically bound to the code. If the business needs to adapt to new terminal types or image quality requirements in the later stage, it must be re-developed, which cannot be smoothly evolved, and the enterprise's technology investment is difficult to be protected in the long term.
[0010] (3) Stateless synchronization mechanism, resulting in a fragmented experience during the switching process: Existing technologies do not have any modules for saving and restoring state, and different rendering engine instances cannot share or pass state. Even if mode switching is achieved through other means, the scene will be reset to the initial state after the switch, and all previous user operations will be lost, resulting in a very poor experience.
[0011] (4) High technical requirements and difficult team building: Client-side rendering relies on the WebGL front-end technology stack (JavaScript / Three.js, etc.), while server-side rendering relies on the UE / Unity engine and pixel streaming technology stack (C++ / Blueprint, etc.). The two technology stacks are completely different, and enterprises need to equip themselves with two types of technical personnel at the same time, resulting in high costs for talent recruitment and training. Summary of the Invention
[0012] To address the shortcomings of the existing technologies, this invention provides a dual-mode rendering digital twin application development system and method based on a unified API, aiming to achieve the following objectives: reduce development and maintenance costs, enabling developers to support two rendering modes simultaneously by writing only one set of business code; improve deployment flexibility, allowing applications to flexibly select rendering modes without modifying the code; achieve a seamless switching experience, automatically saving and restoring the scene state when switching modes; and lower the technical threshold, enabling developers to complete development by only mastering JavaScript front-end development skills.
[0013] To achieve the above objectives, this invention provides a digital twin application development system based on a unified API dual-mode rendering, comprising: A unified API abstraction layer is used to provide JavaScript API interfaces that are independent of rendering modes. These API interfaces encapsulate the underlying technical differences between client-side rendering and server-side rendering. The dual-mode adapter includes a client-side rendering adapter and a server-side rendering adapter, which respectively implement the interfaces defined by the unified API abstraction layer to convert API calls into requests to the corresponding backend services. The backend service layer includes a client-side rendering scene service and a server-side rendering scene service. The client-side rendering scene service is used to provide the scene resources required for client-side rendering, and the server-side rendering scene service is used to provide the rendering capabilities required for server-side rendering. Developers write a set of business code by calling the unified API abstraction layer. During application initialization, they configure a specified rendering mode, and the system automatically loads the corresponding adapter, enabling a single set of code to support both client-side and server-side rendering modes.
[0014] Optionally, the API interfaces provided by the unified API abstraction layer include at least one of the following: scene loading interface, camera control interface, object operation interface, event listening interface, business data association interface, state management interface, layer drawing interface, and model control interface.
[0015] Optionally, the client-side rendering adapter includes: The WebGL rendering engine encapsulation module is used to call the local WebGL rendering engine to draw 3D images. The resource loading module is used to request the model files and texture resources of the 3D scene from the client rendering scene service; The local event handling module is used to capture user interaction events and convert them into a unified API event format.
[0016] Optionally, the server-side rendering adapter includes: The stream connection management module is used to establish a WebRTC connection with the server-side rendering scene service; The video decoding module is used to decode the video stream received from the server-side rendering scene service and play it on the client. The instruction forwarding module is used to encode unified API calls into instruction streams and send them to the server-side rendering scene service. The event encoding module is used to convert user interaction events into semantic instructions and send them to the server-side rendering scene service through the data channel.
[0017] Optionally, the client-side rendering scene service and the server-side rendering scene service share the same set of scene data sources, which include 3D model files, texture resources, and scene configuration files.
[0018] Optionally, the unified API abstraction layer also provides a state management interface, which includes a state saving interface and a state restoration interface. This interface is used to save the key states of the current scene when switching rendering modes and restore the key states in the new mode, thereby achieving seamless switching of rendering modes. The key states include camera view, selected object, loaded business data, and scene visibility.
[0019] Optionally, the unified API abstraction layer also provides a visualization layer drawing interface, which includes at least one of the following: landmark layer interface, path layer interface, region layer interface, heat map layer interface, bubble chart layer interface, trajectory map layer interface, relationship diagram layer interface, 3D bar chart layer interface, raster map layer interface, and aggregation layer interface.
[0020] Optionally, the unified API abstraction layer also provides a model control interface, which includes at least one of the following: a model addition interface, a model transformation interface, a model joint control interface, and a model animation playback interface.
[0021] This invention also provides a method for developing digital twin applications based on a unified API dual-mode rendering system. The development method includes: Provides a rendering-mode-independent JavaScript API interface through a unified API abstraction layer; Based on the rendering mode configured during application initialization, load the corresponding client-side rendering adapter or server-side rendering adapter. When the unified API abstraction layer receives an API call, it routes the API call to the currently loaded adapter; The adapter translates the API call into a request to the corresponding backend service and obtains the rendering result.
[0022] Optionally, when the configured rendering mode is client-side rendering mode, the method further includes: The client rendering adapter requests the model files and texture resources of the 3D scene from the client rendering scene service; The local WebGL rendering engine is used to draw 3D images on the Canvas; Capture user interaction events and convert them into a unified API event format for callback to the business layer; The server-side rendering adapter establishes a WebRTC connection with the server-side rendering scene service; The unified API call is encoded into a command stream and sent to the server-side rendering scene service; Receive and decode the video stream pushed by the server-side rendering scene service for playback; User interaction events are converted into semantic instructions and sent to the server-side rendering scene service via a data channel; Upon receiving a rendering mode switching instruction, the key state of the current scene is saved through the state saving interface of the unified API abstraction layer; Load the adapter corresponding to the target rendering mode and initialize the target rendering environment; The key state is restored in the target rendering environment through the state restoration interface of the unified API abstraction layer, thereby achieving seamless switching of rendering modes.
[0023] Compared with the prior art, the present invention has the following advantages: One set of code, dual-mode operation, significantly reducing development costs: Through a unified API abstraction layer and dual-mode adapter architecture, developers only need to write one set of business code and call JavaScript APIs that are independent of the rendering mode to generate digital twin applications that support both client-side and server-side rendering, reducing development costs by more than 50%.
[0024] Configurable mode, flexible deployment, and protection of enterprise technology investment: The same set of application code does not need any modification. The rendering mode can be flexibly selected only through URL parameters or configuration files. Enterprises can first use the client rendering mode to go online, and then smoothly switch to the server rendering mode without rewriting the application.
[0025] State synchronization and seamless switching maintain business continuity: Through the state management interface provided by the unified API abstraction layer, the key states of the current scene are automatically saved when switching rendering modes, and accurately restored in the new mode, so as to achieve a seamless transition experience for users.
[0026] By shielding the differences in underlying technologies, the development threshold is lowered: developers only need to master JavaScript front-end development skills to complete the development of digital twin applications, without having to delve into the underlying technologies of WebGL or UE streaming rendering, which greatly reduces the cost of personnel recruitment and training.
[0027] Rich visualization layers and model control interfaces, powerful functions: The unified API abstraction layer provides drawing interfaces for various data layers such as landmarks, paths, heatmaps, bubble charts, trajectory diagrams, and relationship diagrams, as well as model operation interfaces such as adding models, transforming them, controlling joints, and playing animations. Business data can be visualized by passing JSON data.
[0028] Backend services are deployed independently with a unified data source to ensure scene consistency: The client-side rendering scene service and the server-side rendering scene service are deployed independently, but share the same set of scene data sources to ensure complete consistency of scene content under different rendering modes and avoid data synchronization issues. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is an architectural block diagram of a dual-mode rendering digital twin application development system based on a unified API, provided as an embodiment of the present invention. Detailed Implementation
[0031] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0032] The terms "comprising" and "having," and any variations thereof, in the specification, embodiments, claims, and drawings of this invention are intended to cover non-exclusive inclusion, such as including a series of steps or units.
[0033] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0034] (I) System Overall Architecture like Figure 1 As shown, the present invention provides a dual-mode rendering digital twin application development system based on a unified API, which adopts a layered architecture design, including from bottom to top: backend service layer, dual-mode adapter layer, unified API abstraction layer, and application development layer.
[0035] Figure 1 illustrate: Figure 1 This is a diagram illustrating the overall architecture of the system of this invention. The diagram shows a four-layer structure: the bottom layer is the backend service layer, containing client-side rendering scene services and server-side rendering scene services; the second layer is the dual-mode adapter layer, containing client-side rendering adapters and server-side rendering adapters; the third layer is the unified API abstraction layer, providing JavaScript API interfaces independent of rendering modes; and the top layer is the application development layer, i.e., the business code written by developers. The layers interact with each other through standardized interfaces.
[0036] (ii) Unified API Abstraction Layer The unified API abstraction layer is one of the core modules of this invention. It provides JavaScript API interfaces independent of rendering modes, encapsulating the underlying technical differences between client-side and server-side rendering. This layer exposes a unified development interface, including but not limited to: Scene management interfaces: loadScene(sceneId) is used to load a 3D scene, and unloadScene() is used to unload a scene; Camera control interface: setCamera(position, target) is used to set the camera position and viewpoint, and getCamera() is used to get the current camera parameters; Object manipulation interfaces: selectObject(objectId) is used to select an object in the scene, and highlightObject(objectId) is used to highlight an object; Event listener interface: on(eventType, callback) is used to listen for scene interaction events (such as click, hover), and off(eventType) is used to cancel listening; Business data association interface: setData(objectId, data) is used to associate business data of an object, and getData(objectId) is used to retrieve the business data of an object; State management interfaces: saveState() is used to save a snapshot of the scene state, and restoreState(state) is used to restore the scene state; Layer drawing interface: addLandmarkLayer(data) is used to add a landmark layer, and addPath(data) is used to add a path layer; Model control interface: addModel(data) is used to add a model, and setModelTransform(data) is used to control the transformation of the model.
[0037] The technical implementation of this abstraction layer is as follows: a set of standard interface specifications are defined, and these interfaces are implemented by the lower-level adapters. Application developers only need to call these interfaces and do not need to care whether the underlying rendering is client-side or server-side.
[0038] (III) Dual-mode adapter The dual-mode adapter comprises two concrete implementations: a client-side rendering adapter and a server-side rendering adapter. These two adapters respectively implement all the interfaces defined by the unified API abstraction layer, translating API calls into requests to specific backend services.
[0039] 1. Client-side rendering adapter The client-side rendering adapter includes the following submodules: WebGL rendering engine encapsulation module: used to call the local WebGL rendering engine to draw 3D images and present 3D scenes on the Canvas; Resource loading module: Used to request model files, texture resources and scene configuration files of the 3D scene from the client rendering scene service; Local event handling module: Used to capture user interaction events (such as mouse clicks, drags, and hovers) and convert them into a unified API event format to be called back to the business layer.
[0040] When the application runs in client-side rendering mode, it loads the client-side rendering adapter during initialization. This adapter translates unified API calls (such as loadScene()) into HTTP / WebSocket requests to the client-side rendering scene service to obtain scene description files and 3D model resources; then it calls the local WebGL rendering engine to draw the 3D image on the Canvas; after user interaction events are captured by the browser, the adapter converts them into a unified API event format and sends them back to the application's business layer.
[0041] The data flow is as follows: API call → adapter resolution → request backend resources → local rendering → event postback.
[0042] 2. Server-side rendering adapter The server-side rendering adapter includes sub-modules: Stream Connection Management Module: Used to establish WebRTC connections with server-side rendering scene services and manage the lifecycle of the connections; Video decoding module: Used to decode the video stream received from the server-side rendering scene service and to decode the video stream specified on the client side. <video>Play in a container; Command forwarding module: used to encode unified API calls (such as setCamera(), selectObject()) into command streams and send them to the server-side rendering scene service through the data channel; Event Encoding Module: Used to convert user interaction events (mouse clicks, drags, etc.) into semantic instructions that can be recognized by the cloud, and send them to the server-side rendering scene service through the data channel.
[0043] When an application runs in server-side rendering mode, it loads the server-side rendering adapter during initialization. This adapter establishes a WebRTC connection with the server-side rendering scene service, encodes unified API calls into a command stream, and sends it to the cloud. After rendering is performed on the cloud, the video stream is pushed back to the client. The adapter is responsible for decoding the video stream and executing it within the specified parameters. <video>Playback within the container; after user interaction events are captured, the adapter converts screen coordinates into semantic instructions in the cloud scene and sends them to the server-side rendering scene service via the data channel.
[0044] The data flow is as follows: API call → adapter encoding → sending cloud commands → receiving video stream → decoding and display → event feedback.
[0045] 3. Cooperative operation of dual-mode adapters The dual-mode adapter design of this invention completely decouples the business logic code written by developers from the underlying rendering engine. Developers only need to specify the rendering mode during application initialization via URL parameters (such as ?mode=client or ?mode=server) or a local configuration file, and the system automatically loads the corresponding adapter. Thereafter, all API calls are routed from the unified API abstraction layer to the currently active adapter, which then handles the interaction with the backend services.
[0046] The technical advantages of this architecture are: a single codebase can run in both client-side and server-side rendering modes simultaneously; applications can flexibly choose the rendering mode according to deployment requirements without modifying the code; and developers only need to master JavaScript front-end development skills, without needing to delve into the underlying technologies of WebGL or UE streaming rendering.
[0047] (iv) Backend service layer The backend service layer includes two independent service systems that share the same set of scene data sources (3D model files, texture resources, and scene configuration files) to ensure the consistency of scene content under different rendering modes.
[0048] 1. Client-side rendering scene service This service provides the scene resources required for client rendering. Its functions include: storing and managing 3D scene model files, texture resources, and scene configuration files; and providing a RESTful API for client rendering adapters to access resources. This service can be deployed using a CDN for acceleration and supports high-concurrency access.
[0049] 2. Server-side rendering scene service This service provides the rendering capabilities required for server-side rendering. Its functions include: running cloud rendering instances (based on the UE engine), receiving client commands, executing rendering, and pushing video streams; supporting WebRTC connections and providing a bidirectional data channel. This service can be deployed on GPU server clusters and supports elastic scaling.
[0050] (v) State synchronization and seamless switching mechanism To enable seamless switching of rendering modes, the unified API abstraction layer provides state management interfaces, including the state saving interface saveState() and the state restoration interface restoreState(state).
[0051] When a rendering mode switching instruction is received, the system executes the following process: The saveState() interface is used to save the key states of the current scene, including the camera view, selected object, loaded business data, and scene visibility. Load the adapter corresponding to the target rendering mode and initialize the target rendering environment; The critical state is restored in the target rendering environment using the restoreState(state) interface, restoring the scene to its state before the switch.
[0052] This mechanism ensures that the application's critical state can be fully saved and accurately restored when switching rendering modes, achieving a seamless transition experience for users and maintaining the continuity of business operations.
[0053] (vi) Visualization Layers and Model Control Interface To meet the diverse business needs of digital twin applications, the unified API abstraction layer also provides rich visualization layer drawing interfaces and model control interfaces.
[0054] The visualization layer drawing interfaces include, but are not limited to: landmark layer interface, path layer interface, region layer interface, heat map layer interface, bubble chart layer interface, trajectory map layer interface, relationship graph layer interface, 3D bar chart layer interface, raster map layer interface, and aggregation layer interface. Developers can visualize business data in digital twin scenarios by passing simple JSON data parameters.
[0055] The model control interfaces include: a model addition interface, a model transformation interface (position, rotation, scaling), a model joint control interface, and a model animation playback interface. These interfaces support fine-grained control of 3D models, meeting the interaction needs of various complex business scenarios.
[0056] (vii) Workflow Example The following describes the workflow of this invention using the development of a digital twin application for a smart park as an example: Development phase: Developers write business logic code and call interfaces provided by the unified API abstraction layer, such as loading scenes, setting cameras, and adding landmark layers. Developers do not need to worry about the underlying rendering mode.
[0057] Configuration phase: During application initialization, the rendering mode is specified via URL parameters. For example, when high-quality display is required, set mode=server; when high-concurrency access is required, set mode=client.
[0058] Runtime phase: If configured for client-side rendering mode, the system loads the client-side rendering adapter. The adapter requests scene resources from the client-side rendering scene service and calls the WebGL rendering engine to draw the 3D image on the Canvas.
[0059] If configured for server-side rendering mode, the system loads the server-side rendering adapter. The adapter establishes a WebRTC connection with the server-side rendering scene service, encodes API calls into instructions and sends them to the cloud, and receives and decodes the video stream for playback.
[0060] Switching phase: When it is necessary to switch rendering modes (such as switching from client-side rendering to server-side rendering), the system calls saveState() to save the current scene state, loads the target adapter, and calls restoreState() to restore the state, achieving a seamless switching.
[0061] (viii) Summary of Inter-module Interactions The unified API abstraction layer is the core abstraction of the system, providing upper-layer applications with a unified programming model that is independent of rendering modes.
[0062] The dual-mode adapter is a key implementation layer of the system, which transforms unified API calls into requests to specific backend services, thereby decoupling business logic from the underlying rendering engine.
[0063] The backend service layer provides the resources and services required for rendering. The client-side rendering scene service and the server-side rendering scene service are deployed independently but share the data source to ensure scene consistency.
[0064] The state management interface supports seamless switching of rendering modes, ensuring the continuity of business operations.
[0065] A rich set of visual layers and model control interfaces meet diverse business needs.
[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.< / video> < / video>
Claims
1. A digital twin application development system based on a unified API and dual-mode rendering, characterized in that, include: A unified API abstraction layer is used to provide JavaScript API interfaces that are independent of rendering modes. These API interfaces encapsulate the underlying technical differences between client-side rendering and server-side rendering. The dual-mode adapter includes a client-side rendering adapter and a server-side rendering adapter, which respectively implement the interfaces defined by the unified API abstraction layer to convert API calls into requests to the corresponding backend services. The backend service layer includes a client-side rendering scene service and a server-side rendering scene service. The client-side rendering scene service is used to provide the scene resources required for client-side rendering, and the server-side rendering scene service is used to provide the rendering capabilities required for server-side rendering. Developers write a set of business code by calling the unified API abstraction layer. During application initialization, they configure a specified rendering mode, and the system automatically loads the corresponding adapter, enabling a single set of code to support both client-side and server-side rendering modes.
2. The digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The API interfaces provided by the unified API abstraction layer include at least one of the following: scene loading interface, camera control interface, object operation interface, event listening interface, business data association interface, state management interface, layer drawing interface, and model control interface.
3. The digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The client-side rendering adapter includes: The WebGL rendering engine encapsulation module is used to call the local WebGL rendering engine to draw 3D images. The resource loading module is used to request the model files and texture resources of the 3D scene from the client rendering scene service; The local event handling module is used to capture user interaction events and convert them into a unified API event format.
4. The digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The server-side rendering adapter includes: The stream connection management module is used to establish a WebRTC connection with the server-side rendering scene service; The video decoding module is used to decode the video stream received from the server-side rendering scene service and play it on the client. The instruction forwarding module is used to encode unified API calls into instruction streams and send them to the server-side rendering scene service. The event encoding module is used to convert user interaction events into semantic instructions and send them to the server-side rendering scene service through the data channel.
5. A digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The client-side rendering scene service and the server-side rendering scene service share the same set of scene data sources, which include 3D model files, texture resources, and scene configuration files.
6. The digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The unified API abstraction layer also provides a state management interface, which includes a state saving interface and a state restoration interface. These interfaces are used to save the key states of the current scene when switching rendering modes and restore the key states in the new mode, thereby achieving seamless switching of rendering modes. The key states include camera view, selected object, loaded business data, and scene visibility.
7. A digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The unified API abstraction layer also provides visualization layer drawing interfaces, which include at least one of the following: landmark layer interface, path layer interface, region layer interface, heat map layer interface, bubble chart layer interface, trajectory map layer interface, relationship diagram layer interface, 3D bar chart layer interface, raster map layer interface, and aggregation layer interface.
8. A digital twin application development system based on a unified API dual-mode rendering according to claim 1, characterized in that, The unified API abstraction layer also provides a model control interface, which includes at least one of the following: a model addition interface, a model transformation interface, a model joint control interface, and a model animation playback interface.
9. A method for developing digital twin applications based on a unified API dual-mode rendering, applied to the digital twin application development system based on a unified API dual-mode rendering as described in any one of claims 1-8, characterized in that, The development method includes: Provides a rendering-mode-independent JavaScript API interface through a unified API abstraction layer; Based on the rendering mode configured during application initialization, load the corresponding client-side rendering adapter or server-side rendering adapter. When the unified API abstraction layer receives an API call, it routes the API call to the currently loaded adapter; The adapter translates the API call into a request to the corresponding backend service and obtains the rendering result.
10. A method for developing digital twin applications based on a unified API dual-mode rendering according to claim 9, characterized in that, When the configured rendering mode is client-side rendering mode, the method further includes: The client rendering adapter requests the model files and texture resources of the 3D scene from the client rendering scene service; The local WebGL rendering engine is used to draw 3D images on the Canvas; Capture user interaction events and convert them into a unified API event format for callback to the business layer; The server-side rendering adapter establishes a WebRTC connection with the server-side rendering scene service; The unified API call is encoded into a command stream and sent to the server-side rendering scene service; Receive and decode the video stream pushed by the server-side rendering scene service for playback; User interaction events are converted into semantic instructions and sent to the server-side rendering scene service via a data channel; Upon receiving a rendering mode switching instruction, the key state of the current scene is saved through the state saving interface of the unified API abstraction layer; Load the adapter corresponding to the target rendering mode and initialize the target rendering environment; The key state is restored in the target rendering environment through the state restoration interface of the unified API abstraction layer, thereby achieving seamless switching of rendering modes.