A virtual earth-based unified expression method for mass model geometry, attributes and semantics

By binding model attributes and click events in the virtual globe, the problems of accelerating rendering of homogeneous models and complex attribute queries are solved, achieving efficient rendering and flexible attribute management, and improving user experience and system performance.

CN119850809BActive Publication Date: 2025-12-05EAST CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510027173.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-12-05
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

Existing technologies cannot bind the geometry, attributes, and semantics of homogeneous models together, resulting in complex model rendering acceleration solutions and long query times, which affects the efficient management and control of model instances.

Method used

By creating model instances and calculating model matrices in a virtual globe view, binding model attributes to click events, loading a collection of model instances, and rendering using the JavaScript-encapsulated Cesium engine, the system supports dynamic updates of model instance attributes and compatibility with native pop-up windows.

Benefits of technology

It simplifies the model attribute query logic, improves model rendering efficiency and user experience, supports dynamic modification of attributes, reduces the frequency of backend queries, and improves system response speed and model scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850809B_ABST
    Figure CN119850809B_ABST
Patent Text Reader

Abstract

The application discloses a kind of unified expression method of mass homogeneity model geometry, attribute and semantics based on virtual earth, belong to geographic information technology field, the steps of this method include: creating virtual earth view, new model instance, calculating model matrix, model instance attribute is bound with click event, loads model instance set;New model instance step contains the ID of each model instance, position, attitude and custom attribute information, calculating model matrix step includes according to the longitude, latitude, elevation position and model attitude Euler angle of each model Calculation model matrix in virtual earth global scene;The application realizes the effective binding of geometry, semantics and custom attribute on the basis of mass homogeneity model rendering acceleration scheme, can efficiently bind the attribute information of all homogeneity models to rendering result in single rendering, optimizes the business logic of model attribute query in virtual earth.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of geographic information, and particularly relates to a method for unified expression of massive homogenous model geometry, attributes and semantics based on a virtual globe. BACKGROUND

[0002] In a virtual globe three-dimensional geographic service scenario, the demand for rendering acceleration of homogenous large-scale three-dimensional data is relatively common, such as rendering of a large number of homogenous vehicle models in a vehicle twin scenario, rendering of a large number of homogenous tree models in a digital agriculture scenario, and the like. Here, the homogenous model refers to a model that is completely identical in form, size, material and function. In the process of user interaction, clicking on a model to query corresponding model attributes is also a relatively common basic function in this type of service scenario. Therefore, unified expression of model geometry, attributes and semantics is a relatively common requirement in a virtual geographic environment.

[0003] At present, binding of three-dimensional model attributes and geometry and semantics in a virtual globe service is a necessary function in a three-dimensional scene. For example, a BIM model, model data itself will also bind model types, parameters, specifications and the like, which conforms to people's intuitive understanding of the binding capability of spatial geometry data attributes, and the binding of model data and attributes in a service can also simplify service logic and lay a foundation for implementation of complex services.

[0004] However, the existing Cesium-based rendering acceleration scheme for a large number of homogenous models can only bind model IDs and cannot bind model attributes. Therefore, if the function of viewing corresponding attribute information in the form of clicking on a model is to be implemented, the model ID is obtained by clicking, the ID is used as an index to query related attribute information through a backend database, and the query result is returned to the front end for rendering operation. This scheme is relatively long in terms of logical implementation link, and when the query involves hierarchical or distributed data, the query through the model ID will significantly increase the data query time, affecting efficient management and control of model instances. SUMMARY

[0005] The present application aims to overcome the deficiencies of the prior art and provide a method for unified expression of massive homogenous model geometry, attributes and semantics based on a virtual globe, so as to solve the limitation that attributes cannot be bound with geometry and semantics in the prior art and simplify the service logic of rendering of a large number of homogenous models and attribute query.

[0006] To achieve the above object, the present application adopts the following technical scheme:

[0007] A method for unified expression of massive homogenous model geometry, attributes and semantics based on a virtual globe, characterized in that the method comprises the following specific steps:

[0008] S1: Create a virtual earth view, create a three-dimensional virtual earth view under a specified hierarchical label and initialize the global scene under the view, including ground elevation information, satellite ground image information and latitude and longitude information;

[0009] S2: New model instance, create a new instance of the model in the global scene under the virtual earth view, and pass in the ID, position, attitude and any attribute information that needs to be expressed or bound of the model;

[0010] S3: Calculate the model matrix, calculate the model matrix of the model in the virtual earth global scene according to the longitude, latitude, and elevation of the model and the Euler angle of the model;

[0011] S4: Model instance attribute and click event binding, convert the attribute information that needs to be expressed or bound in the model instance into an attribute package compatible with the original pop-up box, and bind it with the default click event under the virtual earth global scene;

[0012] S5: Load model instance set, add all.gltf or.glb format model instances to the model instance set, and load the model instance set into the virtual earth view to render its texture and geometry.

[0013] Further, the virtual earth view is created by using the Cesium engine encapsulated by JavaScript to create a virtual earth based on the browser end, supporting.terrain file format terrain data slices, WMTS, WMS, WFS, TMS format image base map slices, and the virtual earth coordinate system is WGS84 coordinate system.

[0014] Further, the new model instance includes: the first parameter is the model ID, which is a unique value; the second parameter is the longitude, latitude and elevation; the third parameter is the model's precession angle, rotation angle and nutation angle; the fourth parameter is the model's scaling ratio; the fifth parameter is the model attribute, and the storage process of the transmitted attribute meets the internal attribute standard of Cesium, is compatible with the original click pop-up box of Cesium engine and supports dynamic updating of attribute data.

[0015] Further, the calculation of the model matrix is based on the longitude, latitude, and elevation of the model center coordinate position in the virtual earth WGS84 coordinate system, and the precession angle, rotation angle, and nutation angle of the model attitude in the local horizontal coordinate system under the virtual earth, and the scaling ratio of the model.

[0016] Further, the model instance attribute is bound with the click event, which binds the properties of the model instance that needs to be rendered with the left mouse click event, including converting the input properties into a compatible native popup box attribute package format, and binding the left mouse click event to the model instance. After clicking the model, the corresponding attribute information of the model can be obtained.

[0017] Further, the loading model instance set step includes adding all.gltf or.glb format model instances to the instance set step. The model complies with the modeling standard of taking the x-axis y-axis plane as the bottom support plane of the model in the right-hand coordinate system, and taking the positive direction of the z-axis as the height direction of the model, to ensure that the spatial layout and direction of the model are consistent with the virtual earth northeast sky coordinate system standard. The instance set is loaded into the virtual earth for rendering of its texture and geometry.

[0018] Compared with the prior art, the present application has the following advantages:

[0019] The present application improves the existing virtual earth mass model loading and attribute query method, effectively breaking through the limitation that the model body and attributes cannot be bound in the mass model rendering scheme. For example, in the traditional method, when the model is clicked by the mouse, the attribute information can only be queried by the model ID and obtained through the backend database, resulting in a complex query process and a long query time. Taking the query of resident information in a certain project as an example, the resident information table is stored according to the region, and the traditional method needs to query the database according to the personal ID returned by the front-end click. This method not only increases the query time, but also affects the system response speed. By using the method of the present application, the pre-stored attribute information (such as household fragments) can be directly obtained by clicking during rendering, avoiding frequent backend queries and greatly simplifying the query logic.

[0020] In addition, the present application is fully compatible with the click attribute query popup box of virtual earth itself, and supports dynamic modification of model attributes. This means that users can easily view and modify model attributes during interaction without complex operations or additional query steps, improving user experience. Through this improvement, the system can maintain efficient rendering while ensuring the flexibility and customizability of model attributes. At the same time, the method of the present application also improves the extensibility of the model itself in the mass model rendering scheme, simplifies the business logic and calling method of querying model attributes, perfects the model attribute query function, and realizes the unified expression of model geometry, attributes and semantics in the method, providing higher maintainability and compatibility for the function expansion of the model and the attribute management of the model. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 Flowchart of the present application;

[0022] Figure 2 is a longitude latitude elevation meaning diagram under WGS84 coordinate system;

[0023] Figure 3 is a model posture Euler angle meaning diagram under local horizontal coordinate system;

[0024] Figure 4 is a model instance attribute query process improvement comparison diagram of the application;

[0025] Figure 5 is an effect diagram provided by the application in a vehicle twin service scene;

[0026] Figure 6 is an effect diagram provided by the application in a smart forestry scene. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the application will be apparently and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0028] The application is a unified expression method of massive homogeneous model geometry, attribute and semantics based on virtual earth, which includes five steps: creating a virtual earth view, creating a new model instance, calculating a model matrix, binding model instance attributes and click events, and loading a model instance set.

[0029] The virtual earth view creation includes creating a three-dimensional digital earth, which contains surface elevation information, satellite surface image information and latitude and longitude information, is used for processing rendering requests, and contains virtual earth, terrain and map parameters.

[0030] The new model instance is the initialization of the model instance to be rendered, and the model number ID, model position, model posture, scaling ratio and model attribute are required to be input during the initialization process. The model number ID is the unique identifier of the model instance, which is used to distinguish different model instances and ensure that each model instance can be correctly identified and positioned during rendering and operation, so as to facilitate tracking, management and updating of the corresponding model state in the entire application. The model position contains longitude, latitude and elevation information, which is used to determine the position of the model instance in the virtual earth. The model posture contains the precession angle, rotation angle and nutation angle of the model in the local horizontal coordinate system at the position, which is used to determine the posture of the model instance in the virtual earth. The scaling ratio contains the ratio between the size of the model rendered in the virtual earth and the size of the real model. The model attribute contains the attribute information that the user expects to bind with the model.

[0031] The model matrix calculation includes calculating the model matrix of the model in the global scene of the virtual earth according to the longitude, latitude, and elevation of the model and the Euler angle of the model. The model matrix calculation is a process of converting the position, posture, and scaling of the model into the model matrix of the model in the virtual earth. Recording the position and posture of the model instance in the virtual earth by using the model matrix is beneficial to optimizing the rendering calculation speed during view changes.

[0032] The model instance attribute and click event binding is to convert the attribute information input by the user into an attribute package, and bind a left mouse click event to the model instance. After clicking the model, the attribute information is read and an empty entity recording the attribute is returned to support dynamic modification of the attribute and compatibility with the default pop-up box to obtain the attribute information of the model.

[0033] The model instance set loading is a process of loading all model instances into a model set, and rendering the model set in the.gltf or.glb format to the virtual earth in the browser. In this process, the virtual earth reads the geometry, texture information, and position and posture data of the model and loads them into the memory to form a model set. At this time, the geometry information, material, texture, and other attributes of the model are processed and parsed, and further rendering is performed.

[0034] Embodiment

[0035] As shown in Figure 1 The embodiment mainly consists of five parts, which are creating a virtual earth view a, creating a new model instance b, calculating a model matrix c, binding a model instance attribute and a click event d, and loading a model instance set e.

[0036] The creating a virtual earth view step a is used to establish a digital earth, which contains surface elevation information, satellite surface image information, and latitude and longitude information. The creating a virtual earth view step uses the Cesium engine encapsulated by JavaScript to create a virtual earth based on the browser end, supports terrain data slicing in the.terrain file format, and image base map slicing in the WMTS, WMS, WFS, and TMS formats.

[0037] The new model instance step b is a process of creating a new model instance according to the number of models and completing initialization.

[0038] Specifically, the newly created model instance is a memory space that records the ID number of the model; the position information of the model in the WGS84 coordinate system, including longitude, latitude, and elevation data; the attitude information of the model in the local horizontal coordinate system, including the precession angle, rotation angle, and nutation angle; the scaling ratio of the model; and the attribute data required to be bound by the user, which is transmitted in the form of an object. The position and attitude information is transmitted in the form of longitude, latitude, and height and Euler angles, which simplifies the calling method of the newly created model instance and makes it more consistent with the user's intuitive understanding of the model position and attitude. Moreover, the storage process of the transmitted attributes meets the internal attribute standard of Cesium, is compatible with the original click pop-up of the Cesium engine, and supports dynamic updating of attribute data. The relevant code is as follows:

[0039] / / Generate model instance array

[0040] const instances = [];

[0041] const initInstance = (params) => {

[0042] const instance = {

[0043] batchId: params.id,

[0044] position: {

[0045] longitude:params.longitude,

[0046] latitude:params.latitude,

[0047] height:params.heading? params.height : 0

[0048] },

[0049] orientation: {

[0050] heading: params.heading? params.heading : 0,

[0051] pitch: params.pitch? params.pitch : 0,

[0052] roll: params.roll? params.roll : 0

[0053] },

[0054] scale: params.scale,

[0055] property: {}

[0056] };

[0057] for(let i in params.properties){

[0058] instance. properties [i] = params.properties[i]

[0059] }

[0060] instances.push(instance)

[0061] }

[0062] The model matrix calculation step c comprises calculating the model matrix of the model in the virtual global earth scene according to the longitude, latitude and altitude of the model and the Euler angle of the model. The model matrix calculation step is based on the longitude, latitude and altitude of the center coordinate position of the model in the virtual earth WGS84 coordinate system and the seven parameters of the precession angle, rotation angle, nutation angle of the model posture of the model in the local horizontal coordinate system of the virtual earth and the scaling ratio of the model.

[0063] Specifically, the model matrix calculation step is as follows:

[0064] Step one: convert the longitude, latitude and altitude of the model into Cartesian coordinates in the virtual global coordinate system, as shown in the related parameter diagram Figure 2 . Wherein the longitude is lng, the latitude is lat, the altitude is height, the radius of the earth is r earth , the distance between the model center position and the earth center point is r, the value of the x-axis of the model in the global coordinate system is X, the value of the y-axis is Y, and the value of the z-axis is Z. The translation matrix of the model in the global coordinate system is T. The formula is as follows:

[0065]

[0066] Step two: express the model posture Euler angle based on the local horizontal coordinate system in matrix form, as shown in the related parameter diagram Figure 3 . Wherein the precession angle is a, the rotation angle is b, and the nutation angle is g, represents the rotation matrix in the precession angle direction, represents the rotation matrix in the rotation angle direction, R represents the rotation matrix of the model in the virtual earth global coordinate system. The rotation sequence of the present application is to rotate the precession angle a first, then rotate the rotation angle β, and finally rotate the nutation angle γ. The formula is as follows:

[0067]

[0068] Step three: the scaling ratio of the model is expressed in a matrix manner, wherein the scaling ratio is θ, and S is the scaling matrix of the model in the virtual earth global coordinate system. The formula is as follows:

[0069]

[0070] Step four: calculate the model matrix, modelMatrix is the model matrix, T is the translation matrix of the model in the virtual earth global coordinate system, R is the rotation matrix of the model in the virtual earth global coordinate system, and S is the scaling matrix of the model in the virtual earth global coordinate system. The formula is as follows:

[0071]

[0072] The model instance attribute binding and click event binding step d includes two parts of attribute binding and click event binding. First, the input model attribute is converted into an attribute package, and then the model instance is bound with the left mouse click event. The logic of binding the event is to read the attribute information of the attribute package and return the entity information containing only the attribute when the model instance is clicked, so as to be compatible with the original attribute pop-up box. The relevant code is as follows:

[0073] / / Model instance initialization process

[0074] function ModelInstance(collection, instanceId, position,orientation, properties) {

[0075] this.primitive = collection;

[0076] this._instanceId = instanceId;

[0077] / / Attribute binding attribute package

[0078] this._properties = new PropertyBag(properties)

[0079] / / Calculate the model matrix

[0080] const modelMatrix = Transforms.headingPitchRollToFixedFrame(

[0081] new Cartesian3.fromDegrees(

[0082] position.longitude,

[0083] position.latitude,

[0084] position.height

[0085] ),

[0086] new HeadingPitchRoll(

[0087] orientation.heading,

[0088] orientation.pitch,

[0089] orientation.roll ) );

[0092] Matrix4.multiplyByUniformScale(

[0093] modelMatrix,

[0094] scale,

[0095] modelMatrix );

[0097] this._modelMatrix = Matrix4.clone(modelMatrix);

[0098] }

[0099] Object.defineProperties(ModelInstance.prototype, {

[0100] instanceId: {

[0101] get: function () {

[0102] return this._instanceId;

[0103] },

[0104] },

[0105] model: {

[0106] get: function () {

[0107] return this.primitive._model;

[0108] },

[0109] },

[0110] modelMatrix: {

[0111] get: function () {

[0112] return Matrix4.clone(this._modelMatrix);

[0113] },

[0114] set: function (value) {

[0115] Matrix4.clone(value, this._modelMatrix);

[0116] this.primitive.expandBoundingSphere(this._modelMatrix);

[0117] this.primitive._dirty = true;

[0118] },

[0119] },

[0120] / / Bind properties to the model instance

[0121] properties: {

[0122] get: function () {

[0123] return this._properties;

[0124] },

[0125] set: function (value) {

[0126] if (value instanceof PropertyBag) {

[0127] this._properties = value;

[0128] } else {

[0129] throw new Error("Please use a property package instance");

[0130] }

[0131] }

[0132] },

[0133] });

[0134] Step e, loading the model instance set, involves loading all model instances into the model instance set and then loading the model instance set into the virtual globe. This step includes transferring model information, including material, texture, color, position, pose, scaling, and attributes, into the computer cache. The model follows a modeling standard where the x-axis and y-axis planes are used as the bottom support planes in a right-handed coordinate system, and the positive z-axis is used as the height direction. WebGL commands are then invoked to render the model frame by frame. During each frame rendering, the model's transformation information (position, pose, scaling) is calculated and updated in real time to ensure that the model's position and state are consistent with other elements in the virtual globe environment. The relevant code is as follows:

[0135] / / Load model instance

[0136] viewer.scene.primitives.add(

[0137] new Cesium.ModelInstanceCollection({

[0138] url: modelUrl, / / URL address of the model file

[0139] instances: instances, / / An array of model instances

[0140] })

[0141] ).

[0142] The application proposes a unified expression method of massive homogeneous model geometry, attribute and semantics based on virtual earth, and the loading scheme of old massive homogeneous model geometry in virtual earth, which significantly optimizes the efficiency of clicking model to query model attribute. And it supports dynamic modification of data, and users can quickly access the related attribute information of the model by clicking the model, and it is fully compatible with the original attribute box of virtual earth. Unlike the traditional scheme which completely relies on the back-end database to query layer by layer, the application perfects the model attribute binding function, greatly simplifies the business logic and calling mode of the old massive homogeneous model attribute query. The optimized business logic of clicking query for model attribute and the original business logic are compared as shown in Figure 4 Figure 4 a shows the original model instance attribute query business logic, Figure 4 b shows the model instance attribute query business logic of the application. By pre-binding and storing the attribute, geometry shape and semantic information of the model, when the user clicks the model, there is no need to perform complex query operation, so as to improve the response speed and user experience.

[0143] The application shows excellent performance and display effect in the application scenarios of vehicle twinning and intelligent agricultural forest. Figure 5 and Figure 6 The application shows the actual effect of mutual binding of model instance and attribute in these business scenarios, which can clearly present the efficient rendering of a large number of models in the virtual earth environment, and the attribute query effect in the dynamic interaction process. These applications verify the feasibility and actual value of the application in complex scenarios.

[0144] The above only describes the preferred embodiments of the application, and does not limit the application, any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application, should be included in the protection scope of the application.​

Claims

1. A unified method for representing the geometry, attributes, and semantics of massive homogeneous models based on a virtual Earth, characterized in that, The method includes the following specific steps: S1: Create a virtual globe view. Create a 3D virtual globe view under the specified hierarchy tab and initialize the global scene under the view, including surface elevation information, satellite surface image information and latitude and longitude information; S2: Create a new model instance. Create a new instance of the model in the global scene under the virtual globe view, and pass in the model's ID, position, pose, and any attribute information that needs to be expressed or bound. S3: Calculate the model matrix, which is the model matrix in the virtual earth global scene based on the model's longitude, latitude, elevation and Euler angles; S4: Bind model instance properties to click events. Convert the properties that need to be expressed or bound in the model instance into a property package that is compatible with the native pop-up, and bind it to the default click event in the virtual globe global scene. S5: Load the model instance collection, add all .gltf or .glb format model instances to the model instance collection, and load the model instance collection into the virtual globe view to render its textures and geometry; where: The virtual globe view is created using the Cesium engine, which is encapsulated in JavaScript, to create a virtual globe on the browser side. It supports terrain data tiles in .terrain file format, image base map tiles in WMTS, WMS, WFS, and TMS formats, and the virtual globe coordinate system is the WGS84 coordinate system. The newly created model instance includes: the first parameter is the model ID, which is a unique value; the second parameter is the longitude, latitude, and elevation; the third parameter is the model's precession angle, rotation angle, and nutation angle; the fourth parameter is the model's scaling ratio; and the fifth parameter is the model attributes. The stored procedure of the passed attributes meets the Cesium internal attribute standard, is compatible with the Cesium engine's native click pop-up, and supports dynamic updates of attribute data. The binding of model instance attributes to click events involves binding the attributes of the model instance to be rendered to the left-click event. This includes converting the passed attributes into an attribute package format compatible with native pop-ups and binding the left-click event to the model instance. After clicking the model, the corresponding attribute information of the model can be obtained.

2. The unified expression method according to claim 1, characterized in that, The computational model matrix is ​​calculated based on seven parameters: the longitude, latitude, and elevation of the model's center coordinates in the virtual Earth WGS84 coordinate system, the precession angle, rotation angle, nutation angle, and scaling ratio of the model's attitude in the local horizontal coordinate system of the virtual Earth.

3. The unified expression method according to claim 1, characterized in that, The loading of the model instance set includes adding all model instances in .gltf or .glb format to the instance set; the model needs to be modeled in a right-handed coordinate system, following the modeling standard of using the x-axis and y-axis planes as the bottom support planes of the model and the positive z-axis direction as the height direction of the model, to ensure that the spatial layout and orientation of the model are consistent with the standard of the virtual earth's northeast celestial coordinate system; and the instance set is loaded into the virtual earth to render its texture and geometry.

Citation Information

Patent Citations

  • Key interface design method of mobile three-dimensional virtual earth system

    CN107357939A

  • Historical entity data display method, device and equipment

    CN112100408A