CN107832369B - Method and device for generating dynamic particle flow of road conditions - Google Patents

Method and device for generating dynamic particle flow of road conditions Download PDF

Info

Publication number
CN107832369B
CN107832369B CN201711023493.0A CN201711023493A CN107832369B CN 107832369 B CN107832369 B CN 107832369B CN 201711023493 A CN201711023493 A CN 201711023493A CN 107832369 B CN107832369 B CN 107832369B
Authority
CN
China
Prior art keywords
road
road condition
road data
data segment
condition attribute
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.)
Active
Application number
CN201711023493.0A
Other languages
Chinese (zh)
Other versions
CN107832369A (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.)
Beijing Cennavi Technologies Co Ltd
Original Assignee
Beijing Cennavi Technologies 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 Beijing Cennavi Technologies Co Ltd filed Critical Beijing Cennavi Technologies Co Ltd
Priority to CN201711023493.0A priority Critical patent/CN107832369B/en
Publication of CN107832369A publication Critical patent/CN107832369A/en
Application granted granted Critical
Publication of CN107832369B publication Critical patent/CN107832369B/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
    • 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/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B29/00Maps; Plans; Charts; Diagrams, e.g. route diagram
    • G09B29/003Maps
    • G09B29/006Representation of non-cartographic information on maps, e.g. population distribution, wind direction, radiation levels, air and sea routes

Abstract

The invention discloses a method and a device for generating dynamic particle flow of road conditions, relates to the technical field of map road condition information processing, and aims to improve the updating speed of the road conditions and realize dynamic display of the road conditions. The road condition dynamic particle flow generation method comprises the steps of dividing road information into m road data segments, wherein each road data segment contains road condition attributes and sequence number information, and node positions corresponding to the road data segments are formed, storing relevant data of the road data segments, realizing road particle display by utilizing the relevant data of the road data segments, and realizing animation display of road particles by utilizing the relevant data of the road data segments. The road condition dynamic particle flow generation device is applied to the road condition dynamic particle flow generation method. The method and the device for generating the dynamic particle flow of the road condition are used for generating the road condition.

Description

Method and device for generating dynamic particle flow of road conditions
Technical Field
The invention relates to the technical field of map road condition information processing, in particular to a method and a device for generating dynamic particle flow of road conditions.
Background
The electronic map is a common travel navigation tool in daily life of people, people can conveniently acquire a required navigation scheme by using the electronic map, and great convenience is brought to travel of users.
When the road condition of a road is displayed on the existing electronic map, different colors are generally used for representing different road conditions of the road, but the dynamic effect of the road condition cannot be displayed.
Such as: when the 360-degree map shows the road conditions, the road condition data are rendered through the road condition server, and then the rendered road condition data are sent to the front end to generate a rasterized road condition map, so that the road conditions can not be shown in an animation manner, and therefore, the road condition states shown on the 360-degree map can not be recognized by some patients with achromatopsia.
Disclosure of Invention
The invention aims to provide a method and a device for generating dynamic particle flow of road conditions, which are used for improving the updating speed of the road conditions and realizing dynamic display of the road conditions.
In order to achieve the above purpose, the invention provides the following technical scheme:
a road condition dynamic particle flow generation method comprises the following steps:
step S100: dividing road information into m road data segments, wherein each road data segment contains road condition attributes and sequence number information, and forms a node position corresponding to the road data segment; m is an integer greater than 1;
step S300: storing the road condition attributes of the m road data segments, the modulus results of the serial numbers of the m road data segments and the node position of each road data segment in the road information;
step S400: setting a current refreshing control value epsilon for limiting the rendering sequence of the road data fragments for each road condition attribute, wherein epsilon is an integer, and the value range of the modulus result of the serial numbers of m road data fragments is the same as the value range of the current refreshing control value epsilon of each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
when the current refresh control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute, rendering the node position of the road data fragment in the corresponding road condition attribute, and rendering the color of the road data fragment according to the road condition attribute;
step S500: returning to the step S400, refreshing the current refreshing control value epsilon of each road condition attribute.
Compared with the prior art, in the road condition dynamic particle flow generation method provided by the invention, the modulus result of the serial numbers of the m road data segments divided by the road information, the node position and the node position of each road data segment in the road information are stored, so that when the road data segments need to be rendered, the node positions of the road data segments needing to be rendered can be utilized to realize the position rendering and further color rendering of the road data segments needing to be rendered; because the node position of the road data segment in the corresponding road condition attribute is rendered, before the color of the road data segment is rendered according to the road condition attribute, the current refreshing control value epsilon of each road condition attribute is also set, and the value range of the modulus taking result of the serial numbers of the m road data segments is the same as the value range of the current refreshing control value epsilon of each road condition attribute, so that the current refreshing control value epsilon of the road condition attribute and the modulus taking result of the serial numbers of the road data segments in the corresponding road condition attribute can have the same possibility, and when the current refreshing control value epsilon of the road condition attribute is the same as the modulus taking result of the serial numbers of the road data segments in the corresponding road condition attribute, the node position of the road data segment in the corresponding; therefore, in the method for generating the dynamic particle flow of the road condition, the set current refresh control value epsilon of each road condition attribute can be compared with the modulus result of the serial number of the road data fragment corresponding to the road condition attribute, so that the rendering sequence of the road data fragment of each road condition attribute is limited, and the different road condition attributes in the finally rendered road condition can be dynamically displayed; moreover, the higher the priority of the road condition attribute is, the smaller the current refresh control value epsilon of the road condition attribute is; that is, in the same refresh times, the higher the priority of the road condition attribute is, the smaller the modulo result of the sequence number of the selected road data segment corresponding to the road condition attribute to be rendered is, it can be known that, as a result of modulo the serial numbers corresponding to the m road data segments into which the road information is divided, the data is periodically incremented from 0, therefore, in the method for generating the road condition dynamic particle flow provided by the invention, the higher the priority of the road condition attribute is, the higher the frequency of rendering the position and the color of the corresponding road data segment is, the higher the priority of the road data segment is, the higher the moving speed of the particle flow formed by the road data segment with the higher priority is, and at the moment, even if the color blindness patient cannot identify the color of different road condition attributes, the road condition attributes can be identified through the moving speed of the particle flow formed by the road data segments with the different road condition attributes.
The invention also provides a road condition dynamic particle flow generating device, which comprises a road condition server display card, wherein the road condition server and the display card are communicated with each other;
the road condition server is used for dividing road information into m road data segments, each road data segment contains road condition attributes and sequence number information, and node positions corresponding to the road data segments are formed; m is an integer greater than 1;
the display memory of the display card is used for storing the road condition attributes of the m road data segments, the modulus results of the serial numbers of the m road data segments and the node position of each road data segment in the road information;
the graphics processor of the display card is used for setting a current refreshing control value epsilon of each road condition attribute for limiting the rendering sequence of the road data fragments, and controlling the current refreshing control value epsilon of each road condition attribute for limiting the rendering sequence of the road data fragments to be refreshed, wherein epsilon is an integer, and the value range of the modulus result of the serial numbers of the m road data fragments is the same as the value range of the current refreshing control value epsilon-of each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
and when the current refreshing control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute, rendering the node position of the road data fragment in the corresponding road condition attribute, and rendering the color of the road data fragment according to the road condition attribute.
Compared with the prior art, the beneficial effects of the road condition dynamic particle flow generation device provided by the invention are the same as those of the road condition dynamic particle flow generation method provided by the technical scheme, and are not repeated herein.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method for generating a dynamic particle flow of road conditions according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a process of dividing road information into m road data segments according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a process of storing data related to road data segments according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an example of grouping m road data segments according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a road particle display implemented by using data associated with road data segments according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating that each road condition attribute is set to limit the current refresh control value epsilon of the rendering sequence of the road data segments according to the embodiment of the present invention;
FIG. 7 is a schematic diagram of a dynamic particle flow of road conditions formed in an embodiment of the present invention;
fig. 8 is a block diagram of a structure of a dynamic particle flow generating device for road conditions according to an embodiment of the present invention;
fig. 9 is a block diagram of a connection structure between a graphics processor and a video memory according to an embodiment of the present invention.
Detailed Description
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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method and the device for generating the road condition dynamic particle flow provided by the embodiment of the invention can be applied to the generation of the road condition in the electronic map, so that the road condition of the electronic map can present an animation effect, and the problem that the road condition information in the conventional electronic map cannot be identified due to the vision problem of a achromate is solved.
Referring to fig. 1, fig. 3 and fig. 5, a method for generating a dynamic particle flow of road conditions according to an embodiment of the present invention includes the following steps:
step S100: dividing the road information into m road data segments, wherein each road data segment contains road condition attributes and sequence number information and forms a node position corresponding to the road data segment; m is an integer greater than 1; the node position is the geographic coordinate of the node, such as longitude and latitude information;
illustratively, the process of dividing the road information into m road data segments can be realized through a processor or a road condition server, and the Format of the m road data segments after being divided is a Proto Buffer Format, which is called PBF data for short;
step S300: storing road data segment related data, wherein the road data segment related data can be road condition attributes of m road data segments, a modulus result of serial numbers of the m road data segments and a node position of each road data segment in road information;
for example, when storing the road data segment related data, the road data segment related data may be stored in the video memory, so that the graphics processor of the video card can quickly call the road data segment related data from the video memory when needed;
step S400: the road particle display is realized by using the road data segment related data, and is generally realized by a display graphic processor. The Graphics processor supports that WebGL (Web Graphics Library) or OpenGL (open Graphics Library) and the like are used as a computer Graphics application programming interface, and road particle display is achieved by means of road data segment related data. Specifically, the implementation of road particle display by using road data segment-related data includes:
step S410: setting a current refresh control value epsilon for limiting the rendering sequence of the road data fragments for each road condition attribute, wherein epsilon is an integer, and the value range of the modulus result of the serial numbers of the m road data fragments is the same as the value range of the current refresh control value epsilon of each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
for example, the priority of the road condition attribute is well known to those skilled in the art, that is, the priority of the road condition attribute is higher the better the road condition is, for example, according to the priority, the sequence of different road conditions may be: smooth road conditions > slow driving road conditions > congested road conditions;
as for the definitions of the smooth road condition, the slow driving road condition and the congested road condition, the free flow speed can be defined by adopting the free flow speed, which is a traffic engineering term and refers to the traffic flow running speed which is not influenced by the upstream and downstream conditions.
And the road types adopted are: the free flow speed of 0-40km/h on a high-speed road is the congested road condition, 40-60 km/h is the slow driving road condition, and more than 60km/h is the smooth road condition; the free flow speed of 0-20km/h on a high-speed road of a city is the congested road condition, 20-40 km/h is the slow driving road condition, and more than 40km/h is the smooth road condition; the free flow speed of 0-15km on the road of the main road is the congested road condition, 15km/h-25km/h is the slow driving road condition, and the free flow speed of more than 25km/h is the smooth road condition; the free flow speed of 0-10km/h on other roads is the congested road condition, the free flow speed of 10-20 km/h is the slow driving road condition, and the free flow speed of more than 20km/h is the smooth road condition.
Step S440A: rendering the node position of the road data segment in the corresponding road condition attribute when the current refreshing control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data segment in the corresponding road condition attribute;
step S460a 1: rendering the color of the road data fragment according to the road condition attribute;
step S500: returning to step S410, the current refresh control value epsilon of each road condition attribute is refreshed, so as to form the dynamic particle stream of road conditions as shown in fig. 7.
In the method for generating road condition dynamic particle streams based on the above embodiment, the modulo result of the serial numbers of the m road data segments into which the road information is divided, the node positions, and the node position of each road data segment in the road information are stored, so that when the road data segments need to be rendered, the node positions of the road data segments can be used to implement position rendering and further color rendering of the road data segments needing to be rendered; because the node position of the road data segment in the corresponding road condition attribute is rendered, before the color of the road data segment is rendered according to the road condition attribute, the current refreshing control value epsilon of each road condition attribute is also set, and the value range of the modulus taking result of the serial numbers of the m road data segments is the same as the value range of the current refreshing control value epsilon of each road condition attribute, so that the current refreshing control value epsilon of the road condition attribute and the modulus taking result of the serial numbers of the road data segments in the corresponding road condition attribute can have the same possibility, and when the current refreshing control value epsilon of the road condition attribute is the same as the modulus taking result of the serial numbers of the road data segments in the corresponding road condition attribute, the node position of the road data segment in the corresponding; therefore, in the method for generating dynamic particle streams of road conditions provided by the embodiment of the present invention, the set current refresh control value epsilon of each road condition attribute can be compared with the modulus result of the serial number of the road data segment corresponding to the road condition attribute, so as to limit the rendering sequence of the road data segment of each road condition attribute, and thus, different road condition attributes in the finally rendered road conditions can be dynamically displayed; moreover, the higher the priority of the road condition attribute is, the smaller the current refresh control value epsilon of the road condition attribute is; that is, in the same refresh times, the higher the priority of the road condition attribute is, the smaller the modulo result of the sequence number of the selected road data segment corresponding to the road condition attribute to be rendered is, it can be known that, as a result of modulo the serial numbers corresponding to the m road data segments into which the road information is divided, the data is periodically incremented from 0, therefore, in the method for generating dynamic particle flow of road conditions provided by the embodiment of the invention, the higher the priority of the road condition attributes, the higher the frequency of rendering the position and the color of the corresponding road data segment is, the higher the priority of the road data segment is, the higher the moving speed of the particle flow formed by the road data segment with the higher priority is, and at the moment, even if the color blindness patient cannot identify the color of different road condition attributes, the road condition attributes can be identified through the moving speed of the particle flow formed by the road data segments with the different road condition attributes.
Illustratively, as shown in fig. 2, the dividing of the road information into m road data pieces in the above embodiment includes:
step S101: setting m +1 nodes in the road information along the traffic flow reverse direction, so that a road data segment is formed between two adjacent nodes, wherein the m +1 nodes form m road data segments, and each road data segment contains the node position for forming the road data segment; illustratively, the length of the road corresponding to each road data segment is 5 m;
step S102: carrying out identification assignment on the m road data segments to ensure that each road data segment contains road condition attribute and sequence number information; the sequence number information of the m pieces of road data is incremented from 0 in the reverse direction of the traffic flow.
It should be noted that, in the above embodiment, when the identifier assignment is performed on different road data segments, the assigned values of different road condition attributes are different. If the road is unblocked, the assigned value is 1; under the condition of slowly driving road, the assigned value is 2; under congested road conditions, the assigned value is 3.
Further, between step S100 and step S300, the method for generating a dynamic particle flow of road conditions according to the above embodiment further includes:
step S200: grouping the m road data segments to obtain m road data segment groups;
the r road data fragment group comprises r road data fragments, … … and r + t road data fragments, r is more than or equal to 1 and less than or equal to m-t +1, t is a grouping parameter, and t is more than or equal to 1 and less than or equal to m;
the r road data segment group comprises an r road data segment, … … and an m road data segment, wherein r is more than m-t +1 and less than or equal to m;
based on the grouping, as shown in fig. 3, the above embodiment further includes obtaining a total number C of nodes in each road data segment group, and corresponding to each node number i in the road data segment group along a traffic flow reverse direction, and obtaining a transparency T, T ═ C/C of each node in each road data segment group according to the total number C of nodes in each road data segment group and corresponding to each node number i in the road data segment group;
the transparency T of the nodes forming each road data segment group is stored.
As shown in fig. 5, after rendering the node position information of the road data segment, the step S410 further includes a step S460a2 in parallel with the step S460a 1:
when the current refresh control value epsilon of the road condition state is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition state, rendering the transparency of the road data fragment in the corresponding road condition state according to the transparencies of two nodes forming the road data fragment in the corresponding road condition state, and setting the fuzziness of the road data fragment in the corresponding road condition state in a mode of increasing the fuzziness according to the advancing direction of traffic flow so as to enable the particles simulated by the simulated road fragment data to be more vivid.
It can be known that, as shown in fig. 3, before storing the modulo result of the sequence numbers of the m road data segments in the above embodiment, the step S300 further includes: reading node position information of each road data segment for storage; and reading the road condition attribute of each road data segment for storage.
In addition, the sequence number information of each road data segment needs to be read, a sequence number value contained in the sequence number information of each road data segment is subjected to modulo operation on k, so as to obtain a modulo result of the sequence number of each road segment, where k is an integer greater than 1, and can be set according to the current refresh control value epsilon range of the road condition state, and if the current refresh control values epsilon of different road condition states are all between 0 and 9, k is 10, so that the sequence numbers of each road data segment in the road information periodically appear according to a distribution mode of 0 to 9, so as to ensure that the current refresh control values epsilon of different road condition states are compared with the modulo results of the sequence numbers of the road data segments in the corresponding road condition attributes, and the refresh speed of different road condition attributes is adjusted.
Optionally, as shown in fig. 6, the setting of the current refresh control value epsilon of each road condition state in the above embodiment includes the following steps:
step S411: setting initial static values X of different road condition attributes according to the road condition attributes0And the limit updated value X corresponding to the road condition attributemax(ii) a In the same refreshing times, the higher the priority of the road condition attribute is, the initial static value X of the road condition attribute is0The smaller the limit refresh value X of road condition attributemaxThe smaller the size is, the higher the display frequency of the road data segment to ensure the priority of the road condition attribute is, and the higher the priority of the road condition attribute is, the faster the moving speed of the particle flow formed by the corresponding road data segment is expressed in the road condition display.
It can be known that the initial point of each road condition attributeInitial static value X0Less than the limit refresh value X of the corresponding road condition attributemax
Step S412: according to the initial static value X of each road condition attribute0And the current accumulated refreshing times tau corresponding to the road condition attributes to obtain the current refreshing static value X of each road condition attribute; x ═ X0+τ<Xmax
And step S413, rounding the control parameter α by the current refresh static value X of each road condition attribute to obtain the current refresh control value epsilon of each road condition attribute so as to ensure that the obtained current refresh control value epsilon of each road condition attribute is positioned in the value range of the modulus result of the serial number of the road data segment.
For example, when the serial number of each road data segment is modulo 10 in the above embodiment, the modulo results of the serial numbers of the road data segments are periodically arranged in a distribution manner of 0 to 9, that is, the modulo results of the serial numbers of the road data segments are 0 to 9, and at this time, in order to ensure the current refresh control value epsilon of each road condition attribute, the control parameter α is Xmax/10。
In addition, in the above embodiment, the current accumulated refresh time τ of each road condition attribute has a certain upper limit, specifically, as shown in fig. 5 and fig. 6, in the step S500, the refreshing the current refresh control value ∈ of each road condition attribute includes:
step S510: comparison of X0+ τ +1 and XmaxThe numerical value of (2);
when X is present0+τ+1<XmaxThen go to step S530;
when X is present0+τ+1=XmaxThen, go to step S520;
step S520: the current cumulative refresh time τ corresponding to the road condition attribute is set to 0, and then step S530 is performed.
Step S530: returning to step S412 to refresh the current refresh control value epsilon of each road condition attribute.
The following describes how to divide and assign road information according to an embodiment of the present invention with reference to fig. 1 to 4.
Fig. 4 shows a schematic diagram of cutting and grouping of road information, wherein the direction of the arrow is the direction of traffic flow.
Fig. 4 includes 11 nodes, which are divided into a first node a, a second node B, a third node C, a fourth node D, a fifth node E, a sixth node F, a seventh node G, an eighth node H, a ninth node I, a tenth node J, and an eleventh node K;
a data segment between the first node a and the second node B is referred to as a first road data segment, a data segment between the second node B and the third node C is referred to as a second road data segment, a data segment between the third node C and the fourth node D is referred to as a third road data segment, a data segment between the fourth node D and the fifth node E is referred to as a fourth road data segment, a data segment between the fifth node E and the sixth node F is referred to as a fifth road data segment, a data segment between the sixth node F and the seventh node G is referred to as a sixth road data segment, a data segment between the seventh node G and the eighth node H is referred to as a seventh road data segment, a data segment between the eighth node H and the ninth node I is referred to as an eighth road data segment, a data segment between the ninth node I and the tenth node J is referred to as a ninth road data segment, a data segment between the tenth node J and the eleventh node K is referred to as a tenth road data segment.
When 10 road data segments are grouped, ten road data segment groups can be divided, and the specific description is as follows:
the first road data segment group a' includes a first road data segment, a second road data segment, a third road data segment, and a fourth road data segment.
The second road data segment group B' comprises a second road data segment, a third road data segment, a fourth road data segment and a fifth road data segment;
a third road data segment group including a third road data segment, a fourth road data segment, a fifth road data segment, and a sixth road data segment;
a fourth road data segment group including a fourth road data segment, a fifth road data segment, a sixth road data segment, and a seventh road data segment;
a fifth road data segment group including a fifth road data segment, a sixth road data segment, a seventh road data segment, and an eighth road data segment;
a sixth road data segment group including a sixth road data segment, a seventh road data segment, an eighth road data segment, and a ninth road data segment;
a seventh road data segment group including a seventh road data segment, an eighth road data segment, a ninth road data segment, and a tenth road data segment;
an eighth road data segment group including an eighth road data segment, a ninth road data segment, and a tenth road data segment;
a ninth road data segment group including a ninth road data segment and a tenth road data segment;
and a tenth road data segment group including a tenth road data segment.
Further, when 10 road data segments are subjected to identification assignment, the sequence number information given to the first road data segment is 0, and the given road condition attribute is set according to actual road condition acquisition; the serial number information given to the second road data segment is 1; the sequence number information given to the third road data segment is 2, and the given road condition attribute is set according to the actual road condition acquisition; the sequence number information given to the fourth road data segment is 3, and the given road condition attribute is set according to the actual road condition acquisition; the serial number information given to the fifth road data segment is 4, and the given road condition attribute is set according to the actual road condition acquisition; the serial number information given to the sixth road data segment is 5, and the given road condition attribute is set according to the actual road condition acquisition; the sequence number information given to the seventh road data segment is 6, and the given road condition attribute is set according to the actual road condition acquisition; the sequence number information given to the eighth road data segment is 7, and the given road condition attribute is set according to the actual road condition acquisition; the sequence number information given to the ninth road data segment is 8, and the given road condition attribute is set according to the actual road condition acquisition; the serial number information given to the tenth road data segment is 9, and the given road condition attribute is set according to the actual road condition collection.
Further, after the 10 serial number pairs of the 10 road data segments are modulo by 10, the modulo result of the serial number of the first road data segment is 0, the modulo result of the serial number of the second road data segment is 1, the modulo result of the serial number of the third road data segment is 2, the modulo result of the serial number of the fourth road data segment is 3, the modulo result of the serial number of the fifth road data segment is 4, the modulo result of the serial number of the sixth road data segment is 5, the modulo result of the serial number of the seventh road data segment is 6, the modulo result of the serial number of the eighth road data segment is 7, the modulo result of the serial number of the ninth road data segment is 8, and the modulo result of the serial number of the tenth road data segment is 9.
For example, the initial static value X of the clear road condition is set in the above embodiment 011, limit refresh value X of unblocked road conditionmax120, control parameters for clear road conditions α12; initial static value X of slowly-driving road condition022, slow-driving limit refresh value Xmax280, slow driving condition control parameter α28; initial static value X of congested road condition033, updating value X of the limit of the congested road conditionmax3150, control parameters α for congested road conditions315. In this example, the value control process of the current cumulative refresh times τ under different road condition attributes is given below.
1. Current cumulative refresh times tau for unblocked road conditions1When the road condition is 0, the current accumulated refreshing time tau of the slowly-running road condition20, the current accumulated refreshing time tau of the congested road condition3If equal to 0, the current refresh control value epsilon of the unblocked road condition1When the road condition of slow driving is equal to 0, the current refreshing control value epsilon2When the current refresh control value epsilon of the congested road condition is 03=0。
2. Current cumulative refresh times tau for unblocked road conditions 11, the current accumulated refreshing time tau of the slowly-running road condition 21, the current accumulated refreshing time tau of the congested road condition3If 1, the current refresh control value epsilon of the unblocked road condition 11, slowCurrent refreshing control value epsilon of driving road condition2When the current refresh control value epsilon of the congested road condition is 03=0。
3. Current cumulative refresh times tau for unblocked road conditions12, the current accumulated refreshing times tau of the slowly-driving road condition22, the current accumulated refreshing time tau of the congested road condition32, current refresh control value epsilon of unblocked road condition 11, the current refresh control value epsilon of the road condition of slow driving2When the current refresh control value epsilon of the congested road condition is 03=0。
4. Current cumulative refresh times tau for unblocked road conditions13, the current accumulated refreshing times tau of the slowly-driving road condition2Current cumulative refresh number τ of congested road conditions3Current refresh control value epsilon of unblocked road condition as 31The current refresh control value epsilon of the road condition of slow driving is 22When the current refresh control value epsilon of the congested road condition is 03=0。
5. Current cumulative refresh times tau for unblocked road conditions 14, the current accumulated refreshing times tau of the slowly-driving road condition 24, the current accumulated refreshing time tau of the congested road condition 34, current refresh control value epsilon of unblocked road condition1The current refresh control value epsilon of the road condition of slow driving is 22When the current refresh control value epsilon of the congested road condition is 03=0。
6. Current cumulative refresh times tau for unblocked road conditions1The current accumulated refreshing time tau of the slowly-driving road condition is 52Current cumulative refresh number τ of congested road conditions3Current refresh control value epsilon of unblocked road condition as 513, the current refresh control value epsilon of the road condition in slow driving2When the current refresh control value epsilon of the congested road condition is 03=0。
7. Current cumulative refresh times tau for unblocked road conditions16, the current accumulated refreshing times tau of the slowly-driving road condition26, the current cumulative refresh time tau of the congested road condition36, current refresh control value epsilon of unblocked road condition1Current refresh control of slowly driving road conditionsValue epsilon 21, the current refresh control value epsilon of the congested road condition3=0。
8. Current cumulative refresh times tau for unblocked road conditions17, the current accumulated refreshing times tau of the slowly-driving road condition27, the current accumulated refreshing time tau of the congested road condition37, current refresh control value epsilon of unblocked road condition 14, the current refresh control value epsilon of the road condition in slow driving 21, the current refresh control value epsilon of the congested road condition3=0。
……
13. Current cumulative refresh times tau for unblocked road conditions 112, the current accumulated refreshing time tau of the slowly-driving road condition 212, the current cumulative refresh time tau of the congested road condition 312, the current refresh control value epsilon of the unblocked road condition1The current refresh control value epsilon of the road condition of slow driving is 621, the current refresh control value epsilon of the congested road condition3=1。
……
15. Current cumulative refresh times tau for unblocked road conditions114, the current accumulated refreshing time tau of the slowly driving road condition214, the current cumulative refresh time τ of the congested road condition314, current refresh control value ε for clear road conditions17, the current refresh control value epsilon of the road condition of slow driving2Current refresh control value epsilon of congested road conditions as 23=1。
……
19. Current cumulative refresh times tau for unblocked road conditions118, the current accumulated refresh times tau of the slowly driving road condition218, the current cumulative refresh time τ of the congested road condition318, current refresh control value epsilon for clear road conditions1When the road condition is 9, the current refresh control value epsilon of the slowly driving road condition2Current refresh control value epsilon of congested road conditions as 23=1。
Due to X011+ 1+18+ 1-20, and therefore the current cumulative refresh number τ of clear road conditions is set1Is equal to 0, and X022+1=2+18+1<80,X033And if +1 is 3+18+1 and is less than 150, the current accumulated refreshing times corresponding to the road condition do not need to be set.
20. Current cumulative refresh times tau for unblocked road conditions1When the road condition is 0, the current accumulated refreshing time tau of the slowly-running road condition219, the current cumulative refresh time τ of the congested road condition319, current refresh control value epsilon for smooth road conditions1When the road condition of slow driving is equal to 0, the current refreshing control value epsilon2Current refresh control value epsilon of congested road conditions as 23=1。
……
28. Current cumulative refresh times tau for unblocked road conditions18, the current accumulated refreshing times tau of the slowly-driving road condition227, the current cumulative refresh time τ of the congested road condition327, current refresh control value epsilon for smooth road conditions 14, the current refresh control value epsilon of the road condition in slow driving2Current refresh control value epsilon of congested road conditions as 33=2。
……
78. Current cumulative refresh times tau for unblocked road conditions 11, the current accumulated refreshing time tau of the slowly-running road condition2Current cumulative refresh number τ of congested road conditions as 77377, current refresh control value epsilon for smooth road conditions 11, the current refresh control value epsilon of the road condition of slow driving2Current refresh control value epsilon for congested road conditions as 93=5。
Due to X022The + 1+ 77+1 is 80, and therefore, the current cumulative refresh number τ of the slowly traveling road condition is set2Is equal to 0, and X011+1=1+1+1=3<20,X033And if +1 is 3+77+1 is 81 < 150, the current accumulated refreshing time corresponding to the road condition does not need to be set.
79. Current cumulative refresh times tau for unblocked road conditions12, the current accumulated refreshing times tau of the slowly-driving road condition20, the current accumulated refreshing time tau of the congested road condition378, current refresh control value ε for clear road conditions 11, slow driving road conditionCurrent refresh control value epsilon2When the current refresh control value epsilon of the congested road condition is 03=5。
……
147. Current cumulative refresh times tau for unblocked road conditions 112, the current accumulated refreshing time tau of the slowly-driving road condition267, the current cumulative refresh time τ of congested road conditions3146, current refresh control value ε for clear road conditions1The current refresh control value epsilon of the road condition of slow driving is 628, the current refresh control value epsilon of the congested road condition3=9。
Due to X033Since +1 is 3+146+1 is 150, the current cumulative refresh number τ of the congested road condition is set3Is equal to 0, and X011+1=1+12+1=14<20,X022And if +1 is 2+67+1 is 70 < 80, the current accumulated refreshing time corresponding to the road condition does not need to be set.
148. Current cumulative refresh times tau for unblocked road conditions 113, the current accumulated refreshing times tau of the slowly-running road condition268, current cumulative refresh times τ of congested road conditions30, current refresh control value epsilon of unblocked road condition17, the current refresh control value epsilon of the road condition of slow driving28, the current refresh control value epsilon of the congested road condition3=0。
From the value control process of the current accumulated refresh times tau under different road condition attributes, it can be found that the current refresh control value epsilon with higher priority of the road condition attributes1Basically, the refreshing is changed every other time, and the refreshing occurs periodically according to the numerical value distribution of 0-9; and the current refresh control value epsilon of the slowly driving road condition with the road condition attribute priority being next2The refreshing is basically changed once every seven times, and the refreshing periodically appears according to the numerical value distribution of 0 to 9, and the current refreshing control value epsilon of the congested road condition with the worst priority3Then basically every 14 refreshes is changed; that is, when comparing with the above mentioned modulo result of the serial number of each road data segment, the road data segment with the highest road condition attribute priority is selected to be rendered most frequently,the frequency of rendering the road data segment with the second priority of the road condition attribute is smaller, and the frequency of rendering the road data segment with the worst priority of the road condition attribute is smallest, so that the particle flow moving speed of the road data segment with the highest priority of the road condition attribute is higher visually, the particle flow moving speed of the road data segment with the second priority of the road condition attribute is lower visually, and the particle flow moving speed of the road data segment with the worst priority of the road condition attribute is lower visually.
It should be noted that, in the above embodiment, after step S410 and before step S440B, as shown in fig. 5, step S400 further includes:
step S420: judging whether the current refreshing control value epsilon of each road condition attribute is the same as the modulus result of the serial number of different road segment data corresponding to the road condition attribute;
if so, go to step S440A;
otherwise, go to step S440B;
step S440A: rendering node position information of the road data fragments in the corresponding road condition attributes;
step S440B: and giving up the node position information of the road data fragment in the rendering corresponding road condition attribute.
In addition, when the graphics processor in the graphics card renders the road data fragment, the position information is rendered in the vertex shader, the color, the transparency, the ambiguity and the like are rendered in the fragment shader, and the vertex shader and the fragment shader may cause data deviation in the data transmission process. Based on this, as shown in fig. 5, after step S420, when the current refresh control value epsilon of the road condition attribute is the same as the modulo result of the sequence number of the road data segment in the corresponding road condition attribute, before step S440A, the method further includes:
step S430A: marking a road data segment corresponding to the road condition attribute by adopting + lambda;
after step S420, when the current refresh control value epsilon of the road condition attribute is different from the modulo result of the sequence number of the road data segment in the corresponding road condition attribute, before step S440B, the method further includes:
step S430B: marking the road data segments in the corresponding road condition attributes by adopting-lambda; lambda is more than or equal to 5;
it can be understood that λ is a marking data, and the fragment shader may determine whether to perform processing by identifying the positive and negative of the identification data in the road data fragment in each road condition attribute, but it should be noted that the larger the λ value is, the better λ value is, for example, λ is 100, so as to prevent the identification data from changing when the vertex shader sends the road data fragment after rendering to the fragment shader, and if λ is 0.5, the data transmitted to the fragment shader may become a negative value, which may result in that which road data fragments need to be rendered cannot be identified.
Specifically, after step S440A and step S440B, as shown in fig. 5, the above embodiment further includes:
step S450: judging whether the mark value of the road data segment in each road condition attribute is positive or not;
if so, perform the above steps S460A1 and S460A2
Otherwise, the above step S460B is executed;
step S460B: and giving up the execution of rendering the color, transparency and ambiguity of the road data segment according to the road condition attribute.
It should be noted that, in the above embodiment, step S500 further includes:
a redrawing instruction called by the browser generates a refreshing instruction; the method can be realized through a display card, and is called through a redrawing instruction of a browser to generate a refreshing instruction, and the current refreshing control value epsilon of each road condition attribute is refreshed under the control of a line-swiping instruction.
Further, the road condition attributes of different stored road data segments may be updated periodically, and based on this, as shown in fig. 1, the method for generating a dynamic particle stream of road conditions according to the embodiment further includes, when the time for updating the road conditions is reached:
step S600: acquiring road condition attribute updating information of the road information, detecting the road condition attribute updating information of the road information, and obtaining road data fragments with changed road condition attributes;
step S700: reading the node positions of the road data segments forming the road condition attribute change and the road condition attributes of the corresponding road data segments;
step S800: and updating the road condition attributes of the stored road data segments with the changed road condition attributes according to the node positions of the road data segments with the changed road condition attributes and the road condition attributes of the corresponding road data segments.
Therefore, when the road condition is updated, the embodiment of the invention only updates the road condition attribute of the road data segment with the changed road condition attribute without updating all the road condition data again, so that the road condition particle refreshing speed of the corresponding road condition data segment can be rapidly updated when the road condition is changed, and the defect that the road condition data of the existing rasterized road condition map needs to be updated completely is avoided.
It can be understood that the above-mentioned traffic update time can be set according to actual needs, for example, once updated in 1min, or once updated in 5 min.
As shown in fig. 1, fig. 3, fig. 5, and fig. 8, an embodiment of the present invention further provides a dynamic road condition particle flow generating device, where the dynamic road condition particle flow generating device includes: the road condition server 1 and the display card 3 are communicated with each other;
the road condition server 1 is used for dividing the road information into m road data segments, wherein each road data segment contains road condition attributes and sequence number information and forms a node position corresponding to the road data segment; m is an integer greater than 1;
the display memory 31 of the display card 3 is used for storing the road condition attributes of the m road data segments, the modulus results of the serial numbers of the m road data segments, and the node position of each road data segment in the road information;
the graphic processor 32 of the display card 3 is configured to set a current refresh control value epsilon for each road condition attribute for limiting the rendering order of the road data segments, and control the current refresh control value epsilon for refreshing each road condition attribute for limiting the rendering order of the road data segments, where epsilon is an integer, and a value range of a modulo result of sequence numbers of the m road data segments is the same as a value range of the current refresh control value epsilon for each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
and when the current refreshing control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute, rendering the node position of the road data fragment in the corresponding road condition attribute, and rendering the color of the road data fragment according to the road condition attribute.
Compared with the prior art, the beneficial effects of the road condition dynamic particle stream generation device provided by the embodiment of the invention are the same as those of the road condition dynamic particle stream generation method provided by the embodiment, and are not repeated herein.
As shown in fig. 9, the traffic server 1 in the above embodiment includes a data cutting module 11 and an identifier assigning module 12;
the data cutting module 11 is configured to set m +1 nodes in the road information along the extending direction of the road, so that a road data segment is formed between two adjacent nodes, and m +1 nodes form m road data segments; each road data segment contains a node position for forming a corresponding road data segment;
the identifier assignment module 12 is configured to perform identifier assignment on the m road data segments, so that each road data segment further includes road condition attribute and sequence number information; the sequence number information of the m pieces of road data is incremented from 0 in the reverse direction of the traffic flow.
Considering the calculation of transparency, as shown in fig. 3 and 8, the traffic server 1 in the above embodiment further includes a grouping module 13, configured to group the m road data segments to obtain m road data segment groups;
the r road data segment group comprises an r road data segment, … … and an r + t road data segment, wherein r is more than or equal to 1 and less than or equal to m-t +1, and t is more than or equal to 1 and less than m;
the r road data segment group comprises an r road data segment, … … and an m road data segment, wherein r is more than m-t +1 and less than or equal to m;
as shown in fig. 3, 5 and 8, the road condition dynamic particle flow generating device further includes a central processing unit 2; the cpu 2 includes:
the reading module 21 is configured to read data included in the m assigned road data segments, obtain sequence number information of each road data segment, and form node position information of each road data segment;
the module taking module 22 is configured to perform module taking operation on the sequence number value contained in the sequence number information of each road data segment to obtain a module taking result of the sequence number of each road segment, where k is an integer greater than 1;
the obtaining module 23 is configured to obtain a total number C of nodes in each road data segment group, and a number i of each node in a road data segment group corresponding to a traffic flow reverse direction;
the transparency calculation module 24 is configured to obtain a transparency T of each node in each road data segment group according to the total number C of the nodes in each road data segment group and the number i of each node in the corresponding road data segment group, where T is (C-i)/C;
the video memory 31 of the video card 3 is further configured to: storing the transparency of the nodes forming each road data segment group;
the graphic processor 32 of the display card 3 is further configured to render the transparency of the road data segment in the corresponding road condition state according to the transparency of two nodes forming the road data segment in the corresponding road condition state after rendering the node position information of the road data segment when the current refresh control value epsilon of the road condition state is the same as the modulo result of the sequence number of the road data segment in the corresponding road condition state, and set the ambiguity of the road data segment in the corresponding road condition state in a way of increasing the ambiguity progressively according to the direction of forward traffic flow.
It should be noted that, in the above embodiment, the display memory 31 stores the relevant data of each road data segment, such as the node position, the modulus result of the serial number, the node transparency, and the road condition attribute, the relevant data of each road data segment should be stored as a whole at the same address of the display memory.
Further, as shown in fig. 5, fig. 6 and fig. 9, the graphics processor 32 in the above embodiment includes a preset module 321, a comparison module 322, a refresh control module 323, a vertex shader 324 and a fragment shader 325; wherein the content of the first and second substances,
the preset module 321 is used for accessing the road condition attributes in the video memory, and setting the initial static values X of different road condition attributes according to the road condition attributes0And the limit updated value X corresponding to the road condition attributemax(ii) a In the same refreshing times, the higher the priority of the road condition attribute is, the initial static value X of the road condition attribute is0The smaller the limit refresh value X of road condition attributemaxThe smaller;
according to the initial static value X of each road condition attribute0And the current accumulated refreshing times tau corresponding to the road condition attributes to obtain the current refreshing static value X of each road condition attribute; x ═ X0+τ<Xmax
Rounding up the control parameter α by the current refresh static value X of each road condition attribute to obtain the current refresh control value epsilon of each road condition attribute;
the vertex shader 324 is configured to render the node position of the road data segment in the corresponding road condition attribute when the current refresh control value epsilon of the road condition attribute is the same as the modulo result of the serial number of the road data segment in the corresponding road condition attribute;
the fragment shader 325 is configured to render the color of the road data fragment according to the road condition attribute when the current refresh control value epsilon of the road condition attribute is the same as the modulo result of the serial number of the road data fragment in the corresponding road condition attribute;
the comparison module 322 is used for comparing X0+ τ +1 and XmaxThe magnitude relationship of (1);
when X is present0+τ+1<XmaxThe refreshing control module is used for generating a refreshing instruction according to the redrawing instruction called by the browser 4; and the refreshing instruction is used for controlling the refreshing of the current refreshing control value epsilon of each road condition attribute.
When X is present0+τ+1=XmaxThe refresh control module is used for setting the current accumulated refresh frequency tau corresponding to the road condition attribute to be 0 according to the redraw command called by the browser 4 and generating a refresh command; the refreshing instruction is used for controlling refreshing of each road condition attributeThe current refresh control value epsilon of nature.
It is understood that, generally, after the fragment shader renders all data, the rendered data is stored in the video memory 31 for display by the browser call.
Further, before the vertex shader 324 shown in fig. 5 and 9 is also used to render the node position information of the road data segment corresponding to the road condition attribute, it is determined whether the current refresh control value epsilon of each road condition attribute is the same as the modulo result of the sequence numbers of different road segment data corresponding to the road condition attribute; if so, rendering the node position information of the road data fragment in the corresponding road condition attribute; otherwise, giving up the execution of rendering the node position information of the road data fragment in the corresponding road condition attribute;
the vertex shader 324 is further configured to mark the road data segment in the corresponding road condition attribute with- λ when the current refresh control value epsilon of the road condition attribute is different from the modulo result of the sequence number of the road data segment in the corresponding road condition attribute; when the current refresh control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data segment in the corresponding road condition attribute, marking the road data segment corresponding to the road condition attribute by adopting + lambda; lambda is more than or equal to 5;
the fragment shader 325 is further configured to determine whether the flag value of the road data fragment in each road condition attribute is positive before performing color rendering on the road data fragment according to the road condition attribute; if so, rendering the color of the road data fragment according to the road condition attribute is executed; and if not, giving up the execution of rendering the colors of the road data fragments according to the road condition attributes.
Further, as shown in fig. 1 and 8, the traffic server 1 in the above embodiment is further configured to obtain traffic attribute update information of the road information when the traffic update time is reached, and detect the traffic attribute update information of the road information to obtain a road data segment with changed traffic attributes;
the reading module 21 in the above embodiment is further configured to read the node positions of the road data segments forming the road condition attribute change and the road condition attributes of the corresponding road data segments;
the video memory 31 in the video card 3 is further configured to update the stored road condition attribute of the road data segment with the changed road condition attribute according to the node position of the road data segment with the changed road condition attribute and the road condition attribute of the corresponding road data segment.
It should be noted that the beneficial effects of the above further definition of the device for generating a dynamic particle stream of a road condition provided in the embodiment of the present invention can be seen in the beneficial effects analyzed by the further definition of the method for generating a dynamic particle stream of a road condition, and are not described herein again.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (15)

1. A method for generating dynamic particle flow of road conditions is characterized by comprising the following steps:
step S100: dividing road information into m road data segments, wherein each road data segment contains road condition attributes and sequence number information, and forms a node position corresponding to the road data segment; m is an integer greater than 1;
step S300: storing the road condition attributes of the m road data segments, the modulus results of the serial numbers of the m road data segments and the node position of each road data segment in the road information;
step S400: setting a current refreshing control value epsilon for limiting the rendering sequence of the road data fragments for each road condition attribute, wherein epsilon is an integer, and the value range of the modulus result of the serial numbers of m road data fragments is the same as the value range of the current refreshing control value epsilon of each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
when the current refresh control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute, rendering the node position of the road data fragment in the corresponding road condition attribute, and rendering the color of the road data fragment according to the road condition attribute;
step S500: returning to the step S400, refreshing the current refreshing control value epsilon of each road condition attribute.
2. The method of claim 1, wherein the dividing the road information into m road data segments comprises:
step S101: arranging m +1 nodes along the extending direction of the road in the road information, so that a road data segment is formed between two adjacent nodes, wherein the m +1 nodes form m road data segments, and each road data segment contains the node position forming the road data segment;
step S102: carrying out identification assignment on the m road data segments to ensure that each road data segment also contains road condition attribute and sequence number information; the sequence number information of the m road data pieces is increased from 0 according to the opposite direction of the traffic flow.
3. The method according to claim 1, wherein between step S100 and step S300, the method further comprises:
step S200: grouping the m road data segments to obtain m road data segment groups;
the r road data segment group comprises an r road data segment, … … and an r + t road data segment, wherein r is more than or equal to 1 and less than or equal to m-t +1, and t is more than or equal to 1 and less than m;
the r road data segment group comprises an r road data segment, … … and an m road data segment, wherein r is more than m-t +1 and less than or equal to m;
the step S300 further includes: acquiring the total number C of nodes in each road data segment group, corresponding to each node number i in each road data segment group along the reverse direction of the traffic flow, and acquiring the transparency T of each node in each road data segment group according to the total number C of the nodes in each road data segment group and corresponding to each node number i in each road data segment group, wherein T is (C-i)/C;
storing the transparency T of the nodes forming each of the road data segment groups;
after rendering the node position information of the road data segment, the step S400 further includes:
and when the current refreshing control value epsilon of the road condition state is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition state, rendering the transparency of the road data fragment in the corresponding road condition state according to the transparencies of two nodes forming the road data fragment in the corresponding road condition state, and setting the fuzziness of the road data fragment in the corresponding road condition state in a mode of increasing the fuzziness according to the advancing direction of traffic flow.
4. The method according to claim 1, wherein before storing the modulo result of the sequence numbers of the m road data segments, the step S300 further includes:
reading the serial number information of each road data segment, and performing modulus operation on a serial number value contained in the serial number information of each road data segment to obtain a modulus result of the serial number of each road segment, wherein k is an integer greater than 1;
reading node position information forming each road data segment;
and reading the road condition attribute of each road data segment.
5. The method according to any one of claims 1 to 4, wherein the setting of the current refresh control value ε for each road condition state comprises:
step S411: setting initial static values X of different road condition attributes according to the road condition attributes0And the limit updated value X corresponding to the road condition attributemax(ii) a In the same refreshing times, the higher the priority of the road condition attribute is, the initial static value X of the road condition attribute is0The smaller, the road condition attributeLimit refresh value of XmaxThe smaller;
step S412: according to the initial static value X of each road condition attribute0And the current accumulated refreshing times tau corresponding to the road condition attributes are obtained to obtain the current refreshing static value X of each road condition attribute; x ═ X0+τ<Xmax
Step S413, rounding up the control parameter α by the current refresh static value X of each road condition attribute to obtain the current refresh control value epsilon of each road condition attribute;
in step S500, the updating the current updating control value epsilon of each road condition attribute includes:
when X is present0+τ+1<XmaxReturning to step S412 to refresh the current refresh control value epsilon of each road condition attribute;
when X is present0+τ+1=XmaxAnd setting the current accumulated refreshing time τ of the corresponding road condition attribute to be 0, and returning to the step S402 to refresh the current refreshing control value epsilon of each road condition attribute.
6. The method according to any one of claims 1 to 4, wherein after setting the current refresh control value epsilon for each road condition state, before rendering the node position information of the road data segment corresponding to the road condition attribute, the step S400 further includes:
judging whether the current refreshing control value epsilon of each road condition attribute is the same as the modulus result of the serial number of different road segment data corresponding to the road condition attribute;
if so, executing the rendering of the node position information corresponding to the road data fragment in the road condition attribute;
and if not, giving up the rendering of the node position information corresponding to the road data fragment in the road condition attribute.
7. The method for generating dynamic particle flow of road conditions according to any one of claims 1 to 4,
when the current refresh control value epsilon of the road condition attribute is different from the modulo result of the sequence number of the road data segment in the corresponding road condition attribute, the step S400 further includes: marking the road data segments in the corresponding road condition attributes by adopting-lambda; lambda is more than or equal to 5;
before rendering the node position information corresponding to the road data segment in the road condition attribute, when the current refresh control value epsilon of the road condition attribute is the same as the modulo result of the sequence number of the road data segment in the corresponding road condition attribute, the step S400 further includes: marking a road data segment corresponding to the road condition attribute by adopting + lambda;
after rendering the node position information corresponding to the road data segment in the road condition attribute, and before performing color rendering on the road data segment according to the road condition attribute, the step S400 further includes:
judging whether the mark value of the road data segment in each road condition attribute is positive or not;
if so, rendering the color of the road data fragment according to the road condition attribute is executed;
and if not, giving up the rendering of the road data fragment color according to the road condition attribute.
8. The method for generating the dynamic particle stream of the road condition according to any one of claims 1 to 4, wherein before returning to step S400, the step S500 further comprises:
a redrawing instruction called by the browser generates a refreshing instruction; and the refreshing instruction is used for controlling the refreshing of the current refreshing control value epsilon of each road condition attribute.
9. The method according to claim 4, further comprising:
step S600: when the time for updating the road condition is up, acquiring road condition attribute updating information of the road information, detecting the road condition attribute updating information of the road information, and acquiring a road data segment with changed road condition attributes;
step S700: reading the node positions of the road data segments forming the road condition attribute change and the road condition attributes of the corresponding road data segments;
step S800: returning to step S300, updating the stored road condition attributes of the road data segment with changed road condition attributes according to the node positions of the road data segments with changed road condition attributes and the road condition attributes of the corresponding road data segments.
10. The road condition dynamic particle flow generation device is characterized by comprising a road condition server display card, wherein the road condition server and the display card are communicated with each other;
the road condition server is used for dividing road information into m road data segments, each road data segment contains road condition attributes and sequence number information, and node positions corresponding to the road data segments are formed; m is an integer greater than 1;
the display memory of the display card is used for storing the road condition attributes of the m road data segments, the modulus results of the serial numbers of the m road data segments and the node position of each road data segment in the road information;
the graphics processor of the display card is used for setting a current refreshing control value epsilon of each road condition attribute for limiting the rendering sequence of the road data fragments, and controlling the current refreshing control value epsilon of each road condition attribute for limiting the rendering sequence of the road data fragments to be refreshed, wherein epsilon is an integer, and the value range of the modulus result of the serial numbers of the m road data fragments is the same as the value range of the current refreshing control value epsilon-of each road condition attribute; the higher the priority of the road condition attribute is, the smaller the current refreshing control value epsilon of the road condition attribute is;
and when the current refreshing control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute, rendering the node position of the road data fragment in the corresponding road condition attribute, and rendering the color of the road data fragment according to the road condition attribute.
11. The dynamic road condition particle stream generating device as claimed in claim 10, wherein the road condition server comprises a data cutting module and an identifier assigning module;
the data cutting module is used for arranging m +1 nodes in the road information along the extending direction of the road, so that a road data segment is formed between every two adjacent nodes, and m +1 nodes form m road data segments; each road data segment contains a node position forming the corresponding road data segment;
the identification assignment module is used for carrying out identification assignment on the m road data segments, so that each road data segment also contains road condition attribute and sequence number information; the sequence number information of the m road data pieces is increased from 0 according to the opposite direction of the traffic flow.
12. The device for generating dynamic particle stream of road conditions according to claim 11, wherein the road condition server further comprises:
the grouping module is used for grouping the m road data segments to obtain m road data segment groups;
the r road data segment group comprises an r road data segment, … … and an r + t road data segment, wherein r is more than or equal to 1 and less than or equal to m-t +1, and t is more than or equal to 1 and less than m;
the r road data segment group comprises an r road data segment, … … and an m road data segment, wherein r is more than m-t +1 and less than or equal to m;
the road condition dynamic particle flow generating device also comprises a central processing unit; the central processing unit includes:
the reading module is used for reading data contained in the m assigned road data segments, obtaining serial number information of each road data segment, serial number information of each road data segment and node position information forming each road data segment;
the modulus taking module is used for carrying out modulus taking operation on a serial number value contained in the serial number information of each road data segment to obtain a modulus taking result of the serial number of each road segment, wherein k is an integer greater than 1;
the acquisition module is used for acquiring the total number C of the nodes in each road data fragment group and corresponding to the serial number i of each node in each road data fragment group along the traffic flow reverse direction;
the transparency calculation module is used for obtaining the transparency T of each node in each road data segment group according to the total number C of the nodes in each road data segment group and the serial number i of each node in the corresponding road data segment group, wherein T is (C-i)/C;
the video memory is further configured to: storing the transparency of the nodes forming each of the road data segment groups;
the graphic processor is further configured to render the transparency of the road data segment in the corresponding road condition state according to the transparency of two nodes forming the road data segment in the corresponding road condition state after rendering the node position information of the road data segment when the current refresh control value epsilon of the road condition state is the same as the modulo result of the serial number of the road data segment in the corresponding road condition state, and set the ambiguity corresponding to the road data segment in the road condition state in an increasing ambiguity manner according to the direction in which traffic streams advance.
13. The device for generating dynamic particle streams of road conditions according to claim 12, wherein the graphics processor comprises a presetting module, a comparing module, a refresh control module, a vertex shader and a fragment shader;
the preset module is used for accessing the road condition attributes in the video memory and setting initial static values X of different road condition attributes according to the road condition attributes0And the limit updated value X corresponding to the road condition attributemax(ii) a In the same refreshing times, the higher the priority of the road condition attribute is, the initial static value X of the road condition attribute is0The smaller the limit refresh value X of the road condition attributemaxThe smaller;
according to the initial static value X of each road condition attribute0And the current accumulated refreshing times tau corresponding to the road condition attributes are obtained to obtain the current refreshing static value X of each road condition attribute; x ═ X0+τ<Xmax
Rounding up the control parameter α by the current refresh static value X of each road condition attribute to obtain the current refresh control value epsilon of each road condition attribute;
the vertex shader is used for rendering the node position corresponding to the road data fragment in the road condition attribute when the current refresh control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute;
the fragment shader is used for rendering the color of the road data fragment according to the road condition attribute when the current refresh control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data fragment in the corresponding road condition attribute;
the comparison module is used for comparing X0+ τ +1 and XmaxThe magnitude relationship of (1);
when X is present0+τ+1<XmaxThe refreshing control module is used for generating a refreshing instruction according to a redrawing instruction called by the browser; the refreshing instruction is used for controlling and refreshing the current refreshing control value epsilon of each road condition attribute;
when X is present0+τ+1=XmaxThe refreshing control module is used for setting the current accumulated refreshing time tau corresponding to the road condition attribute to be 0 according to a redrawing instruction called by the browser and generating a refreshing instruction; and the refreshing instruction is used for controlling the refreshing of the current refreshing control value epsilon of each road condition attribute.
14. The device according to claim 13, wherein the vertex shader is further configured to determine whether the current refresh control value epsilon of each road condition attribute is the same as the modulo result of the sequence numbers of different road segment data corresponding to the road condition attribute before rendering the node position information of the road data segment corresponding to the road condition attribute; if so, executing the rendering of the node position information corresponding to the road data fragment in the road condition attribute; otherwise, giving up the rendering of the node position information corresponding to the road data fragment in the road condition attribute;
the vertex shader is also used for marking the road data fragments in the corresponding road condition attributes by adopting-lambda when the current refreshing control value epsilon of the road condition attributes is different from the modulus result of the serial numbers of the road data fragments in the corresponding road condition attributes; when the current refreshing control value epsilon of the road condition attribute is the same as the modulus result of the serial number of the road data segment in the corresponding road condition attribute, marking the road data segment corresponding to the road condition attribute by adopting + lambda; lambda is more than or equal to 5;
the fragment shader is further used for judging whether the marking value of the road data fragment in each road condition attribute is positive or not before performing color rendering on the road data fragment according to the road condition attribute; if so, rendering the color of the road data fragment according to the road condition attribute is executed; and if not, giving up the rendering of the road data fragment color according to the road condition attribute.
15. The dynamic particle stream generating device according to claim 12, further comprising:
the road condition server is also used for acquiring the road condition attribute updating information of the road information when the road condition updating time is up, detecting the road condition attribute updating information of the road information and acquiring the road data segment with changed road condition attributes;
the reading module is also used for reading the node positions of the road data segments forming the road condition attribute change and the road condition attributes of the corresponding road data segments;
the video memory is further used for updating the stored road condition attributes of the road data segments with the changed road condition attributes according to the node positions of the road data segments with the changed road condition attributes and the road condition attributes of the corresponding road data segments.
CN201711023493.0A 2017-10-27 2017-10-27 Method and device for generating dynamic particle flow of road conditions Active CN107832369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711023493.0A CN107832369B (en) 2017-10-27 2017-10-27 Method and device for generating dynamic particle flow of road conditions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711023493.0A CN107832369B (en) 2017-10-27 2017-10-27 Method and device for generating dynamic particle flow of road conditions

Publications (2)

Publication Number Publication Date
CN107832369A CN107832369A (en) 2018-03-23
CN107832369B true CN107832369B (en) 2020-02-04

Family

ID=61649745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711023493.0A Active CN107832369B (en) 2017-10-27 2017-10-27 Method and device for generating dynamic particle flow of road conditions

Country Status (1)

Country Link
CN (1) CN107832369B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763701B (en) * 2021-05-26 2024-02-23 腾讯科技(深圳)有限公司 Road condition information display method, device, equipment and storage medium
CN113658296B (en) * 2021-10-20 2022-01-25 腾讯科技(深圳)有限公司 Image rendering method and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520947A (en) * 2009-03-31 2009-09-02 北京四维图新科技股份有限公司 Method and device for distributing dynamic information traffic information
CN104282140A (en) * 2014-09-22 2015-01-14 同济大学 Large-scale real-time traffic index service method and system based on distributed framework

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7466241B2 (en) * 2006-04-06 2008-12-16 International Business Machines Corporation Determining billboard refresh rate based on traffic flow
US9551583B1 (en) * 2015-07-06 2017-01-24 International Business Machines Corporation Hybrid road network and grid based spatial-temporal indexing under missing road links

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520947A (en) * 2009-03-31 2009-09-02 北京四维图新科技股份有限公司 Method and device for distributing dynamic information traffic information
CN104282140A (en) * 2014-09-22 2015-01-14 同济大学 Large-scale real-time traffic index service method and system based on distributed framework

Also Published As

Publication number Publication date
CN107832369A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
US8471732B2 (en) Method for re-using photorealistic 3D landmarks for nonphotorealistic 3D maps
KR102056882B1 (en) Managing map elements using aggregate feature identifiers
CN107423445A (en) A kind of map data processing method, device and storage medium
WO2011111239A1 (en) Three-dimensional map drawing system
CN102063833B (en) Method for drawing synchronously displayed symbols and marks of dot map layers of map
US8917281B2 (en) Image rendering method and system
CN101751682B (en) Preparation method of universal map
CN107832369B (en) Method and device for generating dynamic particle flow of road conditions
JP2007309719A (en) Graphic meter display
CN105893632A (en) Road name data compiling method and map labeling method and device
CN105022731A (en) Map vector tile buffering method
CN106204703A (en) Three-dimensional scene models rendering intent and device
JP5007059B2 (en) Stereoscopic in-vehicle display
JP2012150823A (en) Three-dimensional map drawing system
CN103137009A (en) Display method and device for map and vehicle-mounted system
EP2728551B1 (en) Image rendering method and system
US9846819B2 (en) Map image display device, navigation device, and map image display method
She et al. An efficient method for rendering linear symbols on 3D terrain using a shader language
CN111681307B (en) Implementation method of dynamic three-dimensional coordinate axis applied to three-dimensional software
CN111739120B (en) Drawing method of plain text histogram
CN107591080B (en) Method and device for drawing road gland relation
CN112231036A (en) Method for realizing refreshing of different refresh rates by dividing display interface into regions
CN113763701B (en) Road condition information display method, device, equipment and storage medium
JP6247456B2 (en) Navigation device and map drawing method
Kim et al. Methods for Improving the Performance of Tactical Information Displays

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