Vehicle congestion analysis method, system, terminal and storage medium based on video structuringTechnical Field
The invention relates to the technical field of road monitoring, in particular to a vehicle congestion analysis method, a vehicle congestion analysis system, a vehicle congestion analysis terminal and a storage medium based on video structuring.
Background
With the acceleration of the pace of urban construction and economic construction in China, the living standard of people is generally improved, the quantity of motor vehicles kept is rapidly increased, and the construction of road traffic infrastructures is far from meeting the rapidly-increasing traffic demand. Due to the convenience of automobiles, the traffic flow in urban areas is increasing day by day, and the traffic flow of commuting, traveling and shopping is rushed into the city center from all sides every peak time. However, the large disadvantage of the automobile is that the space is wasted, but the number of the automobiles is increased continuously, so that the existing road cannot load the traffic flow with the large amount, and the situation of blockage is caused.
The urban traffic problem is caused by multiple levels, and has several levels of urban function positioning, urban land layout, urban traffic planning, urban traffic management and the like. Therefore, the accurate real-time road condition analysis system can help people to better get a route for avoiding congestion during traveling, and the purposes of saving time and labor are achieved.
Disclosure of Invention
The technical problem to be solved by the invention is how to accurately provide a vehicle congestion analysis method, a vehicle congestion analysis system, a vehicle congestion analysis terminal and a vehicle congestion analysis storage medium in real time, and timely remind a user of avoiding a congested road section.
In order to solve the above problems, the present invention proposes the following technical solutions:
in a first aspect, an embodiment of the present invention provides a road congestion analysis method based on video structuring, including the following steps:
acquiring real-time videos of at least two adjacent intersections of a non-intersection road section;
respectively decoding the real-time videos, respectively extracting structural information of the vehicles in the real-time videos by using a structural recognition algorithm, and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decorative articles;
respectively saving the vehicle picture and the structural information;
acquiring a preset time period, wherein the total quantity of the structural information stored at each non-intersection is used as the quantity of the automobiles passing through each intersection;
judging whether the difference value of the number of automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
The further technical scheme is that the method further comprises the following steps:
acquiring real-time videos of all road junctions of a junction road section;
acquiring a preset time period, wherein the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section;
taking one road junction of the intersection section as a reference road junction, taking other road junctions of the intersection section as comparison road junctions, obtaining the difference value of the number of automobiles between the reference road junction and each comparison road junction, and taking the difference value with the minimum numerical value as a target difference value;
and judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection section at the comparison intersection corresponding to the target difference value.
The further technical scheme is that the method further comprises the following steps:
and identifying the road sections which are determined to have the traffic jam.
In a second aspect, the embodiment of the present invention further provides a video-structure-based road congestion analysis system, including a unit for executing the video-structure-based road congestion analysis method according to the first aspect.
The further technical scheme is as follows:
the first acquisition unit is used for acquiring a real-time video of an intersection of a non-intersection road section;
the extraction unit is used for respectively decoding the real-time videos, respectively extracting the structural information of the vehicles in the real-time videos by using a structural identification algorithm and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decorative articles;
the storage unit is used for respectively storing the vehicle picture and the structured information;
the second acquisition unit is used for acquiring the total quantity of the structural information stored at each non-intersection as the quantity of the automobiles passing through each intersection in a preset time period;
the judging unit is used for judging whether the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
The further technical scheme is that the method further comprises the following steps:
the third acquisition unit is used for acquiring real-time videos of all road junctions of the intersection road sections;
the fourth acquisition unit is used for acquiring a preset time period, and the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section;
a fifth obtaining unit, configured to obtain a difference between the number of cars at the reference intersection and each comparison intersection, using an intersection of the intersection as a reference intersection, and using the other intersections of the intersection as comparison intersections, and using the difference with the smallest value as a target difference;
and the second judgment unit is used for judging whether the target difference value is smaller than a second preset threshold value or not, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection road section at the comparison intersection corresponding to the target difference value.
The further technical scheme is that the method further comprises the following steps:
and the identification unit identifies the road section which is judged to have the traffic jam.
In a third aspect, an embodiment of the present invention provides a terminal, where the terminal includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is configured to store application program codes that support the terminal to execute the method according to the first aspect, and the processor is configured to execute the method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method according to the first aspect.
Compared with the prior art, the invention can achieve the following technical effects: the method is simple and accurate, the number of vehicles passing through the intersection can be obtained by performing video structural analysis on real-time videos of the intersection, and the difference value of the number of the vehicles obtained by adjacent intersections is compared within a preset time interval so as to judge the congestion condition of the road. According to the road congestion analysis system based on video structuralization, the shot real-time video is further structurally analyzed by using the road monitoring camera, so that the number of vehicles passing through the intersection is obtained, the congestion condition of the road is judged, the road condition information is sent to a user, the user can select the smooth road to run in time, and the user experience is improved. The system provided by the invention is simple in equipment and convenient to implement.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of vehicle picture and structured information acquisition provided by an embodiment of the present invention;
fig. 2 is a schematic diagram of a road congestion analysis system based on video structuring according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a terminal 300 according to another embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating a process of determining a road condition according to the acquired vehicle picture and the structured information.
Detailed Description
The technical solutions in the embodiments will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, wherein like reference numerals represent like elements in the drawings. It is apparent that the embodiments to be described below are only a part of the embodiments of the present invention, and not all of them. 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.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the description of embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Example 1
Referring to fig. 1, a schematic view of a vehicle picture and a structural information acquisition process according to an embodiment of the present invention is shown. In a first aspect, an embodiment of the present invention provides a road congestion analysis method based on video structuring, including the following steps:
s101, acquiring real-time videos of at least two adjacent intersections of a non-intersection road section;
in specific implementation, a road on which a vehicle runs is in a four-way reach mode, and the road is divided into a junction road section and a non-junction road section according to whether the road is intersected with other roads or not. The non-intersection road section is a road section which is not intersected with other roads and can uniquely determine the driving direction of the vehicle; the intersection road section is a road where the vehicle runs and other roads are intersected, and the vehicle running direction has multiple possible road sections.
The road section on which traffic congestion occurs is generally a road section at an entrance or a narrow lane intersection of a road. The existing road access and road middle areas are provided with monitoring cameras and used for capturing illegal behaviors such as speeding, running red light, not fastening safety belts and the like, so that the embodiment of the invention can fully exert the value of the existing road monitoring system, a common camera in the existing monitoring system is used for acquiring real-time videos of the road junction, and the common camera cannot be embedded with software and is used for executing functions of photographing and shooting videos.
In one embodiment, the real-time video of each intersection can be acquired by installing an intelligent camera of embedded software.
In one embodiment, a common camera may be used in combination with a smart camera to obtain real-time video of each road intersection.
S102, respectively decoding the real-time videos, respectively extracting structural information of the vehicles in the real-time videos by using a structural recognition algorithm, and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decoration articles;
in specific implementation, the obtained real-time video is decoded and analyzed, each frame is analyzed by using a structured recognition algorithm, and vehicle structured information in the video is extracted, wherein the structured information comprises one or more of a vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decoration article.
It should be noted that, in order to facilitate later information analysis and tracking, a passing vehicle needs to be intercepted, and according to license plate information and a vehicle type obtained through analysis, an intercepted vehicle picture corresponds to structural information of the vehicle.
It should be noted that, in this embodiment, the obtained real-time video may utilize an existing structured recognition algorithm to perform recognition and extraction of vehicle information, identify a vehicle through a pre-trained vehicle classifier, obtain a motion direction of the vehicle by marking vehicle position information in each frame of picture, identify a type and a body color of the vehicle, classify a vehicle target in each frame of picture according to a vehicle type and a body color of the vehicle, and mark areas such as a brand, a sub-brand (a car logo), a vehicle annual inspection logo, and a vehicle decoration article of the vehicle. Among them, the type of vehicle, for example, a truck, a passenger car, a car, etc. Many existing intelligent algorithms can extract the structural information of the vehicle, and the invention is not specifically described here.
S103, respectively storing the vehicle picture and the structured information;
in specific implementation, the vehicle picture URL is returned when the vehicle picture is maintained, and the vehicle picture URL is used for one-to-one correspondence with the structural information of the vehicle, so that the corresponding vehicle picture can be conveniently searched according to the structural information.
The stored vehicle pictures and the structural information can be further used for functions of public security case handling, violation snapshot, vehicle speed calculation and the like, and real-time traffic road conditions can be predicted.
Therefore, the vehicle pictures and the structural information of the non-intersection intersections are obtained, and the traffic road conditions are judged by further analyzing the obtained vehicle condition information of the non-intersection intersections, so that the real-time road conditions are fed back to the user, and travel suggestions are provided.
Referring to fig. 4, it is a schematic flow chart of determining a road condition according to the acquired vehicle picture and the structured information.
S104, acquiring the total quantity of the structural information stored at each non-intersection as the quantity of the automobiles passing through each intersection in a preset time period;
in specific implementation, every time a vehicle appears in a real-time video, screenshot of the vehicle and extraction of vehicle structural information are carried out, so that the total number of passing vehicles can be obtained by obtaining the total number of the stored structural information. In specific implementation, each structural information is kept to have a corresponding script, the total quantity of the kept structural information can be obtained by counting the quantity of the scripts, and each structural information comprises one or more of a vehicle motion direction, license plate information, a vehicle color, a vehicle type, a brand, a sub-brand, a vehicle annual inspection mark and a vehicle decoration article.
In one embodiment, the total number of passing vehicles may also be known by obtaining the total number of vehicle screenshots.
It should be noted that the preset time period is set to be long enough to eliminate statistical errors in short-time road congestion. In certain embodiments, the predetermined period of time is 4 hours, 6-60 hours.
For example, in one embodiment, the predetermined period is 24 hours.
In one embodiment, the predetermined period is 12 hours.
In one embodiment, the predetermined period of time is 48 hours.
The setting of the specific preset time period needs to refer to traffic flow conditions of different roads, so that a person skilled in the art can determine the statistical time period length according to the conditions of different roads under the concept of the present invention, which is not limited by the present invention.
S105, judging whether the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
It should be noted that, when the road is clear, the number of vehicles passing through one intersection of the non-intersection road section is substantially equal to the number of vehicles passing through the intersection adjacent to the intersection. Therefore, if the difference between the number of vehicles passing through the intersection and the number of vehicles passing through the adjacent intersection is too large, it can be determined that traffic jam occurs on the non-intersection section between the intersection and the adjacent intersection, and the vehicles cannot smoothly pass through the non-intersection section.
Therefore, whether congestion occurs in the intersection section can be judged by judging whether the difference value of the number of automobiles at the adjacent intersection of the non-intersection section is larger than a first preset threshold value. The first preset threshold is a numerical value specifically set by a technician according to road sections (suburb, city center, high speed) and time periods (morning and evening rush hour of working day, weekend) of different areas, and the invention is not particularly limited thereto.
In specific implementation, the difference value of the number of automobiles at the adjacent intersection of the non-junction road section is greater than a first preset threshold value, which indicates that the vehicles in the section are slow to run, and then the road of the non-junction road section is judged to have traffic jam. And a large number of vehicles can be converged, so that the user can be reminded to bypass to run and walk the most smooth route, and the road where a large number of vehicles are converged is shunted, so that the traffic jam condition is relieved.
On the contrary, if the difference value of the number of the automobiles at the adjacent road junctions on the same road is smaller than the first preset threshold value, the road section is judged to be smooth, and the user can be recommended to drive.
In another embodiment, the method further comprises:
s106, acquiring a real-time video of each intersection of the intersection section; and extracts the vehicle picture and the structured information for the real-time video in steps S102-S103.
In specific implementation, the intersection road section is a road where the vehicle runs and other roads are intersected, the vehicle running direction has multiple possible road sections, and the road condition of the intersection road section is complex.
The embodiment of the invention can fully exert the value of the existing road monitoring system, and utilizes the common camera in the existing monitoring system to acquire the real-time video of the intersection, wherein the common camera can not be embedded with software and is used for executing the functions of photographing and video shooting.
In one embodiment, the real-time video of the intersection can be acquired through an intelligent camera provided with embedded software, and the intelligent camera can process the acquired real-time video in real time by utilizing the embedded software.
In one embodiment, a common camera may be combined with a smart camera to obtain real-time video of the road intersection.
S107, acquiring a preset time period, wherein the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section;
in specific implementation, every time a vehicle appears in a real-time video, screenshot of the vehicle and extraction of vehicle structural information are carried out, so that the total number of passing vehicles can be obtained by obtaining the total number of the stored structural information. In specific implementation, each structural information is kept to have a corresponding script, the total quantity of the kept structural information can be obtained by counting the quantity of the scripts, and each structural information comprises one or more of a vehicle motion direction, license plate information, a vehicle color, a vehicle type, a brand, a sub-brand, a vehicle annual inspection mark and a vehicle decoration article.
In one embodiment, the total number of passing vehicles may also be known by obtaining the total number of vehicle screenshots.
It should be noted that the preset time period is set to be long enough to eliminate statistical errors in short-time road congestion. In certain embodiments, the predetermined period of time is 4 hours, 6-60 hours.
For example, in one embodiment, the predetermined period is 24 hours.
In one embodiment, the predetermined period is 12 hours.
In one embodiment, the predetermined period of time is 48 hours.
The setting of the specific preset time period needs to refer to traffic flow conditions of different roads, so that a person skilled in the art can determine the statistical time period length according to the conditions of different roads under the concept of the present invention, which is not limited by the present invention.
S108, taking one road junction of the intersection section as a reference road junction and other road junctions of the intersection section as comparison road junctions, obtaining the difference value of the number of automobiles between the reference road junction and each comparison road junction, and taking the difference value with the minimum numerical value as a target difference value;
in specific implementation, a road junction of a junction section is used as a reference road junction, a vehicle passes through the reference road junction and shunts to other road junctions (namely comparison road junctions) of the junction section, and for the difference value of the number of automobiles between the reference road junction and each comparison road junction: the larger the numerical value of the difference value is, the smaller the number of the automobiles entering the comparison intersection is, and the traffic jam is not easy to occur on the road; the smaller the numerical value of the difference value is, the larger the number of the automobiles entering the intersection is, and the traffic jam is easy to happen on the road. Therefore, whether the road is congested or not is judged, the difference value with the smallest value in the difference values of the numbers of the automobiles at the reference intersection and each comparison intersection is selected as the target difference value, and the number of the passing vehicles is the largest at the comparison intersection corresponding to the target difference value.
And S109, judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection section at the comparison intersection corresponding to the target difference value.
In specific implementation, the number of vehicles passing through the comparison intersection corresponding to the target difference is the largest. If the target difference value is smaller than a second preset threshold value, the situation that the vehicles are detained at the intersection is described, and the traffic jam of the road of the intersection section is judged. Therefore, the system can remind the user of detouring to travel on the most smooth route in time, and the traffic jam condition is relieved.
In an embodiment, step S1081 may be added to step S108 to assist in determining the vehicle congestion at the junction: s1081, acquiring a difference value between the number of automobiles at the reference intersection and each comparison intersection in a current short time period, such as 10min and 20min, as a second difference value, and if a minimum difference value of the second difference values is smaller than a second preset threshold value, it indicates that the number of the automobiles at the intersection of the intersection section is not changed and the automobiles are not stopped in the current short time period, so that the traffic jam at the intersection can be accurately determined.
If the target difference value is larger than a second preset threshold value, the intersection section is judged to be smooth, and therefore the user can be recommended to drive.
It should be noted that the second preset threshold is a numerical value specifically set by a technician according to a road segment (suburb, downtown, high speed) and a time period (morning and evening rush hour of a working day, weekend) of different areas, and the present invention is not limited to this.
In one embodiment, the method further includes:
and S110, identifying the road section which is judged to have the traffic jam.
In specific implementation, the monitored traffic condition is identified on a map in real time, so that an optimal passing path is conveniently planned for a user for the user to select. In one embodiment, the road segment determined to be congested is identified as red, and the road segment determined to be clear is identified as green.
In the case of the example 2, the following examples are given,
the embodiment of the invention provides a road congestion analysis system based on video structuring. The system in this embodiment may include:
the first acquisition unit is used for acquiring real-time videos of at least two adjacent intersections of a non-intersection road section;
the extraction unit is used for respectively decoding the real-time videos, respectively extracting the structural information of the vehicles in the real-time videos by using a structural identification algorithm and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decoration articles;
the storage unit is used for respectively storing the vehicle picture and the structural information;
the second acquisition unit is used for acquiring the total quantity of the structural information stored at each non-intersection as the quantity of the automobiles passing through each intersection in a preset time period;
the judging unit is used for judging whether the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
In one embodiment, the system further comprises:
the third acquisition unit is used for acquiring real-time videos of all road junctions of the intersection road sections;
a fourth obtaining unit, configured to obtain a preset time period, where a total amount of the structured information stored at each intersection of the intersection is used as a number of automobiles passing through each intersection of the intersection;
a fifth obtaining unit, configured to obtain a difference between the number of cars at the reference intersection and each comparison intersection, and use the difference with the smallest value as a target difference, where one intersection of the intersection is used as a reference intersection, and other intersections of the intersection are used as comparison intersections;
and the second judging unit is used for judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection road section at the comparison intersection corresponding to the target difference value.
In one embodiment, the system further comprises:
and the identification unit is used for identifying the road section which is judged to have the traffic jam.
For example,
referring to fig. 2, in one implementation, the road congestion analysis system based on video structuring includes a camera connected to a local area network, a structuring engine server, a storage server, a map server, and a management server; wherein,
the cameras are arranged at least two adjacent intersections and used for shooting real-time videos of the intersections and transmitting the real-time videos to the structured engine server;
the structured engine server is used for decoding the received real-time video, extracting structured information of the vehicle in the real-time video by using a structured recognition algorithm and intercepting a vehicle picture, wherein the structured information comprises one or more of a vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, annual inspection mark of the vehicle and vehicle decoration articles;
the storage server is used for storing the vehicle picture and the structural information;
the management server is used for acquiring the total quantity of the structural information stored at each non-intersection as the quantity of the automobiles passing through each intersection in a preset time period; judging whether the difference value of the number of automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; if the difference value of the number of the automobiles at the adjacent intersections of the non-intersection road sections is larger than a first preset threshold value, judging that the road of the non-intersection road sections is congested;
the map server is used for identifying the road sections which are judged to have traffic jam.
In an embodiment, the management server is further configured to obtain a real-time video of each intersection of the intersection section; acquiring a preset time period, wherein the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section; taking one road junction of the intersection section as a reference road junction, taking other road junctions of the intersection section as comparison road junctions, obtaining the difference value of the number of automobiles between the reference road junction and each comparison road junction, and taking the difference value with the minimum numerical value as a target difference value; and judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection section at the comparison intersection corresponding to the target difference value.
The embodiment can acquire real-time video of a road by using the existing monitoring camera, namely, a common camera without a software embedding function, extract structured information and intercept vehicle pictures through a structured engine server, acquire traffic flow information of each intersection, and further analyze the traffic flow information of each intersection, so that the traffic jam condition of a non-intersection road section is acquired in time and displayed in a map, thereby providing travel advice and avoiding the traffic jam road section. And the traffic jam conditions of the intersection road section and the non-intersection road section are timely acquired and displayed in a map, so that a travel suggestion is provided and the traffic jam road section is avoided.
In one embodiment, the storage server comprises a picture server and a database server; after the structured engine server analyzes and obtains the vehicle picture and the structured information, the vehicle picture is stored in the picture server; storing structured information in the database server.
According to the embodiment, the vehicle pictures and the structural information are stored by using different servers respectively, so that the pressure of a single server can be relieved, the load of the system is shared, and the running speed is increased.
In an embodiment, the system further comprises a media forwarding server connected with the local area network, and the media forwarding server is used for acquiring the real-time video from the camera and forwarding the real-time video to the structuring engine server.
In this embodiment, the media forwarding server is added to forward the real-time video shot by the camera, so that the memory pressure of the camera can be relieved, the bearing capacity of the system can be improved, and the efficiency can be improved.
In a specific implementation, the management server further sends the road condition information to the user side to provide suggestions for the user to go out.
The method mainly utilizes an original video of a video structuring technology to carry out intelligent analysis, identifies vehicles passing by the road, extracts information of the vehicles, such as moving direction, license plate, color, vehicle type, brand, sub-brand, vehicle sticker, vehicle decorative article and the like into text information, writes the text information into a database server to be persistently stored, and then utilizes the information of the database server to carry out statistical analysis operation at regular time to carry out analysis on the vehicle information, such as recording how many vehicles and tracks of the vehicles are captured by each camera in each time period, thereby predicting which intersections are likely to be jammed and then sending out early warning signals to enable users to know about the traffic flow of each intersection at the first time and relieving traffic pressure to a certain extent.
In a specific embodiment, a camera is arranged on a road, a vehicle is captured by the camera and structured information is extracted, a background counts traffic flow information and a vehicle driving direction in the period of time every 10 minutes (which can also be configured according to actual conditions), and the number of vehicle captures in 10 minutes of each camera can be recorded by the camera on the same road to judge which road section between nodes is in a congestion state. For example, if a camera suddenly has a large amount of vehicles driving into it during a certain time period but the next camera under the same road does not capture any vehicles, the road condition between the two cameras can be considered to be bad. But if the vehicle is a junction or a node of road convergence, the vehicle in the place with large difference is slow to run. The embodiment can also add a vehicle speed identification function to assist in judging the vehicle condition.
In a specific embodiment, the road congestion analysis system based on video structuring comprises: an intelligent camera (AICamera), a general camera, an Intelligent Management Server (IMS), a structured Intelligent Engine Server (IES), a picture server (TGI), a database server (DBS), a media forwarding Server (SMT), and a map server (MAPS) using a local area network connection.
The intelligent camera is internally provided with an optical lens for acquiring image data, embedded software in the camera intelligently identifies images through an artificial intelligence algorithm or a video structuring algorithm, extracts vehicle pictures and structuring information, and outputs the vehicle pictures and the structuring information to the media forwarding server through a network interface.
And the intelligent management server is used for uniformly managing the cameras and the servers in the system and managing users of the system, and has the functions of organization management, user management, role management, authority management and the like. And managing the distribution positions of the cameras on different roads to distribute the work sequence of forwarding the acquired video by the media server.
And the structured intelligent engine server is used for intelligently analyzing the real-time video output by the non-intelligent camera and extracting the information of the vehicle, the picture and the feature code. The server can be used in a system without an intelligent camera, and the value of the existing system is fully exerted.
And the picture server is used for acquiring the vehicle pictures of the intelligent camera from the SMT for storage. The server can also acquire the vehicle pictures analyzed by the structured intelligent engine server from the structured intelligent engine server for storage.
And the database server is used for storing the vehicle information output by the intelligent camera, storing the structural information and mining the data by utilizing the structural information so as to extract effective information. The server is also used for storing the structural information analyzed by the structural intelligent engine server obtained from the structural intelligent engine server and performing data mining by using the structural information so as to extract effective information.
And the media forwarding server is used for requesting the vehicle structural information and the vehicle picture from the intelligent camera, forwarding the vehicle structural information and the vehicle picture to the picture server and the database server for storage, and forwarding the real-time video of the common camera to the structural intelligent engine server for analysis.
And the map server is used for displaying the position of the camera and displaying road conditions. The cameras at the adjacent intersections are connected by lines, and different road conditions are drawn by different colors, so that the user can preview the road conditions conveniently.
The road congestion analysis system based on video structuring provided by the embodiment can be used for vehicle congestion analysis and can also be used for other functions, and the stored structured information has practical value and can be used for functions of public security case handling, violation snapshot, vehicle speed calculation and the like. The method comprises the steps of collecting vehicle structural information and pictures by installing an intelligent camera on a road, identifying the vehicle structural information and obtaining the vehicle pictures by a structural engine server for the conventional common camera, counting the number of the snapshot of the cameras in the current day by using a database server, obtaining all the camera statistical information of the road by grouping the cameras, and predicting and obtaining real-time traffic information according to the statistical information.
For example:
in one implementation, a generic camera sends real-time video to a media forwarding server.
And the media forwarding server forwards the real-time video to the structured intelligent engine server for analysis according to the working list distributed by the management server. The working list comprises the real-time video sequence of the common cameras to be forwarded.
And after receiving the real-time video, the structured intelligent engine server decodes the real-time video, analyzes each frame of video by adopting a vehicle structured recognition algorithm, extracts vehicle structured information in the video and intercepts vehicle pictures from the video.
And the structured intelligent engine server stores the vehicle picture obtained by analysis and interception into the picture server.
And the picture server returns the URL of the stored picture to the database server for subsequent picture reading.
The structured intelligent engine server stores the analyzed vehicle structured information to the database server.
The processing flow of the intelligent camera is similar to that of a common camera, but does not depend on a structured intelligent engine server. The intelligent camera analyzes each collected frame of video by adopting a vehicle structural recognition algorithm, extracts structural data of the vehicle when a vehicle appears in the video, and intercepts a vehicle picture from the video.
The media forwarding server requests the vehicle pictures and the structural information of the intelligent camera according to the work plan distributed by the management server, and the intelligent camera receives the request and then sends the vehicle pictures and the structural information to the media forwarding server; and after the media forwarding server receives the vehicle picture, the vehicle picture is stored in the picture server, and after the media forwarding server receives the structural information of the vehicle, the structural information of the vehicle obtained by analysis is stored in the database server.
In addition, the media forwarding server requests the real-time video from the common camera and forwards the real-time video to the structured intelligent engine server.
And the picture server returns the URL of the stored picture to the database server for subsequent picture reading.
Thus, real-time vehicle condition information of different roads is obtained.
It should be noted that, because the traffic conditions of the intersection roads and the non-intersection roads are different, the cameras are grouped in order to facilitate analyzing the congestion condition of the roads. The camera of the intersection section is a camera which is connected vertically and horizontally at the intersection, and the camera of the non-intersection section is a camera which is connected with the front and the back of the intersection.
In a preset time period, the script number of the vehicle structural information stored by each camera in the data server is counted in groups to serve as the number of vehicles passing through the camera, and for the cameras on the non-intersection road section, if the difference value of the number of the vehicles between the adjacent cameras is large, the road congestion between the two cameras is indicated, otherwise, the road is indicated to be smooth; for the cameras in the intersection section, the difference value of the number of the automobiles between the intersected camera and the adjacent camera is large, which indicates that most vehicles do not walk to the intersection, and the road leading to the intersection can be considered to be smooth, otherwise, the road is judged to be congested. The camera comprises a smart camera and/or a normal camera.
Example 3
Referring to fig. 3, a schematic block diagram of a terminal 300 according to another embodiment of the present invention is provided. The terminal 300 in the present embodiment as shown in the figure may include: one or more processors 301; one or more input devices 302, one or more output devices 303, and memory 304. The processor 301, the input device 302, the output device 303, and the memory 304 are connected by a bus 305. The memory 302 is used for storing instructions and the processor 301 is used for executing the instructions stored by the memory 302. Wherein the processor 301 is configured to perform: acquiring real-time videos of at least two adjacent intersections of a non-intersection road section; respectively decoding the real-time videos, respectively extracting structural information of the vehicles in the real-time videos by using a structural recognition algorithm, and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decorative articles; respectively saving the vehicle picture and the structural information; acquiring a preset time period, wherein the total quantity of the structural information stored at each non-intersection is used as the quantity of the automobiles passing through each intersection; judging whether the difference value of the number of automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
In an embodiment, the processor 301 is further configured to perform: acquiring real-time videos of all road junctions of a junction road section; acquiring a preset time period, wherein the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section; taking one road junction of the intersection section as a reference road junction, taking other road junctions of the intersection section as comparison road junctions, obtaining the difference value of the number of automobiles between the reference road junction and each comparison road junction, and taking the difference value with the minimum numerical value as a target difference value; and judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection section at the comparison intersection corresponding to the target difference value.
In an embodiment, the processor 301 is further configured to perform: and identifying the road sections which are determined to have the traffic jam.
It should be understood that, in the embodiment of the present invention, the Processor 301 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 302 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
The memory 304 may include a read-only memory and a random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.
In a specific implementation, the processor 301, the input device 302, and the output device 303 described in this embodiment of the present invention may execute the implementation described in the embodiment of the parameter adjustment method provided in this embodiment of the present invention, and may also execute the implementation of the terminal 300 described in this embodiment of the present invention, which is not described herein again.
In another embodiment of the invention, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements:
acquiring a real-time video of an intersection of a non-intersection road section; respectively decoding the real-time videos, respectively extracting structural information of the vehicles in the real-time videos by using a structural recognition algorithm, and intercepting vehicle pictures, wherein the structural information comprises one or more of vehicle motion direction, license plate information, vehicle color, vehicle type, brand, sub-brand, vehicle annual inspection mark and vehicle decorative articles; respectively saving the vehicle picture and the structural information; acquiring a preset time period, wherein the total quantity of the structural information stored at each non-intersection is used as the quantity of the automobiles passing through each intersection; judging whether the difference value of the number of automobiles at the adjacent intersection of the non-intersection road section is larger than a first preset threshold value or not; and if the difference value of the number of the automobiles at the adjacent intersection of the non-intersection road section is greater than a first preset threshold value, judging that the road of the non-intersection road section is congested.
Acquiring real-time videos of all road junctions of a junction road section; acquiring a preset time period, wherein the total quantity of the structural information stored at each intersection of the intersection section is respectively used as the quantity of the automobiles passing through each intersection of the intersection section; taking one road junction of the intersection section as a reference road junction, taking other road junctions of the intersection section as comparison road junctions, obtaining the difference value of the number of automobiles between the reference road junction and each comparison road junction, and taking the difference value with the minimum numerical value as a target difference value; and judging whether the target difference value is smaller than a second preset threshold value, and if the target difference value is smaller than the second preset threshold value, judging that the traffic jam occurs at the intersection section at the comparison intersection corresponding to the target difference value.
And identifying the road sections which are determined to have the traffic jam.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
While the invention has been described with reference to specific embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.