Disclosure of Invention
In order to improve the smoothness and the dependence on a client of a digital traffic facility operation and maintenance management system in the process of visualizing traffic facilities, the invention provides the digital traffic facility operation and maintenance management system, which comprises the client and a server;
The client sends the client type and the zoom level to a server, and the server judges whether a clustering result corresponding to the client type and the zoom level exists or not;
If so, generating a layer according to a clustering result and sending the layer to a client, otherwise, acquiring traffic facilities to be displayed on a map and the positions of the traffic facilities by the server, taking the actual geographic distance of the preset distance on the screen on the map at the zoom level as a neighborhood radius, determining a minimum sample number adjustment parameter based on the client type, and obtaining the minimum sample number according to the minimum sample number adjustment parameter and the number of the traffic facilities to be displayed in a map window at the zoom level;
The server clusters the traffic facilities by adopting the neighborhood radius and the minimum sample number, each cluster generates a layer, traffic facilities which are not clustered successfully are put into a set, the number of generated layers is determined based on the types of the traffic facilities in the set, and the layers are sent to the client.
Preferably, the determining the minimum sample number adjustment parameter based on the client type specifically includes:
Acquiring the screen height and the screen width corresponding to the client type, calculating the ratio of the preset screen height to the screen height, and calculating the ratio of the preset screen width to the screen width;
and obtaining a minimum sample number adjustment parameter based on the ratio of the height and the width.
Preferably, the minimum sample number is obtained according to the minimum sample number adjustment parameter and the number of traffic facilities to be displayed in the map window under the zoom level, specifically:
calculating the ratio of the number of the traffic facilities to be displayed to the preset value, and taking the product of the ratio and the minimum sample number adjustment parameter as the final minimum sample number.
Preferably, after the server clusters the traffic facilities using the neighborhood radius and the minimum number of samples, the method further comprises:
and establishing a corresponding relation among the client type, the zoom level and the clustering result, and storing the client type, the zoom level and the clustering result into a database.
Preferably, the number of the generated layers is determined based on the types of the traffic facilities in the collection, specifically:
If the type of the traffic facilities in the collection is updated in real time, a layer is generated for the traffic facilities, and a layer is generated for the rest traffic facilities in the collection.
Preferably, the client is further configured to:
providing a user operation interface, allowing a user to inquire, view and edit the state and the position of the traffic facility;
The client supports real-time map window scaling and movement, automatically triggers communication with the server, dynamically acquires the map layers from the server, and superimposes the map layers sent by the server on the map.
Preferably, the layer is sent to the client, specifically:
And acquiring the geographic boundary of the current map window, acquiring an area corresponding to the geographic boundary from the map layer, and transmitting the vector format or grid format content of the area to the client.
Preferably, the client is further configured to:
For the traffic facilities updated in real time, if the traffic facilities updated in real time are in a single layer, analyzing the layer to obtain real-time updated variables related to the traffic facilities, and updating the variables acquired from the server in real time in the layer.
Preferably, the client is further configured to cache the requested layer locally.
In order to improve the experience and fluency of visually displaying traffic facilities in the digital traffic facility operation and maintenance management system, the traffic facilities on the map are clustered on the server, and the map layers generated after the clustering are sent to the client, so that the traffic facility map layers can be quickly generated no matter the performance of the client. In addition, for clients of different sizes, different neighborhood radii and minimum sample numbers are adopted, so that the problems of congestion and shielding which can occur to clients with small displays under the same scaling scale are avoided.
Detailed Description
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which are obtained by persons of ordinary skill in the art without undue burden on the person of ordinary skill in the art based on the embodiments of the present invention, are within the scope of the present invention.
In a first embodiment of the present invention, the present invention provides a digital transportation facility operation and maintenance management system, as shown in fig. 1, the system includes a client and a server;
The client sends the client type and the zoom level to a server, and the server judges whether a clustering result corresponding to the client type and the zoom level exists or not;
In the digital transportation facility operation and maintenance management system, a manager can add transportation facilities, and view the states of the transportation facilities and the like. The map display can intuitively present the geographic distribution and layout of traffic facilities, and operation and maintenance personnel can clearly see the positions, types and the mutual relations of different facilities, so that the structure of the whole traffic system can be quickly understood. By reducing the map, operation and maintenance personnel can see the whole traffic network and master the distribution condition of facilities in a large range. By zooming in on the map, the operation and maintenance personnel can view details within a particular area, such as traffic facilities, signal lights, monitoring cameras, etc. on a particular road. This allows them to precisely locate a facility, learn their detailed information (e.g., type, status, ID number, etc.) and to personalize or maintain the facility. However, the terminal devices used by the operation and maintenance personnel are different in performance, and when the traffic facilities displayed on the map are more, if the operation and maintenance personnel and the management personnel scale the map, the traffic facility signs displayed on the map in high density are crowded, and the jam phenomenon can also occur.
In the invention, the aggregation of traffic facilities on the map is placed on the server, and the image layer is sent to the client after the server is aggregated, so that the phenomenon of blocking caused by limited performance of the client is avoided, and the traffic facilities are prevented from being displayed in high density by aggregating the traffic facilities.
In a preferred embodiment, the client sends the client type and the zoom level to the server, which determines whether there is a clustering result corresponding to the client type and the zoom level. In one embodiment, the type of the client is a mobile phone, a tablet, a notebook, a desktop or a large display screen, and the type of the client may be obtained from the client or may be determined according to an ip address. The zoom level is a zoom level of the map, for example, a zoom level of 13 or the like. After receiving the screen information and the zoom level, the server searches the database, and if a clustering result corresponding to the screen information and the zoom level exists, generates a layer according to the clustering result and sends the layer to the client. The database stores the corresponding relation of the client type, the zoom level and the clustering result, when new equipment is added to the operation and maintenance management system of the digital traffic facility, the server performs clustering again when the server is idle or when a user sends a map viewing request, and of course, the newly added traffic equipment can be clustered only on the basis of the existing clustering, for example, if the distance from a certain cluster is minimum and smaller than a threshold value, the newly added equipment is directly classified into the cluster, and if the distance from all clusters is not smaller than the threshold value, the new equipment is classified into one type. Wherein the threshold is associated with screen information and a zoom level.
If the clustering result corresponding to the client type and the zoom level does not exist in the database, the server acquires the traffic facility to be displayed on the map and the position of the traffic facility on the map, and calculates the actual geographic distance of the preset distance on the screen on the map at the zoom level, for example, the actual geographic distance of two points on the screen, which are 0.5 inch apart, on the map is 500m, as shown in fig. 2. And taking the actual geographic distance as a neighborhood radius, and determining a minimum sample number adjustment parameter based on the client type. The actual geographical distance on the map of the preset distance on the screen at said zoom level is calculated, which is an adjustable parameter, if the signs of the traffic facilities to be displayed on the screen are to be dense, the preset distance is a small distance, otherwise the preset distance can be set to a large point. In a preferred embodiment, the predetermined distance is 0.5 or 1 inch.
The neighborhood radius adjustment parameter is used to adjust the neighborhood radius (Eps) in the DBSCAN cluster, and the minimum number of samples adjustment parameter is used to adjust the minimum number of samples (MinPts) in the DBSCAN cluster, as shown in fig. 3.
At the same scale, the display window of a small screen such as a mobile phone is smaller than that of a large screen such as a desktop, and the clustering mode of traffic equipment on a map is different. In an optional embodiment, the determining the minimum sample number adjustment parameter based on the client type is specifically:
Acquiring the screen height and the screen width corresponding to the client type, calculating the ratio of the preset screen height to the screen height, and calculating the ratio of the preset screen width to the screen width;
the client types are different and the displays are different in size. The screen height and the screen width are determined according to the client type, and one screen height and one screen width are set for each client type for the sake of computational simplicity, for example, a uniform screen height and screen width are used as long as it is a desktop. If the preset screen height is 18 inches, the preset screen width is 18 inches, the screen height is 5.5 inches, and the screen width is 2.5 inches, the ratio of the heights is 3.2, and the ratio of the widths is 7.2.
And obtaining a minimum sample number adjustment parameter based on the ratio of the height and the width. In one embodiment, the average value of the ratio of the height to the width is calculated, and the negative exponential function value of the ratio of the average value to a preset value is used as a minimum sample number adjustment parameter. The negative exponential function is exp (-x/T), where x is the average value and T is the preset value. If the calculated minimum number of samples is not an integer, rounding up or down.
In yet another embodiment, the adjusting parameter according to the minimum number of samples and the number of traffic facilities to be displayed in the map window at the zoom level obtains the minimum number of samples, specifically:
calculating the ratio of the number of the traffic facilities to be displayed to the preset value, and taking the product of the ratio and the minimum sample number adjustment parameter as the final minimum sample number.
After obtaining the neighborhood radius and the minimum sample number, the server clusters the traffic facilities to be displayed on the map, if one traffic facility is not in any cluster, the traffic facility is added into the collection, and the number of generated layers is determined based on the types of the traffic facilities in the collection. A layer is generated separately for each cluster. After the clustering is generated, the corresponding relation among the client type, the scaling level and the clustering result is established, and the client type, the scaling level and the clustering result are stored in a database, so that if no traffic facilities are newly added or deleted, the clustering result can be directly used by the subsequent clients of the same type.
In clustering traffic facilities, the traffic facilities are clustered according to their locations, where the locations of the traffic facilities are actual geographic locations, e.g., the longitude and latitude of the locations of the traffic facilities are (117,39). The neighborhood radius is also the actual geographic distance.
In another embodiment, after generating the clustered layers, the corresponding relationship between the client type, the zoom level and the layers is established, and the client type, the zoom level and the layers are stored in the database.
If a layer is generated for each traffic facility in the collection, when there are more traffic facilities, more layers are generated, in one embodiment, it is determined whether the type of traffic facility in the collection is updated in real time, if so, a layer is generated for the traffic facility alone, and for the remaining traffic facilities in the collection that are not updated in real time, a layer is generated, so that the number of layers can be reduced. The real-time update refers to that the state of the traffic facility is continuously updated, for example, the traffic signal lamp is a real-time updated traffic facility, whether the traffic signal lamp is on-line or not can be checked in real time, and the indication board is not a real-time updated traffic facility.
In an alternative embodiment, a layer is generated for each cluster separately, where the layer includes at least one logo and annotation information for the logo, the annotation information being displayed in the upper right hand corner of the logo, or when the user clicks on the logo, the annotation information is displayed in the upper right hand corner of the logo. The annotation information comprises interpretation information of traffic facilities in the clusters. And if the clusters contain traffic facilities updated in real time, taking a dynamic image as an identification, wherein the dynamic image is a gif-format image.
On the client, the operation and maintenance and management personnel can also inquire, check and edit the state and the position of the traffic facility through a user operation interface provided by the client;
The client supports real-time map window scaling and movement, automatically triggers communication with the server, dynamically acquires the map layers from the server, and superimposes the map layers sent by the server on the map.
When the zoom level is not the minimum zoom level, the current map window does not display the whole area map, so that the whole map layer under the zoom level does not need to be loaded. For the traffic facilities updated in real time, if the traffic facilities updated in real time are in a single layer, analyzing the layer to obtain real-time updated variables related to the traffic facilities, and updating the variables acquired from the server in real time in the layer. In another embodiment, the client may cache the requested layers locally.
In a second embodiment of the present invention, the present invention provides a digital transportation facility operation and maintenance management method, the method comprising the steps of:
The client sends the client type and the zoom level to a server, and the server judges whether a clustering result corresponding to the client type and the zoom level exists or not;
If so, generating a layer according to a clustering result and sending the layer to a client, otherwise, acquiring traffic facilities to be displayed on a map and the positions of the traffic facilities by the server, calculating the actual geographic distance of the preset distance on the screen on the map at the zoom level, determining a neighborhood radius adjustment parameter and a minimum sample number adjustment parameter based on the client type, calculating the neighborhood radius according to the neighborhood radius adjustment parameter and the actual geographic distance, and obtaining the minimum sample number according to the minimum sample number adjustment parameter and the number of the traffic facilities to be displayed in a map window at the zoom level;
The server clusters the traffic facilities by adopting the neighborhood radius and the minimum sample number, each cluster generates a layer, traffic facilities which are not clustered successfully are put into a set, the number of generated layers is determined based on the types of the traffic facilities in the set, and the layers are sent to the client.
Preferably, the determining the neighborhood radius adjustment parameter and the minimum sample number adjustment parameter based on the client type specifically includes:
Acquiring the screen height and the screen width corresponding to the client type, calculating the ratio of the preset screen height to the screen height, and calculating the ratio of the preset screen width to the screen width;
and obtaining a neighborhood radius adjustment parameter and a minimum sample number adjustment parameter based on the ratio of the height and the width.
Preferably, the calculating according to the neighborhood radius adjustment parameter and the actual geographic distance obtains a neighborhood radius specifically includes:
Multiplying the calculated neighborhood radius adjustment parameter by the actual geographic distance to obtain the final neighborhood radius.
Preferably, the minimum sample number is obtained according to the minimum sample number adjustment parameter and the number of traffic facilities to be displayed in the map window under the zoom level, specifically:
calculating the ratio of the number of the traffic facilities to be displayed to the preset value, and taking the product of the ratio and the minimum sample number adjustment parameter as the final minimum sample number.
Preferably, after the server clusters the traffic facilities using the neighborhood radius and the minimum number of samples, the method further comprises:
and establishing a corresponding relation among the client type, the zoom level and the clustering result, and storing the client type, the zoom level and the clustering result into a database.
Preferably, the number of the generated layers is determined based on the types of the traffic facilities in the collection, specifically:
If the type of the traffic facilities in the collection is updated in real time, a layer is generated for the traffic facilities, and a layer is generated for the rest traffic facilities in the collection.
Preferably, the client is further configured to:
providing a user operation interface, allowing a user to inquire, view and edit the state and the position of the traffic facility;
The client supports real-time map window scaling and movement, automatically triggers communication with the server, dynamically acquires the map layers from the server, and superimposes the map layers sent by the server on the map.
Preferably, the layer is sent to the client, specifically:
And acquiring the geographic boundary of the current map window, acquiring an area corresponding to the geographic boundary from the map layer, and transmitting the vector format or grid format content of the area to the client.
Preferably, the client is further configured to:
For the traffic facilities updated in real time, if the traffic facilities updated in real time are in a single layer, analyzing the layer to obtain real-time updated variables related to the traffic facilities, and updating the variables acquired from the server in real time in the layer.
Preferably, the client is further configured to cache the requested layer locally.
In a third embodiment of the invention, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described in the second embodiment.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and other embodiments may be adopted, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.