CN114440920A - Track flow display method and device based on electronic map - Google Patents

Track flow display method and device based on electronic map Download PDF

Info

Publication number
CN114440920A
CN114440920A CN202210104518.4A CN202210104518A CN114440920A CN 114440920 A CN114440920 A CN 114440920A CN 202210104518 A CN202210104518 A CN 202210104518A CN 114440920 A CN114440920 A CN 114440920A
Authority
CN
China
Prior art keywords
track
foreground
starting point
background
solid line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210104518.4A
Other languages
Chinese (zh)
Other versions
CN114440920B (en
Inventor
路明辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tenth Research Institute Of Telecommunications Technology Co ltd
Original Assignee
Tenth Research Institute Of Telecommunications Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tenth Research Institute Of Telecommunications Technology Co ltd filed Critical Tenth Research Institute Of Telecommunications Technology Co ltd
Priority to CN202210104518.4A priority Critical patent/CN114440920B/en
Publication of CN114440920A publication Critical patent/CN114440920A/en
Application granted granted Critical
Publication of CN114440920B publication Critical patent/CN114440920B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • G01C21/3667Display of a road map
    • G01C21/367Details, e.g. road map scale, orientation, zooming, illumination, level of detail, scrolling of road map or positioning of current position marker

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses a track flow display method and a device based on an electronic map, wherein the method comprises the following steps: acquiring a track to be played back; generating a background track displayed in a solid line mode and a foreground track displayed in a dotted line mode and superposed on the background track according to the track to be played back; taking the pixel length occupied by the first solid line segment where the track starting point of the foreground track is as the total moving step number, and circularly and dynamically updating the track starting point of the foreground track according to the speed of moving 1 pixel to the track end point of the foreground track every time to obtain the updated foreground track; and according to the updating sequence, circularly and repeatedly displaying the updated foreground track on the background track in sequence at a preset playback time interval so as to realize the flowing display of the foreground track on the background track. The invention can not only completely reflect the direction of each track section in the whole track, but also realize the dynamic uniform speed smooth playback of the track under the condition that the map scale is constantly changed.

Description

Track flow display method and device based on electronic map
Technical Field
The invention relates to the technical field of electronic maps, in particular to a track flow display method and device based on an electronic map.
Background
The dynamic display of the track direction of the electronic map is a common electronic map track playback method. The common method for displaying the track direction of the electronic map is to display the track by gradually extending the track line. The display method is characterized in that a target object is displayed to move forwards from a track starting point, a track line is formed by connecting the track starting point with the target object, the track line is gradually lengthened until the target object reaches a track end point, and the display is finished.
However, the above-mentioned track display method can realize the basic display of the track direction, and has many disadvantages. The track display method cannot visually reflect the direction of each section of track in the whole track, and the display effect is poor. In addition, when the length and time span of the adjacent track segment change greatly, the display effect may jump, suddenly accelerate or suddenly decelerate due to the poor calculation method of the display speed. Meanwhile, the dynamic display effect is insufficient, the display effect has a larger relationship with the map scale, and when the difference between the map scale and the optimal scale is larger, the situation that the track playback speed is slower or faster can also occur. Therefore, the above-mentioned track display method cannot satisfy the requirement of smooth playback of the track.
It is noted that this section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Disclosure of Invention
The embodiment of the invention provides a track flow display method and device based on an electronic map, and aims to solve the problems that the direction of each section of track in the whole track cannot be intuitively reflected by track playback and the requirement of smooth track playback cannot be met in the prior art.
In a first aspect, an embodiment of the present invention provides a trajectory flow display method based on an electronic map, including:
acquiring a track to be played back;
generating a background track displayed in a solid line mode and a foreground track displayed in a dotted line mode and superposed on the background track according to the track to be played back;
taking the pixel length occupied by the first solid line segment where the track starting point of the foreground track is as the total moving step number, and circularly and dynamically updating the track starting point of the foreground track according to the speed of moving 1 pixel to the track end point of the foreground track every time to obtain the updated foreground track;
and according to the updating sequence, sequentially and circularly superposing and displaying the updated foreground track on the background track at a preset playback time interval so as to realize the flowing display of the foreground track on the background track.
As a preferred mode of the first aspect of the present invention, the generating, according to the track to be played back, a background track displayed in a solid line manner and a foreground track displayed in a dotted line manner and superimposed on the background track includes:
generating a background track displayed in a solid line manner by adopting a preset background track color and a preset background track width according to the track to be played back;
and generating a foreground track displayed in a dotted line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
As a preferable mode of the first aspect of the present invention, the dynamically updating the track start point of the foreground track in a loop includes:
acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of the solid line segment where the track starting point of the foreground track is located;
judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
if the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the moved track starting point of the foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
As a preferred aspect of the first aspect of the present invention, the present invention further comprises:
and if the total moving step number is equal to the total moving step number, determining the position of the starting point of the solid line as the next position of the starting point of the track of the foreground track, and carrying out zero clearing treatment on the current moving step number.
As a preferred mode of the first aspect of the present invention, the displaying, according to the update sequence, the updated foreground track cyclically and sequentially superimposed on the background track at preset playback time intervals includes:
and according to the updating sequence, after the foreground track displaying the preset playback time interval is cleared, the updated foreground track is redrawn from the track starting point of the dynamically updated foreground track to the track end point of the foreground track, and the updated foreground track is superposed and displayed on the background track.
In a second aspect, an embodiment of the present invention provides an electronic map-based trajectory flow display device, including:
an acquisition unit configured to acquire a track to be played back;
a generating unit, configured to generate, according to the track to be played back, a background track displayed in a solid line manner and a foreground track displayed in a dotted line manner and displayed in an overlaid manner on the background track;
an updating unit, configured to take the pixel length occupied by the first solid line segment where the track start point of the foreground track is located as a total moving step number, and dynamically update the track start point of the foreground track in a circulating manner at a speed of moving 1 pixel to the track end point of the foreground track every time, so as to obtain an updated foreground track;
and the display unit is used for circularly and overlappingly displaying the updated foreground track on the background track in sequence at a preset playback time interval according to the updating sequence so as to realize the flowing display of the foreground track on the background track.
As a preferable mode of the second aspect of the present invention, the generating unit is specifically configured to:
generating a background track displayed in a solid line manner by adopting a preset background track color and a preset background track width according to the track to be played back;
and generating a foreground track displayed in a dotted line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
As a preferable mode of the second aspect of the present invention, the updating unit is specifically configured to:
acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of the solid line segment where the track starting point of the foreground track is located;
judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
if the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the moved track starting point of the foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores execution instructions, and the execution instructions in the memory are read by the processor for executing the steps in the electronic map-based trajectory flow display method according to any one of the first aspect and its preferred embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium containing computer-executable instructions for executing steps in the electronic map-based trajectory flow display method according to any one of the first aspect and its preferred embodiments.
The track flow display method and device based on the electronic map provided by the embodiment of the invention perform track playback by adopting a double-layer overlapping display mode of the background track and the foreground track, keep the background track still in the playback process, and make the foreground track displayed above the background track continuously and circularly move forwards in a certain range according to the speed of 1 pixel at each time, the relative position of the background track and the upper layer of the foreground track continuously changes, show the flow effect of the whole track, not only can completely reflect the direction of each section of track in the whole track, but also can realize dynamic uniform-speed smooth playback of the track under the condition that the scale of the map continuously changes.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a trajectory flow display method based on an electronic map according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an effect of displaying a foreground track on a background track in an overlapping manner according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a trajectory flow display device based on an electronic map according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a trajectory flow display device based on an electronic map according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Fig. 1 exemplarily shows a flow diagram of a trajectory flow display method based on an electronic map according to an embodiment of the present invention, in which a relative position of a background trajectory and a foreground trajectory on an upper layer is continuously changed, a flow effect of a whole trajectory is exhibited, a direction of each track segment in the whole trajectory can be completely reflected, and dynamic uniform-speed smooth playback of the trajectory can be realized under a condition that a scale of the map is continuously changed.
Referring to fig. 1, the method mainly includes the following steps:
step 101, obtaining a track to be played back;
102, generating a background track displayed in a solid line mode and a foreground track displayed in a dotted line mode and superposed on the background track according to a track to be played back;
step 103, taking the length of the pixel occupied by the first section of the solid line segment where the track starting point of the foreground track is as the total moving step number, and circularly and dynamically updating the track starting point of the foreground track according to the speed of moving 1 pixel to the track end point of the foreground track every time to obtain the updated foreground track;
and step 104, circularly and sequentially overlapping and displaying the updated foreground track on the background track at preset playback time intervals according to the updating sequence so as to realize the flowing display of the foreground track on the background track.
In step 101, the electronic map is a map that is stored and referred to digitally by computer technology, and is a visual real map, and the track is composed of the past appearance time and place of a certain object. In order to more vividly analyze an object, a trajectory of the object may be played back on the electronic map.
The acquired track to be played back is a common map coordinate system, and under the fixed map coordinate system, the track to be played back is marked as data L.
When the track to be played back is obtained, a starting point, an end point and a plurality of passing points of the track to be played back are obtained and marked as L _ S, L _ E and L _ P respectively. Wherein, a plurality of passing points are respectively marked as L _ P1~L_Pn
In step 102, according to the data related to the track to be played back obtained in the above steps, a background track displayed in a solid line manner is generated first, a foreground track displayed in a dotted line manner is generated again, the foreground track is displayed in a superimposed manner on the background track, and the track playback is performed in a double-layer superimposed manner. Meanwhile, the background track and the foreground track are drawn by adopting different colors and widths, so that the flowing effect during track playback is better.
In the playback process, the background track is kept still, the foreground track displayed above the background track continuously moves forwards circularly in a certain range, and the relative position of the background track and the foreground track on the upper layer is continuously changed, so that the flowing effect of the whole track can be displayed.
By setting the background track and the foreground track and adopting a double-layer overlapping display mode to playback the track, compared with a single-layer display playback mode in the prior art, the double-layer overlapping display mode can completely embody the direction of each track section in the whole track.
In an alternative embodiment provided by the present application, step 102 may be implemented as follows:
1021. and generating a background track displayed in a solid line mode by adopting a preset background track color and a preset background track width according to the track to be played back.
In this step, after the relevant data of the track to be played back is acquired, the background track color C of the background track is preset1And background track width W1. Then, by adopting the preset background track color and the preset background track width, two adjacent points in the starting point, the plurality of passing points and the end point are sequentially connected by a solid line, so that the background track is generated.
The background track remains unchanged throughout the playback of the track.
1022. And generating a foreground track displayed in a dotted line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
In the step, after the relevant data of the track to be played back is obtained, the foreground track color C of the foreground track is preset2And foreground trackWidth W2. Then, by adopting the preset foreground track color and the foreground track width, two adjacent points in the starting point, the plurality of passing points and the terminal point are sequentially connected by using a dotted line, so that the foreground track is generated. In general, the width of the foreground track should be smaller than or equal to the width of the background track, so that the flowing effect is more obvious. In this embodiment, the foreground track width is the same as the background track width.
In the whole process of track playback, the background track is kept unchanged, and the foreground track is displayed on the background track in an overlapped mode. In the initial state, the foreground track and the background track are completely overlapped. With particular reference to fig. 2.
After the track begins to be played back, the starting point of the foreground track continuously moves to form a flowing state, and the flowing effect of the whole track can be displayed. With particular reference to figure 3.
In step 103, after the track starts to play back, since the foreground track is a dotted line, that is, the foreground track is formed by repeating a loop of a solid line segment plus a blank interval at one end plus a solid line segment, the track start point of the foreground track at the beginning coincides with the start point of the track to be played back, and is located at the solid line start point of the first solid line segment on the foreground track.
In this embodiment, because the total length of the pixels occupied by the track to be played back is generally greater than the length of the pixels of the first solid line segment where the track start point of the foreground track is located, the length of the pixels occupied by the first solid line segment where the track start point of the foreground track is located is taken as the total number of moving steps of the circular movement, and the track start point of the foreground track is continuously and dynamically updated at a speed of moving 1 pixel to the track end point of the foreground track every time, so that the updated foreground track is continuously obtained.
Under special conditions, the track to be played back is short or the total length of pixels occupied by the track to be played back after the electronic map is reduced is short, and the total length of the pixels occupied by the track to be played back is smaller than the length of the first solid line segment where the track starting point of the foreground track is located, the total length of the pixels occupied by the whole track to be played back is taken as the total moving step number of the circular movement, and at the moment, the end point of the track to be played back is taken as the track end point of the foreground track movement.
And in the range of the pixel length occupied by the first solid line segment where the track starting point of the foreground track is located, moving the track starting point of the foreground track forward by one pixel from the solid line starting point of the first solid line segment until the solid line end point of the first solid line segment is reached, returning to the solid line starting point of the first solid line segment, and repeating the steps in a circulating manner.
If the total length of the pixels occupied by the track to be played back is smaller than the pixel length occupied by the first solid line segment where the track starting point of the foreground track is located, the moving range of the track starting point of the foreground track is the whole track to be played back; and when the track starting point of the foreground track moves to the end point of the track to be played back, returning to the solid line starting point of the first section of the real line segment where the foreground track is located, and repeating the steps circularly.
During each step of playback, the scale of the electronic map may be changed, so that the track to be played back on the electronic map may change direction after passing through a certain passing point, and therefore, when the foreground track moves forward by 1 pixel, the next position of the track starting point of the foreground track needs to be calculated in real time, and the track starting point of the foreground track needs to be continuously and dynamically updated.
The track playback speed is kept to be 1 pixel at each time, so that the dynamic updating calculation process of the track starting point of the foreground track has no direct relation with the numerical value of the scale level of the electronic map, the scheme is suitable for any scale, the playback speed is not influenced even if the scale is changed, and the constant-speed playback of the track can be ensured.
In an alternative embodiment provided by the present application, step 103 may be specifically implemented according to the following steps:
1031. acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of the solid line segment where the track starting point of the foreground track is located;
in this step, the current position of the track starting point of the foreground track is obtained and set as L _ S', and the current moving step number B of the foreground track is also obtainedx. Meanwhile, the first solid line segment L where the track starting point of the foreground track is located is usedxThe solid line starting point and the solid line end point of (c) are set to LxS and Lx_E
Of course, if the total length of the pixels occupied by the track to be played back is smaller than the length of the pixels occupied by the first solid line segment where the track start point of the foreground track is located, the start point and the end point of the whole track to be played back correspond to LxS and Lx_E。
During each step of playback, since the scale of the electronic map may be changed and the track to be played back may change direction after passing through a certain passing point, the next position L _ S "of the track start point of the foreground track needs to be calculated in real time.
1032. Judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
in this step, each time the next position L _ S ″ of the track start point of the foreground track is calculated, the current moving step number B of the track start point of the foreground track needs to be compared firstxWhether it is less than the total moving step number B. If the current position is smaller than the preset position, the track starting point of the foreground track can move forwards; if the distance between the starting point of the foreground track and the moving end point of the foreground track is equal to the distance between the starting point of the foreground track and the moving end point of the foreground track, the next position needs to return to the first solid line segment LxSolid line start point L ofxAnd S, the forward movement is restarted.
1033. If the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the track starting point of the moved foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
In this step, if the current moving step number of the track starting point of the foreground track is less than the total moving step number, it indicates that the track starting point of the foreground track does not reach the first solid line segment LxSolid line end point L ofx_E。
The track starting point of the foreground track does not reach the first solid line segment LxSolid line end point L ofxIn the case of _E, the problem of how to dynamically calculate the next position L _ S' of the track starting point of the foreground track when the scale of the electronic map is reduced is fully considered.
If the foreground track advances one step along the track starting point, and the actual advancing pixel length exceeds the range of the remaining pixel length of the current track segment, the track segment and the slope of the next position of the track starting point of the foreground track need to be calculated, the track segment advances for a sufficient distance along the slope direction of the new track segment, and finally the coordinate of the next position of the track starting point of the foreground track is obtained through calculation, so that the track starting point of the foreground track is ensured to advance for 1 pixel at a constant speed.
The embodiment combines the fixed offset of the screen coordinate as the step length, so that the playback track can show the effect of uniform playback under each scale. In the implementation scheme of the prior art, the time average segment is used as the step length, or the track average segment is used as the step length according to the fixed map coordinate distance, and under the conditions that the distance length difference of adjacent track segments is large, the time span change is large, the map scale changes and the like, the track display can skip a small segment of track, and the speed is suddenly increased or suddenly reduced. The implementation schemes in the prior art cannot achieve uniform playback of the track.
Of course, step 103 further includes the steps of:
1034. and if the moving step number is equal to the total moving step number, determining the position of the starting point of the solid line as the position next to the starting point of the track of the foreground track, and carrying out zero clearing processing on the current moving step number.
In this step, if the current moving step number of the track starting point of the foreground track is equal to the total moving step number, it indicates that the track starting point of the foreground track has reached the first solid line segment LxSolid line end point L ofxE, so that the first solid line segment L is now drawnxSolid line starting point LxThe S position is determined as the next position of the track starting point of the foreground track, and the current moving step number of the track starting point of the foreground track is cleared simultaneouslyAnd (6) zero processing.
In step 104, according to the updating sequence of the track starting point of the foreground track, the updated foreground track is sequentially and circularly superposed and displayed on the background track at a preset playback time interval, and at this time, the track to be played back has the effect of flowing along the direction of the foreground track, so that the complete track direction can be visually embodied.
Specifically, according to the updating sequence, during each step of playback, after the foreground track displaying the preset playback time interval is cleared, the updated foreground track is redrawn from the track starting point of the dynamically updated foreground track to the track end point of the foreground track, and the updated foreground track is displayed in an overlapping manner on the background track.
In addition, the playback speed of the track, i.e. the speed of the foreground track flowing, can be controlled by the playback time interval of the foreground track flowing every two times.
Of course, those skilled in the art can meet different types of display requirements by modifying parameters such as playback speed, color, width, etc. of the background track or the foreground track.
It should be noted that the above-mentioned embodiments of the method are described as a series of acts or combinations for simplicity of description, but those skilled in the art should understand that the present invention is not limited by the described order of acts. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
In summary, the track flow display method based on the electronic map provided in the embodiments of the present invention performs track playback by using a double-layer overlapping display manner of the background track and the foreground track, so that the background track remains still during playback, and the foreground track displayed above the background track continuously moves forward circularly within a certain range at a speed of 1 pixel at a time, and the relative position of the background track and the foreground track on the upper layer continuously changes, thereby showing the flow effect of the whole track, not only completely embodying the direction of each track in the whole track, but also realizing dynamic smooth playback at a constant speed of the track under the condition that the scale of the map continuously changes.
Based on the same inventive concept, fig. 3 exemplarily shows a trajectory flow display device based on an electronic map according to an embodiment of the present invention, and since the principle of the device for solving the technical problem is similar to that of a trajectory flow display method based on an electronic map, specific embodiments of the device may refer to specific embodiments of a calibration method, and repeated details are omitted.
Referring to fig. 4, the apparatus mainly includes the following units:
an obtaining unit 401, configured to obtain a track to be played back;
a generating unit 402, configured to generate, according to a track to be played back, a background track displayed in a solid line manner and a foreground track displayed in a dotted line manner and displayed superimposed on the background track;
an updating unit 403, configured to take the pixel length occupied by the first solid line segment where the track start point of the foreground track is located as a total moving step number, and dynamically update the track start point of the foreground track in a loop at a speed of moving 1 pixel to the track end point of the foreground track each time, so as to obtain an updated foreground track;
and the display unit 404 is configured to sequentially display the updated foreground track on the background track in a cyclic overlapping manner at preset playback time intervals according to the update sequence, so as to implement a flowing display of the foreground track on the background track.
It should be noted here that the acquiring unit 401, the generating unit 402, the updating unit 403, and the displaying unit 404 correspond to steps 101 to 104 in the above method embodiment, and the four units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above method embodiment.
Preferably, the generating unit 402 is specifically configured to:
generating a background track displayed in a real-line manner by adopting a preset background track color and a preset background track width according to the track to be replayed;
and generating a foreground track displayed in a virtual line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
Preferably, the updating unit 403 is specifically configured to:
the update unit is specifically configured to:
acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of the solid line segment where the track starting point of the foreground track is located;
judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
if the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the track starting point of the moved foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
Preferably, the updating unit 403 is further specifically configured to:
and if the moving step number is equal to the total moving step number, determining the position of the starting point of the solid line as the next position of the starting point of the track of the foreground track, and carrying out zero clearing processing on the current moving step number.
Preferably, the display unit 404 is specifically configured to:
and according to the updating sequence, after the foreground track displaying the preset playback time interval is cleared, the updated foreground track is redrawn from the track starting point of the dynamically updated foreground track to the track end point of the foreground track, and the updated foreground track is superposed and displayed on the background track.
It should be noted that the electronic map-based trajectory flow display device provided in the embodiment of the present invention and the electronic map-based trajectory flow display method described in the foregoing embodiment belong to the same technical concept, and the specific implementation process thereof may refer to the description of the method steps in the foregoing embodiment, which is not described herein again.
It should be understood that the above electronic map-based trajectory flow display device includes only units that are logically divided according to the functions implemented by the device, and in practical applications, the above units may be stacked or split. The functions implemented by the electronic map-based trajectory flow display device according to this embodiment correspond to the electronic map-based trajectory flow display method according to the foregoing embodiment one-to-one, and for the more detailed processing flow implemented by the device, the detailed description is already given in the foregoing method embodiment, and the detailed description is not repeated here.
In summary, the track flow display device based on the electronic map provided in the embodiment of the present invention performs track playback by using a double-layer overlapping display manner of the background track and the foreground track, so that the background track is kept still during playback, and the foreground track displayed above the background track continuously moves forward circularly within a certain range at a speed of 1 pixel at each time, and the relative position of the background track and the upper layer foreground track continuously changes, thereby showing the flow effect of the whole track, not only completely embodying the direction of each track section in the whole track, but also realizing dynamic uniform smooth playback of the track under the condition that the scale of the map continuously changes.
Based on the same inventive concept, referring to fig. 5, an embodiment of the present invention provides an electronic device, which mainly includes a processor 501 and a memory 502, where the memory 502 stores execution instructions. The processor 501 reads the execution instruction in the memory 502 for executing the steps described in any embodiment of the track flow display method based on the electronic map. Alternatively, the processor 501 reads the execution instructions in the storage 502 to implement the functions of the units in any embodiment of the above-mentioned electronic map-based trajectory flow display device.
The Processor 501 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The memory 502 may be an internal storage unit, such as a hard disk or a memory. The memory 402 may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like. Further, the memory 502 may also include both internal storage units and external storage devices. The memory 502 may be used to temporarily store data that has been output or is to be output.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the components described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In summary, the electronic device provided in the embodiment of the present invention performs track playback by using a double-layer stack-up display manner of the background track and the foreground track, so that the background track is kept still during playback, the foreground track displayed above the background track continuously moves forward in a cycle within a certain range at a speed of 1 pixel at a time, the relative position of the background track and the foreground track on the upper layer continuously changes, the flowing effect of the whole track is displayed, not only can the direction of each track in the whole track be completely reflected, but also dynamic smooth playback at a constant speed of the track can be realized under the condition that the scale of the map continuously changes.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, which contains computer-executable instructions, where the computer-executable instructions are used to execute the steps described in the above-mentioned electronic map-based trajectory flow display method embodiment. Alternatively, the computer-executable instructions are used to perform the functions of the units in the above-mentioned embodiment of the trajectory flow display device based on the electronic map.
Computer storage media for embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
In addition, computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and in actual implementation, there may be other divisions, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode, and can also be realized in a software functional unit mode.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (10)

1. A track flow display method based on an electronic map is characterized by comprising the following steps:
acquiring a track to be played back;
generating a background track displayed in a solid line mode and a foreground track displayed in a dotted line mode and superposed on the background track according to the track to be played back;
taking the pixel length occupied by the first solid line segment where the track starting point of the foreground track is as the total moving step number, and circularly and dynamically updating the track starting point of the foreground track according to the speed of moving 1 pixel to the track end point of the foreground track every time to obtain the updated foreground track;
and according to the updating sequence, circularly and repeatedly displaying the updated foreground track on the background track in sequence at a preset playback time interval so as to realize the flowing display of the foreground track on the background track.
2. The method according to claim 1, wherein the generating a background track displayed in a solid line manner and a foreground track displayed in a dotted line manner and superimposed on the background track according to the track to be played back comprises:
generating a background track displayed in a solid line manner by adopting a preset background track color and a preset background track width according to the track to be played back;
and generating a foreground track displayed in a dotted line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
3. The method of claim 1, wherein the loop dynamically updates a track start of the foreground track, comprising:
acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of the solid line segment where the track starting point of the foreground track is located;
judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
if the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the moved track starting point of the foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
4. The method of claim 3, further comprising:
and if the total moving step number is equal to the total moving step number, determining the position of the starting point of the solid line as the next position of the starting point of the track of the foreground track, and carrying out zero clearing treatment on the current moving step number.
5. The method according to claim 1, wherein the displaying the updated foreground track in a cyclic overlapping manner on the background track sequentially at preset playback time intervals according to the updating sequence comprises:
and according to the updating sequence, after the foreground track displaying the preset playback time interval is removed, the updated foreground track is redrawn from the track starting point of the dynamically updated foreground track to the track end point of the foreground track, and the updated foreground track is superposed and displayed on the background track.
6. An electronic map-based trajectory flow display device, comprising:
an acquisition unit configured to acquire a track to be played back;
the generating unit is used for generating a background track displayed in a solid line mode and a foreground track displayed in a dotted line mode and superposed on the background track according to the track to be played back;
the updating unit is used for taking the pixel length occupied by the first solid line segment where the track starting point of the foreground track is as the total moving step number, and circularly and dynamically updating the track starting point of the foreground track according to the speed of moving 1 pixel to the track end point of the foreground track every time to obtain the updated foreground track;
and the display unit is used for circularly and overlappingly displaying the updated foreground track on the background track in sequence at a preset playback time interval according to the updating sequence so as to realize the flowing display of the foreground track on the background track.
7. The apparatus according to claim 6, wherein the generating unit is specifically configured to:
generating a background track displayed in a solid line mode by adopting a preset background track color and a preset background track width according to the track to be played back;
and generating a foreground track displayed in a dotted line mode according to the track to be played back by adopting a preset foreground track color and a preset foreground track width, and overlapping and displaying the foreground track on the background track.
8. The apparatus according to claim 6, wherein the updating unit is specifically configured to:
acquiring the current position and the current moving step number of the track starting point of the foreground track, and the solid line starting point and the solid line terminal point of the first section of solid line segment where the track starting point of the foreground track is located;
judging whether the current moving step number of the track starting point of the foreground track is smaller than the total moving step number or not;
if the total moving step number is less than the total moving step number, calculating the slope of a connecting line between the solid line starting point and the solid line terminal point; and after the current position of the track starting point of the foreground track is converted into screen coordinates from map coordinates, the track starting point of the foreground track is moved by 1 pixel along the slope direction, the moved track starting point of the foreground track is converted into the map coordinates from the screen coordinates to be used as the next position of the track starting point of the foreground track, and the current moving step number is added by one.
9. An electronic device, comprising a processor and a memory, wherein the memory stores execution instructions, and the execution instructions in the memory are read by the processor for executing the steps in the electronic map based track flow display method according to any one of claims 1 to 5.
10. A computer-readable storage medium containing computer-executable instructions for performing the steps of the electronic map-based trajectory flow display method according to any one of claims 1 to 5.
CN202210104518.4A 2022-01-27 2022-01-27 Track flow display method and device based on electronic map Active CN114440920B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210104518.4A CN114440920B (en) 2022-01-27 2022-01-27 Track flow display method and device based on electronic map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210104518.4A CN114440920B (en) 2022-01-27 2022-01-27 Track flow display method and device based on electronic map

Publications (2)

Publication Number Publication Date
CN114440920A true CN114440920A (en) 2022-05-06
CN114440920B CN114440920B (en) 2024-07-23

Family

ID=81369844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210104518.4A Active CN114440920B (en) 2022-01-27 2022-01-27 Track flow display method and device based on electronic map

Country Status (1)

Country Link
CN (1) CN114440920B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094531A1 (en) * 2008-10-15 2010-04-15 Navteq North America, Llc Personalized traffic reports
WO2010119182A1 (en) * 2009-04-14 2010-10-21 Bouchaib Hoummady Method and device for dynamically managing guiding and mobility in traffic
US20120287267A1 (en) * 2010-02-08 2012-11-15 Sony Corporation Image processing apparatus, image processing method and program
CN105264337A (en) * 2010-12-10 2016-01-20 大众汽车有限公司 Method for displaying a travel route
CN105488698A (en) * 2015-12-16 2016-04-13 电信科学技术第十研究所 Analysis method and equipment of space region client density
CN108074280A (en) * 2017-12-18 2018-05-25 国网江苏省电力有限公司检修分公司 The method that ultra-high-tension power transmission line Equipotential live working simulates hanging basket motion track
CN108415936A (en) * 2018-01-24 2018-08-17 武汉智博创享科技股份有限公司 A kind of trajectory playback method and device of electronic map
CN108765527A (en) * 2018-06-06 2018-11-06 北京知道创宇信息技术有限公司 Cartoon display method, device, electronic equipment and storage medium
CN109032478A (en) * 2018-06-05 2018-12-18 北京长城华冠汽车科技股份有限公司 Gesture identification method for touch screen
CN109829523A (en) * 2018-12-27 2019-05-31 广州师盛展览有限公司 A kind of Tradeshows method for pushing based on the induction of high frequency Rfid technological trajectory
CN109949393A (en) * 2019-01-09 2019-06-28 广州小鹏汽车科技有限公司 A kind of animation effect processing method, system and device
CN110021185A (en) * 2019-04-04 2019-07-16 邵沈齐 A kind of wisdom traffic management system
CN110163831A (en) * 2019-04-19 2019-08-23 深圳市思为软件技术有限公司 The object Dynamic Display method, apparatus and terminal device of three-dimensional sand table
CN110223023A (en) * 2019-06-13 2019-09-10 圆通速递有限公司 A kind of express delivery tracking system
CN110443287A (en) * 2019-07-19 2019-11-12 北京航空航天大学 A kind of mobile stream method for drafting of the crowd based on sparse track data
CN111148045A (en) * 2019-12-30 2020-05-12 中国联合网络通信集团有限公司 User behavior cycle extraction method and device
CN111479224A (en) * 2020-03-09 2020-07-31 深圳市广道高新技术股份有限公司 High-precision track recovery method and system and electronic equipment
CN112434084A (en) * 2020-12-02 2021-03-02 电信科学技术第十研究所有限公司 Trajectory similarity matching method and device based on geohash and LCSS
CN113127711A (en) * 2021-03-31 2021-07-16 哈尔滨理工大学 Crowd moving algorithm based on sparse trajectory data
CN113810587A (en) * 2020-05-29 2021-12-17 华为技术有限公司 Image processing method and device
CN113868279A (en) * 2021-09-30 2021-12-31 京东城市(北京)数字科技有限公司 Track data processing method, device and system

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094531A1 (en) * 2008-10-15 2010-04-15 Navteq North America, Llc Personalized traffic reports
WO2010119182A1 (en) * 2009-04-14 2010-10-21 Bouchaib Hoummady Method and device for dynamically managing guiding and mobility in traffic
US20120287267A1 (en) * 2010-02-08 2012-11-15 Sony Corporation Image processing apparatus, image processing method and program
CN105264337A (en) * 2010-12-10 2016-01-20 大众汽车有限公司 Method for displaying a travel route
CN105488698A (en) * 2015-12-16 2016-04-13 电信科学技术第十研究所 Analysis method and equipment of space region client density
CN108074280A (en) * 2017-12-18 2018-05-25 国网江苏省电力有限公司检修分公司 The method that ultra-high-tension power transmission line Equipotential live working simulates hanging basket motion track
CN108415936A (en) * 2018-01-24 2018-08-17 武汉智博创享科技股份有限公司 A kind of trajectory playback method and device of electronic map
CN109032478A (en) * 2018-06-05 2018-12-18 北京长城华冠汽车科技股份有限公司 Gesture identification method for touch screen
CN108765527A (en) * 2018-06-06 2018-11-06 北京知道创宇信息技术有限公司 Cartoon display method, device, electronic equipment and storage medium
CN109829523A (en) * 2018-12-27 2019-05-31 广州师盛展览有限公司 A kind of Tradeshows method for pushing based on the induction of high frequency Rfid technological trajectory
CN109949393A (en) * 2019-01-09 2019-06-28 广州小鹏汽车科技有限公司 A kind of animation effect processing method, system and device
CN110021185A (en) * 2019-04-04 2019-07-16 邵沈齐 A kind of wisdom traffic management system
CN110163831A (en) * 2019-04-19 2019-08-23 深圳市思为软件技术有限公司 The object Dynamic Display method, apparatus and terminal device of three-dimensional sand table
CN110223023A (en) * 2019-06-13 2019-09-10 圆通速递有限公司 A kind of express delivery tracking system
CN110443287A (en) * 2019-07-19 2019-11-12 北京航空航天大学 A kind of mobile stream method for drafting of the crowd based on sparse track data
CN111148045A (en) * 2019-12-30 2020-05-12 中国联合网络通信集团有限公司 User behavior cycle extraction method and device
CN111479224A (en) * 2020-03-09 2020-07-31 深圳市广道高新技术股份有限公司 High-precision track recovery method and system and electronic equipment
CN113810587A (en) * 2020-05-29 2021-12-17 华为技术有限公司 Image processing method and device
CN112434084A (en) * 2020-12-02 2021-03-02 电信科学技术第十研究所有限公司 Trajectory similarity matching method and device based on geohash and LCSS
CN113127711A (en) * 2021-03-31 2021-07-16 哈尔滨理工大学 Crowd moving algorithm based on sparse trajectory data
CN113868279A (en) * 2021-09-30 2021-12-31 京东城市(北京)数字科技有限公司 Track data processing method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王小平等: "移动通信基站巡查中路线回放功能的设计与实现", 《无线互联科技》, no. 6, 15 June 2014 (2014-06-15), pages 48 - 51 *

Also Published As

Publication number Publication date
CN114440920B (en) 2024-07-23

Similar Documents

Publication Publication Date Title
CN109901894B (en) Progress bar image generation method and device and storage medium
CN111957040B (en) Detection method and device for shielding position, processor and electronic device
CN111340704B (en) Map generation method and device, storage medium and electronic device
CN112102437A (en) Canvas-based radar map generation method and device, storage medium and terminal
CN112965780B (en) Image display method, device, equipment and medium
CN103942823A (en) Game engine rendering method and device
CN114041111A (en) Handwriting drawing method, apparatus, electronic device, medium, and program product
CN111803952A (en) Topographic map editing method and device, electronic equipment and computer readable medium
CN109724617B (en) Navigation route drawing method and related equipment
CN110134905B (en) Page update display method, device, equipment and storage medium
CN105868246A (en) Picture display method and apparatus
CN104008122A (en) Dynamic multi-stage pie chart display method of layering data
CN114440920A (en) Track flow display method and device based on electronic map
CN112258622A (en) Image processing method, image processing device, readable medium and electronic equipment
CN116258790A (en) Curve object drawing method, device, equipment and medium
US20240267484A1 (en) Video processing method and apparatus, and device, medium and program product
CN115471592A (en) Dynamic image processing method and system
CN106056651A (en) Picture layout management method and device and electronic equipment
CN116233743A (en) Electronic fence boundary generation method and device, storage medium and terminal
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN113108795A (en) Arbitrary-order AGV curve route generation method, device and system
CN113506356A (en) Drawing method and device of area map, readable medium and electronic equipment
CN111200705B (en) Image processing method and device
CN108765527B (en) Animation display method, animation display device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant