Mass space element efficient topological aggregation method based on WebGIS (Web Geographic Information System)
By adopting the efficient topological aggregation method of massive space elements in the WebGIS system, the client lag and unresponsive problems caused by the traditional WebGIS framework when processing massive camera data is solved, efficient data aggregation and display are realized, and the system capability is improved Maintenance and client fluency.
Patent Information
- Application Number
- CN202411250310.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-21
AI Technical Summary
The traditional WebGIS framework is not effective when dealing with massive camera data, which can easily lead to stuttering and unresponsiveness of the client interface.
The efficient topological aggregation method of massive spatial elements based on WebGIS is adopted. By obtaining camera device information, building database table structure, setting map zoom level, and requesting server data through Ajax on the client to perform grid division and aggregation display.
It realizes fast and efficient topological aggregation and display of massive camera data, avoids client lag and unresponsive problems, and improves client fluency and system maintainability.
Smart Images

Figure CN119493836A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of digital cluster command and dispatch, and in particular relates to a WebGIS-based efficient topological aggregation method for massive spatial elements. Background Art
[0002] Road cameras are widely used. They can not only be used to monitor road traffic conditions, but also for traffic management, road planning, and criminal investigation. Therefore, accessing camera data in the WebGIS system is of great significance to improving social security, maintaining social order, and improving the urban traffic environment. On the other hand, since the data volume of urban cameras is extremely large, the client cannot load it directly, so it is generally displayed in the form of topological aggregation. However, the aggregation method provided by the traditional WebGIS framework is often ineffective when dealing with massive data, and it is very easy to cause problems such as interface freeze and unresponsiveness. Therefore, there is an urgent need for a method to achieve efficient topological aggregation and display for massive camera devices, thereby improving the fluency of the client and the maintainability of the system. The efficient topological aggregation method of massive spatial data of the present invention is designed for this purpose. Summary of the invention
[0003] In view of the problems existing in the prior art, the purpose of the present invention is to provide a technical solution for an efficient topological aggregation method of massive spatial elements based on WebGIS, which can quickly and efficiently perform topological aggregation and display of massive camera data, and solve the problems of client freezing and unresponsiveness caused by excessive data volume.
[0004] The WebGIS-based method for efficiently topologically aggregating massive spatial elements is characterized by comprising the following steps: 1) Obtain camera device information, build a camera information database table structure, and process, configure and store camera information; 2) When the system is initialized, the minimum zoom level, maximum zoom level, and initial zoom level of the map are set, where the minimum zoom level is 7, the maximum zoom level is 17, and the initial zoom level is 10; 3) The client initiates a request to the server through Ajax. The server reads all the records in the data table and returns them to the client. The client stores the returned camera data in the form of a JSON array. 4) If the current map zoom level is less than level 17, the camera data will be aggregated and displayed; 5) If the current map zoom level is equal to level 17, cancel the camera's aggregation state, obtain the camera object within the current screen's visible range, and create features on the map to display them directly.
[0005] The WebGIS-based method for efficiently topologically aggregating a large number of spatial elements is characterized in that the specific method for aggregating and displaying the camera data in step 4 is as follows: First, traverse the camera JSON array to obtain the minimum longitude MinLo, minimum latitude MinLa, maximum longitude MaxLo, and maximum latitude MaxLa in the camera set, and grid the geographical location area of the camera data set based on the map zoom level; Then, according to the minimum longitude and latitude (MinLo, MinLa), the maximum longitude and latitude (MaxLo, MaxLa), and the number of grid rows and columns (Rows, Cols), the row and column intervals (IntervalX, IntervalY) can be calculated. The calculation method is as follows: IntervalX=(MaxLo-MinLo) / Cols IntervalY=(MaxLa-MinLa) / Rows The client creates a hash table to store a collection of grid objects, uses the grid row number and column number as the key of the hash table, and the grid object consisting of longitude, latitude, and number of cameras as the value. It traverses the camera JSON collection and calculates the grid row number Row and column number Col to which each camera belongs. The calculation method is as follows: Row=Math.floor((CameraLa-MinLa) / IntervalY) Col=Math.floor((CameraLo-MinLo) / IntervalX) Key=[Row,Col] After obtaining the row and column numbers, we can count the number of cameras contained in each grid object. This number is the value displayed for each aggregated feature during aggregation. Finally, we traverse the hash table to obtain the grid objects within the visible range of the current screen, and create aggregated features on the map for display.
[0006] The WebGIS-based method for efficient topological aggregation of massive spatial elements is characterized in that the grid is divided as follows: Map zoom level: 7 levels, grid rows: 1×1, number of grid divisions: 1; Map zoom level: 8 levels, grid rows: 4×4, number of grids: 16; Map zoom level: 9 levels, grid rows: 8×8, number of grid divisions: 64; Map zoom level: 10, grid rows: 12×12, number of grids: 144; Map zoom level: 11, grid rows: 24×12, number of grids: 288; Map zoom level: 12, grid rows: 48×24, number of grids: 1152; Map zoom level: 13, grid rows and columns: 96×48, number of grids: 4680; Map zoom level: 14, grid rows and columns: 128×64, number of grids: 8192; Map zoom level: 15, grid rows and columns: 256×128, number of grids: 32768; Map zoom level: 16, grid rows and columns: 512×256, number of divided grids: 131072.
[0007] The method for efficient topological aggregation of massive spatial elements based on WebGIS is characterized in that the camera information database table structure includes field names, data types, meanings and remarks.
[0008] The server of the present invention acts as a centralized manager, realizes automatic configuration of the parameters required for the work of each camera device, can receive the spatial location information and related attribute information of each camera device, realizes fully automated management of the camera device, and finally realizes the topological aggregation and display of the camera data on the client. The application of the present invention can realize efficient topological aggregation and display of massive camera data on the client, can effectively improve the real-time response speed of the client, and at the same time reduce the computing pressure of the client, avoiding the problem of freezing and unresponsiveness of the client under massive spatial data.
[0009] The present invention is applicable to the aggregation and display of massive camera data in a cluster environment, and its main beneficial effects are as follows: 1. Efficient aggregation and display of camera data in cluster fields; 2. Solved the problem of client freezing and unresponsiveness in the case of massive data; 3. It has high universality and is also applicable to other large-volume spatial data (such as POI data); 4. The client is based on the browser and no plug-in needs to be installed. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 The camera aggregation state when the map is not zoomed in to the maximum level; Figure 2 When the map is zoomed in to the maximum level, load the cameras within the visible range. DETAILED DESCRIPTION
[0011] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 This is the camera aggregation state when the map is not zoomed in to the maximum level. The capsule-shaped feature indicates that the camera is in an aggregated state at this time, and the number in the middle indicates the number of cameras here.
[0012] Figure 2 When the map is zoomed in to the maximum level, the cameras within the visible range are loaded. When the map is zoomed in to the maximum level, the aggregation state is canceled and all camera data within the view range is loaded. Different camera types are displayed with different icons, and online and offline cameras are distinguished by blue and gray.
[0013] To implement this method, it is necessary to obtain the camera device information and process the information. To achieve the above goal, the following data table 1 is first designed to configure and store the camera information.
[0014] Table 1, Camera information table Field Name Data Types meaning Remark Id int Primary Key Integer auto-increment sequence number CameraIndexCode char(36) Monitoring point number Character Type GbIndexCode varchar(50) Monitoring point national standard number Character Type Name varchar(50) Monitoring point name Character Type DeviceIndexCode varchar(50) Equipment number Character Type Longitude varchar(50) longitude Character Type Latitude varchar(50) latitude Character Type Altitude varchar(50) high Character Type Pixel int Camera Pixels Integer CameraType int Monitoring point type Integer CameraTypeName varchar(50) Monitoring point type description Character Type InstallPlace varchar(50) Installation location Character Type MatrixCode varchar(50) Matrix Number Character Type ChanNum int Channel Number Integer Viewshed varchar(50) Visibility related Character Type CapabilitySet varchar(50) capability set Character Type CapabilitySetName varchar(50) Capability Set Description Character Type IntelligentSet varchar(50) Intelligent analysis capability set Character Type IntelligentSetName varchar(50) Intelligent Analysis Capability Set Description Character Type RecordLocation varchar(50) Video storage location Character Type RecordLocationName varchar(50) Video storage location description Character Type PtzController int PTZ control Integer PtzControllerName varchar(50) PTZ Control Instructions Character Type DeviceResourceType varchar(50) Equipment type Character Type DeviceResourceTypeName varchar(50) Description of the device type Character Type ChannelType varchar(50) Channel Subtype Character Type ChannelTypeName varchar(50) Channel Subtype Description Character Type TransType int Transport Protocol Integer TransTypeName varchar(50) Transport protocol type description Character Type UpdateTime datetime Monitoring point update time Time Type UnitIndexCode varchar(50) Organization Number Character Type TreatyType varchar(50) Access Agreement Character Type TreatyTypeName varchar(50) Access protocol type description Character Type CreateTime datetime Monitoring point creation time Time Type Status int Online Status Integer StatusName varchar(50) Status Description Character Type After the above database table structure is newly created, the present invention is implemented in the following manner.
[0015] When the system is initialized, the minimum zoom level, maximum zoom level, and initial zoom level of the map are set, where the minimum zoom level is 7, the maximum zoom level is 17, and the initial zoom level is 10. The client initiates a request to the server through Ajax, and the server reads all the records in the data table and returns them to the client. The client stores the returned camera data in the form of a JSON array.
[0016] A. The current map zoom level is less than level 17 If the current map zoom level is less than level 17, the camera data is aggregated and displayed. First, traverse the camera JSON array to obtain the minimum longitude (MinLo), minimum latitude (MinLa), maximum longitude (MaxLo), and maximum latitude (MaxLa) in the camera collection, and divide the geographical location area of the camera data set into grids based on the map zoom level. The number of divided grids is shown in Table 2 below: Table 2. Grid division at different map levels Map zoom level Grid rows and columns The number of grids Level 7 1 x 1 1 Level 8 4 x 4 16 Level 9 8 x 8 64 Level 10 12 x 12 144 Level 11 24 x 12 288 Level 12 48 x 24 1152 Level 13 96 x 48 4680 Level 14 128 x 64 8192 Level 15 256 x 128 32768 Level 16 512 x 256 131072 Then, according to the minimum longitude and latitude (MinLo, MinLa), the maximum longitude and latitude (MaxLo, MaxLa), and the number of grid rows and columns (Rows, Cols), the row and column intervals (IntervalX, IntervalY) can be calculated. The calculation method is as follows: IntervalX=(MaxLo-MinLo) / Cols IntervalY=(MaxLa-MinLa) / Rows The client creates a hash table to store a collection of grid objects. To improve retrieval efficiency, the present invention uses the grid row number and column number as the key of the hash table, and the grid object consisting of longitude, latitude, and camera quantity as the value; traverses the camera JSON collection and calculates the grid row number (Row) and column number (Col) to which each camera belongs. The calculation method is as follows: Row=Math.floor((CameraLa-MinLa) / IntervalY) Col=Math.floor((CameraLo-MinLo) / IntervalX) Key=[Row,Col] After obtaining the row and column numbers, the number of cameras contained in each grid object can be counted, which is the value displayed for each aggregate feature during aggregation. Finally, the hash table is traversed to obtain the grid objects within the current screen visible range, and the aggregate feature display is created on the map.
[0017] B. The current map zoom level is equal to level 17 If the current map zoom level is equal to level 17, cancel the camera's aggregation state, obtain the camera objects within the current screen's visible range, and create features on the map for direct display. The blue icon represents an online camera, and the gray icon represents an offline camera.
[0018] The present invention effectively solves the problem that the traditional WebGIS client cannot load massive camera data. By gridding and counting the camera's geographical area location, the topological aggregation display of the camera data is realized. At the same time, the present invention can effectively reduce the client's computing pressure, improve the client's real-time response speed, and avoid the client's freeze and unresponsiveness. Finally, the method and idea provided by the present invention have high universality, not only applicable to camera data, but also have high reference value for large-volume data such as point of interest POI data and personnel data.
[0019] Notes: MinLo: minimum longitude MinLa: minimum latitude MaxLo: Maximum longitude MaxLa maximum latitude Rows: Number of grid rows: Cols: number of grid columns IntervalX: row interval IntervalY: column interval Math.floor: Function Row: grid row number Col: grid column number Key: The key of the hash table Value: The grid object is the value.
Claims
1. An efficient topological aggregation method for massive spatial elements based on WebGIS, characterized by The steps include: 1) Obtain camera device information, build a camera information database table structure, and process, configure and store camera information; 2) When the system is initialized, the minimum zoom level, maximum zoom level, and initial zoom level of the map are set, where the minimum zoom level is 7, the maximum zoom level is 17, and the initial zoom level is 10; 3) The client initiates a request to the server through Ajax. The server reads all the records in the data table and returns them to the client. The client stores the returned camera data in the form of a JSON array. 4) If the current map zoom level is less than level 17, the camera data will be aggregated and displayed; 5) If the current map zoom level is equal to level 17, cancel the camera's aggregation state, obtain the camera object within the current screen's visible range, and create features on the map to display them directly.
2. The WebGIS-based high-efficiency topological aggregation method for massive spatial elements according to claim 1 is characterized in that The specific method for aggregating and displaying the camera data described in step 4 is as follows: First, traverse the camera JSON array to obtain the minimum longitude MinLo, minimum latitude MinLa, maximum longitude MaxLo, and maximum latitude MaxLa in the camera set, and grid the geographical location area of the camera data set based on the map zoom level; Then, according to the minimum longitude and latitude (MinLo, MinLa), the maximum longitude and latitude (MaxLo, MaxLa), and the number of grid rows and columns (Rows, Cols), the row and column intervals (IntervalX, IntervalY) can be calculated. The calculation method is as follows: IntervalX=(MaxLo-MinLo) / Cols IntervalY=(MaxLa-MinLa) / Rows The client creates a hash table to store a collection of grid objects, uses the grid row number and column number as the key of the hash table, and the grid object consisting of longitude, latitude, and number of cameras as the value. It traverses the camera JSON collection and calculates the grid row number Row and column number Col to which each camera belongs. The calculation method is as follows: Row=Math.floor((CameraLa-MinLa) / IntervalY) Col=Math.floor((CameraLo-MinLo) / IntervalX) Key=[Row,Col] After obtaining the row and column numbers, we can count the number of cameras contained in each grid object. This number is the value displayed for each aggregated feature during aggregation. Finally, we traverse the hash table to obtain the grid objects within the visible range of the current screen, and create aggregated features on the map for display.
3. The WebGIS-based high-efficiency topological aggregation method for massive spatial elements according to claim 2 is characterized in that The grid is divided as follows: Map zoom level: 7 levels, grid rows: 1×1, number of grid divisions: 1; Map zoom level: 8 levels, grid rows: 4×4, number of grids: 16; Map zoom level: 9 levels, grid rows: 8×8, number of grid divisions: 64; Map zoom level: 10, grid rows: 12×12, number of grids: 144; Map zoom level: 11, grid rows: 24×12, number of grids: 288; Map zoom level: 12, grid rows: 48×24, number of grids: 1152; Map zoom level: 13, grid rows and columns: 96×48, number of grids: 4680; Map zoom level: 14, grid rows and columns: 128×64, number of grids: 8192; Map zoom level: 15, grid rows and columns: 256×128, number of grids: 32768; Map zoom level: 16, grid rows and columns: 512×256, number of divided grids: 131072.
4. The WebGIS-based high-efficiency topological aggregation method for massive spatial elements according to claim 1 is characterized in that The camera information database table structure includes field name, data type, meaning and remarks.