A vehicle illegal parking detection method and device, electronic equipment and storage medium
By combining the clustering loss function with the vehicle driving threshold condition, the positioning drift problem in vehicle stationary judgment is solved, and high-accuracy illegal parking detection is achieved.
Patent Information
- Application Number
- CN202211718034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In the existing technology, the positioning coordinates of GPS and other sensing devices are prone to drift when the vehicle is stationary, resulting in inaccurate vehicle stationary judgment results and affecting the accuracy of detecting illegal vehicles.
By obtaining vehicle driving information at the current moment and multiple historical moments, the preset clustering loss function is used to determine the similarity of vehicle positions, combined with the preset vehicle driving threshold conditions to determine whether the vehicle is stationary, and the illegal parking situation is determined based on road scene information.
The accuracy of judging the vehicle's stationary state is improved, the misjudgment rate is reduced, and the reliability of illegal parking detection is ensured.
Smart Images

Figure CN116246461B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of transportation, in particular to a vehicle illegal parking detection method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the continuous development of perception technology, its application in traffic violation detection is becoming more and more widespread. Illegal parking is a behavior that has a greater impact on road traffic efficiency. Detecting and warning it can better remind drivers or traffic managers to dredge traffic violations. Generally, an important condition for judging traffic violations is whether the vehicle is in a stationary state. However, when the vehicle is stationary, the result of fusion tracking will appear static drift, that is, when the global positioning system (GPS), radar and other perception devices at the end of the vehicle are stationary, the positioning coordinates (latitude and longitude) of the stationary vehicle often change, which may have fluctuations in speed, thereby affecting the reliability of the result of judging whether the vehicle is stationary, resulting in missed detection of illegal vehicles. SUMMARY
[0003] In order to solve the problems of the prior art, the embodiments of the present application provide a vehicle illegal parking detection method, device, electronic device and storage medium. The technical solution is as follows:
[0004] In one aspect, a vehicle illegal parking detection method is provided, the method comprising:
[0005] obtaining a vehicle driving information set at a current time; the vehicle driving information set at the current time includes vehicle driving information at the current time and vehicle driving information at a plurality of historical times; the vehicle driving information includes a vehicle position and a vehicle speed;
[0006] determining a vehicle position set at a target time based on the vehicle position at the current time and the vehicle positions at the plurality of historical times;
[0007] for each target time in the vehicle position set at the target time, determining a loss value based on the vehicle position at the current time, the vehicle positions at the plurality of historical times and the vehicle position at the target time using a preset clustering loss function; the loss value is used to represent the degree of similarity between the vehicle positions at each time in the vehicle driving information set at the target time with the vehicle position at the target time as the center position;
[0008] determining a target loss value based on the loss values at each target time in the vehicle position set at the target time; and taking the target time corresponding to the target loss value as a target current time;
[0009] If the target loss value is less than or equal to the preset loss value, and vehicle driving information at any two time points in the set of vehicle driving information at the target current time point satisfies a preset vehicle driving threshold condition, the driving state of the vehicle at the target current time point is determined to be static.
[0010] In a case where the driving state of the vehicle at the target current time point is static, a vehicle illegal parking detection result is determined based on the vehicle driving information at the target current time point and road scene information within a preset range of the vehicle at the target current time point.
[0011] In an example embodiment, a loss value is determined based on a current vehicle position, a plurality of historical vehicle positions and a target vehicle position by using a preset clustering loss function, including:
[0012] A first distance between the vehicle at the current time point and the vehicle at the target time point is determined based on the current vehicle position and the target vehicle position.
[0013] For each historical time point, a second distance between the vehicle at the historical time point and the vehicle at the target time point is determined based on the historical vehicle position and the target vehicle position.
[0014] The loss value is determined based on the first distance and the second distance of each historical time point.
[0015] In an example embodiment, a target loss value is determined based on loss values of each target time point in a set of target vehicle positions, including:
[0016] A minimum loss value is determined from the loss values of each target time point in the set of target vehicle positions.
[0017] The minimum loss value is taken as the target loss value.
[0018] In an example embodiment, the set of target vehicle positions includes the current vehicle position and a plurality of historical vehicle positions.
[0019] In an example embodiment, the set of target vehicle positions is determined based on the current vehicle position and the plurality of historical vehicle positions, including:
[0020] The current vehicle position and the plurality of historical vehicle positions are mean-processed to obtain an initial center position.
[0021] From the current vehicle position and the plurality of historical vehicle positions, a target vehicle position with a distance less than or equal to a first preset distance from the initial center position is determined.
[0022] The vehicle position at the target time is taken as a vehicle position set at the target time.
[0023] In an exemplary embodiment, the method for determining the preset loss value comprises:
[0024] The preset radius is obtained.
[0025] The number of times is determined based on the current time and the plurality of historical times; the number of times is the sum of the number of the current time and the number of the historical times.
[0026] The preset loss value is determined based on the number of times and the preset radius.
[0027] In an exemplary embodiment, the preset vehicle driving threshold condition comprises:
[0028] The distance between the vehicle positions at any two times with a preset time interval is less than a second preset distance; the second preset distance is the product of the preset time and the preset speed.
[0029] The difference between the vehicle speeds at any two times with a preset time interval is less than the preset speed.
[0030] In an exemplary embodiment, the vehicle illegal parking detection result is determined based on the vehicle driving information at the target current time and the road scene information within the preset range of the vehicle at the target current time, comprising:
[0031] The road scene information within the preset range of the vehicle at the target current time is obtained.
[0032] The coordinates of the signal stop line corresponding to the vehicle at the target current time and the no-parking condition are determined based on the road scene information.
[0033] The distance between the vehicle at the target current time and the signal stop line corresponding thereto is determined based on the coordinates of the signal stop line corresponding to the vehicle at the target current time and the vehicle position at the target current time.
[0034] If the no-parking condition is that the vehicle at the target current time is in the no-parking area, and the distance between the vehicle at the target current time and the signal stop line corresponding thereto is greater than a third preset distance, the distance between the vehicle at the target current time and the adjacent preceding vehicle in the same lane is greater than or equal to a fourth preset distance, or the speed of the vehicle at the target current time is greater than or equal to the preset speed, then the vehicle illegal parking detection result is determined to be illegal.
[0035] In another aspect, a device for vehicle illegal parking is provided, the device comprising:
[0036] The acquisition module is configured to acquire a current vehicle driving information set; the current vehicle driving information set comprises current vehicle driving information and vehicle driving information at a plurality of historical time points; the vehicle driving information comprises a vehicle position and a vehicle speed;
[0037] The first determination module is configured to determine a vehicle position set at a target time point based on the current vehicle position and the vehicle positions at the plurality of historical time points.
[0038] The second determination module is configured to, for each target time point in the vehicle position set at the target time point, determine a loss value based on the current vehicle position, the vehicle positions at the plurality of historical time points and the vehicle position at the target time point by using a preset clustering loss function; the loss value is used to represent a degree of similarity between the vehicle positions at the plurality of time points in the current vehicle driving information set with the vehicle position at the target time point as a center position.
[0039] The third determination module is configured to determine a target loss value based on the loss values of the target time points in the vehicle position set at the target time point, and determine a target time point corresponding to the target loss value as a target current time point.
[0040] The determination module is configured to, if the target loss value is less than or equal to a preset loss value, and vehicle driving information at any two time points separated by a preset time in the current vehicle driving information set satisfies a preset vehicle driving threshold condition, determine a driving state of the vehicle at the target current time point as static.
[0041] The fourth determination module is configured to, if the driving state of the vehicle at the target current time point is static, determine a vehicle illegal parking detection result based on the vehicle driving information at the target current time point and road scene information within a preset range of the vehicle at the target current time point.
[0042] In another aspect, an electronic device is provided, comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the vehicle illegal parking detection method of any of the above aspects.
[0043] In another aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the vehicle illegal parking detection method of any of the above aspects.
[0044] In another aspect, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the electronic device to perform the vehicle illegal parking detection method of any of the above aspects.
[0045] The embodiment of the present application obtains multi-frame driving data in a preset time period, processes the vehicle positions in the multi-frame driving data by using a preset clustering algorithm, thereby obtaining frame data that minimizes the loss value, and takes the frame data with the minimum loss value as the vehicle driving data of the target current time. Subsequently, the preset loss value and the preset vehicle driving threshold condition are used as constraint conditions to determine whether the vehicle at the current time is stationary, so that the accuracy of the determination result is high. When the driving state of the vehicle is stationary, subsequent further determination is made based on the road scene information within the preset range of the vehicle at the current time to determine whether the vehicle is illegally parked, and the overall detection process has high reliability. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0047] Figure 1 is a schematic diagram of an implementation environment provided by the embodiment of the present application;
[0048] Figure 2 is a flowchart of a vehicle illegal parking detection method provided by the embodiment of the present application;
[0049] Figure 3 is a process diagram of illegal parking provided by the embodiment of the present application;
[0050] Figure 4 is a flowchart of an optional determination of a preset loss value provided by the embodiment of the present application;
[0051] Figure 5 is a flowchart of a determination of a vehicle illegal parking detection result provided by the embodiment of the present application;
[0052] Figure 6 is a structural block diagram of a vehicle illegal parking detection device provided by the embodiment of the present application;
[0053] Figure 7 is a hardware structural block diagram of a server provided by the embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work belong to the scope of protection of the present application.
[0055] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or server including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.
[0056] It can be understood that in the specific embodiments of the present application, data related to user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards in relevant countries and regions.
[0057] Please refer to Figure 1 which shows an implementation environment provided by an embodiment of the present application, which includes a communication device 101 located on a vehicle 10 and a server 20; wherein the communication device 101 on the vehicle 10 is in communication connection with the server 20.
[0058] Optionally, the communication device 101 is configured to send the driving information of the vehicle 10 obtained by the sensor to the server 20, so that the server 20 can obtain the driving information of the vehicle 10 in real time, and perform subsequent steps of detecting illegal parking of the vehicle 10 based on the driving information of the vehicle 10, and send the detection result to a relevant management platform. Specifically, the communication device 101 can be arranged on a terminal of the vehicle 10, or arranged on the sensor; according to needs, the sensor includes a speed sensor and a position sensor, and optionally, the position sensor can be a GPS locator; in order to obtain the driving speed of the vehicle 10, other combined sensors can also be used for detection, which is not limited here.
[0059] The driving information of the vehicle 10 acquired in real time can be stored on the server 20 or in a storage device of the vehicle 10, and when the server 20 needs to acquire the driving information of the vehicle 10 at a historical moment, the communication device 101 can be used for acquisition.
[0060] It should be noted that the server involved in the embodiments of the present application can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms.
[0061] In another implementation environment, the processor located on the vehicle 10 can be used to implement the step of detecting illegal parking of the vehicle, and the processor can send the detection result to the relevant regulatory platform.
[0062] Referring to Figure 2 , a flowchart of a method for detecting illegal parking of a vehicle is shown, which can be applied to Figure 1 the server. It should be noted that the present specification provides method operation steps as described in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is only one of the many execution orders, and does not represent the only execution order. In actual system or product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, as shown in Figure 2 , the method can include:
[0063] S201: Acquire a set of vehicle driving information at a current moment; the set of vehicle driving information at the current moment includes vehicle driving information at the current moment and vehicle driving information at a plurality of historical moments; the vehicle driving information includes vehicle position and vehicle speed.
[0064] In the embodiments of the present application, the driving information at the historical moment which is different from the current moment by a preset time interval can be acquired; optionally, the time interval between any two adjacent moments can be the same or different, which is not limited herein.
[0065] Generally, after vehicle fusion tracking, the position and speed of the vehicle (both are time series data, i.e., values changing with time) are output. Optionally, referring to Figure 3 , Figure 3is a process schematic diagram of illegal parking provided by an embodiment of the present application. The position of the vehicle can be a latitude and longitude coordinate, which can be converted into a coordinate in the intersection coordinate system by setting the intersection coordinate system, and the speed and the coordinate in the intersection coordinate system of the vehicle can be taken as the input of the illegal parking detection system, such as the speed v1, v2, v3 and the coordinate (x1, y1), (x2, y2), (x3, y3) of a vehicle at t1, t2, t3. By unifying the coordinates to the intersection coordinate system, the subsequent data processing efficiency can be improved.
[0066] For example, for a certain vehicle, the input is the position and speed at t1-tm, where tm can be the current time, t1-tm can be the historical time, and m is an integer greater than 2. Optionally, the vehicle can have m frames of input data, i.e., the driving information at m time points. m m m-1 m
[0067] After fusion tracking of the static vehicle, static drift phenomenon may occur, i.e., when the terminal (GPS, radar, etc.) is static, the positioning coordinates (latitude and longitude) of the static vehicle often change and may have speed fluctuations. In order to avoid the "shaking" phenomenon of the static vehicle after fusion tracking, a redundancy de-drift algorithm is adopted in the present application, which will be described in detail in steps S203-S209 below.
[0068] S203: determining a vehicle position set at a target time based on the vehicle position at the current time and the vehicle positions at a plurality of historical times.
[0069] In an exemplary embodiment, the vehicle position set at the target time includes the vehicle position at the current time and the vehicle positions at a plurality of historical times. Continuing the above example, the vehicle position set at the target time includes the vehicle positions at t1-tm, a total of m vehicle positions. m
[0070] In order to improve the efficiency of finding the target vehicle position at the current time, the vehicle positions at the current time and a plurality of historical times can be screened first. Specifically, in another exemplary embodiment, step S203 can include: performing mean value processing on the vehicle position at the current time and the vehicle positions at a plurality of historical times to obtain an initial center position; determining the target vehicle position at the target time from the vehicle position at the current time and the vehicle positions at a plurality of historical times, which has a distance less than or equal to a first preset distance from the initial center position; and taking the target vehicle position at the target time as the vehicle position set at the target time.
[0071] For example, for the vehicle positions at t1-tm, for t m i The vehicle position at the moment can be represented as (x i ,y i ), wherein i∈[1,m], the initial center position x0 and y0 can be obtained by using the following formula first;
[0072]
[0073]
[0074] wherein, represents the sum of the horizontal coordinates of the vehicle positions at t1~t m , and represents the sum of the vertical coordinates of the vehicle positions at t1~t m ; then, the first preset distance d1 can be set to determine the vehicle positions with a distance less than d1 from the initial center position, specifically, the initial center position can be taken as a circle point, and a circle with d1 as the radius can be drawn, so that the data set formed by the vehicle positions located in the circle or on the circumference is taken as the vehicle position set at the target moment. The target vehicle position set at the target moment can also be screened out in the manner of calculating (calculating the distance between the initial center position and each vehicle position in the vehicle position set at the current moment) and judging one by one.
[0075] In the above embodiment, the target vehicle position determined from the vehicle position at the current moment and the vehicle positions at the plurality of historical moments and having a distance less than or equal to the first preset distance from the initial center position can be replaced by the following manner: by setting the number of target vehicle positions contained in the target vehicle position set, such as 10, the 10 vehicle positions closest to the initial center position are taken as the target vehicle positions, so as to further improve the efficiency of subsequent calculation of loss value and reduce system consumption.
[0076] It should be noted that when the initial center position belongs to any one of the positions in the position set composed of the vehicle position at the current moment and the vehicle positions at the plurality of historical moments, the vehicle position at the moment corresponding to the initial center position can also be directly taken as the target vehicle position. In the process of calculating the vehicle positions at each moment in the vehicle position set at the current moment and the target vehicle position, since the target vehicle position belongs to one data in the vehicle position set at the current moment, when the distance between the target vehicle position in the vehicle position set at the current moment and the target vehicle position in the target vehicle position set is calculated, it must be zero, so the target vehicle position in the vehicle position set at the current moment can be removed, and each vehicle position in the vehicle position set at the current moment and the target vehicle position are calculated based on the removed vehicle position set at the current moment, so as to further reduce the calculation amount and improve the calculation effect.
[0077] The vehicle travel information set of the current time of the above example can correspond to one vehicle travel information per time. In practice, when obtaining the vehicle travel information of the current time and the historical time, only the current time t m and the target historical time t1may be determined, so as to obtain the vehicle travel information corresponding to the two times and the input frame data therebetween. That is, the specific time value corresponding to each frame can not be concerned. For example, if the difference between the current time t m and the target historical time t1is 5 seconds, and the frame rate is 10 Hz, the total number of frames m=50 is obtained, and the frame numbers corresponding to the frames can be 1, 2, …, 50.
[0078] S205: For each target time in the vehicle position set of the target time, a loss value is determined based on the current time vehicle position, the vehicle position of the plurality of historical times, and the vehicle position of the target time by using a preset clustering loss function; the loss value is used to represent the closeness between the vehicle positions of each time in the current time vehicle travel information set with the vehicle position of the target time as the center position.
[0079] In an exemplary embodiment, step S205 can include: determining a first distance between the current time vehicle and the target time vehicle based on the current time vehicle position and the target time vehicle position; for each historical time, determining a second distance between the historical time vehicle and the target time vehicle based on the historical time vehicle position and the target time vehicle position; and determining the loss value based on the first distance and the second distances of the historical times.
[0080] Specifically, the position set composed of the current time vehicle position and the vehicle positions of the plurality of historical times can be regarded as a position clustering cluster. A target time vehicle position can be randomly selected from the target time vehicle position set as the current centroid of the position clustering cluster, the square of the distance of each vehicle position in the position clustering cluster from the current centroid can be calculated, and the square of the distance corresponding to each vehicle position in the position clustering cluster can be accumulated, so as to obtain the loss value corresponding to the current centroid. Then, a target time vehicle position can be randomly selected from the remaining target time vehicle position set as the current centroid of the position clustering cluster, and the above steps of calculating the square of the distance of each vehicle position in the position clustering cluster from the current centroid and accumulating the square of the distance corresponding to each vehicle position in the position clustering cluster are repeated until there is no vehicle position in the remaining target time vehicle position set that has not been calculated.
[0081] S207: determining a target loss value based on the loss values of each target time in the target time vehicle position set; and taking the target time corresponding to the target loss value as the target current time.
[0082] In an example embodiment, referring to Figure 3 , step S207 can include: determining a minimum loss value from the loss values of the target time points in the vehicle position set of the target time point; taking the minimum loss value as the target loss value, denoted as J0, and the vehicle position of the target time point corresponding to the minimum loss value as the target current time point vehicle position, i.e. μ0.
[0083] The above process can be represented by the following preset clustering loss function:
[0084]
[0085] wherein m is the total number of frames; c(x i ,y i ) is the vehicle coordinate at the t i time point; j(x j ,y j ) is the vehicle coordinate at the t j time point randomly selected from the target time point vehicle position set, and the range of j is [1, n], n is less than or equal to m, and n is the number of target time point vehicle positions in the target time point vehicle position set.
[0086] When the loss values of the target time points in the target time point vehicle position set are calculated, the minimum loss value is taken as the target loss value, which represents that the vehicle positions in the position cluster formed by the centroid corresponding to the target loss value are most similar.
[0087] S209: If the target loss value is less than or equal to the preset loss value, and the vehicle driving information of any two time points separated by a preset time in the current time point vehicle driving information set satisfies the preset vehicle driving threshold condition, the driving state of the target current time point vehicle is determined as static.
[0088] In an example embodiment, referring to Figure 4 , Figure 4 is an optional flowchart provided by the embodiments of the present application for determining the preset loss value. The determination method of the preset loss value in step S209 includes:
[0089] S2091: Obtain a preset radius r.
[0090] For example, the preset radius r can be 0.3 meters, and the specific value can be set as needed. The significance of setting the preset radius is that all position coordinate change points of the vehicle are within the radius r circle and on the circumference, which is acceptable.
[0091] S2093: Determine the number of time points based on the current time point and a plurality of historical time points; the number of time points is the sum of the number of current time points and the number of historical time points.
[0092] Continuing the above example, the number of time instants is m, which can also be expressed as m frames.
[0093] S2095: determining a preset loss value based on the number of time instants and the preset radius.
[0094] Specifically, the preset loss value V can be expressed as:
[0095] V = (m-1)‖r‖ 2
[0096] wherein the circle corresponding to the preset radius can be a circle with μ0 as the center and m as the number of frames, and the preset loss value V represents the value of the preset distance loss function J obtained assuming that the vehicle position coordinates of m-1 frames (excluding the frame of the center μ0) are all on the circumference of the circle with the radius r.
[0097] In an exemplary embodiment, the preset vehicle driving threshold condition includes: the distance between the vehicle positions at any two time instants separated by a preset time is less than a second preset distance (distance threshold constraint); the second preset distance is the product of the preset time and the preset speed; the difference between the vehicle speeds at any two time instants separated by a preset time is less than the preset speed (speed threshold constraint). The preset vehicle driving threshold condition can be expressed as follows:
[0098]
[0099] wherein p and q are any two time instants separated by a preset time w, which can also be any two frame numbers separated by w frames, and p, q and w all belong to [1, m]; v p and v q are the vehicle speeds corresponding to the p and q frame numbers, respectively, (x p , y p ) and (x q , y q ) are the vehicle positions corresponding to the p and q frames, respectively, f is the frame rate of the input data, and w / f represents the time represented by w frames, i.e., the preset time, and v0 is the preset speed.
[0100] Optionally, after step S209, the detection method further comprises: otherwise, determining that the driving state of the vehicle at the target current time is non-stationary; that is, including the following three cases: the target loss value is less than or equal to the preset loss value, and the vehicle driving information at any two time points in the vehicle driving information set at an interval of a preset time does not satisfy the preset vehicle driving threshold condition; or, the target loss value is greater than the preset loss value, and the vehicle driving information at any two time points in the vehicle driving information set at an interval of a preset time satisfies the preset vehicle driving threshold condition; or, the target loss value is greater than the preset loss value, and the vehicle driving information at any two time points in the vehicle driving information set at an interval of a preset time does not satisfy the preset vehicle driving threshold condition.
[0101] Based on the above steps S201-S209, it can be seen that in the prior art, when the vehicle is stationary, the speed and coordinates of the fusion tracking will have a certain jump, which is called static drift. In order to avoid obtaining inaccurate vehicle position and speed, the present application adopts a redundant de-drift algorithm to process the obtained vehicle position and speed. Referring to Figure 3 , the specific processing process includes two parts: ① determining the vehicle at the target time corresponding to the minimum loss value based on the k-means algorithm, and determining whether the vehicle is stationary through a preset loss value; ② determining whether the vehicle is stationary based on the vehicle position variation distance and speed threshold constraint within a certain time; by combining the two constraint conditions, a redundant de-drift algorithm is formed, which improves the accuracy of determining whether the vehicle is stationary and prevents misjudgment.
[0102] S211: In the case where the driving state of the vehicle at the target current time is stationary, determining a vehicle illegal parking detection result based on the vehicle driving information at the target current time and the road scene information within a preset range of the vehicle at the target current time.
[0103] In an exemplary embodiment, referring to Figure 5 , Figure 5 is a flowchart of determining a vehicle illegal parking detection result provided by an embodiment of the present application. Step S211 can include:
[0104] S501: Obtain road scene information within a preset range of a vehicle at a target current time.
[0105] In the present embodiment, the road scene information within a preset range of a vehicle at a target current time can be obtained by using a high-precision map. The road scene information can be the coordinates of each road region or landmark, so that the region where the vehicle is located can be determined, that is, whether the vehicle is in a prohibited parking region (such as a conventional lane or a region without a parking area on the roadside).
[0106] S503: Determine the coordinates of the signal stop line corresponding to the vehicle at the target current time and the no-parking condition based on the road scene information.
[0107] The no-parking condition specifically includes two cases: the vehicle at the target current time is not in the no-parking area and the vehicle at the target current time is in the no-parking area. As described above, the coordinates of each road area within the preset range can be obtained based on the high-precision map to determine the coordinates of the no-parking area, so that by comparing the position of the vehicle at the target current time with the coordinates of the no-parking area, if the position of the vehicle at the target current time is within the coordinate range of the no-parking area, the no-parking condition is determined as the vehicle at the target current time being in the no-parking area, otherwise, the no-parking condition is determined as the vehicle at the target current time not being in the no-parking area.
[0108] S505: Determine the distance between the vehicle at the target current time and the signal stop line corresponding to the vehicle based on the coordinates of the signal stop line and the position of the vehicle at the target current time.
[0109] S507: If the no-parking condition is that the vehicle at the target current time is in the no-parking area, and the distance between the vehicle at the target current time and the signal stop line corresponding to the vehicle is greater than a third preset distance, the distance between the vehicle at the target current time and the adjacent preceding vehicle in the same lane is greater than or equal to a fourth preset distance, or the speed of the vehicle at the target current time is greater than or equal to the preset speed, it is determined that the vehicle parking violation detection result is illegal. By eliminating the vehicles queuing for a red light when judging whether the vehicle is illegally parked, the detection accuracy is improved.
[0110] The step S507 considers the case when the vehicle does not belong to the vehicles queuing for the red light, and when the vehicle belongs to the vehicles queuing for the red light, the condition is met: when the vehicle is the first vehicle, the distance of the vehicle from the stop line of the signal light is less than or equal to the third preset distance, and when the vehicle belongs to one of the vehicles queuing for the red light, the target current time driving information (position and speed) of all vehicles between the target current time of the vehicle and the first vehicle (the vehicle closest to the stop line of the signal light) needs to be obtained, which can be obtained by using the steps S201-S207 to obtain the target current time driving information of each vehicle after drift, if the distance between adjacent vehicles in all vehicles is less than or equal to the fourth preset distance, and the vehicle speed is less than the preset speed v0, it is indicated that all vehicles belong to the vehicles queuing for the red light, and whether the no-parking condition is that the vehicle is in the no-parking area at the target current time, the vehicle parking detection result is determined as not illegal; and if the distance between the target current time vehicle and the previous vehicle is greater than or equal to the fourth preset distance, or the speed is greater than or equal to the preset speed v0, it is indicated that the target current time vehicle does not belong to the vehicles queuing for the red light, and if the no-parking condition is that the vehicle is in the no-parking area at the target current time, the vehicle parking detection result is determined as illegal, otherwise, the vehicle parking detection result is determined as not illegal.
[0111] It should be noted that in the judgment of whether the vehicle belongs to the vehicles queuing for the red light, the no-parking area in the application scenario of the present application refers to the vehicles located in the first area (such as conventional lanes and intersections); if the vehicle is parked alone in the lane or on the roadside of the road, it does not belong to the vehicles queuing for the red light, and it is a parking violation vehicle, and if the vehicle belongs to the vehicles queuing for the red light, it is parked in the no-parking area (such as the no-parking area planned at the door of the community) on the road or on the roadside or lane, and it is not a parking violation. Of course, if all the vehicles in the queue are in the second area, which is obviously an area where motor vehicles cannot travel (such as pedestrian sidewalks and non-motor vehicle lanes), when it is determined that the driving state is static, it can be judged that the vehicle belongs to the illegal parking, and of course, the specific first area and the second area can be determined based on the specific scene specified by the traffic laws and regulations.
[0112] Corresponding to the vehicle parking detection method provided by the above several embodiments, the present embodiment also provides a vehicle parking detection device. Since the vehicle parking detection device provided by the present embodiment corresponds to the vehicle parking detection method provided by the above several embodiments, the implementation modes of the foregoing vehicle parking detection method are also applicable to the vehicle parking detection device provided by the present embodiment, which will not be described in detail in the present embodiment.
[0113] Please refer to Figure 6It shows a structural schematic diagram of a vehicle illegal parking detection device provided by an embodiment of the application. The device has the function of implementing the vehicle illegal parking detection method in the method embodiments. The function can be implemented by hardware, or the corresponding software can be executed by hardware. As shown in Figure 6 The device can include:
[0114] The acquisition module 601 is configured to acquire a vehicle driving information set at a current moment. The vehicle driving information set at the current moment includes vehicle driving information at the current moment and vehicle driving information at a plurality of historical moments. The vehicle driving information includes a vehicle position and a vehicle speed.
[0115] The first determination module 603 is configured to determine a vehicle position set at a target moment based on the vehicle position at the current moment and the vehicle positions at the plurality of historical moments.
[0116] The second determination module 605 is configured to, for each target moment in the vehicle position set at the target moment, determine a loss value based on the vehicle position at the current moment, the vehicle positions at the plurality of historical moments, and the vehicle position at the target moment by using a preset clustering loss function. The loss value is used to represent the degree of similarity between the vehicle positions at different moments in the vehicle driving information set at the current moment with the vehicle position at the target moment as the center position.
[0117] The third determination module 607 is configured to determine a target loss value based on the loss values of the target moments in the vehicle position set at the target moment, and determine the target moment corresponding to the target loss value as a target current moment.
[0118] The judgment module 609 is configured to, if the target loss value is less than or equal to a preset loss value, and the vehicle driving information at any two moments separated by a preset time in the vehicle driving information set at the current moment satisfies a preset vehicle driving threshold condition, determine the driving state of the vehicle at the target current moment as static.
[0119] The fourth determination module 611 is configured to, in the case that the driving state of the vehicle at the target current moment is static, determine a vehicle illegal parking detection result based on the vehicle driving information at the target current moment and road scene information within a preset range of the vehicle at the target current moment.
[0120] In an exemplary embodiment, the third determination module is configured to determine a minimum loss value from the loss values of the target moments in the vehicle position set at the target moment.
[0121] The minimum loss value is taken as the target loss value.
[0122] In an exemplary embodiment, the vehicle position set at the target moment includes the vehicle position at the current moment and the vehicle positions at the plurality of historical moments.
[0123] In an example embodiment, the first determining module is configured to perform mean processing on the current vehicle position and the vehicle positions at the plurality of historical time points to obtain an initial center position;
[0124] From the current vehicle position and the vehicle positions at the plurality of historical time points, a target vehicle position at a target time point is determined, which has a distance to the initial center position less than or equal to a first preset distance;
[0125] The target vehicle position is taken as a target vehicle position set.
[0126] In an example embodiment, the method for determining the preset loss value comprises:
[0127] Obtaining a preset radius;
[0128] Determining a number of time points based on the current time point and the plurality of historical time points; the number of time points is the sum of the number of current time points and the number of historical time points;
[0129] Determining the preset loss value based on the number of time points and the preset radius.
[0130] In an example embodiment, the preset vehicle driving threshold condition comprises:
[0131] The distance between the vehicle positions at any two time points with a preset interval is less than a second preset distance; the second preset distance is the product of the preset time and the preset speed;
[0132] The difference between the vehicle speeds at any two time points with a preset interval is less than a preset speed.
[0133] In an example embodiment, the fourth determining module is configured to obtain road scene information within a preset range of the target current vehicle;
[0134] Determining the coordinates of the signal stop line corresponding to the target current vehicle and the no-parking condition based on the road scene information;
[0135] Determining the distance between the target current vehicle and the signal stop line corresponding thereto based on the coordinates of the signal stop line corresponding to the target current vehicle and the position of the target current vehicle;
[0136] If the no-parking condition is that the target current vehicle is in the no-parking area, and the distance between the target current vehicle and the signal stop line corresponding thereto is greater than a third preset distance, the distance between the target current vehicle and the adjacent preceding vehicle in the same lane is greater than or equal to a fourth preset distance, or the speed of the target current vehicle is greater than or equal to the preset speed, it is determined that the vehicle illegal parking detection result is illegal.
[0137] It should be noted that the apparatus provided by the above embodiments, in realizing its functions, only divides the above-mentioned various functional modules by way of example, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.
[0138] The electronic device provided in the embodiments of the present application includes a processor and a memory, and the memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement any one of the vehicle illegal parking detection methods provided in the above method embodiments.
[0139] The memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory can also include a memory controller to provide access of the processor to the memory.
[0140] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device, that is, the above-mentioned electronic device can include a computer terminal, a server or a similar computing device. Figure 7 is the hardware structure block diagram of the server provided in the embodiments of the present application for running a vehicle illegal parking detection method. As shown in Figure 7As shown, the server 700 can vary greatly in configuration and performance, and can include one or more Central Processing Units (CPU) 710 (which can include, but is not limited to, a microprocessor, a microcontroller, a programmable logic device, etc.), a memory 730 for storing data, one or more storage media 720 (such as one or more mass storage devices) for storing applications 723 or data 722. The memory 730 and the storage media 720 can be of any type generally known or used in the art including short term memory or long term storage. The applications 723 stored in the storage media 720 can include one or more modules, each of which can include a series of instructions for operating the server. Further, the CPU 710 can be configured to communicate with the storage media 720 to execute the series of instructions of the applications 723 stored in the storage media 720 on the server 700. The server 700 can also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input / output interfaces 740, and / or one or more operating systems 721, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0141] The input / output interface 740 can be configured to receive or transmit data via a network. Examples of the network can include a wireless network provided by a communication provider of the server 700. In one example, the input / output interface 740 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the input / output interface 740 can be a radio frequency (RF) module that is configured to communicate with the Internet via a wireless manner.
[0142] Those of ordinary skill in the art can understand that, Figure 7 The structure shown is merely illustrative and does not limit the structure of the electronic device described above. For example, the server 700 can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 7 For example, the server 700 can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 7 For example, the server 700 can include more or fewer components than those shown, or have a different configuration of components than those shown.
[0143] The embodiments of the present application also provide a computer readable storage medium, which can be arranged in an electronic device to save at least one instruction or at least one program for implementing a vehicle illegal parking detection method. The at least one instruction or the at least one program is loaded and executed by the processor to implement any vehicle illegal parking detection method provided by the above method embodiments.
[0144] The embodiment of the present application further provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes any one of the vehicle illegal parking detection methods provided by the method embodiments.
[0145] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk and various storage program codes.
[0146] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned description is made for specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.
[0147] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between each of the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. Especially, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0148] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0149] The above is only the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting illegally parked vehicles, characterized in that: The method comprises: Acquire a vehicle driving information set at a current moment; the vehicle driving information set at a current moment includes the vehicle driving information at the current moment and vehicle driving information at multiple historical moments; the vehicle driving information includes vehicle position and vehicle speed; Determine a vehicle position set at a target moment based on the vehicle position at the current moment and the vehicle positions at a plurality of historical moments; For each target moment in the vehicle position set at the target moment, a loss value is determined based on the vehicle position at the current moment, the vehicle positions at the plurality of historical moments, and the vehicle position at the target moment using a preset clustering loss function; the loss value is used to represent the degree of similarity between the vehicle positions at each moment in the vehicle driving information set at the current moment, with the vehicle position at the target moment as the center position; Determining a minimum loss value from the loss values at each target moment in the vehicle position set at the target moment; using the minimum loss value as the target loss value; and using the target moment corresponding to the target loss value as the target current moment; If the target loss value is less than or equal to a preset loss value, and vehicle driving information at any two moments separated by a preset time in the current vehicle driving information set meets a preset vehicle driving threshold condition, then the driving state of the target vehicle at the current moment is determined to be stationary; In a case where the driving state of the target vehicle at the current moment is stationary, the vehicle illegal parking detection result is determined based on the target vehicle driving information at the current moment and the road scene information within a preset range of the target vehicle at the current moment.
2. The detection method according to claim 1, wherein The determining of the loss value based on the vehicle position at the current moment, the vehicle positions at the plurality of historical moments, and the vehicle position at the target moment by using a preset clustering loss function includes: determining a first distance between the vehicle at the current moment and the vehicle at the target moment based on the vehicle position at the current moment and the vehicle position at the target moment; For each of the historical moments, determining a second distance between the vehicle at the historical moment and the vehicle at the target moment based on the vehicle position at the historical moment and the vehicle position at the target moment; The loss value is determined based on the first distance and the second distance of each of the historical moments.
3. The detection method according to any one of claims 1 to 2, characterized in that The vehicle position set at the target moment includes the vehicle position at the current moment and the vehicle positions at multiple historical moments.
4. The detection method according to any one of claims 1 to 2, characterized in that The step of determining a vehicle position set at a target moment based on the vehicle position at the current moment and the vehicle positions at multiple historical moments comprises: Performing mean processing on the vehicle position at the current moment and the vehicle positions at multiple historical moments to obtain an initial center position; Determining, from the vehicle position at the current moment and the vehicle positions at the plurality of historical moments, a vehicle position at a target moment whose distance from the initial center position is less than or equal to a first preset distance; The vehicle position at the target moment is used as the vehicle position set at the target moment.
5. The detection method according to claim 1, wherein The method for determining the preset loss value includes: Get the preset radius; determining a number of moments based on the current moment and the plurality of historical moments; the number of moments being the sum of the number of the current moment and the number of the historical moments; The preset loss value is determined based on the number of the moments and the preset radius.
6. The detection method according to claim 1, characterized in that The preset vehicle driving threshold conditions include: The distance between the vehicle positions at any two moments within the preset time interval is less than a second preset distance; the second preset distance is the product of the preset time and the preset speed; The difference between the vehicle speeds at any two moments within the preset time interval is less than the preset speed.
7. The detection method according to claim 6, characterized in that The determining of the vehicle illegal parking detection result based on the target vehicle driving information at the current moment and the road scene information within a preset range of the target vehicle at the current moment includes: Obtaining road scene information within a preset range of the target vehicle at the current moment; Determine the coordinates of the stop line of the traffic light and the no-stop situation corresponding to the target vehicle at the current moment based on the road scene information; Determine the distance between the target vehicle at the current moment and the corresponding stop line of the traffic light based on the coordinates of the stop line of the traffic light corresponding to the target vehicle at the current moment and the position of the target vehicle at the current moment; If the prohibited parking situation is that the target vehicle at the current moment is in a prohibited parking area, and the distance between the target vehicle at the current moment and the corresponding traffic light stop line is greater than a third preset distance, the distance between the target vehicle at the current moment and the adjacent preceding vehicle in the same lane is greater than or equal to a fourth preset distance, or the speed of the target vehicle at the current moment is greater than or equal to the preset speed, then the vehicle illegal parking detection result is determined to be a violation.
8. A vehicle parking violation detection device, characterized in that: The device comprises: An acquisition module, configured to acquire a vehicle driving information set at a current moment; the vehicle driving information set at a current moment includes the vehicle driving information at the current moment and vehicle driving information at multiple historical moments; the vehicle driving information includes vehicle position and vehicle speed; A first determining module is configured to determine a vehicle position set at a target moment based on the vehicle position at the current moment and the vehicle positions at a plurality of historical moments; a second determining module configured to determine, for each target moment in the vehicle position set at the target moment, a loss value based on the vehicle position at the current moment, the vehicle positions at the plurality of historical moments, and the vehicle position at the target moment using a preset clustering loss function; the loss value being used to represent a degree of similarity between the vehicle positions at each moment in the vehicle travel information set at the current moment, with the vehicle position at the target moment as the center position; a third determining module configured to determine a minimum loss value from the loss values at each target moment in the vehicle position set at the target moment; use the minimum loss value as a target loss value; and use the target moment corresponding to the target loss value as a target current moment; a judgment module, configured to determine the driving state of the target vehicle at the current moment as stationary if the target loss value is less than or equal to a preset loss value and vehicle driving information at any two moments separated by a preset time in the current vehicle driving information set satisfies a preset vehicle driving threshold condition; The fourth determination module is used to determine the vehicle parking violation detection result based on the vehicle driving information of the target at the current moment and the road scene information within a preset range of the vehicle of the target at the current moment when the driving state of the vehicle of the target at the current moment is stationary.
9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for detecting illegally parked vehicles as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for detecting illegally parked vehicles as described in any one of claims 1 to 7.
11. A computer program, characterized in that The computer program product includes at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method for detecting illegally parked vehicles according to any one of claims 1 to 7.
Citation Information
Patent Citations
Illegal parking detection method and device
CN113112813A
Vehicle illegal parking detection method and device, electronic equipment and storage medium
CN113221791A