CN114513520A - Web 3D visualization technology based on synchronous rendering of client and server - Google Patents

Web 3D visualization technology based on synchronous rendering of client and server Download PDF

Info

Publication number
CN114513520A
CN114513520A CN202111616474.5A CN202111616474A CN114513520A CN 114513520 A CN114513520 A CN 114513520A CN 202111616474 A CN202111616474 A CN 202111616474A CN 114513520 A CN114513520 A CN 114513520A
Authority
CN
China
Prior art keywords
data
rendering
loading
screen
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111616474.5A
Other languages
Chinese (zh)
Other versions
CN114513520B (en
Inventor
廖明
叶冬梅
俞凯杰
谭道刚
魏鹏
王凯迪
滕润婕
王宇帆
姚强
李昕
金加棋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Zhongce Spacetime Technology Co ltd
Original Assignee
Zhejiang Toprs Geographic Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Toprs Geographic Information Technology Co ltd filed Critical Zhejiang Toprs Geographic Information Technology Co ltd
Priority to CN202111616474.5A priority Critical patent/CN114513520B/en
Publication of CN114513520A publication Critical patent/CN114513520A/en
Application granted granted Critical
Publication of CN114513520B publication Critical patent/CN114513520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a Web three-dimensional visualization technology based on synchronous rendering of a client and a server; rendering of the rear-end server and rendering of the browser end are carried out synchronously, rendering and loading time is reduced by preprocessing three-dimensional geographic data, the front-end browser improves the first screen performance of the system in modes of rendering of first screen skeleton information, static file loading, lazy loading of second screen information and the like, the current three-dimensional system loading white screen problem is avoided, better use experience is brought to a user, meanwhile, the complexity of the front end is not too large, and meanwhile, system data safety can be guaranteed by using WebRTC peer-to-peer transmission.

Description

基于客户端和服务器同步渲染的Web三维可视化技术Web 3D visualization technology based on synchronous rendering of client and server

技术领域technical field

本发明涉及三维可视化技术领域,特别是涉及基于客户端和服务器同步渲染的Web三维可视化技术。The invention relates to the technical field of three-dimensional visualization, in particular to a Web three-dimensional visualization technology based on synchronous rendering of a client and a server.

背景技术Background technique

早期的网站开发整个系统是由服务器来渲染的,服务器直接生产渲染好对应的HTML页面,返回给客户端进行展示,通常是PHP或JSP。这里以JSP为例。服务器经过解析存放在服务器端的模板文件来加载完成,在这种情况下,浏览器只进行了HTML的解析,java代码的作用是从数据库中读取数据,并且将它动态的放在页面中。随着前端Ajax的出现,有了前后端分离的开发模式,后端只提供API来返回数据,前端通过Ajax获取数据,并且可以通过js渲染到页面中,这种方式最大的优点就是前后端责任清晰,后端专注于数据,前端专注于交互和可视化,并且当移动端(IOS/Android)出现后,后端不需要进行任何处理,依然使用之前的一套API即可。In the early days of website development, the entire system was rendered by the server. The server directly produced and rendered the corresponding HTML page and returned it to the client for display, usually PHP or JSP. Here is an example of JSP. The server is loaded by parsing the template file stored on the server side. In this case, the browser only parses the HTML, and the role of the java code is to read the data from the database and dynamically place it on the page. With the emergence of front-end Ajax, with the development mode of front-end and back-end separation, the back-end only provides API to return data, the front-end obtains data through Ajax, and can be rendered into the page through js. The biggest advantage of this method is that the front-end and back-end are responsible for Clear, the back-end focuses on data, the front-end focuses on interaction and visualization, and when the mobile terminal (IOS/Android) appears, the back-end does not need to do any processing, and the previous set of APIs can still be used.

近些年来,三维可视化技术飞速发展,使得应用需要达到更好的渲染效果,出现了同构渲染的开发模式,服务端去渲染,客户端来负责交互。服务端先通过服务端渲染,生成HTML 以及初始化数据,客户端拿到代码和初始化数据后,通过对HTML 的DOM进行patch和事件绑定对DOM进行客户端激活(client-side hydration),这个整体的过程叫同构渲染。WebGL是一种3D绘图标准,这种绘图技术标准把JavaScript和OpenGL ES 2.0结合在一起,通过增加OpenGL ES 2.0的一个JavaScript绑定,WebGL可以给HTML Canvas提供硬件三维渲染功能,应用可以借助系统显卡在浏览器里面加载三维场景和模型,还能创建复杂的导航和数据视觉化。然而服务器渲染一种情况整个页面的模块由后端人员来编写和维护;另一种情况是前端人员如果要开发页面,需要通关PHP和Java等语言来编写页面代码,而且通常情况下HTML代码和数据以及对应的逻辑会混在一起,编写和维护都非常麻烦。而且传统Web三维地理信息系统使用WebGL技术作为渲染技术,它的主要局限在于显示效果完全依赖于客户端浏览器的功能以及终端本身的硬件性能;图像质量则取决于浏览器的显示能力;数据必须下载到客户端中才能体验,并且暴露了原始素材数据。同时浏览器端渲染常使用的 SPA 会把所有 JS 整体打包,无法忽视的问题就是文件太大,导致渲染前等待很长时间。特别是网速差的时候,让用户等待白屏结束并非一个很好的体验。In recent years, with the rapid development of 3D visualization technology, applications need to achieve better rendering effects, and a development model of isomorphic rendering has emerged, where the server renders and the client is responsible for interaction. The server first renders through the server, generates HTML and initializes data, and after the client gets the code and initialization data, it activates the DOM by patching and event binding on the HTML DOM (client-side hydration). The process is called isomorphic rendering. WebGL is a 3D drawing standard. This drawing technology standard combines JavaScript and OpenGL ES 2.0. By adding a JavaScript binding of OpenGL ES 2.0, WebGL can provide hardware 3D rendering to HTML Canvas, and applications can use the system graphics card. Load 3D scenes and models in the browser, and create complex navigation and data visualizations. However, in one case, when the server renders the entire page, the module of the entire page is written and maintained by the back-end personnel; in the other case, if the front-end personnel want to develop the page, they need to pass languages such as PHP and Java to write the page code, and usually HTML code and Data and corresponding logic will be mixed together, which is very troublesome to write and maintain. Moreover, the traditional Web 3D geographic information system uses WebGL technology as the rendering technology, its main limitation is that the display effect completely depends on the function of the client browser and the hardware performance of the terminal itself; the image quality depends on the display ability of the browser; the data must be Download to the client to experience, and expose the original material data. At the same time, the SPA commonly used in browser-side rendering will package all JS as a whole. The problem that cannot be ignored is that the file is too large, which leads to a long wait before rendering. Especially when the network speed is poor, it is not a good experience for users to wait for the end of the white screen.

例如,一种在中国专利文献上公开的“一种点云数据三维可视化渲染方法与计算方法”,其公告号CN111127610A,具体包括以下步骤:S1、首先不排除其它数据,通过转换手段,生成具有标准化定义格式的点云数据,本发明涉及点云数据三维可视化技术领域。该点云数据三维可视化渲染方法与计算方法,通过在数据归一化与分类处理后,进行点云渲染,通过顶点渲染、基于三维网格的映射渲染、基于三角剖分算法的网格重构渲染、点云运动动画和点云粒子动画,实现了点云数据的多种渲染算法,这些算法的渲染方式不同,效果也不一样,具有不同的应用方向,方法之间可互相补充,操作更加可靠,通过高效的算法,实现点云数据的快速渲染,让耗时十几分钟的渲染,降低至几分钟或者几十秒。然而算法的运行需要后台的支撑,在网络较差的情况下针对三维可视化的全渲染会导致数据加载复杂,从而影响画面渲染的速度,仍然无法解决传统渲染当中存在的局限性。For example, a "three-dimensional visualization rendering method and calculation method for point cloud data" disclosed in Chinese patent documents, its bulletin number CN111127610A, specifically includes the following steps: S1. First, without excluding other data, through conversion means, generate Standardized point cloud data in a defined format relates to the technical field of three-dimensional visualization of point cloud data. The three-dimensional visualization rendering method and calculation method of point cloud data, through the point cloud rendering after data normalization and classification processing, through vertex rendering, three-dimensional mesh-based mapping rendering, and triangulation algorithm-based mesh reconstruction Rendering, point cloud motion animation, and point cloud particle animation realize a variety of rendering algorithms for point cloud data. These algorithms have different rendering methods, different effects, and different application directions. The methods can complement each other and operate more efficiently. Reliable, through efficient algorithms, the rapid rendering of point cloud data is realized, which reduces the rendering time of more than ten minutes to several minutes or tens of seconds. However, the operation of the algorithm requires the support of the background. In the case of a poor network, full rendering for 3D visualization will lead to complicated data loading, which will affect the speed of screen rendering, and still cannot solve the limitations of traditional rendering.

发明内容SUMMARY OF THE INVENTION

本发明主要针对现有技术下服务器渲染和浏览器端渲染存在差异造成页面抖动、内存溢出、渲染首屏时间长的问题;提供了基于客户端和服务器同步渲染的Web三维可视化技术;后端服务器渲染和浏览器端渲染同步进行,通过对三维地理数据进行预处理减少渲染加载时间,前端浏览器通过首屏骨架信息渲染、静态文件加载和次屏信息懒加载等方式提高系统首屏性能,避免当前三维系统加载白屏问题,给用户更好的使用体验,同时使得前端的复杂度不过于太大。The invention mainly aims at the problems of page jitter, memory overflow and long rendering time for the first screen due to the difference between server rendering and browser rendering in the prior art; it provides a Web three-dimensional visualization technology based on synchronous rendering of the client and the server; the back-end server Rendering and browser-side rendering are performed synchronously. The rendering and loading time is reduced by preprocessing 3D geographic data. The front-end browser improves the performance of the first screen of the system by rendering the first screen skeleton information, loading static files, and lazy loading of the second screen information, avoiding the need for The current 3D system loading white screen problem gives users a better user experience, and at the same time makes the front-end complexity not too large.

本发明的上述技术问题主要是通过下述技术方案得以解决的:The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions:

一种基于客户端和服务器同步渲染的Web三维可视化技术,所述Web三维可视化技术包括如下步骤:A Web 3D visualization technology based on synchronous rendering of a client and a server, the Web 3D visualization technology comprises the following steps:

步骤S1、后端服务器将三维地理数据进行模型轻量化、场景细粒度化、渐进式加载预处理;模型轻量化将模型拆分为模型单元,减小冗余;场景细粒度化解析建筑物的楼层分布情况及楼层间的连通关系,并控制漫游过程中场景数据的渐近式传输和加载;渐进式加载优先处理基本数据,并根据视点位置增加模型精度;预处理后基于WebRTC将三维数据对等传输到客户端;Step S1, the back-end server performs model lightweighting, fine-grained scene, and progressive loading preprocessing on the 3D geographic data; the model lightweighting divides the model into model units to reduce redundancy; fine-grained analysis of the scene of the building is performed. Floor distribution and connectivity between floors, and control the asymptotic transmission and loading of scene data during roaming; progressive loading prioritizes basic data, and increases model accuracy according to viewpoint positions; Wait for transmission to the client;

步骤S2、客户端将用户数据和首屏数据通过EJS浏览器端渲染,即将相关参数写入EJS模板中,通过Node.js解析向浏览器返回已经渲染好的HTML文档;客户端渲染包括首屏骨架信息渲染、静态文件加载和图片加载;Step S2, the client renders the user data and the first screen data through the EJS browser, that is, writes the relevant parameters into the EJS template, and returns the rendered HTML document to the browser through Node.js parsing; the client rendering includes the first screen Skeleton information rendering, static file loading and image loading;

步骤S3、在次屏中按照DIV分层,每层单独做为数据接口异步加载,在页面初始化时,每个DIV层仅保留最外层的DIV标签;Step S3, layering according to the DIV in the secondary screen, each layer is asynchronously loaded as a data interface, and when the page is initialized, each DIV layer only retains the outermost DIV label;

步骤S4、当用户进行交互后,浏览器做独立判断,数据重新渲染。Step S4, after the user interacts, the browser makes an independent judgment and the data is re-rendered.

优化三维数据的加载与渲染,多次降低加载量,通过根据视点位置增加相应的增量网络来实时调整该模型的精度,提升系统首屏性能,避免当前三维系统加载白屏问题,给用户更好的使用体验;基于WebRTC的对等传输可以显著提升三维数据的传输速度,且用户不用安装专用渲染插件,用户在较低硬件配置和带宽的条件下也能流畅加载系统。Optimize the loading and rendering of 3D data, reduce the loading amount many times, adjust the accuracy of the model in real time by adding the corresponding incremental network according to the viewpoint position, improve the performance of the first screen of the system, avoid the white screen loading problem of the current 3D system, and give users more Good user experience; the peer-to-peer transmission based on WebRTC can significantly improve the transmission speed of 3D data, and users do not need to install special rendering plug-ins, and users can load the system smoothly under the condition of lower hardware configuration and bandwidth.

作为优选,步骤S1中所述模型轻量化预处理过程如下:Preferably, the model lightweight preprocessing process described in step S1 is as follows:

步骤A1、三维模型往往存在着可重用的单元,它们只是方向和空间位置不一样,所以可以通过对一些模型单元旋转,缩放,平移得到另一些模型单元。将重复对称的模型进行处理,对原始数据进行构件层面的语义分析,去除几何重复性检测和重复性冗余,仅传输最小模型单元;Step A1. There are often reusable units in the 3D model, but they are only in different directions and spatial positions, so some model units can be obtained by rotating, scaling, and translating them. Process the repeated and symmetrical models, perform component-level semantic analysis on the original data, remove geometric repeatability detection and repeatability redundancy, and transmit only the smallest model unit;

步骤A2、对最小模型单元进行旋转,缩放,平移得到复杂模型单元,减少场景的冗余数据。Step A2: Rotate, scale, and translate the smallest model unit to obtain a complex model unit to reduce redundant data of the scene.

模型拆分并找到最小的单元元件,只传输最小的模型单元,可以减小传递的复杂,加快渲染传递的过程。减小冗余,增加传递速度。The model is split and the smallest unit element is found, and only the smallest model unit is transmitted, which can reduce the complexity of the transfer and speed up the process of rendering transfer. Reduce redundancy and increase transfer speed.

作为优选,步骤S1中所述场景细粒度化预处理过程如下:Preferably, the scene fine-grained preprocessing process described in step S1 is as follows:

步骤B1、分析建筑信息模型BIM数据中包含语义信息的楼层和空间对象,形成初步的构筑物空间结构;Step B1, analyzing the floors and space objects containing semantic information in the BIM data of the building information model, to form a preliminary structure space structure;

步骤B2、获取特殊构件,比如构筑物空间结构的地板,结合初步构筑物空间结构进行分析,形成整个建筑物的楼层分布情况以及楼层间的连通关系;在每个楼层内部,结合初步构筑物空间结构进行进一步的楼层内连通关系分析,形成整个建筑物的室内子空间划分及连通关系结构图;Step B2: Obtain special components, such as the floor of the structure space structure, and analyze it in combination with the preliminary structure space structure to form the floor distribution of the entire building and the connection relationship between floors; inside each floor, combine the preliminary structure space structure for further steps. The analysis of the interconnection relationship in the floor of the whole building will form the division of the indoor subspace and the structure diagram of the interconnection relationship of the whole building;

步骤B3、场景漫游时,用户的视野是有限的,只会对于其周围场景感兴趣,因此只要传输和加载用户虚拟化身周围的可见对象即可满足当前漫游要求。传输和加载用户虚拟化身周围的可见对象;根据用户虚拟化身当前所在位置,判断出其所在子空间并计算出当前视锥内的物体,降低加载数据量,在实时漫游过程中对当前视点范围内需要加载的数据量进行有效控制,实现场景数据的渐近式传输和加载。Step B3: During scene roaming, the user's field of vision is limited, and he is only interested in the surrounding scenes. Therefore, the current roaming requirement can be satisfied as long as the visible objects around the user's avatar are transmitted and loaded. Transmit and load visible objects around the user's avatar; according to the current position of the user's avatar, determine the subspace where it is located and calculate the objects in the current view cone, reduce the amount of loaded data, and check the range of the current view point during the real-time roaming process. The amount of data to be loaded can be effectively controlled to achieve asymptotic transmission and loading of scene data.

锥是指场景中摄像机的可见的一个锥体范围,在视锥体内的景物可见,反之则不可见。因此直接计算显示视锥当中的物件可以减少整体的加载量,通过该方式可以进一步的降低漫游过程中的加载量,通过减小加载量的方式,尽量提升传输速度,也能保证加载过程不会出现白屏卡顿等情况。Cone refers to the range of a cone visible to the camera in the scene. The scene in the view cone is visible, and vice versa. Therefore, directly calculating the objects in the display cone can reduce the overall loading amount. This method can further reduce the loading amount during the roaming process. By reducing the loading amount, the transmission speed can be improved as much as possible, and the loading process can be There are white screen freezes, etc.

作为优选,步骤S1中所述渐进式网格预处理的过程如下:Preferably, the process of the progressive mesh preprocessing in step S1 is as follows:

步骤C1、页面加载注重的是用户的观感,因此在复杂场景中,加载时主要考虑用户的观感。在对场景中复杂的、在低带宽时无法实时传输的模型进行渐进式网格预处理时,将原始模型处理成含有较少数据量的基网络和增量网格两部分;In step C1, the page loading focuses on the user's look and feel, so in a complex scene, the user's look and feel is mainly considered when loading. When performing progressive mesh preprocessing on complex models in the scene that cannot be transmitted in real time at low bandwidth, the original model is processed into two parts, the base network and the incremental mesh, which contain less data;

步骤C2、同时在进行场景漫游时,先一步处理基网络数据,而后续漫游过程中,根据视点位置增加相应的增量网络来实时调整该模型的精度。Step C2: At the same time, during the scene roaming, the base network data is processed first, and in the subsequent roaming process, the corresponding incremental network is added according to the viewpoint position to adjust the accuracy of the model in real time.

人眼观察事物的清晰程度与距离成反比的这一客观事实,当物体距离用户虚拟化身较远时粗糙,较近时细致。而页面加载注重的是用户的观感,为了在不影响用户观感的情况下加快传输速度,可以在传递复杂场景时使用该方法,降低传输量的同时保证用户的体验。The objective fact that how clearly the human eye sees things is inversely proportional to the distance, when the object is farther from the user's avatar, it is rough, and when it is closer, it is finer. The page loading focuses on the user's perception. In order to speed up the transmission speed without affecting the user's perception, this method can be used when transmitting complex scenes to reduce the transmission volume and ensure the user's experience.

作为优选,步骤S1中所述基于WebRTC的对等传输为点对点传输;包括在两个节点间用RTCPeerConnection建立连接,创建RTCDataChannel,在对等连接中建立双向数据通道。以浏览器为中心,建立在应用层级的协议,目标是提供web开发者基于简单的JavaScript api就可以实现实时通信的功能,从而快速开发出丰富的浏览器端多媒体应用。使用WebRTC的应用无须安装任何浏览器插件,支持跨平台。WebRTC提供了视频会议所需的核心技术,目前已被广泛应用到基于浏览器的视频会议。使用WebRTC进行基本的数据传输只需要使用两个API,RTCPeerConnection是WebRTC用于构建点对点之间稳定、高效的流传输的组件。RTCDataChannel 使得浏览器之间(点对点)建立一个高吞吐量、低延时的信道,用于传输任意数据。Preferably, the WebRTC-based peer-to-peer transmission described in step S1 is point-to-point transmission, including establishing a connection between two nodes using RTCPeerConnection, creating an RTCDataChannel, and establishing a bidirectional data channel in the peer-to-peer connection. A browser-centric protocol built at the application level. The goal is to provide web developers with the function of real-time communication based on simple JavaScript api, so as to quickly develop rich browser-side multimedia applications. Applications using WebRTC do not need to install any browser plug-ins and support cross-platform. WebRTC provides the core technology required for video conferencing, and has been widely used in browser-based video conferencing. Using WebRTC for basic data transfer only requires the use of two APIs, RTCPeerConnection is a component of WebRTC for building stable and efficient streaming between peer-to-peer. RTCDataChannel enables browsers (point-to-point) to establish a high-throughput, low-latency channel for transmitting arbitrary data.

作为优选,两个节点经由服务器进行信令传递,交换的信令包括:session的信息;网络配置;媒体适配。首先要在节点间用RTCPeerConnection建立连接,这需要两个节点经由服务器进行信令传递,可以选择任何方式、采取任何协议来传递信令,需要交换的信令有三种,session的信息:用来初始化通信还有报错;网络配置:比如IP地址和端口;媒体适配:发送方和接收方的浏览器能够接受什么样的编码器和分辨率。Preferably, the two nodes transmit signaling via the server, and the exchanged signaling includes: session information; network configuration; and media adaptation. First, use RTCPeerConnection to establish a connection between nodes. This requires two nodes to transmit signaling through the server. You can choose any method and adopt any protocol to transmit signaling. There are three types of signaling that need to be exchanged. Session information: used to initialize There are also errors in communication; network configuration: such as IP address and port; media adaptation: what encoder and resolution can be accepted by the browser of the sender and receiver.

作为优选,在所述步骤S2所述中,静态文件加载包括如下步骤:Preferably, in the step S2, the static file loading includes the following steps:

步骤S211、将与首屏渲染相关的 CSS 和 JS 的代码由引用的形式改为内联的形式,减少HTTP的请求;Step S211, changing the CSS and JS codes related to the first screen rendering from the quoted form to the inline form to reduce HTTP requests;

步骤S212、将数据请求部分的 JS 代码放到头部;将首屏渲染的 CSS 样式和 JS数据请求放在头部;Step S212, put the JS code of the data request part in the head; put the CSS style of the first screen rendering and the JS data request in the head;

步骤S213、在确保首屏的样式和数据渲染成功后,次屏逻辑延后处理执行,相关次屏数据通过前端触发延时发送与上报,减少网络阻塞。Step S213 , after ensuring that the style and data of the first screen are successfully rendered, the logic of the second screen is delayed for processing and execution, and the relevant second screen data is triggered and reported by the front end in a delayed manner to reduce network congestion.

将数据请求部分的 JS 代码放到头部,目的是为了保证数据能够在第一时间返回,相比于将数据请求放在外部,减少了 JS 文件加载往返的时间首屏渲染的 CSS 样式和JS 数据请求放在头部,这是为了在服务器返回HTML文档时,保证 CSS 首屏样式渲染和请求数据能够立即执行和返回。The purpose of putting the JS code of the data request part in the head is to ensure that the data can be returned at the first time. Compared with placing the data request externally, it reduces the round-trip time for loading JS files. CSS styles and JS rendered on the first screen The data request is placed in the header, which is to ensure that the CSS above-the-fold style rendering and request data can be executed and returned immediately when the server returns the HTML document.

作为优选,所述步骤S2中,图片加载包括如下步骤:Preferably, in the step S2, the image loading includes the following steps:

步骤S221、减少图片资源的HTTP请求,针对同一模块的低色位小图片进行合并处理,使用CSS-SPIRIT技术将其合并为一张图片,通过使用background Image和backgroundPosition属性控制显示;Step S221, reduce the HTTP request of picture resource, carry out merging processing for the low color bit small picture of the same module, use CSS-SPIRIT technology to merge it into a picture, control display by using background Image and backgroundPosition property;

步骤S222、首屏显示的图片直接加载请求对应路径资源;次屏图片实行懒加载,仅有当用户请求次屏数据的时候才向后台发送HTTP请求;在页面载入时,IMG标签的资源路径保存在自定义属性中,SRC属性指向一个小图片作为占位符防止空HTTP请求;Step S222, the image displayed on the first screen is directly loaded to request the corresponding path resource; the second screen image is lazy loaded, and an HTTP request is sent to the background only when the user requests the second screen data; when the page is loaded, the resource path of the IMG tag is Saved in a custom attribute, the SRC attribute points to a small image as a placeholder to prevent empty HTTP requests;

步骤S223、在首屏完成渲染后,遍历DOM树获取懒加载IMG的真实路径以及当前图片相对于文档顶部的偏移距离,将以上属性保存在哈希数组中;判断当前的页面位置出现在可视域范围后,将真实的路径地址赋值给SRC,并将已经加载完成的图片从数组中删除;Step S223: After the rendering of the first screen is completed, traverse the DOM tree to obtain the real path of the lazy loaded IMG and the offset distance of the current image relative to the top of the document, and save the above attributes in the hash array; After viewing the range, assign the real path address to SRC, and delete the loaded image from the array;

步骤S224、在请求等待的过程中,设置反馈加载预知提示符。Step S224, in the process of waiting for the request, set a feedback loading prediction prompt.

将后端服务器预处理后的图片数据进行处理,减少请求次数、仅有当用户请求次屏数据的时候才向后台发送HTTP请求,同时删除已经加载完成的数据,避免加载错误。在无法保证网络环境导致图片加载速度缓慢的时候,给予用户加载预知提示符,保证用户的知情,从而保障用户体验。The image data preprocessed by the back-end server is processed to reduce the number of requests. Only when the user requests secondary screen data, an HTTP request is sent to the background. At the same time, the data that has been loaded is deleted to avoid loading errors. When there is no guarantee that the network environment causes the image loading speed to be slow, the user is given a loading prediction prompt to ensure that the user is informed, thereby ensuring the user experience.

作为优选,所述步骤S4中,用户和系统进行交互,判断鼠标滑动事件或者滚动事件是否发生,对浏览器的偏移量、当前视角的高度、当前视角的角度等用户操作数据进行计算,判断当前屏幕显示需要的数据,重新渲染屏显数据。而该渲染过程可以保证前端界面实时渲染,满足用户的体验。Preferably, in the step S4, the user interacts with the system to determine whether a mouse sliding event or a scrolling event occurs, and calculates user operation data such as the offset of the browser, the height of the current viewing angle, and the angle of the current viewing angle, etc. The current screen displays the required data, and re-renders the on-screen data. The rendering process can ensure real-time rendering of the front-end interface to meet the user's experience.

本发明的有益效果是:The beneficial effects of the present invention are:

1.提出了基于客户端和服务器同步渲染的Web三维可视化技术,能够优化三维数据的加载与渲染,提升系统首屏性能,可避免当前三维系统加载白屏问题,给用户更好的使用体验。1. A Web 3D visualization technology based on synchronous rendering of client and server is proposed, which can optimize the loading and rendering of 3D data, improve the performance of the first screen of the system, avoid the white screen loading problem of the current 3D system, and give users a better experience.

2.WebRTC能够保证系统数据安全:WebRTC强制加密, media 和 data 所有传输的数据都使用标准的 AES 加密;只有用户明确地需要使用,WebRTC才可以用被使用;Sanboxed,No Plugins, WebRTC 运行在Chrome 浏览器的沙盒里面。所以即使有人试图攻击Chrome里面的webRTC. 浏览器和用户都会得到完整的保护;采用WebRTC SecurityArchitecture 协议,保证数据的安全。2. WebRTC can ensure the security of system data: WebRTC enforces encryption, and all transmitted data of media and data use standard AES encryption; WebRTC can only be used if the user explicitly needs to use it; Sanboxed, No Plugins, WebRTC runs on Chrome Inside the browser's sandbox. So even if someone tries to attack webRTC in Chrome, the browser and the user will be fully protected; the WebRTC SecurityArchitecture protocol is used to ensure data security.

3.基于WebRTC的对等传输可以显著提升三维数据的传输速度,且用户不用安装专用渲染插件,用户在较低硬件配置和带宽的条件下也能流畅加载系统。3. The peer-to-peer transmission based on WebRTC can significantly improve the transmission speed of 3D data, and users do not need to install special rendering plug-ins, and users can load the system smoothly under the condition of lower hardware configuration and bandwidth.

附图说明Description of drawings

图1为本方法的渲染流程图;Fig. 1 is the rendering flow chart of this method;

图2为后端服务器预渲染流程图;Figure 2 is a flow chart of backend server pre-rendering;

图3为浏览器端渲染流程图;Figure 3 is a flow chart of browser-side rendering;

图4为基于WebRTC的对等传输示意图;Fig. 4 is a schematic diagram of peer-to-peer transmission based on WebRTC;

图5为静态文件加载。Figure 5 shows the static file loading.

具体实施方式Detailed ways

应理解,实施例仅用于说明本发明而不用于限制本发明的范围。此外应理解,在阅读了本发明讲授的内容之后,本领域技术人员可以对本发明作各种改动或修改,这些等价形式同样落于本申请所附权利要求书所限定的范围。It should be understood that the embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of the present application.

下面通过实施例,对本发明的技术方案作进一步具体的说明。The technical solutions of the present invention are further described in detail below through the examples.

一种基于客户端和服务器同步渲染的Web三维可视化技术,本方案基于首屏加载时间最短原则,采用客户端渲染和服务器渲染的混合模式,将web的数据分流,实现不同模块的异步加载和本地缓存。A web 3D visualization technology based on client and server synchronous rendering. Based on the principle of the shortest loading time for the first screen, this solution adopts a mixed mode of client rendering and server rendering to distribute web data to realize asynchronous loading and localization of different modules. cache.

首先后端将数据量庞大的三维数据进行模型轻量化、场景细粒度化、渐进式加载等预处理,通过高性能的后端服务器预渲染并基于WebRTC将三维数据对等传输到客户端;First, the back-end pre-processes the huge amount of 3D data with model lightweighting, fine-grained scene, progressive loading, etc., and pre-renders it through a high-performance back-end server and transmits the 3D data to the client peer-to-peer based on WebRTC;

客户端将用户数据和首屏数据通过EJS(一个JavaScript模板库)浏览器端渲染,即将相关参数写入EJS模板中,通过Node.js解析,向浏览器返回已经渲染好的HTML文档。在次屏中按照DIV分层,每一层单独做成数据接口异步加载,在页面初始化时,每一个DIV层仅保留最外层的DIV标签。The client side renders the user data and first screen data through EJS (a JavaScript template library) on the browser side, that is, writes the relevant parameters into the EJS template, parses it through Node.js, and returns the rendered HTML document to the browser. The secondary screen is layered according to DIV, and each layer is made into a separate data interface for asynchronous loading. When the page is initialized, each DIV layer only retains the outermost DIV tag.

当用户进行交互后,浏览器进行判断,数据重新渲染。这样做的好处在于,提高系统首屏性能,理想情况下可避免当前三维系统加载白屏问题,给用户更好的使用体验,同时使得前端的复杂度不过于太大。本方案的流程图如图1;后端渲染和浏览器渲染流程图分别如图2、图3所示。When the user interacts, the browser makes a judgment and the data is re-rendered. The advantage of this is that it can improve the performance of the first screen of the system, ideally avoid the white screen loading problem of the current 3D system, give users a better user experience, and at the same time make the front-end complexity not too large. The flowchart of this solution is shown in Figure 1; the back-end rendering and browser rendering flowcharts are shown in Figure 2 and Figure 3, respectively.

其中三维地理数据预处理包括如下步骤:The three-dimensional geographic data preprocessing includes the following steps:

一,模型轻量化,将一些重复对称的模型进行处理,例如轴对称模型,取轴对称的一半做为最小模型单元。对原始数据进行构件层面的语义分析,几何重复性检测和重复性冗余去除,仅传输最小模型单元,通过对最小模型单元进行旋转,缩放,平移得到复杂模型单元,减少了整个场景的冗余数据。First, the model is lightweight, and some repetitively symmetric models are processed, such as axisymmetric models, and half of the axisymmetric models are taken as the minimum model unit. Perform component-level semantic analysis on the original data, geometric repetition detection and repetition redundancy removal, only the smallest model unit is transmitted, and complex model units are obtained by rotating, scaling, and translating the smallest model unit, reducing the redundancy of the entire scene data.

二,场景细粒度化,通过分析建筑信息模型BIM( Building InformationModeling)数据中包含语义信息的楼层(Storey)和空间(Space)对象形成初步的构筑物空间结构;其次获取整个构筑物地板等特殊构件,结合初步构筑物空间结构进行进一步的楼层分析,形成整个建筑物的楼层分布情况以及楼层间的连通关系,最后在每个楼层内部,结合初步空间结构进行进一步的楼层内连通关系分析,形成整个建筑物的室内子空间划分及连通关系结构图。场景漫游时,用户的视野是有限的,只会对于其周围场景感兴趣,因此只要传输和加载用户虚拟化身周围的可见对象即可满足当前漫游要求。视锥是指场景中摄像机的可见的一个锥体范围,在视锥体内的景物可见,反之则不可见。根据用户虚拟化身当前所在位置判断出其所在子空间并计算出当前视锥内的物体,可进一步减低了加载的数据量,在实时漫游过程中始终都能用来对当前视点范围内需要加载的数据量进行有效控制,实现场景数据的渐近式传输和加载。Second, the scene is fine-grained, and the preliminary structure space structure is formed by analyzing the storey and space objects containing semantic information in the BIM (Building Information Modeling) data; Further floor analysis is carried out on the preliminary spatial structure of the building to form the floor distribution of the entire building and the connectivity between floors. Indoor subspace division and connection structure diagram. During scene roaming, the user's field of view is limited, and he is only interested in the surrounding scenes, so as long as the visible objects around the user's avatar are transmitted and loaded, the current roaming requirements can be satisfied. The view frustum refers to the range of a cone visible to the camera in the scene. The scene within the view frustum is visible, and vice versa. According to the current position of the user avatar, it can determine the subspace where it is located and calculate the objects in the current view cone, which can further reduce the amount of loaded data. The amount of data can be effectively controlled to realize asymptotic transmission and loading of scene data.

三,渐进式网格,渐进式网格(Progressive Mesh,PM )也是当前复杂模型传输时的常用手段。利用了人眼观察事物的清晰程度与距离成反比的这一客观事实,当物体距离用户虚拟化身较远时粗糙,较近时细致。在对于场景中一些复杂的、在低带宽时无法实时传输的模型进行PM预处理,将原始模型处理成含有较少数据量的基网络和增量网格两部分。在进行场景漫游时,首先处理基网络数据,并在后续的漫游过程中,通过根据视点位置增加相应的增量网络来实时调整该模型的精度。使得整个漫游过程中,不影响用户体验质量,做到增量数据的按需处理。Third, progressive mesh, progressive mesh (Progressive Mesh, PM) is also a common means of current complex model transmission. Taking advantage of the objective fact that the clarity of the human eye is inversely proportional to the distance, the object is rough when it is farther from the user's avatar, and finer when it is closer. For some complex models in the scene that cannot be transmitted in real time when the bandwidth is low, PM preprocessing is performed, and the original model is processed into two parts, the base network and the incremental mesh, which contain a small amount of data. During scene roaming, the base network data is first processed, and in the subsequent roaming process, the accuracy of the model is adjusted in real time by adding corresponding incremental networks according to viewpoint positions. This enables the on-demand processing of incremental data without affecting the quality of user experience during the entire roaming process.

而基于WebRTC的对等传输的服务器渲染过程如图4所示。以浏览器为中心,建立在应用层级的协议目标是提供web开发者基于简单的JavaScript ,api就可以实现实时通信的功能,从而快速开发出丰富的浏览器端多媒体应用。使用WebRTC的应用无须安装任何浏览器插件,支持跨平台。WebRTC提供了视频会议所需的核心技术,目前已被广泛应用到基于浏览器的视频会议。使用WebRTC进行基本的数据传输只需要使用两个API,RTCPeerConnection是WebRTC用于构建点对点之间稳定、高效的流传输的组件。RTCDataChannel 使得浏览器之间(点对点)建立一个高吞吐量、低延时的信道,用于传输任意数据。首先要在节点间用RTCPeerConnection建立连接,这需要两个节点经由服务器进行信令传递,可以选择任何方式、采取任何协议来传递信令,需要交换的信令有三种,session的信息:用来初始化通信还有报错;网络配置:比如IP地址和端口;媒体适配:发送方和接收方的浏览器能够接受什么样的编码器和分辨率。建立好连接之后,创建RTCDataChannel在对等连接中建立双向数据通道,基于它可以在浏览器之间传递三维地理数据数据。The server rendering process based on WebRTC peer-to-peer transmission is shown in Figure 4. Centered on the browser, the goal of the protocol established at the application level is to provide web developers with the function of real-time communication based on simple JavaScript and api, so as to quickly develop rich browser-side multimedia applications. Applications using WebRTC do not need to install any browser plug-ins and support cross-platform. WebRTC provides the core technology required for video conferencing, and has been widely used in browser-based video conferencing. Using WebRTC for basic data transfer only requires the use of two APIs, RTCPeerConnection is a component of WebRTC for building stable and efficient streaming between peer-to-peer. RTCDataChannel enables a high-throughput, low-latency channel between browsers (point-to-point) to transmit arbitrary data. First, use RTCPeerConnection to establish a connection between nodes. This requires two nodes to transmit signaling through the server. You can choose any method and adopt any protocol to transmit signaling. There are three types of signaling that need to be exchanged. Session information: used to initialize There are also errors in communication; network configuration: such as IP address and port; media adaptation: what encoder and resolution can be accepted by the browser of the sender and receiver. After the connection is established, create an RTCDataChannel to establish a two-way data channel in the peer-to-peer connection, based on which 3D geographic data can be passed between browsers.

其中客户端在将用户数据和首屏数据通过EJS浏览器端渲染时,主要通过三个步骤,首屏骨架信息渲染,静态文件加载和图片加载;其中图片加载为图片懒加载。When the client renders user data and first screen data through the EJS browser, it mainly goes through three steps: rendering of the first screen skeleton information, static file loading and image loading; the image loading is lazy loading of images.

其中,首屏骨架信息渲染为把核心的部分如菜单通过同构的方式优先渲染出来。可以先使用同构把菜单和页面骨架(Skeleton Screen)渲染出来。给用户提示信息,减少无端的等待时间。Among them, the rendering of the skeleton information on the first screen is to preferentially render the core parts such as menus in an isomorphic way. You can use isomorphism to render the menu and page skeleton (Skeleton Screen). Provide prompt information to users to reduce unreasonable waiting time.

静态文件加载过程如图5所示;第一、将与首屏渲染有关的 CSS 和 JS 的代码将引用的形式改为内联的形式,以此减少HTTP的请求。第二、将数据请求部分的 JS 代码放到头部,目的是为了保证数据能够在第一时间返回,相比于将数据请求放在外部,减少了 JS文件加载往返的时间。第三、首屏渲染的 CSS 样式和 JS 数据请求放在头部,这是为了在服务器返回HTML文档时,保证 CSS 首屏样式渲染和请求数据能够立即执行和返回。第四、在保证首屏的样式和数据渲染成功后,次屏逻辑延后处理执行,相关次屏数据通过前端触发延时发送与上报,减少网络阻塞。The static file loading process is shown in Figure 5; first, the CSS and JS code related to the first screen rendering is changed from the reference form to the inline form, so as to reduce HTTP requests. Second, put the JS code of the data request part in the head, the purpose is to ensure that the data can be returned at the first time, compared with the data request outside, it reduces the time of loading and round trip of the JS file. Third, the CSS style and JS data request for the first screen rendering are placed in the header, which is to ensure that the CSS first screen style rendering and request data can be executed and returned immediately when the server returns the HTML document. Fourth, after ensuring the successful rendering of the style and data of the first screen, the logic of the second screen is delayed and executed, and the relevant second screen data is sent and reported through the front-end trigger delay to reduce network congestion.

图片加载主要采用图片懒加载方式,图片懒加载策略从三个方面实现:减少图片请求次数、次屏图片异步请求、提高向下兼容性能。Image loading mainly adopts the image lazy loading method. The image lazy loading strategy is implemented in three aspects: reducing the number of image requests, asynchronously requesting secondary screen images, and improving backward compatibility.

减少图片资源的HTTP请求,针对同一模块的低色位小图片进行合并处理,使用CSS-SPIRIT技术将其合并为一张图片,通过使用background Image和backgroundPosition属性控制显示。Reduce the HTTP requests for image resources, merge small images with low color bits of the same module, use CSS-SPIRIT technology to merge them into one image, and control the display by using the background Image and backgroundPosition properties.

首屏显示的图片直接加载请求对应路径资源;次屏图片实行懒加载,仅有当用户请求次屏数据的时候才向后台发送HTTP请求。在页面载入时,img标签的资源路径保存在自定义属性中,src属性指向一个小图片作为占位符防止空HTTP请求。在首屏完成渲染后,遍历DOM树获取懒加载img的真是路径以及当前图片相对于文档顶部的偏移距离,将以上属性保存在哈希数组中。判断当前的页面位置出现在了可视域范围后,将真实的路径地址赋值给src,并将已经加载完成的图片从数组中删除。The pictures displayed on the first screen are directly loaded to request the corresponding path resources; the pictures on the second screen are loaded lazily, and HTTP requests are sent to the background only when the user requests the data on the second screen. On page load, the resource path of the img tag is stored in a custom attribute, and the src attribute points to a small image as a placeholder to prevent empty HTTP requests. After the first screen is rendered, traverse the DOM tree to obtain the real path of the lazy loaded img and the offset distance of the current image relative to the top of the document, and save the above attributes in the hash array. After judging that the current page position appears in the visible range, assign the real path address to src, and delete the loaded image from the array.

最后,所谓向下兼容是指在无法保证网络环境的情况下,导致图片速度缓慢或者请求失败,依然要保证用户体验。影响图片加载时间的因素有很多,如服务器响应时间、网络带宽、图片大小等;在请求等待的过程中,设置反馈加载预知提示符,保证在等待期间良好的用户体验。Finally, the so-called backward compatibility means that in the case where the network environment cannot be guaranteed, the picture speed is slow or the request fails, and the user experience must be guaranteed. There are many factors that affect the image loading time, such as server response time, network bandwidth, image size, etc. During the request waiting process, set the feedback loading prediction prompt to ensure a good user experience during the waiting period.

而在最后的用户交互阶段,地图操作后的数据数据重新渲染;用户和系统进行交互,特别是对三维场景进行操作,判断鼠标滑动事件或者滚动事件是否发生,对浏览器的偏移量、当前视角的高度、当前视角的角度等用户操作数据进行计算,判断当前屏幕显示需要的数据,重新渲染屏显数据。In the final user interaction stage, the data data after the map operation is re-rendered; the user interacts with the system, especially the operation of the 3D scene, to determine whether the mouse sliding event or scrolling event occurs, the offset of the browser, the current The height of the viewing angle, the angle of the current viewing angle and other user operation data are calculated, the data required for the current screen display is determined, and the screen display data is re-rendered.

Claims (9)

1. A Web three-dimensional visualization technology based on synchronous rendering of a client and a server is characterized by comprising the following steps:
step S1, the back-end server carries out model lightweight, scene fine-grained and progressive loading pretreatment on the three-dimensional geographic data; the model is divided into model units by model lightweight, so that redundancy is reduced; analyzing the floor distribution condition of the building and the communication relation among floors in a scene fine-grained manner, and controlling the asymptotic transmission and loading of scene data in the roaming process; the basic data is subjected to progressive loading and priority processing, and the model precision is increased according to the viewpoint position; after preprocessing, the three-dimensional data is transmitted to the client side in a peer-to-peer mode based on the WebRTC;
step S2, rendering the user data and the first screen data through an EJS browser by the client, namely writing the related parameters into an EJS template, and returning the rendered HTML document to the browser through node.js analysis; the client rendering comprises first screen framework information rendering, static file loading and picture loading;
step S3, layering according to DIV in the secondary screen, wherein each layer is independently used as a data interface for asynchronous loading, and each DIV layer only reserves the DIV label of the outermost layer when the page is initialized;
and step S4, after the user interacts, the browser makes independent judgment and data is re-rendered.
2. The technology for Web three-dimensional visualization based on client-server synchronous rendering of claim 1, wherein the model lightweight preprocessing procedure in step S1 is as follows:
step A1, processing the repeated and symmetrical model, performing semantic analysis of component level on the original data, removing geometric repeatability detection and repeatability redundancy, and only transmitting the minimum model unit;
and step A2, rotating, scaling and translating the minimum model unit to obtain a complex model unit, and reducing redundant data of the scene.
3. The technology for Web three-dimensional visualization based on synchronous rendering by client and server in claim 1, wherein the scene refinement preprocessing in step S1 is as follows:
b1, analyzing floors and space objects containing semantic information in BIM data of the building information model to form a primary structure space structure;
step B2, acquiring special components, and analyzing by combining with the space structure of the primary structure to form the floor distribution condition of the whole building and the communication relation among floors; in each floor, further in-floor communication relation analysis is carried out by combining a preliminary structure space structure, and an indoor subspace division and communication relation structure chart of the whole building is formed;
step B3, when the scene is roaming, transmitting and loading visible objects around the user virtual avatar; and judging the subspace of the user virtual avatar according to the current position of the user virtual avatar, calculating the object in the current view cone, reducing the loading data volume, effectively controlling the data volume needing to be loaded in the current view point range in the real-time roaming process, and realizing the asymptotic transmission and loading of the scene data.
4. The Web three-dimensional visualization technology based on synchronous rendering by client and server in claim 1, wherein the process of the progressive mesh preprocessing in step S1 is as follows:
step C1, when carrying out progressive grid preprocessing on a complex model which cannot be transmitted in real time at low bandwidth in a scene, processing the original model into a base network and an incremental grid which contain less data;
and step C2, when scene roaming is carried out, the base network data is processed firstly, and in the subsequent roaming process, the accuracy of the model is adjusted in real time by adding a corresponding incremental network according to the viewpoint position.
5. The Web three-dimensional visualization technology based on synchronous rendering of the client and the server according to claim 1, wherein the WebRTC-based peer-to-peer transmission in step S1 is peer-to-peer transmission; the method comprises the steps of establishing connection between two nodes by using RTCPeerConnection, creating RTCDataChannel and establishing a bidirectional data channel in peer-to-peer connection.
6. The Web three-dimensional visualization technology based on client-side and server synchronous rendering of claim 5, wherein two nodes are in signaling communication via a server, and the exchanged signaling comprises: information of session; network configuration; and (5) media adaptation.
7. The technology for Web three-dimensional visualization based on synchronized rendering of client and server in claim 1, wherein in the step S2, the static file loading comprises the following steps:
step S211, changing codes of the CSS and the JS related to the first screen rendering from a quoted form to an inline form, and reducing HTTP requests;
step S212, putting the JS code of the data request section to the head; placing the CSS style and JS data request for the first screen rendering at the head;
and step S213, after the style of the first screen and the data rendering are ensured to be successful, the logic delay post-processing execution of the second screen is carried out, and the related second screen data is triggered by the front end to be transmitted and reported in a delay manner, so that the network congestion is reduced.
8. The technology for Web three-dimensional visualization based on synchronous rendering by client and server in claim 1, wherein in the step S2, the loading of the picture includes the following steps:
step S221, reducing HTTP requests of picture resources, merging the low-color-Position small pictures of the same module, merging the low-color-Position small pictures into one picture by using CSS-SPIRIT technology, and controlling display by using background Image and background Position attributes;
step S222, directly loading the picture displayed on the first screen to request the corresponding path resource; the secondary screen picture is lazily loaded, and an HTTP request is sent to the background only when a user requests secondary screen data; when a page is loaded, a resource path of an IMG label is stored in a custom attribute, and an SRC attribute points to a small picture as a placeholder to prevent an empty HTTP request;
step S223, after the rendering of the first screen is completed, traversing the DOM tree to obtain a real path of the lazy loading IMG and the offset distance of the current picture relative to the top of the document, and storing the attributes in a Hash array; after judging that the current page position appears in the visible range, assigning a real path address to the SRC, and deleting the loaded picture from the array;
step S224, in the process of requesting for waiting, setting a feedback loading prediction prompt.
9. The technology of claim 1, wherein in step S4, the user interacts with the system to determine whether a mouse sliding event or a scrolling event occurs, calculates user operation data such as a browser offset, a current viewing angle height, and a current viewing angle, determines data required for current screen display, and re-renders screen display data.
CN202111616474.5A 2021-12-27 2021-12-27 Web three-dimensional visualization method based on synchronous rendering of client and server Active CN114513520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111616474.5A CN114513520B (en) 2021-12-27 2021-12-27 Web three-dimensional visualization method based on synchronous rendering of client and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111616474.5A CN114513520B (en) 2021-12-27 2021-12-27 Web three-dimensional visualization method based on synchronous rendering of client and server

Publications (2)

Publication Number Publication Date
CN114513520A true CN114513520A (en) 2022-05-17
CN114513520B CN114513520B (en) 2023-06-30

Family

ID=81548465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111616474.5A Active CN114513520B (en) 2021-12-27 2021-12-27 Web three-dimensional visualization method based on synchronous rendering of client and server

Country Status (1)

Country Link
CN (1) CN114513520B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756798A (en) * 2022-06-13 2022-07-15 中汽创智科技有限公司 Point cloud rendering method and system based on Web end and storage medium
CN115514747A (en) * 2022-09-23 2022-12-23 深圳市瑞云科技有限公司 Distributed preview method of real-scene three-dimensional model based on webrtc
CN115828007A (en) * 2022-11-21 2023-03-21 上海秉匠信息科技有限公司 Page display method, device, system, electronic equipment and medium
CN115934179A (en) * 2022-09-26 2023-04-07 贝壳找房(北京)科技有限公司 Service function control method and equipment
CN116977523A (en) * 2023-07-25 2023-10-31 深圳市快速直接工业科技有限公司 STEP format rendering method at WEB terminal
CN117095105A (en) * 2023-08-29 2023-11-21 广州立心科技有限责任公司 Light client browsing system and method for oversized three-dimensional model
CN117437342A (en) * 2023-12-20 2024-01-23 深圳图为技术有限公司 Three-dimensional scene rendering method, device and equipment
CN119180072A (en) * 2024-11-22 2024-12-24 深圳适创腾扬科技有限公司 Simulation model display method and device
WO2025035355A1 (en) * 2023-08-14 2025-02-20 京东方科技集团股份有限公司 Real-time rendering system and method
CN119668568A (en) * 2025-02-19 2025-03-21 杭州阿启视科技有限公司 A tree component optimization method based on React framework integrating virtualized rendering and incremental rendering

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100045662A1 (en) * 2006-10-02 2010-02-25 Aftercad Software Inc. Method and system for delivering and interactively displaying three-dimensional graphics
CN110008421A (en) * 2018-11-09 2019-07-12 阿里巴巴集团控股有限公司 Page processing method, device, equipment and computer readable storage medium
CN111080782A (en) * 2019-10-17 2020-04-28 湖北泰跃卫星技术发展股份有限公司 Visualization System Based on Real Scene 3D Geographic Information System
CN111369656A (en) * 2020-03-04 2020-07-03 杭州群核信息技术有限公司 WebGL-based editable large-scene progressive real-time rendering method
CN111639289A (en) * 2020-05-13 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device
CN112163175A (en) * 2020-10-14 2021-01-01 南京焦点领动云计算技术有限公司 Speed optimization method for website mobile terminal
CN112765513A (en) * 2020-06-16 2021-05-07 吉林吉动盘古网络科技股份有限公司 Fine-grained Web3D online visualization method for large-scale building scene
CN112948043A (en) * 2021-03-05 2021-06-11 吉林吉动盘古网络科技股份有限公司 Fine-grained Web3D online visualization method for large-scale building scene

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100045662A1 (en) * 2006-10-02 2010-02-25 Aftercad Software Inc. Method and system for delivering and interactively displaying three-dimensional graphics
CN110008421A (en) * 2018-11-09 2019-07-12 阿里巴巴集团控股有限公司 Page processing method, device, equipment and computer readable storage medium
CN111080782A (en) * 2019-10-17 2020-04-28 湖北泰跃卫星技术发展股份有限公司 Visualization System Based on Real Scene 3D Geographic Information System
CN111369656A (en) * 2020-03-04 2020-07-03 杭州群核信息技术有限公司 WebGL-based editable large-scene progressive real-time rendering method
CN111639289A (en) * 2020-05-13 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device
CN112765513A (en) * 2020-06-16 2021-05-07 吉林吉动盘古网络科技股份有限公司 Fine-grained Web3D online visualization method for large-scale building scene
CN112163175A (en) * 2020-10-14 2021-01-01 南京焦点领动云计算技术有限公司 Speed optimization method for website mobile terminal
CN112948043A (en) * 2021-03-05 2021-06-11 吉林吉动盘古网络科技股份有限公司 Fine-grained Web3D online visualization method for large-scale building scene

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756798A (en) * 2022-06-13 2022-07-15 中汽创智科技有限公司 Point cloud rendering method and system based on Web end and storage medium
CN115514747A (en) * 2022-09-23 2022-12-23 深圳市瑞云科技有限公司 Distributed preview method of real-scene three-dimensional model based on webrtc
CN115934179B (en) * 2022-09-26 2023-11-24 贝壳找房(北京)科技有限公司 Service function control method and equipment
CN115934179A (en) * 2022-09-26 2023-04-07 贝壳找房(北京)科技有限公司 Service function control method and equipment
CN115828007A (en) * 2022-11-21 2023-03-21 上海秉匠信息科技有限公司 Page display method, device, system, electronic equipment and medium
CN115828007B (en) * 2022-11-21 2023-08-04 上海秉匠信息科技有限公司 Page display method, device and system, electronic equipment and medium
CN116977523B (en) * 2023-07-25 2024-04-26 快速直接(深圳)精密制造有限公司 STEP format rendering method at WEB terminal
CN116977523A (en) * 2023-07-25 2023-10-31 深圳市快速直接工业科技有限公司 STEP format rendering method at WEB terminal
WO2025035355A1 (en) * 2023-08-14 2025-02-20 京东方科技集团股份有限公司 Real-time rendering system and method
CN117095105A (en) * 2023-08-29 2023-11-21 广州立心科技有限责任公司 Light client browsing system and method for oversized three-dimensional model
CN117437342A (en) * 2023-12-20 2024-01-23 深圳图为技术有限公司 Three-dimensional scene rendering method, device and equipment
CN117437342B (en) * 2023-12-20 2024-04-30 深圳图为技术有限公司 Three-dimensional scene rendering method and storage medium
CN119180072A (en) * 2024-11-22 2024-12-24 深圳适创腾扬科技有限公司 Simulation model display method and device
CN119668568A (en) * 2025-02-19 2025-03-21 杭州阿启视科技有限公司 A tree component optimization method based on React framework integrating virtualized rendering and incremental rendering
CN119668568B (en) * 2025-02-19 2025-04-25 杭州阿启视科技有限公司 A tree component optimization method based on React framework integrating virtualized rendering and incremental rendering

Also Published As

Publication number Publication date
CN114513520B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN114513520A (en) Web 3D visualization technology based on synchronous rendering of client and server
CN107835436B (en) A WebGL-based real-time virtual reality fusion live broadcast system and method
CN103077239B (en) Based on the iFrame embedded Web 3D system that cloud is played up
KR102770771B1 (en) A data model for representation and streaming of heterogeneous immersive media
CN110070613A (en) Large-scale three dimensional scene web page display method based on model compression and asynchronous load
US11537777B2 (en) Server for providing a graphical user interface to a client and a client
WO2014210001A1 (en) Hybrid client-server rendering with low latency in view
KR102346090B1 (en) Ar remote randering method for real time mr service with volumetric 3d video data
Han Mobile immersive computing: Research challenges and the road ahead
JP7447293B2 (en) References to Neural Network Models for Adaptation of 2D Video for Streaming to Heterogeneous Client Endpoints
US12088886B2 (en) System and method enabling private to public media experiences
KR20230153467A (en) Method, device, and program for streaming 3D objects
CN119402493A (en) Incremental Propagation in a Cloud-centric Collaboration and Connectivity Platform
JP2024105424A (en) Referencing neural network models with immersive media for adapting streaming media to heterogeneous client endpoints
Maamar et al. Streaming 3D meshes over thin mobile devices
KR102598603B1 (en) Adaptation of 2D video for streaming to heterogeneous client endpoints
KR102817864B1 (en) Setting up and deploying immersive media to heterogeneous client endpoints
US12301649B2 (en) Using Coap protocol for video streaming
Seligmann SmmmmS lient for Remote Rendered irtual Heality
CN119850840A (en) Digital content display method, head-mounted display device, and computer-readable medium
Zhang et al. Transmission Method of the Rendered Image based on Cube Environment Mapping
CN116756254A (en) Three-dimensional collaborative GIS message interaction method, device, equipment and medium
HK40079744A (en) Method and device for accessing constrained application protocol server, and medium
CN118369693A (en) Multiple attribute map merger
HK40073784A (en) Reference of neural network model for adaptation of 2d video for streaming to heterogeneous client end-points

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 313200 building 6, No. 11, Keyuan Road, Wuyang street, Deqing County, Huzhou City, Zhejiang Province

Patentee after: Zhejiang Zhongce Spacetime Technology Co.,Ltd.

Address before: 313200 building 6, No. 11, Keyuan Road, Wuyang street, Deqing County, Huzhou City, Zhejiang Province

Patentee before: ZHEJIANG TOPRS GEOGRAPHIC INFORMATION TECHNOLOGY Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Web 3D Visualization Method Based on Client Server Synchronous Rendering

Granted publication date: 20230630

Pledgee: Zhejiang Deqing rural commercial bank Limited by Share Ltd.

Pledgor: Zhejiang Zhongce Spacetime Technology Co.,Ltd.

Registration number: Y2024980016347