Big data analysis processing method and system based on terminal
Technical Field
The invention belongs to the field of big data processing, relates to a road analysis technology, and particularly relates to a big data analysis processing method and a big data analysis processing system based on a terminal.
Background
The urban road is communicated with all regions of a city, is used for traffic transportation and pedestrians in the city, is convenient for resident life, work and cultural entertainment activities, and is connected with roads outside the city to bear external traffic. With the historical evolution, roads of various cities in the world are developed to different degrees, and after the automobile is invented, the urban road construction is changed to ensure the quick and safe running of the automobile. In addition to the many forms of road layout, roads have changed from dirt roads to slate, block, gravel, to asphalt and cement concrete roads to afford heavy vehicular traffic. And various facilities for controlling traffic are provided.
With the rapid development of society, automobiles are more and more, the pressure of urban roads is increased suddenly, and how to slow down the road driving pressure through road monitoring and improve the road driving safety is a social hotspot problem which is urgently solved at present.
Disclosure of Invention
The invention aims to provide a big data analysis processing method and a big data analysis processing system based on a terminal;
the technical problems to be solved by the invention are as follows:
(1) how to provide a big data analysis and processing system capable of relieving the road running pressure;
(2) provided is a big data analysis processing system capable of improving road driving safety.
The purpose of the invention can be realized by the following technical scheme:
the big data analysis processing method and system based on the terminal comprise a processor, wherein the processor is in communication connection with a road condition monitoring module, a road ponding monitoring module, a street lamp monitoring module, a traffic light monitoring module and a storage module;
road ponding monitoring module is used for carrying out the detection and analysis to the ponding condition on road surface, and specific detection and analysis process includes following step:
step S1: acquiring image information of a road surface through a camera, marking the image information as a contrast image, dividing the contrast image into regions i, i is 1, 2, … …, n, obtaining an average gray value of the regions i through an image processing technology, and marking the average gray value of the regions i as HDi;
step S2: acquiring a gray threshold HDmax through a storage module, and comparing the average gray value HDi of the region i with the gray threshold HDmax one by one; if DHi < HDmax, marking the corresponding region as a normal region, and if DHi is more than or equal to HDmax, marking the corresponding region as a concave region;
step S3: the method comprises the steps of shooting an image of the road surface in rainy days, marking the shot image as an analysis image, obtaining a depressed area in the analysis image, segmenting the depressed area in the analysis image through an image segmentation technology, and marking the obtained image of the depressed area as a key image;
step S4: amplifying the key image into a pixel grid image, marking the number of dark pixel grids in the pixel grid image as SX, marking the number of light pixel grids in the pixel grid image as QX, and obtaining the pixel grid image with the SX and the QX according to a formula
Obtaining the depth ratio of the pixel grid image;
step S4: acquiring a depth ratio threshold SQmax of the pixel grid image through a storage module, and comparing the depth ratio of the pixel grid with the depth ratio threshold:
if SQ is less than or equal to SQmax, the corresponding area is judged to be a water accumulation area, the road water accumulation monitoring module marks a sunken area in the analysis image, and sends the marked analysis image and the water supply processing signal to the processor;
if SQ is greater than SQmax, the corresponding area is judged to be a water accumulation free area, and the road water accumulation monitoring module deletes the corresponding analysis image.
Further, the street lamp monitoring module is used for detecting and analyzing the illumination condition of the road at night, and the specific detection and analysis process comprises the following steps:
step B1: dividing a road to be detected into areas v, wherein v is 1, 2 and … … m, acquiring the illumination intensity, the illumination coverage area and the distance between street lamps of the areas v, and respectively marking the illumination intensity, the illumination coverage area and the distance between the street lamps of the areas v as GQv, GFv and JLv;
step B2: by the formula
Obtaining an illumination coefficient ZMv of the region v, wherein each of α 1, α 2 and α 3 is a proportional systemNumber, k is a correction factor;
step B3: obtaining, by the storage module, an illumination coefficient threshold zmin, comparing the illumination coefficient ZMv to the illumination coefficient threshold zmin:
if ZMv is not less than ZMMin, the corresponding area is judged to be a qualified illumination area, and the street lamp monitoring module sends the number of the qualified illumination area and a qualified illumination signal to the processor;
if ZMv < ZMMin, the corresponding area is judged to be an unqualified illumination area, and the street lamp monitoring module sends the serial number of the unqualified illumination area and an unqualified illumination signal to the processor;
step B4: acquiring the accident occurrence frequency of the area with unqualified illumination, marking the accident occurrence frequency of the area with unqualified illumination as CSv, acquiring an accident occurrence frequency threshold value through a storage module, and comparing the accident occurrence frequency of the area with unqualified illumination with the accident occurrence frequency threshold value:
if the accident occurrence frequency CSv of the area with unqualified illumination is smaller than the accident occurrence frequency threshold, marking the corresponding area as a low-risk area, and sending the low-risk signal and the number of the low-risk area to the processor by the street lamp monitoring module;
if the accident occurrence frequency CSv of the area with unqualified illumination is larger than or equal to the accident occurrence frequency threshold, the corresponding area is marked as a high-risk area, and the street lamp monitoring module sends the high-risk signal and the serial number of the high-risk area to the processor.
Further, the road condition monitoring module is used for detecting and analyzing the road vehicle condition, and the specific detection process comprises the following steps:
step P1: dividing a road to be detected into areas o, o being 1, 2, … …, u, acquiring the traffic flow of the area o in L1 minutes, marking the traffic flow of the area o in L1 minutes as LLo, and marking the average driving speed of a vehicle in the area o as SDo;
step P2: by the formula YDo ═ γ 1 × LLo- γ 2 × SDoeObtaining a congestion coefficient YDo of the area o, wherein γ 1 and γ 2 are both proportional coefficients, e is a natural constant, and the value of e is 2.71828;
step P3: obtaining a congestion coefficient threshold value YDmin through a storage module, and comparing the congestion coefficient YDo with the congestion coefficient threshold value YDmin:
if YDo is less than or equal to YDmin, the corresponding area is judged to be a congestion area, and the traffic condition analysis module sends a congestion signal to the processor;
and if YDo is greater than YDmin, judging that the corresponding area is a clear area, and sending a clear signal to the processor by the road condition analysis module.
Further, the traffic light monitoring module is used for detecting and analyzing red road lights of intersections in the congested area, and the specific detection and analysis process comprises the following steps:
step W1: acquiring video information of an intersection in a congestion area, marking the video information of the intersection as an intersection video, decomposing the intersection video into a frame-by-frame image through a video decomposition technology, and marking the obtained image as an intersection image;
step W2: judging the working state of the traffic light through an image processing technology, and if the traffic light works normally, sending a normal traffic light signal to a processor by a traffic light monitoring module for further analysis; if the traffic light works abnormally, the traffic light monitoring module sends a traffic light abnormal signal to the processor;
step W3: respectively marking four intersections in the intersection video as a, b, c and d, respectively counting passing vehicles of the four intersections by setting a counter, and respectively marking the number of the passing vehicles of the four intersections for one minute as CLa, CLb, CLc and CLd;
step W4: by the formula
Obtaining traffic flow coefficients CLx of the intersection, wherein beta 1, beta 2, beta 3 and beta 4 are proportionality coefficients;
step W5: obtaining a traffic flow coefficient threshold value CLmin through a storage module, and comparing the traffic flow coefficient CLx of the intersection with the traffic flow coefficient threshold value CLmin:
if the traffic flow coefficient CLx is smaller than or equal to the traffic flow coefficient threshold CLmin, judging that the lighting and stopping rules of the traffic lights at the intersection are unreasonable, and sending an unreasonable lighting and stopping signal to the processor by the traffic light monitoring module;
and if the traffic flow coefficient CLx is larger than the traffic flow coefficient threshold value CLmin, judging that the traffic light on-off rule of the intersection is reasonable, and sending a light-off reasonable signal to the processor by the traffic light monitoring module.
The big data analysis processing method based on the terminal comprises the following steps:
the method comprises the following steps: acquiring a road surface image, performing image processing on the road surface image to obtain a depressed area on the image surface, amplifying the image of the depressed area to a pixel grid image in rainy days, comparing the depth ratio of the pixel grid image with a depth ratio threshold, and judging the water accumulation condition of the depressed area according to the comparison result;
step two: the illumination intensity, the illumination coverage area and the distance between the street lamps of the street lamps on the road are calculated to obtain the illumination coefficient of the road, and the illumination condition of the street lamps of the road is obtained by comparing the illumination coefficient with the illumination coefficient threshold value;
step three: calculating to obtain a congestion coefficient of a road through the traffic flow on the road and the average running speed of the vehicles, comparing the congestion coefficient of the road with a congestion coefficient threshold value to obtain the congestion condition of the road, and monitoring traffic lights aiming at the congestion area of the road;
step four: and calculating a traffic flow coefficient of the intersection according to the traffic flow of the intersection, comparing the traffic flow coefficient with a traffic flow coefficient threshold value, and judging the rationality of the lighting and stopping rule of the traffic lights of the intersection.
The invention has the following beneficial effects:
1. the road accumulated water monitoring module can be used for segmenting the concave area on the surface of the road, the accumulated water detection is carried out on the concave area in rainy days, and when the accumulated water exists in the concave area, the road accumulated water monitoring module sends the accumulated water area and the image of the accumulated water area to the processor, so that workers can be arranged to process the accumulated water as soon as possible;
2. the street lamp monitoring module can analyze the illumination condition of the road, and after the illumination unqualified area is obtained through analysis, the historical accident frequency of the illumination unqualified area is obtained, so that the danger coefficient of the illumination unqualified area is judged, for the high-risk area, the resource inclination can be carried out during maintenance rectification, the high-risk area is maintained and rectified as soon as possible, and the road driving safety is improved;
3. the congestion condition of the road can be analyzed through the arranged road condition analysis module, the congestion coefficient of the road is obtained by acquiring and calculating the traffic flow of the road and the average running speed of vehicles on the road, the road area with the too high congestion coefficient is marked as a congestion area, and the congestion analysis result of the road can be used for route planning;
4. the working state of the traffic lights in the congestion area is detected and analyzed, meanwhile, the traffic flow of the intersection is calculated to obtain the traffic flow coefficient of the intersection, whether the lighting and stopping rules of the traffic lights are reasonable or not can be judged after the traffic flow coefficient is compared with the traffic flow coefficient threshold, and if the lighting and stopping rules of the traffic lights are unreasonable, the congestion situation of the intersection can be improved by adjusting the lighting and stopping rules of the traffic lights.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic block diagram of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood 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.
As shown in fig. 1, the big data analysis processing method and system based on the terminal comprises a processor, wherein the processor is in communication connection with a road condition monitoring module, a road ponding monitoring module, a street lamp monitoring module, a traffic light monitoring module and a storage module;
road ponding monitoring module is used for carrying out the detection and analysis to the ponding condition on road surface, and specific detection and analysis process includes following step:
step S1: acquiring image information of a road surface through a camera, marking the image information as a contrast image, dividing the contrast image into regions i, i is 1, 2, … …, n, obtaining an average gray value of the regions i through an image processing technology, and marking the average gray value of the regions i as HDi;
step S2: acquiring a gray threshold HDmax through a storage module, and comparing the average gray value HDi of the region i with the gray threshold HDmax one by one; if DHi < HDmax, marking the corresponding region as a normal region, and if DHi is more than or equal to HDmax, marking the corresponding region as a concave region;
step S3: the method comprises the steps of shooting an image of the road surface in rainy days, marking the shot image as an analysis image, obtaining a depressed area in the analysis image, segmenting the depressed area in the analysis image through an image segmentation technology, and marking the obtained image of the depressed area as a key image;
step S4: amplifying the key image into a pixel grid image, marking the number of dark pixel grids in the pixel grid image as SX, marking the number of light pixel grids in the pixel grid image as QX, and obtaining the pixel grid image with the SX and the QX according to a formula
Obtaining the depth ratio of the pixel grid image;
step S4: acquiring a depth ratio threshold SQmax of the pixel grid image through a storage module, and comparing the depth ratio of the pixel grid with the depth ratio threshold:
if SQ is less than or equal to SQmax, the corresponding area is judged to be a water accumulation area, the road water accumulation monitoring module marks a sunken area in the analysis image, and sends the marked analysis image and the water supply processing signal to the processor;
if SQ is greater than SQmax, the corresponding area is judged to be a water accumulation free area, and the road water accumulation monitoring module deletes the corresponding analysis image.
The street lamp monitoring module is used for detecting and analyzing the illumination condition of a road at night, and the specific detection and analysis process comprises the following steps:
step B1: dividing a road to be detected into areas v, wherein v is 1, 2 and … … m, acquiring the illumination intensity, the illumination coverage area and the distance between street lamps of the areas v, and respectively marking the illumination intensity, the illumination coverage area and the distance between the street lamps of the areas v as GQv, GFv and JLv;
step B2: by the formula
Obtaining an illumination coefficient ZMv of the region v, where α 1, α 2, and α 3 are all proportionality coefficients, and k is a correction factor;
step B3: obtaining, by the storage module, an illumination coefficient threshold zmin, comparing the illumination coefficient ZMv to the illumination coefficient threshold zmin:
if ZMv is not less than ZMMin, the corresponding area is judged to be a qualified illumination area, and the street lamp monitoring module sends the number of the qualified illumination area and a qualified illumination signal to the processor;
if ZMv < ZMMin, the corresponding area is judged to be an unqualified illumination area, and the street lamp monitoring module sends the serial number of the unqualified illumination area and an unqualified illumination signal to the processor;
step B4: acquiring the accident occurrence frequency of the area with unqualified illumination, marking the accident occurrence frequency of the area with unqualified illumination as CSv, acquiring an accident occurrence frequency threshold value through a storage module, and comparing the accident occurrence frequency of the area with unqualified illumination with the accident occurrence frequency threshold value:
if the accident occurrence frequency CSv of the area with unqualified illumination is smaller than the accident occurrence frequency threshold, marking the corresponding area as a low-risk area, and sending the low-risk signal and the number of the low-risk area to the processor by the street lamp monitoring module;
if the accident occurrence frequency CSv of the area with unqualified illumination is larger than or equal to the accident occurrence frequency threshold, the corresponding area is marked as a high-risk area, and the street lamp monitoring module sends the high-risk signal and the serial number of the high-risk area to the processor.
The road condition monitoring module is used for detecting and analyzing the road vehicle condition, and the specific detection process comprises the following steps:
step P1: dividing a road to be detected into areas o, o being 1, 2, … …, u, acquiring the traffic flow of the area o in L1 minutes, marking the traffic flow of the area o in L1 minutes as LLo, and marking the average driving speed of a vehicle in the area o as SDo;
step P2: by the formula YDo ═ γ 1 × LLo- γ 2 × SDoeObtaining a congestion coefficient YDo of the area o, wherein γ 1 and γ 2 are both proportional coefficients, e is a natural constant, and the value of e is 2.71828;
step P3: obtaining a congestion coefficient threshold value YDmin through a storage module, and comparing the congestion coefficient YDo with the congestion coefficient threshold value YDmin:
if YDo is less than or equal to YDmin, the corresponding area is judged to be a congestion area, and the traffic condition analysis module sends a congestion signal to the processor;
and if YDo is greater than YDmin, judging that the corresponding area is a clear area, and sending a clear signal to the processor by the road condition analysis module.
The traffic light monitoring module is used for detecting and analyzing red road lights of intersections in congested areas, and the specific detection and analysis process comprises the following steps:
step W1: acquiring video information of an intersection in a congestion area, marking the video information of the intersection as an intersection video, decomposing the intersection video into a frame-by-frame image through a video decomposition technology, and marking the obtained image as an intersection image;
step W2: judging the working state of the traffic light through an image processing technology, and if the traffic light works normally, sending a normal traffic light signal to a processor by a traffic light monitoring module for further analysis; if the traffic light works abnormally, the traffic light monitoring module sends a traffic light abnormal signal to the processor;
step W3: respectively marking four intersections in the intersection video as a, b, c and d, respectively counting passing vehicles of the four intersections by setting a counter, and respectively marking the number of the passing vehicles of the four intersections for one minute as CLa, CLb, CLc and CLd;
step W4: by the formula
Obtaining traffic flow coefficients CLx of the intersection, wherein beta 1, beta 2, beta 3 and beta 4 are proportionality coefficients;
step W5: obtaining a traffic flow coefficient threshold value CLmin through a storage module, and comparing the traffic flow coefficient CLx of the intersection with the traffic flow coefficient threshold value CLmin:
if the traffic flow coefficient CLx is smaller than or equal to the traffic flow coefficient threshold CLmin, judging that the lighting and stopping rules of the traffic lights at the intersection are unreasonable, and sending an unreasonable lighting and stopping signal to the processor by the traffic light monitoring module;
and if the traffic flow coefficient CLx is larger than the traffic flow coefficient threshold value CLmin, judging that the traffic light on-off rule of the intersection is reasonable, and sending a light-off reasonable signal to the processor by the traffic light monitoring module.
The big data analysis processing method based on the terminal comprises the following steps:
the method comprises the following steps: acquiring a road surface image, performing image processing on the road surface image to obtain a depressed area on the image surface, amplifying the image of the depressed area to a pixel grid image in rainy days, comparing the depth ratio of the pixel grid image with a depth ratio threshold, and judging the water accumulation condition of the depressed area according to the comparison result;
step two: the illumination intensity, the illumination coverage area and the distance between the street lamps of the street lamps on the road are calculated to obtain the illumination coefficient of the road, and the illumination condition of the street lamps of the road is obtained by comparing the illumination coefficient with the illumination coefficient threshold value;
step three: calculating to obtain a congestion coefficient of a road through the traffic flow on the road and the average running speed of the vehicles, comparing the congestion coefficient of the road with a congestion coefficient threshold value to obtain the congestion condition of the road, and monitoring traffic lights aiming at the congestion area of the road;
step four: and calculating a traffic flow coefficient of the intersection according to the traffic flow of the intersection, comparing the traffic flow coefficient with a traffic flow coefficient threshold value, and judging the rationality of the lighting and stopping rule of the traffic lights of the intersection.
The method and the system for analyzing and processing the big data based on the terminal acquire a road surface image, perform image processing on the road surface image to obtain a depressed area on the surface of the image, amplify the image of the depressed area to a pixel grid image in rainy days, compare the depth ratio of the pixel grid image with a depth ratio threshold value, and judge the water accumulation condition of the depressed area according to the comparison result; the illumination intensity, the illumination coverage area and the distance between the street lamps of the street lamps on the road are calculated to obtain the illumination coefficient of the road, and the illumination condition of the street lamps of the road is obtained by comparing the illumination coefficient with the illumination coefficient threshold value; calculating to obtain a congestion coefficient of a road through the traffic flow on the road and the average running speed of the vehicles, comparing the congestion coefficient of the road with a congestion coefficient threshold value to obtain the congestion condition of the road, and monitoring traffic lights aiming at the congestion area of the road; and calculating a traffic flow coefficient of the intersection according to the traffic flow of the intersection, comparing the traffic flow coefficient with a traffic flow coefficient threshold value, and judging the rationality of the lighting and stopping rule of the traffic lights of the intersection.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.
The above formulas are all numerical values obtained by normalization processing, the formula is a formula obtained by acquiring a large amount of data and performing software simulation to obtain the latest real situation, and the preset parameters in the formula are set by the technical personnel in the field according to the actual situation.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The specific meanings of the above terms in the present invention can be understood in specific cases by those skilled in the art; the preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.