Summary of the invention
The application's technical matters to be solved is to provide a kind of method that moving target information is showed in polymerization in mobile monitoring, can obtain rationally and the displaying of polymerization accurately result at rational polymerization location point, thereby can improve the user to the experience of System of Monitoring Mobile Target.
Accordingly, the application also provides a kind of client and a kind of server, in order to ensure said method application in practice.
In order to address the above problem, the application discloses a kind of method that moving target information is showed in polymerization in mobile monitoring, comprising:
Server receives from the polymerization of client shows request, and wherein, the position No. that includes the net region in request is showed in described polymerization;
Server is showed request according to described polymerization, obtains the moving target information of described net region;
Server is with the position No. of described net region, mate with the position No. that intersects grid in index file, if the match is successful, the positional information that should intersect conflict geographic element in grid of storing in described index file is evaded positional information as the zone;
Server is evaded positional information with described moving target information and zone and is returned to client;
Client is calculated the polymerization location point of described net region, and evades positional information in this polymerization location point and described zone when equating, this polymerization location point is adjusted;
Show described moving target information on polymerization location point after client is adjusted in described net region.
Preferably, set up described index file by following steps:
Server obtains the electronic map data that mobile monitoring uses;
Server is divided into described electronic map data the grid of position No.;
Server detects the crossing grid that intersects with the geographic element of conflicting, and will intersect the position No. of grid and be somebody's turn to do the positional information that intersects conflict geographic element in grid, is stored to index file.
Preferably, the described step that this polymerization location point is adjusted comprises:
Client is evaded positional information when equating in this polymerization location point and described zone, this polymerization location point moves and/or move down and/or move to left and/or move to right in described net region.
Preferably, the grid format that also includes the net region in request is showed in described polymerization, and wherein, described grid format is used for a net region is subdivided into a plurality of sub-grids;
Request is showed in the described polymerization of described foundation, obtains the step of the moving target information of described net region, comprising:
Server obtains the positional information of moving target in described net region according to locating device;
Server is added up respectively minute number of the interior moving target of sub-grid in described net region, and calculates the total number of the interior moving target of all-ones subnet lattice in described net region, to divide number and the total number moving target information as described network area;
The step of the polymerization location point of the described net region of described calculating comprises:
Client is according to the moving target information of described network area, with the central point of the sub-grid of density maximum in the described net region polymerization location point as described net region.
Preferably, the administrative area code that also includes user ID and described net region in request is showed in described polymerization;
Showing request according to described polymerization, before obtaining the moving target information of described net region, described method also comprises:
Server obtains the role of described user ID;
Server obtains the role's of described user ID authority;
Server judges according to the administrative area code of described net region whether the role's of described user ID authority has for described net region, if, carry out according to described polymerization and show request, obtain the step of the moving target information of described net region.
Preferably, also include user ID and moving target type in described polymerization displaying request;
Described method also comprises:
Server obtains the role of described user ID;
Server obtains the role's of described user ID authority;
Server judges whether the role's of described user ID authority has for described moving target type, if, carry out according to described polymerization and show request, obtain the step of the moving target information of described net region;
Request is showed in the described polymerization of described foundation, and the step that obtains the moving target information of described net region is, shows request according to described polymerization, obtain described net region with the corresponding moving target information of described moving target type.
Preferably, described moving target comprises moving vehicle or mobile terminal.
On the other hand, disclosed herein as well is a kind of mobile monitoring server, comprising:
Interface arrangement, request is showed in the polymerization that is used for receiving from client, wherein, the position No. that includes the net region in request is showed in described polymerization;
The moving target information deriving means is used for showing request according to described polymerization, obtains the moving target information of described net region;
Coalignment, being used for will be according to the position No. of described net region, mate with the position No. that intersects grid in index file, if the match is successful, the positional information that should intersect conflict geographic element in grid of storing in described index file is evaded positional information as the zone; And
Return mechanism is used for that positional information is evaded in described moving target information and zone and returns to client.
Preferably, described server also comprises:
The index file apparatus for establishing comprises:
Data acquisition module is used for obtaining the electronic map data that mobile monitoring uses;
Cut apart module, be used for described electronic map data is divided into the grid of position No.;
Detection module is for detection of the crossing grid that intersects with the geographic element of conflicting; And
Memory module, the positional information that is used for intersecting the position No. of grid and should intersects conflict geographic element in grid is stored to index file.
Preferably, the grid format that also includes the net region in request is showed in described polymerization, and wherein, described grid format is used for a net region is subdivided into a plurality of sub-grids;
Described moving target information deriving means comprises:
Position information acquisition module is for obtain the positional information of moving target in described net region according to locating device;
Statistical module is used for adding up respectively minute number of moving target in the sub-grid of described net region, and calculates the total number of the interior moving target of all-ones subnet lattice in described net region, to divide number and the total number moving target information as described network area.
Preferably, the administrative area code that also includes user ID and described net region in request is showed in described polymerization;
Described server also comprises:
First role's deriving means is for the role who obtains described user ID;
The first authority acquiring device is for the role's who obtains described user ID authority;
The first judgment means, be used for the administrative area code according to described net region, whether the authority that judges the role of described user ID has for described net region, if, trigger described moving target information deriving means and carry out according to described polymerization displaying request, obtain the step of the moving target information of described net region.
Preferably, also include user ID and moving target type in described polymerization displaying request;
Described server also comprises:
Second role's deriving means is for the role who obtains described user ID;
The second authority acquiring device is for the role's who obtains described user ID authority;
The second judgment means is used for judging whether the role's of described user ID authority has for described moving target type, if trigger described moving target information deriving means;
Described moving target information deriving means, concrete be used for carrying out according to described polymerization show request, obtain described net region and the step corresponding moving target information of described moving target type.
Preferably, described moving target comprises moving vehicle or mobile terminal.
On the other hand, disclosed herein as well is a kind of mobile monitoring client, comprising:
Dispensing device is used for sending polymerization to the mobile monitoring server and shows request, and wherein, the position No. that includes the net region in request is showed in described polymerization;
Receiving trap is used for receiving described mobile monitoring server and shows that for described polymerization moving target information and zone that request is returned evade positional information;
Calculation element is used for calculating the polymerization location point of described net region;
Adjusting gear is used for evading in this polymerization location point and described zone positional information when equating, this polymerization location point is adjusted; And
Exhibiting device is showed described moving target information on the polymerization location point after being used for adjusting in described net region.
Preferably, described adjusting gear concrete is used for evading in this polymerization location point and described zone positional information when equating, this polymerization location point moves and/or move down and/or move to left and/or move to right in described net region.
Preferably, described moving target information comprises the total number that divides the interior moving target of all-ones subnet lattice in number and described net region of the interior moving target of sub-grid in described net region;
Described calculation element, the concrete moving target information that is used for according to described network area is with the central point of the sub-grid of density maximum in the described net region polymerization location point as described net region.
Compared with prior art, the application has the following advantages:
The application equates if this polymerization location point is evaded positional information with described zone after calculating the polymerization location point of described net region in client, this polymerization location point is adjusted; Owing to the polymerization location point after adjusting and zone evading positional information and not waiting, so, the conflict geographic element can effectively be evaded, be also, can avoid number of vehicles information to drop in river region, and period of the day from 11 p.m. to 1 a.m networking moving target information of number drop in the zone, mountain range etc.; Therefore, can obtain rationally and the displaying of polymerization accurately result at rational polymerization location point, thereby can improve the user to the experience of System of Monitoring Mobile Target.
Secondly, the application can also adopt the described moving target information of JSON format record and zone to evade positional information, so that the faster processing relevant information of browser end.。
Moreover the application can also use grid format a net region is subdivided into a plurality of sub-grids, and with the central point of the sub-grid of density maximum in the net region polymerization location point as this net region; Due to the distribution of density reflection moving target in a plurality of sub-grids, so, with the central point of the sub-grid of the density maximum polymerization location point as this net region, can improve the rationality of polymerization location point, be also, can obtain more reasonable and the displaying of polymerization accurately result at more rational polymerization location point, thereby can improve the user to the experience of System of Monitoring Mobile Target.
Further, the application can also show information such as administrative area code, moving target type in request by polymerization, based on role access control model, to improve the security of mobile monitoring.
Embodiment
For above-mentioned purpose, the feature and advantage that make the application can become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
One of core idea of the embodiment of the present application is, evade the conflict geographic element when the selective polymerization location point, particularly, calculate the polymerization location point of described net region in client after, if this polymerization location point is evaded positional information with described zone and equated, this polymerization location point is adjusted; Owing to the polymerization location point after adjusting and zone evading positional information and not waiting, so, the conflict geographic element can effectively be evaded, be also, can avoid number of vehicles information to drop in river region, and period of the day from 11 p.m. to 1 a.m networking moving target information of number drop in the zone, mountain range etc.; Therefore, can obtain rationally and the displaying of polymerization accurately result at rational polymerization location point, thereby can improve the user to the experience of System of Monitoring Mobile Target.
With reference to Fig. 1, show the application a kind of in mobile monitoring polymerization show the process flow diagram of the embodiment of the method for moving target information, specifically can comprise:
Step 101, server receive from the polymerization of client shows request, and wherein, the position No. that can include the net region in request is showed in described polymerization;
The application can be applied in various System of Monitoring Mobile Targets, is used for polymerization and shows moving target information.Here, moving target mainly can comprise moving vehicle, mobile terminal (as mobile phone) etc., described moving target information mainly can comprise the information of number of moving target etc., and in fact, the application is not limited concrete moving target and moving target information.
With reference to Fig. 2, show the schematic diagram of a kind of System of Monitoring Mobile Target of the application, it specifically can comprise client 201, server 202 and moving target 203; Wherein, GPS receiver 231 is housed in moving target 203, be used for receiving the gps signal from gps satellite, and this gps signal is defined as the positional information of moving target 203, position information transmitter 232 also is housed in moving target 203, be used for the positional information of moving target 203 is sent to server 202, here, position information transmitter 232 can adopt the communications such as less radio-frequency, SMS, GPRS to send the positional information of moving target 203; In like manner, position information receiver 221 in server 202 also can adopt a kind of positional information that receives described moving target 203 in above-mentioned communication, and obtain corresponding moving target information by moving target information deriving means 222, and return to client 201.In a word, concrete send mode and the receive mode of the application's location information are not limited.
In practice, System of Monitoring Mobile Target shows electronic chart in client usually, and, electronic chart can also provide the function of the position No. that obtains the net region, also namely, the user wants which net region to carry out polymerization for shows, utilizes the function of electronic chart to obtain the position No. of this net region, then, show that to the corresponding polymerization of server transmission request gets final product by the function of electronic chart.
Like this, the application's client is can be when showing electronic chart, and each regional moving target information of net is showed in polymerization on electronic chart.The data relevant due to moving target are magnanimity, under some monitoring occasion, if the moving target information to the net region carries out the polymerization displaying, rather than the positional information of showing each moving target of net region, can improve the speed of displaying, and the monitoring demand that also can satisfy under certain occasion is showed in this polymerization.
Step 102, server are showed request according to described polymerization, obtain the moving target information of described net region;
In practice, server can obtain according to locating devices such as GPS the positional information of moving target in described net region, and adds up the number of moving target in described net region, just can obtain the moving target information of described net region.
Step 103, server are with the position No. of described net region, mate with the position No. that intersects grid in index file, if the match is successful, the positional information that should intersect conflict geographic element in grid of storing in described index file is evaded positional information as the zone;
Under off-line state, can by following steps set up for the conflict geographic element index file:
Steps A 1, server obtain the electronic map data that mobile monitoring uses;
Steps A 2, server are divided into described electronic map data the grid of position No.;
Steps A 3, server detect the crossing grid that intersects with the geographic element of conflicting, and will intersect the position No. of grid and be somebody's turn to do the positional information that intersects conflict geographic element in grid, are stored to index file.
In practice, those skilled in the art can according to the needs of mobile monitoring, select the electronic map data in regional extent, for example, described regional extent can be the world, China, Beijing etc., and the application is not limited the related regional extent of electronic map data.For example, server can be divided into the electronic map data in Chinese scope several networks, wherein, the size of each grid is 256 * 256, and the numbering of each grid can identify with position No., for example, the position No. of Beijing's grid is: row (L, Line) 1000, row (R, Row) 800 etc.
In specific implementation, those skilled in the art can be according to the needs of mobile monitoring, select and determine the conflict geographic element, for example, can determine that described conflict geographic element can comprise water system key element and mountain range key element, then, set up corresponding index file for water system key element and mountain range key element respectively.
About how to set up index file for the conflict geographic element, at first the embodiment of the present application can seek the conflict geographic element in electronic map data, then detect the crossing grid that intersects with the geographic element of conflicting, and will intersect the position No. of grid and be somebody's turn to do the positional information that intersects conflict geographic element in grid, be stored to index file.
The below shows the storage organization example of a kind of index file of the application, it specifically can comprise line number X, the column number Y that intersects grid, and the water system mesh coordinate in the corresponding grid of line number X, column number Y, wherein ,->corresponding relation between sign position No. and water system mesh coordinate:
X1, Y1->grid internal water system coordinate
X2, Y2->grid internal water system coordinate
X3, Y3->1 (1 expression X3, the grid that Y3 is corresponding is covered by the water system key element fully)
...
Xn, Yn->grid internal water system coordinate
Like this, when request is showed in the polymerization that receives client, server is with the position No. of described net region, mate with the position No. that intersects grid in index file, if the match is successful, the positional information that should intersect conflict geographic element in grid of storing in described index file is evaded positional information as the zone.It is described that the match is successful mainly contains two kinds of situations, and the one, described net region is covered by the conflict geographic element fully, and can return to corresponding identification information this moment; The 2nd, described net region is not covered by the conflict geographic element fully, and at this moment, positional information is evaded in the zone that can return in described net region.
Step 104, server are evaded positional information with described moving target information and zone and are returned to client;
In the embodiment of the present application, preferably, can adopt the JSON described moving target information of (JavaScript.Object Natation) format record and zone to evade positional information.JSON is a kind of data interchange format of lightweight, be suitable for the mutual of server and JavaScript, the data layout of JSON is very simple, can transmit a simple String (character string) with JSON, Number (numeral), Boolean (Boolean) also can transmit an array, perhaps the Object object of a complexity.
Because mobile monitoring is higher to the requirement of real-time demonstration, therefore being more conducive to browser end, the employing of described JSON form carries out fast information processing.。
Step 105, client are calculated the polymerization location point of described net region, and evade positional information in this polymerization location point and described zone when equating, this polymerization location point is adjusted;
In specific implementation, the described step that this polymerization location point is adjusted specifically can comprise:
Client is evaded positional information when equating in this polymerization location point and described zone, this polymerization location point moves and/or move down and/or move to left and/or move to right in described net region.
In a word, owing to the polymerization location point after adjusting and described zone evading positional information and not waiting, so, can effectively evade the conflict geographic element, also, can avoid number of vehicles information to drop in river region, and period of the day from 11 p.m. to 1 a.m networking moving target information of number drops in the zone, mountain range etc.
Show described moving target information on polymerization location point after step 106, client are adjusted in described net region.
In a preferred embodiment of the present application, the grid format that can also include the net region in request is showed in described polymerization, and wherein, described grid format can be used for a net region is subdivided into a plurality of sub-grids;
Request is showed in the described polymerization of described foundation, obtains the step of the moving target information of described net region, specifically can comprise:
Server obtains the positional information of moving target in described net region according to locating device;
Server is added up respectively minute number of the interior moving target of sub-grid in described net region, and calculates the total number of the interior moving target of all-ones subnet lattice in described net region, to divide number and the total number moving target information as described network area;
The step of the polymerization location point of the described net region of described calculating may further include:
Client is according to the moving target information of described network area, with the central point of the sub-grid of density maximum in the described net region polymerization location point as described net region.
This preferred embodiment is used grid format a net region is subdivided into a plurality of sub-grids, and with the central point of the sub-grid of density maximum in the net region polymerization location point as this net region; Due to the distribution of density reflection moving target in a plurality of sub-grids, so, with the central point of the sub-grid of the density maximum polymerization location point as this net region, can improve the rationality of polymerization location point.
In actual applications, grid format that can the net region is set to 9 deciles, 16 etc. and grades, wherein, described 9 deciles can be 9 * 9 sub-grids with each region segmentation of net, and the application will select the central point of sub-grid of density maximum as the polymerization location point of this net region from 81 sub-grids.
In another preferred embodiment of the present application, the administrative area code that can also include user ID and described net region in request is showed in described polymerization;
Showing request according to described polymerization, before obtaining the moving target information of described net region, described method can also comprise:
Server obtains the role of described user ID;
Server obtains the role's of described user ID authority;
Server judges according to the administrative area code of described net region whether the role's of described user ID authority has for described net region, if, carry out according to described polymerization and show request, obtain the step of the moving target information of described net region.
In another preferred embodiment of the application, described polymerization is showed in request can also include user ID and moving target type;
Described method can also comprise:
Server obtains the role of described user ID;
Server obtains the role's of described user ID authority;
Server judges whether the role's of described user ID authority has for described moving target type, if, carry out according to described polymerization and show request, obtain described net region and the step corresponding moving target information of described moving target type.
Under some occasion, mobile monitoring often relates to moving target user's privacy, for example, cellphone subscriber's position is secret often, and for example the position of some vehicle does not allow everyone to see yet, for this reason, and in order to improve the security of mobile monitoring, the embodiment of the present application is based on role's access control (RBAC, Role-Based Access Control) model.The basic thought of RBAC model is to introduce role's concept between user and authority, and authority is associated with the role, and the user obtains these roles' authority by the member who becomes suitable role.
About the application in this application of administrative area code, can distribute different Role and privileges for different user, for example, the Dongcheng District user can not access the moving target data of Haidian District, Haidian District user or the user of Beijing general bureau can access the moving target data of Haidian District, etc.
About the application in practice of moving target type, suppose that type of vehicle can comprise car, bus, lorry, passenger vehicle etc., can distribute different Role and privileges for different user, for example, the user of vehicle administration office can access the data of all type of vehicle, the user of public traffic management office can only access the data of bus, etc.And for example, some user has the authority of access telecommunication handset, and some user has the authority of access cell phone, etc.
In a word, the application can show information such as administrative area code, moving target type in request by polymerization, based on role access control model, to improve the security of mobile monitoring.
In some application examples of the application, can also show in request in polymerization and comprise other information, as the ratio grade, be used for the shown ratio of expression current electronic map, for example, it can be which rank that is shown in state, province, city or street, can be also engineer's scale, here, engineer's scale refers to that map range is dwindled than distance (or preset distance) on the spot or the degree that enlarges etc.In a word, the application does not show that to polymerization the content of request is limited.
Embodiment is corresponding with preceding method, disclosed herein as well is a kind of mobile monitoring server, with reference to Fig. 3, specifically can comprise:
Interface arrangement 301, request is showed in the polymerization that is used for receiving from client, wherein, the position No. that includes the net region in request is showed in described polymerization;
Moving target information deriving means 302 is used for showing request according to described polymerization, obtains the moving target information of described net region;
Coalignment 303, being used for will be according to the position No. of described net region, mate with the position No. that intersects grid in index file, if the match is successful, the positional information that should intersect conflict geographic element in grid of storing in described index file is evaded positional information as the zone; And
Return mechanism 304 is used for that positional information is evaded in described moving target information and zone and returns to client.
In the embodiment of the present application, preferably, described moving target can comprise moving vehicle or mobile terminal.
In a preferred embodiment of the present application, described server can also comprise:
The index file apparatus for establishing specifically can comprise:
Data acquisition module is used for obtaining the electronic map data that mobile monitoring uses;
Cut apart module, be used for described electronic map data is divided into the grid of position No.;
Detection module is for detection of the crossing grid that intersects with the geographic element of conflicting; And
Memory module, the positional information that is used for intersecting the position No. of grid and should intersects conflict geographic element in grid is stored to index file.
In another preferred embodiment of the present application, the grid format that can also include the net region in request is showed in described polymerization, and wherein, described grid format can be used for a net region is subdivided into a plurality of sub-grids;
Correspondingly, described moving target information deriving means 302 may further include:
Position information acquisition module is for obtain the positional information of moving target in described net region according to locating device;
Statistical module is used for adding up respectively minute number of moving target in the sub-grid of described net region, and calculates the total number of the interior moving target of all-ones subnet lattice in described net region, to divide number and the total number moving target information as described network area.
In another preferred embodiment of the present application, the administrative area code that can also include user ID and described net region in request is showed in described polymerization;
At this moment, described server can also comprise:
First role's deriving means is for the role who obtains described user ID;
The first authority acquiring device is for the role's who obtains described user ID authority;
The first judgment means, be used for the administrative area code according to described net region, whether the authority that judges the role of described user ID has for described net region, if, trigger described moving target information deriving means 302 and carry out according to described polymerization displaying request, obtain the step of the moving target information of described net region.
In another preferred embodiment of the application, described polymerization is showed in request can also include user ID and moving target type;
At this moment, described server can also comprise:
Second role's deriving means is for the role who obtains described user ID;
The second authority acquiring device is for the role's who obtains described user ID authority;
The second judgment means is used for judging whether the role's of described user ID authority has for described moving target type, if trigger described moving target information deriving means 302;
Correspondingly, described moving target information deriving means 302 can be specifically be used for carrying out according to described polymerization showing request, obtains described net region and the step corresponding moving target information of described moving target type.
For server example, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Embodiment is corresponding with preceding method, and the application can also provide a kind of mobile monitoring client, with reference to Fig. 4, specifically can comprise:
Dispensing device 401 is used for sending polymerization to the mobile monitoring server and shows request, and wherein, the position No. that includes the net region in request is showed in described polymerization;
Receiving trap 402 is used for receiving described mobile monitoring server and shows that for described polymerization moving target information and zone that request is returned evade positional information;
Calculation element 403 is used for calculating the polymerization location point of described net region;
Adjusting gear 404 is used for evading in this polymerization location point and described zone positional information when equating, this polymerization location point is adjusted; And
Exhibiting device 405 is showed described moving target information on the polymerization location point after being used for adjusting in described net region.
In a preferred embodiment of the present application, described adjusting gear 404 can be specifically be used for evading in this polymerization location point and described zone positional information when equating, this polymerization location point moves and/or move down and/or move to left and/or move to right in described net region.
In another preferred embodiment of the present application, described moving target information specifically can comprise the total number that divides the interior moving target of all-ones subnet lattice in number and described net region of the interior moving target of sub-grid in described net region;
At this moment, described calculation element 403 can be specifically be used for the moving target information according to described network area, with the central point of the sub-grid of density maximum in the described net region polymerization location point as described net region.
For the client implementation example, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.
Above a kind of moving target information is showed in polymerization in mobile monitoring method, a kind of mobile monitoring server and a kind of mobile monitoring client that the application is provided, be described in detail, used specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment just is used for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.