AIS target-based three-dimensional rendering method and system
The AIS target data is clustered and divided by k-means spatial clustering algorithm and Geohashes grid method. Combined with the camera height to determine the drawing mode, the problem of slow rendering speed and low efficiency of massive AIS target data is solved, and efficient and accurate Three-dimensional rendering effect reduces resource costs and complexity.
Patent Information
- Application Number
- CN201910049818.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-18
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2039-01-18
AI Technical Summary
The prior art has distortion and low performance in real-time, efficient rendering and display of massive AIS target data around the world, resulting in slow drawing speed, poor fluency, complex deployment and high cost.
The k-means spatial clustering algorithm and Geohashes grid method are used to cluster and divide the AIS target data, generate point cloud services and regional target services, and determine the drawing mode according to the camera height to separate the overall situation distribution and local specificity of the global massive targets. The rendering of the target utilizes the organic combination of the server and the client to reduce the dependence of the background service and improve clustering efficiency and accuracy.
It improves the three-dimensional rendering efficiency and accuracy of massive AIS targets, reduces resource costs, breaks through local computing resource limitations, and demonstrates better display effects and 3D rendering capabilities.
Smart Images

Figure CN111462291B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a digital earth visualization technology, and in particular to a three-dimensional rendering technology based on massive AIS targets. Background Art
[0002] Digital Earth is a technology that uses massive amounts of earth information to describe the earth in three dimensions with multiple resolutions, scales, time and space, and types, and uses it as a tool to support and improve human activities and quality of life. It has extremely wide applications in both civil and military fields. The Automatic Identification System (AIS) is composed of shore-based (base station) facilities and ship-borne equipment, and is a new type of digital navigation aid system. In the era of big data, three-dimensional visualization has become an indispensable key technology in terrain analysis, geographic process simulation, and decision support. However, the global massive AIS target data is large in volume and updated frequently, making it difficult to render and display AIS target data in real time and efficiently.
[0003] The traditional solution is to use service clusters to rasterize and slice the global AIS target data distribution, and finally publish it through OGC standard services. However, when drawing massive global AIS targets, the existing spatial clustering algorithm returns a distorted data set when presenting the overall distribution of massive global AIS targets, and the performance is greatly reduced and the speed is slow; when drawing specific AIS targets, the corresponding target points cannot be returned in time, affecting the smoothness of drawing and poor rendering results; and the deployment is relatively complex and needs to be combined with heavy background services, which is costly. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0005] Therefore, an object of the present invention is to provide a three-dimensional rendering method and system based on AIS targets, which can perform efficient three-dimensional rendering on massive AIS targets.
[0006] According to a first aspect of the present invention, a three-dimensional rendering method based on an AIS target is provided, characterized in that it includes:
[0007] Obtain AIS target data;
[0008] Generate and publish point cloud services and regional target services based on the AIS target data;
[0009] Wherein, generating a point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service.
[0010] Furthermore, the clustering of the AIS target data using the k-means spatial clustering algorithm and the Geohashes grid method includes:
[0011] Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area;
[0012] Use a multi-layer structure to divide the interior of each Geohashes into multiple small grid areas;
[0013] Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm.
[0014] According to a second aspect of the present invention, there is also provided a three-dimensional rendering method based on an AIS target, characterized in that it comprises:
[0015] Get the camera height in the digital globe;
[0016] Determining a drawing mode of an AIS target according to the camera height;
[0017] Acquire a point cloud service and / or an area target service according to the determined drawing mode;
[0018] The AIS target is rendered and displayed using the determined drawing mode.
[0019] Wherein, the point cloud service and the area target service are generated according to the AIS target data.
[0020] Furthermore, the drawing modes of the AIS target include a point mode for presenting the overall situation distribution of the target and an icon mode and a model mode for presenting specific targets in a local area, wherein the target drawn using the model mode has more details than that drawn using the icon mode.
[0021] Further, the determining of the drawing mode of the AIS target according to the camera height includes:
[0022] When the camera height is greater than or equal to the first height, using the point mode;
[0023] When the height of the camera is greater than or equal to the second height and less than the first height, using the icon mode;
[0024] When the height of the camera is less than the second height, the model mode is used.
[0025] Further, acquiring the point cloud service and / or the area target service according to the determined drawing mode includes:
[0026] When using point mode, obtaining the point cloud service;
[0027] When using icon mode or model mode, obtain the point cloud service and area target service.
[0028] Further, generating a point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service.
[0029] According to a third aspect of the present invention, there is also provided a three-dimensional rendering system based on an AIS target, characterized in that it comprises:
[0030] A server is used to obtain AIS target data, generate point cloud services and regional target services according to the AIS target data, and publish them;
[0031] The client is used to obtain the camera height in the digital earth, determine the drawing mode of the AIS target according to the camera height and obtain the point cloud service and / or regional target service, and render and display using the determined drawing mode.
[0032] Furthermore, the server is also used to store and manage the acquired AIS target data.
[0033] According to a fourth aspect of the present invention, there is also provided a three-dimensional rendering method based on an AIS target, characterized in that it comprises:
[0034] The server obtains AIS target data, generates point cloud services and regional target services according to the AIS target data, and publishes them;
[0035] The client obtains the camera height in the digital globe, determines the drawing mode of the AIS target according to the camera height and obtains the point cloud service and / or the regional target service, and renders and displays using the determined drawing mode.
[0036] The present invention proposes a 3D rendering system and method based on AIS targets by organically combining a server and a client, separates target management from drawing, and solves the problem of slow speed and low efficiency in drawing a large number of global targets in a traditional way; abandons heavy background services such as service clusters, combines a grid method and a k-means algorithm to achieve clustering of targets, improves clustering efficiency and accuracy, facilitates deployment and reduces resource costs; adopts a hierarchical drawing method in the drawing stage, separates the overall distribution of the global large number of AIS targets from the specific drawing of local targets, improves drawing efficiency, breaks through the limitation on the use of local computing resources, and can show better display effects.
[0037] Additional aspects and advantages of the present invention will be given in part in the following description and, in part, will be obvious from the following description or learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0039] Figure 1 The figure is a flow chart of a 3D rendering method based on an AIS target according to an embodiment of the present invention.
[0040] Figure 2 The figure is a flow chart of a 3D rendering method based on an AIS target according to another embodiment of the present invention.
[0041] Figure 3 4 is a framework diagram of a 3D rendering system based on an AIS target according to yet another embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0044] Embodiment 1:
[0045] refer to Figure 1 , which shows the process of the server-side 3D rendering method based on AIS target, including:
[0046] S11, obtaining AIS target data;
[0047] S12, generating and publishing a point cloud service and an area target service according to the AIS target data;
[0048] The generating of the point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service. Specifically, it includes:
[0049] Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area;
[0050] A multi-layer structure is used to divide the interior of each Geohashes into multiple small grid areas. For example, a Geohashes can be divided into 32 sub-rectangular areas. A 4-layer structure is used to divide a total of more than 1 million small grid areas.
[0051] Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm.
[0052] Through the grid division in Geohashes processing, the k value in the k-means algorithm is given, which overcomes the shortcoming of the k-means algorithm that it is difficult to estimate the k value selection. Dividing the grid first and then clustering avoids the repeated iteration process of the k-means algorithm, improves the calculation speed of the algorithm, and processes large data sets more efficiently, overcoming the efficiency and resource occupation problems of the traditional method of rasterizing data and then slicing and publishing.
[0053] In the clustering process using the k-means algorithm, when the target is in a small grid area, the count of this small grid area is increased by 1. In parallel, other small grid areas are also counted according to whether there are targets in them. At the end of the clustering process, for the small grid area with a target, a point in the area is randomly selected as the AIS target point, and the count of this small grid area is saved. When the client renders the target in batches, the count is different, and the rendering color effect is also different. The larger the count, the darker the rendering color.
[0054] Through the above processing, the server generates and publishes a point cloud service. The point cloud service is used to provide the point cloud data after the above processing, including the location coordinates and count count of the AIS target. When the client sends a request for the point cloud service to the server, the server sends the point cloud data to the client for rendering and presentation.
[0055] Wherein, the regional target service is used to provide the AIS target data obtained above. The generating of the regional target service according to the AIS target data includes using the AIS target data as the data that can be provided by the regional target service. When the camera height in the digital earth of the client is less than the first height, the regional range of the camera is obtained in real time, and a request for the regional target service is sent to the server. The request includes the data of the regional range. After receiving the request, the server will filter out the AIS actual targets in the requested regional range from the maintained real-time target list. And the target data of the area (including the target batch number, location and other related attribute data) is counted and sent to the corresponding client. After receiving the service data, the client draws and displays the specific target and displays the attributes of the target.
[0056] Embodiment 2:
[0057] refer to Figure 2 , which shows the process of the client's AIS target-based 3D rendering method, including:
[0058] S21. Obtain the camera height in the digital globe.
[0059] The client can use the OSG Operation mechanism to monitor the camera height in the digital globe.
[0060] S22: Determine a drawing mode of the AIS target according to the camera height.
[0061] The drawing modes of AIS targets are different for camera heights in different ranges. The drawing modes of the AIS targets include a point mode that presents the overall distribution of the target and an icon mode and a model mode that present specific targets in a local area, wherein the targets drawn using the model mode have more details than the icon mode. Optionally, when the camera height is greater than or equal to the first height, the point mode is used; when the camera height is greater than or equal to the second height and less than the first height, the icon mode is used; when the camera height is less than the second height, the model mode is used.
[0062] S23. Acquire point cloud service and / or area target service according to the determined drawing mode.
[0063] The acquisition service refers to sending a request for the corresponding service to the server, and the server provides the corresponding service to the client according to the request and sends the data in the corresponding service to the client. Optionally, when using the point mode, the point cloud service is acquired, and the server sends the point cloud data including the location coordinates and count count of the AIS target to the client; when using the icon mode or model mode, the point cloud service and the regional target service are acquired, and the client's request needs to include the data of the regional range. In addition to sending the above point cloud data, the server also sends the AIS target data of the requested regional range (including the target batch number, location and other related attribute data) to the client.
[0064] S24: Render and display the AIS target using the determined rendering mode.
[0065] The point cloud service and regional target service are generated based on the AIS target data. Specifically, the server uses the k-means spatial clustering algorithm and the Geohashes grid method to cluster the AIS target data and generate the point cloud service. The point cloud data in the point cloud service includes the location coordinates and count count of the AIS target. When the client renders the target in batches, the color effect of the rendering is different if the count is different. The larger the count, the darker the rendering color.
[0066] In summary, when the client displays the three-dimensional situation, it uses the point cloud + TS (situation) framework for combined display. When the level of the ball (the level of the ball is measured by the camera height, the higher the level of the ball, the lower the camera height) is relatively low, the point cloud data released by the service is used to realize the first-level situation (point mode), and the target distribution is displayed as a whole. When the level of the ball is higher and enters the regional range, the situation framework is used to request the situation data in the area from the service to realize the loading and scheduling of the second-level (icon mode) and third-level (model mode) situations. The hierarchical drawing in the drawing stage separates the overall situation distribution of the global massive AIS targets and the specific drawing of local targets, which improves the drawing efficiency, breaks through the restrictions on the use of local computing resources, and can show better display effects, especially the rendering capabilities for 3D effects.
[0067] Embodiment three:
[0068] refer to Figure 3 , which shows a three-dimensional rendering system based on an AIS target according to the present invention, comprising:
[0069] The server 31 is used to obtain AIS target data, generate point cloud services and regional target services according to the AIS target data, and publish them;
[0070] The client 32 is used to obtain the camera height in the digital globe, determine the drawing mode of the AIS target according to the camera height and obtain the point cloud service and / or regional target service, and render and display using the determined drawing mode.
[0071] The present invention adopts an organic combination of the server and the client to separate the management and drawing of AIS targets, utilizes the resource advantages of the background server, connects to the data source data, performs point cloud clustering and generates services for the overall target distribution in real time, utilizes the hardware resources of the local computer to draw the targets, improves the efficiency of drawing massive targets, and displays better 3D effects.
[0072] Furthermore, the server is also used to store and manage the acquired AIS target data. The information of each target is stored in the class DynamicTargetItem for management, including the target's id and code, as well as the type, country, etc. Finally, they are all stored in the DynamicTargetItemSet class for unified management. This greatly improves the efficiency of target drawing, and can obtain the information of a certain target in real time, with a clearer physical structure, which provides great convenience for subsequent development.
[0073] Embodiment 4:
[0074] The following is based on Figure 3 The 3D rendering method implemented by the 3D rendering system shown includes:
[0075] The server obtains AIS target data, generates point cloud services and regional target services according to the AIS target data, and publishes them;
[0076] The client obtains the camera height in the digital globe, determines the drawing mode of the AIS target according to the camera height and obtains the point cloud service and / or the regional target service, and renders and displays using the determined drawing mode.
[0077] Wherein, generating a point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service.
[0078] Embodiment five:
[0079] The following is an example to illustrate Figure 3 The working process of the 3D rendering system is shown:
[0080] The server side connects to the data source data and obtains AIS target data;
[0081] Combining the k-means spatial clustering algorithm and the Geohashes grid method, the massive target data is clustered and divided to generate point cloud services: Geohashes is used to process spatial coordinates. Each Geohashes represents a rectangular area, and it can be divided into 32 sub-rectangular areas. A total of more than 1 million small grid areas are divided using a 4-layer structure, and then the k-means algorithm is used to cluster the AIS targets. Each time the target is in a small grid area, the grid count count is increased by 1, and finally a point in the small grid area is randomly selected as the AIS target point, and the count count of the points in this area is saved. This operation is also performed synchronously for other small grid areas.
[0082] Generate regional target service;
[0083] Publish the generated point cloud service and regional target service;
[0084] The client uses the OSG Operation mechanism to monitor the camera height;
[0085] When the camera height is greater than or equal to the first height, the first-level point mode is used for rendering, and point cloud services are obtained from the server, including: the bottom layer is written in C++ language and GLSL high-level shading language, on the open source 3D rendering engine OSG, osgEarth platform, according to the OSG drawing node method, all nodes of global AIS targets are encapsulated as an osg::Geometry object, all targets are stored in an osg::Geometry object in the form of vertex arrays, and then the target point cloud is rendered using batch rendering mechanisms. In the createGeometry function, the overall situation distribution of the global massive AIS targets is drawn, inheriting the NodeCallback mechanism of OSG. In the operator, the OSG update traversal phase updates the overall situation distribution of the massive AIS targets within the camera height.
[0086] When the camera height is less than the first height and greater than or equal to the second height, the second-level icon mode is used for rendering, and point cloud services and regional target services are obtained from the server, including: the underlying layer is written in C++ and GLSL high-level shading language, and on the open source 3D rendering engine OSG and osgEarth platform, a single target is encapsulated as an osg::Node object according to the OSG drawing node method, and placed in an osg::Group for batch rendering.
[0087] When the camera height is less than the second height, the third-level model mode is used for rendering, and the point cloud service and regional target service are obtained from the server. The third-level model mode is similar to the second-level icon mode in drawing and rendering. The main difference is that in the model mode, the target model draws more and finer faces. Therefore, in the model mode, the camera height is the smallest and fewer target points need to be drawn. This greatly improves the drawing and rendering efficiency and makes the overall target drawing appear smoother. In the second-level icon and third-level model modes, the GPU Shader (Graphics Processing Unit Shader) shader rendering framework is used to batch render the targets.
[0088] In the above rendering process, the client obtains the point cloud service and / or the regional target service, receives the clustered data set, and batch renders the targets according to the position coordinates and counts. The rendering color effect is different for different counts. The larger the count, the darker the rendering color.
[0089] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium.
[0090] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A three-dimensional rendering method based on AIS target, characterized in that: include: Obtain AIS target data; Generate and publish point cloud services and regional target services based on the AIS target data; Wherein, generating a point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service, including: Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area; Use a multi-layer structure to divide the interior of each Geohashes into multiple small grid areas; Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm.
2. A three-dimensional rendering method based on AIS target, characterized in that: include: Get the camera height in the digital globe; The drawing mode of the AIS target is determined according to the camera height, including: When the camera height is greater than or equal to the first height, using the point mode; When the height of the camera is greater than or equal to the second height and less than the first height, using the icon mode; When the height of the camera is less than the second height, the model mode is used; wherein the drawing modes of the AIS target include a point mode for presenting the overall situation distribution of the target and an icon mode and a model mode for presenting specific targets in a local area, wherein the target drawn using the model mode has more details than the icon mode; Obtain point cloud services and / or area target services based on the determined drawing mode, including: When using point mode, obtaining the point cloud service; When using the icon mode or the model mode, obtaining the point cloud service and the area target service; Rendering and displaying the AIS target using the determined drawing mode; Wherein, the point cloud service and the regional target service are generated according to the AIS target data; Generating a point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service, including: Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area; Use a multi-layer structure to divide the interior of each Geohashes into multiple small grid areas; Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm.
3. A three-dimensional rendering system based on AIS target, characterized in that: include: The server is used to obtain AIS target data, generate point cloud services and regional target services according to the AIS target data, and publish them; wherein the generating point cloud services according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate point cloud services, including: Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area; Use a multi-layer structure to divide the interior of each Geohashes into multiple small grid areas; Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm; The client is used to obtain the camera height in the digital earth, determine the drawing mode of the AIS target according to the camera height and obtain the point cloud service and / or regional target service, and render and display using the determined drawing mode; wherein, The drawing modes of the AIS target include a point mode for presenting the overall situation distribution of the target and an icon mode and a model mode for presenting specific targets in a local area, wherein the target drawn using the model mode has more details than the target drawn using the icon mode; The determining of the drawing mode of the AIS target according to the camera height includes: When the camera height is greater than or equal to the first height, using the point mode; When the height of the camera is greater than or equal to the second height and less than the first height, using the icon mode; When the height of the camera is less than a second height, using the model mode; The acquiring of the point cloud service and / or the regional target service according to the determined drawing mode includes: When using point mode, obtaining the point cloud service; When using icon mode or model mode, obtain the point cloud service and area target service.
4. The system according to claim 3, characterized in that The server is also used to store and manage the acquired AIS target data.
5. A three-dimensional rendering method based on AIS target, characterized in that: include: The server obtains AIS target data, generates and publishes a point cloud service and a regional target service according to the AIS target data; wherein the generating of the point cloud service according to the AIS target data includes clustering the AIS target data using a k-means spatial clustering algorithm and a Geohashes grid method to generate a point cloud service, including: Use Geohashes to process spatial coordinates, each Geohashes represents a rectangular area; Use a multi-layer structure to divide the interior of each Geohashes into multiple small grid areas; Based on the multiple small grid areas, the AIS targets are clustered using a k-means algorithm; The client obtains the camera height in the digital globe, determines the drawing mode of the AIS target according to the camera height and obtains the point cloud service and / or regional target service, and renders and displays using the determined drawing mode; wherein, The drawing modes of the AIS target include a point mode for presenting the overall situation distribution of the target and an icon mode and a model mode for presenting specific targets in a local area, wherein the target drawn using the model mode has more details than the target drawn using the icon mode; The determining of the drawing mode of the AIS target according to the camera height includes: When the camera height is greater than or equal to the first height, using the point mode; When the height of the camera is greater than or equal to the second height and less than the first height, using the icon mode; When the height of the camera is less than a second height, using the model mode; The acquiring of the point cloud service and / or the regional target service according to the determined drawing mode includes: When using point mode, obtaining the point cloud service; When using icon mode or model mode, obtain the point cloud service and area target service.
