Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a system for generating a violation message of a large truck, so as to solve the problem that the violation message of the large truck is difficult to generate in time in the prior art, so that the supervision effect of the large truck is not ideal.
In a first aspect, an embodiment of the present invention provides a method for generating a violation message of a large truck, including:
the method comprises the steps that a vehicle-mounted terminal obtains a current position coordinate and detects whether the current position coordinate is in a highway or not;
if the current position coordinate is in the highway, judging whether the current lane is the left lane of the highway or not;
if the current lane is the left lane of the expressway, triggering a shooting instruction, acquiring vehicle images shot by a camera group towards an area right in front of a windshield and shooting time of the vehicle images by utilizing the shooting instruction, and identifying license plate numbers of the vehicle images;
in a preset storage area, acquiring a pre-stored large truck license plate number of the province, and matching the license plate number with the large truck license plate number of the province;
if the license plate number is successfully matched with the license plate number of the large truck in the province, identifying the license plate number of the large truck in the province as the license plate number of the large truck in the province;
packaging a preset large truck violation label, the large truck license plate number, the shooting time and the position coordinate to generate a large truck violation message;
and establishing a corresponding relation between the large truck violation message and the large truck violation video, and uploading the large truck violation message, the large truck violation video and the corresponding relation to a preset management server.
Preferably, if the current position coordinate is located in an expressway, determining whether a current lane is a left lane of the expressway, specifically:
and if the current position coordinate is in the expressway, acquiring a road image of the expressway, carrying out lane recognition on the road image, judging that the current lane is the left lane of the expressway if the lane is recognized as the left lane, and judging that the current lane is not the left lane of the expressway if the lane is recognized as the middle lane or the right lane.
Preferably, if the current position coordinate is located in an expressway, determining whether a current lane is a left lane of the expressway, specifically:
if the current position coordinate is in the highway, acquiring an image of the left side of the vehicle body through a side-viewing camera arranged on a left rearview mirror, identifying whether a moving object exists in the image of the left side of the vehicle body by utilizing a background difference method, and meanwhile, acquiring the distance between the vehicle body and a left side rail through a distance sensor arranged on an outer handle of a left vehicle door, if the image of the left side of the vehicle body does not exist the moving object and the mean value of the distance between the vehicle body and the left side rail is smaller than a preset distance within a preset time, judging that the current lane is the left lane of the highway, and if the image of the left side of the vehicle body exists the moving object or the mean value of the distance between the vehicle body and the left side rail is not smaller than the preset distance within the preset time, judging that the current lane is not the left lane of the highway.
Preferably, if the current lane is the left lane of the expressway, a shooting instruction is triggered, and by using the shooting instruction, vehicle images shot by a camera group towards an area right in front of a windshield and shooting time of the vehicle images are acquired, and license plate numbers of the vehicle images are identified, specifically:
if the current lane is the left lane of the expressway, the current speed is obtained, whether the current speed is lower than the minimum driving speed required by the left lane of the expressway is judged, if the current speed is lower than the minimum driving speed required by the left lane of the expressway, the shooting instruction is utilized to obtain the vehicle images shot by the shooting group towards the area right in front of the windshield and the shooting time of the vehicle images, and the license plate number of the vehicle images is identified.
The method comprises the following steps of packaging a preset large truck violation label, a large truck license plate number, shooting time and the position coordinate to generate a large truck violation message, and specifically comprises the following steps:
acquiring an image frame rate, multiplying the image frame rate by preset time to obtain the number of frames of the vehicle image acquired within the preset time, acquiring the number of times of identifying the license plate number of the large truck of the province within the preset time, generating a model according to a preset truck identification reliability coefficient, the number of the acquired vehicle image and the number of times of identifying the license plate number of the large truck of the province, generating a truck identification reliability coefficient for identifying the license plate number of the large truck of the province, and packaging a preset large truck violation label, the license plate number of the large truck, shooting time and the position coordinate to generate a large truck violation message when the truck identification reliability coefficient is greater than the preset value;
the truck identification reliability coefficient generation model specifically comprises the following steps:
wherein V is a truck identification reliability coefficient and consists of an identification rate and an identification coefficient,
for the identification rate, Ni represents the number of times of identifying the license plate number of the large truck of the province within the preset time, and Frames represents the number of Frames of the acquired vehicle image within the preset time;
for the identification coefficient, No represents a preset number of identifications; 0<a<1、0<b<The size of 1, a + b is 1, and the weight ratio of the identification rate and the identification coefficient in the truck identification reliability coefficient is determined by the size of a and b.
Preferably, the position coordinate is a GPS coordinate or a beidou coordinate, the large Truck violation label is composed of a first character string and a second character string, the first character string is 0x1906, and the second character string is Truck.
In a second aspect, an embodiment of the present invention provides a system for generating a large truck violation message, including:
the system comprises a position coordinate acquisition module, a position coordinate acquisition module and a position coordinate detection module, wherein the position coordinate acquisition module is used for acquiring a current position coordinate and detecting whether the current position coordinate is in a highway or not;
the left lane judging module is used for judging whether the current lane is the left lane of the expressway or not if the current position coordinate is in the expressway;
the license plate number identification module is used for triggering a shooting instruction if the current lane is the left lane of the expressway, acquiring a vehicle image shot by a camera group towards an area right in front of a windshield and the shooting time of the vehicle image by utilizing the shooting instruction, and identifying the license plate number of the vehicle image;
the large truck license plate matching module is used for acquiring a pre-stored large truck license plate number of the province in a preset storage area and matching the license plate number with the large truck license plate number of the province;
the large truck license plate number identification module is used for identifying that the license plate number is the license plate number of the large truck in the province if the license plate number is successfully matched with the license plate number of the large truck in the province;
the large truck violation message generating module is used for packaging a preset large truck violation label, the large truck license plate number, the shooting time and the position coordinate to generate a large truck violation message;
and the large truck violation message uploading module is used for establishing a corresponding relation between the large truck violation message and the large truck violation video and uploading the large truck violation message, the large truck violation video and the corresponding relation to a preset management server.
Preferably, the left lane determining module is specifically configured to:
and if the current position coordinate is in the expressway, acquiring a road image of the expressway, carrying out lane recognition on the road image, judging that the current lane is the left lane of the expressway if the lane is recognized as the left lane, and judging that the current lane is not the left lane of the expressway if the lane is recognized as the middle lane or the right lane.
Preferably, the left lane determining module is specifically configured to:
if the current position coordinate is in the highway, acquiring an image of the left side of the vehicle body through a side-viewing camera arranged on a left rearview mirror, identifying whether a moving object exists in the image of the left side of the vehicle body by utilizing a background difference method, and meanwhile, acquiring the distance between the vehicle body and a left side rail through a distance sensor arranged on an outer handle of a left vehicle door, if the image of the left side of the vehicle body does not exist the moving object and the mean value of the distance between the vehicle body and the left side rail is smaller than a preset distance within a preset time, judging that the current lane is the left lane of the highway, and if the image of the left side of the vehicle body exists the moving object or the mean value of the distance between the vehicle body and the left side rail is not smaller than the preset distance within the preset time, judging that the current lane is not the left lane of the highway.
Preferably, the large truck license plate number identification module is specifically configured to: if the current lane is the left lane of the expressway, the current speed is obtained, whether the current speed is lower than the minimum driving speed required by the left lane of the expressway is judged, if the current speed is lower than the minimum driving speed required by the left lane of the expressway, the shooting instruction is utilized to obtain the vehicle images shot by the shooting group towards the area right in front of the windshield and the shooting time of the vehicle images, and the license plate number of the vehicle images is identified.
Preferably, the large truck violation message generating module is specifically configured to: acquiring an image frame rate, multiplying the image frame rate by preset time to obtain the number of frames of the vehicle image acquired within the preset time, acquiring the number of times of identifying the license plate number of the large truck of the province within the preset time, generating a model according to a preset truck identification reliability coefficient, the number of the acquired vehicle image and the number of times of identifying the license plate number of the large truck of the province, generating a truck identification reliability coefficient for identifying the license plate number of the large truck of the province, and packaging a preset large truck violation label, the license plate number of the large truck, shooting time and the position coordinate to generate a large truck violation message when the truck identification reliability coefficient is greater than the preset value;
the truck identification reliability coefficient generation model specifically comprises the following steps:
wherein V is a truck identification reliability coefficient and consists of an identification rate and an identification coefficient,
for the identification rate, Ni represents the number of times of identifying the license plate number of the large truck of the province within the preset time, and Frames represents the number of Frames of the acquired vehicle image within the preset time;
for the identification coefficient, No represents a preset number of identifications; 0<a<1、0<b<The size of 1, a + b is 1, and the weight ratio of the identification rate and the identification coefficient in the truck identification reliability coefficient is determined by the size of a and b.
Compared with the prior art, the method and the system for generating the violation messages of the large trucks solve the problem that the violation messages of the large trucks are difficult to generate in time and the supervision effect of the large trucks is not ideal in the prior art.
Detailed Description
Referring to fig. 1, fig. 1 is a flowchart of an implementation of a method for generating a violation message of a large truck according to an embodiment of the present invention, where the method is applied to a terminal, and the method for generating a violation message of a large truck shown in fig. 1 may include the following steps:
s101, a vehicle-mounted terminal acquires a current position coordinate and detects whether the current position coordinate is in a highway or not;
the vehicle-mounted terminal is front-end equipment of the vehicle body monitoring and management system, is connected with the camera group, is arranged in a vehicle and is a vehicle event data recorder and a mobile phone.
S102, if the current position coordinate is in the expressway, judging whether a current lane is a left lane of the expressway;
wherein, S102 has two implementation manners, which are detailed as follows:
in a first implementation manner, if the current position coordinate is in a highway, a road image of the highway is acquired, lane recognition is performed on the road image, if the lane is recognized as a left lane, the current lane is judged to be the left lane of the highway, and if the lane is recognized as a middle lane or a right lane, the current lane is judged not to be the left lane of the highway.
The lane recognition algorithm is the prior art, and is not described herein.
In a second implementation manner, if the current position coordinate is in the highway, acquiring an image of the left side of the vehicle body through a side view camera installed on a left rearview mirror, identifying whether a moving object exists in the image of the left side of the vehicle body by using a background difference method, and meanwhile acquiring the distance between the vehicle body and a left side rail through a distance sensor installed on an outer handle of a left vehicle door, if the image of the left side of the vehicle body does not exist a moving object and the mean value of the distance between the vehicle body and the left side rail is smaller than a preset distance within a preset time, determining that the current lane is the left lane of the highway, and if the image of the left side of the vehicle body exists a moving object or the mean value of the distance between the vehicle body and the left side rail is not smaller than a preset distance within a preset time, determining that the current lane is not the left lane of the highway.
The preset time and the preset distance are set by the user or default of the system, and are not limited herein.
If no moving object exists in the image of the left side of the vehicle body within the preset time and the average value of the distances between the vehicle body and the left side rail is smaller than the preset distance, the fact that the vehicle body of the vehicle body is close to the left side rail and is located in a left lane of the expressway is shown.
Wherein, preferably, the preset distance is 1.95 meters, and the preset time is 10 seconds. The preset focal length is 2.6 mm. Because the lane of highway is generally 3.75 meters, the dolly width is about 1.80 meters, the big car width is about 2.50 meters, the focal length of mobile unit automatically regulated looks at the camera and is 2.6 millimeters, can control the shooting range that looks at the camera and cover the lane of automobile body left side 1.95 meters, in this way, just can acquire and acquire the image on the left of the automobile body.
S103, if the current lane is the left lane of the expressway, triggering a shooting instruction, acquiring vehicle images shot by a camera group towards an area right in front of a windshield and shooting time of the vehicle images by using the shooting instruction, and identifying license plate numbers of the vehicle images;
if the current lane is the left lane of the expressway, the current speed is obtained, whether the current speed is lower than the minimum driving speed required by the left lane of the expressway is judged, if the current speed is lower than the minimum driving speed required by the left lane of the expressway, the shooting instruction is utilized to obtain vehicle images shot by a shooting group towards an area right in front of a windshield and the shooting time of the vehicle images, whether the color of the license plate of the vehicle image is yellow is identified, and if the license plate of the vehicle image is yellow, the license plate number of the vehicle image is identified.
The large truck and the small truck can be directly distinguished by using license plate recognition software to detect the color of the license plate, and license plate number recognition is carried out after the large truck is distinguished, so that the beneficial effects are that: the license plate number of the non-large truck does not need to be identified, and the data for identifying the license plate number of the non-large truck is reduced, so that the data volume processed by the vehicle-mounted terminal can be greatly reduced.
If the current vehicle speed is lower than the minimum driving speed required by the left lane of the expressway, the fact that an obstacle exists in front is indicated, therefore, the current driving state is determined by judging the current vehicle speed of the vehicle body, and preparation is made for identifying license plates.
S104, in a preset storage area, obtaining a pre-stored large truck license plate number of the province, and matching the license plate number with the large truck license plate number of the province;
compared with the large truck license plate number stored in the country, the pre-stored large truck license plate number in the province can greatly reduce the time required for matching and effectively improve the matching efficiency of the large truck license plate number.
S105, if the license plate number is successfully matched with the license plate number of the large truck in the province, identifying the license plate number of the large truck in the province as the license plate number of the large truck in the province;
s106, packaging a preset large truck violation label, the license plate number of the large truck, the shooting time and the position coordinate to generate a large truck violation message;
wherein, S106 specifically is:
acquiring an image frame rate, multiplying the image frame rate by preset time to obtain the number of frames of the vehicle image acquired within the preset time, acquiring the number of times of identifying the license plate number of the large truck of the province within the preset time, generating a model according to a preset truck identification reliability coefficient, the number of the acquired vehicle image and the number of times of identifying the license plate number of the large truck of the province, generating a truck identification reliability coefficient for identifying the license plate number of the large truck of the province, and packaging a preset large truck violation label, the license plate number of the large truck, shooting time and the position coordinate to generate a large truck violation message when the truck identification reliability coefficient is greater than the preset value;
the truck identification reliability coefficient generation model specifically comprises the following steps:
wherein V is a truck identification reliability coefficient and consists of an identification rate and an identification coefficient,
for the identification rate, Ni represents the number of times of identifying the license plate number of the large truck of the province within the preset time, and Frames represents the number of Frames of the acquired vehicle image within the preset time;
for the identification coefficient, No represents a preset number of identifications; 0<a<1、0<b<The size of 1, a + b is 1, and the weight ratio of the identification rate and the identification coefficient in the truck identification reliability coefficient is determined by the size of a and b.
The truck identification reliability coefficient is used for describing the reliability of identifying the license plate number of the large truck of the province, the truck identification reliability coefficient is higher and more reliable, and otherwise, the truck identification reliability coefficient is lower and more unreliable.
The identification rate and the identification coefficient are larger, the truck identification reliability coefficient is higher, and therefore error identification can be effectively avoided, the license plate number of the large truck of the province is correct, and the generated violation message of the large truck is more reliable.
The preset value and the preset time are set by the user or default by the system, and are not limited herein.
The position coordinate is a GPS coordinate or a Beidou coordinate, the large Truck violation label is composed of a first character string and a second character string, the first character string is 0x1906, and the second character string is Truck.
The large truck violation label is stored in a fixed position of the large truck violation message and used for informing the management server that the license plate number, the shooting time and the position coordinate of the large truck are behind the large truck violation label.
S107, establishing a corresponding relation between the large truck violation message and the large truck violation video, and uploading the large truck violation message, the large truck violation video and the corresponding relation to a preset management server.
It should be noted that the management server obtains factory-set automatic scanning parameters, the automatic scanning parameters comprise a time interval and an information interface, the time interval is extracted from the automatic scanning parameters, a timer generates a scanning instruction of the information interface according to the time interval, whether data uploaded by a vehicle-mounted terminal exists in the information interface is scanned according to the scanning instruction, when the data uploaded by the vehicle-mounted terminal exists in the information interface, the data uploaded by the vehicle-mounted terminal is processed through Deep Packet Inspection (DPI) technology, so that the large truck violation message, the large truck violation video and the corresponding relation are obtained, then the large truck violation message is transmitted to a decision interface by the information interface for processing, then the decision interface transmits the large truck violation message to an LED display screen on a highway with the position coordinate according to the position coordinate in the large truck violation message, to alert the driver of the vehicle driving the large truck license plate number. Therefore, the violation information of the large truck can be obtained in time, and the driver driving the large truck license plate can be reminded in time.
And establishing a corresponding relation between the large truck violation message and the large truck violation video, and uploading the large truck violation message, the large truck violation video and the corresponding relation to a preset management server by adopting a 4G network mode or a 5G network mode.
In the embodiment of the invention, the preset violation label of the large truck, the license plate number of the large truck, the shooting time and the position coordinate are packaged to generate the violation message of the large truck, so that the violation message of the large truck can be generated in time, evidence is provided for the violation judgment of the large truck, and the monitoring effect of the large truck is improved.
Referring to fig. 2, fig. 2 is a block diagram of a large truck violation message generating system according to an embodiment of the present invention, where the large truck violation message generating system includes:
a position coordinate obtaining module 21, configured to obtain a current position coordinate, and detect whether the current position coordinate is located in a highway;
a left lane determining module 22, configured to determine whether the current lane is a left lane of the highway if the current position coordinate is located in the highway;
the license plate number identification module 23 is configured to trigger a shooting instruction if the current lane is the left lane of the highway, acquire, by using the shooting instruction, a vehicle image shot by a camera group toward an area right in front of a windshield and shooting time of the vehicle image, and identify a license plate number of the vehicle image;
the large truck license plate number matching module 24 is used for acquiring a pre-stored large truck license plate number of the province in a preset storage area and matching the license plate number with the license plate number of the large truck of the province;
a large truck license plate number identification module 25, configured to identify that the license plate number is a large truck license plate number of the province if the license plate number is successfully matched with the license plate number of the local province;
the large truck violation message generating module 26 is configured to encapsulate a preset large truck violation label, the large truck license plate number, the shooting time and the position coordinate to generate a large truck violation message;
and the large truck violation message uploading module 27 is used for establishing a corresponding relationship between the large truck violation message and the large truck violation video, and uploading the large truck violation message, the large truck violation video and the corresponding relationship to a preset management server.
In the embodiment of the invention, the preset violation label of the large truck, the license plate number of the large truck, the shooting time and the position coordinate are packaged to generate the violation message of the large truck, so that the violation message of the large truck can be generated in time, evidence is provided for the violation judgment of the large truck, and the monitoring effect of the large truck is improved.
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.