Method for simulating and monitoring traffic in smart city based on digital twinborn technology

Through Unity3D technology, LOD and occlusion culling technology, three-dimensional scene rendering is optimized, combined with UX design and programming interaction, the problems of poor rendering effect and high access costs in smart city traffic simulation are solved, and more efficient three-dimensional visualization and multi-platform adaptation are achieved. The compatibility improves operation and maintenance efficiency and safety.

CN118898684APending Publication Date: 2024-11-05BEIJING LIANPING TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410928949.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The existing digital twin projects have poor rendering effect in smart city traffic simulation, low adjustment efficiency, and do not support multi-end access, resulting in high costs.

Method used

Using Unity3D technology to establish a three-dimensional scene, optimize the rendering performance through LOD and occlusion culling technology, and develop Unity-Web communication structure to realize the embedded integration of the overall business content and Web pages, combining UX design, 3D modeling, special effects production and programming interaction, Improve rendering effect and multi-platform adaptability.

Benefits of technology

It realizes better three-dimensional visual display, improves subway operation and maintenance efficiency and security, provides cross-platform flexibility and customized development capabilities, and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898684A_ABST
    Figure CN118898684A_ABST
Patent Text Reader

Abstract

The invention discloses a smart city traffic simulation and monitoring method based on a digital twin technology, and the method specifically comprises the following steps: 1, building a model, rendering a three-dimensional scene, optimizing the rendering performance of the three-dimensional scene through LOD and shielding elimination technologies, and synchronously configuring equipment and scene information; 2, a main body interaction interface and a Unity-Web communication structure are developed, the overall service content is completed, and an embedded integrated Web page is published; 3, performing internal measurement and modification; 4, deploying a publishing platform for a user to use; real-time visualization: visual display can be realized only through tedious data processing and model conversion in the traditional technology, while the Unity 3D technology can convert data into a visual and visible graph in real time, and provides a more visual observation and understanding mode; multi-platform adaptation: the traditional technology is generally developed for specific platforms and operating systems, so that the systems cannot run on other platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of 3D digital twins, and specifically relates to a method for simulating and monitoring traffic in a smart city based on digital twin technology. Background Art

[0002] Some digital twin projects in the industry use Js to develop WebGL 3D scenes. Because the 3D library of Js is still not perfect, the rendering effect of the project is relatively poor. During the scene construction process, the efficiency of adjusting the effect is relatively low.

[0003] UE is often used for 3D scene rendering effects, but UE does not support WebGL and cannot achieve true multi-terminal access. To achieve multi-terminal access, cloud rendering can only be used for multi-terminal, which is too costly. Summary of the invention

[0004] The purpose of the present invention is to provide a method for simulating and monitoring traffic in a smart city based on digital twin technology, which can be used to better monitor and manage the operation status of trains. Compared with traditional 2D visualization, it has better performance. Through three-dimensional visualization, subway operation and maintenance personnel can better grasp the operation status of the subway, discover problems in time and respond quickly, further improve the efficiency and safety of subway operation and maintenance, and make full use of digital twin and virtual reality technology, which is the key to subway operation and maintenance management in the new era, so as to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for simulating and monitoring traffic in a smart city based on digital twin technology, specifically comprising the following steps:

[0006] Step 1: Build a model and render a 3D scene. At the same time, optimize the 3D scene rendering performance through LOD and occlusion culling technology, and simultaneously configure the device and scene information;

[0007] Step 2: Develop the subject interaction interface and Unity-Web communication structure, complete the overall business content, and publish the embedded integrated web page;

[0008] Step 3: Conduct internal testing and modification;

[0009] Step 4: Release the platform deployment for user use.

[0010] Preferably, in step 1, the steps of establishing the model are as follows:

[0011] a. UX design

[0012] The UI art designer designs the interactive interface of the entire application system based on the product interactive prototype, and based on the review, the UI designer improves and optimizes it based on the modified documents; then the images are cut according to the set resolution and format, and the images are uploaded to Blue Lake and synchronized to the developers. The developers download the images and import them into Unity, and modify the import settings; the relevant UI interfaces are built and restored on the Unity side based on the renderings and images provided by the artist;

[0013] b.3D Modeling

[0014] 3D modelers model three-dimensional models and application scenarios using data collected on-site and existing information; determine rendering pipelines with the Unity end; perform 1:1 scale modeling and rendering of the entire logistics park through the 3D modeling engine; notify relevant personnel for review, export the optimized models into .FBX format scene models and building model files, along with exported textures, materials, and animations; import the exported .fbx files into Unity and modify the import format as needed; Unity developers use editor tools to adjust and optimize art resources.

[0015] Preferably, the step 1 also includes the design of an application system, which is as follows:

[0016] a. Scene construction

[0017] After importing the scene model file into Unity, check whether the texture is complete and modify the scene model file as needed; save the modified scene model file as a prefab for subsequent use;

[0018] b. Interface construction

[0019] Refer to the renderings provided by the UI, and use the cutouts provided by the artist to build the 2D interface of the entire system; the restoration degree must reach more than 95%; save each built interface panel as a prefab for subsequent development logic use;

[0020] c. Special effects production

[0021] After completing the scene production and interface construction, some special effects are made through particle effects and shaders; added to the scene to make the scene visually polymorphic and rich; the made special effects files are saved separately as prefabs to make subsequent modifications more convenient;

[0022] d. Animation production

[0023] Through the resource content provided by the artist, add the application running import transition animation; manage the UI through 2D animation; use the dotween plug-in to design the relevant animation effects of the 2D interface; such as gradient display and hiding; use interpolation motion to slowly switch the virtual camera.

[0024] Preferably, in the step 2, it also includes implementing programming interaction, which is as follows:

[0025] In Unity, you can use programming languages ​​such as C#, Lua, and JS to write application logic and functions. Developers can use the API provided by Unity to implement various functions in the application, such as character control, collision detection, animation effects, etc. In addition, Unity also supports the use of plug-ins. Developers can choose appropriate plug-ins to expand the functions of the application as needed. This solution can be divided into three interactive modules;

[0026] a.Scene module

[0027] Add an empty scene, design and add key elements such as virtual camera perspective, component models, special effects, and animations. Add necessary collision detection events to the model. Use the mouse to perform basic interactive operations on the component model, such as zooming in, zooming out, and rotating. Add animations to move around the center point and add necessary scanning effects. The specific effects can be displayed by changing the shader field. After the scene is built, adjust the rendering queue parameters, handle dynamic batching of rendering, and reduce unnecessary rendering overhead.

[0028] b.UI module

[0029] Through event monitoring, the required pop-up panel information is hidden in each module. The data required by the UI panel needs to be obtained from the relevant interface request, and a communication mechanism between UIs is established to avoid the problem of low efficiency of back-and-forth calls;

[0030] c. Network interface module

[0031] According to the provided background interface documents, the relevant interfaces are connected. All data comes from the backend interface. This step is the core stage of the overall development and is also the most time-consuming part. The connection uses the Postman interface tool to test whether the interface returns normally. Then, in the project, write requests for Get, Post and other interfaces, and register the response event of the request timeout. The obtained data is sent and presented to the relevant 2D interface for display. The data required by Unity is passed to Unity through the interface. Although Unity can also request the interface separately to obtain data, the purpose of this implementation is to reduce the workload, and obtain the data through a separate request connection and then send it down;

[0032] d.Web front-end development

[0033] The web front-end developer uses the Vue framework to develop the entire system. The developer writes CSS to restore the styles of each interface based on the UI effects, designs according to the effects output by the artists, reserves space for the presentation of the Unity content when laying out the overall interface, integrates the Unity build web package into the front-end system, calls the Unity wake-up interface, connects the web part with the Unity interface that needs to be clicked for interaction, and ensures that the relevant interfaces jump normally. The relevant logs are viewed through the debug tool.

[0034] e.Web and Unity Interaction

[0035] Compile the interaction logic and define the interface according to the requirement document, which is mainly divided into Unity internal interaction and Unity and Web interaction. Use JS to encapsulate and define related interfaces, output as .jslib files, import them into Unity and put them in the Plugins folder directory, and write a public class to encapsulate C# calling JS interface and JS calling back C# interface. The parameter definition format is Json string.

[0036] Preferably, the internal interaction content of Unity mainly includes: animation control, motion effect control, interface UI event response, table reading, scene loading, Http interface request, resource management, and the interaction between Unity and Web mainly includes: component content and scene switching.

[0037] Preferably, in step three, the tester will conduct a comprehensive functional test and performance test on the application, submit the relevant issues to ZenTao and assign them to a specific person in charge, who will verify, recycle and close the issue ticket after modification to ensure the stability and smoothness of the application; at the same time, the developer will optimize the application performance to improve the running frame rate and loading speed of the application; Unity provides a series of tools and functions, such as profiler and frame debugger, to help developers test and optimize applications.

[0038] Preferably, in step 4, in Unity, select the application to publish to different platforms.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] (1) Real-time visualization: Traditional technologies usually require tedious data processing and model conversion to achieve visualization, while Unity3D technology can convert data into intuitive and visual graphics in real time, providing a more intuitive way of observation and understanding;

[0041] (2) Multi-platform adaptation: Traditional technologies are usually developed for specific platforms and operating systems, which results in the system being unable to run on other platforms; however, Unity3D technology is cross-platform and can run on a variety of devices, improving the applicability and flexibility of the digital twin system;

[0042] (3) Flexible and customizable: Traditional technologies often require a lot of coding and development work and are not easy to customize and expand. However, Unity3D technology provides intuitive and friendly development tools and interfaces, making customized development of the system easier. Developers can customize development according to their needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is the principle diagram of the present invention;

[0044] Figure 2 A flow chart for the development of the present invention;

[0045] Figure 3 It is an interaction diagram of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] See also Figures 1 to 3 The present invention provides a technical solution: a method for simulating and monitoring traffic in a smart city based on digital twin technology, which specifically includes the following steps:

[0048] Step 1: Build a model and render a 3D scene. At the same time, optimize the 3D scene rendering performance through LOD and occlusion culling technology, and simultaneously configure the device and scene information;

[0049] Step 2: Develop the subject interaction interface and Unity-Web communication structure, complete the overall business content, and publish the embedded integrated web page;

[0050] Step 3: Conduct internal testing and modification;

[0051] Step 4: Release the platform deployment for user use.

[0052] In this embodiment, preferably, in step 1, the steps of establishing the model are as follows:

[0053] a. UX design

[0054] The UI art designer designs the interactive interface of the entire application system based on the product interactive prototype, and based on the review, the UI designer improves and optimizes it based on the modified documents; then the images are cut according to the set resolution and format, and the images are uploaded to Blue Lake and synchronized to the developers. The developers download the images and import them into Unity, and modify the import settings; the relevant UI interfaces are built and restored on the Unity side based on the renderings and images provided by the artist;

[0055] b.3D Modeling

[0056] 3D modelers model three-dimensional models and application scenarios using data collected on-site and existing information; determine rendering pipelines with the Unity end; perform 1:1 scale modeling and rendering of the entire logistics park through the 3D modeling engine; notify relevant personnel for review, export the optimized models into .FBX format scene models and building model files, along with exported textures, materials, and animations; import the exported .fbx files into Unity and modify the import format as needed; Unity developers use editor tools to adjust and optimize art resources.

[0057] In this embodiment, preferably, step 1 also includes the design of an application system, which is as follows:

[0058] a. Scene construction

[0059] After importing the scene model file into Unity, check whether the texture is complete and modify the scene model file as needed; save the modified scene model file as a prefab for subsequent use;

[0060] b. Interface construction

[0061] Refer to the renderings provided by the UI, and use the cutouts provided by the artist to build the 2D interface of the entire system; the restoration degree must reach more than 95%; save each built interface panel as a prefab for subsequent development logic use;

[0062] c. Special effects production

[0063] After completing the scene production and interface construction, some special effects are made through particle effects and shaders; added to the scene to make the scene visually polymorphic and rich; the made special effects files are saved separately as prefabs to make subsequent modifications more convenient;

[0064] d. Animation production

[0065] Through the resource content provided by the artist, add the application running import transition animation; manage the UI through 2D animation; use the dotween plug-in to design the relevant animation effects of the 2D interface; such as gradient display and hiding; use interpolation motion to slowly switch the virtual camera.

[0066] In this embodiment, preferably, in step 2, it also includes implementing programming interaction, which is as follows:

[0067] In Unity, you can use programming languages ​​such as C#, Lua, and JS to write application logic and functions. Developers can use the API provided by Unity to implement various functions in the application, such as character control, collision detection, animation effects, etc. In addition, Unity also supports the use of plug-ins. Developers can choose appropriate plug-ins to expand the functions of the application as needed. This solution can be divided into three interactive modules;

[0068] a.Scene module

[0069] Add an empty scene, design and add key elements such as virtual camera perspective, component models, special effects, and animations. Add necessary collision detection events to the model. Use the mouse to perform basic interactive operations on the component model, such as zooming in, zooming out, and rotating. Add animations to move around the center point and add necessary scanning effects. The specific effects can be displayed by changing the shader field. After the scene is built, adjust the rendering queue parameters, handle dynamic batching of rendering, and reduce unnecessary rendering overhead.

[0070] b.UI module

[0071] Through event monitoring, the required pop-up panel information is hidden in each module. The data required by the UI panel needs to be obtained from the relevant interface request, and a communication mechanism between UIs is established to avoid the problem of low efficiency of back-and-forth calls;

[0072] c. Network interface module

[0073] According to the provided background interface documents, the relevant interfaces are connected. All data comes from the backend interface. This step is the core stage of the overall development and is also the most time-consuming part. The connection uses the Postman interface tool to test whether the interface returns normally. Then, in the project, write requests for Get, Post and other interfaces, and register the response event of the request timeout. The obtained data is sent and presented to the relevant 2D interface for display. The data required by Unity is passed to Unity through the interface. Although Unity can also request the interface separately to obtain data, the purpose of this implementation is to reduce the workload, and obtain the data through a separate request connection and then send it down;

[0074] d.Web front-end development

[0075] Web front-end developers use the vue framework to develop the entire system. The progressive JS framework is mature, stable, and high-performance. The core library of vue only focuses on the view layer. It is not only easy to use, but also easy to integrate with third-party libraries or existing projects (here it refers to the output unity package). When used in combination with a modern tool chain and various supporting libraries, vue is also fully capable of providing drivers for complex single-page applications. Developers refer to the UI effects to write CSS to restore the styles of each interface, design according to the effects output by the artists, and reserve space for the presentation of unity content when laying out the overall interface. The web package of unitybuild is integrated into the front-end system, the interface for waking up unity is called, and the interface that needs to be clicked and interacted with by the web part and unity is connected. The relevant interface jumps normally, and the relevant logs are viewed through the debug tool;

[0076] e.Web and Unity Interaction

[0077] Compile the interaction logic and define the interface according to the requirement document, which is mainly divided into Unity internal interaction and Unity and Web interaction. Use JS to encapsulate and define related interfaces, output as .jslib files, import them into Unity and put them in the Plugins folder directory, and write a public class to encapsulate C# calling JS interface and JS calling back C# interface. The parameter definition format is Json string.

[0078] In this embodiment, preferably, the internal interaction content of Unity mainly includes: animation control, motion effect control, interface UI event response, table reading, scene loading, Http interface request, resource management, and the interaction between Unity and Web mainly includes: component content and scene switching.

[0079] In this embodiment, preferably, in step three, the tester will conduct a comprehensive functional test and performance test on the application, submit the relevant issues to ZenTao and assign them to a specific person in charge, who will verify, recycle and close the issue ticket after modification to ensure the stability and smoothness of the application; at the same time, the developer optimizes the application performance to improve the running frame rate and loading speed of the application; Unity provides a series of tools and functions, such as profiler and frame debugger, to help developers test and optimize applications.

[0080] In this embodiment, preferably, in step 4, in Unity, select the application to be published to different platforms, such as PC, mobile terminal, Web and other platforms. This solution needs to publish the application package of the WebGL platform, modify some parameters of the built package and send it to the web front-end developer. The web front-end is integrated and embedded into the existing web page. After the integration is completed, the entire application package is sent to the project leader, who communicates and deploys it online.

[0081] Although embodiments of the present invention have been shown and described (see the above detailed description for details), it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for simulating and monitoring traffic in a smart city based on digital twin technology, characterized in that: The specific steps include: Step 1: Build a model and render a 3D scene. At the same time, optimize the 3D scene rendering performance through LOD and occlusion culling technology, and simultaneously configure the device and scene information; Step 2: Develop the subject interaction interface and Unity-Web communication structure, complete the overall business content, and publish the embedded integrated web page; Step 3: Conduct internal testing and modification; Step 4: Release the platform deployment for user use.

2. According to claim 1, a method for simulating and monitoring traffic in a smart city based on digital twin technology is characterized by: In step 1, the steps of establishing the model are as follows: a. UX design The UI art designer designs the interactive interface of the entire application system based on the product interactive prototype, and based on the review, the UI designer improves and optimizes it based on the modified documents; then the images are cut according to the set resolution and format, and the images are uploaded to Blue Lake and synchronized to the developers. The developers download the images and import them into Unity, and modify the import settings; the relevant UI interfaces are built and restored on the Unity side based on the renderings and images provided by the artist; b.3D Modeling 3D modelers model three-dimensional models and application scenarios using data collected on-site and existing information; determine rendering pipelines with the Unity end; perform 1:1 scale modeling and rendering of the entire logistics park through the 3D modeling engine; notify relevant personnel for review, export the optimized models into .FBX format scene models and building model files, along with exported textures, materials, and animations; import the exported .fbx files into Unity and modify the import format as needed; Unity developers use editor tools to adjust and optimize art resources.

3. The method for simulating and monitoring traffic in a smart city based on digital twin technology according to claim 1, characterized in that: The step 1 also includes the design of the application system, which is as follows: a. Scene construction After importing the scene model file into Unity, check whether the texture is complete and modify the scene model file as needed; save the modified scene model file as a prefab for subsequent use; b. Interface construction Refer to the renderings provided by the UI, and use the cutouts provided by the artist to build the 2D interface of the entire system; the restoration degree must reach more than 95%; save each built interface panel as a prefab for subsequent development logic use; c. Special effects production After completing the scene production and interface construction, some special effects are made through particle effects and shaders; added to the scene to make the scene visually polymorphic and rich; the made special effects files are saved separately as prefabs to make subsequent modifications more convenient; d. Animation production Through the resource content provided by the artist, add the application running import transition animation; manage the UI through 2D animation; use the dotween plug-in to design the relevant animation effects of the 2D interface; use the interpolation motion method to slowly switch the virtual camera.

4. The method for simulating and monitoring traffic in a smart city based on digital twin technology according to claim 1 is characterized in that: In the step 2, programming interaction is also implemented, as follows: a.Scene module Add an empty scene, design and add key elements such as virtual camera perspective, component models, special effects, and animations, add necessary collision detection events to the model, and perform basic interactive operations on the component models through mouse operations. It is necessary to add animations to move around the center point and add necessary scanning effects. After the scene is built, adjust the rendering queue parameters, handle dynamic batching of rendering, and reduce unnecessary rendering overhead. b.UI module Through event monitoring, the required pop-up panel information is hidden in each module. The data required by the UI panel needs to be obtained from the relevant interface request, and a communication mechanism between UIs is established to avoid the problem of low efficiency of back-and-forth calls; c. Network interface module Connect to the relevant interface according to the provided background interface document. Use the Postman interface tool to test whether the interface returns normally. Then write requests for Get, Post and other interfaces in the project, and register the response event of request timeout. The obtained data is sent and presented to the relevant 2D interface. The data required by Unity is passed to Unity through the interface. Although Unity can also request the interface separately to obtain data; d.Web front-end development The web front-end developer uses the Vue framework to develop the entire system. The developer writes CSS to restore the styles of each interface based on the UI effects, designs according to the effects output by the artists, reserves space for the presentation of the Unity content when laying out the overall interface, integrates the Unity build web package into the front-end system, calls the Unity wake-up interface, connects the web part with the Unity interface that needs to be clicked for interaction, and ensures that the relevant interfaces jump normally. The relevant logs are viewed through the debug tool. e.Web and Unity Interaction Compile the interaction logic and define the interface according to the requirement document, which is mainly divided into Unity internal interaction and Unity and Web interaction. Use JS to encapsulate and define related interfaces, output as .jslib files, import them into Unity and put them in the Plugins folder directory, and write a public class to encapsulate C# calling JS interface and JS calling back C# interface. The parameter definition format is Json string.

5. The method for simulating and monitoring traffic in a smart city based on digital twin technology according to claim 4 is characterized in that: The Unity internal interaction content mainly includes: animation control, motion effect control, interface UI event response, table reading, scene loading, Http interface request, resource management, and the Unity and Web interaction mainly includes: component content and scene switching.

6. The method for simulating and monitoring traffic in a smart city based on digital twin technology according to claim 1, characterized in that: In step three, the tester will conduct a comprehensive functional test and performance test on the application, submit the relevant issues to ZenTao and assign them to specific persons in charge. After the person in charge makes modifications, he / she will verify, recycle and close the issue ticket. At the same time, the developer will optimize the application performance to improve the application's running frame rate and loading speed.

7. The method for simulating and monitoring traffic in a smart city based on digital twin technology according to claim 1, characterized in that: In step 4, in Unity, select the application to publish to different platforms.

Citation Information

Cited By

  • Visual arrangement system and method for urban rail cloud simulation test resources

    CN119583347A