Disclosure of Invention
The invention aims to provide a traffic maintenance object display method and system, which comprehensively display maintenance data in a lane graph mode.
In order to achieve the purpose, the invention provides the following scheme:
a traffic maintenance object display method comprises the following steps:
acquiring a maintenance data set of a traffic maintenance object to be displayed; each piece of maintenance data in the maintenance data set comprises a starting point pile number, a finishing point pile number, a construction year, a lane and a maintenance type;
analyzing and matching maintenance data in the maintenance data set by adopting a greedy algorithm to obtain two pieces of maintenance data of the same maintenance type of the overlapped road sections, wherein the two pieces of maintenance data of the same maintenance type of all the overlapped road sections form an overlapped maintenance data set;
dividing two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set into three pieces of maintenance data by taking a starting point pile number and an end point pile number as boundary points to form a boundary maintenance data set;
inserting a boundary maintenance data set into the maintenance data set from which the overlapped maintenance data set is deleted, and generating a display maintenance data set;
and rendering the maintenance data in the display maintenance data set on a lane graph constructed by taking the stake number as an abscissa and taking a lane as an ordinate.
Optionally, the obtaining a maintenance data set of the traffic maintenance object to be displayed further includes:
and extracting the maintenance data of which the parameter quantity is greater than or equal to the parameter quantity threshold value contained in the maintenance data set to form a cleaning maintenance data set.
Optionally, the analysis and matching of the maintenance data in the maintenance data set is performed by using a greedy algorithm to obtain two pieces of maintenance data of the same maintenance type in the overlapped road section, and the two pieces of maintenance data of the same maintenance type in all the overlapped road sections form an overlapped maintenance data set, which specifically includes:
acquiring two pieces of maintenance data with overlapped pile number ranges and the same maintenance type in the maintenance data set through nested circulation, and determining the two pieces of maintenance data as overlapped maintenance data groups;
judging whether the construction years of the two pieces of maintenance data in the overlapped maintenance data group are the same or not, and obtaining a judgment result;
if the judgment result shows that the maintenance data group is the same as the maintenance data group, marking the two pieces of maintenance data in the overlapped maintenance data group as the overlapped maintenance data in the same year;
if the judgment result shows that the data is not the same as the maintenance data in the overlapping maintenance data group, marking the two pieces of maintenance data in the overlapping maintenance data group as cross-year overlapping maintenance data;
all of the same-year overlapping repair data and all of the cross-year overlapping repair data constitute an overlapping repair data set.
Optionally, the dividing two pieces of maintenance data of the same maintenance type on the overlapped road segment in the overlapped maintenance data set into three pieces of maintenance data by using the start pile number and the end pile number as boundary points to form a boundary maintenance data set specifically includes:
sequencing the starting pile numbers and the end pile numbers of two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set in an ascending order, and sequentially combining every two pieces of maintenance data in sequence to obtain two groups of non-overlapped pile number data and one group of overlapped pile number data;
respectively marking maintenance data corresponding to the two groups of non-overlapping pile number data as non-overlapping maintenance data, and marking maintenance data corresponding to one group of overlapping pile number data as overlapping maintenance data;
all non-overlapping repair data and all overlapping repair data comprise a boundary repair data set.
Optionally, rendering the maintenance data in the display maintenance data set on a lane graph constructed by taking the stake number as an abscissa and the lane as an ordinate, specifically includes:
drawing a lane graph with the vertical coordinate being a lane and the horizontal coordinate being a stake mark on an HTML page by using a javaScript script and a css style;
acquiring a display maintenance data set from a server by utilizing an Ajax technology;
according to the lane and the pile number, drawing the maintenance data in the maintenance data set in a lane graph by different color blocks according to the maintenance type and the marks of the maintenance data;
compiling a two-dimensional plane coordinate system mouse rolling event by using a javaScript script;
and writing color block mouse stopping events and mouse clicking events by using a javaScript script.
A traffic maintenance object display system, the system comprising:
the maintenance data set acquisition module is used for acquiring a maintenance data set of the traffic maintenance object to be displayed; each piece of maintenance data in the maintenance data set comprises a starting point pile number, an end point pile number, a construction year, a lane and a maintenance type;
the overlapping maintenance data set forming module is used for analyzing and matching maintenance data in the maintenance data set by adopting a greedy algorithm to obtain two pieces of maintenance data of the same maintenance type of the overlapping road sections, and the two pieces of maintenance data of the same maintenance type of all the overlapping road sections form an overlapping maintenance data set;
a boundary maintenance data set forming module, configured to divide two pieces of maintenance data of the same maintenance type on an overlapped road segment in the overlapped maintenance data set into three pieces of maintenance data by using a start pile number and an end pile number as boundary points, and form a boundary maintenance data set;
the display maintenance data set generating module is used for inserting a boundary maintenance data set into the maintenance data set from which the overlapped maintenance data set is deleted and generating a display maintenance data set;
and the rendering module is used for rendering the maintenance data in the display maintenance data set on a lane graph constructed by taking the stake number as an abscissa and taking a lane as an ordinate.
Optionally, the system further includes:
and the cleaning maintenance data set forming module is used for extracting the maintenance data of which the parameter number is greater than or equal to the parameter number threshold value contained in the maintenance data set to form a cleaning maintenance data set.
Optionally, the overlapping maintenance data set constitutes a module, which specifically includes:
the overlapping maintenance data group determining submodule is used for obtaining two pieces of maintenance data which are overlapped in pile number range and same in maintenance type in the maintenance data set through nested circulation and determining the two pieces of maintenance data as overlapping maintenance data groups;
the judgment result obtaining submodule is used for judging whether the construction years of the two pieces of maintenance data in the overlapped maintenance data group are the same or not and obtaining a judgment result;
the same-year overlapped maintenance data marking sub-module is used for marking two pieces of maintenance data in the overlapped maintenance data group as same-year overlapped maintenance data if the judgment result shows that the two pieces of maintenance data are the same-year overlapped maintenance data;
the cross-year overlapping maintenance data marking submodule is used for marking two pieces of maintenance data in the overlapping maintenance data group as cross-year overlapping maintenance data if the judgment result shows that the two pieces of maintenance data are not the same;
and the overlapped maintenance data set forming submodule is used for forming an overlapped maintenance data set by all the same-year overlapped maintenance data and all the cross-year overlapped maintenance data.
Optionally, the boundary repair data set constitutes a module, which specifically includes:
the data grouping submodule is used for sequencing the starting point pile number and the end point pile number of two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set in an ascending manner, and combining two pieces of non-overlapped pile number data and one piece of overlapped pile number data in sequence;
the data marking submodule is used for respectively marking the maintenance data corresponding to the two groups of non-overlapping pile number data as non-overlapping maintenance data and marking the maintenance data corresponding to the group of overlapping pile number data as overlapping maintenance data;
and the boundary maintenance data set forming submodule is used for forming a boundary maintenance data set by all the non-overlapped maintenance data and all the overlapped maintenance data.
Optionally, the rendering module specifically includes:
the swim lane drawing sub-module is used for drawing a swim lane drawing with a lane as a vertical coordinate and a stake as a horizontal coordinate on an HTML page by using a javaScript script and a css style;
the display maintenance data set acquisition submodule is used for acquiring a display maintenance data set from a server by utilizing the Ajax technology;
the drawing submodule is used for drawing the maintenance data in the maintenance data set in a lane graph by different color blocks according to the lane and the pile number and the marks of the maintenance type and the maintenance data;
the mouse rolling event compiling sub-module is used for compiling a two-dimensional plane coordinate system mouse rolling event by utilizing a javaScript script;
and the mouse stay event and mouse click event writing submodule is used for writing color block mouse stay events and mouse click events by using a javaScript script.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a method and a system for displaying a traffic maintenance object, wherein a maintenance data set of the traffic maintenance object to be displayed is analyzed and matched by a greedy algorithm to obtain two maintenance data of the same maintenance type of an overlapped road section, and the maintenance data is divided into three maintenance data by taking a starting point pile number and an end point pile number as boundary points, so that the two data of the same maintenance type with the overlapped data are divided into three maintenance data in a minimum maintenance pile number range, and the three maintenance data are further rendered on a lane graph constructed by taking the pile number as a horizontal coordinate and a lane as a vertical coordinate. The invention comprehensively summarizes the maintenance data to be globally displayed on a lane graph by the aid of lanes, directions, stake numbers, diseases and maintenance, and overcomes the defects that the prior art lacks comprehensive summarizing analysis of annual data and is single in display mode.
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 invention aims to provide a traffic maintenance object display method and system, which comprehensively display maintenance data in a lane graph mode.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
A traffic maintenance object display method, as shown in fig. 1-2, the method comprising:
s101, acquiring a maintenance data set of a traffic maintenance object to be displayed; each piece of maintenance data in the maintenance data set comprises a starting point pile number, a terminal point pile number, construction years, a lane and a maintenance type;
s102, analyzing and matching maintenance data in the maintenance data set by adopting a greedy algorithm to obtain two pieces of maintenance data of the same maintenance type of the overlapped road sections, wherein the two pieces of maintenance data of the same maintenance type of all the overlapped road sections form an overlapped maintenance data set;
s103, dividing two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set into three pieces of maintenance data by taking the pile numbers of the starting point and the ending point as boundary points to form a boundary maintenance data set;
s104, inserting a boundary maintenance data set into the maintenance data set from which the overlapped maintenance data set is deleted, and generating a display maintenance data set;
and S105, rendering the maintenance data in the maintenance data display set on a lane graph constructed by taking the stake marks as horizontal coordinates and taking the lanes as vertical coordinates.
The specific process is as follows:
and step S101, collecting overlay construction, disease treatment and preventive maintenance data as maintenance data A (maintenance data set).
The construction of the overlay comprises construction date, direction, number of the start-stop pile, overlay length, overlay width, overlay thickness, overlay area, stress absorbing layer width, stress absorbing layer length, stress absorbing layer area, adhesive layer, SMA-13 (thickness 4.0cm), AC-16C (thickness 4.5cm), self-adhesive seam-sticking belt and milling material recovery.
The disease treatment comprises construction date, starting point pile number, end point pile number, direction, lane, length, width, area, average total thickness, milling total square amount, milling material recovery, asphalt thickness, stress absorbing layer, adhesive layer, backfill square amount and coating reducing agent.
The preventive maintenance comprises a project name, a project type, a year, a direction, a starting point pile number, an end point pile number, construction time, defect responsibility area ending time, a lane, a first layer grading type, a first layer thickness, a second layer grading type, a second layer thickness, a third layer grading type, a third layer thickness, a special process or a material.
The maintenance data a contains a plurality of records, each having a maintenance type (mat construction, disease treatment, and preventive maintenance) field by which it can be distinguished which type.
Step S101, obtaining a maintenance data set of the traffic maintenance object to be displayed, and then further comprising:
and extracting the maintenance data of which the parameter number is greater than or equal to the parameter number threshold value contained in the maintenance data set to form a cleaning maintenance data set.
And cleaning the collected and merged maintenance data A in the background to obtain data B (a cleaning maintenance data set): data cleansing is achieved by setting a threshold amount. If the set threshold value is composed of 5 parameters, the parameters contained in the maintenance data are compared with the parameters contained in the threshold value, if the parameters are less than 5, the data are ignored, otherwise, the data are reserved.
The start stake number, end stake number, year, and repair type in FIG. 2 are parameters of the repair data.
Step S102, analyzing and matching the data B through a greedy algorithm to obtain same-year or cross-year maintenance data C of the same maintenance type on the same road section: judging whether pile number ranges of two records in data B have an overlapping part through nested loop, if so, judging whether maintenance types are the same, if so, judging whether years are the same, and if so, determining that the overlapping part is the same-year overlapping maintenance; otherwise, overlapping portions of the same repair type and different year are considered overlapping repairs across years, as shown in FIG. 3.
The same-year overlapping repair data C or cross-year repair data each include a project type, year, road code, direction, start pile number, end pile number, construction time, and repair classification (same-year overlapping repair, cross-year overlapping repair, or no overlap).
The method specifically comprises the following steps:
acquiring two pieces of maintenance data with overlapped pile number ranges and the same maintenance type in a maintenance data set through nested circulation, and determining the two pieces of maintenance data as overlapped maintenance data groups;
judging whether the construction years of the two pieces of maintenance data in the overlapped maintenance data group are the same or not, and obtaining a judgment result;
if the judgment result shows that the data are the same, marking the two pieces of maintenance data in the overlapped maintenance data group as the same-year overlapped maintenance data;
if the judgment result indicates no, marking the two pieces of maintenance data in the overlapped maintenance data group as cross-year overlapped maintenance data;
all of the same-year overlapping repair data and all of the cross-year overlapping repair data constitute an overlapping repair data set.
Step S103, recalculating the front and rear data boundaries according to the pile number range of the maintenance data C to obtain a boundary data set D: and (3) re-ascending and sequencing the four stake numbers of the two records, combining every two records in sequence to obtain three groups of data, wherein the two sides are non-overlapped parts, the middle part is overlapped part data, and marking each record of the boundary data set D so as to be displayed by different color blocks according to the marks when the lane graph is displayed.
As shown in fig. 3, the four stake numbers of data a and data B are: 100. 110, 105, 115, the results after the four stake numbers are sorted: 100. 105, 110, 115, pairwise combination result: 100-.
The method specifically comprises the following steps:
sequencing the starting pile number and the end pile number of two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set in an ascending order, and sequentially combining every two pieces of maintenance data in sequence to obtain two groups of non-overlapped pile number data and one group of overlapped pile number data;
respectively marking the maintenance data corresponding to the two groups of non-overlapping pile number data as non-overlapping maintenance data, and marking the maintenance data corresponding to the group of overlapping pile number data as overlapping maintenance data;
all non-overlapping repair data and all overlapping repair data constitute a boundary repair data set.
Step S104, carrying out overlapping and non-overlapping classification on the boundary data D, recombining to generate display data E: data E is generated by first deleting data C from the B set and then inserting data D into the set. As shown in fig. 4, data 1, data 2 in set C are replaced with data 1, data 2, data 3 in set D.
And S105, organizing horizontal and vertical coordinates according to the direction, the stake mark and the lane dynamic state, rendering a lane graph, and rendering the display data E on the lane graph by using different icons and color blocks.
The method specifically comprises the following steps:
drawing a lane graph with the ordinate of a lane and the abscissa of a stake mark on an HTML page by using a javaScript script and a css style;
acquiring a display maintenance data set from a server by utilizing an Ajax technology;
according to the lane and the pile number, drawing the maintenance data in the maintenance data set in a lane graph by different color blocks according to the maintenance type and the marks of the maintenance data;
compiling a two-dimensional plane coordinate system mouse rolling event by using a javaScript script;
and writing color block mouse stopping events and mouse clicking events by using a javaScript script.
As shown in fig. 5, the abscissa is the stake number, and the ordinate is the lanes in the direction, including the up 1 lane, the up 2 lane, the down 1 lane, and the down 2 lane. AC-13, SMA-13+ SAMI and AC-16C are maintenance types, cracks, pit slots and net cracks are road diseases, and repairing cracks, pit slots and net cracks is disease treatment.
The lane graph designed by the invention displays maintenance data in a minimum maintenance pile number range, displays historical maintenance data and current-year maintenance data in different color blocks, can also perform screening display of the data according to construction years, and can display all the construction years by overlapping year-crossing data in a pop window mode.
Compared with the prior art, the method has the following advantages:
1. the method carries out overall map display on the lane, direction, pile number, disease and maintenance of the road based on a planar two-dimensional coordinate system, and realizes accurate allocation with the lane, direction and pile number of the road by using the attributes of the lane, direction and pile number of the disease and the maintenance. The display method has clear results and accurate position.
2. According to the method, when the disease and maintenance are displayed in a global visual mode, the attribute of dynamic scaling of HTML elements is utilized, stepless scaling of the X axis of a coordinate system, namely the road pile number is achieved, independent display of single disease and maintenance content is achieved, and the display effect is improved.
3. The method utilizes different colors (color blocks) to mark the diseases and maintain, highlights different states of the maintained object, and further improves the display effect.
4. The lane images are displayed in a lane image mode, the humanized cognitive habits are met, and diseases and maintenance states are visually displayed through color and position.
The invention also provides a traffic maintenance object display system, which comprises:
the maintenance data set acquisition module is used for acquiring a maintenance data set of the traffic maintenance object to be displayed; each piece of maintenance data in the maintenance data set comprises a starting point pile number, a terminal point pile number, construction years, a lane and a maintenance type;
the overlapping maintenance data set forming module is used for analyzing and matching maintenance data in the maintenance data set by adopting a greedy algorithm to obtain two pieces of maintenance data of the same maintenance type of the overlapping road section, and the two pieces of maintenance data of the same maintenance type of all the overlapping road sections form an overlapping maintenance data set;
the boundary maintenance data set forming module is used for dividing two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set into three pieces of maintenance data by taking the pile numbers of the starting point and the end point as boundary points to form a boundary maintenance data set;
the display maintenance data set generation module is used for inserting a boundary maintenance data set into the maintenance data set from which the overlapped maintenance data set is deleted to generate a display maintenance data set;
and the rendering module is used for rendering the maintenance data in the display maintenance data set on a lane graph constructed by taking the stake number as an abscissa and the lane as an ordinate.
The system further comprises:
and the cleaning maintenance data set forming module is used for extracting the maintenance data of which the parameter quantity is greater than or equal to the parameter quantity threshold value contained in the maintenance data set to form a cleaning maintenance data set.
The overlapped maintenance data set forming module specifically comprises:
the overlapping maintenance data group determining submodule is used for obtaining two pieces of maintenance data which are overlapped in pile number range and same in maintenance type in the maintenance data set through nested circulation and determining the two pieces of maintenance data as overlapping maintenance data groups;
the judgment result obtaining submodule is used for judging whether the construction years of the two pieces of maintenance data in the overlapped maintenance data group are the same or not and obtaining a judgment result;
the same-year overlapped maintenance data marking sub-module is used for marking two pieces of maintenance data in the overlapped maintenance data group as same-year overlapped maintenance data if the judgment result shows that the two pieces of maintenance data are the same;
the cross-year overlapping maintenance data marking submodule is used for marking two pieces of maintenance data in the overlapping maintenance data group as cross-year overlapping maintenance data if the judgment result shows that the two pieces of maintenance data are not marked;
and the overlapped maintenance data set forming submodule is used for forming an overlapped maintenance data set by all the same-year overlapped maintenance data and all the cross-year overlapped maintenance data.
The boundary maintenance data set forming module specifically comprises:
the data grouping submodule is used for sequencing the pile numbers of the starting point and the pile numbers of the end point of two pieces of maintenance data of the same maintenance type of the overlapped road sections in the overlapped maintenance data set in an ascending manner, and sequentially combining every two pieces of maintenance data in sequence to obtain two groups of non-overlapped pile number data and one group of overlapped pile number data;
the data marking submodule is used for respectively marking the maintenance data corresponding to the two groups of non-overlapping pile number data as non-overlapping maintenance data and marking the maintenance data corresponding to the group of overlapping pile number data as overlapping maintenance data;
and the boundary maintenance data set forming submodule is used for forming a boundary maintenance data set by all the non-overlapped maintenance data and all the overlapped maintenance data.
The rendering module specifically includes:
the swim lane drawing sub-module is used for drawing a swim lane drawing with a lane as a vertical coordinate and a stake as a horizontal coordinate on an HTML page by using a javaScript script and a css style;
the display maintenance data set acquisition submodule is used for acquiring a display maintenance data set from a server by utilizing the Ajax technology;
the drawing submodule is used for drawing the maintenance data in the maintenance data set in a lane graph by different color blocks according to the lane and the pile number and the marks of the maintenance type and the maintenance data;
the mouse rolling event compiling submodule is used for compiling a two-dimensional plane coordinate system mouse rolling event by using a javaScript script;
and the mouse stopping event and mouse clicking event compiling submodule is used for compiling color block mouse stopping events and mouse clicking events by using a javaScript script.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the description of the method part.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.