Vehicle management and control method and device and storage medium
By detecting and modeling the vehicle surveillance video frame by frame, and analyzing the position and orientation information of the vehicle in the digital twin world, it solves the problem of vehicle parking status identification in the existing technology and achieves more sophisticated vehicle control and parking lot management.
Patent Information
- Application Number
- CN202410773449.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-08
AI Technical Summary
Existing vehicle identification technology is difficult to accurately detect whether a vehicle is parked in a parking space or illegally parked in a parking lot, mainly due to factors such as complex environment and vehicle occlusion.
By performing target detection on vehicle monitoring videos frame by frame, we obtain detection frame information, analyze and model to obtain the position and orientation information of the vehicle in the digital twin world, calculate the vehicle speed and driving status, and determine the location of the vehicle based on the intersection ratio between the vehicle and the parking space. In-position, out-of-position and stranded status to achieve more precise vehicle control.
It realizes the precise location judgment of vehicles in the parking lot and the accurate identification of illegal parking behaviors, improves the precision and accuracy of vehicle management and control, can automatically control parking space locks and push parking information, and improves the efficiency of parking lot management.
Smart Images

Figure CN118747869A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of parking lot control, and in particular to a vehicle control method, device and storage medium. Background Art
[0002] At present, vehicle recognition technology has been widely used at the entrances and exits of major parking lots and inside parking lots in my country. These technologies mainly include identifying and tracking vehicles through cameras or other sensors to achieve rapid entry and exit management of vehicles and monitoring of parking space usage. However, most of the existing vehicle recognition equipment can only record vehicle entry and exit information, but it is often impossible to accurately monitor the actual use of parking spaces inside parking lots, such as whether the vehicle is parked in the parking space, illegal parking of vehicles, etc. This situation mainly occurs because the environment of the parking lot is complex and changeable, such as the distance between parking spaces, vehicle obstruction, etc., which may affect the camera's recognition and tracking of vehicles. Therefore, although the vehicle recognition equipment in the parking lot can achieve vehicle management to a certain extent, there are still obvious deficiencies in the precise control of vehicles and parking spaces, and the judgment of illegal parking and violations. Summary of the invention
[0003] Based on this, it is necessary to provide a vehicle control method, device and storage medium for the above-mentioned technical problems to solve at least one of the above-mentioned technical problems.
[0004] The present invention provides a vehicle control method, comprising:
[0005] Perform target detection frame by frame on the collected vehicle monitoring video to obtain the detection frame information of the target vehicle in any frame;
[0006] Based on the detection frame information of any frame, analyzing and modeling are performed to obtain the position and posture information of each frame of the target vehicle in the digital twin world;
[0007] Based on the posture information of any two adjacent frames, determine the vehicle speed between any two adjacent frames;
[0008] The driving state of the target vehicle is determined based on the vehicle speed in each of two adjacent frames.
[0009] Optionally, according to a vehicle control method provided by the present invention, determining the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames includes:
[0010] If the vehicle speed of the target vehicle is in a deceleration state, determining a continuous time during which the vehicle speed is lower than a preset vehicle speed threshold;
[0011] If the continuous time exceeds a first preset time length, determining that the driving state of the target vehicle is a pre-positioning state;
[0012] Based on the pose information of any frame, determining an intersection-and-union ratio between the target vehicle and the parking space;
[0013] If the intersection-and-merge ratio is greater than a preset intersection-and-merge ratio threshold, determining that the driving state of the target vehicle is an in-position state;
[0014] If the I / O ratio is not greater than a preset I / O ratio threshold, and the duration for which the target vehicle is in a stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
[0015] Optionally, according to a vehicle control method provided by the present invention, if the continuous time exceeds a first preset time length, after determining that the driving state of the target vehicle is a pre-positioning state, the method further includes:
[0016] Controlling the unlocking of the parking space lock of the parking space;
[0017] The parking space information of the parking space is pushed to the owner of the target vehicle to induce the owner to drive into the parking space.
[0018] Optionally, according to a vehicle control method provided by the present invention, determining the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames includes:
[0019] If the vehicle speed of the target vehicle is in an accelerating state, determining whether there is an intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame;
[0020] If the intersection-to-combination ratio exists, determining that the driving state of the target vehicle is a pre-departure state;
[0021] If it is monitored that the intersection-merge ratio is zero and the distance between the target vehicle and the parking space exceeds a preset distance, it is determined that the driving state of the target vehicle is an out-of-parking state;
[0022] If the distance does not exceed the preset distance, and the duration for which the target vehicle is in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
[0023] Optionally, according to a vehicle control method provided by the present invention, after determining that the driving state of the target vehicle is a stranded state, the method further includes:
[0024] Determine the number of vehicles in the current lane that are stranded;
[0025] If the number of vehicles exceeds a preset number, determining that the current lane is in a congested state;
[0026] If the number of vehicles does not exceed the preset number, determining that the current lane is in a non-congested state;
[0027] Determining the retention time of the target vehicle in the retention state;
[0028] If the detention time exceeds a third preset time, it is determined that the target vehicle is in an illegally parked state.
[0029] Optionally, according to a vehicle control method provided by the present invention, the analyzing and modeling based on the detection frame information of any frame to obtain the position and posture information of each frame of the target vehicle in the digital twin world includes:
[0030] Get camera calibration parameters;
[0031] Based on the camera calibration parameters and the detection frame information of any frame, a pre-built 3D vehicle frame regression model is used to predict the 3D bounding box information of any frame;
[0032] Based on the 3D bounding box information of any frame, determining the vehicle information of the target vehicle in the three-dimensional space;
[0033] The vehicle information of any frame in three-dimensional space is digitally modeled to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
[0034] Optionally, according to a vehicle control method provided by the present invention, the vehicle information includes chassis position, vehicle angle and vehicle orientation;
[0035] The digital modeling of the vehicle information of any frame in the three-dimensional space to obtain the position information of each frame of the target vehicle in the digital twin world includes:
[0036] Mapping the chassis position, the vehicle angle and the vehicle orientation of any frame to the digital twin world for modeling, and obtaining the position and posture information of the target vehicle in each frame in the digital twin world; or,
[0037] If the vehicle angle is less than a preset angle threshold and the vehicle orientation is at a preset orientation, vehicle recognition is performed on the vehicle monitoring video to obtain a vehicle model classification result of the target vehicle;
[0038] The vehicle model classification result and the chassis position, the vehicle angle and the vehicle orientation of any frame are mapped to the digital twin world for modeling, so as to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
[0039] Optionally, according to a vehicle control method provided by the present invention, determining the vehicle speed in any two adjacent frames based on the posture information in any two adjacent frames includes:
[0040] Determine the acquisition time of any frame;
[0041] Based on the pose information of any frame, determine the center coordinates of the chassis of any frame;
[0042] Based on the chassis center coordinates of any frame, determine the displacement difference between any two adjacent frames;
[0043] The vehicle speed between any two adjacent frames is determined based on the acquisition time of any frame and the displacement difference between any two adjacent frames.
[0044] The present invention also provides a vehicle control device, comprising:
[0045] The detection module is used to perform target detection on the collected vehicle monitoring video frame by frame to obtain the detection frame information of the target vehicle in any frame;
[0046] A modeling module, used for analyzing and modeling the detection frame information of any frame to obtain the position and posture information of each frame of the target vehicle in the digital twin world;
[0047] A speed determination module, used to determine the vehicle speed between any two adjacent frames based on the posture information between any two adjacent frames;
[0048] The state determination module is used to determine the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames.
[0049] The present invention also provides one or more readable storage media storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the vehicle control method as described above.
[0050] The above-mentioned vehicle control method, device and storage medium include: performing target detection on the collected vehicle monitoring video frame by frame to obtain the detection frame information of the target vehicle in any frame; based on the detection frame information of any frame, analyzing and modeling to obtain the position information of each frame of the target vehicle in the digital twin world; based on the position information under any two adjacent frames, determining the vehicle speed under any two adjacent frames; based on the vehicle speed under each two adjacent frames, determining the driving state of the target vehicle. The present invention performs target detection on the vehicle monitoring video frame by frame to obtain the detection frame information of any frame of the target vehicle, and then maps the two-dimensional detection frame information in three-dimensional space to model the position information of each frame of the target vehicle in the digital twin world, thereby obtaining the precise real physical position of the vehicle after modeling, and then judging the driving state of the vehicle such as illegal parking, driving in and out of the parking lot according to the relationship between the vehicle and the parking space, so as to achieve more precise and accurate vehicle control. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0052] Figure 1 It is one of the flow charts of the vehicle control method in one embodiment of the present invention;
[0053] Figure 2 This is a second flow chart of a vehicle control method in one embodiment of the present invention;
[0054] Figure 3 This is a third flow chart of a vehicle control method in one embodiment of the present invention;
[0055] Figure 4 This is a fourth flow chart of a vehicle control method in one embodiment of the present invention;
[0056] Figure 5 This is a fifth flow chart of a vehicle control method in one embodiment of the present invention;
[0057] Figure 6 This is a sixth flow chart of a vehicle control method in one embodiment of the present invention;
[0058] Figure 7 is a structural schematic diagram of a vehicle control device in one embodiment of the present invention;
[0059] Figure 8 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.
[0062] In one embodiment, if Figure 1 As shown, Figure 1 FIG. 1 is one of the flow charts of a vehicle control method in an embodiment of the present invention. The embodiment of the present invention provides a vehicle control method, comprising the following steps:
[0063] Step S11, performing target detection on the collected vehicle monitoring video frame by frame to obtain detection frame information of the target vehicle in any frame;
[0064] It should be noted that multiple surveillance cameras are installed in the parking lot, so that vehicle surveillance videos collected by the surveillance cameras can be obtained. In this embodiment, a pre-trained target detection model (such as YOLO, SSD, Faster R-CNN and other models) can be used to perform target detection on the vehicle surveillance video frame by frame. The target detection model will output the detection frame information of the vehicle detected in any frame. The detection frame information represents the vehicle information in the two-dimensional image. The detection frame information includes the vehicle's position in the image, the vehicle angle, the vehicle orientation and other information.
[0065] Step S12: Based on the detection frame information of any frame, analyze and model the position and posture information of the target vehicle in each frame in the digital twin world;
[0066] In one embodiment, based on the detection frame information of any frame, a 3D vehicle frame regression model is used to predict the 3D bounding box information of any frame of the target vehicle in three-dimensional space. It should be noted that the 3D vehicle frame regression model is a computer vision algorithm used to predict the shape and position of a vehicle in three-dimensional space from a two-dimensional image or video. The purpose of this model is to estimate the size (such as length, width and height), position (such as x, y and z coordinates), vehicle angle and vehicle orientation (head direction of the vehicle), etc. of the vehicle, so that combined with the 3D bounding box information, the chassis position, height, width and length of the vehicle, vehicle angle and vehicle orientation of the target vehicle in three-dimensional space can be determined. Then, the vehicle information of any frame is mapped to the digital twin world to convert the points in the two-dimensional image into points in the digital twin world, wherein, according to the angle and orientation of the vehicle, the specific posture of the vehicle in the digital twin world can be generated to keep it consistent with the actual physical world. In addition, the vehicle model classification model can also be used to identify the type of vehicle detected. It is helpful to further correct and improve the vehicle modeling in the digital twin world, so as to determine the position and posture information of the target vehicle in each frame in the digital twin world.
[0067] Step S13, determining the vehicle speed between any two adjacent frames based on the posture information between any two adjacent frames;
[0068] In one embodiment, based on the posture information of any frame, the chassis center coordinates of any frame can be calculated, wherein the chassis center coordinates refer to the position of the center point of the vehicle chassis in three-dimensional space, and then based on the chassis center coordinates of any frame, the displacement difference between any two adjacent frames can be calculated, and then combined with the acquisition time of any frame and the displacement difference between any two adjacent frames, the vehicle speed in any two adjacent frames can be calculated.
[0069] Step S14, determining the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames.
[0070] In one embodiment, for the case where the speed of the target vehicle is in a deceleration state from fast to slow, the continuous time that the vehicle speed is lower than the preset speed threshold is recorded. If the continuous time exceeds the first preset duration, it is proved that the target vehicle may be in a state of decelerating and parking, and the driving state of the target vehicle is determined to be a pre-parking state, and then the parking lock of the parking space is automatically controlled to unlock, and the parking space information of the parking space is pushed to the owner of the target vehicle to induce the owner to drive into the parking space. Further, for the vehicle in the pre-parking state, whether the vehicle is in the parking space can be determined according to the degree of intersection between the vehicle and the parking space. In more detail, the intersection ratio between the target vehicle and the parking space is calculated. If the intersection ratio is greater than the preset intersection ratio threshold, it is determined that the driving state of the target vehicle is in the parking state. If the intersection ratio is not greater than the preset intersection ratio threshold, and the duration of the target vehicle in the stopped state exceeds the second preset duration, it is determined that the driving state of the target vehicle is a stagnant state. In addition, there may be a situation where the target vehicle is only stranded for a short period of time. Therefore, the embodiment of the present invention is for continuous monitoring of the video stream, and it is necessary to continue to monitor the target vehicle in the stranded state. Furthermore, if it is subsequently monitored that the intersection-and-joint ratio is zero and the distance between the target vehicle and the parking space exceeds the preset distance, the driving state of the target vehicle is modified to the parked state.
[0071] For the case where the target vehicle is accelerating from slow to fast: if it is detected that there is an intersection-and-combination ratio between the target vehicle and the parking space, it proves that the target vehicle may be ready to drive out of the parking space, and then the driving state of the target vehicle is determined to be a pre-out state. For a vehicle in a pre-out state, if it is monitored that the intersection-and-combination ratio between the target vehicle and the parking space is zero, and the distance between the target vehicle and the parking space exceeds a preset distance, it proves that the target vehicle has moved away from the parking space, and then the driving state of the target vehicle is determined to be an out-of-position state. It should be noted that when the target vehicle is in an out-of-position state, the parking space lock is controlled to lock the parking space. In addition, if the distance does not exceed the preset distance, and the duration of the target vehicle being in a stopped state exceeds a second preset duration, it proves that the target vehicle has not driven away from the parking space, and then the driving state of the target vehicle is determined to be a stranded state. In addition, since the embodiment of the present invention is for continuous monitoring of video streams, it is necessary to continue to monitor the target vehicle in the stranded state. Further, if the intersection-and-joint ratio is subsequently monitored to be zero and the distance between the target vehicle and the parking space exceeds a preset distance, the driving state of the target vehicle is modified to an out-of-place state.
[0072] The embodiment of the present invention adopts the above scheme, that is: performing target detection on the collected vehicle monitoring video frame by frame to obtain the detection frame information of the target vehicle in any frame; based on the detection frame information of any frame, analyzing and modeling to obtain the position and posture information of the target vehicle in each frame in the digital twin world; based on the position and posture information in any two adjacent frames, determining the vehicle speed in any two adjacent frames; based on the vehicle speed in each two adjacent frames, determining the driving state of the target vehicle. The embodiment of the present invention performs target detection on the vehicle monitoring video frame by frame to obtain the detection frame information of any frame of the target vehicle, and then maps the two-dimensional detection frame information in three-dimensional space to model the position and posture information of each frame of the target vehicle in the digital twin world, thereby obtaining the precise and real physical position of the vehicle, and then judging the driving state of the vehicle such as illegal parking, driving in and out of the parking lot according to the relationship between the vehicle and the parking space, so as to achieve more refined and accurate vehicle control.
[0073] like Figure 2 As shown, Figure 2 This is the second flow chart of the vehicle control method in one embodiment of the present invention. In one embodiment of the present invention, based on the detection frame information of any frame, the pose information of the target vehicle in each frame in the digital twin world is obtained by analysis and modeling, including:
[0074] Step S21, obtaining camera calibration parameters;
[0075] Step S22, based on the camera calibration parameters and the detection frame information of any frame, using a pre-built 3D vehicle frame regression model to predict the 3D bounding box information of any frame;
[0076] Step S23, determining vehicle information of the target vehicle in three-dimensional space based on the 3D bounding box information of any frame;
[0077] Step S24, digitally modeling the vehicle information of any frame in the three-dimensional space to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
[0078] In one embodiment, pre-calibrated camera calibration parameters are obtained, and based on the camera calibration parameters and in combination with two-dimensional detection frame information, a pre-trained 3D vehicle frame regression model is used to predict the 3D bounding box information of the target vehicle in three-dimensional space, thereby being able to determine vehicle information such as the chassis position, vehicle angle, and vehicle orientation of the target vehicle in three-dimensional space. Furthermore, in one embodiment, the chassis position, vehicle angle and vehicle orientation of any frame can be directly mapped to the digital twin world for modeling, and the position and posture information of the target vehicle in each frame in the digital twin world can be obtained to ensure that its position, angle and vehicle orientation and other postures are consistent with the vehicle in the real world; in another embodiment, in order to make the modeled vehicle in the digital twin world more consistent with the vehicle in the real world, in this embodiment, when the vehicle angle is less than a preset angle threshold and the vehicle orientation is at a preset orientation, for example, the vehicle orientation is facing the camera, the vehicle monitoring video is classified and identified to obtain the vehicle model classification result of the target vehicle, so as to map the vehicle model classification result and the chassis position, vehicle angle and vehicle orientation of any frame to the digital twin world for modeling, so as to assist in correcting the vehicle modeling in the digital twin world according to the vehicle model information.
[0079] Through the above scheme, the embodiment of the present invention realizes the world coordinate system conversion of the detection frame information in combination with the calibrated camera parameters, obtains the real physical position and physical size of the vehicle, and then digitally models the vehicle information of any frame in three-dimensional space, and obtains the posture, speed and other physical information of the vehicle's position information in each frame in the digital twin world, which facilitates the subsequent precise tracking and behavior analysis of the vehicle.
[0080] like Figure 3 As shown, Figure 3 FIG. 3 is a flow chart of a vehicle control method in an embodiment of the present invention. In an embodiment of the present invention, based on the posture information in any two adjacent frames, determining the vehicle speed in any two adjacent frames includes:
[0081] Step S31, determining the acquisition time of any frame;
[0082] Step S32, determining the center coordinates of the chassis of any frame based on the posture information of any frame;
[0083] Step S33, based on the chassis center coordinates of any frame, determining the displacement difference between any two adjacent frames;
[0084] Step S34, determining the vehicle speed between any two adjacent frames based on the acquisition time of any frame and the displacement difference between any two adjacent frames.
[0085] It should be noted that each frame of video data has a corresponding timestamp, indicating the time when this frame of data was collected. In one embodiment, the collection time of any frame is determined, and based on the chassis position in the posture information of any frame, the chassis center coordinates of any frame can be calculated, and then based on the chassis center coordinates of any frame, the displacement difference corresponding to any two adjacent frames can be calculated. Further, based on the collection time of any frame and the displacement difference between any two adjacent frames, the vehicle speed between any two adjacent frames can be calculated.
[0086] Through the above scheme, the embodiment of the present invention realizes accurate calculation of the vehicle speed based on the posture information, so that the driving status of the vehicle such as illegal parking, entering and exiting the parking lot can be accurately judged according to the vehicle speed.
[0087] like Figure 4 As shown, Figure 4 FIG4 is a flow chart of a vehicle control method according to an embodiment of the present invention. In an embodiment of the present invention, the driving state of the target vehicle is determined based on the vehicle speed in two adjacent frames, including:
[0088] Step S41, if the vehicle speed of the target vehicle is in a deceleration state, determining the continuous time that the vehicle speed is lower than a preset vehicle speed threshold;
[0089] Step S42, if the continuous time exceeds the first preset time length, it is determined that the driving state of the target vehicle is a pre-positioning state;
[0090] Step S43, determining the intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame;
[0091] Step S44: if the intersection-and-merge ratio is greater than a preset intersection-and-merge ratio threshold, it is determined that the driving state of the target vehicle is in the in-position state;
[0092] Step S45: if the I / O ratio is not greater than the preset I / O ratio threshold, and the duration of the target vehicle being in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
[0093] In one embodiment, if the vehicle speed of the target vehicle is in a deceleration state, that is, the vehicle speed of the target vehicle changes from fast to slow, the continuous time that the vehicle speed is lower than a preset vehicle speed threshold is further determined, wherein the preset vehicle speed threshold can be set according to actual conditions and is not specifically restricted herein, and then the continuous time is compared with a first preset time length, wherein the first preset time length can be set according to actual conditions and is not specifically restricted herein, if the continuous time exceeds the first preset time length, it proves that the target vehicle may be in a state of accurately decelerating and parking, and then it is determined that the driving state of the target vehicle is a pre-parking state, and the pre-parking state represents a state in which the target vehicle is ready to drive into a berth.
[0094] Furthermore, for vehicles in the pre-positioning state, it is necessary to monitor whether the vehicle is correctly driven into the parking space. In more detail: identify the position and size of the parking space in the digital twin world, generate the parking space frame information. Usually, the position of the parking space is predefined, so its center position and size can be directly obtained. Then, according to the parking space frame information and the position information of each frame of the target vehicle in the digital twin world, calculate the intersection and union ratio between the target vehicle and the parking space, wherein the position information includes the chassis position, vehicle angle and vehicle orientation of the target vehicle in the digital twin world. Furthermore, if the intersection and union ratio corresponding to the target vehicle is greater than the preset intersection and union ratio threshold, it proves that the target vehicle is driven into the parking space, and then determines that the driving state of the target vehicle is in the position state.
[0095] Furthermore, for a vehicle in the pre-parking state, there may be a situation where the vehicle has not been driven into the parking space. Therefore, if the intersection-merge ratio is not greater than the preset intersection-merge ratio threshold, and the time the target vehicle is in the stopped state exceeds a second preset time, it proves that the target vehicle has not been driven into the parking space, and then determines that the driving state of the target vehicle is a stranded state.
[0096] The embodiment of the present invention uses the above scheme to determine the intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame, so as to judge the driving status of the vehicle such as staying and entering the parking lot according to the relationship between the vehicle and the parking space, thereby achieving more precise and accurate vehicle control.
[0097] like Figure 5 As shown, Figure 5 FIG5 is a flow chart of a vehicle control method according to an embodiment of the present invention. In an embodiment of the present invention, the driving state of the target vehicle is determined based on the vehicle speed in each of two adjacent frames, including:
[0098] Step S51, if the vehicle speed of the target vehicle is in an accelerating state, determining whether there is an intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame;
[0099] Step S52: if there is an intersection-to-combination ratio, it is determined that the driving state of the target vehicle is a pre-departure state;
[0100] Step S53: if the intersection-merge ratio is zero and the distance between the target vehicle and the parking space exceeds a preset distance, it is determined that the driving state of the target vehicle is out of the parking space;
[0101] Step S54: if the distance does not exceed the preset distance, and the duration of the target vehicle being in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
[0102] In one embodiment, if the vehicle speed of the target vehicle is in an accelerating state, that is, the vehicle speed of the target vehicle changes from slow to fast, then based on the posture information of any frame, it is determined whether there is an intersection-and-joint ratio between the target vehicle and the parking space. If there is an intersection-and-joint ratio, it is proved that the target vehicle may be ready to drive out of the parking space, and then the driving state of the target vehicle is determined to be a pre-out state, wherein the pre-out state represents the state in which the target vehicle is ready to drive out of the parking space. Further, for the vehicle in the pre-out state, if the intersection-and-joint ratio between the target vehicle and the parking space is zero, it is proved that the target vehicle has completely left the parking space. In addition, in order to prevent the target vehicle from driving out and then entering the parking space or staying in the lane, in this embodiment, it is also necessary to monitor the distance between the target vehicle and the parking space. If the distance between the target vehicle and the parking space exceeds a preset distance, it is proved that the target vehicle has moved away from the parking space, and then the driving state of the target vehicle is determined to be an out-of-position state. The preset distance can be set according to actual conditions. For example, the preset distance is set to the distance of 3 parking spaces.
[0103] In addition, for a vehicle in the pre-out-of-position state, it is possible that the vehicle has not been completely driven away from the parking space. Therefore, if the distance does not exceed the preset distance and the duration that the target vehicle is in the stopped state exceeds a second preset duration, it proves that the target vehicle has not been driven away from the parking space, and further determines that the driving state of the target vehicle is a stuck state.
[0104] The embodiment of the present invention uses the above scheme to determine whether there is an intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame, so as to judge the driving state of the vehicle such as staying or leaving the parking lot according to the intersection-and-joint ratio and distance relationship between the vehicle and the parking space, thereby achieving more precise and accurate vehicle control.
[0105] This makes it possible to judge the driving status of the vehicle in the parking lot, such as staying, entering and exiting, based on the relationship between the vehicle and the parking space, thus achieving more refined and accurate vehicle control.
[0106] like Figure 6 As shown, Figure 6 FIG6 is a flow chart of a vehicle control method in an embodiment of the present invention. In an embodiment of the present invention, after determining that the driving state of the target vehicle is a stranded state, the method further includes:
[0107] Step S61, determining the number of vehicles in the current lane that are stranded;
[0108] Step S62, if the number of vehicles exceeds a preset number, it is determined that the current lane is in a congested state;
[0109] Step S63, if the number of vehicles does not exceed the preset number, it is determined that the current lane is in a non-congested state;
[0110] Step S64, determining the retention time of the target vehicle in the retention state;
[0111] Step S65: If the detention time exceeds the third preset time, it is determined that the target vehicle is in an illegal parking state.
[0112] In one embodiment, the number of vehicles in the current lane that are in a stranded state is counted, and if the number of monitored vehicles exceeds a preset number, the current lane is determined to be in a congested state. In one embodiment, when there are many stranded vehicles in the lane and the lane is determined to be congested, the vehicles in the parking lot can be induced to go to other intersections to improve the efficiency of vehicle traffic in the parking lot. In addition, if the number of vehicles does not exceed the preset number, the current lane is determined to be in a non-congested state; for the target vehicle in the stranded state, it is also necessary to record the length of time the target vehicle is in the stranded state. If the length of time exceeds the third preset length of time, and the current lane is in a non-congested state, it is proved that the vehicle is not stranded due to lane congestion, and then the driving state of the target vehicle is determined to be in an illegal parking state. Further, for the target vehicle in the illegal parking state, if the vehicle monitoring video cannot identify the target vehicle for a long time, or after monitoring that the target vehicle has driven away from the preset distance, the illegal parking state of the target vehicle is deleted.
[0113] Through the above scheme, the embodiment of the present invention can accurately judge whether the lane is blocked based on the number of vehicles in the current lane that are in a stranded state, and analyze and alarm the vehicle's illegal parking behavior in combination with the length of time the vehicle is in a stranded state, which can effectively manage the flow of vehicles in the parking lot, reduce channel blockage, and improve the utilization rate of the parking lot and the user experience.
[0114] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0115] In one embodiment, a vehicle control device is provided, which corresponds one-to-one to the vehicle control method in the above embodiment. Figure 7 As shown, Figure 7 : is a schematic diagram of a structure of a vehicle control device in one embodiment of the present invention, the vehicle control device comprises:
[0116] The detection module 71 is used to perform target detection on the collected vehicle monitoring video frame by frame to obtain the detection frame information of the target vehicle in any frame;
[0117] A modeling module 72 is used to analyze and model the detection frame information of any frame to obtain the position and posture information of the target vehicle in each frame in the digital twin world;
[0118] A speed determination module 73, used to determine the vehicle speed between any two adjacent frames based on the posture information between any two adjacent frames;
[0119] The state determination module 74 is used to determine the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames.
[0120] The state determination module 74 is also used for:
[0121] If the vehicle speed of the target vehicle is in a deceleration state, determining a continuous time during which the vehicle speed is lower than a preset vehicle speed threshold;
[0122] If the continuous time exceeds a first preset time length, it is determined that the driving state of the target vehicle is a pre-positioning state;
[0123] Based on the pose information of any frame, determine the intersection-and-union ratio between the target vehicle and the parking space;
[0124] If the intersection-and-merge ratio is greater than a preset intersection-and-merge ratio threshold, it is determined that the driving state of the target vehicle is in the positioned state;
[0125] If the intersection-to-merge ratio is not greater than a preset intersection-to-merge ratio threshold, and the duration for which the target vehicle is in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
[0126] The state determination module 74 is also used for:
[0127] If the vehicle speed of the target vehicle is in an accelerating state, then based on the posture information of any frame, determine whether there is an intersection-and-joint ratio between the target vehicle and the parking space;
[0128] If the intersection-and-merge ratio exists, it is determined that the driving state of the target vehicle is a pre-departure state;
[0129] If the detected intersection-merge ratio is zero and the distance between the target vehicle and the parking space exceeds the preset distance, it is determined that the driving state of the target vehicle is out of the parking space;
[0130] If the distance does not exceed the preset distance, and the duration for which the target vehicle is in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stranded state.
[0131] The vehicle control device also includes:
[0132] A vehicle quantity determination module is used to determine the number of vehicles in a stranded state in the current lane;
[0133] A congestion state determination module, used to determine that the current lane is in a congested state if the number of vehicles exceeds a preset number;
[0134] A non-congested state determination module, used to determine that the current lane is in a non-congested state if the number of vehicles does not exceed a preset number;
[0135] A detention time determination module is used to determine the detention time of the target vehicle in the detention state;
[0136] The illegal parking state determination module is used to determine that the target vehicle is in an illegal parking state if the detention time exceeds a third preset time.
[0137] The modeling module 72 is also used to:
[0138] Get camera calibration parameters;
[0139] Based on the camera calibration parameters and the detection box information of any frame, the 3D bounding box information of any frame is predicted using the pre-built 3D vehicle box regression model;
[0140] Based on the 3D bounding box information of any frame, determine the vehicle information of the target vehicle in three-dimensional space;
[0141] Digital modeling is performed on the vehicle information of any frame in three-dimensional space to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
[0142] The modeling module 72 is also used to:
[0143] Map the chassis position, vehicle angle and vehicle orientation of any frame to the digital twin world for modeling, and obtain the position and posture information of the target vehicle in each frame in the digital twin world; or
[0144] If the vehicle angle is less than the preset angle threshold and the vehicle orientation is at the preset orientation, the vehicle monitoring video is used for vehicle identification to obtain the target vehicle model classification result;
[0145] The vehicle model classification results and the chassis position, vehicle angle, and vehicle orientation of any frame are mapped to the digital twin world for modeling, and the position and posture information of the target vehicle in each frame in the digital twin world is obtained.
[0146] The speed determination module 73 is also used for:
[0147] Determine the acquisition time of any frame;
[0148] Based on the pose information of any frame, determine the center coordinates of the chassis of any frame;
[0149] Based on the chassis center coordinates of any frame, determine the displacement difference between any two adjacent frames;
[0150] Based on the acquisition time of any frame and the displacement difference between any two adjacent frames, the vehicle speed between any two adjacent frames is determined.
[0151] The vehicle control device also includes:
[0152] A control module, used to control the unlocking of a parking lock of a parking space;
[0153] The induction module is used to push the parking space information of the target vehicle to the owner of the target vehicle to induce the owner to drive into the parking space.
[0154] For the specific definition of the vehicle control device, please refer to the definition of the vehicle control method above, which will not be repeated here. Each module in the above-mentioned vehicle control device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0155] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, Figure 8 : is a schematic diagram of a computer device in one embodiment of the present invention. The computer device includes a processor, a memory, a network interface and a database connected by a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating device, a computer-readable instruction and a database. The internal memory provides an environment for the operation of the operating device and the computer-readable instructions in the readable storage medium. The database of the computer device is used to store data involved in the vehicle control method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instruction is executed by the processor, a vehicle control method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0156] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, and a network interface connected through a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a vehicle control method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0157] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and when the processor executes the computer-readable instructions, the steps of the vehicle control method described above are implemented.
[0158] In one embodiment, a readable storage medium is provided, the readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by the processor to implement the vehicle control method steps as described above. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0159] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0160] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A vehicle control method, It is characterized in that include: Perform target detection frame by frame on the collected vehicle monitoring video to obtain the detection frame information of the target vehicle in any frame; Based on the detection frame information of any frame, analyzing and modeling are performed to obtain the position and posture information of each frame of the target vehicle in the digital twin world; Based on the posture information of any two adjacent frames, determine the vehicle speed between any two adjacent frames; The driving state of the target vehicle is determined based on the vehicle speed in each of two adjacent frames.
2. The vehicle control method according to claim 1, It is characterized in that The determining the driving state of the target vehicle based on the vehicle speeds in each of two adjacent frames includes: If the vehicle speed of the target vehicle is in a deceleration state, determining a continuous time during which the vehicle speed is lower than a preset vehicle speed threshold; If the continuous time exceeds a first preset time length, determining that the driving state of the target vehicle is a pre-positioning state; Based on the pose information of any frame, determining an intersection-and-union ratio between the target vehicle and the parking space; If the intersection-and-merge ratio is greater than a preset intersection-and-merge ratio threshold, determining that the driving state of the target vehicle is an in-position state; If the I / O ratio is not greater than a preset I / O ratio threshold, and the duration for which the target vehicle is in a stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
3. The vehicle control method according to claim 2, It is characterized in that If the continuous time exceeds the first preset time length, after determining that the driving state of the target vehicle is a pre-positioning state, the method further includes: Controlling the unlocking of the parking space lock of the parking space; The parking space information of the parking space is pushed to the owner of the target vehicle to induce the owner to drive into the parking space.
4. The vehicle control method according to claim 1, It is characterized in that The determining the driving state of the target vehicle based on the vehicle speeds in each of two adjacent frames includes: If the vehicle speed of the target vehicle is in an accelerating state, determining whether there is an intersection-and-joint ratio between the target vehicle and the parking space based on the posture information of any frame; If the intersection-to-combination ratio exists, determining that the driving state of the target vehicle is a pre-departure state; If it is monitored that the intersection-merge ratio is zero and the distance between the target vehicle and the parking space exceeds a preset distance, it is determined that the driving state of the target vehicle is an out-of-parking state; If the distance does not exceed the preset distance, and the duration for which the target vehicle is in the stopped state exceeds a second preset duration, it is determined that the driving state of the target vehicle is a stuck state.
5. The vehicle control method according to claim 2 or 4, It is characterized in that After determining that the driving state of the target vehicle is a stuck state, the method further includes: Determine the number of vehicles in the current lane that are stranded; If the number of vehicles exceeds a preset number, determining that the current lane is in a congested state; If the number of vehicles does not exceed the preset number, determining that the current lane is in a non-congested state; Determining the retention time of the target vehicle in the retention state; If the detention time exceeds a third preset time, it is determined that the target vehicle is in an illegally parked state.
6. The vehicle control method according to claim 1, It is characterized in that The analysis and modeling based on the detection frame information of any frame to obtain the pose information of each frame of the target vehicle in the digital twin world includes: Get camera calibration parameters; Based on the camera calibration parameters and the detection frame information of any frame, a pre-built 3D vehicle frame regression model is used to predict the 3D bounding box information of any frame; Based on the 3D bounding box information of any frame, determining the vehicle information of the target vehicle in the three-dimensional space; The vehicle information of any frame in three-dimensional space is digitally modeled to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
7. The vehicle control method according to claim 6, It is characterized in that The vehicle information includes chassis position, vehicle angle and vehicle orientation; The digital modeling of the vehicle information of any frame in the three-dimensional space to obtain the position information of each frame of the target vehicle in the digital twin world includes: Mapping the chassis position, the vehicle angle and the vehicle orientation of any frame to the digital twin world for modeling, and obtaining the position and posture information of the target vehicle in each frame in the digital twin world; or, If the vehicle angle is less than a preset angle threshold and the vehicle orientation is at a preset orientation, vehicle recognition is performed on the vehicle monitoring video to obtain a vehicle model classification result of the target vehicle; The vehicle model classification result and the chassis position, the vehicle angle and the vehicle orientation of any frame are mapped to the digital twin world for modeling, so as to obtain the position and posture information of the target vehicle in each frame in the digital twin world.
8. The vehicle control method according to claim 1, It is characterized in that The determining of the vehicle speed between any two adjacent frames based on the posture information between any two adjacent frames includes: Determine the acquisition time of any frame; Based on the pose information of any frame, determine the center coordinates of the chassis of any frame; Based on the chassis center coordinates of any frame, determine the displacement difference between any two adjacent frames; The vehicle speed between any two adjacent frames is determined based on the acquisition time of any frame and the displacement difference between any two adjacent frames.
9. A vehicle control device, It is characterized in that include: The detection module is used to perform target detection on the collected vehicle monitoring video frame by frame to obtain the detection frame information of the target vehicle in any frame; A modeling module, used for analyzing and modeling the detection frame information of any frame to obtain the position and posture information of each frame of the target vehicle in the digital twin world; A speed determination module, used to determine the vehicle speed between any two adjacent frames based on the posture information between any two adjacent frames; The state determination module is used to determine the driving state of the target vehicle based on the vehicle speed in each of two adjacent frames.
10. A computer-readable storage medium having computer-readable instructions stored thereon, It is characterized in that When the computer-readable instructions are executed by a processor, the vehicle control method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Multi-parking-space multi-target vehicle parking identification method and system
CN113516852A
Vehicle detection tracking method, device and equipment based on quasi real-time digital twinborn display
CN114639032A
Parking management method, parking management device and computer readable storage medium
CN114863372A
Intelligent parking lot visualization method based on digital twinning
CN116205061A
Digital twin intersection construction method and system based on vehicle identification and track mapping
CN116883610A
