Track display method and device, equipment and storage medium
By dividing time periods and hierarchical clustering, the problem of excessive crossover in personnel trajectory display is solved, and the clarity of trajectory information and user experience are improved.
Patent Information
- Application Number
- CN202411354899.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, the personnel trajectories have many intersections in two-dimensional space, resulting in confusion in the trajectory display, which is not conducive to observation and analysis.
By dividing the preset time period into multiple time segments and clustering the initial visual segments based on hierarchical clustering, the target clustering results are determined to reduce trajectory crossover and improve the clarity of trajectory information.
It realizes visual display of multiple trajectory information while reducing trajectory intersections, improving the clarity and user experience of trajectory information.
Smart Images

Figure CN119311761A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a trajectory display method, device, equipment and storage medium. Background Art
[0002] Personnel management is an important means to ensure the safety and efficient production of the park. In order to achieve this goal, it is necessary to accurately record the activities of people in the park. Based on the surveillance cameras in the park, the activities of people in the park are monitored, and the records generated by the same person at different times and places are identified through recognition technology. The records belonging to the same person are integrated, and the places passed by are arranged in chronological order to form a personnel trajectory.
[0003] In the prior art, by representing the trajectory of a person in a two-dimensional space, the position change of the person along the timeline in the trajectory can be intuitively obtained, and comparing the trajectories of multiple people with each other also facilitates the observation of the intersection of different people in the time domain.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:
[0005] Since each person moves between different locations on the timeline, the corresponding personnel trajectories will overlap. If there are too many overlaps, it will appear chaotic, which is not conducive to observing and analyzing the characteristics of personnel trajectories. Summary of the invention
[0006] The present invention provides a trajectory display method, device, equipment and storage medium, which realize the visual display of trajectory information of multiple targets to be displayed under the premise of reducing trajectory intersections.
[0007] In a first aspect, an embodiment of the present invention provides a trajectory display method, including:
[0008] Determine the trajectory information of the target to be displayed within a preset time period;
[0009] Dividing the preset time period into a plurality of time segments, and constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment;
[0010] Clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results;
[0011] A target clustering result is determined according to the clustering effect of each of the clustering results, and the trajectory information of each of the to-be-displayed targets within the preset time period is displayed based on the target clustering result.
[0012] In a second aspect, an embodiment of the present invention further provides a trajectory display device, including:
[0013] A determination module, used to determine the trajectory information of the target to be displayed within a preset time period;
[0014] A construction module, used to divide the preset time period into a plurality of time segments, and construct an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment;
[0015] A clustering module, used for clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results;
[0016] A display module is used to determine a target clustering result according to the clustering effect of each clustering result, and to display the trajectory information of each target to be displayed within the preset time period based on the target clustering result.
[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0018] one or more processors;
[0019] a storage device for storing one or more programs,
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the trajectory display method as described in any one of the first aspects.
[0021] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a trajectory display method as described in any one of the first aspects.
[0022] The embodiments of the above invention have the following advantages or beneficial effects:
[0023] An embodiment of the present invention provides a trajectory display method, which includes: determining trajectory information of a target to be displayed within a preset time period; dividing the preset time period into multiple time segments, and constructing initial visualization segments corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment; clustering each initial visualization segment based on hierarchical clustering to obtain multiple clustering results; determining a target clustering result according to the clustering effect of each clustering result, and displaying the trajectory information of each target to be displayed within the preset time period based on the target clustering result. The above technical scheme can first determine the trajectory information of the target to be displayed within a preset time period, and secondly divide the preset time period into multiple time segments, and represent the trajectory information of each target to be displayed in each time segment in a two-dimensional space where the horizontal axis represents time and the vertical axis represents each location in the preset area, and obtain the initial visualization segment corresponding to each time segment, so as to realize the visualization of the trajectory information of each target to be displayed in each time segment, cluster each initial visualization segment from bottom to top based on hierarchical clustering, and cluster each initial visualization segment into a whole visualization segment, and determine multiple clustering results in the clustering process, each clustering result respectively represents a merging method of the initial visualization segments, and after determining the clustering effect of each clustering result, the clustering result with the best clustering effect is determined as the target clustering result, and each initial visualization segment is merged based on the target clustering result to obtain at least one visualization segment, so as to realize the visualization of the trajectory information of the target to be displayed within the preset time period based on at least one visualization segment corresponding to the target clustering result, and the trajectory information of the target to be displayed displayed based on these visualization segments has the least number of intersections and the highest clarity of the trajectory information, which is convenient for analyzing the trajectory information of the target to be displayed and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1a and Figure 1b is a two-dimensional space representing the trajectory of personnel;
[0025] Figure 2 A flow chart of a trajectory display method provided by an embodiment of the present invention;
[0026] Figure 3 A two-dimensional space representing the trajectory of a person for a segmented visualization method;
[0027] Figure 4 A flowchart of another trajectory display method provided by an embodiment of the present invention;
[0028] Figure 5 It is a clustering diagram;
[0029] Figure 6 A schematic diagram of the structure of a trajectory display device provided by an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0032] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.
[0033] In addition to personnel trajectory generation, personnel trajectory analysis is also an important part of security management. Personnel trajectory visualization is an important means of personnel trajectory analysis, which can intuitively obtain the position changes of personnel along the timeline. At the same time, the comparison of multiple trajectories is also convenient for observing the intersection of different personnel in the time domain, which is of great significance to security. At present, some visualization methods used for story lines can be directly used for personnel trajectory visualization, specifically, personnel trajectories can be represented in two-dimensional space. Figure 1a and Figure 1b is a two-dimensional space representing the trajectory of personnel, such as Figure 1a and Figure 1b As shown, the horizontal axis is the time axis, and each segment of the vertical axis represents a location. For each person's trajectory, the location where he appears in each time period is represented to obtain the person's trajectory. Figure 1a and Figure 1b In the example, we can intuitively analyze the places that each person has passed along the timeline, and we can also find out which people appear in the same place at the same time, so as to find the interactions between people. For example, in Figure 1, people 1 and 4 both appeared in place B at the same time period.
[0034] Since each person moves between different locations on the timeline, the corresponding personnel trajectories will also intersect. If there are too many intersections, it will appear chaotic, which is not conducive to the observation and analysis of the characteristics of personnel trajectories.
[0035] In the prior art, such intersections can be reduced as much as possible by optimizing the order of locations. After the order of locations is determined, the visualization effect of the trajectory will naturally be determined. Figure 1a A, B, C, D are rearranged as Figure 1b The number of A, B, D, C intersections is reduced from 5 to 3, and the visualization of personnel trajectories is clearer.
[0036] Although existing methods can enhance the clarity of personnel trajectories by optimizing the arrangement of locations on the coordinate axis, the number of locations and personnel in the park is very large, and the activities of personnel are relatively complex. Therefore, even if the arrangement of locations is optimized, it is difficult to solve the problem of complex intersections between trajectories.
[0037] Therefore, the present application proposes a trajectory display method, which displays the trajectory of personnel by time period, and then optimizes the arrangement of locations in each time period to reduce the number of intersections in each time period, thereby achieving a visual display of the trajectory of personnel while reducing the number of trajectory intersections.
[0038] The trajectory display method proposed in this application will be described in detail below with reference to diagrams and embodiments.
[0039] Figure 2 The present invention provides a flow chart of a trajectory display method, which is applicable to the case of visually displaying the trajectory information of multiple targets to be displayed. The method can be executed by a trajectory display device, which can be implemented by software and / or hardware. Figure 2 The method specifically comprises the following steps:
[0040] Step 210: Determine the trajectory information of the target to be displayed within a preset time period.
[0041] The target to be displayed may be an active object in a preset area, the preset area may be a park, and the target to be displayed may be a person or a vehicle, etc.
[0042] Specifically, first, a preset time period can be determined according to the time required for visual trajectory display, and secondly, the position information of the target to be displayed within the preset time period can be obtained, and then the trajectory information of the target to be displayed within the preset time period can be determined according to the position information of the target to be displayed within the preset time period, thereby realizing the generation of the trajectory information of the target to be displayed within the preset time period.
[0043] In the embodiment of the present invention, it is achieved to determine the trajectory information of the target to be displayed within a preset time period.
[0044] Step 220: Divide the preset time period into a plurality of time segments, and construct an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment.
[0045] The segmented visualization method displays the trajectories in different time periods and optimizes the arrangement of locations in each time period, thereby reducing the number of intersections of trajectories in each time period. Figure 3 The two-dimensional space of the personnel trajectory is represented by the segmented visualization method, such as Figure 3 As shown, the trajectory in Figure 1 is divided into 3 segments, each segment has no intersection, and at the same time, the second segment and the third segment only need to show 3 locations.
[0046] In practical applications, too many segments will also affect the trajectory visualization effect. Therefore, the preset time period can be divided into multiple time segments and the initial visualization segments corresponding to each time segment can be determined. Then, the initial visualization segments can be clustered based on hierarchical clustering, and the visualization display method of the trajectory can be determined according to the clustering results.
[0047] Specifically, the preset time period can be first divided into multiple time segments, and then the initial visualization segment corresponding to each time segment can be constructed according to the trajectory information of each target to be displayed in each time segment. Specifically, a two-dimensional space can be constructed with time as the horizontal axis and various locations in the preset area as the vertical axis. The trajectory information of each target to be displayed in each time segment is represented in the two-dimensional space, and the initial visualization segment corresponding to each time segment is obtained, thereby realizing the visualization display of the trajectory information of each target to be displayed in each time segment.
[0048] In an embodiment of the present invention, first, a preset time period can be divided into multiple time segments. Secondly, the trajectory information of each target to be displayed in each time segment can be represented in a two-dimensional space in which the horizontal axis represents time and the vertical axis represents each location in the preset area, and an initial visualization segment corresponding to each time segment is obtained, thereby realizing a visualization display of the trajectory information of each target to be displayed in each time segment.
[0049] Step 230: cluster the initial visualization segments based on hierarchical clustering to obtain multiple clustering results.
[0050] The number of initial visualization segments is large, which affects the display effect of trajectory information. Therefore, the initial visualization segments can be clustered to determine the best display method of trajectory information.
[0051] Specifically, the mergeable initial visualization segments can be determined from the bottom up based on hierarchical clustering, and the mergeable initial visualization segments can be merged to obtain intermediate visualization segments, and the intermediate visualization segments are used as the initial visualization segments, and the mergeable initial visualization segments can be determined from the bottom up based on hierarchical clustering until all the initial visualization segments are merged into a whole visualization segment. In the clustering process, multiple clustering results are determined according to the merging methods of the initial visualization segments.
[0052] When hierarchical clustering determines the mergeable initial visualization segments, it is necessary to determine the distance between two adjacent initial visualization segments. Specifically, the visualization segments composed of two adjacent initial visualization segments can be prioritized, and the number of trajectory intersections after the optimization is determined as the distance between two adjacent initial visualization segments. The hierarchical clustering algorithm can calculate the distance between every two adjacent initial visualization segments, and determine the two initial visualization segments with the smallest distance as the mergeable initial visualization segments.
[0053] In an embodiment of the present invention, clustering of each initial visualization fragment is implemented based on hierarchical clustering to cluster each initial visualization fragment into a whole visualization fragment, and multiple clustering results are determined in the clustering process, each clustering result represents a merging method of the initial visualization fragments, providing a data basis for determining the final merging method of the initial visualization fragments.
[0054] Step 240: determine a target clustering result according to the clustering effect of each of the clustering results, and display the trajectory information of each of the to-be-displayed targets within the preset time period based on the target clustering result.
[0055] The target clustering results are used to guide the merging method of the initial visualization fragments.
[0056] Specifically, the ratio of the intra-class distance to the inter-class distance of the clustering result indicates the clustering effect of the clustering result. Therefore, the clustering effect of each clustering result can be determined according to the ratio of the intra-class distance to the inter-class distance of each clustering result. The smaller the ratio of the intra-class distance to the inter-class distance of the clustering result, the better the clustering result effect. Therefore, the clustering result corresponding to the minimum clustering effect can be determined as the target clustering result.
[0057] Each clustering result corresponds to a merging method of initial visualization segments. Therefore, each initial visualization segment can be merged based on the merging method of the initial visualization segments corresponding to the target clustering result to obtain at least one visualization segment corresponding to the target clustering result, thereby realizing a visualization display of the trajectory information of the target to be displayed within a preset time period based on at least one visualization segment corresponding to the target clustering result.
[0058] In an embodiment of the present invention, the clustering result with the best clustering effect is determined as the target clustering result, and the initial visualization fragments are merged based on the target clustering result to obtain at least one visualization fragment. The number of intersections of the trajectory information of the target to be displayed based on these visualization fragments is the least, and the clarity of the trajectory information is the highest.
[0059] The trajectory display method provided by an embodiment of the present invention includes: determining the trajectory information of a target to be displayed within a preset time period; dividing the preset time period into multiple time segments, and constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment; clustering each initial visualization segment based on hierarchical clustering to obtain multiple clustering results; determining a target clustering result according to the clustering effect of each clustering result, and displaying the trajectory information of each target to be displayed within the preset time period based on the target clustering result. The above technical scheme can first determine the trajectory information of the target to be displayed within a preset time period, and secondly divide the preset time period into multiple time segments, and represent the trajectory information of each target to be displayed in each time segment in a two-dimensional space where the horizontal axis represents time and the vertical axis represents each location in the preset area, and obtain the initial visualization segment corresponding to each time segment, so as to realize the visualization of the trajectory information of each target to be displayed in each time segment, cluster each initial visualization segment from bottom to top based on hierarchical clustering, and cluster each initial visualization segment into a whole visualization segment, and determine multiple clustering results in the clustering process, each clustering result respectively represents a merging method of the initial visualization segments, and after determining the clustering effect of each clustering result, the clustering result with the best clustering effect is determined as the target clustering result, and each initial visualization segment is merged based on the target clustering result to obtain at least one visualization segment, so as to realize the visualization of the trajectory information of the target to be displayed within the preset time period based on at least one visualization segment corresponding to the target clustering result, and the trajectory information of the target to be displayed displayed based on these visualization segments has the least number of intersections and the highest clarity of the trajectory information, which is convenient for analyzing the trajectory information of the target to be displayed and improving the user experience.
[0060] Figure 4 This is a flowchart of another trajectory display method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the case of visually displaying the trajectory information of multiple targets to be displayed. The embodiment of the present invention is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 4 , the trajectory display method provided by the embodiment of the present invention includes:
[0061] Step 410: Determine the trajectory information of the target to be displayed within a preset time period.
[0062] In one implementation, step 410 may specifically include:
[0063] The position information of each of the to-be-displayed objects is obtained at every preset time period within the preset time period; and the trajectory information of each of the to-be-displayed objects within the preset time period is determined according to the position information of each of the to-be-displayed objects at every preset time period within the preset time period.
[0064] Specifically, first, a preset time period can be determined according to the time when the visual trajectory display is required. For example, the preset time period can be one day. Secondly, the position information of the target to be displayed within the preset time period can be obtained. Since the amount of data of continuously obtaining the position information is large, the position information of each target to be displayed can be obtained at intervals of a preset time period within the preset time period. The preset time period can be set according to demand. For example, the preset time period can be one minute, that is, the position information of each target to be displayed can be obtained at intervals of one minute within one day. Then, according to the position information of the target to be displayed at intervals of the preset time period within the preset time period, the trajectory information of each target to be displayed within the preset time period can be determined, thereby realizing the generation of the trajectory information of the target to be displayed within the preset time period.
[0065] In the embodiment of the present invention, it is achieved to determine the trajectory information of the target to be displayed within a preset time period.
[0066] Step 420: Divide the preset time period into multiple time segments.
[0067] In one implementation, step 420 may specifically include:
[0068] The preset time period is divided into a plurality of time segments based on the preset time period.
[0069] Specifically, the segmented visualization method needs to first divide the preset time period into multiple time segments. Therefore, the preset time period can be divided into N time segments based on the preset time period, where N is a natural number. When the preset time period is one day and the preset time period is one minute, one day can be divided into 86,400 time segments based on one minute.
[0070] In actual applications, the preset time period may also be divided into multiple time segments based on other time periods. The time length of other time periods is greater than or equal to the time length of the preset time period. The specific time length may be set according to actual needs.
[0071] In the embodiment of the present invention, the preset time period is divided.
[0072] Step 430: construct an initial visualization segment corresponding to each of the time segments according to the trajectory information of each of the to-be-displayed objects in each of the time segments.
[0073] In one implementation, step 430 may specifically include:
[0074] The trajectory information of each of the to-be-displayed objects in each of the time segments is displayed in a two-dimensional space in which the horizontal axis represents time and the vertical axis represents location, so as to obtain the initial visualization segment corresponding to each of the time segments.
[0075] Specifically, the initial visualization segment corresponding to each time segment can be constructed according to the trajectory information of each target to be displayed in each time segment. For each time segment, the trajectory information of each target to be displayed in the time segment can be displayed in a two-dimensional space with the horizontal axis representing time and the vertical axis representing location, and the initial visualization segment corresponding to the time segment can be obtained, and then the initial visualization segment corresponding to each time segment can be obtained, so as to realize the visualization display of the trajectory information of each target to be displayed in each time segment.
[0076] In an embodiment of the present invention, by displaying the trajectory information of each target to be displayed in each time segment in a two-dimensional space in which the horizontal axis represents time and the vertical axis represents each location in a preset area, an initial visualization segment corresponding to each time segment is obtained, thereby realizing a visualization display of the trajectory information of each target to be displayed in each time segment.
[0077] Step 440: cluster the initial visualization segments based on hierarchical clustering to obtain multiple clustering results.
[0078] In one implementation, step 440 may specifically include:
[0079] Determine the segment distance between each adjacent initial visualization segment; merge two adjacent initial visualization segments with the smallest segment distance to obtain an intermediate visualization segment, and determine the clustering result according to the intermediate visualization segment and other initial visualization segments; take the intermediate visualization segment as the initial visualization segment, and return to determine the segment distance between each adjacent initial visualization segment until the intermediate visualization segment is consistent with the time length of the preset time period.
[0080] Furthermore, determining the segment distance between each adjacent initial visualization segment includes:
[0081] Based on the principle of minimum number of track intersections, the visualization segments formed by two adjacent initial visualization segments are ranked in locations, and the number of track intersections after ranking is determined as the segment distance between the two adjacent initial visualization segments.
[0082] Specifically, more time segments will affect the trajectory visualization effect, so the initial visualization segments can be clustered to determine the best way to display the trajectory information. Figure 5 is a clustering diagram, such as Figure 5 As shown, clustering can be performed from bottom to top based on hierarchical clustering. Specifically, the segment distance between each adjacent initial visualization segment can be determined first. Specifically, the visualization segments composed of adjacent initial visualization segments can be prioritized based on the principle of minimum number of track intersections, and the number of track intersections after optimization can be determined as the segment distance between adjacent initial visualization segments. Secondly, two adjacent initial visualization segments corresponding to the minimum segment distance can be merged to obtain an intermediate visualization segment, and then the intermediate visualization segment can be used as the initial visualization segment, and the segment distance between each adjacent initial visualization segment is determined again until the intermediate visualization segment is consistent with the time length of the preset time period, that is, all initial visualization segments are aggregated into a whole visualization segment.
[0083] For example, the segment distance between each adjacent initial visualization segment in N initial visualization segments can be calculated, and the two adjacent initial visualization segments with the smallest segment distance can be merged. The segment distance between each adjacent visualization segment in N-1 visualization segments can be calculated, and the two adjacent visualization segments with the smallest segment distance can be merged. The merging step is repeated until all initial visualization segments are aggregated into one visualization segment.
[0084] Of course, in the aggregation process, each time an initial visualization segment is merged to obtain an intermediate visualization segment, a clustering result can be obtained, that is, the clustering result can be determined based on the intermediate visualization segment and other initial visualization segments.
[0085] In an embodiment of the present invention, clustering of each initial visualization fragment is implemented based on hierarchical clustering to cluster each initial visualization fragment into a whole visualization fragment, and multiple clustering results are determined in the clustering process, each clustering result represents a merging method of the initial visualization fragments, providing a data basis for determining the final merging method of the initial visualization fragments.
[0086] Step 450: Determine a target clustering result according to the clustering effects of the clustering results.
[0087] In one implementation, step 450 may specifically include:
[0088] The clustering effect of each clustering result is determined according to the ratio of the intra-class distance to the inter-class distance of each clustering result, and the clustering result corresponding to the minimum clustering effect is determined as the target clustering result.
[0089] Specifically, the clustering effect of each clustering result can be determined according to the ratio of the intra-class distance to the inter-class distance of each clustering result, the clustering effects of each clustering result can be compared, and the clustering result corresponding to the minimum clustering effect can be determined as the target clustering result.
[0090] In another implementation manner, step 450 may specifically include:
[0091] Determine the number of visualization segments included in each clustering result and the number of required segments included in the received interactive information; and determine the clustering effect in which the number of visualization segments is consistent with the number of required segments as the target clustering result.
[0092] Specifically, the merging method corresponding to each clustering result generated in the clustering process can merge the initial visualization fragments into at least one visualization fragment, and the number of visualization fragments merged by each clustering result is different. In order to meet user needs, the target clustering result can be determined in each clustering result according to the number of required fragments contained in the received interactive information, that is, the number of required fragments contained in the interactive information and the number of visualization fragments contained in each clustering result can be compared, and the clustering effect in which the number of visualization fragments in each clustering result is consistent with the number of required fragments is determined as the target clustering result.
[0093] In actual applications, if the clustering result with the best clustering effect among the clustering results generated in the clustering process is determined as the target clustering result, when the user chooses to reduce or increase the number of visualization fragments, the number of visualization fragments included in the target clustering result can be adjusted according to the increase or decrease contained in the received interactive information to obtain the required number of fragments, and the clustering effect in which the number of visualization fragments in each clustering result is consistent with the required number of fragments is determined as the target clustering result.
[0094] Step 460: Display the trajectory information of each of the to-be-displayed targets within the preset time period based on the target clustering result.
[0095] Specifically, the initial visualization segments can be merged based on the merging method of the initial visualization segments corresponding to the target clustering results to obtain at least one visualization segment corresponding to the target clustering result, thereby realizing a visualization display of the trajectory information of the target to be displayed within a preset time period based on the at least one visualization segment corresponding to the target clustering result.
[0096] In an embodiment of the present invention, a clustering result with the best clustering effect is determined as a target clustering result, and each initial visualization segment is merged based on the target clustering result to obtain at least one visualization segment. The trajectory information of the target to be displayed displayed based on these visualization segments has the least number of intersections and the highest clarity of the trajectory information. Alternatively, a target clustering result is determined among the clustering results according to user needs, and each initial visualization segment is merged based on the target clustering result to obtain at least one visualization segment. The trajectory information of the target to be displayed displayed based on these visualization segments best meets user needs, thereby improving user experience.
[0097] The trajectory display method provided by the embodiment of the present invention includes: obtaining the position information of each target to be displayed at each preset time period within the preset time period; determining the trajectory information of each target to be displayed within the preset time period according to the position information of each target to be displayed at each preset time period within the preset time period; dividing the preset time period into a plurality of time segments based on the preset time period; displaying the trajectory information of each target to be displayed within each time segment in a two-dimensional space in which the horizontal axis represents time and the vertical axis represents location, and obtaining the initial visualization segment corresponding to each time segment; determining the segment distance between each adjacent initial visualization segment; merging two adjacent initial visualization segments with the smallest segment distance to obtain an intermediate visualization segment, and performing a multi-step visualization operation according to the intermediate visualization segment. The clustering result is determined by combining the intermediate visualization segments and other initial visualization segments; taking the intermediate visualization segment as the initial visualization segment, returning to determine the segment distance between each adjacent initial visualization segment, until the intermediate visualization segment is consistent with the time length of the preset time period; determining the clustering effect of each clustering result according to the ratio of the intra-class distance to the inter-class distance of each clustering result, and determining the clustering result corresponding to the minimum clustering effect as the target clustering result; or determining the number of visualization segments contained in each clustering result and the number of required segments contained in the received interactive information; determining the clustering effect with the same number of visualization segments as the number of required segments as the target clustering result; and displaying the trajectory information of each target to be displayed within the preset time period based on the target clustering result.The above technical scheme can first determine the trajectory information of the target to be displayed within a preset time period, and secondly divide the preset time period into multiple time segments, and then represent the trajectory information of each target to be displayed in each time segment in a two-dimensional space where the horizontal axis represents time and the vertical axis represents each location in the preset area, and obtain the initial visualization segment corresponding to each time segment, so as to realize the visualization display of the trajectory information of each target to be displayed in each time segment, and then cluster the initial visualization segments from bottom to top based on hierarchical clustering, cluster the initial visualization segments into a whole visualization segment, determine multiple clustering results in the clustering process, each clustering result represents a merging method of the initial visualization segments, determine the clustering effect of each clustering result, and determine the clustering result with the best clustering effect as the target clustering result, or , determine the number of visualization segments contained in each clustering result and the number of required segments contained in the received interactive information, and determine the clustering effect with the same number of visualization segments as the number of required segments as the target clustering result, merge the initial visualization segments based on the target clustering result to obtain at least one visualization segment, and realize the visualization display of the trajectory information of the target to be displayed within a preset time period based on at least one visualization segment corresponding to the target clustering result, the visualization segment corresponding to the target clustering result with the best clustering effect displays the least number of intersections of the trajectory information of the target to be displayed, and the clarity of the trajectory information is the highest, which is convenient for analyzing the trajectory information of the target to be displayed, and the target clustering result determined based on the number of required segments contained in the received interactive information best meets the user needs and improves the user experience.
[0098] Figure 6 This is a schematic diagram of the structure of a trajectory display device provided by an embodiment of the present invention. The device and the trajectory display methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the trajectory display device can refer to the embodiment of the above trajectory display method.
[0099] The specific structure of the track display device is as follows: Figure 6 As shown, including:
[0100] A determination module 610 is used to determine the trajectory information of the target to be displayed within a preset time period;
[0101] A construction module 620 is used to divide the preset time period into a plurality of time segments, and construct an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment;
[0102] A clustering module 630, configured to cluster the initial visualization segments based on hierarchical clustering to obtain a plurality of clustering results;
[0103] The display module 640 is used to determine a target clustering result according to the clustering effect of each clustering result, and display the trajectory information of each target to be displayed within the preset time period based on the target clustering result.
[0104] Based on the above embodiment, the determination module 610 is specifically used for:
[0105] The position information of each of the to-be-displayed objects is obtained at every preset time period within the preset time period; and the trajectory information of each of the to-be-displayed objects within the preset time period is determined according to the position information of each of the to-be-displayed objects at every preset time period within the preset time period.
[0106] Based on the above embodiment, a module 620 is constructed, which is specifically used for:
[0107] The preset time period is divided into a plurality of time segments based on the preset time period; the trajectory information of each target to be displayed in each time segment is displayed in a two-dimensional space where the horizontal axis represents time and the vertical axis represents location, so as to obtain the initial visualization segment corresponding to each time segment.
[0108] Based on the above embodiment, the clustering module 630 is specifically used for:
[0109] Determine the segment distance between each adjacent initial visualization segment; merge two adjacent initial visualization segments with the smallest segment distance to obtain an intermediate visualization segment, and determine the clustering result according to the intermediate visualization segment and other initial visualization segments; take the intermediate visualization segment as the initial visualization segment, and return to determine the segment distance between each adjacent initial visualization segment until the intermediate visualization segment is consistent with the time length of the preset time period.
[0110] In one implementation, determining the segment distance between adjacent initial visualization segments includes:
[0111] Based on the principle of minimum number of track intersections, the visualization segments formed by two adjacent initial visualization segments are ranked in locations, and the number of track intersections after ranking is determined as the segment distance between the two adjacent initial visualization segments.
[0112] Based on the above embodiment, the display module 640 is specifically used for:
[0113] The clustering effect of each clustering result is determined according to the ratio of the intra-class distance to the inter-class distance of each clustering result, and the clustering result corresponding to the minimum clustering effect is determined as the target clustering result.
[0114] Based on the above embodiment, the display module 640 is specifically used for:
[0115] Determine the number of visualization segments included in each clustering result and the number of required segments included in the received interactive information; and determine the clustering effect in which the number of visualization segments is consistent with the number of required segments as the target clustering result.
[0116] The trajectory display device provided in the embodiment of the present invention can execute the trajectory display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the trajectory display method.
[0117] It is worth noting that in the embodiment of the above-mentioned trajectory display device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0118] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 7 A block diagram of an exemplary electronic device 7 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The electronic device 7 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0119] like Figure 7 As shown, the electronic device 7 is in the form of a general-purpose computing electronic device. The components of the electronic device 7 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0120] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0121] The electronic device 7 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 7, including volatile and non-volatile media, removable and non-removable media.
[0122] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 7 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0123] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0124] The electronic device 7 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 7, and / or may communicate with any device that enables the electronic device 7 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 7 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. Figure 7 As shown, the network adapter 20 communicates with other modules of the electronic device 7 via the bus 18. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 7, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0125] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the trajectory display method provided in the embodiment of the present invention, which includes:
[0126] Determine the trajectory information of the target to be displayed within a preset time period;
[0127] Dividing the preset time period into a plurality of time segments, and constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment;
[0128] Clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results;
[0129] A target clustering result is determined according to the clustering effect of each of the clustering results, and the trajectory information of each of the to-be-displayed targets within the preset time period is displayed based on the target clustering result.
[0130] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the trajectory display method provided by any embodiment of the present invention.
[0131] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, for example, a trajectory display method provided by an embodiment of the present invention is implemented. The method includes:
[0132] Determine the trajectory information of the target to be displayed within a preset time period;
[0133] Dividing the preset time period into a plurality of time segments, and constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment;
[0134] Clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results;
[0135] A target clustering result is determined according to the clustering effect of each of the clustering results, and the trajectory information of each of the to-be-displayed targets within the preset time period is displayed based on the target clustering result.
[0136] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0137] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0138] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0139] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0141] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0142] After obtaining the location information of each target to be displayed at preset time intervals within the preset time period, we will use technical means to de-identify the data.
[0143] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A trajectory display method, characterized in that: include: Determine the trajectory information of the target to be displayed within a preset time period; Dividing the preset time period into a plurality of time segments, and constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment; Clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results; A target clustering result is determined according to the clustering effect of each of the clustering results, and the trajectory information of each of the to-be-displayed targets within the preset time period is displayed based on the target clustering result.
2. The trajectory display method according to claim 1, characterized in that: Determine the trajectory information of the target to be displayed within a preset time period, including: Acquiring the position information of each of the to-be-displayed objects at intervals of a preset time period within the preset time period; According to the position information of each of the to-be-displayed objects at intervals of a preset time period within the preset time period, the trajectory information of each of the to-be-displayed objects within the preset time period is determined.
3. The trajectory display method according to claim 2, characterized in that: Dividing the preset time period into multiple time segments includes: The preset time period is divided into a plurality of time segments based on the preset time period.
4. The trajectory display method according to claim 1, characterized in that: Constructing an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment, including: The trajectory information of each of the to-be-displayed objects in each of the time segments is displayed in a two-dimensional space in which the horizontal axis represents time and the vertical axis represents location, so as to obtain the initial visualization segment corresponding to each of the time segments.
5. The trajectory display method according to claim 1, characterized in that: Clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results, including: Determining a segment distance between each adjacent initial visualization segment; Merging two adjacent initial visualization segments with the smallest segment distance to obtain an intermediate visualization segment, and determining a clustering result based on the intermediate visualization segment and other initial visualization segments; The intermediate visualization segment is used as the initial visualization segment, and the process of determining the segment distance between adjacent initial visualization segments is returned until the intermediate visualization segment has the same time length as the preset time period.
6. The trajectory display method according to claim 5, characterized in that: Determine the fragment distance between each adjacent initial visualization fragment, including: Based on the principle of minimum number of track intersections, the visualization segments formed by two adjacent initial visualization segments are ranked in locations, and the number of track intersections after ranking is determined as the segment distance between the two adjacent initial visualization segments.
7. The trajectory display method according to claim 1, characterized in that: Determining a target clustering result according to the clustering effect of each of the clustering results includes: The clustering effect of each clustering result is determined according to the ratio of the intra-class distance to the inter-class distance of each clustering result, and the clustering result corresponding to the minimum clustering effect is determined as the target clustering result.
8. The trajectory display method according to claim 1, characterized in that: Determining a target clustering result according to the clustering effect of each of the clustering results includes: Determining the number of visualization segments included in each of the clustering results and the number of demand segments included in the received interactive information; The clustering effect in which the number of visualization segments is consistent with the number of required segments is determined as the target clustering result.
9. A trajectory display device, characterized in that: include: A determination module, used to determine the trajectory information of the target to be displayed within a preset time period; A construction module, used to divide the preset time period into a plurality of time segments, and construct an initial visualization segment corresponding to each time segment according to the trajectory information of each target to be displayed in each time segment; A clustering module, used for clustering the initial visualization fragments based on hierarchical clustering to obtain multiple clustering results; A display module is used to determine a target clustering result according to the clustering effect of each clustering result, and to display the trajectory information of each target to be displayed within the preset time period based on the target clustering result.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the trajectory display method as described in any one of claims 1-8.
11. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the trajectory display method as described in any one of claims 1 to 8 when executed by a computer processor.