Summary of the invention
The technical matters that (one) will solve
The technical problem to be solved in the present invention is: in the WebGIS of existing B/S framework platform, how to realize real-time update and demonstration to a large amount of goer cursor position, realize the Real Time Monitoring to a large amount of goer cursor position.
(2) technical scheme
In order to solve the problems of the technologies described above, the invention provides a kind of goer cursor position real-time update and display system, it comprises:
Data reception module receives goer target position data in real time, and this position data is converted in the memory headroom that consolidation form is buffered in system;
The real time position data service module comprises the raster data service module and the vector data service module that are connected with described data reception module respectively; Described raster data service module obtains more new data of goer target position in real time from described data reception module, and according to the amplitude size that its position changes, regenerates the grating image data under each display level, is buffered in described memory headroom; Described vector data service module is obtained more new data of goer target position in real time from described data reception module, renewal is buffered in the goer cursor position tables of data of described memory headroom, and goer cursor position data are upgraded in the grid container of dividing according to geographic range;
Client goer cursor position Data Update and display module, be connected with described real time position data service module, whether client browser surpasses according to the goer mark quantity in current map indication range effective drafting upper limit that browser is drawn object vector, periodically to described raster data service module request grating image data or to described vector data service module request position new data more, and show the grating picture of asking or redraw the goer mark vector that in current map dynamic layer, the position occurs to upgrade and show object.
In above-mentioned goer cursor position real-time update and display system, described grid container is arranged in described memory headroom, and described grid container is for being divided into several rows and the formed grid of some row with the location point in the global geographic scope according to geographic range etc.
The invention also discloses a kind of goer cursor position real-time update and display packing, it comprises following process:
S1: data reception module receives goer target position data in real time by communication network, and this position data is converted in the memory headroom that consolidation form is buffered in system;
S2: the raster data service module in the real time position data service module obtains more new data of goer target vector position in real time from described data reception module, and big or small according to the amplitude of its position change, regenerate the grating image data under each display level, be buffered in described memory headroom; Vector data service module in the real time position data service module is obtained more new data of goer target position in real time from described data reception module, renewal is buffered in the goer cursor position tables of data of described memory headroom, and goer cursor position data are upgraded in the grid container of dividing according to geographic range;
S3: whether the client browser in client goer cursor position Data Update and display module surpasses according to the goer mark quantity in current map indication range effective drafting upper limit that browser is drawn object vector, the new data more to described real time position data service module request grating image data or position periodically, and show the grating picture of asking or redraw the goer mark vector that in current map dynamic layer, the position occurs to upgrade and show object.
In above-mentioned goer cursor position real-time update and display packing, described process S2 specifically comprises following process:
S201: described raster data service module is new data more to each goer target of described data reception module request position;
S202: from the goer cursor position tables of data that is buffered in described memory headroom, each goer mark that the position is changed upgrades position data one by one;
S203: according to above-mentioned position new data more, the Regeneration dynamics thing is marked on the grating image data under each engineer's scale display level successively.
In above-mentioned goer cursor position real-time update and display packing, described process S2 also comprises following process:
S301: described vector data service module is new data more to each goer target of described data reception module request position;
S302: from the goer cursor position tables of data that is buffered in described memory headroom, each goer mark that the position is changed upgrades position data one by one;
S303: according to above-mentioned position new data more, upgrade successively the goer cursor position data in each grid container.
In above-mentioned goer cursor position real-time update and display packing, described process S3 specifically comprises following process:
S401: client is in goer mark monitor state, and client browser upgrades with display system by the goer cursor position and automatically sends the update request of goer cursor position data to backstage real time position server with regular time gap periods ground; Perhaps
S402: the client user is in the state of the shown map of operating browser, and browser redraws map, and the goer cursor position is upgraded and sent the update request of goer cursor position data with display system to backstage real time position server;
After described process S401 or S402, also comprise following process:
S403: upgrade request with display system according to above-mentioned position, client goer cursor position Data Update and the display module goer mark quantity in the current map indication range of backstage real time position server request;
S404: judge whether the goer mark quantity in current map indication range surpasses effective drafting upper limit that client WebGIS platform is drawn object vector, if surpass, steering procedure S405; If do not surpass, steering procedure S406;
S405: client goer cursor position Data Update and display module all goer target grating image datas in the current map indication range of raster data service module request; After receiving the grating image data, carry out process S407; Process S407 is specially: browser is presented at described grating picture in map;
S406: client goer cursor position Data Update and display module all goer cursor position in the current map indication range of vector data service module request are new data more; Receive that the goer cursor position more after new data, carries out process S408;
Process S408 is specially: browser redraws the goer mark object vector that in current map dynamic layer, the position generation is upgraded.
In above-mentioned goer cursor position real-time update and display packing, described process S405 specifically comprises: client goer cursor position Data Update and display module are according to the geographic range of current demonstration, calculate the ranks number of each grating picture under current map scale display level, and successively to the grating image data of each ranks of raster data service module request.
In above-mentioned goer cursor position real-time update and display packing, described grid container is arranged in described memory headroom, and described grid container is for being divided into several rows and the formed grid of some row with the location point in the global geographic scope according to geographic range etc.
(3) beneficial effect
In the goer cursor position real-time update that technique scheme provides and the system and method for demonstration, based on grating-vector data integrated technique, on the WebGIS of current main-stream platform, it is in limited time upper that goer mark quantity surpasses the effective drafting of WebGIS platform in the map indication range, and map platform loads goer target dynamic layer shows with the form of grating picture; Effectively draw in limited time upper when goer mark quantity does not surpass the WebGIS platform, dynamic layer shows that with vector the form of object shows each goer mark, thereby realize position real-time update and the demonstration of a large amount of goer marks (tens of thousands) in client browser, can also satisfy simultaneously a large number of users demand of online browse simultaneously, the goer mark quantity that client can be monitored simultaneously expands to hundreds of thousands and even 1,000,000.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples are used for explanation the present invention, but are not used for limiting the scope of the invention.
In the WebGIS system, realization is to the goer mark, it is also the Real Time Monitoring of mobile terminal locations, constantly (take the set time as the interval by client, periodically) to the position data of the monitored terminal of location server request of server end, and it is plotted in realizes in the dynamic layer of client map platform.
The embodiment of the present invention for be the location monitoring system of mobile terminal One's name is legion, as: vessel position service system or vehicle monitoring system, the WebGIS platform that this system uses are the B/S frameworks (as Google Maps, Baidu's map etc.) of current main-stream.Map provides various display levels, and is from showing the 1st grade of the 18th rank that is clipped to demonstration avenue details drawing of global range skeleton diagram, even more detailed.
The main thought of the grating that the embodiment of the present invention is used-vector integration technology is: in the time of the mobile terminal One's name is legion in client map indication range (maximal value (as 2000) that surpasses the mobile terminal quantity that the WebGIS platform can draw), the dynamic layer of map platform loads mobile terminal is with the form demonstration (picture formats such as jpg, png) of grating picture.When the geographic range of map demonstration is wide, map summary, mobile terminal One's name is legion.The grating picture that shows mobile terminal is generated automatically by location server, along with server is transferred to client browser to the response of client-requested, is loaded in dynamic layer and is presented on map.When geographic range that map shows was less, map was detailed, the mobile terminal negligible amounts.In the time of the mobile terminal negligible amounts in client map indication range (maximal value that surpasses the mobile terminal quantity that the WebGIS platform can draw is as 2000), dynamic layer shows each mobile terminal with the form of vector demonstration object.Client sends request to location server, obtains the location data of terminals in current demonstration geographic range, shows that by vector the form of object is plotted in dynamic layer, and is presented on map.Grating-vector integration technology, the very wide efficient demonstration to a large amount of mobile terminal locations skeleton diagrams of map indication range both guaranteed in the situation that can be satisfied again in the situation that the detailed demonstration of map is checked drafting true to nature and the details of mobile terminal in subrange.
In the present embodiment the modular structure schematic diagram of mobile terminal locations real-time update and display system as shown in Figure 1, it mainly comprises following four modules:
(1) data reception module: receive in real time the latest position data of each mobile terminal reporting, be buffered in memory headroom after consolidation form.
(2) raster data service module: be connected with data reception module, the position that obtains in real time each mobile terminal from data reception module is new data more, and according to the amplitude size that the position changes, regenerate the grating image data under each display level, and be buffered in memory headroom.
(3) vector data service module: be connected with data reception module, obtain in real time the position data of each mobile terminal from data reception module, renewal is buffered in the mobile terminal data table in internal memory, and each location data of terminals is placed in the grid container of dividing according to geographic range (being buffered in internal memory).
(4) client mobile terminal locations Data Update and display module: client browser is according to the mobile terminal quantity in current map indication range, termly (take the set time as the interval, periodically) to raster data service module request grating image data, or to vector data service module request vector position new data more, and show the grating picture or redraw those terminals that the position in dynamic layer occurs to upgrade and show objects.
mobile terminal locations real-time update and display packing that the embodiment of the present invention relates to, its principle of work is: at first the raster data service module of server end and vector data service module are obtained respectively the location data of terminals of latest update in real time from data reception module, and generate respectively new grating picture and upgrade terminal location vector data in grid container, then the regular Data Update request of customer in response end, the terminal vector data that generation in up-to-date grating image data or grid container is upgraded returns to client, last client shows the grating picture or redraws has the terminal that the position is upgraded to show object in dynamic layer.
Based on said system and Method And Principle, the realization of the embodiment of the present invention is described below:
(1) data reception module.In case its position of each mobile terminal changes, can report its latest position data to the data receiver server by communication network (internet or wireless network).After data reception module upgrades data preparation with the position, be converted in the location data of terminals table that consolidation form is kept at memory headroom, wait for that the real time position data service extracts more new data.
(2) raster data service module.The raster data service module obtains each mobile terminal in real time from data reception module position is new data more, and according to the amplitude size that the position changes, regenerates the grating image data under each display level, and be buffered in memory headroom.
The function of raster data service module is: in the real time position server of backstage, generate in advance the grating picture of all mobile terminals under each display level; When client is sent request to backstage real time position service, when needing to show the latest position of interior a large amount of mobile terminals on a large scale, the real time position service returns to each grating image data in its indication range of client, allow client rapidly with these Image Displays in the dynamic layer of map.
Show these terminal grating pictures that generate in advance in map, show object compared with draw one by one each terminal vector in dynamic layer by each terminal real time position data, render speed improves a lot, and drawing efficiency has obtained huge lifting.In addition, server is less to the grating picture data stream that comprises a large amount of mobile terminals of client passback, lack much than the data stream of the vector position data of the mobile terminal that transmits same quantity, greatly reduced like this network pressure that the data transmission of server and client causes.
The concrete course of work of raster data service module comprises as shown in Figure 2:
S201: to the more new data of all mobile terminals of data reception module request.
S202: from the location data of terminals table that is buffered in memory headroom, each terminal that the position changes is upgraded position data one by one.Here, the location data of terminals table in internal memory, preservation be the up-to-date position data that reports (longitude and latitude position, speed, travel direction, state etc.) of all terminals.
S203: upgrade successively the grating image data under each engineer's scale rank.
Under each display level, the grating picture size of terminal location is set to wide and height and is 256 pixels (but being not limited to this pixel size), and identical with map tile size in common WebGIS platform, the mode of dividing ranks is also consistent.Under each engineer's scale rank, in memory headroom, all there is the caching container record the terminal list that each grating picture comprises.This corresponding with the grating picture, the container of each location data of terminals set that comprises in buffer memory grating picture is called tile (Tile) container.
Preserved when generating its corresponding grating picture the position data of each terminal in this picture in the tile container.After the raster data service module gets the more new data of mobile terminal to data reception module, can judge one by one under each displaying ratio chi rank, the position of each terminal in all tile containers changes situation.If when the terminal quantity that the generation of the position in certain tile container significantly changes is more (as greater than 5), needs to regenerate this grating picture, and upgrade each location data of terminals in its tile container.Here, the position marked change occurs is defined as: the position of latest position when generating the grating picture last time differs on this displaying ratio chi rank and surpasses 5 pixels and (but be not limited to 5 pixels; Think on display screen, more than spacing distance 5 pixels that the position of people's naked eyes energy perception obviously changes).
Grating picture under all displaying ratio chi ranks upgrades to be completed, and the grating picture request of data of client is waited for or monitored to the raster data service module, and its actual mechanical process is:
S204: with the very little time interval (as 0.5 second), periodically judge the state of raster data service module, if system is idle, need to process without any client-requested, turn over journey S201, again position, requesting terminal new data and upgrade the grating image data more; Otherwise, carry out process S205: process and do not complete affairs, the grating picture request of data of customer in response end.
(3) vector data service module.The vector data service module is the new data more from position that data accept to obtain module each mobile terminal in real time, renewal is buffered in the mobile terminal data table in internal memory, and each location data of terminals is placed in the grid container of dividing according to geographic range (being buffered in internal memory).
The concrete course of work of vector data service module comprises as shown in Figure 3:
S301: to the more new data of all mobile terminals of data reception module request.
S302: from the location data of terminals table that is buffered in memory headroom, each terminal that the position changes is upgraded its position data one by one.
S303: upgrade successively the terminal positional information in each grid container.
Tile container class in grid container and raster data service module seemingly, is all the location point in the global geographic scope to be divided into the grid of several rows (direction parallel with parallel) and some row (with the direction through line parallel) according to geographic range etc.Such as, grid container can be defined as: global geographic scope just is divided into 2 according to longitude and latitude
13Row and 2
13The grid scope (but being not limited to this journey columns) of row.Each constantly, each mobile terminal is kept at positional information the grid that it is arranged according to its longitude and latitude position.The data capsule of this buffer memory location information of mobile terminal is called as grid container.Exist the grid container of mobile terminal to be buffered in (but being not limited in memory headroom) in memory headroom.
When the vector data service module to position that data reception module gets terminal new data more, after the location data of terminals table in updating memory, need simultaneously to upgrade the position data in corresponding grid container.
After handling the location data of terminals renewal in all grid container, the vector data update request of wait or snoop responses client, its actual mechanical process is:
S304: with the very little time interval (as 0.5 second), periodically judge the state of vector data service module.If system is idle, need to process without any client-requested, turn over journey S301, again position, requesting terminal new data and upgrade grid container more; Otherwise, carry out process S305: process and do not complete affairs, the vector data update request of customer in response end.
(4) client mobile terminal locations Data Update and display module.Browser is according to the mobile terminal quantity in current map indication range, take the set time as the interval, periodically to raster data service module request grating image data, or to vector data service module request vector position new data more, and show the grating picture or redraw those terminals that the position in dynamic layer occurs to upgrade and show objects.
The concrete course of work of client mobile terminal locations Data Update and display module comprises as shown in Figure 4:
S401: client is in goer mark monitor state, and the position is upgraded with display system and periodically automatically sent the request of Regeneration dynamics thing cursor position data to backstage real time position server with regular time interval (as 10 seconds); Perhaps
S402: the client user is if at operation map (as movement, convergent-divergent map), and browser can redraw map, and the position is upgraded with display system also can send the request of upgrading location data of terminals to the real time position server.
S403: upgrade request with display system according to above-mentioned position, client goer cursor position Data Update and the display module goer mark quantity in the current map indication range of backstage real time position server request;
S404: judge whether the goer mark quantity in current map indication range surpasses effective drafting upper limit (as 2000) that browser is drawn object vector, if surpass, steering procedure S405; If do not surpass, steering procedure S406;
S405: client goer cursor position Data Update and display module all grating image datas in the current map indication range of raster data service module request.According to the geographic range of current demonstration, calculate under current map display level, the ranks of each grating picture number, and successively to the grating image data of each ranks of location server request.After receiving the grating image data of raster data service module passback, turn S407.
S406: client goer cursor position Data Update and the display module updating of terminal position data in the current indication range of vector data service module request.According to the geographic range of current demonstration, send the update request of the terminal vector position data in current indication range to the real time position server.The vector position of receiving server passback more after new data, turns S408.
S407: browser display grating picture.Client is loaded into dynamic layer with the grating picture, and is presented in map after the grating image data of position server passback.
S408: browser is drawn the terminal vector and is shown object.The terminal location vector that client is received location server passback is more after new data, redraws the terminal that these positions in dynamic layer occur to upgrade and shows object.
The terminal vector position of backstage location-based service passback is new data more, take grid container as data cell, provides the terminal location vector data of all latest updates in current indication range.
Memory headroom described in above-described embodiment also can be replaced with other kind storage modes such as disk, SD cards, preferably uses the memory headroom of system can improve data processing speed, accelerates map and shows.
Have the real time position supervisory system of a large amount of mobile terminals, as global vessel position supervisory system or hackney vehicle supervisory system, the terminal data amount of networking reaches several ten thousand even 1,000,000.When the geographic range of map demonstration was wide, the mobile terminal quantity in the map indication range was very large.As: under the 7th displaying ratio chi rank of Google Maps, the map indication range covers the vast Area of The East China Seas such as Shanghai, Ningbo, Zhoushan Islands, it is even up to ten thousand that some time is engraved in large-scale merchant ship movable in this scope common much 5,000, if comprise small-sized merchant ship, fishing boat, ships quantity can be much more than 100,000 so again.For like this a large amount of boats and ships, show object if draw its vector in the map dynamic layer of client WebGIS platform, can be consuming time very long, can cause also that system is long-time busy even can collapse.In addition, to the vector position of these a large amount of boats and ships of location server request new data more, the data stream of server passback is very large, can cause server network to block up at every turn for client, online demand when can not satisfy than the multi-user.
Above-described embodiment propose based on the integrated mobile terminal locations real-time update of grating-vector data and display system and method, in mobile terminal One's name is legion in the map indication range (when surpassing the mobile terminal transformation that client WebGIS platform can draw), shown is the grating image data of a large amount of mobile terminals, and these grating image datas are to generate by the raster data service module of backstage location server is automatic.Therefore, client map platform adds the speed that shows these grating pictures in its dynamic layer very fast, and display efficiency is very high.Simultaneously, every grating picture data volume all less (in the hundreds of byte), client can not cause the excessive network pressure of location server to the request of these grating image datas.Like this, the supervisory system whole efficiency is very high, experiences for simultaneously online user also fine.Such as, above-mentioned global vessel position supervisory system, location-based service is deployed on the logical IBM server of a Daepori, under the network traffics of 10Mb/s bandwidth, when can support to reach nearly ten thousand users online (each user can monitor the dynamic boats and ships of the very dense Area of The East China Sea of above-mentioned boats and ships simultaneously).
In mobile terminal negligible amounts in the map indication range (when surpassing the mobile terminal transformation that client WebGIS platform can draw), demonstration be the object vector of the interior mobile terminal of current indication range.The user can clearly see the multidate informations such as the translational speed, direction, state of each terminal on map, also can click certain object vector, checks the details such as title, profile of this terminal.The vector display mode of mobile terminal provides various methods of operating very flexibly to the user, for the user brings extraordinary operating experience.Owing to having used the caching method of grid container in the vector data service module, at the customer in response end to each terminal vector data update request in current indication range the time, can find fast all terminal vector datas in this scope by grid container.The caching method of this grid container, both guaranteed upgrading in time to client vector position data, effectively reduce again the volume of transmitted data of server and client, greatly reduce the network pressure of server, guaranteed the support simultaneously online to a large number of users.For example, above-mentioned global vessel position supervisory system is in the Google Maps of 1280*1024 pixel in indication range, under the 13rd grade of engineer's scale display level, all dynamic boats and ships in marine site, PORT OF SHANGHAI is monitored.At interval of 15 seconds, client automatically to backstage location server request should the zone vessel position new data more, at every turn more amount of new data all in the 3KB left and right.Location-based service is deployed on the logical IBM server of a Daepori, under the network traffics of 10Mb/s bandwidth, when can support nearly ten thousand users online (monitoring simultaneously the dynamic boats and ships in marine site, PORT OF SHANGHAI).And one of several maximum harbours that to be the world today few in number, PORT OF SHANGHAI, its boats and ships turnover quantity is very large.As seen, the global vessel position supervisory system of using method of the present invention to realize, its performance is very outstanding.
In a word, the mobile terminal locations real-time update that the embodiment of the present invention proposes and display system and method have solved on the WebGIS of B/S framework platform the problem to a large amount of goer target position real-time update and demonstration well.Both guaranteed in client, a large amount of goer targets positions real-time update to be shown with efficient, effectively reduced again the volume of transmitted data between server and client simultaneously, reduced the pressure of server network transmission, guaranteed the simultaneously online demand of a large number of users.
The above is only the preferred embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the technology of the present invention principle; can also make some improvement and replacement, these improvement and replacement also should be considered as protection scope of the present invention.