Unified expression method for geometry, attributes and semantics of massive models based on virtual earth

By implementing the geometry, attributes and semantic unified expression methods of massive homogeneous models in the virtual earth, the problem of inability to bind model attributes and geometry and semantics in the existing technology is solved, efficient model rendering and attribute query are realized, and user experience and system performance are improved.

CN119850809AActive Publication Date: 2025-04-18EAST CHINA NORMAL UNIV
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the rendering acceleration scheme of massive homogeneous models in the virtual earth cannot bind the properties of the model itself with geometry and semantics, resulting in the need to query the attribute information through the model by clicking the mouse, back-end database query is required through the model ID, and the query process is complex and the time is long.

Method used

A unified expression method of geometry, attributes and semantics of massive homogeneous models based on virtual earth is proposed. By creating virtual earth views, creating new model instances, calculating model matrix, binding of model instance attributes and click event, loading model instance sets, and binding of model attributes and geometry and semantics is realized, and dynamic modification and query are supported.

Benefits of technology

It simplifies the business logic of massive homogeneous model rendering and attribute query, improves query efficiency, reduces the number of back-end queries, improves user experience, and supports dynamic modification and expansion of model attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850809A_ABST
    Figure CN119850809A_ABST
Patent Text Reader

Abstract

The invention discloses a unified expression method for geometry, attributes and semantics of massive homogeneous models based on the virtual earth, and belongs to the technical field of geographic information. The method comprises the following steps: creating a virtual earth view, creating a new model instance, calculating a model matrix, binding attributes of the model instance with click events, and loading a model instance set; the step of newly building the model instances comprises the introduction of ID, position, attitude and custom attribute information of each model instance, and the step of calculating the model matrix comprises the calculation of the model matrix in the virtual earth global scene according to the longitude, latitude, elevation position and model attitude Euler angle of each model; according to the method, effective binding of geometry, semantics and self-defined attributes is realized on the basis of a massive homogeneous model rendering acceleration scheme, attribute information of all homogeneous models can be efficiently bound into a rendering result in single rendering, and the service logic of attribute query of the models in the virtual earth is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of geographic information technology, and specifically is a unified expression method for geometry, attributes and semantics of massive homogeneous models based on a virtual earth. Background Art

[0002] In virtual earth 3D geographic business scenarios, the demand for accelerated rendering of homogeneous large-scale 3D data is relatively common, such as the rendering of a large number of homogeneous vehicle models in vehicle twin scenarios, the rendering of a large number of homogeneous tree models in digital agriculture scenarios, and so on. Homogeneous models here refer to models with exactly the same shape, size, material, and function. During user interaction, clicking on a model to query the corresponding model attributes is also a common basic function in this type of business scenario. Therefore, the unified expression of model geometry, attributes, and semantics is a relatively common demand in virtual geographic environments.

[0003] At present, the binding of 3D model attributes and geometry and semantics in virtual earth business is a necessary function in 3D scenes. For example, in BIM model, the model data itself will also bind the model type, parameters, specifications and other attributes, which is in line with people's intuitive understanding of the ability to bind spatial geometric data attributes. In business, the binding of model data and attributes can also simplify business logic and lay the foundation for the realization of complex business.

[0004] However, the current Cesium-based rendering acceleration solution for a large number of homogeneous models can only bind the model ID, and cannot bind the model's own attributes. Therefore, if you want to view the corresponding attribute information by clicking the model with the mouse, you need to obtain the model ID by clicking, use the ID as an index to query the relevant attribute information through the back-end database, and return the query results to the front-end for rendering operations. This solution is relatively long in terms of the logical implementation link, and when the query involves hierarchical or distributed data, querying only by model ID will significantly increase the time of data query, affecting the efficient management and control of model instances. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a unified expression method for the geometry, attributes and semantics of massive homogeneous models based on a virtual earth, so as to solve the limitation of the prior art that attributes cannot be bound to geometry and semantics, and to simplify the business logic of rendering and attribute query of a large number of homogeneous models.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A unified expression method for the geometry, attributes and semantics of a massive homogeneous model based on a virtual earth, 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 the specified layer label and initialize the global scene under the view, including surface elevation information, satellite surface image information and longitude and latitude information;

[0009] S2: Create a new model instance. Create a new model instance in the global scene under the virtual earth view, and pass in the model's corresponding ID, position, posture, and any attribute information that needs to be expressed or bound;

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

[0011] S4: Bind the model instance attributes to the click event, convert the attributes that need to be expressed or bound in the model instance into an attribute package that is compatible with the native pop-up box, and bind it to the default click event in the virtual earth global scene;

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

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

[0014] Furthermore, 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 precession angle, rotation angle and nutation angle of the model; the fourth parameter is the scaling ratio of the model; the fifth parameter is the model attribute, and the storage process of the passed in attribute meets the Cesium internal attribute standard, is compatible with the Cesium engine native click pop-up box and supports dynamic update of attribute data.

[0015] Furthermore, the computational model matrix is ​​calculated based on seven parameters: longitude, latitude, elevation of the model center coordinate position in the virtual earth WGS84 coordinate system, and precession angle, rotation angle, nutation angle of the model attitude in the local horizontal coordinate system in the virtual earth, and scaling ratio of the model.

[0016] Furthermore, the model instance attributes are bound to the click event, which is to bind the attributes of the model instance to be rendered to the mouse left button click event, including converting the incoming attributes into an attribute package format compatible with the native pop-up box, and binding the mouse left button click event to the model instance, so that the attribute information corresponding to the model can be obtained after clicking the model.

[0017] Further, the step of loading a model instance set includes adding all model instances in .gltf or .glb format to the instance set step. The model complies with the modeling standard that the x-axis and y-axis planes are used as the bottom support planes of the model in the right-hand coordinate system, and the positive direction of the z-axis is used as the height direction of the model, ensuring 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 to render its texture and geometric structure.

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

[0019] The present invention improves the existing methods of loading and querying attributes of massive models in virtual earth, and effectively breaks through the limitation that the model body and attributes cannot be bound to each other in the massive model rendering scheme. For example, in the traditional method, when clicking the model with the mouse, the attribute information can often only be queried through the model ID and obtained through the back-end database, which makes the query process complicated and the query time long. Taking the query of resident information in a certain project as an example, the resident information table is stored in a regional table. The traditional method needs to query the database according to the personal identity ID returned by the front-end click, and this method not only increases the query time, but also affects the system response speed. By adopting the method of the present invention, the pre-stored attribute information (such as household registration segmentation) can be directly obtained by clicking during rendering, avoiding frequent back-end queries and greatly simplifying the query logic.

[0020] In addition, the present invention is fully compatible with the click-to-attribute query pop-up box of the 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, which improves the user experience. Through this improvement, the system can ensure the flexibility and customizability of model attributes while maintaining efficient rendering. At the same time, the method of the present invention also improves the scalability of the model itself in the massive model rendering scheme, simplifies the business logic and calling method of querying model attributes, improves the model attribute query function, and realizes the unified expression of model geometry, attributes and semantics in the method, which provides higher maintainability and compatibility for the functional expansion of the model and the attribute management of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of the present invention;

[0022] Figure 2 This is a schematic diagram of the meaning of longitude, latitude and elevation in the WGS84 coordinate system;

[0023] Figure 3 This is a schematic diagram of the meaning of the Euler angles of the model posture in the local horizontal coordinate system;

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

[0025] Figure 5 This is a rendering of the vehicle twin service scenario provided by the present invention;

[0026] Figure 6 This is the effect diagram of the smart agricultural forest farm scenario provided by the present invention. DETAILED DESCRIPTION

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

[0028] The invention provides a unified expression method for the geometry, attributes and semantics of a large number of homogeneous models based on a virtual earth, comprising five steps: creating a virtual earth view, creating a new model instance, calculating a model matrix, binding model instance attributes to click events, and loading a model instance collection.

[0029] Among them, creating a virtual earth view includes creating a three-dimensional digital earth, which includes surface elevation information, satellite surface image information, longitude and latitude information, which is used to process rendering requests and includes virtual earth, terrain, and map parameters.

[0030] Creating a new model instance is to initialize the model instance to be rendered. During the initialization process, the model ID, model position, model posture, scaling ratio, and model attributes need to be passed in. The model 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 located during rendering and operation, so as to track, manage, and update the corresponding model status in the entire application. The model position contains longitude, latitude, and elevation information, which are 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 of the position, which are 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. Model attributes contain attribute information that the user expects to bind to the model.

[0031] Calculating the model matrix includes calculating the model matrix of the model in the virtual earth global scene according to the longitude, latitude, elevation and Euler angle of the model. Calculating the model matrix is ​​the process of converting the position, posture and scale of the model into the model matrix of the model in the virtual earth. Using the model matrix to record the position and posture of the model instance in the virtual earth is conducive to optimizing the rendering calculation speed during the view change process.

[0032] The binding of model instance attributes to click events converts the attribute information input by the user into an attribute bag, binds the left mouse click event to the model instance, reads the attribute information after clicking the model, and returns an empty entity that records the attributes, to support dynamic modification of attributes and be compatible with the default pop-up box to obtain the attribute information corresponding to the model.

[0033] Loading a model instance collection is the process of loading all model instances into a model collection and rendering the model collection in .gltf or .glb format to the virtual globe in the browser. In this process, the virtual globe reads the model's geometry, texture information, position and posture data and loads them into memory to form a model collection. At this point, the model's geometry, material, texture and other attributes will be processed and parsed, and further rendered.

[0034] Example

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

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

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

[0038] Specifically, the newly created model instance is a memory space that records the model's ID number; the model's location information in the WGS84 coordinate system, including longitude, latitude, and elevation data; the model's attitude information in the local horizontal coordinate system, including precession angle, rotation angle, and nutation angle; the model's scaling ratio; and the attribute data that the user needs to bind, which is passed in as an object. The position and attitude information is passed in in the form of longitude, latitude, and Euler angles, which simplifies the calling method of the newly created model instance and makes it more in line with the user's intuitive understanding of the model's position and attitude. The storage process of the passed-in attributes meets the Cesium internal attribute standards, is compatible with the Cesium engine's native click pop-up box, and supports dynamic updates 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 step c of calculating the model matrix includes calculating the model matrix of the model in the virtual earth global scene according to the longitude, latitude, elevation and Euler angle of the model. The step of calculating the model matrix is ​​based on the longitude, latitude, elevation of the center coordinate position of the model in the virtual earth WGS84 coordinate system, and the precession angle, rotation angle, nutation angle of the model attitude in the local horizontal coordinate system in the virtual earth. And the seven parameters of the model scaling ratio are calculated.

[0063] Specifically, the model matrix calculation steps are as follows:

[0064] Step 1: Convert the longitude, latitude and elevation of the model into Cartesian coordinates in the virtual earth global coordinate system. The relevant parameters are shown as follows: Figure 2 As shown. Where longitude is lng, latitude is lat, altitude is height, and the radius of the earth is r earth , the distance between the center of the model and the center of the earth 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, the value of the z-axis is Z, and the translation matrix of the model in the global coordinate system is T. The formula is as follows:

[0065]

[0066] Step 2: Express the model posture Euler angle based on the local horizontal coordinate system in matrix form. The relevant parameters are shown as follows: Figure 3 As shown. The precession angle is α, the rotation angle is β, and the nutation angle is γ. represents the rotation matrix in the precession angular direction, represents the rotation matrix in the direction of the rotation angle, Represents the rotation matrix in the nutation angle direction, and R represents the rotation matrix of the model in the virtual earth global coordinate system. The rotation order of the present invention is to rotate the precession angle α first, then the rotation angle β, and finally the nutation angle γ. The formula is as follows:

[0067]

[0068] Step 3: Express the scaling ratio of the model in matrix form, where 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 4: 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 and click event binding step d consists of two parts: attribute binding and click event binding. First, the incoming model attributes are converted into an attribute bag, and then the model instance is bound to the mouse left button click event. The logic of the binding event is to read the attribute information of the attribute bag and return the entity information containing only the attributes when clicking the model instance, 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] / / Property binding property bag

[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] / / Property is bound 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 the property bag instance");

[0130] }

[0131] }

[0132] },

[0133] });

[0134] The step e of loading the model instance set is to load all model instances into the model instance set, and then load the model instance set into the virtual earth step. This step includes transferring the model information, including model material, texture, color, position, posture, scaling, attributes and other information, into the computer cache. The model complies with the modeling standard that the x-axis and y-axis planes in the right-handed coordinate system are used as the bottom support plane of the model, and the positive direction of the z-axis is used as the height direction of the model, and the WebGL command is called to draw frame by frame. When rendering each frame, the transformation information (position, posture, scaling) of the model will be calculated and updated in real time to ensure that the position and status of the model are consistent with other elements in the virtual earth environment. The relevant code is as follows:

[0135] / / Load the model instance

[0136] viewer.scene.primitives.add(

[0137] new Cesium.ModelInstanceCollection({

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

[0139] instances: instances, / / model instance array

[0140] })

[0141] ).

[0142] The present invention proposes a unified expression method for the geometry, attributes and semantics of massive homogeneous models based on the virtual earth. Compared with the old loading scheme of massive homogeneous model geometry in the virtual earth, it significantly optimizes the efficiency of clicking on the model to query model attributes. It also supports dynamic modification of data, and users can quickly access its related attribute information by clicking on the model, and it is fully compatible with the native attribute box of the virtual earth. Unlike traditional solutions that completely rely on the back-end database for layer-by-layer query, the present invention improves the model attribute binding function and greatly simplifies the business logic and calling method of the old massive homogeneous model attribute query. For example, the optimized business logic for clicking on the model attributes is compared with the original business logic. Figure 4 As shown, Figure 4 a shows the original model instance attribute query business logic, Figure 4 b shows the business logic of the model instance attribute query of the present invention. By pre-binding and storing the attributes, geometric shapes and semantic information of the model, when the user clicks on the model, there is no need to perform complex query operations, thereby improving the response speed and user experience.

[0143] The present invention demonstrates excellent performance and display effects in the application scenarios of vehicle twins and smart agricultural forest farms. Figure 5 and Figure 6 The actual effect of the binding between model instances and attributes in these business scenarios is demonstrated, and the efficient rendering of a large number of models in the virtual earth environment and the attribute query effect in the dynamic interaction process can be clearly presented. These applications verify the feasibility and practical value of the present invention in complex scenarios.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A unified expression method for the geometry, attributes and semantics of massive homogeneous models based on a virtual earth, characterized in that: The method comprises the following specific steps: S1: Create a virtual earth view, create a three-dimensional virtual earth view under the specified layer label and initialize the global scene under the view, including surface elevation information, satellite surface image information and longitude and latitude information; S2: Create a new model instance. Create a new model instance in the global scene under the virtual earth view, and pass in the model's corresponding ID, position, posture, and any attribute information that needs to be expressed or bound; S3: Calculate the model matrix, and calculate the model matrix of the model in the virtual earth global scene according to the longitude, latitude, elevation and Euler angle of the model; S4: Bind the model instance attributes to the click event, convert the attributes that need to be expressed or bound in the model instance into an attribute package that is compatible with the native pop-up box, and bind it to the default click event in the virtual earth global scene; S5: Load the model instance collection, add all model instances in .gltf or .glb format to the model instance collection, and load the model instance collection into the virtual earth view to render its texture and geometry.

2. The unified expression method according to claim 1, characterized in that: The virtual earth view is created by using the Cesium engine encapsulated by JavaScript to create a virtual earth based on the browser, supporting terrain data slices in .terrain file format, image base map slices in WMTS, WMS, WFS, and TMS formats, and the virtual earth coordinate system is the WGS84 coordinate system.

3. The unified expression method according to claim 1, characterized in that: 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 precession angle, rotation angle and nutation angle of the model; the fourth parameter is the scaling ratio of the model; the fifth parameter is the model attribute, and the storage process of the passed in attribute meets the Cesium internal attribute standard, is compatible with the Cesium engine native click pop-up box and supports dynamic update of attribute data.

4. The unified expression method according to claim 1, characterized in that: The calculation model matrix is ​​calculated based on seven parameters: longitude, latitude, elevation of the model center coordinate position in the virtual earth WGS84 coordinate system, and precession angle, rotation angle, nutation angle of the model attitude in the local horizontal coordinate system in the virtual earth and the scale ratio of the model.

5. The unified expression method according to claim 1, characterized in that: The model instance attribute is bound to the click event, which is to bind the attribute of the model instance to be rendered to the mouse left button click event, including converting the incoming attributes into an attribute package format compatible with the native pop-up box, and binding the mouse left button click event to the model instance, so that the attribute information corresponding to the model can be obtained after clicking the model.

6. The unified expression method according to claim 1, characterized in that: The loading of the model instance collection includes adding all model instances in .gltf or .glb format to the instance collection; 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 direction of the z-axis as the height direction of the model, ensuring that the spatial layout and direction of the model are consistent with the virtual earth's northeast celestial coordinate system standard; and loading the instance collection into the virtual earth to render its texture and geometric structure.

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

  • Editing method, device and equipment for virtual resources of meta-universe live broadcasting room and medium

    CN116600173A

  • WebGL-based three-dimensional flood routing simulation method and system

    CN117173369A

  • System and method for dynamic rendering of data

    IN201921001711A