Multi-dynamic target display method, device, electronic device and storage medium
By using clustering technology to select representative targets in multi-dynamic target monitoring scenarios and displaying them on the map, the problem of target overlap is solved, and the monitoring efficiency and display effect are improved.
Patent Information
- Application Number
- CN202111513002.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-11
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-11
AI Technical Summary
In multi-dynamic target monitoring scenarios, changes in map scales lead to overlap of dynamic targets, affecting users' observation, selection and editing operations, and reducing monitoring efficiency.
By obtaining the current scale information and the position information of each target, select at least one representative target from multiple targets using clustering technology and displaying it on a map to ensure that the actual display distance of the representative target is not less than the preset minimum display distance.
It effectively avoids overlapping targets, improves monitoring efficiency, makes the display effect clear and intuitive, and facilitates users to perform operations.
Smart Images

Figure CN114217719B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for displaying multiple dynamic targets. Background Art
[0002] With the continuous development and progress of technology, the accuracy of target positioning is constantly improving and its application is becoming more and more extensive. Combined with complete map information, various visualization technologies such as navigation and monitoring can be realized.
[0003] In the field of target location monitoring, the location of the monitored target is generally displayed intuitively in real time on a map, so that users can view it in real time and understand the dynamics of the target.
[0004] However, in some scenarios, there are many dynamic targets that need to be monitored. As the map scale changes, the display of many dynamic targets on the map may overlap, affecting the user's observation, selection, editing and other operations, resulting in reduced monitoring efficiency. Summary of the invention
[0005] The present application provides a method, device, electronic device and storage medium for displaying multiple dynamic targets, and provides a display method suitable for multiple dynamic target monitoring scenarios to improve monitoring efficiency.
[0006] In a first aspect, the present application provides a method for displaying multiple dynamic targets, for displaying multiple dynamic targets, the method comprising:
[0007] Get the current scale information and location information of each target;
[0008] Selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance;
[0009] Displaying the representative target at a corresponding position on the map;
[0010] The actual display distance of the representative target is not less than the preset minimum display distance.
[0011] Optionally, selecting at least one representative target from a plurality of targets by clustering according to the current scale information, the position information of each target, and a preset minimum display distance includes:
[0012] Determining size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and a preset shape of the buffer zone;
[0013] For each target, defining a buffer zone for the target according to the size parameter and the preset shape;
[0014] Merge the buffers with overlapping ranges to generate several clusters;
[0015] For each cluster, a representative target corresponding to the cluster is determined according to the location information of the center of the cluster.
[0016] Optionally, determining the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and a preset shape of the buffer zone includes:
[0017] Determine the minimum displayable distance between any two targets according to the preset minimum display distance and the current scale information;
[0018] Determining a length parameter of the buffer zone according to the minimum displayable distance;
[0019] For each target, defining a buffer zone for the target according to the size parameter and the preset shape, includes:
[0020] For each target, a buffer zone is defined for the target according to the length parameter and the preset shape of the buffer zone, and the target is located at the center of the buffer zone corresponding to the target.
[0021] Optionally, displaying the representative target at a corresponding position on a map includes:
[0022] For each representative target, at least one of the identifier of the representative target, the type of target represented by the representative target, and the quantity information of each type of target represented by the representative target is displayed at a corresponding position on the map.
[0023] Optionally, selecting at least one representative target from a plurality of targets by clustering according to the current scale information, the position information of each target, and a preset minimum display distance includes:
[0024] Determining whether representative display is required according to the current scale information, the location information of each target, and the preset minimum display distance;
[0025] If representative display is required, at least one representative target is selected from multiple targets through clustering.
[0026] Optionally, the method further includes:
[0027] Get the level corresponding to each target and the corresponding units in each level;
[0028] The selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance includes:
[0029] Determining a display level corresponding to the current scale information according to the current scale information and the preset correspondence between each level and the scale;
[0030] Determine the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy;
[0031] Selecting at least one representative unit from a plurality of units in the display level by clustering according to the current scale information, the position information of each unit in the display level, and a preset minimum display distance;
[0032] The step of displaying the representative target at a corresponding position on the map includes:
[0033] The representative unit is displayed at a corresponding position on the map.
[0034] Optionally, determining the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy includes:
[0035] For each unit in the display hierarchy, determining the targets included in the unit according to the units to which the targets belong in the display hierarchy;
[0036] For each unit in the display hierarchy, an average of the position information of the objects contained in the unit is determined as the position information of the unit.
[0037] In a second aspect, the present application provides a multi-dynamic target display device, comprising:
[0038] The acquisition module is used to obtain the current scale information and the location information of each target;
[0039] A representative target selection module, configured to select at least one representative target from a plurality of targets by clustering according to the current scale information, the location information of each target, and a preset minimum display distance;
[0040] A display module, used for displaying the representative target at a corresponding position on a map;
[0041] The actual display distance of the representative target is not less than the preset minimum display distance.
[0042] Optionally, the representative target selection module is specifically used for:
[0043] Determining size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and a preset shape of the buffer zone;
[0044] For each target, defining a buffer zone for the target according to the size parameter and the preset shape;
[0045] Merge the buffers with overlapping ranges to generate several clusters;
[0046] For each cluster, a representative target corresponding to the cluster is determined according to the location information of the center of the cluster.
[0047] Optionally, when determining the size parameter of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone, the representative target selection module is specifically configured to:
[0048] Determine the minimum displayable distance between any two targets according to the preset minimum display distance and the current scale information;
[0049] Determining a length parameter of the buffer zone according to the minimum displayable distance;
[0050] When the representative target selection module defines a buffer zone for each target according to the size parameter and the preset shape, the representative target selection module is specifically used to:
[0051] For each target, a buffer zone is defined for the target according to the length parameter and the preset shape of the buffer zone, and the target is located at the center of the buffer zone corresponding to the target.
[0052] Optionally, when the display module displays the representative target at a corresponding position on the map, it is specifically used to:
[0053] For each representative target, at least one of the identifier of the representative target, the type of target represented by the representative target, and the quantity information of each type of target represented by the representative target is displayed at a corresponding position on the map.
[0054] Optionally, the representative target selection module is specifically used for:
[0055] Determining whether representative display is required according to the current scale information, the location information of each target, and the preset minimum display distance;
[0056] If representative display is required, at least one representative target is selected from multiple targets through clustering.
[0057] Optionally, the acquisition module is further used for:
[0058] Get the level corresponding to each target and the corresponding units in each level;
[0059] The representative target selection module is specifically used for:
[0060] Determining a display level corresponding to the current scale information according to the current scale information and the preset correspondence between each level and the scale;
[0061] Determine the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy;
[0062] Selecting at least one representative unit from a plurality of units in the display level by clustering according to the current scale information, the position information of each unit in the display level, and a preset minimum display distance;
[0063] The display module is specifically used for:
[0064] The representative unit is displayed at a corresponding position on the map.
[0065] Optionally, when determining the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy, the representative target selection module is specifically configured to:
[0066] For each unit in the display hierarchy, determining the targets included in the unit according to the units to which the targets belong in the display hierarchy;
[0067] For each unit in the display hierarchy, an average of the position information of the objects contained in the unit is determined as the position information of the unit.
[0068] In a third aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the method of the first aspect.
[0069] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method of the first aspect.
[0070] The present application provides a method, device, electronic device and storage medium for displaying multiple dynamic targets. The method for displaying multiple dynamic targets includes: obtaining current scale information and location information of each target; selecting at least one representative target from multiple targets by clustering according to the current scale information, location information of each target and preset minimum display distance; displaying the representative target at a corresponding position on a map; wherein the actual display distance of the representative target is not less than the preset minimum display distance. In combination with the scale information and location information of each target, at least one representative target that can meet the preset minimum display distance is selected from multiple targets by clustering for display, so that the actual display distance of at least one representative target is not less than the preset minimum display distance. The scheme of the present application proposes the concept of preset minimum display distance (the minimum distance between any two targets when displayed), and through certain technical means, the displayed representative target can meet this preset minimum display distance, so that the display effect is clear and intuitive, and it is convenient for users to perform corresponding operations, thereby improving monitoring efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of an application scenario provided by this application;
[0072] Figure 2 A flowchart of a method for displaying multiple dynamic targets provided by an embodiment of the present application;
[0073] Figure 3 A schematic diagram of a representative target display method provided in an embodiment of the present application;
[0074] Figure 4 A schematic diagram of a hierarchical relationship provided in an embodiment of the present application;
[0075] Figure 5 A schematic diagram of the structure of a multi-dynamic target display device provided in one embodiment of the present application;
[0076] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0078] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0079] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0080] Figure 1 A schematic diagram of an application scenario provided for this application. In this scenario, it is necessary to monitor taxis in a certain city. Figure 1 As shown, taxis in a certain area of the city report their location information to the server in real time. The server processes the location information reported by these vehicles based on the multi-dynamic target display method of the present application and matches it to the map of the area, and sends the relevant data to the display device for display. In the display result, the position of each taxi is not necessarily displayed separately, but is displayed by approximately using one position as a representative, so that the display result is intuitive and clear.
[0081] exist Figure 1 In the figure, only one case is shown (one location represents three locations). In different scenarios, the number of targets may reach thousands, tens of thousands, or even more. At that time, one location may represent dozens or hundreds of targets.
[0082] The implementation of the specific processing process at the server can refer to the following embodiments.
[0083] Figure 2 This is a flowchart of a method for displaying multiple dynamic targets provided by an embodiment of the present application. The method of this embodiment is used to display multiple dynamic targets and can be applied to the server in the above scenario, and can also be applied to other electronic devices with computing capabilities. Figure 2 As shown, the method of this embodiment includes:
[0084] S201, obtaining current scale information and location information of each target.
[0085] A default value may be set for the scale in advance, and when the target display function is turned on, if no relevant setting instruction input by the user is detected, the map is displayed with the default value. If S201 is executed at this time, the current scale information obtained is the default value of the scale.
[0086] When the user needs to zoom in or out on the map, the corresponding operation instruction can be input through the instruction input device (keyboard, mouse, touch screen, microphone, camera, etc.). For example, the user can directly input the scale value using the keyboard or touch screen. For another example, the user can click the zoom in / zoom out button using the mouse or touch screen. For another example, the user can input the audio of "zoom in" or "zoom out" through the microphone. For another example, the user can input the corresponding control gesture or posture image through the camera. Correspondingly, the server or other electronic device can receive the user's operation instruction and adjust the scale. If S201 is executed at this time, the current scale information obtained is the value of the adjusted scale.
[0087] The location information may be latitude and longitude information.
[0088] The target to be displayed can be a device with positioning function (such as a car), or a creature without positioning function but equipped with a positioning device (such as a person carrying a mobile phone or wearing a smart bracelet, a cow wearing a positioning collar) or other objects. The positioning device equipped with the target can detect the position information in real time and upload the position information to a server or other electronic device in real time. Correspondingly, the server or other electronic device can receive the position information sent by the positioning device.
[0089] In order to enable the positioning devices equipped with the targets to upload the position information, communication settings may be performed in advance to establish a communication connection between the positioning devices equipped with each target and a server or other electronic devices.
[0090] S202: Select at least one representative target from multiple targets by clustering according to current scale information, location information of each target, and a preset minimum display distance.
[0091] The preset minimum display distance refers to the minimum distance allowed between any two targets when displaying these targets, that is, the minimum distance at which each target can be clearly displayed on the display device.
[0092] The preset minimum display distance can be set by the user. For example, the user can determine the preset minimum display distance according to the actual scenario and input it into the server or other electronic device. Correspondingly, the server or other electronic device can obtain the preset minimum display distance.
[0093] The preset minimum display distance may also be determined according to the size of the display. For example, the server or other electronic device may obtain the size information of the display and determine the preset minimum display distance according to the size of the display.
[0094] In combination with the current scale information and the position information of each target, at least one representative target whose actual display distance is not less than the preset minimum display distance can be selected from multiple targets by clustering.
[0095] It can be seen that a representative target is one of the dynamic targets that need to be displayed. At least one representative target is selected as a representative of all the targets that need to be displayed. It is possible that a representative target only represents one target that needs to be displayed (that is, the target itself), or it is possible that a representative target represents multiple targets that need to be displayed.
[0096] S203: Display the representative target at the corresponding position on the map.
[0097] Referring to the location information (eg, longitude and latitude information) corresponding to the display range of the current map, the identifier representing the target is displayed at the corresponding position on the map according to the location information representing the target.
[0098] Specifically, a display identifier may be set in advance for a plurality of dynamic targets that need to be displayed, and the representative target may be marked using the display identifier.
[0099] In some scenarios, multiple dynamic targets to be displayed do not belong to the same category. Corresponding identifiers may be set in advance for targets of each category. Representative targets of a certain category may be marked with display identifiers of the corresponding category.
[0100] Of course, you can also set a dedicated display logo for the representative target.
[0101] In some implementations, for each representative target, at least one of the following information: the identifier of the representative target, the type of target represented by the representative target, and the quantity information of each type of target represented by the representative target may be displayed at a corresponding position on the map.
[0102] That is, add the information of the target it represents (quantity, type, etc.) to the representative target. Figure 3 , still corresponds to Figure 1 Scene. Figure 3 In the example, the number of targets represented by the representative target is directly used as the identification of the representative target. At the same time, after the cursor enters the identification area of the representative target, the detailed information of the three targets represented by the representative target can be triggered to expand. The detailed information displayed here includes the license plate information of the three taxis. In other embodiments, other relevant information can also be displayed in combination with specific scenes. For example, a local map corresponding to a larger scale can be directly displayed so that the user can more intuitively see the specific locations of each target at the location.
[0103] The multi-dynamic target display method provided in this embodiment includes: obtaining the current scale information and the location information of each target; selecting at least one representative target from multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance; displaying the representative target at the corresponding position on the map; wherein the actual display distance of the representative target is not less than the preset minimum display distance. In combination with the scale information and the location information of each target, at least one representative target that can meet the preset minimum display distance is selected from multiple targets by clustering for display, so that the actual display distance of at least one representative target is not less than the preset minimum display distance. The scheme of the present application proposes the concept of a preset minimum display distance (the minimum distance between any two targets when displayed), and through certain technical means, the displayed representative target can meet this preset minimum display distance, so that the display effect is clear and intuitive, and it is convenient for users to perform corresponding operations, thereby improving monitoring efficiency.
[0104] Through the description of the above embodiments, it can be understood that after selecting a representative target, the selected representative target will be displayed at the corresponding position on the map. That is, before selecting a representative target, the displayed content is still the representative target determined by the last execution of the method.
[0105] In some scenarios, the representative targets determined by the above method may be the same target in succession, but the positions of the targets are constantly changing over time. Therefore, the representative targets displayed on the map are constantly changing positions. The calculation process of selecting representative targets is performed in the background and is a separate process from the display of the map.
[0106] In some embodiments, the above-mentioned selecting at least one representative target from multiple targets through clustering based on the current scale information, the location information of each target, and the preset minimum display distance may specifically include: determining the size parameters of the buffer zone based on the current scale information, the preset minimum display distance, and the preset shape of the buffer zone; for each target, defining a buffer zone for the target based on the size parameters and the preset shape; merging buffer zones with overlapping ranges to generate a number of clusters; for each cluster, determining the representative target corresponding to the cluster based on the location information of the center of the cluster.
[0107] The location information of each target actually corresponds to only one point on the map. Clustering is also to cluster densely distributed points, that is, the density of the areas where these points are located is relatively high. Then, to cluster each target according to density, you can consider demarcating a buffer zone for each target and convert the density of the target point into a size parameter of the buffer zone.
[0108] That is, the specific clustering process can be carried out through two steps: delineating buffers and merging buffers. The size parameters of the buffers can be determined according to the current scale information and the preset minimum display distance. The preset shapes and size parameters of the buffers can be the same or different. After the buffers are delineated, there may be two states: the ranges of the buffers corresponding to the two targets do not intersect, or the ranges of the buffers corresponding to the two targets do intersect.
[0109] If the ranges of the buffers corresponding to the two targets do not intersect, it means that the distance between the two targets when displayed will not be less than the preset minimum display distance, the display marks will not overlap, and both can be displayed normally. If the ranges of the buffers corresponding to the two targets intersect, it means that the distance between the two targets when displayed will be less than the preset minimum display distance, the display marks may overlap, and may not be displayed normally.
[0110] Therefore, targets that do not intersect with other targets' buffers can be displayed directly, that is, displayed as their own representative targets. However, targets that intersect with the buffer range cannot be displayed in their entirety, and a portion of them needs to be selected as representative targets.
[0111] Specifically, several targets with intersections in the buffer range can be grouped into a cluster, and these buffers with intersections can be merged into a whole area corresponding to the cluster, with the center of the area as the cluster center. Then, based on the location information of the cluster center, one or more targets included in the cluster can be selected as the representative targets of the cluster. For example, the target closest to the center of the cluster can be selected as the representative target.
[0112] In a specific embodiment, the above-mentioned determining the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone may specifically include: determining the minimum displayable distance between any two targets according to the preset minimum display distance and the current scale information; determining the length parameter of the buffer zone according to the minimum displayable distance. Correspondingly, the above-mentioned delimiting a buffer zone for each target according to the size parameters and the preset shape includes: delimiting a buffer zone for each target according to the length parameter and the preset shape of the buffer zone, and the target is located at the center of the buffer zone corresponding to the target.
[0113] That is, when delineating the buffer zone, first determine the minimum displayable distance based on the current scale information and the preset minimum display distance. The minimum displayable distance is the distance corresponding to the minimum display distance when it is restored to the real distance through the scale, and it is also the minimum actual distance between two targets that can be clearly displayed. That is, the preset minimum display distance / scale = minimum displayable distance. Then, determine the length parameter of the buffer zone based on the minimum displayable distance. Then, take the target location as the center and delineate the buffer zone of the target based on the length parameter.
[0114] For example, the preset shape of the buffer zone may be a circle, and the minimum displayable distance may be determined as the diameter of the buffer zone, and then a circle is drawn with the target location as the center and the minimum displayable distance as the diameter as the buffer zone of the target.
[0115] For another example, the preset shape of the buffer zone may be a polygon, and the minimum displayable distance may be determined as the diagonal length of the buffer zone.
[0116] In some embodiments, in order to reduce the amount of data processing in the clustering process, it is also possible to determine which targets need to be clustered before clustering. Specifically, the above-mentioned selecting at least one representative target from multiple targets through clustering according to the current scale information, the location information of each target, and the preset minimum display distance includes: judging whether representative display is required according to the current scale information, the location information of each target, and the preset minimum display distance; if representative display is required, selecting at least one representative target from multiple targets through clustering.
[0117] That is, for all the targets that need to be displayed, the minimum displayable distance is determined according to the current scale information and the preset minimum display distance. Then, according to the current position information of each target, it is determined whether the distance between any targets is less than the minimum displayable distance. If so, these targets are clustered and representative targets are selected. For targets whose distance to other targets is not less than the minimum displayable distance, they can be directly displayed.
[0118] In some embodiments, multiple levels may be set for the objects to be displayed, and each level may be divided into multiple units. Figure 1 For example, the taxis in the city may belong to two different taxi companies A and B. The taxis in company A also include two fleets a and b, and the taxis in company B also include two fleets c and d. Figure 4As shown, the taxis that need to be displayed in the city are divided into three levels (company, fleet and vehicle), with two units (A and B) at the company level, four units (a, b, c, d) at the fleet level, and several units (taxi x) at the vehicle level. When the scale is small and the position of the vehicle (target) cannot be clearly displayed, or when there is a corresponding hierarchical display requirement, the units in the hierarchy can be used as display targets instead of individual vehicles.
[0119] Specifically, the level corresponding to each target and the corresponding unit in each level can be obtained in advance during the execution of this method. Correspondingly, the above-mentioned selection of at least one representative target from multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance can include: determining the display level corresponding to the current scale information according to the current scale information and the preset correspondence between each level and the scale; determining the location information of each unit in the display level according to the location information of each target and the unit to which each target belongs in the display level; selecting at least one representative unit from multiple units in the display level by clustering according to the current scale information, the location information of each unit in the display level, and the preset minimum display distance. Correspondingly, the above-mentioned display of the representative target at the corresponding position on the map can include: displaying the representative unit at the corresponding position on the map. The actual display distance of the representative unit is not less than the preset minimum display distance.
[0120] The user can pre-set the level and unit corresponding to each target, and can also pre-set which corresponding level is displayed at which scale. When executing the method of this application to display the target, the corresponding level can be directly displayed as the display target. When the display level is determined to be the minimum level, the display target is the target itself, that is, the method corresponding to the above embodiment is executed to select the representative target for display. When the display level is determined to be another level, the display target is the corresponding unit under the level, that is, the method of this embodiment is executed to select the representative unit for display. However, the method of selecting the representative unit can still refer to the above embodiment. In fact, the concept of the representative unit is similar to that of the above-mentioned representative target, and the only difference is that the level corresponding to the displayed subject is different.
[0121] In one implementation, the above-mentioned method of determining the location information of each unit in the display hierarchy based on the location information of each target and the unit to which each target belongs in the display hierarchy may specifically include: for each unit in the display hierarchy, determining the targets included in the unit based on the unit to which each target belongs in the display hierarchy; for each unit in the display hierarchy, determining the mean of the location information of the targets included in the unit as the location information of the unit.
[0122] When displaying a unit in the display hierarchy, the position of the unit may be represented by the average position of the targets belonging to the unit.
[0123] When executing the method of the present application, the position of each target can be directly obtained. According to the unit to which each target belongs in the current display level, the area corresponding to each unit in the display level can be divided, and the center of the area can be determined as the position of the unit.
[0124] In another implementation manner, based on the specific distribution of the targets, an area in a unit where the targets are densely distributed may be designated as the area corresponding to the unit.
[0125] In a specific embodiment, when monitoring a large number of dynamic targets, if the number of targets is huge, for example, more than 10,000, the following display method may be used:
[0126] 1. Based on the specified hierarchical relationship, the pre-specified scale range of each level is used to decide whether to expand and display the next level.
[0127] If it is found that the subordinate targets are displayed too densely, only the superior unit targets will be displayed.
[0128] 2. For targets that need to be displayed at the same level, it is necessary to cluster the targets according to their distribution on the map, and then select representative targets in each cluster for display.
[0129] 1) Generate a buffer zone (an area with a certain distance (e.g. 100km) as the radius, with the target point as the center) based on the coordinates of each target according to the display scale, and then merge all buffer zones using the polygon merging algorithm to generate multiple combined zones. Each combined zone is a cluster.
[0130] 2) For all clusters, find the single target closest to the cluster center and display it as the representative target.
[0131] 3) Use the background asynchronous processing mode to continuously perform automatic clustering in the background, and the clustering results are displayed on the front end to avoid complex calculations affecting the display and interaction fluency.
[0132] The method of the present application can achieve automation and real-time effects, without manual interaction, and has fast calculation, which is suitable for real-time calculation. In the process of changing the map scale, the display objects can be automatically aggregated and dispersed, so as to achieve a better map effect and a clearer display result.
[0133] Figure 5 A schematic diagram of a structure of a multi-dynamic target display device provided in an embodiment of the present application is shown in FIG. Figure 5As shown, the multi-dynamic target display device 500 of this embodiment includes: an acquisition module 501 , a representative target selection module 502 , and a display module 503 .
[0134] The acquisition module 501 is used to obtain the current scale information and the location information of each target;
[0135] A representative target selection module 502 is used to select at least one representative target from multiple targets by clustering according to current scale information, location information of each target, and a preset minimum display distance;
[0136] Display module 503, used to display the representative target at the corresponding position on the map;
[0137] The actual display distance of the representative target is not less than the preset minimum display distance.
[0138] Optionally, the representative target selection module 502 is specifically used for:
[0139] Determine the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone;
[0140] For each target, a buffer zone is defined for the target based on size parameters and preset shapes;
[0141] Merge the buffers with overlapping ranges to generate several clusters;
[0142] For each cluster, the representative target corresponding to the cluster is determined according to the location information of the center of the cluster.
[0143] Optionally, when the representative target selection module 502 determines the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone, it is specifically used to:
[0144] Determine the minimum displayable distance between any two targets based on the preset minimum display distance and the current scale information;
[0145] Determine the length parameter of the buffer zone according to the minimum displayable distance;
[0146] The representative target selection module 502 is specifically used to define a buffer zone for each target according to the size parameter and the preset shape:
[0147] For each target, a buffer zone is defined for the target according to the length parameter and the preset shape of the buffer zone, and the target is located at the center of the buffer zone corresponding to the target.
[0148] Optionally, when displaying the representative target at the corresponding position on the map, the display module 503 is specifically configured to:
[0149] For each representative target, at least one of the identifier of the representative target, the type of target represented by the representative target, and the quantity information of targets of each type represented by the representative target is displayed at a corresponding position on the map.
[0150] Optionally, the representative target selection module 502 is specifically used for:
[0151] Determine whether representative display is required based on the current scale information, the location information of each target, and the preset minimum display distance;
[0152] If representative display is required, at least one representative target is selected from multiple targets through clustering.
[0153] Optionally, the acquisition module 501 is further used for:
[0154] Get the level corresponding to each target and the corresponding units in each level;
[0155] The representative target selection module 502 is specifically used for:
[0156] Determine the display level corresponding to the current scale information according to the current scale information and the preset correspondence between each level and the scale;
[0157] According to the position information of each target and the unit to which each target belongs in the display hierarchy, the position information of each unit in the display hierarchy is determined;
[0158] Selecting at least one representative unit from a plurality of units in the display hierarchy by clustering according to current scale information, location information of each unit in the display hierarchy, and a preset minimum display distance;
[0159] The display module 503 is specifically used for:
[0160] Display the representative unit at the corresponding position on the map.
[0161] Optionally, when the representative target selection module 502 determines the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy, it is specifically configured to:
[0162] For each unit in the display hierarchy, determine the targets contained in the unit according to the units to which each target belongs in the display hierarchy;
[0163] For each unit in the display hierarchy, an average of the position information of the objects included in the unit is determined as the position information of the unit.
[0164] The device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0165] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 600 of this embodiment may include: a memory 601 and a processor 602 .
[0166] The memory 601 stores a computer program that can be loaded by the processor 602 and execute the method in the above embodiment.
[0167] The electronic device of this embodiment can be used to execute the method of any of the above embodiments, and its implementation principle and technical effect are similar, which will not be described in detail here.
[0168] The electronic device of this embodiment may specifically be the server described above, or other electronic devices with computing capabilities (such as a computer, a smart phone, a tablet computer, etc.).
[0169] The present application also provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method in the above embodiment.
[0170] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
Claims
1. A method for displaying multiple dynamic targets, characterized in that: For displaying multiple dynamic targets, the method comprises: Get the current scale information and location information of each target; Selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance; Displaying the representative target at a corresponding position on the map; Wherein, the actual display distance of the representative target is not less than the preset minimum display distance; The selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance includes: Determining size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and a preset shape of the buffer zone; For each target, defining a buffer zone for the target according to the size parameter and the preset shape; Merge the buffers with overlapping ranges to generate several clusters; For each cluster, a representative target corresponding to the cluster is determined according to the location information of the center of the cluster.
2. The method according to claim 1, characterized in that The step of determining the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone includes: Determine the minimum displayable distance between any two targets according to the preset minimum display distance and the current scale information; Determining a length parameter of the buffer zone according to the minimum displayable distance; For each target, defining a buffer zone for the target according to the size parameter and the preset shape, includes: For each target, a buffer zone is defined for the target according to the length parameter and the preset shape of the buffer zone, and the target is located at the center of the buffer zone corresponding to the target.
3. The method according to claim 1, characterized in that The step of displaying the representative target at a corresponding position on the map includes: For each representative target, at least one of the identifier of the representative target, the type of target represented by the representative target, and the quantity information of each type of target represented by the representative target is displayed at a corresponding position on the map.
4. The method according to any one of claims 1 to 3, characterized in that: The selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance includes: Determining whether representative display is required according to the current scale information, the location information of each target, and the preset minimum display distance; If representative display is required, at least one representative target is selected from multiple targets through clustering.
5. The method according to any one of claims 1 to 3, characterized in that: Also includes: Get the level corresponding to each target and the corresponding units in each level; The selecting at least one representative target from the multiple targets by clustering according to the current scale information, the location information of each target, and the preset minimum display distance includes: Determining a display level corresponding to the current scale information according to the current scale information and the preset correspondence between each level and the scale; Determine the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy; Selecting at least one representative unit from a plurality of units in the display level by clustering according to the current scale information, the position information of each unit in the display level, and a preset minimum display distance; The step of displaying the representative target at a corresponding position on the map includes: The representative unit is displayed at a corresponding position on the map.
6. The method according to claim 5, characterized in that The determining the position information of each unit in the display hierarchy according to the position information of each target and the unit to which each target belongs in the display hierarchy includes: For each unit in the display hierarchy, determining the targets included in the unit according to the units to which the targets belong in the display hierarchy; For each unit in the display hierarchy, an average of the position information of the objects contained in the unit is determined as the position information of the unit.
7. A multi-dynamic target display device, characterized in that: include: The acquisition module is used to obtain the current scale information and the location information of each target; A representative target selection module, configured to select at least one representative target from a plurality of targets by clustering according to the current scale information, the location information of each target, and a preset minimum display distance; A display module, used to display the representative target at a corresponding position on the map; wherein the actual display distance of the representative target is not less than the preset minimum display distance; The representative target selection module is specifically used to determine the size parameters of the buffer zone according to the current scale information, the preset minimum display distance, and the preset shape of the buffer zone; for each target, define a buffer zone for the target according to the size parameters and the preset shape; merge buffer zones with overlapping ranges to generate a number of clusters; for each cluster, determine the representative target corresponding to the cluster according to the location information of the center of the cluster.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Building block data merging method, device and equipment and storage medium
CN111737392A
Target detection model construction method and method and device for monitoring distance between different targets
CN113192646A